00:00:00 --- log: started forth/06.07.09 02:20:08 CREATE sockaddr-buf sockaddr_in %size dup VARIABLE #sockaddr-buf #sockaddr-buf ! ALLOT 02:20:25 : >sockaddr ( 'addr' port -- ) sockaddr-buf #sockaddr-buf @ erase 02:20:40 ( spot the bug! ) 02:40:40 : mud-wait ( fd -- ) POLLIN POLLOUT or [ pollfds cell+ 2 cells + ]L poll! mud-wait-t activate begin pollfds -1 poll drop pause again ; 03:27:09 --- join: Bushmills (n=l@212.2.176.249) joined #forth 03:41:15 yow, added logic to a task, to only much later discover that only one branch had a PAUSE 04:07:17 (but the ultimate problem is that POLL can't interoperate well with traditional Forth multitasking strategies. I need a big switch to toggle the POLL thread and implicit PAUSE on I/O) 05:15:52 --- join: PoppaVic (n=pete@0-1pool75-246.nas24.chicago4.il.us.da.qwest.net) joined #forth 06:10:32 --- join: llama32 (n=zak@072.a.001.beg.iprimus.net.au) joined #forth 06:12:33 anyone know of any papers about forth to machine code optimization techniques? e.g. on x86, is it better [faster and/or smaller] to use the native stack for return values, or data? 06:23:03 --- join: neceve (n=claudiu@unaffiliated/neceve) joined #forth 06:24:17 --- join: ttuttle (n=tom@unaffiliated/ttuttle) joined #forth 06:24:22 Quartus: hey 06:25:24 are there other optimizations for forths than to put stack items into registers? 06:25:42 Sure. You can inline words. 06:26:37 wasn't that a part of direct threading? 06:26:59 virl: Actually, I think it only works with subroutine threading. 06:27:02 I mean a feature 06:27:45 I dunno. 06:28:21 I think both indirect and direct threading use an interpreter, so they can't mix Forth calls and asm code in the body of a word. 06:28:38 the problem with inlining or generally putting code into words are probably the jmp restrictions of some cpus 06:29:17 there is "strength reduction", which will evaluate at compile time what doesn't need to be calculated at run time. 06:29:24 what do you mean with 'using an interpreter' 06:29:52 say, 5 constant five : foo five 3 + . ; would compile to (8) (.) 06:30:04 virl: They both have a word, NEXT, that steps along a list of addresses and executes each one. 06:30:33 virl: Those addresses point to either machine code or another word definition, depending on the type of threading. 06:30:41 iirc, when a word gets executed the first part of the words gets executed which defines what actually the word is, it's normally a piece of code which jumps to the rest of the word 06:31:11 and there is peepholing, which can look at the previous compiled opcodes/instructions, whether they may be unnecessary, with what might be compiled next. 06:31:13 ttuttle, ok, you mean the inner interpreter also called NEXT 06:32:00 and caching top(s) of stack in register(s) makes some great savings 06:32:46 but, if you want to optimize for speed, then you probably want to drop compilation to threaded code alltogether. 06:33:06 and generate native code instead 06:33:34 Likely to lose one of the advantages to forths, though: size 06:33:47 why is it that control structures are implemented so rigidly, as opposed to having a word that defines an anonymous word, whose address is put on the stack [a callback or function pointer]... having something like "condition :: this is what happens if condition is true ; IF"? this seems like it would be much easier to implement 06:33:59 everything is a space/time tradeoff, though 06:34:02 PoppaVic: Yes, I would guess indirect and direct threading generate smaller code than subroutine threading/native code. 06:34:34 llama32: Implement the anonymous word thingy. You'll see why. That's just as hard. 06:34:40 llama32: retroforth has conditionals like that 06:34:43 size of native code depends a bit on the cpu 06:35:23 no, Bushmills - I meant losing the secondaries in favor of direct-code 06:35:45 tturtle: but it could also have other uses, for normal callbacks [though in that case it would often be best to just define a real word and send a definition of it] 06:36:01 PoppaVic: i meant tuttle 06:36:12 ahh 06:36:17 Bushmills: Oh, I know. 06:37:11 byte token forth code may be more compact than ITC/DTC 06:38:48 Well, the byte-coded stuff - mixed with asm - might be as compact as you can get, but you are back to adding time for reinterpreting. 06:39:09 virl, what you wanna optimize for? 06:40:06 PoppaVic: mixed nibble token + byte token + word token possibly more compact? 06:40:32 by penalty of still more run time overhead 06:40:49 Bushmills: no idea, really.. Tathi's Fovium-stuff byte-codes, and I recall playing with both direct and indirect-threaded. 06:42:11 Bushmills, well, for speed 06:42:12 I sometimes think that a major issue seems to be in thinking of the interpreter and not a recompiler (translator) exporting-word/wordlist. 06:44:15 viri, often, lowering complexity will have speed benefits. and also, power drain benefits. 06:44:32 And, for the latter... It seems likely that most forths do not waste time or space generating all the potentially-useless data required for considering generating a binary .o or executables like .exe or plugins, etc. 06:45:04 therefore, a good optimizer may be an automatized decomplexifier 06:45:23 if human programmer doesn't take up that task 06:45:27 Hell, I've never even seen a good libobject or liblib or whatever. 06:45:50 Bushmills: you'd still want it to filter though, right? 06:46:09 no good idea how to describe, or even implement. consider: 06:46:21 take initial condition, and desired output, 06:46:51 yep 06:46:53 replace whole code in between against the minimal action, required to transform initial conditions to desired outout 06:46:55 put 06:47:00 right 06:47:06 thus, original program is basically only a model 06:47:24 to give information to compiler how to convert 06:47:27 or - some form of stepwise-refinement/optimizing all in between begin{}end 06:47:47 and have compiler search for a minimum effort way to reach same goal 06:48:10 stepwise refinement is, from compiler view, like top down 06:48:20 in other words, letting the "tool" figure out what code it can reuse and reuse or decompose more as often as possible. 06:48:30 why reuse? for speed? 06:48:34 for size, yes 06:48:57 but reuse may be counterproductive when optimizing for speed 06:48:57 well, that optimizes for size - I suppose a weighting-system could juggle time and space 06:49:04 hmm. 06:49:16 better a switch between size and speed 06:49:27 all the rest are cheap compromises 06:49:35 as default, sure - otherwise, yer back to weighting 06:49:43 either go for all, or for nothing at all :) 06:50:07 why optimize if you can't make up your mind what you're optimizing for? 06:50:19 now.. if you had a collection of sourcefiles, you MIGHT -size some and -speed others 06:50:23 and instead, optimize for a bit of everything ... 06:50:54 I frankly never use -On with my code, except to test to see if something blows up 06:51:16 i like optimizing for coding time 06:51:40 and find optimizing for power consumption useful 06:51:57 Bushmills: well, I don't get paid anyway - It's more a dedicated-hobby ;-) And, I spent too much time on 64K cp/m ;-) 06:52:19 Bushmills: how in the world do you "optimize for power"? 06:52:21 oh. a pipper. 06:52:33 --- join: I440r (n=mark4@24-177-235-246.dhcp.gnvl.sc.charter.com) joined #forth 06:52:39 hmm? 06:53:08 thinking of pip cmd 06:53:27 I don't recognize it. 06:54:09 peripheral interchange program. the generic cp/mv and i/o program on cp/m 06:54:27 I last used cp/m in the mid-80's - but, I was pre-DOS and then upgraded past a lot of early DOS. 06:54:34 ahh 06:55:38 anyway, I always liked tinkering with fig-forth, F83 and F-PC.. None of those experiences port well into a unix-environment, unfortunately. 06:56:08 u shud like isforth then 06:56:23 because isforth is somewhat modeled after fpc 06:56:38 tho the debugger in fpc was a bit crappy 06:57:31 and when i used it i removed all the bloat and inste4ad of a 150k executable i had a 30k executable 06:57:39 tz has featureitis 06:58:34 well, I live in joe & C - so, asm and my ppc/macosx sorta' bug me. 06:59:45 I440r: I think the fpc thing was more a semi turbo-C thingie than a debugger: you could edit and watch and at least step around. 07:01:51 yea and when the height of the definition was larger than the display it screwed up the display heeh 07:01:58 yep 07:02:19 isforths debugger doesnt do that - tho its not perfect either 07:02:21 It also tried to enforce the usual "block" of 64x16 07:02:46 i didnt like the way it formatted the code eiher 07:02:49 if xxxxxxx 07:02:50 then 07:02:58 I'll say this for "blocks" and forth: you CAN learn to write short, sweet, reusable code. 07:03:15 you can learn to do that without blocks 07:03:29 I440r: I'm more a vertical-alignment freak 07:03:34 blocks also teach you to cram all your code into one unreadable, uncommented blob 07:03:46 me 2 07:03:47 I440r: sure you can, but early on: blocks were all we HAD 07:04:01 yup 07:04:09 I440r: I use blocks, but I don't pack them out like that 07:04:11 f-83 etc 07:04:38 crc then you limit what the reader can see in one glance 07:04:47 so does a file :) 07:04:52 blocks are good for one thing only. a database 07:05:01 I prefer to use ascii-files anymore, but I STILL prefer to see a complete struct/func on a "termwin" - or see two, so I can compare and expand. 07:05:23 I440r: not even that, but it was convenient in a cheap way for many years 07:05:29 crc of corse. but theres a huge difference between 36 lines of context and 16 lines of context 07:05:39 true 07:06:04 PoppaVic, only if one block translates to one disk sector on a system with NO os are block source files good 07:06:11 I have done a 'view' code to show surrounding blocks as well, which helps with that though 07:06:18 I440r: I even had/have issues about code-line-length ;-) 07:06:37 * crc does note that his blocks are one sector (8x64) in size 07:06:48 ya. me 2. because a short line limits your ability to correctly comment your code 07:06:56 code comment 07:06:56 code comment 07:06:57 code comment 07:07:07 anything else is inferior in a big way 07:07:10 specially 07:07:10 code 07:07:11 comment 07:07:12 code 07:07:13 comment 07:07:16 or code 07:07:18 code 07:07:19 code 07:07:25 thats the worst one of all 07:07:34 I440r: yes. Primitive forths had a really GOOD habit (for the time), but folks keep trying to carry the tradition up into the 22nd century over *nix. 07:07:35 --- quit: llama32 (Read error: 110 (Connection timed out)) 07:07:45 and its the way 99.99999999999999999999999% of modern coders comment their code 07:07:46 I440r: I tend to agree 07:08:16 you would like my parody of the linux kernel coding style hehe 07:08:20 let me see if i can find it 07:08:36 if I want a block-comment between SECTIONS - as a prelude or a note/addendum, fine. Otherwise: keep 'em short, sweet and contextual-inline 07:11:30 I440r: I sorta' have learned to dislike the paren-comments for this reason. 07:11:47 the ( comment is for STACK comments only 07:11:50 \ is a line comment 07:11:57 yup 07:12:00 i also do not support multi line comments 07:12:02 comment: 07:12:07 and friends 07:12:22 nor do i support conditional compilation 07:12:32 I don't mind a block - but it's got to be sensible - even the C /* ... */ gets silly 07:12:54 I440r: CC? you mean preprocessing? 07:13:02 no 07:13:11 forths support conditional compilation too 07:13:13 #if 07:13:15 etc 07:13:17 oh - you mean statewise stuff 07:13:21 nit i wont support it 07:13:23 ohhhh 07:13:43 Not a prob. It's just another wordlist/voc and perhaps a state 07:13:48 and unlike tz i dont creat 40 aliases for every word lol 07:14:02 I'm trying to recall 'tz' 07:14:05 hmm. was thinking of having a look at isforth, related to comment "unix/linux" but i think now i better skip it. 07:14:08 tom zimmer 07:14:13 author of f-pc 07:14:16 ahhhh 07:14:21 I recall it now, thanks 07:14:27 i learned forth using f-pc 07:14:41 mostly by almost totally rewriting it lol 07:14:55 Yeah, F-PC was absolutely, totally optimized for a PC and DOS 07:15:04 no it wasnt optimized at all 07:15:15 about 50% of the primatvies were badly coded 07:15:18 I meant compared to FIG 07:15:22 ok 07:15:48 educationally, FIG-forth and cp/m - on a z80 - was a lot more... "educational" 07:16:27 also, those early years I was a FIG member - they now cost too much for too little 07:17:13 i still have a kaypro 2 07:18:58 heh.. I sold my sis the 4-64 decades ago, man that was a nicely made bitch ;-) 07:19:40 my father ran salt city rbbs-pc on hs kaypro 07:19:48 I always wanted to upgrade the monitor and sbc 07:20:11 the casing and keyboard was just - man, it was just primo 07:21:19 I dunno' how kaypro is doing anymore, but they could KILL with a better, extensible lunchbox - the powerbook is nice, but it's not upgradeable. 07:21:34 (other than the wifi module I lack) 08:20:47 --- quit: ttuttle ("leaving") 08:51:05 --- join: Cheery (n=Henri@a81-197-20-242.elisa-laajakaista.fi) joined #forth 08:58:19 --- quit: crc (Remote closed the connection) 08:59:16 --- join: crc (n=crc@pool-70-110-215-240.phil.east.verizon.net) joined #forth 09:02:04 --- mode: ChanServ set +o crc 09:09:50 --- quit: PoppaVic ("Pulls the pin...") 09:13:07 --- join: PoppaVic (n=pete@0-1pool73-175.nas24.chicago4.il.us.da.qwest.net) joined #forth 09:22:34 Quartus, are you there ? 09:23:34 Good morning I440r. 09:24:17 hi 09:24:30 i got a naming problem lol 09:24:35 cant decide what to name something 09:24:35 do you? 09:24:38 ah 09:24:48 do you have isforth ? 09:24:51 Molly if it's a girl ... :) 09:25:08 I have access to crc's isforth on his machine. 09:25:09 lol 09:25:31 I'd use a thesaurus and remember noun/verb/adjective 09:25:33 ok well in src/ext/error.f i got a sort of signaling mechanism but i dont like the names i chose 09:25:38 ..then conventions 09:26:04 actually the code in there is broken but its an easy fix - the problem is i need some decent names for the words in there 09:26:22 what they do is they set up a sort of signaling machanism - like a non fatal catch/throw 09:26:47 yeppers... Decent names/symbols are almost as tough as docs 09:26:50 sounds cool. 09:27:01 hi PoppaVic 09:27:15 yea you can have a "throw" go to multiple destinations too 09:27:32 you set up multiple catchers for a given throw 09:27:34 for instance 09:27:50 sounds like you can set up gracefull crashing. 09:28:03 hi, Raystm2 09:28:12 i can have a winch signal handler throw an error and my default console can resize the display 09:28:12 or programable modification based on error. 09:28:27 then when im in the debugger i can set up a catcher to resize THAT display too 09:28:39 and i dont have to keep juggling who processes the winch signal itself 09:28:40 cool. 09:28:48 i can just arbitrate who needs to deal with one 09:28:55 ya. 09:29:02 when the base-system is not based on other than request/return, the idea of "throw" and such is kinda' amusing. 09:29:06 its not meant as a catch/throw mechanism but it can be treated as such 09:29:19 because you can abort inside one of the catchers 09:29:29 understood. 09:29:32 and i definatly do not want to use the names catch/throw 09:29:33 very neat. 09:29:48 right now i have... 09:30:28 n1 error: word-name lotsa forth code here ; 09:30:45 when error n1 is "thrown" the word word-name is executed 09:30:47 i also have 09:30:55 n1 +error: ..... ; 09:31:12 which can be the same error number - it adds a new word to a given error number 09:31:19 or message number or something 09:31:39 i dont know what to call the mechanism 09:31:44 I just have huge, monsterous issues with "exceptions" 09:31:59 yea except this isnt restricted to exceptions 09:32:08 hmm, this will take some creativity, to capture the nuance. 09:32:37 its more like a semaphore mechanism 09:33:20 took me a while to remember the name "semaphore" there lol 09:35:16 * Raystm2 was a signalman for a time in the NAVY. I can still do semaphore. 09:35:53 lol 09:36:21 do they still use them ? 09:36:35 i know they use flags to pass messages etc 09:36:44 Absolutely, for close in signals during the day. Flags and Flashing Light as well. 09:37:21 :) 09:38:20 so any ideas on what to call this stuff ? 09:41:31 Well, an error in flags semaphore would be "AAA" or in morse code *-*-*- , if that is any help :) 09:41:33 --- quit: docl (Remote closed the connection) 09:46:31 Oscar is the "man overboard" flag. :) 09:46:58 it is the 'O' flag ( orange in color) and you fly it alone. 09:48:11 The 'I' flag is called India and is used when another ship comes along side. Prob'ly from the fact that 'i' in morse is two dots together **. 09:48:15 oh oh.... 09:48:18 umm.... 09:48:37 tip of tongue here... 09:49:10 Quarentine. 09:49:28 the Q flag. 09:50:26 when you run your signals words, you could be quarentining code and isolateing fixes. You could use medical words to alude to the fix mechanisms. 09:59:46 --- quit: Cheery ("Leaving") 09:59:50 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 10:15:30 Hey. 10:15:42 Hey. 10:16:50 How's that ship comming? 10:17:05 One day at a time. :) Going well, though. How are things with you? 10:22:36 --- join: ttuttle (n=tom@unaffiliated/ttuttle) joined #forth 10:22:41 Quartus: You around? 10:23:06 Just on my way out. What's up? 10:23:29 Quartus: Oh, sorry. I'm working on my metacompiler, trying to program a few words to see if it's working/well-written. 10:23:38 Maybe we can touch base later today. 10:23:44 Ok. 10:24:32 Quartus: Oh, um, how do you deal with words like + : ; that have assembler-unfriendly characters? 10:24:56 Quartus: Or words that are the same as opcodes? 10:25:18 Quartus: i'm doing well. About to transform Base18ChessBoard into RetroChessBase18. 10:36:26 * ttuttle just realized how AWESOME it is to use m4 as a metacompiler, and divert all the dictionary headers so they show up at the end instead of mingled with the words. 10:36:48 hehehe - the headaches will follow 10:38:10 PoppaVic: It's a learning experience :-b 10:38:25 ugh 10:38:29 * tathi doesn't like m4 10:38:33 tathi: What would you use? 10:38:49 tathi: heheheha - yer hours late and I still agree 10:39:12 ttuttle: I'm not clear what you're using it for 10:39:22 to process your asm code into the correct order or something? 10:39:50 tathi: I'm using it to do things like create dictionary entries so I don't have to manually type in the entire dictionary structure for the words that my Forth will come with. 10:40:20 tathi: so I do header("add") and it labels the current location, and saves a dictionary entry. Then when it's done, it dumps all the dictionary entries in a row. 10:40:24 right 10:40:35 whatever works for you 10:40:43 I just seem to run into trouble whenever I try and use m4 10:40:43 tathi: It was Quartus' idea :-\ 10:40:52 tathi: It can be a bit of a PITA, especially about quoting. 10:41:01 yeah, exactly 10:41:12 brb 10:42:12 m4 does have the advantage of being available most everywhere 10:42:51 yeah, and being ugly as sin 10:42:52 but I've never managed to wrap my head around m4, so I've used other things 10:43:36 like awk and perl 10:43:42 currently I'm using a ruby script 10:43:56 tathi: come on now, that "wrap my head around" think is *MY* space! ;-) 10:44:39 I know. I'm usually good at learning new languages. 10:45:13 Actually, as long as I can PO both ##C and #forth w/o much work, I don't get too upset ;-) 10:46:15 Seems like everyone has a preference and tendency - and, (unless you were raised with multiple formats for hearing/speaking/written), I am not too shocked. 10:47:19 anyway.. I'm only slightly here - too toasted to remain long.. But, boy! I love looking under the sheets. ;-) 10:48:13 tathi: in ##C we've a guy trying to reconcile Hebrew inputs to outputs. Talk about reversing the universe ;-) 10:50:01 right to left? (we can handle "line") - imagine right-to-left, columnar (like chinese ;-) 10:51:07 It's fun, watching all the variations of input->SOMETHING->output ;-) 10:51:59 I keep remembering ages-past of forth, C, cp/m, DOS, *nix, etc ;-) 10:54:38 --- part: PoppaVic left #forth 11:14:48 --- join: docl (n=docl@70-101-145-1.br1.mcl.id.frontiernet.net) joined #forth 11:31:36 --- quit: ttuttle ("leaving") 11:47:06 --- quit: JasonWoof ("switching from screen to dtach") 11:49:23 --- quit: Bushmills (Connection timed out) 11:50:07 --- join: JasonWoof (n=jason@c-71-192-33-206.hsd1.ma.comcast.net) joined #forth 11:50:07 --- mode: ChanServ set +o JasonWoof 12:59:36 vibe... is less useful, the way it completely ignores the block words. 13:32:47 which block words? 13:33:45 it has its own SCR variable for some reason, but you could take that out 13:38:52 buffer empty-buffers update updated? save-buffers save-buffer flush 13:41:24 huh. I thought that since it used BLOCK to get the block to edit, all those should work as expected 13:41:57 they'll work, but vibe doesn't use them. 13:42:27 it uses UPDATE and BLOCK 13:42:33 I don't understand why it would use the others 13:43:06 ah, I didn't see that it used UPDATE 13:43:32 er...maybe it doesn't use UPDATE everywhere it should 13:43:54 IIRC gforth does save-buffers on BYE 13:44:20 I should think so 13:45:07 it bothered me more that it had so few commands 13:45:14 I have a version that I added a bunch of stuff to 13:45:34 still haven't done undo or copy-and-paste yet though :( 13:46:23 it isn't tooo hard to save the characters that you've deleted with backspace and make a key to spit them back out 13:46:53 yeah. I just haven't gotten around to it 13:47:03 and I find that copy/paste is mostly used to move things, not duplicate them, so that works out 13:47:37 right 13:47:37 course, herkforth deletes in words, so it doesn't take so long to move a good sized block 13:47:53 and I like having encouragement not to duplicate code :) 13:48:14 . o O ( well, I could type all that again, or I could factor it properly ) 13:48:14 oh, I know. I got sidetracked by trying to add the delete stuff 13:48:25 which I use quite a bit 13:48:59 s/sidetracked/bogged down/ 13:49:12 I should develop those habbits 13:49:17 but I might never do it 13:49:24 I tend to use visual mode a lot 13:50:48 I use visual line mode 13:51:00 but I'll do things like d3w 13:51:09 d3w ? 13:51:15 delete three words. vi. 13:51:16 delete 3 words 13:51:22 oh 13:51:25 bleh 13:51:41 I've been finding lots of uses for visual block mode 13:52:04 0G!G rot13 is also nice. 13:52:19 1G!G rot13 , rather 13:52:32 gg goes to the top 13:53:25 huh, I never used ! that way 13:53:31 I'd just do: :%! 13:53:55 which doesn't display the stupid dialog :) 13:54:48 good for !3w :-) 13:54:57 heh 13:55:04 q! is the only one i ever want to know 13:55:18 I440r: that's :q! 13:55:26 i do not like vi 13:55:31 i know 13:55:55 I440r: I seem to recall you not liking it 13:56:11 something about it being to productive to tollerate ;) 13:56:31 i think that all operations in an editor should be done in a maximum of two keypresses 13:56:45 and shift alt or control should be counted as a keypress 13:57:02 joe comes close but it still requires too many keypresses 13:57:12 the less access I've to vi, the angrier I get. 13:57:19 Hey. 13:58:21 I have to use foreign unupgradeable windows machines, sometimes, and sometimes again to edit files under them. It's painful to maintain that kind of contempt. 13:59:01 multi edit version 3.01 for linux would be good :) 13:59:05 http://qualdan.com/forth/vibe.f if anyone's interested 13:59:14 but after that they went downhill - multi edit 7 sux 13:59:16 heh. multi-edit was cool 13:59:41 qedit as a second choice 14:00:10 --- quit: JasonWoof (clarke.freenode.net irc.freenode.net) 14:00:10 --- quit: neceve (clarke.freenode.net irc.freenode.net) 14:00:10 --- quit: segher (clarke.freenode.net irc.freenode.net) 14:00:10 --- quit: Zymurgy (clarke.freenode.net irc.freenode.net) 14:00:10 --- quit: michaelw (clarke.freenode.net irc.freenode.net) 14:02:10 --- join: Zymurgy (i=zymurgy@cat.delfax.net) joined #forth 14:02:53 --- join: JasonWoof (n=jason@pdpc/supporter/student/Herkamire) joined #forth 14:02:53 --- mode: ChanServ set +o JasonWoof 14:06:40 --- join: segher (n=segher@dslb-084-056-138-027.pools.arcor-ip.net) joined #forth 14:13:58 eh, /me gives up on blocks for now. 14:14:03 --- join: neceve (n=claudiu@unaffiliated/neceve) joined #forth 14:24:57 I think blocks are an 'if you have to' sort of thing. 14:26:03 Quartus, blocks arent any good for source files unless they are the only option :) 14:26:06 I like shadow blocks for documentation, and my mud client seems like it'd fit well enough in them. 14:28:01 I prefer traditionally commented code, leaning toward literate programming. 14:28:24 define literate programming 14:29:13 Knuth's literate programming. Code as a document that can be processed either into code that compiles, or a document that prints (with optional cross-refs, etc.). 14:30:28 In its simplest form, think of traditionally commented code where the comments support formatting (and other) markup. 14:31:17 i dont like red taspe cruft in my source files 14:31:24 red tape 14:31:27 Neither do I. 14:33:47 Fundamental tenet of literate programming is that programs are first and foremost documents for people, not machines. 14:34:16 http://en.wikipedia.org/wiki/Literate_programming 14:38:13 is knuth still alive ? 14:38:22 Yes, he has a web page. 14:38:22 wikipedia would know, I440r. 15:09:49 --- quit: tathi ("leaving") 15:33:58 --- join: michaelw (n=michaelw@lambda.foldr.org) joined #forth 16:04:29 --- quit: docl ("leaving") 16:38:45 --- join: segher_ (n=segher@dslb-084-056-128-240.pools.arcor-ip.net) joined #forth 16:39:54 pity that good Forth advice doesn't translate well for C newbies. "Why does this test always fail?" "DUMP your second string ... er, nevermind. man fgets" 16:47:59 --- quit: segher (Read error: 110 (Connection timed out)) 16:51:24 http://paste.lisp.org/display/22324 17:49:13 I would suggest >varbuf> is a name that needs some work. :) 17:49:14 any suggestions on http://paste.lisp.org/display/22324#1 ? I need to reconstruct the string exactly , including whitespace, but I'll want to replace specific words. 17:49:48 gforth has a SAVE-MEM internally, ( c-addr u -- c-addr' u ) that ALLOCATEs space. 17:50:47 but what's wrong with >varbuf> ? It's mnemonic, at least, and it's very localized 17:51:19 I have no idea what the first and last > are meant to indicate, and other than it being, presumably, a "var"iable "buf"fer, I have no idea what it's for. 17:52:01 TO, FROM 17:52:23 So, what does >varbuf> do? 17:53:14 it appends a given string to the "var$" always at varbuf , returning the new string 17:53:43 I get everything up to '"var$" always at varbuf'. What does that mean? 17:54:11 I guess "var$"+$ would also work. The word is only used in one place, still. 17:54:34 Quartus - given "hello" , >varbuf> returns "var$hello" 17:54:37 Oh. 17:55:03 So it's "prepend-var$", more or less. What's the purpose of doing that? 17:55:09 that the new value comes from storage at VARBUF isn't that important, though. 17:55:43 MUDVAR searches the dictionary for "var$hello" and then executes it. 17:56:11 So the purpose of creating a new string with 'var$' in front of it is to ... what? Make it into a variable name? 17:56:37 the end result is that I can say "strike $target" and get "strike Nemesis" , having defined $target to be Nemesis. 17:56:59 yes, to find an existing variable named var$that-string 17:57:34 so, '>variablename' or '>lookupname' something might be suitable. 17:57:39 a special wordlist didn't work for this in the beginning, but I can probably use that now. 17:58:28 I'd prefer 'string>variablename' or something of that ilk, but I'd definitely go with something that describes what its purpose is, rather than what its function is. 17:58:41 hm, OK 17:59:59 --- quit: I440r ("Leaving") 18:00:42 After all, the code itself shows that it appends the string to the varbuf. It isn't useful for name doesn't need to reproduce that, and indeed that mechanism may change, while the purpose of the word stays the same. 18:00:55 s/doesn't need// 18:05:27 --- join: slava (n=slava@CPE0080ad77a020-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 18:08:04 ah, I replaced all of that with MUDVAR: MUDVAR and a wordlist. 18:11:25 Makes sense. 18:22:54 what's the word equivalent to ( c-addr u -- c-addr+1 u-1 ) 1- 1 UNDER+ ? 18:24:00 ah, 1 /STRING 18:43:05 ayrnieu: what are you working on? 18:46:48 slava, I think it's a MUD extension 18:47:20 slava - a mud client. 18:48:39 isn't that a telnet client? :) 18:49:12 trivially, yes. 18:49:42 although I don't think you need to implement much of telnet. 18:57:08 ahhh :) much better 18:57:24 just re-compiled rxvt with the NO_BELL setting 18:57:40 my vi interface, for instance, makes mudding a bit more interesting :-) 18:58:50 I made a mud client recently 18:58:52 not in forth though 18:59:06 I just extended my logging irc bot 18:59:15 (which was written in perl) 19:00:05 a mud client in Forth is interesting. 19:00:38 cool 19:01:35 drives me nuts that there's no good way to tell what's a prompt 19:02:04 yeah, it's very unprotocoled. Safest to ignore the prompt. 19:13:02 hi JasonWoof 19:25:01 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-137-133.pools.arcor-ip.net) joined #forth 19:32:40 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 19:32:49 --- nick: snoopy_1711 -> Snoopy42 19:32:55 hi slava 19:33:16 what's new? 19:33:21 http://sagacity.merseine.nu:8080/misc/mud-snapshot.tgz -- my MUD client. Still very unpolished, though. 19:34:09 re-installed linux 19:34:15 fiddling with xorg now 19:34:24 smoothest linux install I've done on my mac 19:34:42 i'm working on some miscellaneous factor features. the next release is ready except for the windows port which i'm waiting on for a contributor to finish 19:34:42 well, maybe I should wait to say that until everything is working perfectly... 19:35:10 mouse button emulation is still not working 19:35:19 I'm fiddling, seeing if I can get opengl to work 19:40:09 i was thinking of switching to Cairo as soon as the OS X backend for it is stable... 19:40:40 i'm not sure if using GL to render a GUI was the right idea 19:42:10 it's just part of my ever-present quest to get a good framerate under linux 19:42:30 are there any hardware 3d drivers for your mac? 19:42:45 I get about 27 fps with vor which is only updating 800x600 19:42:52 vor? 19:42:54 I figure that's less than 40MB/sec 19:42:58 jasonwoof.com/vor 19:43:00 sorry 19:43:03 jasonwoof.org/vor 19:43:47 is it written in C? 19:44:00 yes 19:44:28 why not forth? :) 19:44:30 works great on ppc linux. and has also been tested on x86 linux and windoze 19:44:39 I'd love to have someone build a mac version 19:47:33 might not even take any code modification 19:47:57 as I know it works on ppc 19:48:16 you should rewrite it in forth 19:48:18 and mac os x is a lot more unix-like than windoze 19:48:26 I don't want to rewrite it 19:48:35 so why C in the first place? 19:48:52 that's the way we found it 19:49:05 we just cleaned it up and added and changed 19:49:30 ok 19:50:37 the original is called rock dodger 19:50:56 ahh, maybe I need to enable dga in sdl 19:57:28 ok, wikipedia says that agp 2x (which I have) has a maximum data rate of 533MB/s 19:57:47 by my calculations, vor is getting about 1/10th of that 19:57:51 ouch 19:59:25 I should clarify that this is not a reflection on vor, vor is great 19:59:36 it runs smooothe as butter on windoze 19:59:48 this is a problem with my system, or linux or something 19:59:52 xorg... 20:07:14 --- quit: nighty (Read error: 113 (No route to host)) 20:18:28 oh, the Emulate3Buttons option for xorg only emulates the third (by clicking 1 and 2 at the same time) 20:18:40 I need the seccond to be faked too 20:18:51 I have a one button mouse 20:36:18 --- join: LOOP-HOG (n=jason@66.213.202.50) joined #forth 20:45:01 JasonWoof: ouch :) 20:51:39 oh crap... vor is 640x480 20:51:49 that makes this even worse 21:54:48 interesting... 21:55:12 I changed vor so it ran at 1280x1024 (my screen's dimentions) 21:55:18 and it got about 6-7 fps 21:55:33 then ran it that way with dga, and got 83fps 21:55:46 but the display was mega screwy 21:56:42 the screen was split into 4 quarters, each containing a copy of the game display with the colors messed up 21:56:55 and each looked the same as near as I could tell 21:56:58 hehe 21:57:08 good frame rate though :) 21:57:38 I'm guessing I have to change the bit depth 22:00:56 sweet :) I changed X to run in 16-bit color 22:01:17 and now it runs fullscreen with correct color at 86fps 22:01:19 but it flickers 22:01:45 guess it's not drawing offscreen anymore, just direct to screen 22:37:15 --- quit: neceve (Remote closed the connection) 22:37:38 this is exciting 22:37:53 I haven't seen linux get such a good frame rate 22:38:01 least not on my weird hardware 22:38:09 shame the double buffering doesn't work 22:38:11 it's very weird 22:38:34 if I turn on SDL_DOUBLEBUF then I get 84fps, and tons of flicker 22:38:42 if I turn it off, I get 15fps and no flicker 22:47:51 --- join: ASau (n=user@home-pool-170-3.com2com.ru) joined #forth 22:49:27 Dobre jitro! 22:50:19 Who asked about memory leaks in gforth? 22:53:44 Read the description of S" 22:53:52 it clears all. 22:55:37 that interactive s" calls save-mem which ALLOCATE's space? 22:55:47 I don't remember anyone asking about that, though. 22:57:57 Someone here used valgrind. 23:08:22 yesss! 23:08:36 I got vor running at a good framerate FULLSCREEN 23:08:43 1280x1024 23:08:55 60fps 23:09:24 before I was limping along at 640x480 27fps 23:15:22 hmm, actually 65fps 23:15:35 that's 5 better! :D 23:15:55 earlier figure was thrown off by the silly fading effect on the menu and game-over screens 23:21:53 I may be able to get it back up into the 80s 23:22:27 we shall see 23:22:53 I thought that double-buffering totally wasn't working, but then I made an offscreen buffer, and blitted it to the screen, and it didn't show on the screen until I called flip 23:23:43 in any case... 65 is amazingly better than 15 23:24:01 and I'm quite used to playing it 1/4 the size at 27fps 23:24:05 so this is quite exciting :) 23:59:59 --- log: ended forth/06.07.09