00:00:00 --- log: started forth/03.07.16 00:00:19 i have to clear table or i jump to netherlands 00:00:49 w/ your scheme, unbind is automagic 00:01:34 What I'm saying is you could do this: 00:01:37 MARKER FOO 00:01:44 CREATE myTable ....etc... 00:01:51 ...code goes here... 00:02:05 VARIABLE previousMapping 00:02:15 currentMapping @ previousMapping ! 00:02:22 myTable currentMapping ! 00:02:25 ...code goes here... 00:02:35 previousMapping @ currentMapping ! FOO 00:02:59 That is a lot of boilerplate code, I suppose. 00:03:17 hmmm...there has to be an easier way around it. 00:03:44 it's crap ! 00:04:11 but dict search on every keyhit is no good too 00:04:35 brute force 00:04:57 'have pover - need no mind', RU proverb :(( 00:05:57 Power without mind is dangerous. :) 00:06:18 or, rather: 00:06:29 have might - need no mind ;) 00:06:41 See, one advantage to having only a 27-key keyboard is that the keyboard handler is very easy to define. 00:06:47 It's done this way: 00:07:12 no, no ! 00:07:18 : h PAD ( 28 names of words to execute, depending on key ) ( 28 bytes containing key mapping icons ) ; 00:07:24 Now, here me out. 00:07:34 hear me out rather. 00:08:00 The PAD word is the keyboard handler. It's definition is basically this: 00:08:23 : PAD BEGIN KEY CELLS R@ + @ EXECUTE AGAIN ; 00:08:42 i lose w/o bucky bits and F1-F10 00:08:45 (it's a bit more involved than that, but that should be enough to tell you roughly how it works) 00:08:59 Bucky bits? What are bucky bits? 00:09:09 ctrl, alt, shift etc.. 00:09:40 yeah, i got !!!! 00:09:48 Well, I have two responses to that. You lose because (1) you're just not used to the layout, and (2) you're not willing to learn a new layout. 00:10:01 But the specific layout isn't the issue. 00:10:13 It's the neatness with which one can define custom keyboard layouts and such. 00:10:24 If I didn't have 103 keys to worry about, I'd definitely go that route. :-) 00:10:43 hack FORGET so it clears from keytable everything higher than word being FORGETed 00:12:07 kc5tja: I go that route and I have 103 keys to worry about 00:12:33 XeF4: Lots of sparse table entries that way though. Trying to type in: 00:12:51 PAD nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul space 'a' 'b' 'c' 'd' 'e' ....etc... 00:12:57 Is a bit of a burden. 00:14:02 but the table for all the "printing" keys can be autogenerated 00:14:57 I suppose, but I'm still a bit partial to my method. 00:15:14 hm.. 00:15:30 what FORGET does, ex for setting HERE and LATEST ? 00:16:02 Call it NIH syndrome, but I really like the ability to say, for example, : $$c78 delete ; and have it automagically work. 00:17:03 FORGET sets HERE to the address of the word it's forgetting. It sets LATEST to the word just before the forgotten word, so that the next word's "previous word" pointer remains correct. 00:17:26 $$ ? 00:17:29 and that's all ? 00:17:54 XeF4: The $$ is a standard prefix to allow me to grep it easily, plus helps avoid accidental (re)definition with non-key-binding words. 00:18:31 Serg_Penguin: Well, if you have vocabularies defined, it'll unlink those, etc. If not, then yes, that's all. I can't think of anything else it would do. 00:18:44 Dictionary searches always start at LATEST, so it doesn't care about what HERE is pointing to. 00:19:03 kc5: *nod* do you then use separate wordlists for different keymaps or generate temporary words to the same wordlist and then FORGET when you back out of a screen/keymap/whatever? 00:19:54 so i tend to write my own FORGET to clean up my style keytable after plugin ;) 00:19:59 XeF4: I redefine words and FORGET as needed. (I defined MARK and EMPTY in ANSI Forth so that the sources to better approximate how FS/Forth will work -- I'm very pleased with the results) 00:21:02 Serg_Penguin: Yup. That is called "chaining" in assembly language programming, where you patch a function, do your own thing, then invoke the original function afterwords. It forms the basis of DOS' Terminate-and-Stay-Resident code, for example. 00:23:16 then i call original FORGET _to the middle_, beyond BL WORD FIND ?BRANCH $XXXX 00:26:41 See, that's the problem I have with FORGET -- it parses the input stream, which makes it *very* difficult to use when extending its meaning. 00:26:59 You mentioned "load" in a previous discussion. You could perhaps use that. But I'm not sure. 00:35:57 kc5tja: decompile FORGET and call it in the middle, beyond parsing 00:36:35 [ ' FORGET 6 + , ] 00:36:45 --- join: Blandest (~email@24.66.121.31) joined #forth 00:37:39 : forget word (forget ; 00:38:18 : FORGET BL WORD FIND IF ( _your call hits here_ ) .... ; 00:38:38 but now I must run random errands while I still have *some* brian function in this heat 00:38:52 ?? 00:41:21 FORGET FORGET will look mega weird ;)) 00:44:26 But it will work. :) 00:44:30 hey, why hack if forget gives us the dict top new LATEST and HERE ? 00:44:59 and we can take new HERE or LATEST, and clear from keytab everything what is greater ! 00:45:27 : UNPLUG FORGET HERE @ >UNBIND ; 00:45:56 UNPLUG PLUGIN-NAME 00:46:05 and it's cleared from keytab ! 00:46:19 as well as from dictionary ;) 00:47:40 very portable, unlike calling original FORGET in a middle ;( 00:48:27 UNBIND just compares every keytable entry w/ HERE, and if greater - zeroes it 00:50:39 * kc5tja nods 00:50:48 GAHHHH!!!! 00:50:59 * kc5tja can't log into go-daddy.com because *none* of his passwords work with the site. 00:51:22 * kc5tja is PISSED -- I do NOT LIKE it when a site decides, "Oh, you haven't logged in for a while, so we'll take the liberty of changing your passwords." 00:51:58 removing old users is normal IMHO, or at leas blocking 00:52:54 I registered my domain name for three years. 00:53:09 It's not a matter of removing an 'old user.' Domain name system doesn't have 'users.' 00:53:18 did you ever shot from air spring gun ? 00:53:19 But it does have folks who pay for their domain names. 00:53:21 ok,ok 00:53:47 * kc5tja is fuming mad right now. They will be sure to receive a phone call from me, and I will tell them a thing or two on how to run their business. 00:54:18 Air spring gun? Yes -- a pellet gun that I shot while I was in the desert about six months ago. 00:54:30 It was amazingly accurate, considering it was just a toy gun too. 00:54:35 what kind of ? 00:54:41 A pellet gun 00:54:55 That's all I know. 00:54:59 here folks shot a pigeon from 50m (150 f ?) 00:55:09 4,5 mm caliber rifle 00:55:21 200-250 m/s speed 00:55:22 1/8th inch pellets = ~ 6.3mm 00:55:32 I think this gun had a 200 ft range. 00:55:47 so 50 ft = 14m, so 64m range? 00:56:18 it's a battleship cannon compared to ones legal here ;)) 00:56:25 Maybe it was 250ft. I know it was a pretty small range. 00:56:32 Heheh 00:56:44 Well, you know America -- land of the Big Guns and the Wild West. 00:56:56 Although, guns are increasingly becoming illegal here. 00:56:56 it shoots pigeon at 50m, pellet flying much more far 00:57:06 it suxx 00:57:34 Well, this thing had a real range of about 200ft -- beyond that, and its aiming accuracy noticably worsened. 00:57:35 they are good fucktor of natural selection ;)) 00:58:38 did you ever fired crossbow ? 00:58:40 Oh well. I suppose I need to sleep. 00:58:45 No. I'd like to someday. 00:59:19 I did do archery a while ago though. Wasn't very good at it, but it was pretty fun. 00:59:25 Lots of blisters on the fingers. :) 00:59:40 Anyway, I have to go. Beditme for me. 00:59:44 how in ENG the rubber stone thrower is named ? 00:59:51 rubber on woodfork 01:00:03 Sling-shot. 01:00:21 sling ? it rotates ! but this - goes straight 01:00:34 A sling rotates. A sling-shot reciprocates. 01:01:03 i wanna give it to my old aunt, w/ paintball pellets 01:01:20 hooligans in her yard making noise at night :) 01:01:26 Ahh 01:01:30 so she wants to calm them down 01:01:37 I suppose a spud-gun is out of the question then. :) 01:01:47 spud-gun ? 01:02:12 i firtst thunk of air-raifle, but it may hurt hard 01:02:29 Imagine a 10cm tube (PVC pipe or lead pipe, whatever), open at one end, closed at the other. 01:02:44 10 cm in D or L ? 01:02:48 Unscrew the end-cap at the closed end, and insert a potato. 01:02:49 Diameter 01:03:05 Make sure potato has good fit for proper sealing. 01:03:18 ;))) 01:03:27 Then, spray hair-spray, alcohol, gasoline, or other volatile mixture into the chamber, and quickly close it off again. 01:03:39 Then, with a spark-plug mounted in the tube, ignite the "fuel." 01:03:45 *BOOM!* Instant mashed potato artillery. 01:04:11 my aunt is afraid of fires and explosions 01:04:15 And yes, the humble potato will happily bore a hole through a small tree with enough fuel behind it. :D I've done it. 01:04:53 BTW, my friend converted air-rifle to this ;)) 01:05:29 Anyway, I gotta go to bed. I can't keep my eyes open. 01:05:36 ok, bye 01:05:40 Night! :) 01:05:44 --- quit: kc5tja ("THX QSO ES 73 DE KC5TJA/6 CL ES QRT AR SK") 01:05:47 --- part: Serg_Penguin left #forth 01:17:40 --- join: a7r (~a7r@206.72.82.135) joined #forth 01:17:41 yoh 01:27:47 hrm, my SDL support is working in pforth 01:27:49 rock the casbah 01:34:52 --- quit: Blandest (Read error: 104 (Connection reset by peer)) 01:52:37 --- quit: w1k1_ (Read error: 54 (Connection reset by peer)) 02:01:10 --- quit: a7r (Read error: 60 (Operation timed out)) 02:44:11 --- join: Klaw (~anonymous@ip68-4-157-105.oc.oc.cox.net) joined #forth 03:20:51 --- join: Serg_Penguin (Serg_Pengu@212.34.52.140) joined #forth 03:22:58 --- quit: Serg_Penguin (Client Quit) 04:12:13 --- join: w1k1 (~w1k1@pD9EE18AE.dip.t-dialin.net) joined #forth 04:13:58 --- quit: Robert (Read error: 54 (Connection reset by peer)) 04:23:25 --- join: Robert (~snofs@h126n2fls31o965.telia.com) joined #forth 04:29:01 --- quit: Robert (Remote closed the connection) 04:33:45 --- join: Robert (~snofs@h126n2fls31o965.telia.com) joined #forth 05:10:20 --- join: crc (~crc@ACA5C5D5.ipt.aol.com) joined #forth 05:27:40 --- join: w1k1_ (~w1k1@pD9545BE5.dip.t-dialin.net) joined #forth 05:36:10 --- quit: w1k1 (Read error: 60 (Operation timed out)) 06:15:57 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 06:25:45 --- quit: crc ("I was using TinyIRC! Visit http://www.tinyirc.net/ for more information.") 07:02:31 --- join: draq (ident@203-219-179-14-nsw.tpgi.com.au) joined #forth 07:11:30 --- quit: Robert (Read error: 104 (Connection reset by peer)) 07:17:01 --- join: Robert (~snofs@h126n2fls31o965.telia.com) joined #forth 07:44:10 --- join: Herkamire (~jason@h0030657bb518.ne.client2.attbi.com) joined #forth 07:44:19 --- join: ASau (~asau@158.250.48.196) joined #forth 07:44:39 howdy folks 07:44:49 Good evening! 07:45:59 hi 07:46:10 my color editor in gforth is almost done! 07:46:24 Wah! 07:46:47 inserting deleting a character & moving the cursor up r the missing features ;) 07:46:48 What does it require to run? 07:46:52 gforth 07:47:20 Hm. Gforth has many meanings. 07:47:58 E.g. I can run Gforth/DJGPP and it will lack many of UNIX features. 07:48:06 aham 07:48:11 im developing under linux 07:48:53 Does it use termcap? VT100? Curses? 07:48:58 & i decode the esc[O1~ escapce sequences 07:49:10 it doesnt use any libraries 07:49:37 Hm. I can't recall ^[[O1~ sequence. 07:49:45 It seems it is not VT100 07:50:23 That's good if it use only VT capabilities. 07:50:26 sec 07:51:34 onetom, Isn't moving cursor up the sequence ^[[A ? 07:51:40 esc [24~ <- f12 07:52:12 Ah, you mean keyboard VT codes. 07:52:19 up is: esc [A 07:52:22 yes 07:52:43 for cursor positioning, i simply use gforths at-xy word 07:53:16 but u can easily redefine the kbd handler, coz its separated from the editor 07:53:17 It seems VT has something like ^[[r;cX 07:53:53 yeah 07:55:40 ithink the easies way 2 port it 2 dos is loading ansi.sys & rewriting those 8 lines what define the esc sequences 07:56:09 There is a problem, that ANSI.SYS is not VT100. 07:56:21 It is something like VT52. 07:56:38 It's more weak terminal. 07:57:18 Anyway, it's interesting way to port. 07:57:45 Further elaboration can lead us to y.a. termcap/terminfo ;) 07:57:55 i dont know much about ansi.sys but its very similar i think 07:57:59 Written in Forth, of course. 07:58:03 sure 07:58:27 but it would bring a load of bloat into the editor... 07:59:02 How it's written in ANS? 07:59:28 INCLUDE /usr/share/forth/term/vt100 ? 07:59:46 Sorry, vt100.f 08:01:00 Don't forget that in cases C has to interprete Forth can LOAD. 08:03:44 nah 08:03:53 hold on 08:05:11 BTW, what VT does Linux emulate? Do you know? 08:05:57 tom:~# echo $TERM 08:05:57 screen 08:06:53 I don't believe DEC folk has not forced Linux to be more DECkish. 08:07:23 * onetom is trying 2 setup a webserver 2 publish his coloreditor 08:07:39 ftp? 08:07:59 Usually ftp access setup is easier. 08:10:40 im almost done 08:11:07 http://cab.bio.u-szeged.hu/ced 08:11:50 usage: tar zxvf ced-... ; cd ced ; ./ced 08:12:05 PGDN 1st. the 1st block is too long 08:13:08 q - quit 08:14:46 I've found an interesting sheet of paper. 08:15:05 I thought how to optimize looping constructs in Forth. 08:15:12 Just a question. 08:15:27 How many times do you use DO-LOOP cycling? 08:15:39 And how do you use it? 08:15:56 a) 0 DO .... LOOP ? 08:16:23 b) OVER + SWAP 0 DO .... LOOP ? 08:17:21 It seems that we could reduce stack usage if we change DO-LOOP to something that counts down. 08:18:02 ? 08:18:05 Something like optimized: 0 SWAP DO .... -1 +LOOP 08:18:46 what is the url? 08:18:50 In this case we need only one cell in loop or return stack to control. 08:19:05 hands://my.desktop/ 08:19:14 :)))) 08:21:37 i can understand where is the gain... does anybody can? hands up! 08:22:11 -1 +loop is longer 2 represent & longer 2 run in a traditional itc 4th 08:22:29 I've searched my Forth system sources and realized, that in half of cases there is looping "n times do this", i.e. 0 DO ... LOOP 08:22:41 over + swap 0 do .. loop doesnt make much sense 2 me. 08:22:52 okay. and? 08:23:19 And counter is not used at all. 08:23:50 aham 08:23:51 Hence we can count down from T to 0 08:24:00 sure 08:24:11 thats what for .. next does 08:24:15 And we can save 1 cell on return stack 08:24:22 Hm? 08:24:36 Never I heard of FOR NEXT 08:24:44 10 for do-sy next 08:25:00 machine 4th actively used for next 08:25:17 even chucks c4th has it 08:25:42 if im wrong well.. 08:26:38 So, if I understand you correct, FOR X NEXT is equivalent to 0 DO X LOOP 08:28:56 If counter value is not used by X 08:29:19 --- join: wossname (wossname@HSE-QuebecCity-ppp81694.qc.sympatico.ca) joined #forth 08:29:37 Good evening! 08:30:04 hello 08:32:57 onetom: Then I don't understand why it seems it's used rarely. 08:33:37 onetom: If it's used at all. 08:36:13 http://www.merlintec.com/download/color.html 08:36:31 ASau: coz its nonstandard 08:36:44 its more traditional 08:36:58 and more flexible & more highlevel 08:37:10 ooops 08:37:13 again: 08:38:16 for-next: non standard, but efficient. can b found in any newer 4th implementation 08:39:06 do-loop: more felxible, more highlevel, more convenient 4 fast cmdline hacking, cleaner, so its more comprehensible 08:39:16 OK, I've understood. 08:40:26 Hm. I recall that our school teaching p.l. had loops: n TIMES ... REPEAT (written Forthish). 08:41:15 thats logoish 08:41:38 It was so far in past I can't recall what we were doing using it. 08:41:57 I don't know Logo. 08:42:40 IIRC, it is more complex than our school p.l. 08:43:16 "My brain is damaged with for(;;)" ;) 08:43:23 logo is - mainly - used 2 teach turtle graphics 08:43:32 :) 08:44:09 We had turtle graphics, but this was not the first usage of that p.l. 08:44:09 gotta go 08:44:15 try my editor! 08:44:24 OK 08:44:33 Bye! 08:44:34 it relies on gforth-0.5.0's itc structure 08:44:54 it doesnt run on 0.6.x... yet.. 08:47:06 itc whats that? 08:48:14 Indirect threaded code. 08:49:44 yup 08:50:52 Hi 08:51:00 Privet! 08:51:10 Privet, ASau 09:09:52 --- quit: draq (Remote closed the connection) 09:36:26 ASau: I use for ... next in my forth 09:36:35 i440r did too 09:36:36 and tathi 09:36:57 OK. 09:37:09 I could easily make it so you could get the count from inside the loop, but the count is going down 09:37:33 In fact, I needed to know if it is done and how it is called. 09:38:04 some forths don't use "next" because that has some other standard meaning I guess. 09:38:17 i440r used "nxt" or something instead. 09:38:35 I don't care about the forth standards, so I just "next" because I like it :) 09:38:59 Actually, this can be written as BEGIN - UNTIL loop, thus count can be accessible. 09:39:24 I just want the convienience of saying do this x times. 09:39:54 My NEXT inlines machine code for jumping to inner interpreter. 09:39:56 : stars for 42 emit next ; 09:40:10 So do I. 09:40:43 I'd liked TIMES REPEAT 09:41:16 I don't have do...loop in my forth. I've occationally wanted the counter (going up) but it's never been a problem. usually it ends up better without it. 09:41:16 Or TIMES END 09:42:26 I was playing with minimal set of primitives. 09:43:40 Eliminated (LOOP) and (+LOOP) lead me to simplify all loops by reducing them to BEGIN-UNTIL and BEGIN-WHILE-REPEAT 09:43:42 I got my native ppc colorforth down to 8 kernel words 09:43:55 I don't have any of those. 09:44:21 I just have tail recursion, for/next for loops. 09:44:27 Those contains simple BRANCH and ?BRANCH inside. 09:45:18 I used to reuse previously defined words with the same name. 09:45:40 Thus recursion conflicts. 09:45:49 my only ?branch is in IF 09:46:19 : WHILE [COMPILE] IF ; IMMEDIATE or something like 09:46:20 next uses bdnz (branch decrement not zero) 09:46:29 djnz 09:46:54 ASau: that's the x86 equivilent? 09:47:11 "Spectrum" foreva ;) 09:47:30 KP580BM3 09:47:35 aka Z80 09:47:38 I highly reccomend hacking ; to implement tail recursion and using that for all non-counted loops 09:48:27 my loops are much simpler than they would be with begin/until or do/loop or repeat/again 09:49:57 Currently I'm going another way. 09:50:17 I hack vocabularies. 09:51:39 But I'll try tail recursion some day. 09:52:20 But this will be after I hack 7-bit restriction inherited from my base system. 09:52:53 what base system do you have? 09:53:24 I started from FIG-Forth 1.0 09:53:39 And now I have 26-th generation. 09:54:13 It resembles original, but has many optimizations. 09:58:57 is that a DOS forth? 09:59:34 I have gereric system. 09:59:42 Also stand-alone. 10:00:20 man, that's the only thing that makes me wish I had x86: everybody makes their own OS 10:00:28 nobody makes a little PPC OS like that 10:00:46 I don't want to do it first, I just want to do it better :) 10:01:43 And I wish DEC killed Intel. 10:02:11 How easy all this would be. 10:02:35 Too weird hardware... 10:02:51 --- join: mur (murr@baana-62-165-189-64.phnet.fi) joined #forth 10:03:05 Dobryj veczer! 10:03:26 yeah. x86 probably isn't any better for makeing an OS now that PPC. 10:04:08 privet ASau 10:04:12 hoi herke 10:04:14 mire 10:04:18 hej Robert 10:04:23 hi mur 10:05:21 Hi there 10:10:16 Concerning OS. 10:11:11 I started collecting various code to control peripheral, like A20 gate, PIC, DMA. 10:11:31 Slowly I translate it into Forth. 10:11:40 Does anyone else need it? 10:14:13 ASau: not I 10:14:27 I can guess... 10:14:45 anybody here working with a color forth? 10:16:31 I couldn't start working with color forth due to the same reasons as many of OSes: my hardware is somehow different, written code doesn't work. 10:17:27 E.g. I've found that A20 gate opens another way than it was expected by some OS writers. 10:27:00 I mean the concept, not chuck's version 10:27:27 I mean preparsed source, with some bits to indicate color. 10:27:43 color == what should be done with the work (execute, compile, etc) 10:30:33 Well, I think concept is viable, but I go in another direction. 10:31:04 I don't accept it, in other words. It's too far from me. 10:32:37 --- join: kc5tja (~kc5tja@ip68-8-206-137.sd.sd.cox.net) joined #forth 10:32:37 --- mode: ChanServ set +o kc5tja 10:32:48 Good evening! 10:32:54 Good morning. 10:33:04 morning :) 10:33:17 kc5tja: have you played with pre-parsed source? 10:33:23 mur, tell them time of the day. 10:33:26 Herkamire: Not yet. 10:33:40 ASau: My local time is 10:35 AM. 10:34:11 My local time is 9:35 pm. 10:34:15 Herkamire: I'm still in the source code stone ages as far as that is concerned. 10:34:50 There is also another play. 10:35:02 What do you think of literate programming? 10:35:05 ASau evening, why? 10:35:15 20.35 10:35:36 Do you think it's morning? 10:35:50 ASau: Good in theory, but in practice, it's very burdensome, and does more to hinder the creative process involved with writing software. 10:36:23 I don't agree. 10:36:50 ASau: I overwhelmingly prefer to let the source code speak for itself as far as what it does -- writing self-describing software not only makes better use of my time, but also significantly increases the creative effect. 10:36:51 I recently experiment with it. 10:37:33 * kc5tja experimented with it years ago. Used all sorts of WEB and WEAVE tools. 10:37:39 I just couldn't program with them. 10:37:41 It's very interesting. I write as I think. 10:37:46 In any order. 10:37:58 See, that's the dangerous part -- "in any order." 10:38:19 Software won't work if you write it in "any order." There is a specific sequence of writings that must occur in order for software to work. 10:38:28 And software which doesn't work isn't valuable, to me or to my customers. 10:38:31 I write critical parts first. 10:38:51 And later make interfaces. 10:39:26 The other thing is I spend 90% of my time writing English description, and 10% actually writing code. This is counter-productive, since software *evolves* over time, even during its development (customers very rarely know *precisely* what they want up front). 10:40:06 Hence, any change to the code, no matter how minute, is preceded with spending 30 minutes to an hour retrofitting the English descriptive text, just to keep the text in sync with the customer's changing requirements. 10:40:16 kc5tja: I agree 10:40:32 My practice shows, that if you have no spoken thoughts, you can lose something behind. 10:40:48 ASau: That sentence makes no sense. Rephrase? 10:40:54 I once tried writing my documentation before I started coding. it helped me get more organized, but I ended up changing the code enough that I had to re-write the documentation 10:40:59 "you can lose something behind" is what tripped me up. 10:41:33 This is why I ardently advocate the practice of extreme programming. 10:41:50 If you can't explain what you think in words, you can leave something important out of your mind. 10:42:05 scribbling outlines and hashing stuff out on paper is good stuff I think. but writing detailed or end-user oriented documentation before you're done seems a waste of time 10:42:12 Thus you can easily mistake. 10:42:39 ASau: Yes. This is one reason why extreme programmers test *first* rather than test *after*. 10:43:08 Herkamire: It's worse with literate programming: you're not writing end-user documentation -- you're writing an architectural document for *programmers* to read. 10:43:55 I say you should just document the bits that others have to use 10:43:59 ASau: Our software requirements are encoded in software executable form, usually in the same language as the program itself is being written in, called "unit tests." They're written *before* the relavent software is written. 10:43:59 As you write literate style you write practically the same way you think. 10:44:26 ASau: No, no, no I sorely disagree. 10:44:41 You show why have you done such decision etc. 10:44:45 ASau: what kc5tja is getting at, is that instead of writing descriptions of what your code should do or does, you should write a test that checks that your code does what it should. 10:45:18 ASau: Because when I tackle a programming problem, I have five to six concurrently active thought processes in action. Yet, English (and all other spoken and written languages) are inherently *serial* communications methods. I cannot *possibly* write six paragraphs concurrently. This is ignoring how quickly they change. 10:45:28 these tests serve as nice documentation (as they show _exactly_ what the code should do) and the test are invaluable in creating reliable code. 10:45:30 Herkamire: Precisely. 10:45:46 kc, that is why you have tangle 10:46:12 ASau: The serial nature of written communications is an inherent flaw that *NO* software can counter. 10:46:19 Given tangle tool you can jump from one thing to another in any order. 10:46:33 I have ONE keyboard. I have ONE cursor. I have ONE pair of hands. I can only write ONE word, ONE sentence, ONE paragraph at a time. 10:46:40 I can only read ONE thing at a time. 10:46:42 ASau: the problem with all the documentation being in english, is that people have a tendancy to only read them when they need to, like when something is clearly wrong, and they've already wasted an hour trying to figure out what it is. 10:46:48 Later you can reorder you thoughts in bigger chunks automatically.' 10:46:48 But I can THINK multiple things concurrenty. 10:46:55 ASau: Useless. 10:46:58 Waste of time. 10:47:04 with unit tests, the computer reads them, and checks them and tells you when you went against the docs. 10:47:32 kc, how much time do you spend thinking? 10:47:48 I don't believe you write code a la prima 10:47:49 ASau: I think pretty much all of the time 10:48:08 ASau: Then you don't know me very well. 10:48:22 what's "a la prima" mean? 10:48:33 ASau: I've been programming for over 20 years, I've tried all the "gee-whiz" development processes and techniques, and only XP truely works. 10:48:45 Herkamire: He's saying that he thinks I'm not that good of a programmer. 10:49:11 All because literate programming doesn't work for me, and because he's utterly unwilling to bother trying to understand how XP compares to literate programming. 10:49:36 I don't say you're bad programmer. 10:49:43 That's EXACTLY what you said. 10:49:54 "I don't believe you write code a la prima" 10:50:03 Bug-free code is something I do. 10:50:22 I've spent the last 10+ years honing and refining my skill and technique. 10:50:55 "a la prima" means you get task description, sit down, code, compile, run and your code is bug free. 10:51:04 Instead of spending 8 months writing followed by 16 months debugging, I just spend 16 months writing it correctly the first time (OK, a few bugs are bound to show up now and again -- but unit tests catch them very early in the development process). 10:51:24 At first time without even 5 min of non-coding time. 10:51:41 ASau: Your ignorance of a development process is showing here. 10:51:56 ASau: But to answer your question, yes, without one iota of non-coding time. 10:52:04 That's what "a la prima" means. 10:52:11 We've had this discussion before. 10:52:20 And I said, "Do research on XP and do research on test-driven development." 10:52:25 It's patently clear you didn't do either. 10:53:00 So of course my abilities seem pretty prima donna and incredulous. 10:53:10 Because you don't know, nay, don't WANT to know, how I do it. 10:53:18 I've tried literate programming. 10:53:22 It failed woefully for me. 10:53:33 I switched to XP, and I haven't picked up a debugger in years. 10:53:48 That does not mean LP is bad or not good. 10:54:07 Like I said above, "Good in theory, bad in practice." 10:54:16 That means it does not work to you. 10:54:27 I spend *so much* of my time writing the descriptive text, that it easily gets out of sync with the actual *code*. 10:54:41 "good in theory, bad in practise" is because people are too lazy to implement how it supposed to go :) 10:55:02 LP strongly advocates "Big Design Up Front." 10:55:09 It's strang, why I haven't found it? 10:55:20 My text is in sync with code. 10:55:34 And my code reads like text, so there you go. :) 10:56:13 I don't believe your code reads like text. 10:56:22 Code is code, it's not natural language. 10:56:26 Surely, you do need to know the programming language. 10:56:37 But the program says what it does, not how. 10:56:48 The how is implicit. 10:57:12 many tasks which a program language describes, are described much more clearly in the programming language than they could be in english 10:57:50 Oh, no! Well, my program multiply matrices, but that has little connection to what it really does. 10:57:53 The thing with LP is it advocates big design up front. This means you spend 80% of your time thinking about the project, and 20% actually coding. 10:58:13 It can solve problems of just another science! 10:58:23 ASau: So? 10:58:43 ASau: My program moves bytes of memory around, but the program is still very easy to understand. 10:59:14 Well-chosen names and good factoring are highly conducive to writing programs that are so self-documenting that comments aren't needed, much less the textual baggage that LP endorses. 10:59:24 "Why" program is written that way it is, is more important than the code itself. 10:59:36 ASau: NO!!! That's your critical flaw! 11:00:02 You are writing a program, a work of art that is to be appreciated by two groups: 1) Computers, and 2) Humans. 11:00:19 When I look at your program's source code, I don't want to read a book. 11:00:25 I want to read your program. 11:00:33 And the *intent* of your program needs to be clear FROM THE SOURCE. 11:01:05 If it isn't, you've failed pretty critically in communicating to the reader what the program does. 11:01:23 Explaining WHY a program is coded like it is is an apology to the reader. 11:01:41 /* This code is written this way because it's faster. */ 11:02:07 The example above implies that you would prefer to write it more clearly, that you're AWARE that the code is NOT clear for some reason. 11:02:18 Now, high-speed optimizations are of course valid uses for WHY comments. 11:02:22 You can not understand why there has been done some decisions, but they've been done. And mupltiplying matrices sometimes has no connection to algebra or geometry. This matrices maybe are not matrices at all. 11:02:35 But to make this your underlying philosophy? That affects your code globally? That's just wrong. 11:03:01 Matrices are matrices are matrices. 11:03:21 But, you're also missing the point by a mile too. 11:04:13 kc, if you want to read only program, then another question. 11:04:22 If you need to explain the code to such detail that you go into the reasons why you chose this algorithm over others, that should raise a red flag. 11:04:26 Do you write real comments? 11:04:41 ASau: My comments, when I do use them, do *NOT* parot the code. 11:04:47 The code speaks for itself . . . always. 11:04:49 Not copyright clauses or license. 11:05:04 Then why write comments? 11:05:15 Good question to ask yourself -- I've gotten over comments years ago. 11:05:48 Let me give you a real-world experience I had with a program I'd written for Hifn, Inc. 11:05:51 Just deformat program, it becomes less lines. 11:06:09 my forth does not support comments 11:06:09 ASau: Again, you're missing the point. 11:06:11 I just added shadow blocks. 11:06:14 tell the story, tell the story! 11:06:15 Let me give you a real-world experience. This actually happened. 11:06:32 I intend to have my editor always show you the definition of the word under your cursor. 11:06:35 i want to know how you achieved code nirvana and transcended ordinary practice 11:06:36 I wrote a semiconductor verification tool which tested a 1024-bit integer math coprocessor unit (actually, it had 16 such units on the chip). 11:07:09 My program's job was to create DMA input packets for the chip, submit them, then compare expected results by comparing against the DMA output packet. 11:07:31 Another goal was to flood the chip so heavily that it was guaranteed to create contention on the chip's internal buses (tested its load handling capability). 11:07:43 This software does not sound easy to write, now does it? 11:07:53 It wasn't -- it took me a year and a half to get it done. 11:08:06 But when it was done, two things happened. 11:08:39 (1) Hardware bug was discovered. The management refused to believe that the bug was in the hardware. Management also did not appreciate that I wrote the code according to XP methodology. 11:08:52 "You're spending all your time writing unit tests, and not enough time writing code!" they would say. 11:09:27 Well, 1.5 years later, those unit tests vindicated my software *completely*, in front of senior-level management and chip engineers, by single-stepping through the code in front of a live audience. 11:09:37 The bug *had* to have been in the hardware. 11:09:49 (2) While single-stepping through the code, people noted that I had no comments. 11:10:04 heh 11:10:09 "What kind of code is this? You claim to be a professional software developer, yet I don't see any lick of any documentation!" 11:10:34 "You'll have to go back and add comments. I can't make heads or tails of this code. It looks like it's doing A, then B, then C, as if D were somehow the result it's after." 11:10:43 uhhh.... It *IS* was my response. 11:10:47 The room feel completely silent. 11:10:49 this was in C or something? 11:10:51 C. 11:11:23 Without any provokation on my part, a top-level manager, world reknowned to have no code-reading abilities at all, managed to *read my code* and *understand what it was trying to do* without even looking at the top-level. 11:11:39 But of course, I was forced to spend another 8 months inserting useless comments, that just parotted the code. 11:12:07 But I was happy because I found a bug in the hardware, the unit tests covered my ass, and inserting comments involved no significant work on my part 11:12:12 so what, "A" and "B" werent obscure method names? 11:12:21 more like concepts? 11:12:26 ianni: No, I just can't go into details because it's Hifn proprietary knowledge. 11:12:31 r, function names 11:12:40 ianni: Oh, they were function names, but the names were also concepts, yes. 11:12:42 well, im asking a vague question, but ok 11:12:49 *nods* 11:12:50 ianni: Yeah, I wasn't sure. :) 11:13:31 Hm. 11:13:39 That's also solution. 11:13:49 so why no comments in code? 11:13:57 So there you have it -- despite everyone in the company thoroughly comprehending the whole program after a complete walk-through, with very little input on my part -- they did the grokking themselves, I was still forced to spend a good deal of time commenting existing code, when the company had MUCH more pressing matters to deal with. 11:14:00 you have comments outside already? 11:14:12 ianni: No, I don't. The code *is* the comment. 11:14:13 To test code in full instead of writing correct code that needs no testing. 11:14:35 ASau: Whoa whoa whoa -- I didn't say I wrote code that didn't need testing. 11:14:49 ASau: I did say, I test my code before I even write it. 11:14:56 (and yes, the tests fail, obviously) 11:15:40 This is the whole point behind test-driven development. 11:16:05 The final product, when released, has zero bugs in it, *by definition* of the unit tests, which in turn, are *by definition* of the customer's requirements. 11:16:21 You just used to take problem from opposite site than those I used to take. 11:16:23 If you use the software in a manner not in accordance with the customer's requirements, the software will likely have an issue. 11:16:51 --- join: ez4 (~ez4@pcp01518726pcs.reding01.pa.comcast.net) joined #forth 11:16:55 But then, using such software in such a manner then becomes a new requirement, and hence, new unit tests are written to back it up. 11:17:27 That Hifn project, BTW, was the very first extreme programming project I've ever done. 11:17:52 And it wasn't even full XP -- I was the sole programmer, the sole designer, etc. I had my manager as a customer, and that was it. 11:18:02 I like how the model is mased on requirements, and that those requirements can change. 11:18:10 But the results proved to me that the concepts worked in practice. 11:18:16 * kc5tja nods 11:18:21 I wanna to pair programming 11:18:34 s/mased/based/ 11:18:39 http://blades.netnation.com/~falvotec/how-xp-works.html <-- very brief introduction to the development process, from a customer's point of view. 11:19:04 This is why I'm making XP the very central concept in my company. 11:19:22 Oh, the other nice thing about XP -- everything is measurable. 11:19:32 Which is why I'm basing my invoicing strategy on it. :) 11:19:39 nice :) 11:19:42 It's completely auditable. 11:19:48 Right down to individual feature requests. 11:19:54 very cool 11:20:16 I'm working on brining some concepts from agile programming methodologies into the company I work for. 11:20:27 * kc5tja nods 11:20:41 Good point -- XP isn't the only agile development methodology. 11:20:46 There's also SCRUM and a few others. 11:20:50 I haven't figured out how to make unit tests for our web scripts though 11:20:52 But I don't know much about the others. 11:21:21 Herkamire: Those are hard. :) I'd have to know a bit more about them to understand the exact problems involved. 11:21:36 BTw, that Hifn project is also where my CUT tool came from, too. 11:21:45 C Unit-testing Tool. :) 11:21:56 tathi gave us this link: http://www.martinfowler.com/articles/newMethodology.html 11:22:10 our programmers and manager read it and like it. 11:22:31 we were (and mostly still are I'm sure) definately using the "code and fix" methodology. 11:22:36 our testing is pathetic. 11:23:01 * kc5tja nods 11:23:17 kc, it seem XP works to you because you get simple criteria of "how this would work". 11:23:21 The nice thing about all these agile techniques is that you can pick and choose from each one as you see fit, and create your own. 11:23:31 I have no such criteria. 11:23:49 My problems are research ones. 11:23:59 ASau: The concepts apply there. 11:24:02 as a result we've instituted a policy with our programmers and our current big client that we release some features every other week on wednesday. 11:24:06 All complex problems are decomposable to smaller ones. 11:24:22 kc, I can't see how. 11:24:27 it's not XP by a long streach, but we have a development cycle with a place for testing. 11:24:29 Herkamire: However, a typical user story can take up to a week to implement, so it's not like they're "small" requests. 11:24:36 ASau: Then you are unpracticed. 11:24:38 the "release often" bit we're going for. 11:24:42 (not a complaint, just an observation) 11:25:03 ASau: Let me see if I can demonstrate by example. What's one of your requirements? 11:25:30 A little addition, I'm not programmer, I'm chemist. 11:25:48 So my problems are complex, not only software or harware. 11:25:50 --- join: suprdupr (CrowKilr@HSE-Windsor-ppp250456.sympatico.ca) joined #forth 11:26:08 ASau: OK, sweet! This makes it even better! If you relinguish all coding to me, and you just concentrate on core functionality, then that actually improves the process. 11:26:32 --- nick: suprdupr -> CrowKilr 11:26:39 hi oh 11:26:42 ! 11:26:52 ASau: a proof that all complex problems are decomposable into smaller ones: When a software problem is solved, that means that the problem has been broken down into simple machine instructions. 11:26:57 ASau: Remember too that we meet on a regular basis in XP, and things which are ambiguous to the programmer are often broken down into smaller chunks on an as-needed basis. 11:27:28 ASau: And you quite likely won't even know that that's what is happening when we talk to you too. 11:27:48 re CrowKilr 11:28:27 The other thing that improves the process is the fact that the customer actually provides us with a written test on each user story card -- each story must be testable. 11:28:37 Don't worry about trying to make it automatable -- that's my job as a programmer. 11:29:30 For example, "When I click on button X, a caffeine molecule will appear on the data view. If I drag the horizontal scroll bar 50% to the left, the caffeine model will rotate 90 degrees to the right." 11:29:40 That's a test that a customer like yourself might write. 11:30:49 Just a rationale contra: nobody (me too) knows what answer should be. 11:31:33 ASau: You often think you don't, and maybe you truely don't for awhile. But you'll be amazed at just how productive the system is. 11:31:47 The other thing: LP is a programmer-specific task. XP is a complete process and design philosophy unto itself. 11:31:55 (which, BTW, shares a **LOT** with the Forth philosophy!) 11:32:10 XP encompasses not only the programming, but also customer relations. 11:32:12 There are too many examples of software can't find global minimum. 11:32:45 For a continuous, differentiable equation that is an algebraic order larger than 5, no, it's not possible. 11:32:57 Such equations go on forever. 11:33:01 Computers are not infinite. 11:33:24 Ditto for a large class of differentiable equations. 11:33:34 Yes, and my functions are transcendential, not even rational. :( 11:33:35 Here we get a bit of Moore's philosophy -- remove non-problems. 11:33:52 If you can't do it for the global case, maybe you can do it for a sufficiently large window in the local case. 11:33:53 I'm interested in XP because of that. I see that the really important problems in software development in the two companies are with customer relations. 11:33:55 NIH? 11:34:01 ASau: Not Invented Here 11:34:07 we needed a methodology to deal with changing requirements. 11:34:13 That's solution also. 11:34:19 more on the customer end, but we could use on on the programming end too. 11:34:23 We don't need it. 11:34:41 Just as Mahatma Gandhi's 11:34:46 * kc5tja nods 11:36:04 Herkamire: I like Fowler's interpretation of RUP...That's cute. 11:36:22 Herkamire: "Since [RUP] can be anything, it often ends up being nothing." 11:36:42 I don't think I'm going to be able to get index cards into the mix, but I've got my manager and other programmers working with the plan that we have a two week development cycle, and that during the first week we implement features, and the end of the seccond week we release them. 11:37:25 kc5tja: I think that's a great document. I don't know much about any of the programming methodologies (except XP) that he talks about, (so it's hard to say how objective/accurate/fair he's being) but I thought it was great to read. he seems like he's right on. 11:38:13 I thought he was very good about finding what a methodology was good at, or what it accomplished, rather than berating it because it didn't do what he wanted it to. 11:38:34 and that he had the focus of something agile, which is what I'm looking for :) 11:38:52 * kc5tja nods 11:39:24 This is a bit too long for me to read at the moment, but I'm just skimming it. :) 11:42:51 * kc5tja has to do some errands today. I need to check the plugs in my car for fowling -- it sounds like one of the rotors is starting to misfire. 11:43:15 Hm. I think. I can't find any inconsistencies in LP and XP. 11:43:17 Then I need to call up GoDaddy to ask them to re-instate my old password (or give me a new one), because their systems lost it. 11:43:28 It seems they're complementary. 11:44:54 I'm sure there's a way to fit it into the process. But XP does advocate self-describing software and reducing the need for commentary. 11:45:05 I'll tell you where LP *really* shines though -- programming for government services. 11:45:12 Because they want all that heavy-duty documentation and whatnot. 11:46:50 Does fs/forth use interrupts? 11:47:20 CrowKilr: You know, I've been thinking hard about that. 11:47:32 LP describes not only how "this particular thing" is done, but also the process of its creation, thus providing reusable sourse (not lib.). 11:47:32 The DOS version just runs under DOS -- it uses DOS and BIOS services as needed. 11:47:43 The Linux verison will, obviously, run under Linux and use Linux services. 11:47:52 But the Native version . . . I don't know if it'll use interrupts or not. 11:48:24 im in this questionning also 11:48:26 lol 11:48:28 Why not use BIOS? 11:48:43 ASau: "First, I used VI. I can't get by without my VI. Then I typed, "I" to enter insert mode, and . . . " (j/k!) 11:48:58 asau: pmode 11:49:04 Ah. 11:49:09 ASau: Because the hardware native software will be 32-bit protected-mode software. BIOS will not run in that environment. 11:49:37 I know. I wanted to ask if it's p.m. but you were first :) 11:49:50 * CrowKilr hihihi 11:49:54 brb 11:49:59 making a few phone calls. 11:50:25 asau, are you on a forth project at this moment? 11:51:06 YAY! I get to be on hold! 11:51:21 What project do you mean? No. 11:52:19 --- join: tgunr (~user@vsat-148-63-143-139.c189.t7.mrt.starband.net) joined #forth 11:52:52 Good ... evening! 11:53:40 Hehehe :D 11:53:49 ASau: Well, in five more minutes, it'll be afternoon here... :D 11:54:04 It is night here. 11:54:14 --- quit: wossname () 11:54:21 Should I say "good night"? 11:54:40 * kc5tja doesn't know. 11:54:47 Maybe we should just use GMT standards. 11:54:48 :) 11:55:03 In which case, it would be evening here according to universal time. 11:55:12 We have different standards :) 11:55:46 Your location doesn't recognize UTC (aka Greenwich Mean Time)? 11:55:49 If we should use standard, everywhere it would be Moscow decret time. :D 11:56:11 We mean different standards. 11:56:24 UTC (aka GMT) is gennerally accepted 11:56:31 So you don't have 60 seconds in a minute, 60 minutes to an hour then? 11:56:36 :) 11:56:47 UTC is a standard time reference, not a standard. 11:56:48 metric time! 11:57:04 Hey, if only our planet orbited the sun in a slightly different orbit, we could have metric time!! 11:57:33 Of course, that orbit would also mean the death of all life on this planet too... But since the moon is synchronously locked with Earth, metric time on the moon makes sense. :) 11:57:37 Hm. IIRC, France 1st Republic had metric time. 11:57:55 Earth years were once 360 days 11:57:57 I think Swatch Time had metric properties to it too. 11:58:09 the years would funky, but everything from secconds to days could be base 10 11:58:41 That's easy. 11:59:26 We are only not to bind ourselves to solar and moon (mixed) calendar. 11:59:55 I like having the time and the sun in sync. 11:59:58 moon time would be great, 13 28-days month 12:00:37 --- quit: ez4 (Read error: 110 (Connection timed out)) 12:01:06 Herk, take 1 sec to be equal to 1/1000000 of the day. 12:01:24 ASau: exactly. 12:01:53 You can count hexadecimal at your wish :D 12:02:35 I.e. 1/1000000H 12:02:37 it would need a new name. tic or something 12:02:55 Not "tac"? 12:03:19 a tic would be 0.0864 of a seccond 12:03:30 a day is a megatic 12:04:06 Good god...We'd need a name for a week too. 12:04:09 a Kilo Tic would be almost a minute and a half. 12:04:10 Dekamegatic? 12:04:37 maybe we should make a tic 10 times bigger. 12:04:46 Why? 12:05:00 1 ktic is approx. 1 min 12:05:00 kc5tja: with a good PAUSE word, no need for interrupts 12:05:05 so a day is 100,000 tics and a (10 day) week is a megatic. then a tic is much closer to a seccond 12:05:08 1 Mtic is 1 day 12:05:30 CrowKilr: Not true. Interrupts have their purpose. They're essential for network cards, because of the extremely high speeds with which they can overflow their queues. 12:05:50 and a Ktic would be about 14 minutes 12:05:50 Hm. It's good also. 12:06:31 Let us count octal 12:06:43 1 tac = 1/1000000Q day 12:06:44 octal sucks 12:06:55 Then let's count hex. 12:07:04 kc5tja: with a good IDLE and PAUSE word, wouldnt be easy to get past the interrupts? 12:07:18 CrowKilr: Get past??? 12:07:30 sorry for the bd english 12:07:45 CrowKilr: Let's also not forget that network cards need to be serviced when the computer is busy doing something too. 12:07:46 those words would make it easier to forget about ints 12:08:03 hmmm 12:08:12 damn lol 12:08:40 CrowKilr: And I would like the keyboard to be interrupt driven, because if I accidentally put the machine in an endless loop somehow (all too easy to do with new software development), I want to be able to hit a few keys and return to the console, no matter what is currently running. 12:09:30 That is a critical flaw with ColorForth, that I've found. Typing this in ColorForth (or, rather, it's equivalent): : foo foo ; will absolutely hang the system. :) 12:09:43 You have to reboot (takes more than a minute on my box!) to break out of it. 12:09:49 kk now why were you asking yourself to use ints or not??! lol 12:09:59 (well, I just kill -9 it, since I'm running ColorForth under X11, but you get the idea) 12:11:06 some guys were hooking switches to their NMI lines in old ISA based machines 12:11:10 CrowKilr: Interrupts have a dark side too -- like preemptive multitasking kernel design, you need to be willing to process an interrupt at a moment's notice, no matter what you're currently doing. 12:11:12 i read that somewhere 12:11:42 and PCI need IRQs... that damn PCI bus lol 12:11:52 CrowKilr: Actually, it doesn't. 12:12:06 im using the damn word, cause its really making me sick 12:12:07 CrowKilr: The devices on the PCI bus may require IRQs, but PCI itself is neutral to them. 12:12:15 sound, network, etc they need it somehow 12:12:19 kkk 12:12:36 CrowKilr: Yes, because audio and network devices operate asynchronously to the computer. 12:12:40 I'll take that in consideration in my future statements , thank you ;p 12:12:54 Ever listen to audio played without interrupts? It's choppy, lots of dead-air time, sounds a lot like a skipping CD player. 12:13:23 CrowKilr: The interrupt mechanism helps keep their buffers full, so that you get uninterrupted sound. 12:13:28 Now, let me further make a point: 12:13:35 good news, http://www.thelma-louise.net/ is back up since a few hours 12:13:35 Most OSes do WAY TOO MUCH in an interrupt handler. 12:13:48 An interrupt handler's job is to: 12:13:59 1) Stuff a buffer, or start a DMA operation to fill a buffer, or 12:14:08 2) Notify another program to take some action. 12:14:12 End of discussion. 12:14:26 Windows doesn't agree with me, but that's why Windows has such *horrible* multitasking performance. 12:14:40 windows does suck at multitasking 12:14:55 Also, priority-based multitasking (yes, cooperative multitasking can be priority-based too) should be able to take the rest of the real-time response slack out of the system. 12:15:00 i always wondered if the gui integration in the kernel had anything to do with it 12:15:01 for all of those who like to try colorforth w/ a qwerty keybord.. 12:15:21 * CrowKilr would love to see somewhere small and efficient code snippets for ISRs(HID, sound, network, video), maybe on forth.bespin.org 12:15:24 ianni: No -- AmigaOS also had a GUI integrated in the kernel, and it's world reknowned for its high speed. 12:15:46 CrowKilr: When I get to that point, they'll exist. 12:15:54 =) 12:15:56 --- nick: w1k1_ -> w1k1 12:16:04 I would love to participate 12:16:14 For the time being, however, I'm concentrating on Linux development because I get the greatest return on my coding investment. 12:16:54 I was thinking of linux to get info on my machine's PCI hardware 12:17:44 It is grotesquely infuriating that Linux is currently the best "PC Hardware Programmers Reference Guide" we have. 12:18:11 * CrowKilr agrees so much 12:18:13 When I get to programming individual motherboard devices on my box, you can rest assured I'm going to create at least some kind of minimal hardware documentation files and publish them on #Forth's site. 12:19:55 ditto. when I write an OS I'm going to write a document on how to write a PPC OS. I'm very frustrated that I couldn't find a how-to document for this. 12:21:27 i got a small polled keyboard handler (SCSet 1), using two tables characters and actionkeys. The first contains characters and signed indexes into the second table. ACtionkeys points to the code for enter, etc 12:22:21 maybe the signed bytes values could be jump offsets, if the code is small enough. 12:23:36 * kc5tja nods 12:23:38 Interesting. 12:23:45 first the handler get the key, if its below 80h, use the characters table 12:23:55 if its E0 then goes to extended keys handler 12:23:58 BTW, IIRC there was a movement for disassembling proprietary Sinclair's ROM. 12:24:05 if its E1 it jumps to a two pass pause handler 12:24:15 Has anyone heard something like this for x86? 12:24:25 * kc5tja nods -- that's how my handler will work. It will even be "state smart" so that I can properly distinguish between numeric keypad and real number keys. 12:24:42 I saw one day on a website titled MAGIC OF SHADOW RAM a great idea 12:24:58 ASau: There are too many BIOS implementations, even within a single manufacturer, for this to prove worthwhile. 12:25:00 follow bios' code to unlock the power of the machine, and even patch it in RAM 12:25:48 ASau: The other problem is they often use jumps and subroutine calls to attempt to throw off disassemblers' attempts to decode it. They're not nice people. :) 12:25:58 This should be good source of code snippets. 12:26:06 Rats! Mazdatrix is closed for lunch!! >:/ 12:26:16 --- quit: tgunr (Read error: 54 (Connection reset by peer)) 12:26:17 * kc5tja needs a price on a new power steering pump for my car. 12:26:51 asau: i also thought about it, but could not dissassemble it properly, maybe with ida pro though, or through a VM of some sort 12:27:08 O! 12:27:09 IDA Pro ... I remember that tool. 12:27:10 great hacking project, most logical thing to do 12:27:17 bochs has ROM 12:27:43 came to know IDA by essays on fravia+'s site 12:27:46 Or it should have one 12:27:53 Bochs is also woefully incomplete compared to a real PC. It's video support is wholesale inadequate to run even ColorForth. 12:29:09 IIRC, there is freeware version of IDA. 12:29:25 I wish bochs would support more graphics modes. I would like to try cf and enth/flux 12:29:52 * kc5tja nods 12:30:08 I'll probably end up using Bochs to develop my native FS/Forth first, then attempting to run it on real hardware afterwards. 12:30:20 Probably just going to use 640x480 video mode, 16 colors. 12:30:36 Though, I wish I could get more, but then I'd have to rewrite all my applications. 12:30:42 use cracked vmware 12:30:46 way better =) 12:30:59 --- quit: mur (Read error: 104 (Connection reset by peer)) 12:31:03 i use it to try bootable iso images 12:31:29 another problem i came across: bootbale cds and raw hardware access & pmode switch 12:31:42 CrowKilr: I tried VMware -- way too slow, utterly unusable, and I tried, it ALSO will not run ColorForth or flux. 12:31:51 --- join: mur (murr@baana-62-165-189-64.phnet.fi) joined #forth 12:31:54 it runs Trinux 12:32:11 yeah its slow though 12:32:30 makes my laptop heat like crazy too 12:32:42 * kc5tja nods 12:33:48 hmmm so now i got to implement interrupts.... Enth got interrupts working IIRC 12:34:05 I've offered to write a graphics driver for VMWare for flux, but Sean hasn't had time to re-organize the flux internals to the point where I can work on it. 12:35:01 flux is great, neat project 12:35:06 He tries to enter graphics mode very early in the bootstrap, and fails if he can't make it. 12:35:40 Older versions of Enth/flux work (0.2.6) but anything that uses the graphics mode don't. 12:36:37 CrowKilr: I like how he uses block 0. :) 12:37:20 clear TIB concept, yep 12:38:40 enth.img won't boot in Vmware 12:39:14 VMWare doesn't like partial disk images when the program tries to read past the end of the image. 12:39:44 TreyB: Yeah, I found that out the hard way. I used dd to fix that problem real quick though. :) 12:40:31 Damn Small Linux does! 12:41:23 kk i should have thought about this anomaly in the filesize 12:41:40 i found a gem the other day: dd for winxp 12:41:55 CrowKilr: Cool. :) 12:42:01 came with a usb-stick linux distribution 12:42:08 c source included 12:42:12 enth.img does not contain a full multiple of the track size worth of data, and enth reads track-at-a-time. 12:42:15 how does flux use block 0? 12:42:49 Herkamire: You never leave the block editor. So to execute commands interactively, you type them into line 0 of block 0. :) 12:43:18 cool. 12:43:21 * kc5tja nods 12:43:39 I'm planning on doing something simular, but on a different block 12:43:44 minibuffer? ;) 12:43:48 No need for separate input handlers or whatnot like in most Forth environments (even ColorForth has two systems of input). 12:44:25 you can just play with the interpreter, and if you end up doing something you like, you open the editor on the "scratch" block, and save it into your set of source blocks. 12:44:50 ASau: You have the full 16 lines in block 0 -- it's just that after you hit the ENTER key on line 0, it will interpret it, print whatever it needs to in the buffer (e.g., TYPE and EMIT spit data out into the buffer), then the editor makes another hole for new input on line 0. So you get a form of command-line history taht way too. 12:44:55 actially, I was going to make that scratch block be the next available block, that way if you want to save it I don't even have to move it. 12:45:23 very good. 12:45:30 Herkamire: Actually, you never leave the editor. Block 0 in the editor is no different from block 153, except that 0 has special "interpret NOW!" status. 12:45:39 the more I learn about flux, the more it seems to be the same as what I'm doing 12:45:56 cool. 12:46:10 I will have a keystroke to toggle interpret-now 12:46:31 you can have it execute stuff as you insert it into the middle of an existing block if you want. 12:47:36 Time to invent M-x? Flux' way seems to be better. 12:47:49 I decided a long time ago that I would not have an interpreter and an editor. just an editor. 12:47:57 I was thinking of possibly implementing a similar feature in VIBE. 12:47:59 Emacs! 12:48:07 You hit a key, and it executes whatever is on the current line. 12:48:34 kc5tja: I'm not sure I'm going to do lines. 12:48:38 It ought to be pretty darn trivial to support too. 12:48:43 ekernel.asm got ISR code 12:48:48 but I was thinking a key that executes the word under the cursor and advances the curser to the next word. 12:48:55 * kc5tja knows, but I still use pure-ASCII blocks, so I can do lines. :) 12:48:58 No words forth! Really, Emacs! :))) 12:49:02 you could hold down the key for a seccond to execute a bunch of words. 12:49:26 ASau: Emacs Schmemacks. Forth! 12:49:47 You're on half the way. 12:49:49 Herkamire: OOOoohh, I see. So you're doing it precisely one word at a time. 12:50:16 Herkamire: My problem is, some of my words will be source-parsing words, such as S". 12:50:28 kc5tja: Haven't decided for sure. 12:50:49 kc5tja: exactly. it's different with preparsed source. 12:51:18 I haven't decided if I will have lines. if I do I will certanly have a key to interpret the current one. 12:51:25 The other thing is, while most of my definitions would fit on a single line, some definitions just don't, or they depend on multiple colon definitions being compiled as a group. 12:51:32 So I need to figure some way of supporting text ranges in my editor. 12:52:05 I was hoping I wouldn't have to deal with ranges 12:52:10 besides "the whole block" 12:52:15 * kc5tja nods 12:52:23 why not use a color editor with a word-sized cursor 12:52:24 maybe "here to the end/begining" 12:52:37 CrowKilr: That doesn't solve my problem. 12:52:41 CrowKilr: yeah 12:52:54 what is the problem with the ange? 12:52:58 range* 12:53:01 Instead of ranges of characters, I'll then need to deliniate ranges of words. 12:53:17 my current thought is to take vim's concept oh having the cursor _on_ a character, and have the cursor _on_ a word. 12:53:34 I'm making a word editor. 12:53:58 I'm not going to do anything with characters except in strings wich will be a seperate editor 12:54:20 Well, it seems I am to go. 12:54:21 CrowKilr: I'm avoiding ranges because I think they will bring unnessesary complexity to my editor 12:54:22 Bye! 12:54:32 ASau: Later :) 12:54:40 bye asau, hope to see you around! 12:54:50 Herkamire: So far, I've managed to avoid ranges. But they have their uses. 12:54:54 --- quit: ASau ("Toffee IRC client for DOS v1.0/b535") 12:54:59 --- join: a7r (~a7r@206.72.82.135) joined #forth 12:55:04 afternoon 12:55:05 I keep seeing more and more and more cool things about having the editor be able to easily see what's a word and what color it is. 12:55:06 re a7r 12:55:09 hey kc5tja 12:55:35 kc5tja: I might do ranges too. I use them in vim 12:55:37 kc5tja: I broke down and hooked pforth into SDL last night. 12:55:41 Herkamire: I agree. FS/Forth is a traditional Forth mainly for historical reasons. But I will eventually write a color editor and color block loader for it. 12:55:49 so I can finally do graphics with Forth under OS X 12:55:58 a7r: that's great :) 12:56:04 a7r: might pforth work on ppc? 12:56:16 --- join: ez4 (~ez4@pcp01518726pcs.reding01.pa.comcast.net) joined #forth 12:56:25 a7r: heh, what are you making? 12:56:27 kc5tja: cool :) I highly recomend this color stuff. 12:56:27 a7r: Oh, cool. :D If you want to post the code on #forth, you can always e-mail it to me. 12:56:35 #forth website that is 12:56:38 Herkamire: yah, that's what I'm working with. 12:56:46 kc5tja: I have to clean it up a bit,. but that sounds cool. 12:56:58 a7r: that's awesome. I want to try it. 12:57:12 Herkamire: this is on my G4, under OS X.. as a Cocoa app. 12:57:24 a cocoa app using forth? 12:57:33 a7r: you think it will be hard to get it to work undel linux? 12:57:42 s/undel/under/ 12:57:43 Herkamire: nah, I want to make it a straight SDL app. 12:57:47 ianni: Get used to it, PAL!! This is the #FORTH CHANNEL!!! >:) 12:57:54 ianni: j/k 12:57:57 haha.. 12:58:00 ianni: it just happens to be a Cocoa app, cuz of how SDL is used on Mac OS X 12:58:04 wait, we talk about Forth here? 12:58:11 ah 12:58:21 ianni: Yes . . . no . . . I was deliberately wasting your time, sir. :D 12:58:26 a7r: let me know when I can try it 12:58:31 ianni: I'm trying to do graphics with Forth, but I don't want to use x86 gear, and I don't feel like writing my own Forth yet. 12:58:57 so I kicked pforth around a bit. 12:59:26 I've been thinking that SDL would be a good way to do graphics in a forth written in C. 12:59:28 Herkamire: the idea is, you have a chunk of memory allocated, and you've got a pixel format of RRGGBBAA, and you can blit that memory from pforth into SDL's screen. 12:59:42 (and if I was still interested in my C forth I would probably add SDL support.) 12:59:43 Herkamire: XColorForth, the X11 port of Moore's ColorForth, uses SDL for its virtual frame buffer. :) 13:00:11 It's almost certainly what I'll be using for my Forth too, though using raw X11 would be nice to have too, for better system integration (support of multiple windows, etc) 13:00:13 kc5tja: is that written in C? 13:00:17 so, you can write graphics into any arbitrary memory buffer, and then blit it as you wish. 13:00:25 --- join: tathi (~josh@pcp02123722pcs.milfrd01.pa.comcast.net) joined #forth 13:00:37 do you have a url for XColorForth? is there any chance it would work on PPC? 13:00:37 Herkamire: The loader for it'll be in C, but the Forth itself will be written in target-compiled FS/Forth. 13:01:29 Herkamire: No chance at all -- it's built specifically for x86 (ColorForth is a native-code compiling MachineForth environment) 13:01:48 that's what I thought. I want to try his colorforth sometime. 13:01:50 Herkamire: But if you have access to an x86 box running Linux, you can try it there. Let me get you the URL anyway. 13:02:02 I tried the windoze version of cf but it crashed when I invoked the editor 13:02:06 Herkamire: It's neat, but the user interface isn't my ideal. :) 13:02:41 Herkamire: Ahh, careful -- you *must* invoke the editor above a certain block, because blocks 0-(I think)17 are reserved for the Forth kernel binary image. 13:03:02 Block 18 is the first block with actual human-editable source in it. 13:03:26 http://www.oakland.edu/~maslicke/colorforth/ 13:04:48 maybe that was it. I thought I tried some higher blocks too. 13:05:08 you just type "18 edit" right? 13:06:20 --- quit: ez4 (Excess Flood) 13:06:23 Yes 13:06:25 kc5tja: thanks for the link. I'm sure to be able to get one of those to work :) 13:06:30 Quick question: is the kbd interrupt on x86 is executed at every byte or at every scancode? 13:07:12 * CrowKilr is in the process of making his kdb driver interrupt driven 13:07:17 CrowKilr: Technically, every byte. But the CPU itself doesn't interrupt every time because after getting the first interrupt, you *poll* the keyboard controller until its buffer is empty. Then you clear the interrupt, and return. 13:09:02 Herkamire: Yeah, I learned a lot about ColorForth the hard way. Then I joined the mailing list for it. It's a pretty low-volume list, but lots of good people on it. 13:09:16 (including Chuck Moore himself, but he rarely ever responds) 13:09:51 I'm so glad people are hacking on chuck's cf and making it work on other computers. I couldn't find one that his ran on. 13:10:00 were not really putting through ground breaking stuff, since he already broke it lol 13:10:36 CrowKilr: what? 13:10:46 s/were/we're, on the colorforth mailing list 13:10:48 * kc5tja was thinking of making a simple game with CF, but I just haven't had the chance to yet. 13:11:02 kc5tja: you seen the Tetris clone in Flux? 13:11:11 a7r: No, because I can't run Flux. :) 13:11:32 I was pertty impressed.. it's like 4 blocks, including the shapes 13:11:32 no wonder CM doesn't respond, since its CF kick the hell out of many systems 13:11:34 a7r: I was thinking of making a simple Bochie (boccie? Boccy? However you spell it!) game. 13:11:41 werd. 13:12:25 i tried to play it, dont like the gameplay, I like sliding pieces ;pp Best tetris: new tetris on N64 13:12:37 kc5tja: the game where you toss a little yellow ball out, and each player tries to toss their bigger ball so it lands near the yellow one? 13:14:43 CrowKilr: I bet you a dollar that the tetris on N64 was longer than 4 blocks. :> 13:15:20 I think I'm going to start implementing some cellular automata experiments in Forth now that I have the SDL stuff working. 13:17:12 Herkamire: Yeah. 13:18:28 a7r: You know, I was thinking of implementing Life on CF too. :D I think that'd be neat. 13:18:40 That's how I learned about PAD under ColorForth, as I wanted to know how to use the keyboard. 13:20:22 OK, I'm going to resume some of my errands. 13:20:32 * kc5tja needs to issue a few phone calls, and then check the plugs on my car. 13:39:54 a7r: Well, I tried to check the plugs. None of my sockets are big enough to pull them. 13:40:09 (big as in long enough; I'm sure I have the right diameters) 13:40:31 BUT, I did notice that I'm missing the overflow tube to the overflow reservoir (which itself is low). 13:40:55 However, coolant level as observed from the engine's coolant port seems to be still good. 13:41:07 But it IS definitely leaking some amount of coolant. 13:41:41 * kc5tja will have to get that fixed later today. I was scheduled to see my mechanic today anyway. 13:42:08 Im trying to build a small overunity generator ala Bedini 13:42:37 I ripped motors from trashed optical pickups and a bunch of 25V+ 2200uF caps 13:42:46 from power supplies 13:43:07 --- quit: Herkamire ("leaving") 13:43:11 Now i got to find a suitable rechargable battery 13:43:34 power FETs transistors and some magnet wires to build the generator 13:44:10 the idea is simple: motor---mass---generator, --- being a shaft 13:44:36 the generator use magnetic induction and a bridge rectifier 13:44:50 and maybe caps to get DC 13:45:40 a controller switch between the battery and the generator to power the motor 13:47:36 or using a two battery setup, one battery get recharged by the generator while the other powers the motor 14:07:22 --- log: started forth/03.07.16 14:07:22 --- join: clog (~nef@bespin.org) joined #forth 14:07:22 --- topic: '#Forth site: http://forth.bespin.org || 'pure' linux forth coded in asm: http://isforth.clss.net || Also remember to check out Jeff Fox's articles, located at http://www.ultratechnology.com/dindex.htm' 14:07:22 --- topic: set by thin on [Sun Jun 08 10:42:15 2003] 14:07:22 --- names: list (clog mur tathi a7r CrowKilr @kc-errands Robert TreyB w1k1 Klaw flyfly ianni onetom skylan @ChanServ Fractal whee XeF4) 14:23:46 --- quit: a7r ("Client exiting") 15:21:11 --- log: started forth/03.07.16 15:21:11 --- join: clog (nef@bespin.org) joined #forth 15:21:11 --- topic: '#Forth site: http://forth.bespin.org || 'pure' linux forth coded in asm: http://isforth.clss.net || Also remember to check out Jeff Fox's articles, located at http://www.ultratechnology.com/dindex.htm' 15:21:11 --- topic: set by thin on [Sun Jun 08 10:42:15 2003] 15:21:11 --- names: list (clog Herkamire mur tathi CrowKilr @kc5tja Robert TreyB w1k1 Klaw flyfly ianni onetom skylan @ChanServ Fractal whee XeF4) 15:21:13 What's your point? 15:21:21 Heh, look who's here :) 15:21:25 You're making a mountain out of an anthill. 15:22:32 --- log: started forth/03.07.16 15:22:32 --- join: clog (~nef@bespin.org) joined #forth 15:22:33 --- topic: '#Forth site: http://forth.bespin.org || 'pure' linux forth coded in asm: http://isforth.clss.net || Also remember to check out Jeff Fox's articles, located at http://www.ultratechnology.com/dindex.htm' 15:22:33 --- topic: set by thin on [Sun Jun 08 10:42:15 2003] 15:22:33 --- names: list (clog Herkamire mur tathi CrowKilr @kc5tja Robert TreyB w1k1 Klaw flyfly XeF4 whee Fractal @ChanServ skylan onetom ianni) 15:22:34 But a memory allocator needs someplace to keep its records, so it explicitly designates, for itself, a chunk of RAM for its own use. 15:22:53 I see.. 15:22:57 Thanks for your advice. I think I have a pretty good idea of how to design this now. :) 15:23:26 You can do the same thing with blocks. Explicitly allocate, say, two blocks to hold the block allocation table, and you now have some place with which you can allocate other blocks with. :) 15:27:46 WOO! I have my first potential customer!! 15:28:02 Well, actually my THIRD potential customer, but this one looks like I can get some amount of work done for. 15:29:28 Hehe, congratulations. 15:30:11 Looks like a network cabling job, CAT-5 and CAT-3 cables. 15:36:22 sorry, I was away wiring a bifilar coil 15:36:43 hmmm i was looking for a cheap source of copper wire, now i got the idea ;p 15:36:57 lol there's NO coincidences 15:38:45 Heheh 15:38:51 CAT-5 has 8 conductors per cable. 15:38:56 CAT-3 has 4. 15:39:19 i could even get some from existing cable, since only 2 pairs are used 15:40:28 voltage per turn in bifilar coil: V/2, in linear coil, V/turns... wonder if less than 2 is possible 15:47:19 --- quit: CrowKilr (niven.freenode.net irc.freenode.net) 15:47:19 --- quit: w1k1 (niven.freenode.net irc.freenode.net) 15:47:20 --- quit: XeF4 (niven.freenode.net irc.freenode.net) 15:48:29 --- join: CrowKilr (CrowKilr@HSE-Windsor-ppp250456.sympatico.ca) joined #forth 15:48:29 --- join: w1k1 (~w1k1@pD9545BE5.dip.t-dialin.net) joined #forth 15:48:29 --- join: XeF4 (xef4@lowfidelity.org) joined #forth 15:48:32 re 15:50:13 I built a 6*2200uF capacitor bank, i can charge it with a 9v battery and discharge in a motor... sweet ;p 15:51:03 Just don't discharge it in yourself. 15:51:14 That's a lot of capacitance, and a lot of high current discharge. 15:54:57 now the next step is to get them charged with a magnetic induction generator 16:00:26 --- quit: mur ("MURR! save the http://rainforest.care2.com/ (click url there)") 16:09:41 --- join: a7r (~a7r@206.72.82.135) joined #forth 16:16:26 re a7r 16:18:37 hey kc5tja 16:18:38 sup? 16:21:05 The '7 seems to have some kind of vacuum leak, thus causing the misfires. 16:21:48 Also, the coolant leak has been isolated. The spout the hose connects do broke off, and somehow managed to NOT destroy everything else under the hood as it fell. 16:22:12 But the spout coming off the engine block and the hose that leads to the overflow reservior are *gone*. 16:22:24 So I have a new plastic coolant head on order -- hope to get it this Friday. 16:22:40 Then I need to get a hose that leads to the reservoir. 16:22:50 --- quit: Robert (Remote closed the connection) 16:22:54 --- join: Robert (~snofs@h126n2fls31o965.telia.com) joined #forth 16:24:51 a7r: Other than that, I have a potential services sales lead. I'll be meeting with him tomorrow at 1:30PM. 16:25:08 Looks like a wiring job for an office, with CAT-3/5 cables. 16:25:19 ah, elite. 16:28:02 We'll see. This guy sounds like a royal, stuck-up jackass to me. I spoke with him a bit on the phone, and he wasn't too pleasant at all to speak with. 16:28:09 But money is money. We'll see how it goes tomorrow. 16:34:00 --- nick: kc5tja -> kc-afk 16:56:20 --- log: started forth/03.07.16 16:56:20 --- join: clog (~nef@bespin.org) joined #forth 16:56:20 --- topic: '#Forth site: http://forth.bespin.org || 'pure' linux forth coded in asm: http://isforth.clss.net || Also remember to check out Jeff Fox's articles, located at http://www.ultratechnology.com/dindex.htm' 16:56:20 --- topic: set by thin on [Sun Jun 08 10:42:15 2003] 16:56:20 --- names: list (clog Robert a7r XeF4 w1k1 CrowKilr Herkamire tathi @kc-afk TreyB Klaw flyfly ianni onetom skylan whee Fractal @ChanServ) 17:01:22 --- quit: w1k1 ("!") 17:03:52 --- join: roi (~roi@pD9545BE5.dip.t-dialin.net) joined #forth 17:11:52 --- part: roi left #forth 17:16:12 --- join: RO| (~RO|@pD9545BE5.dip.t-dialin.net) joined #forth 17:17:49 --- part: RO| left #forth 17:19:27 --- join: RO| (~RO|@pD9545BE5.dip.t-dialin.net) joined #forth 17:22:04 --- part: RO| left #forth 17:22:25 --- join: RO| (~RO|@pD9545BE5.dip.t-dialin.net) joined #forth 17:26:03 --- nick: kc-afk -> kc5tja 17:26:07 Back, for now. 17:50:54 off to aikido. 17:50:56 --- nick: kc5tja -> kc-aikido 17:58:37 --- quit: a7r (Read error: 60 (Operation timed out)) 17:58:49 --- join: a7r (~a7r@206.72.82.135) joined #forth 18:10:16 --- join: fly_fly (~marekb@ip164.ktvprerov.cz) joined #forth 18:10:16 --- quit: flyfly (Read error: 54 (Connection reset by peer)) 18:20:15 --- quit: tathi ("leaving") 19:38:00 what Linux syscalls to I need to use to get stdin unbuffered (and not echoing would be nice) 19:41:13 you'll need to do some TTY shenanigans I think. 19:44:19 in C I did tcgetattr and tcsetattr 19:44:22 but those aren't syscalls. 20:16:34 damn, I love Forth 20:16:40 it's my own personal jesus. 20:38:44 me too it was, until my project stagniated ;p 20:39:09 I don't really like interfacing with linux, but I shure like my forth 20:39:15 CrowKilr: what project? 20:39:57 i described on now innaccessible forth.bespin.org 20:40:18 colored tokenized forth 20:40:51 like every definition is the whole text, every subsequent word appearance is saved in the block as an index 20:41:34 like i define a 4 bytes long word, drop, and then later i can use the number 1, associated with the correct color to compile a call or execute the word 20:42:03 my tokens are byte wide, using huffman based encoding for different ranges 20:42:28 example: definitions and comments are 16 bytes long, so they need 4 bits of range 20:42:58 i have 5 tokens type encoded in the following manner 20:43:38 XXXXXXX1 Compile a relative call to the XXXXXXXb word in the Index 20:44:03 XXXXXX10 Jump to XXXXXXb word in the Index 20:44:38 XXXXX100 Copy XXXXXb bytes from source to code 20:44:51 XXXX1000 Definition 20:44:57 XXXX0000 Comment 20:45:15 oh right, I saw that. 20:45:47 There's still some "ugliness" in it when I try to put things in practise 20:46:21 I was so proud of it... Now I need something revigorating to get me going 20:46:45 what are your impressions? any enhancements coming to mind? 20:46:57 questions? 20:47:10 * CrowKilr is desperate lol 20:47:26 I have to say, that I'm not hardcore enough to make any statements either way. 20:47:41 I think tokens are the right way to go though, and I'm enjoying colorization quite a bit. 20:47:46 .. if that says anything. 20:47:58 I went with a similar tokenization scheme. 20:48:12 yeah, it says we're on the same channel, not the clf one lol 20:48:55 Treyb: how? when? 20:49:25 bits 0..1 - token type 20:49:26 00 - numbers 20:49:26 01 - strings 20:49:26 10 - "color token" 20:49:27 11 - reserved 20:49:48 For numbers: 20:49:48 bit 3 - 0 = single, 1 = double 20:49:49 bit 4 - 0 = integer, 1 = float 20:49:49 bit 5 - 0 = in-line encoded, 1 = data follows 20:49:50 bits 6..31 - in-line data 20:49:50 for integers (bit 4 = 0), signed two's complement 20:49:51 for floats (should we use integers, fixed point, or a small float?) 20:49:53 In the common number case, we simply arith. right shift five bits to get our constant. 20:50:27 Except I think I need to renumber 3,4,5 to 2,3,4 20:50:38 I used to have bits 0..2 for the token type. 20:51:40 Just some notes, but I've taken hints from Aha and CF. 20:52:20 me too 20:53:06 * CrowKilr is cross-polinizing token encoding scheme to see what might come up 20:54:19 My "strings" point to a UTF-8 encoded string table that holds traditional word names, strings, and comments. 20:56:58 what I retained from aha is the Edit-time dictionary search concept, wich I think is great 20:57:28 I did too. 20:57:33 me too 20:57:51 I've looked quite a bit at Holon, too. 20:58:05 did either of you get to writing the editor? 20:58:18 then Treyb, do you use indexes? 20:58:40 herkamire: i was doing it, then it stumbled upon me that my system might be better 20:59:10 I haven't done any real coding yet. I' 20:59:18 I've spent most of my time researching. 20:59:38 I suppose I ought to get *something* going eventually. 20:59:51 research is good 20:59:58 I've never been much for research though. 21:00:03 CrowKilr: what do you mean by "indexes"? 21:00:12 I much prefer to talk to other people who have done research :) 21:00:23 We only need to get along with a token system and we could code all together =) 21:00:26 Herkamire: I didn't want to duplicate too many of the standard mistakes :-) 21:00:42 treyb: are your strings searched in the dictionary at compile time? before or after? 21:00:47 TreyB: :) 21:01:03 CrowKilr: I don't think I use indexes in at all the same way. 21:01:21 I have a dictionary and a bunch of blocks with source tokens in them. 21:02:18 the source tokens are 16 bits. the first 4 bits are the color (define,execute,number,etc). for words (define,execute,compile) the 12 bits are an index into the dictionary. 21:02:19 CrowKilr: for me, the source will exists as a series of CELL-sized integers with encoded meanings plus the string table. 21:03:26 16 bit tokens were tempting me since the beginning 21:03:53 Yeah, but todays CPUs handle 32bit quantities much more efficiently. 21:05:01 Note that I lean heavily towards the umbilical development approach of HolonForth and the notion that the development box will have lots of resources even if the target doesn't. 21:05:16 I tried to come up with something better than Chuck's colorforth for 32 bits and I couldn't 21:06:21 I like what I have better than CF, but I have very different requirements. I can't really compare them on an equal footing. 21:06:39 TreyB: what CPUs handle 32bit quantities more efficiently? 21:07:06 compare them on a raw token efficiency basis: 32 bits per token means a lot of leftover, never used range 21:07:12 Almost all of the current CPUs: PPC, x86, ARM, etc. 21:07:28 TreyB: for loads and stores? 21:08:09 yeah from memory 21:08:13 CrowKilr: sure, but I presuppose a beefy development box. Also look at my encoding for numbers. I use the non-token bits completely. 21:08:17 and then cachelines comes in etc 21:08:44 treyb: yeah, chuck does that too, its great and i should do it even in my 8 bit system 21:08:52 I'm going to have to run some tests 21:09:28 like they do in machine forth: using rets to get word alignment 21:10:08 call are in slot 0 etc etc 21:11:14 CrowKilr: Aha ties its encoding *very* closely to the machine architecture. I don't have the luxury of defining my own hardware, so I don't need that part of the Aha design. 21:11:31 my primitives (macro calls) are 1 byte long, so I can fetch 4 of em on 32 bit architecture, but its truly efficient only in hardware imh(uneducated)o 21:11:55 we agree, yay lol 21:12:03 lets design the best token encoding right now lol 21:12:30 ive been waiting an opportunity like this for a long time! 21:13:03 I don't think you'll find a "best" encoding unless you share comparable design goals. 21:13:13 herkamire knows about powerpc, so we could have a real good token system for x86/ppc 21:13:30 lowest possible amount of computing fat 21:13:44 my #1 design goal 21:14:48 im sure we can come up with something good 21:15:38 Have you looked at HolonForth at all? 21:15:58 never in depth 21:17:08 what features do you find the most interesting? 21:17:18 * CrowKilr is looking at the website right now 21:17:42 http://www.holonforth.com/holon/holon.htm 21:18:41 I like, but don't know if I'll keep, the notion of heirarchical program structure. 21:19:29 I *really like* and will keep the notion of always running in a cross-development environment. 21:19:51 i designed a TTYforth as my first forth, it used the parallel port to get data inside the target 21:20:42 i have an old x86 laptop here, the screen is broken, i got it for 10$CAN 21:22:52 what would be great is a cross-dev environement centered around network booting 21:23:09 all modern computers with network cards got it 21:27:11 Yep. I'll probably target Linux first, making my forth environment the debugger for a target process on the same machine. 21:27:48 I just made a test that ranks 2byte loads slightly faster (only about 15%) than 4byte loads. 21:28:01 We all agree on color's usefullness in representing code, on the need for a slim, elegant token encoding scheme and functionnal source editor 21:28:22 what's the goal. 21:28:28 --- nick: kc-aikido -> kc5tja 21:28:37 herkamire: cool, now we can start designing a 16bit token encoding scheme ;o) 21:28:37 Back 21:28:40 re 21:28:40 as treyB said, we aren't going to agree on how it should be if we don't agree on what it should be good for 21:29:01 I chose 16 bits for tokens because I figured it is all I need. 21:29:16 i chose 8 for the same reason ;p 21:29:25 and I don't think it would be that hard to switch to 32 bits if I have to or want to. 21:30:16 me neither, just remove an AND and its ok 21:30:18 Herkamire: I could get by with 16, but I think it will take less code to deal with 32bit chunks. 21:31:30 TreyB: Depends on CPU architecture. 21:31:47 For x86, 8, 16, and 32-bit token sizes can all be easily handled with the same amount of code. 21:32:41 The PowerPC, however, always assumes 32- or 64-bit operands. Only the load and store instructions support 8-, 16-, or 32-bits. So I believe, due to how its load/store architecture works, that it also can support smaller-sized tokens quite easily. 21:32:49 And, unlike x86, without a performance penalty. 21:33:14 * CrowKilr did just learn something 21:37:02 kc5tja: I'll stick with 32bits anyways. I like the notion of having token size == cell size, for now. 21:37:35 ok now how to handle definitions in 32 bit tokens 21:37:53 1- huffman encoding directly in token 21:38:03 2- bytes following tokens 21:38:21 or maybe huffman encoded string following token... 21:38:39 or maybe just indexes as definitions, using jeff's approach 21:39:04 my entire source blocks are 2byte source tokens. 21:39:08 of zeroing the Index and doing a check to see if its initialized or not 21:39:31 any data/strings etc that doesn't fit in 2bytes is not in the source blocks. this makes things much simpler 21:40:02 yeah i thought about this also, but didnt implemented it, great idea 21:40:39 TreyB: I'm not knocking the idea. I'm just saying there isn't a significant code size or *major* performance hit for using smaller token sizes. 21:40:53 with stuff that's to big to be cached, on consecutive memory loads, half-word (2byte) loads are 20% faster. 21:41:11 kc5tja: ok. 21:41:24 sorry, that's when I'm running on a small chuck of memory that would easily fit in the cache 21:42:11 thats what I thought also about byte tokens, they are so small, more data can fit in cache 21:42:34 with huffman encoded definitions, source could be compiled right away 21:42:46 Actually, less data fits in the cache, because you not only need to cache the data, but also the block containing the reference to the data. 21:42:47 treyb idea is great also: separate string table 21:43:05 crap. well, maybe the caches are bigger than I thought. 21:43:11 But the idea (I think) is you'll be working with references more often than the data, so it's still a net win. 21:44:40 CrowKilr: Huffman encoding of words in tokens is merely a means of hashing a word name to a unique 32-bit integer. This eliminates the need for a separate look-up atom table 21:44:44 A source file could be separated in a linked string list and tokens, so jeff's dictionary "IF compileORexecute; THEN define;" could be used 21:44:49 But Herkamire's method is equally viable. 21:46:24 the string list would not be used at all by the compiler 21:46:26 I don't like the idea of Huffman encoding the source on a per-word basis. It (I think) requires to much rigidity in what you consider a word break. 21:46:40 i think I lag terribly 21:47:08 sorry for any dumb statement 21:47:53 I think it makes sense on a per-word basis. But the real crux isn't where the word breaks are -- I see the major problem being that we're dealing with source code, not normal prose. The letter frequencies are not guaranteed to be the same as they would be for prose. Hence, the most often used characters may not be encoded in the most compact form possible. 21:48:06 CrowKilr: Nothing dumb so far. I'm enjoying this discussion immensely. 21:48:35 kk so that me thats thinking too many stuff at the same time ;p 21:49:07 kc5tja: hence my desire to avoid Huffman encoding. If I want a smaller source, I can just block-compress my pre-parsed source. 21:49:28 gzip and bzip do a much better job overall than Huffman. 21:49:51 TreyB: Well, even Chuck publicized that Huffman encoding words does not compress the source. 21:50:07 In fact, considering the sheer quantity of one or two letter word names in ColorForth, it actually expands the source size. 21:50:28 The reason for the encoding is it stores the complete name of the word (well, as many characters as will fit) into a single 32-bit integer. 21:50:47 This avoids completely having to define any string-manipulating words for the purposes of parsing source, etc. 21:51:11 This is one way in which ColorForth gets instantaneous compile speeds. 21:51:12 With a string table, all words, comments, and strings fit into a single 32bit token. 21:51:20 Regardless of length. 21:51:27 in fact it only fasten the editor, because compile can be instatneous without that feature 21:51:31 TreyB: Yes -- this is why I observed above that Herkamire's approach to tokens is equally valid. 21:51:41 * kc5tja also wants to point out that Chuck is not using Huffman encoding for his tokens. 21:51:49 He is using Shannon coding. 21:52:21 I am absolutely willing to bet a true Huffman encoding would result in fitting more characters into a word than his current scheme. 21:53:25 For the record: one of the reasons why I want to keep FS/Forth pure ASCII is so I can get letter frequencies for studying the effects of Huffman-encoded tokens. :) 21:53:45 Scan the string table :-) 21:54:06 That'd work too. 21:54:18 I don't have a string table, however. :) 21:54:56 Different goals, different solutions. 21:55:05 by string table you mean its before the actual tokens and each string is referenced by its position in code? 21:55:46 Ahh, now tokens that refer to prior string instances in source code -- that's called LZ77 compression. :D 21:55:48 If I understand you correctly, yes. 21:55:55 by string table you mean its before the actual tokens and each string is referenced by its position in "token space"? 21:56:25 I think we understand each other CrowKilr. e.g.: 21:56:28 1) dup 21:56:30 2) drop 21:56:39 kk thats great, i thought about it, but my editor would have to regenerate it everytime linearly from source 21:56:49 3) some long verbose comment 21:56:54 4) etc.. 21:57:25 CrowKilr: why would it have to do that? 21:57:31 yeah its all advantages 21:57:40 ok, I just ran a few different kinds of tests. 2byte loads are about 20% faster than 4byte loads on my PPC 21:57:52 because in my previous system i had only 1-16 bytes word, definitions and comments 21:58:20 Herkamire: Wow. That's surprising to me. 21:58:48 I could probably speed up my editor by loading 4 bytes at a time, so I only need a load every other source word, but this would introduce more complexity 21:58:57 Herkamire: loading the same amount of RAM or the same number of "tokens"? 21:59:10 kc5tja: that's with incremental loads, with the same number of loads for each test (not the same amount of memory) 21:59:21 Ah ha! 21:59:38 Ahh, yeah, so in reality, the 16-bit loads are slower. 21:59:51 slower for memory copies. 21:59:54 * kc5tja nods 21:59:55 faster for my interpreter 22:00:03 And not just a little bit, either. 22:00:19 50% of the RAM in 80% of the time. 22:00:53 The question becomes, can you encode the same source in less RAM on a consistent basis? 22:00:55 TreyB: Most of that time is spent fetching instructions, I suspect. 22:01:53 when I get to optomizing, it's going to be all about stack usage. 22:10:03 * kc5tja nods 22:10:03 return stack too. 22:10:03 on ppc you don't have to push the return stack 22:10:03 Well, remember that primitives don't need no stinking return stack. :D 22:10:03 in many cases you don't have too.. 22:10:03 oh and before all that, I'm going to make a much of things immediates (like dup) 22:10:03 Herkamire: That's how I'm doing it with FS/Forth. 22:10:03 dup is one instruction. currently I usually compile a branch for dup to a definition of 7 instructions. 22:10:03 I plan to build it into the editor to check if the definition needs a return stack, and change the source so it won't get one. 22:10:03 * kc5tja nods -- the editor is the most likely place for that functionality to truely make sense. 22:10:03 well, I'm suprised that the 2byte loads aren't much faster, but I'm so glad they aren't slower 22:10:03 I don't much like tricky size/speed decisions. 22:10:03 kc5tja: yeah. I'm being very good about not putting any extra junk in the interpreter. 22:10:03 No, it's only on x86 that they're slower, because (from some truely retarded reason I still have yet to figure out) the register subsystem on the chip is implicitly 32-bit only, and any sub-32-bit register access requires a read-modify-write cycle in the register bank. 22:10:03 I didnt' even put immediates in. 22:10:03 You really have to test those kinds of decisions in-situ or you can't get good profiling data. 22:10:03 I figure the editor can put them in the execute color if their supposed to be executed. 22:10:03 I've been meaning to try this idea out on you guys for a while. 22:10:03 I've been thinking for quite a while on how the editor should know which words are immediate. 22:10:03 Herkamire: You're not alone. I've often pondered the existance of MACRO in ColorForth, and why it is needed. 22:10:03 But it does have its place. 22:10:03 and I've always had a problem with the way various forths handle immediates. 22:10:03 tathi has made forth(s) that have two code pointers in the dictionary (one for MACRO/immediat one for runtime) 22:10:03 that's ok, but I don't like it that much. 22:10:03 I've just about made up my mind to do this: 22:10:03 my convention for words that compile something on the heap is to start the word with a comma. eg: ,rlwinm 22:10:03 One of the problems with supporting only one dictionary class is that a word is always executed the same way. +, for example, would be compiled as a subroutine call to some primitive routine, when it would be substantially smaller and faster to just inline the appropriate ADD instruction. 22:10:03 I made a word that compiles the instruction for a dup. it's: ,dup 22:10:03 Two code pointers?!?! 22:10:03 That's awfully wasteful. 22:10:11 I have one code pointer, and I just maintain two wordlists. 22:10:41 I also have defined dup which you can use at runtime, or compile a call to. 22:11:43 : dup ,dup ; 22:11:43 ;) 22:11:58 my idea is to have the editor handle immediates, by finding words in the compile color, then searching the dictionary for a word with the same name except with a comma first. and replacing that word with the comma one (but in execute color) 22:12:01 --- join: Serg_Penguin (Serg_Pengu@212.34.52.140) joined #forth 22:12:05 kc5tja: exactly: 22:12:10 hi 22:12:35 Oh, I see. So it does an in-place "text substitution" right as you hit the spacebar in the editor then? 22:12:53 so when the editor sees (b&w version): : bla dup ; it replaces it with : bla [ ,dup ] ; 22:13:03 kc5tja: exactly 22:13:03 morning serg 22:13:07 re Serg_Penguin 22:13:25 afk 22:13:31 Herkamire: OK, as long as it has editor support, that makes some sense then. Otherwise, it'd get rather inconvenient to constantly have to hit , all the time. :D 22:13:48 and when it prints the source on the screen it does the reverse. when it's about to print a word in execute color that starts with a comma, it looks for one without the comma, and if it's found it prints that in compile color. 22:14:11 Y'all have fun. I need to sleep. Thanks for the discussion. 22:14:18 OK 22:14:21 bye! 22:14:23 TreyB: Night :) 22:14:30 goodnight TreyB 22:14:31 * Serg_Penguin is buzzed, what's the colors ? 22:14:47 Serg_Penguin: Buzzed? Slightly inebriated are we? :) 22:15:12 Serg_Penguin: we're working with source "tokens" the color is the bits that say what should be done with that word (whether we should execute it or compile it, or if it's a number etc) 22:15:33 ok 22:15:41 but why subst on fly ? 22:15:50 Serg_Penguin: User convenience. 22:16:19 on the fly in the editor is ok, because the editor only has to display up to 512 source tokens at a time. 22:16:26 i doubt what [ ,dup ] is convenience ;(( 22:16:32 me too 22:16:46 it looks like assembler in Forth w/o vocabs 22:16:49 Serg_Penguin: Precisely why we're substituting on the fly 22:16:55 I'm saying that the editor replaces "dup" with "[ ,dup ]" for you automatically. and so that you can't see it. 22:17:11 unless [ switch to temp compile space and ] run the previously compield code, then your dup is always compile-time 22:17:23 you see and type "dup" and the interpreter sees an execute color ",dup" 22:17:31 ADD, XOR, OUT, ... 22:17:32 OK, folks, y'all just didn't get what Herkamire just said. 22:17:35 From the beginning: 22:17:41 Primitives are best implemented inlined. 22:18:04 the substitution is only made if the "dup" you type is compile color. if it is execute color then it is left alone. 22:18:05 However, Herkamire does not wish to support two vocabularies (one FORTH and one MACRO, for instance, to use Chuck Moore's terms) 22:18:46 So, there exists a convention: DUP is the name of a word that you'd call if you mentioned it, and ,DUP is the name of a word that is called at compile-time. 22:18:53 The relationship between DUP and ,DUP is this: 22:18:54 the only down side of this scheme, is that it's not possible to overring an immediate word with one that is not an immediate. 22:18:55 : DUP ,DUP ; 22:18:58 err 22:19:01 : DUP [ ,DUP ] ; 22:19:27 Since nobody wants to type stuff like this: 22:19:46 : myLoop ,begin ,2dup ,u>= ,while DoSomething ,advance ,repeat ,; 22:20:01 heh, i see better solution 22:20:10 The editor is smart enough to know about 2DUP versus ,2DUP, and will make the substitution for you. 22:20:33 kc5tja: it would have to be: : myLoop [ ,begin ,2dup ,u>= ,while ] DoSomething [ ,advance ,repeat ,; 22:20:33 So while the above is what the compiler sees, the USER sees this: : myloop begin 2dup u>= while DoSomething advance repeat ; 22:20:42 Herkamire: Yeah, I keep forgetting them. 22:20:54 trash it ! i can do it better 22:20:56 -------- 22:21:02 adding in all the color changing is worse than the commas. 22:21:22 first, we write wrapper word INLINE 22:21:22 the cool part is that you can (without any fuss) compile a call to the macro version 22:21:44 Serg_Penguin: Doesn't solve the problem already -- the compiler still needs to know that the wrapper is 'immediate' or not. 22:21:59 in my forth I have: 22:22:19 : INLINE CREATE ' ' DOES> STATE @ + @ EXECUTE ; 22:22:39 INLINE DUP ,DUP DUP 22:22:58 err, 22:23:00 : ,lit16 ,dup r-tos swap ,li [ ; 22:23:13 Serg_Penguin: That quite patently won't work in Herkamire's system. 22:23:46 it's very nice to be able to use the compile time and the run time version of words. 22:23:56 Serg_Penguin: Your system (a) Depends on a Forth architecture that is based at least on F83, if not ANSI Forth. We're not examining ANSI Forths. There is no STATE variable. (STATE in FS/Forth, for example, will give you an undefined word error). 22:24:13 I would still have to have these fun definitions to use the words at run time though: 22:24:21 Serg_Penguin: It also depends on forward source parsing, which his system is not capable (nor is it desired) of. 22:24:22 : dup [ ,dup ; 22:25:10 Serg_Penguin: And, moreover, INLINE needs to be made IMMEDIATE if it's to work at all. Otherwise, STATE is always set to interpret mode. >:) 22:25:28 ok, i said err, to write this 22:25:38 * kc5tja nods 22:25:47 CREATE IMMEDIATE is what I meant. I made an error too. :) 22:26:17 i just dunno how to make CREATE'd word immediate in my forth ;) never had a need 22:26:29 Do you support IMMEDIATE? 22:26:37 If so, CREATE IMMEDIATE is the phrase you'd use. 22:26:43 * kc5tja uses that all the time. 22:27:48 for me, speed is no concern 22:28:00 For us, it is. 22:28:05 if it will, i'll write inner-loop words in ASM 22:28:21 or write cross-compiler so all words will be inline ;) 22:28:46 if i dare ;)) 22:29:09 my immediate scheme: pros: fast and simple interpreter (doen't even know about immediates). same convienience of not having to switch colors, or know what's immediate. you can compile a call to the macro version with no trouble or extra syntax. You can simply and easily with on extra syntax define seperate execution time and compile time definitions. cons: you can't override an immediate with a non-immediate (you have to redefine both) 22:29:18 kinda like structured macro-asm, very forthish 22:29:35 Serg_Penguin: That's what immediate words are -- assembler macros. 22:30:52 * Serg_Penguin wonders why CPU's have one stack 22:31:15 i wish to code in ASM 'forth way' 22:31:32 Serg_Penguin: They have one stack because they need to support subroutine calls. 22:31:47 It's pretty much a necessity for smaller 8-bit and 16-bit processors. 22:31:57 32-bit CPUs have them mostly because of their 16-bit or 8-bit heritage. 22:32:09 PowerPCs and many other RISC chips don't even have any stack at all. 22:32:13 (not, at least, a hardware stack) 22:32:32 * Serg_Penguin needs at least 2, or many more 22:32:51 Then define your own in software. 22:32:54 That's what I do. :) 22:33:01 it's slower ! 22:34:02 Serg_Penguin: get a ppc then 22:34:19 Serg_Penguin: all stacks on ppc are the same speed because there is no built in one 22:34:34 whadda you think, what is minimal to have two stacks in ASM on x86 ? 22:34:47 will i use RET in this sheme ? 22:35:11 what if the string table contained the macro code? 22:35:54 Serg_Penguin: It's NOT slower. In fact, IT'S FASTER. Don't believe me? Look at my metrics on the #Forth forum website. You'll find explicit data stack management using ESI is 17% *faster* than using EBP swapped in to ESP. 22:36:38 The x86 architecture imposes an average 25 cycle penalty for the use of subroutines, and PUSH/POP instructions are much slower than simple MOVs. 22:37:25 i'm lame asm coder, so i wanna a tutor like 3'Coding in ASM Forth way' 22:37:49 kc5tja: asm primitives for call/ret instead of hardware push/pop? 22:37:58 CrowKilr: Yes. 22:39:03 so, 22:39:14 MOV AX, [EBX] 22:39:19 INC EBX 22:39:32 is faster than PUSH AX 22:39:32 ? 22:39:54 kc5tja: pse gimme link to your article 22:41:18 Serg_Penguin: The code would be this: 22:41:23 MOV EAX,[EBX] 22:41:32 ADD EBX,4 or LEA EBX,[EBX+4] 22:41:38 Yes, it's about 17% faster. 22:42:07 386+ 22:42:12 lea takes byte offsets with esi/edi 22:42:23 or P5+ ? 22:42:26 others regs are dwords iirc 22:42:37 CrowKilr: Takes byte offsets always, as with all x86 addressing modes 22:42:44 k 22:42:49 Serg_Penguin: 80486 and later. It's a wash on 80386, and slower on 286 and earlier. 22:43:16 CrowKilr: You're getting tripped up by Chuck's use of scaled addressing modes: [EBX*4] 22:43:30 so it works on 286, even slower ? 22:44:04 Serg_Penguin: Well, no, because 286 and earlier lacks 32-bit registers. But to work in 16-bit mode, it's the same idea: 22:44:07 MOV AX,[BX] 22:44:14 ADD BX,4 or LEA BX,[BX+4] 22:44:32 25 cycle on subroutine calls!?!?! christ. no wonder you guys are so into inlining. 22:44:40 But for 80286 and earlier, I would use string instructions -- they're faster on the true 16-bit processors. 22:44:52 Herkamire: Yea. :( It's *pathetic*. 22:45:08 cludge begets more cludge 22:45:17 I want fast subroutine calls 22:45:31 Herkamire: Did you know that a 4MHz 6502 out-performed a 5MHz 8086 (true 16-bit processor with true 16-bit data bus) by 30% in the Sieve benchmark because of its horrid subroutine overheads? 22:45:53 Not only did the 8-bit CPU out perform the 16-bit CPU, it did it with a slower clock!! 22:46:04 lol 22:46:38 I am so embarrased to use a PC it's not funny. 22:47:06 I knew from the get-go, so early on, since I used the PCjr (yes, I used one -- no, you don't want to!!), that the world was doomed if the PCs took over. 22:47:43 Beta was better than VHS our technological world is a mess 22:47:55 Serg_Penguin: http://forum.forth.bespin.org/viewtopic.php?t=8 22:48:07 * kc5tja nods 22:48:38 --- quit: Serg_Penguin (orwell.freenode.net irc.freenode.net) 22:48:38 --- quit: Herkamire (orwell.freenode.net irc.freenode.net) 22:48:38 --- quit: TreyB (orwell.freenode.net irc.freenode.net) 22:48:38 --- quit: Klaw (orwell.freenode.net irc.freenode.net) 22:48:39 --- quit: onetom (orwell.freenode.net irc.freenode.net) 22:48:39 --- quit: ianni (orwell.freenode.net irc.freenode.net) 22:48:39 --- quit: skylan (orwell.freenode.net irc.freenode.net) 22:48:53 The 6502/65816 architectures are incredibly capable processors. Despite the 8-bit data bus, the 16-bit 65816 was only about 15% slower than a comparably clocked 68000, and has substantially faster interrupt response to boot. 22:49:09 * kc5tja advocates renaming Freenode.net to netsplit.net 22:49:19 * CrowKilr agree 22:49:27 * kc5tja is kind of getting sick of these rehubs... 22:51:11 Of course, stack processors are faster still, by about 200%. But, alas, stack processors aren't in common usage, and are generally *much* more expensive compared to the 65816. 22:51:23 * CrowKilr has found that he cant make a good enough string table token implementation for his taste, that litterals are almost always a problem and that his system isnt left in the dust at all 22:52:05 * CrowKilr would love to build a homemade stack processor in digitalcpld or in another weird high speed hardware 22:52:37 Yes, I would too. 22:56:27 It doesn't even need to be all that high speed either. 22:56:28 Nor a CPLD -- I'd be perfectly happy with, and even prefer, discrete component TTL. 22:56:28 there's better components than TTL class in our modern world isn't it? 22:56:28 --- join: Serg_Penguin (Serg_Pengu@212.34.52.140) joined #forth 22:56:28 maybe fet ttl, i dunno, something less powerhungry 22:56:28 re 22:56:28 re 22:56:28 damn split ! 22:56:28 Two responses: first, most modern TTL is implemented in CMOS, and two, the only better logic family is ECL, which is wholesale inadequate for homebrewing (way too power hungry, requires VERY expensive logic chips, etc) 22:56:28 Serg_Penguin: Did you get my URL? 22:56:28 no! 22:56:28 OK, here it is again. 22:56:28 Serg_Penguin: http://forum.forth.bespin.org/viewtopic.php?t=8 22:57:27 Proxy Error 22:57:28 The proxy server received an invalid response from an upstream server.The proxy server could not handle the request GET /Members/kc5tja. 22:57:28 Reason: Could not connect to remote machine: Connection refused 22:57:31 ;((( 22:58:12 i have _NO_ proxy ! 22:58:13 --- join: skylan (sjh@vickesh01-4814.tbaytel.net) joined #forth 22:58:13 --- join: onetom (~root@cab.bio.u-szeged.hu) joined #forth 22:58:13 --- join: ianni (ian@inpuj.net) joined #forth 22:58:19 its worth 2 c 22:58:33 --- join: Klaw (~anonymous@ip68-4-157-105.oc.oc.cox.net) joined #forth 22:58:36 nah... again 22:58:52 anyway im out for the night, bye everyone! 22:58:53 onetom: wb -- what are you referring to? 22:59:00 Does the site work for other people? 22:59:03 It works for me. 22:59:06 not for me 22:59:16 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 22:59:23 CrowKilr: What error do you get? 23:00:09 Tried it again, and it still works. 23:00:09 all: 23:00:09 http://cab.bio.u-szeged.hu/ced usage: tar zxvf ced-... ; cd ced ; ./ced PGDN 1st. the 1st block is too long; q - quit 23:00:13 its my upcoming colored editor for flux 23:00:15 written in gforth 23:00:19 plz have a look at it 23:00:20 tho, the up key and character input features are missing, its worth 2 c 23:00:31 onetom: Can you please check if the following URL works: http://forum.forth.bespin.org/viewtopic.php?t=8 23:00:40 forth.bespin.org, i get the proxy erroe 23:00:43 It seems like folks in Europe cannot access the site, but people in USA can. 23:00:44 error* 23:00:52 im in Quebec 23:00:58 nearby Ottawa 23:01:15 kc5tja: it works 4 me 23:01:31 -lilo- [Global Notice] Hi all. We're experiencing some problems with buffering that should be resolved by 1.0.32, and some difficulties with our remaining EU hub (I'll make a call for new EU hub sponsors later in the day to catch EU users with it). Apologies for the inconvenience. Any further comments now will be on wallops. 23:01:33 ;p 23:01:46 CrowKilr: HAH! See, I TOLD you it wasn't the site's fault. :D 23:02:11 --- join: Herkamire (~jason@h0030657bb518.ne.client2.attbi.com) joined #forth 23:02:24 ;pp 23:02:40 Anyway, let me post the important content: 23:02:43 kc5tja: it wasnt your fault, it wasnt my fault, it was the assfault 23:02:56 Athlon XP 1.7GHz: 23:03:01 Raw Assembly: 4362999 us 23:03:01 Register Allocated: 6300999 us 23:03:01 Baseline (GCC): 3794999 us 23:03:01 Native Code (EBP): 7597999 us 23:03:01 Native Code (ESI): 6577999 us 23:03:02 Subroutine Threaded (EBP): 81553999 us 23:03:04 Subroutine Threaded (ESI): 68567999 us 23:03:23 Athlon 800MHz: (my box to be specific) 23:03:25 Raw Assembly: 9369999 us 23:03:26 Register Allocated: 16369999 us 23:03:26 Baseline (GCC): 7929999 us 23:03:26 Native Code (EBP): 21439999 us 23:03:26 Native Code (ESI): 17689999 us 23:03:26 Subroutine Threaded (EBP): 165409999 us 23:03:28 Subroutine Threaded (ESI): 146249999 us 23:05:09 --- quit: CrowKilr ("Most delightful talk tonight.... Conclusion: In our quest for efficient forth, we only refine what it should have been from t) 23:05:18 Notice that native code using ESI as the data stack pointer is about 17% faster than using EBP to hold the data stack pointer, with pinhole optimized exchanges to ESP for PUSH/POP use. 23:13:49 --- quit: onetom (orwell.freenode.net irc.freenode.net) 23:13:49 --- quit: ianni (orwell.freenode.net irc.freenode.net) 23:13:49 --- quit: skylan (orwell.freenode.net irc.freenode.net) 23:15:11 --- quit: TreyB (orwell.freenode.net irc.freenode.net) 23:15:11 --- quit: Klaw (orwell.freenode.net irc.freenode.net) 23:15:15 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 23:15:15 --- join: Klaw (~anonymous@ip68-4-157-105.oc.oc.cox.net) joined #forth 23:17:14 kc5tja: can you gimme asm tutors\books YOU learned by ? 23:17:16 --- join: skylan (sjh@vickesh01-4814.tbaytel.net) joined #forth 23:17:16 --- join: onetom (~root@cab.bio.u-szeged.hu) joined #forth 23:17:16 --- join: ianni (ian@inpuj.net) joined #forth 23:17:23 --- quit: onetom (orwell.freenode.net irc.freenode.net) 23:17:23 --- quit: ianni (orwell.freenode.net irc.freenode.net) 23:17:23 --- quit: skylan (orwell.freenode.net irc.freenode.net) 23:17:38 --- join: skylan (sjh@vickesh01-4814.tbaytel.net) joined #forth 23:17:38 --- join: onetom (~root@cab.bio.u-szeged.hu) joined #forth 23:17:38 --- join: ianni (ian@inpuj.net) joined #forth 23:17:43 i.e., books proven by practice ;)) 23:18:43 Serg_Penguin: I got most of my knowledge by reading Michael Abrash's book, "The Art of Assembly Language Programming," from Intel's programmer reference documentation (available on Intel's website), and from practice. 23:19:17 ok 23:20:11 Abrash's book is really ideal if you want to learn how to optimize code. 23:21:07 will search in bookstore 23:21:33 --- quit: onetom (orwell.freenode.net irc.freenode.net) 23:21:34 --- quit: ianni (orwell.freenode.net irc.freenode.net) 23:21:34 --- quit: skylan (orwell.freenode.net irc.freenode.net) 23:21:34 --- quit: Klaw (orwell.freenode.net irc.freenode.net) 23:21:34 --- quit: TreyB (orwell.freenode.net irc.freenode.net) 23:21:46 --- join: ianni (ian@inpuj.net) joined #forth 23:21:46 --- join: onetom (~root@cab.bio.u-szeged.hu) joined #forth 23:21:46 --- join: skylan (sjh@vickesh01-4814.tbaytel.net) joined #forth 23:21:46 --- join: Klaw (~anonymous@ip68-4-157-105.oc.oc.cox.net) joined #forth 23:21:46 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 23:31:18 tell me please how to take out the joins and quits ? 23:31:29 i'm really sick of them today ! 23:32:20 * Serg_Penguin uses MIRC 23:34:39 I haven't used MIRC in years; I wouldn't know. 23:36:55 BitchX-1.0c18+ by panasync - OpenBSD 3.2 23:37:37 X-Chat 23:47:09 irssi rules! 23:47:25 I tried irssi, and i just did not like it at all. 23:47:47 It felt like a BitchX wanna be that was incomplete. Really shoddy and clumsy. Just my perception of it. 23:48:59 huh :) 23:49:27 it took me a while to find/find-out-about a couple features, bot other than that it's been wonderful 23:49:28 not a totally baseless perception.. I suppose its popularity comes from being the first to support ANSI colours without scripting =) 23:50:11 BitchX supported colors w/out scripting too. 23:50:19 kc5: I was referring to BitchX 23:50:24 Ahh, yeah. 23:50:30 It was a script-kiddie's IRC client. :D 23:59:59 --- log: ended forth/03.07.16