00:00:00 --- log: started retro/06.11.04 00:23:49 --- part: forther left #retro 01:11:16 --- join: Cheery (n=Cheery@a81-197-19-23.elisa-laajakaista.fi) joined #retro 01:43:31 --- join: neceve (n=claudiu@unaffiliated/neceve) joined #retro 06:00:04 --- join: erider (n=erider@unaffiliated/erider) joined #retro 07:12:24 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-145-229.pools.arcor-ip.net) joined #retro 07:20:38 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 07:20:45 --- nick: snoopy_1711 -> Snoopy42 07:58:43 good morning 07:58:58 good morning crc 07:59:29 I'm fighting myself day and night about should I use retro or gforth 07:59:52 * lukeparrish has been showing erider how to do arrays 08:01:25 I have forth on my palm and I can port code from gforth relatively easy to Quartus forth on my palm but crc you retro is so interesting that I can't stop playing with it 08:01:41 I really like the syscall word 08:04:17 you get a warm and fuzzy feeling, right? 08:04:41 yes 08:04:57 virl: how about you 08:08:42 about me? well, I would really like to have a free coding webspace for a non-forth project. hmm.. or a one which is cheap and it's hoster is around the corner. 08:26:51 Warm and fuzzy. heh. :) 08:51:33 virl: what requirements do you have for the webspace? 08:52:24 not much, only for dumping a darcs repo 08:53:22 SDF might work for that... http://sdf.lonestar.org/index.cgi?welcome 08:54:35 ah, cool :-) 08:54:39 yeah sdf (freeshell) is good 08:55:40 I can also give you some space on the rx-core.org server if you want 08:56:19 hey 08:56:26 hi Quartus 09:11:25 hi crc 09:18:20 lukeparrish, so you have an account? 09:18:33 on sdf? yeah 09:18:54 I paid the $12 lifetime subscription 09:19:14 oh.. well.. 09:20:25 but you can get a free shell to start. anything that might be useful to spammers is disabled until you pay $1 though. 09:20:39 I don't know if I could as a sdf user put a darcs repo on it and then getting or putting a patch through an url 09:20:56 hmm. not sure their policy on that. 09:21:08 you need a darcs repo on the internet? 09:21:12 * crc sends his patches over email, not through a URL 09:22:03 Probably I need to do that 09:22:53 crc: I liked having the glossary.txt file available in retro, for easy reference. is it the same as extensions/help.data? 09:24:25 I think it's pretty similar 09:24:44 help.data was built from the glossary in the current handbook 09:26:57 erider was wondering about file I/O and I was trying to figure out where to point him at 09:27:17 file I/O will be changing significantly soon 09:27:30 * crc is working to bring over the file words from RxForth 09:27:38 huzzah! 09:28:17 cool. although I liked the old way :) 09:28:37 that can be rebuilt over the new words easily enough 09:28:39 Oh yeah, I remember I should've sent you that file today crc. 09:28:48 how comfortable is it for you crc to distribute your patches by email? 09:29:31 it's not bad. I actually prefer it, since I can accept patches from anyone, review them before applying, etc 09:34:11 crc: do you know that my current rx doesn't run on my 64bit side of linux 09:37:23 rx is a 32-bit app; but it should run if it can find the 32-bit libraries 09:45:13 crc: I sent it a while ago. 09:45:33 Btw. I just realised a funny idea. 09:45:53 rx runs on the 32bit side that I got 09:46:38 what if indentation would be done by an expected size of stack? ie. that amount of spaces how much there is stuff in stack. 09:46:52 plus. maybe, traditional indentation. :) 09:47:20 Ie. if you'd have a word... lets say square. 09:48:01 : square ( x -- x^2 ) 09:48:01 dup * ; 09:48:07 you'd indent it this way. 09:48:22 but if you'd have rot (three incoming values. 09:48:54 : rot ( x y z -- z x y ) 09:48:54 -rot -rot ; 09:49:01 you'd indent that this way. 09:49:42 structure indent + expected stack amount 09:50:44 Ambiguious. Can't tell if the indentation is for one, or the other. 09:51:02 I wouldn't say. 09:51:25 there is no negative values in stack-size 09:51:37 Nor in structures. 09:51:58 Perhaps you could differentiate the symbol used. Of course then you're only a hair away from putting a stack diagram on each line. 09:52:08 : rot ( x y z -- y z x ) 09:52:08 ( x y z ) -rot -rot ; 09:52:18 hehe. :) oh well. 09:52:28 : rot ( x y z -- y z x ) 09:52:36 -rot -rot ( x y z -- y z x ) ; 09:52:40 Kind of redundant. :) 09:53:29 hmm. I think the thought here is putting a sign of the available stack on the left side. possibly could have an aesthetic appeal. 09:53:52 My strong preference is for one-line definitions with seven +/- two words/idiomatic-phrases that require no internal documentation. 09:53:58 gah, I remember rot was burying. 09:54:20 rot=dig -rot=bury 09:54:27 No, goes the other way. It's ( x y z -- y z x ). -rot is ( x y z -- z x y ) 09:54:42 yes, I just tested it with rx. 09:54:46 Cheery: same number of letters 09:54:52 er chars 09:54:57 since - isn't a letter 09:55:16 hmm. 09:55:37 I guess I go and rename them dig and bury. 09:55:44 ' rot alias dig 09:55:49 Generally you'll see : -rot rot rot ; as rot is the more commonly-found primitive. 09:55:49 They've fucked up enough. 09:55:50 ' -rot alias bury 09:56:20 Cheery: well that's what I did, then I got tired of it and went back to the normal way. but now I remember :) 09:56:32 why did you get tired of it? 09:57:05 hmm. reading others' code it was always still rot/-rot. 09:57:15 hm. 09:58:10 That's the thing. Spend the couple of minutes to associate the common name with the expected behaviour, and you can read other people's code, and they can read yours. 09:58:53 yeah. mneumonics are cool though. 09:59:08 the painlessness of learning they can grant is really nice. 09:59:09 Cheery: I got the vm.py, thanks 09:59:20 * crc forwarded on something he's working on as well 09:59:26 bury and dig are not without ambiguity themselves. 09:59:55 Hey crc, thanks! 09:59:56 true. but they're good enough for differentiation in my mind. 10:00:06 I look into it. :) 10:00:21 e.g. dig could go as deeply as you want it to. I'd use that instead of pick (or was it roll that does that? 10:00:24 ) 10:00:33 some of the stuff I sent may be of use in your work, though it's written in C 10:00:39 yeah it's roll. pick makes a copy 10:00:49 crc: well, timlarson has written his stuff in C as well. 10:00:57 I think he'll find it very useful. 10:01:05 good 10:01:54 lukeparrish, you shouldn't be using PICK or ROLL, no matter what names you assign them. 10:02:08 true 10:02:31 pick or roll? 10:02:33 but it's good to know what the heck they are. 10:02:42 pick is roll with a copy. 10:02:45 er dup 10:03:39 : pick dup >r roll dup r> swap >r -roll r> ; I think would do it 10:03:57 gah. I've never seen -roll anywhere. 10:04:06 well I can make that too :/ 10:04:20 Pick is usually implemented as a direct memory read from stack memory, though there's also a simple recursive definition for both it and roll. 10:04:23 or I think I can 10:04:34 it would be like I picture as "bury" 10:05:01 From the rf ANS layer: 10:05:01 : pick 1+ cells sp@ + @ ; 10:05:01 : roll ?dup if swap >r 1 - recurse r> swap then ; 10:05:55 cool 10:06:21 recurse is the same as "roll" would be in that context? 10:06:46 I don't follow. 10:06:55 sorry 10:07:17 does recurse go to the beginning of the function it's called in? 10:07:20 oh, you mean self-referentially? Yes, recurse recurses into the current definition. 10:07:23 crc: basically it seems like a replica from rxforth, but made entirely in C? 10:07:55 Standard definitions aren't findable until the definition is complete. 10:08:07 ah, I see. 10:08:40 I *think* retro's are. 10:08:52 They are. One benefit of using RECURSE is that it allows nameless recursive words. 10:08:58 : loop foo bar baz loop ; 10:09:18 nice 10:09:41 :: foo bar baz recurse ; I'd imagine 10:09:48 sweet 10:10:06 of course you'd want an if; in there somewhere I'm sure 10:10:37 seems likely :) 10:10:40 :) 10:11:08 Hey! So saying, I've discovered a bug in the rf-ans layer, in that recurse doesn't work properly in nameless words, as it's supposed to. I'll fix that. 10:11:33 endless loops are only so entertaining. although... I have a program with an endless loop that I use to display subliminal messages. 10:12:15 has select-syscall'd delays 10:12:56 I wonder how to get keypresses during those. I should look into that. 10:14:19 crc... 10:14:26 we are working on a syntax like this: 10:14:51 ['this is a string [-and this is a nested comment in the string] that is pretty short] 10:15:00 [=this is some code] 10:15:09 [\this escapes to the parser] 10:15:12 etc. 10:15:33 your toka/bootstrap code reminds us of this :) 10:16:43 the [ controls parser state, which affects how parser behaves. later letter tells how parser state changes. 10:18:22 ['this is a [=['string]$]] outstr 10:18:28 this would output: this is a string 10:19:08 wait, what's $] do? or is that a typo? 10:19:08 in our syntax, ( ) works very similar way to your [ ] quotes. But we are considering compiling all the time. 10:19:10 the $ appends the string indicated by the pointer on top of the stack to the string currently being built. 10:20:17 lukeparrish, you can think of $ like an outstr that writes (appends) to a string instead of writing to stdout. 10:20:31 kinda like . in php? 10:20:43 yeah, kinda 10:21:30 [=...] is for putting code within a string, and ['..]$ is the code that appends a string. 10:21:39 this could work out to be a cool web page maker. 10:21:52 that's the idea :) 10:22:20 that was the motivation for coming up with this syntax 10:22:22 fairly simple to pick up, not whitespace dependant. 10:22:51 and for generating code in itself and in other languages 10:23:08 I'd imagine code not already in ['...] is counted as [=...] by default? 10:23:13 yes 10:23:31 ok. so not as demanding of parens as regular lisp 10:24:25 hi timlarson 10:24:29 right, and I plan to have list handling, probably via [,item1,item2,item3...] 10:24:33 hi erider 10:24:35 * lukeparrish notes that with some creative manipulation of the >in pointer, parse could do some pretty powerful stuff along these lines. 10:27:32 timlarson: what you plan today 10:28:17 getting the quad query language far enough along to support function "naming" and extending the base set of words. 10:32:16 Cheery: I keep the interpreter around because I like it 10:32:42 at this point I could switch to a compile/run cycle, but see no real reason to 10:32:50 Why do you like it? 10:33:30 for quick and dirty tests, it's handy 10:34:07 when I implemented this, I started with just an interpreter, debugged most of the initial words, then built the compiler 10:34:07 very true thats what C lacks 10:34:46 I could drop the interpret mode, but I see it as being useful in the future, when I explore other approaches to compilation 10:35:57 you mean interactive mode? 10:36:21 no 10:36:31 I won't eliminate interactivity in the environment 10:37:12 oh. Now I'm totally lost. :) I thought you meant that. 10:37:13 --- join: nighty_ (n=nighty@sushi.rural-networks.com) joined #retro 10:37:27 or wait, you said "I won't" 10:37:55 hmm. interpret vs. interactive. I guess you could do without interpreting, just making words and executing one at a time. 10:38:02 The thing is about having different modes for interpretting and compiling. 10:38:10 lukeparrish: freeforth does that 10:38:13 i.e. don't do anything until it's all been factored into one word 10:38:16 cool 10:38:30 actually that might be a better idea 10:38:42 it removes some of the ambiguity from the language. 10:38:45 lukeparrish: http://christophe.lavarenne.free.fr/ff/ 10:38:47 Do we need to have those different modes? 10:38:58 Cheery: it depends 10:39:08 you may not want to compile everything 10:39:27 having that state variable requires that you implement classes two different ways, first state off and then state on. 10:40:00 though not having it means that you still have to decide how to defer/allow actions 10:40:11 e.g., a word that inlines something else 10:40:25 hmm. 10:40:34 yep. I guess so. 10:40:54 you really just shift things around 10:42:04 in Toka, I'm haven't had to think too much about this. For named words, there are essentially two classes: .quote and .macro (not directly visible) 10:42:11 and .data 10:42:13 so three 10:42:23 (others exist, but are only used by the primitives) 10:43:05 .macro is used for words that should only be run during compilation; those that inline other things. All other words are .quote 10:43:14 data structures are .data 10:43:35 yes, I noticed that. 10:44:01 Assuming I've understood the existing thing about word classes. 10:44:29 I have plans to fold almost everything, including primitives, down to those three classes 10:45:49 ... .quote checks if compiling state is happening, if it does, it puts that call into certain place, if not, it invokes it. 10:46:26 .. .data checks same, except it puts the value into certain place and if not, it leaves it into stack. 10:46:41 yup 10:46:56 .macro invokes the quote if compiling, ignores it otherwise 10:47:04 yep. 10:47:35 if you'd make it compile all the time, these would change next way: 10:47:46 .quote would always compile call into certain place. 10:47:56 .data would always put the value as literal into certain place. 10:48:02 and macro would always invoke. 10:48:11 ie. 10:48:51 however the end result (from the programmer's perspective) is the same 10:48:55 ' compile is .quote 10:48:55 ' literal, is .data 10:48:55 ' execute is .macro 10:49:08 yes, of course. 10:49:57 but there's a difference, word classes doesn't need conditions, therefore complexity lies on the level user changes more rare. 10:50:28 --- quit: virl (Remote closed the connection) 10:50:49 the interpreter itself though would have to keep track of it's heap then, and also references to it 10:51:28 (in my interpret/compile model, the interpreter has no heap) 10:52:06 It seems there is no allot anymore. 10:52:09 in toka. 10:52:16 but there is heap -variable. 10:54:33 I were thinking of chance that it'd copy the compiling results elsewhere from heap. 10:54:56 there is no single heap in toka 10:55:16 where does it compile? 10:55:17 all memory (for quotes, variables, etc) are dynamically allocated 10:55:32 each quote has it's own heap 10:55:44 cool! 10:56:15 this will eventually allow for at least basic garbage collection to take place if/when I decide I need it 10:58:08 I guess I should read that toka code through and test different choices myself. 10:58:26 I guess then I would understand the best why there is need for that tiny funny variable. :) 10:58:48 temporary quotes (not nested/named) will eventually be purged automatically to keep memory use to a reasonable level 10:59:21 named words that are not used could be purged as well 11:11:42 how will you know that a defined word won't, at some later point, be called? 11:12:00 I don't 11:12:26 at present I am not planning to purge named words or allocated data, just temporary quotes 11:12:59 in quartus forth I only abandon unused words when generating a stand-alone app, as words either appear in the call tree, or they don't. 11:15:50 I suppose you could have a word that discarded everything not in a given call-tree -- to be called explicitly by the programmer. 11:16:19 like -- ' foo keep-only 11:17:58 that would be a good idea 11:18:43 could be general garbage-collection, but manual rather than automatic. 11:20:44 seems like if you keep code stored in a text buffer as it is written, you can simply clear the heap and re-compile it. but since it's compiled already keeping it as such is something of a time saver. 11:21:02 * lukeparrish may be confusing IDE with compiler issues 11:21:55 I think you are. 11:22:25 hmm. why do we need GC if we have a good IDE? 11:22:39 lukeparrish: gc != ide 11:23:14 e.g., my experiment has no single heap; each new quote/word is dynamically allocated 11:23:35 if you quit and restart, that's a (admittedly very crude) form of GC... 11:23:35 quotes that are made and used once can be discarded after use 11:23:35 that's what gc is for 11:24:02 true to a point 11:24:43 if your app creates a bunch of quotes that it uses briefly while building the full program, then you still have that garbage after a restart 11:24:57 throwing the computer out and buying a new one is a form of GC, arguably a bit crude. 11:25:04 :) 11:25:44 * crc will add a simple, manual gc soon (which will require quotes to be explicitly marked as temporary) 11:27:02 * erider vanishes 11:27:19 other things are higher priority right now though 11:31:57 I just pasted this in #forth: http://www.cs.utexas.edu/users/EWD/transcriptions/EWD00xx/EWD28.html 11:32:05 it's from 1962. 11:34:34 it's Dijkstra describing a two-stack postfix programming language that's closer to Forth is now than Moore's early versions were. 11:36:06 hehe, just like some forths: "In particular, the question of storage allocation will remain untouched." 11:36:57 Forth dealt with storage allocation from the early NRAO versions. 11:40:27 --- quit: nighty_ ("Disappears in a puff of smoke") 12:27:21 --- join: forther (n=forther@c-67-180-209-27.hsd1.ca.comcast.net) joined #retro 13:20:02 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 13:27:50 --- quit: neceve (No route to host) 13:59:54 --- join: nighty_ (n=nighty@sushi.rural-networks.com) joined #retro 14:02:18 --- quit: lukeparrish (Read error: 110 (Connection timed out)) 14:10:05 --- join: lukeparrish (n=docl@74-36-211-202.dr01.hmdl.id.frontiernet.net) joined #retro 14:10:05 --- mode: ChanServ set +o lukeparrish 14:31:35 Cheery: I read your post about suffixes on the rxforth group. 14:32:27 I agree 100% that 1000b looks better than %1000, but the trouble is that b is a hex numeral. 14:33:06 so hex 11b is not the same as 11b when in decimal mode 14:38:54 and don't get me started on 2b or !2b :P 14:53:38 * erider reappears 14:53:46 yay 14:58:33 --- join: virl (n=virl@chello062178085149.1.12.vie.surfer.at) joined #retro 14:59:13 hi virl 14:59:27 hi lukeparrish 15:00:00 * crc has basic gc working now 15:00:32 cool! 15:02:03 you have to explicitly mark quotes/data for gc; gc is called when the garbage collection list is filled or if you manually invoke it via 'gc' 15:14:52 Neat! 15:28:26 lukeparrish: :) 15:28:27 :D 15:28:34 I didn't realised that. 15:28:46 But I think it'd look so much better really. 15:29:14 yeah 15:32:42 hmm. you could make modes that you enter and the syntax rules change. 15:32:53 suffix: ... ;suffix 15:33:32 then when that mode is going, you can't switch out of the decimal base, and the suffixes work 15:33:49 Or a different language. 15:33:52 Whatever. :) 15:33:57 true :) 15:34:15 basically it permits a rewrite of the language without losing the old one. 15:34:22 The beauty in forth is that it is sustainable for this kind of usage; change of syntax and using those things together. 15:34:59 ie. crc:s work is totally from opposite direction than some done in keow. But still hitting same thing in parallel. 15:35:53 well, computers inherently let you do that, and forth lets you close enough to the computer to do so. 15:36:28 yeh, I've been thinking the reason being in some that kind of thing... 15:36:29 I'm going to sleep. 15:36:49 ok 15:36:52 l8tr 15:37:01 --- quit: Cheery ("Download Gaim: http://gaim.sourceforge.net/") 18:05:57 --- quit: virl ("Verlassend") 19:06:16 --- quit: Quartus_ ("used jmIrc") 19:10:36 --- join: Quartus_ (n=Quartus_@209.167.5.2) joined #retro 19:43:24 --- quit: Quartus_ (Read error: 104 (Connection reset by peer)) 19:49:40 --- quit: erider ("I don't sleep because sleep is the cousin of death!") 22:52:06 --- quit: forther (Read error: 104 (Connection reset by peer)) 23:03:15 --- join: forther (n=forther@c-67-180-209-27.hsd1.ca.comcast.net) joined #retro 23:46:33 --- quit: forther (Read error: 110 (Connection timed out)) 23:59:59 --- log: ended retro/06.11.04