00:00:00 --- log: started forth/06.07.24 00:07:30 slava, yeah? 00:54:30 --- quit: JasonWoof ("trying new version :)") 00:54:33 --- join: JasonWoof (n=jason@c-71-192-33-206.hsd1.ma.comcast.net) joined #forth 00:54:34 --- mode: ChanServ set +o JasonWoof 01:40:12 colorforth is crazy, so much people try to understand chucks undocumented code. I don't think that's good programming practice 01:41:12 --- quit: Quiznos (Read error: 110 (Connection timed out)) 01:41:35 it's really only written for himself, but the crazy thing about it is, why the hell does he puts it in public? 01:43:31 it's like compilling a binary and only 'sharing' it's binary code with others. 01:44:08 in fact, it's imho only a reference implementation of nice ideas. 01:45:38 btw. does anybody analysed the data.dat file? 02:04:09 virl: Chuck put it in public domain because he thought people might like to check it out 02:04:24 you are quite right 02:05:06 It did not at all seem like he thought he was contributing some great piece of software to the community 02:05:18 more like he was happy with some of his ideas and wanted to share them 02:05:39 he knows his system is only useful for himself 02:05:57 It suprises me that other people actually attempt to use his system 02:06:12 seems to me it would be far easier to write your own than to extend his 02:06:59 JasonWoof, something similiar, do you know jpb forth? 02:08:17 it's a forth system with a desktop system and runs on a microcontroller board, looks nice and you say 'wow' but then you stumble over it's source which is completly french and then you want to drawn the author. 02:08:50 ups, drown 02:11:40 no wonder that forth has it's problems.. evolutions does only happen very slowly because of such problems. 02:16:26 in fact, where are it's uses today? perhaps embedded systems, but there aren't for example much development packages out there, it's more easily to get an atmel with basic or C as it input language than the same with forth. 02:16:45 haven't heard of jpb forth 02:16:49 could we say that it's deprecated? 02:17:06 literally French? 02:17:11 http://jpb.forth.free.fr/ 02:18:09 the comments, are french so I would say the whole documentation is in french. 02:18:38 the program names are in french 02:19:28 and iirc, even the boot process is in french. 02:19:36 it's so crazy. 02:23:19 and yeah, a couple of text is in english, oh really.. that's so frustrating. 03:32:15 --- join: Quiznos (i=1000@69-168-231-199.bflony.adelphia.net) joined #forth 03:32:19 rehi 03:35:24 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 04:19:16 --- quit: I440r ("Leaving") 05:10:56 --- join: PoppaVic (n=pete@0-2pool198-51.nas30.chicago4.il.us.da.qwest.net) joined #forth 05:46:39 --- join: vatic (n=charlest@pool-162-83-254-201.ny5030.east.verizon.net) joined #forth 05:51:14 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #forth 05:59:23 --- join: Ray_work (n=Raystm2@199.227.227.26) joined #forth 06:22:37 --- quit: Quiznos (Read error: 104 (Connection reset by peer)) 06:28:39 --- quit: timlarson_ ("Leaving") 06:29:51 --- join: Ray-work (n=Raystm2@199.227.227.26) joined #forth 06:29:54 --- quit: Ray-work (Remote closed the connection) 06:55:49 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #forth 08:07:25 --- join: Shain (i=steve@c-67-161-56-76.hsd1.ca.comcast.net) joined #forth 08:39:20 --- join: segher (n=segher@dslb-084-056-160-149.pools.arcor-ip.net) joined #forth 08:47:29 --- join: pourlespoissons (n=roger@136.160.196.114) joined #forth 08:47:50 --- nick: pourlespoissons -> rabbitwhite 09:03:03 So jpb forth is French -- the author is French. What's so crazy about that? 09:04:24 --- quit: vatic ("Chatzilla 0.9.71 [Firefox 1.5.0.4/2006050817]") 09:14:04 --- join: nighty_ (n=nighty@66-163-28-100.ip.tor.radiant.net) joined #forth 09:15:59 --- join: Quiznos (i=1000@69-168-231-199.bflony.adelphia.net) joined #forth 09:20:57 --- join: PoppaVic1 (n=pete@0-1pool47-128.nas30.chicago4.il.us.da.qwest.net) joined #forth 09:21:17 --- quit: PoppaVic (Nick collision from services.) 09:21:21 --- nick: PoppaVic1 -> PoppaVic 09:31:01 Quartus: yeah, I had a hard time getting worked up about that too :) 09:37:14 Well, I've been thinking about it since I posted that. FRENCH! HOW DARE HE! :) 09:37:36 The sheer gall of having his own native language! And *using* it!!!!! 09:39:00 what did i miss? 09:39:48 --- join: lorance (n=lorance@adsl-19-114-5.asm.bellsouth.net) joined #forth 09:39:56 --- quit: lorance (Client Quit) 09:45:39 [05:16] http://jpb.forth.free.fr/ 09:45:39 [05:17] the comments, are french so I would say the whole documentation is in french. 09:45:39 [05:18] the program names are in french 09:45:39 [05:19] and iirc, even the boot process is in french. 09:45:39 [05:19] it's so crazy. 09:46:05 lol 09:46:08 ty 09:46:10 virl suggested drowning the author. 09:46:35 in anything in particular? 09:46:48 EV olive oil is nice 09:47:13 A liquid form of cultural intolerance, perhaps. 09:47:19 lol 09:49:30 lol at quartus 09:50:12 Wow, that Forth is an F79 system. Didn't think anybody wrote those anymore. 09:50:34 lol 09:50:45 in 1980 i looked at f79, i rejected it 09:50:47 lol 09:51:12 Heh. Just reading the English pages at the site. The section on register assignments says "D7 constitutes the summit of the pile of data". 09:51:22 That right there made the visit worthwhile. :) 09:52:47 summit is a nice word 09:53:10 sounds like "sum" 09:53:51 Generally used to describe the highest point of a mountain. 09:54:04 heh maybe we could start calling TOS "the summit of the great mountain" 09:54:14 let's talk about namespaces!!! 09:54:21 puhleeeleeeleeez 09:54:23 :) 09:54:27 ok, why 09:54:41 And I'll be calling it the "pile of data" instead of the "data stack" for at least a day. :) 09:54:55 Namespaces are simply places to store names. 09:54:58 cuz i wanna utilise it in my forth and someone from here gave me a good idear the other day and i wanna hash it out 09:55:12 right, so they translate to vocs and lexicons 09:55:12 So what's your dictionary model? 09:55:18 as far as what? 09:55:31 wait, first lets hear about why you decided to add namespaces? 09:55:35 Don't go all PoppaVic with the 'vocs' and the 'lexicons'. 09:55:47 Why is pretty clear. How depends on how you've implemented your dictionary. 09:55:49 i'm just using fewer chars, that's all 09:56:05 nm me, I'm just watching the gyrations. 09:56:06 similar to how fig does it 09:56:18 So just one linked list? 09:56:54 quartus thats not true, i've never had a clear need for namespaces, so the reason isn't obvious to me 09:56:58 yes but there maybe news words that contain pointers to words (like lispy cons lists, generated when needed) 09:57:29 * PoppaVic chuckles 09:57:31 vector of pointers to words 09:57:32 Quartus, I have a vocabulary field in each word header. 09:57:32 rabbitwhite, very handy creatures, namespaces. On a pragmatic level, lets you avoid name clashes in library code. 09:57:42 i know what they're for 09:57:52 um, ok. You did ask. 09:58:16 Quartus right so, i was thinking today that additional vocs could be setup for all kinds of types of things 09:58:16 no i asked why YOU wanted to add namespaces 09:58:30 hehe 09:58:34 rabbitwhite for oopiness 09:58:44 word overloading 09:58:46 For me, a voc is simply a dictionary entry. 09:59:13 a voc is a 2ndry, based on wordlists nowadays. 09:59:26 A clean multiple-namespace implementation means you can create new namespaces independent of others, and add to/search any given namespace. A very primitive dictionary implementation may make that more difficult to set up. 09:59:28 madwork thats true but it can be thought of as anything you can imagine 09:59:40 madwork: they sorta' muclched voc and "lexicon" 09:59:54 quartus: i've seen namespaces implemented in a few lines 09:59:56 Quartus i think a basic tree of dictionaries is a good place to start 10:00:06 they ended up "abstracting" more 10:00:09 I took the simplest and most flexible approach at the time. 10:00:15 rabbitwhite, depending on the Forth it might be that simple, sure. 10:00:23 FIND just matches the voc stack with the voc field in each word as it does a lookup. 10:00:26 madwork: no doubt, man 10:00:51 I can speak best to my own implementation of wordlists. I don't store any extra fields in the header. 10:00:53 And the voc field in a word header points to the voc entry in the dict. 10:01:02 i'm going to go give my attention to something else now 10:01:06 madwork: but, I am having fun watching these others. 10:01:10 Quartus what are the fields you use? 10:01:24 rabbitwhite ty 10:01:30 for commenting 10:01:32 No fields. I guess you weren't in the channel the last time I outlined this. I have a single hashtable for my dictionary. 10:01:38 ok 10:01:51 sinple 10:01:55 m 10:02:07 Wordlists are integers from 0 to the number of buckets in the hashtable. By xoring the hash value with the current wordlist value, you get wordlist lookup for free. 10:02:15 kk 10:02:20 heh 10:02:28 why not start from 1? 10:02:33 Why waste 0? 10:02:34 and let 0 be a sentinel? 10:02:41 There's no sentinel required. 10:02:44 k 10:02:57 madwork: we can learn from it all, or it's akin to watching AFV or commercials. 10:03:04 lol 10:03:13 So for example, if you search for "FOO" in wordlist 1, you'll only be searching the chains that it could reside in, and you'll never find "FOO" from wordlist 2. 10:03:13 can i be the dogs on afv? 10:03:23 kk 10:03:27 thats good 10:03:52 as long as I am not the skateboard/ski/idiot that gets de-nutted, fine. 10:04:13 You don't get erroneous hash/voc collisions with this method? 10:04:18 You can't. 10:05:02 hrm... if you store the whole hash value (pointer size or more), xor'ed with the wid, with every hash entry, this works if you can have an "infinite" number of wordlists, too :-) 10:05:31 segher, not sure about that. 10:05:34 hashing is a real chore. 10:05:44 why vic? 10:06:03 quartus: the name itself is stored, too, so you can reconstruct the wid 10:06:13 has to do with the "hash algorithm" and folding, but I am willing to listen. 10:06:20 segher, I store names in headers, but I'm not following what you're saying. 10:06:22 k 10:06:41 Quiznos: has to do with "perfect" and 10:06:46 kk 10:07:25 quartus: you'll see my implementation soon enough :-) 10:09:13 If you're storing the wordlist, the full hash value, and the name with each dictionary entry, the method of storage -- hashtable or otherwise -- simply varies the speed of lookup. Using the wordlist value to modify the target hashbucket leverages the existence of the hashtable to give you free wordlist capabilities, which is what I'm getting at. 10:09:15 ok, so namespaces allow for separation but i'm wondering how simple it can be to select a namespace in order to use correct word? 10:09:41 now, to me, that's compile-time resolution, but what about runtime resolution of which word to use? 10:09:59 Compile-time resolution is done via a search-order, a list or stack of wordlists. 10:10:26 If you are searching the Forth dictionary at runtime, the same mechanism applies. 10:10:29 supposing that the symbol + is overloaded for cell, dcell and float, how do i appoint runtime type info to each stacked cell? 10:10:39 nope 10:11:10 That's an issue entirely outside of how you provide namespaces, Quiznos; if you want a typed Forth the compiler will have to know about types all the way through the process. 10:11:20 Quiznos, type stack. 10:11:35 The "dictionary" in forthish has little to do with namespace, heads, names or data. Its a semantics issue. 10:11:51 he was a witness. (next msg) 10:11:55 oops 10:12:11 Except for the part where the dictionary is all about namespaces, headers, names, and pointers to code, of course. 10:12:59 Afaict, a "dictionary" - classically - is all of ram. Now, if folks want to deviate, they need to add or change terms and note either. 10:14:00 ..unless they are en-gi-neers 10:14:03 that's called "data space" in ans forth, to remove the confusion 10:14:05 Ok. From now on, everybody stop using the word 'dictionary', and just say 'all of RAM', because that will somehow be clearer and more meaningful. 10:14:22 So segher, how are you implementing your 'all of RAM' structure? :) 10:14:26 madwork hold that thought, gotta put out a fire 10:14:29 "fire" 10:14:35 Quartus: and they're the same length, even. 10:14:50 tathi, yes, and the added stupidity just brings out the dumbass flavour. 10:14:59 quartus: there is this variable "h", and this variables "origin" and "limit". very classic eh? 10:15:10 segher, I'm stunned. You should publish. :) 10:15:25 quartus: i will 10:16:01 * PoppaVic chuckles 10:16:02 quartus: the forth system itself isn't too exciting, it is ultra-portable though :-) 10:16:10 I'm in favour of that. 10:16:19 it can BE, segher 10:16:20 yeah, me too 10:16:36 poppavic: ? 10:16:59 Anyway, for those of us who understand that a dictionary is the data structure that associates names with definitions and their attributes, the hashtable/wordlist thing is a very neat deal. 10:17:01 CAN be "ultra-portable" - it can also be another straitjacket 10:17:48 And he's already wearing two. 10:17:54 oh it's mostly ans forth, with some older stuff thrown in 10:18:10 Q: oddly, you admitted to wordlist as well as "hashtable", and I have to wonder how many jackets you are wearing. 10:18:25 segher: ahhhh 10:18:25 --- join: timlarson____ (n=timlarso@65.116.199.19) joined #forth 10:18:46 Yes, a dictionary can contain multiple wordlists. It's still the data structure that associates names with definitions and their attributes. 10:19:25 --- quit: timlarson_ (Nick collision from services.) 10:19:31 ok back 10:19:32 --- nick: timlarson____ -> timlarson_ 10:19:33 madwork 10:19:47 Aye 10:19:48 Quartus: the only reason I ever took exception to "dictionary" is that some imps see those as "the ram" - rather than wordlists, or heads or bodies, etc. 10:19:49 Not 'all of RAM', not some meaningless vague thing that can only be defined as 'semantics', but an actual thing, with boundaries, that can be queried meaningfully. 10:20:09 madwork i get the concept of a type-stack but i've been wondering how is RTTI associated with a particular cell on a stack? 10:20:45 Quiznos, I can only tell you how I'd do it. 10:20:51 k, go ahead 10:20:56 madwork: please! 10:20:59 Heh. 10:22:03 RTTI seems to imply any system of structs and code that can rebuild the "original" - whatever that is. 10:22:13 Well, the type stack would contain indexes into a list of type info structures, or even word headers. The structure/word would contain the cell count on the data stack, type name, and any other required info. 10:22:17 rtti == runtime type information 10:22:29 madwork wow that's complicated 10:22:39 yes, I know what they SAY, butg not what they might mean 10:22:52 Quiznos, you think? 10:23:20 It's just indexing into an array of type info. How's that complicated? Anyway, I haven't looked into how other Forths would do it. 10:24:00 madwork: it might well double an unstripped binary, but it is otherwise - seemingly- structural and OO(contextual+args) 10:24:08 seems like there are two ways to do it -- you have a type stack like you just described 10:24:08 one way i see for rtti to be captured is via the defining word 10:24:25 or you have "tagged" values on the data stack 10:24:34 tathi: yeppers 10:24:35 tagged is the problem i'm having 10:24:38 why no use tagged values instead of a separate type stack? 10:24:41 I can't see another way 10:24:44 tathi, well tagged is via the typestack 10:24:47 i want a solution that is easy and unobtrusive 10:24:55 Quiznos: nope 10:24:57 michaelw, how wide are your stack cells? 10:25:09 PoppaVic no what? 10:25:09 32 bits 10:25:16 Quartus, Quiznos it's a good system and then it gets through using only french void, I mean I can't understand it easily so. 10:25:25 madwork: Factor (for instance) doesn't have a separate type stack -- just uses a couple of bits for the tag 10:25:32 virl lol lagged? 10:25:38 think of push and pop of instances->types/interp->data 10:25:41 Ok, so the data stack is wider than just cell width. 10:25:56 no, same width -- you lose precision on your integers though 10:26:05 Ahh. That's acceptable? 10:26:06 and pointers have to be aligned, 10:26:06 see, that's a problem for me 10:26:10 And double-cell operations would become awkward. 10:26:14 lossing precision 10:26:16 yeah, I didn't say I liked it 10:26:24 I don't think Forths usually use it 10:26:32 when he would use both english and french it would be ok, but he uses most 99% of the time french in his source, I thank him that he made it only readable to french people and not me. 10:26:33 works better for object-based languages like Smalltalk or Factor or whatever 10:26:42 lemme qualify the problem better: 10:26:47 Either that, or make each stack cell a structure containing type info. 10:26:50 madwork: two tag bits should be enough, if you make 00 fixnums, you don't need to do anything special for arithmetic 10:27:07 Anyway, I get a hoot out of all this, because I live in ##C - that folks love to hate; and they often suggest LISP as The Solution. 10:27:24 words that expect stacked data, like +, just expect bits on the stack. it is we the coders who give context to the values on the stack 10:27:38 so, how can we transfer that context programmatically? 10:27:46 the context is rtti 10:27:49 Make a bunch of variations of + :) 10:27:50 Quiznos, what you describe requires no additional context. 10:27:57 f+ i+ fi+ if+ 10:27:58 umm.. sorta' context 10:28:11 yeah 10:28:14 madwork those are chosen at compile time 10:28:20 Yes. 10:28:40 we're discussing runtime choosing of words based on some criteria 10:28:46 + , etc 10:28:49 it could be int float string 10:29:07 Then you need a type stack, or structured data stack. 10:29:12 or some less concrete info about a words' or data's type 10:29:39 Quiznos: how much "English" do you recall from school? Verbs, nouns; subjects, adjectives, etc? 10:29:41 one more thing, this has a flavor of being rather oppee to me 10:29:49 PoppaVic much of it and learning still 10:29:57 Quiznos: it's fun - and makes you want to scream 10:30:00 heh 10:30:18 i do browse the online dictionaries 10:30:20 heh 10:30:48 as a basic RPN form, I'd think of SUBJECT [adjectives...] Verb 10:30:54 Anyway, if you store the RTTI in the dictionary, then you just need a type stack of XT's. 10:31:25 Quiznos, madwork is right, if you want to have type info with your stack items, you have to store the type info with the stack items. Sounds obvious written out like that, doesn't it? :) 10:31:32 madwork: good luck.. We are mostly not supposed to know about XT 10:31:40 [oopee] the runtime choosing of which word to execute based on the type of value on the stack plus the name of the word, ie, `+' is overloaded and the rtti is used to choose which +, int float dcell, to use 10:31:48 it's fun - and makes you want to scream? why should something which is fun makes you scream? since when is torture fun? 10:31:55 Quartus mayhaps 10:32:02 PoppaVic, you don't have to know about the XT directly. 10:32:22 madwork: usually 10:32:34 ..or you do and it ain't 10:32:42 i think i have a completely non-obvious answer to runtime word-choosing 10:32:49 madwork, that'd become cumbersome when dealing with, say, a separate floating-point stack. I'd think there'd have to be one unified stack in a typed system. 10:33:00 and it just requires one var or bit to be used 10:33:08 Quartus, yes, there'd definitely be one unified stack. 10:33:32 yep, I am targetting a OO stack. 10:33:38 --- quit: nighty_ (Read error: 113 (No route to host)) 10:33:42 Quiznos, can you describe what you're talking about? 10:33:53 --- part: rabbitwhite left #forth 10:34:00 --- join: nighty_ (n=nighty@66-163-28-100.ip.tor.radiant.net) joined #forth 10:34:01 The RTTI would indicate how many bytes each value reserves on the data stack. 10:34:10 (or bits, even) 10:34:14 sure, but i'm developing the idear in realtime so be mindful of that 10:34:23 You'd lose some handy things like adding a 0 on the stack to make a double-cell value. 10:34:25 sure, madwork - yer back to ABI and endian and order 10:34:39 PoppaVic, er, well not really. 10:34:53 Nothing at all to diw th ABI, endianness, or order. 10:35:09 well, mostly - this is why the lispers hate the forths and both hate C'ers, etc 10:35:10 (hmm, crumbs in the keyboard) 10:35:21 in pentium II class process and newer, there are two discrete sets of registers used with 3 porposes: whole ints, float and mmx/sse/etc 10:35:24 ain't this fun? 10:35:33 now the float and mms/sse regs are the same regfile 10:35:52 and the ax..dx/stk/str regs are most used 10:36:00 forget regs - we don't own regs and should not expect or own them 10:36:10 dont go there yet 10:36:21 in fact, purists will suggest you can live w/o registers 10:36:35 the mms/sse file are 80bit registers 10:36:42 and ax..dx etc are 32bit 10:36:49 or 64 or you have new hw 10:36:57 and the floats are umm i forget 10:37:05 don't CARE - talk about a struct and publishing. 10:37:10 move the forth vm to the mms/sse stack 10:38:12 Quiznos, I'm afraid I don't follow much of what you're saying. Can you take it back to the level where you've got a + in the code, and the code (at runtime) has to decide what operation to perform? 10:38:21 ok 10:40:03 the symbol + is overloaded somehow. at runtime, the outer interpreter determines the next word to exec 10:40:14 then has to determine what data the word requires, 10:40:28 Quiznos, I doubt the outer interpreter would be doing this. 10:40:34 ahhh 10:40:37 yes 10:40:38 ok.. that can be hashed later 10:40:43 You'd be using your RTTI to calculate data stack offset for the data. 10:41:11 and then choses the voc thread to get the word's addr to exec 10:41:15 Something does a parse and lookup of '+' - damn the leading and following delimits 10:41:27 ..found, it runs it 10:42:05 madwork but i'm not talking yet about the implementation of, just envisioning what should happen 10:42:11 Quiznos, that's a roundabout way of doing it. 10:42:22 yes but it's as far as i can go at this point 10:42:45 I've never seen yet a really good alternative to the ORDER stack, except maybe a context-ptr before. 10:42:55 AIIIIIIIIIIIIIIIIIIGH! 10:43:00 There. Better. 10:43:12 see with the idear about the regfiles above, and one in-cpu bit to be a flag to say which stack the data went 10:43:17 Quartus: you need more patience ;-) 10:43:30 that would be both a "look here" and a type-indicator 10:43:49 Quiznos, but that would only support int and float types. 10:43:56 Didn't you mention strings as well? 10:44:07 yes but strings could be address 10:44:20 and words always know what kind of data-args they expect 10:44:24 So a lonely + is in the run-time code... it has to go to one unified stack, grab the top two items, figure out how to add them together. Can't be multiple stacks, or how would + know which stacks to interrogate, and in what order? 10:44:55 * PoppaVic sighs 10:44:57 + would know which stacks to interrogate based on the type stack ordering. 10:45:01 only the ewil word / needs cells in a particular order to work rightly 10:45:18 madwork, that's still one unified stack, effectively. 10:45:23 iow, / is not associative 10:45:32 Virtually, but doesn't have to be physically. 10:46:00 physically nothwithstanding. I am asking because I don't understand how Quiznos wants to use one bit to determine which stack to use. 10:46:08 I'd spent about an hour talking about how lisp sees text/gather/run in ##C about two hours ago - it's NOT simple. It can be and should be, but - like people - it can't be. 10:46:17 Quartus gotta find a free bit first 10:46:27 --- join: slava (n=slava@CPE0080ad77a020-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 10:46:30 I'm not curious about where the bit lives. 10:46:42 Quiznos: evil-word is NOT TRUE 10:46:43 I'm curious about how you plan to use it. 10:46:44 but that matters for it to be fast 10:46:51 * PoppaVic sighs 10:46:56 Nope 10:47:00 Not even that 10:47:04 PoppaVic did i write the statement wrongly? 10:47:05 Implementation speed is independent of the method. 10:47:20 but a free bit that is flippable still needs to be found 10:47:30 and an on-cpu bit would be best 10:47:43 Great. Here's one right here on my desk. How do you plan to use this very nice, shiny, fast bit to do RTTI determination? 10:48:08 dont push too hard :) be gentle :) 10:48:20 this is all a thought in progress 10:48:48 SPEED is usually based on context, trust me: human interfaces are SLOW; you might parse/compile and reinterp pcode maybe 10 or 100 times slower than mc. Questions are all: what do you gain and lose? 10:49:06 agreed 10:49:30 even a 6502 can out-work flesh and bone 10:49:42 if you write something that generates pure, optimized mc - THERE - I expect it to shit and piss and spit before I can cough 10:49:50 lol 10:50:00 nice conjunction :) 10:50:18 No, it was ugly - I was just getting steamed 10:50:29 dont be. there's no need 10:51:11 Quiznos: I know, most of it is my trying to code, follow multiple threads and multiple channels - all in RT. 10:51:20 kk 10:51:31 Personally I've never wanted a typed Forth. I prefer that the type information be part of the code, abstracted at the appropriate level in the code. 10:52:05 Quartus: and thats fine, for _you_ and your apps. I feel the same about C. 10:52:45 Quartus yea, i can see that my difficulty in envisioning how this would be implementated foretells much mental anguish 10:52:48 Now, let's try to see whom does what to whom, where, what and why. 10:53:05 Quiznos: viewpoints can ruin yer day. 10:53:13 not mine 10:53:26 i don't see why people oppose types 10:53:34 slava: I agree 10:53:46 specific implementations might suck 10:53:48 i also flitted with pondering about dynamic types like what perl does tween numeric and string data 10:53:48 Quiznos: "..in envisioning..." 10:53:57 l 10:53:58 k 10:54:12 layers. 10:54:40 if all that is placed upon the stacks are addresses then what effect would that have on the internals? 10:54:47 It's ALL layers. I don't care whom sez what and where. Layers and SIZES and - then interpret them. 10:54:54 slava -- some issues: slower at runtime, requires a system for exceptions when trying to perform operations on incompatible types, limits some of the kinds of manipulations possible in an untyped system. 10:55:03 stacks are STILL INTERPRETED 10:55:09 no they arent 10:55:15 yes, they are 10:55:22 forth stacks are not executable, they only hold data 10:55:31 * PoppaVic sighs 10:55:31 Quartus: i'd rather have a nice type error message instead of a random crash, or incorrect output. 10:55:46 Quiznos: there is where you screwed up 10:55:49 slava, so would I. That isn't prohibited by an untyped system. 10:55:54 PoppaVic why? 10:56:21 forths expect you to pass args on the stack, right? 10:56:25 yes 10:56:37 Quartus: garbage collection is hard/impossible without types 10:56:48 since you need to know which cells are pointers and which ones are just data 10:56:53 PoppaVic wait a sec, no, words are written to FIND their required data ON the stack. 10:56:55 what is the diff betwixt size_t, unsigned and int? 10:57:24 slava, I'm no expert in GC, I'll take your word for it. 10:57:43 If I shove 4 random values on "the stack" - how does FOO know that? 10:57:46 PoppaVic the dependency is on the host processor - for gcc running on an pentium class cpu, one Cell 10:57:54 nuf? 10:58:00 Quiznos: nope 10:58:26 Quiznos: the cases yer speaking about suggest #openbios to me 10:59:26 continue pls 10:59:40 Quiznos: apparently, you think there is one and only one CELL size - which is already untrue under even classical forths 11:00:08 i know there are objects of different sizes. 11:00:13 that are stackable 11:00:16 ..and every word has to decide how it wants to INTERPRET the stack - as far as it cares to do so 11:00:21 no 11:00:33 those "objects" are not CELLS 11:01:07 ..not classically - Quartus? tathi? would you guys update him? 11:01:28 every word is writ by a coder who writes words with certain expectations of what's expected on the stack for the word to consume 11:01:57 Quiznos: not one of those words can TEST their expectations. 11:02:07 and? 11:02:21 you could have a stack of random numbers - they'd believe it 11:02:53 ..until they crashed. ANd I shudder to think of what they have done to the system 11:03:15 Vic, i think you went off the deep end with this line of reasoning, and lost me. 11:03:19 :) 11:04:38 Quiznos: the basic issue is a "stack of cells" - the CELL SIZE is an abi issue, sure - what is pushed has no bearing on a valid type. What is POPPED has just as little interest. 11:05:17 just because forths do ( n a c s -- ) - this means dick 11:05:31 i agree that coding is the concrete act of the coder and it is his perception of what is on the stack and how he threads the words together to incorporate what he wants to happen 11:05:38 factor can check stack effects at compile time, and types at run time 11:05:40 yer talking about comments, versus realities. 11:05:56 slava: well, I didn't like it - but SLAP HIM! 11:06:17 --- quit: PoppaVic ("Pulls the pin...") 11:06:38 bbl to continue if you're up to it. 11:06:46 what the hell was all that? Did the blood-vessel finally break? 11:06:46 tanks for this part. 11:06:51 heh 11:07:08 i think he went to far with the line of reasoning 11:07:10 --- join: PoppaVic (n=pete@0-1pool47-128.nas30.chicago4.il.us.da.qwest.net) joined #forth 11:07:17 Vic bbl. 11:07:24 thanks for the so-far 11:07:26 apologies, I hit the wrong keys 11:07:27 i think forth programmers obsess too much with low-level issues, constantly re-inventing basic things like string handling 11:07:30 s'ok 11:07:37 we were just musing in your absense 11:07:38 :) 11:07:44 ahh 11:07:46 heh 11:07:48 ttyl 11:07:55 sure 11:07:58 gone 11:08:53 slava: I think so, but I swear: "the basics" seem to be a real mess. I'm working on it. 11:09:27 slava, speaking for myself, I'm a Forth programmer and I spend very little time re-inventing string handling. I keep it down to a few minutes a day. :) 11:09:37 slava: worse: it seems to offend EVERYONES sensibilities. 11:10:09 Quartus: ascii? utf-8? unicode? something else? 11:10:41 Forth is the re-inventor's language. 11:10:57 I disagre 11:11:10 And I disagree with YOU! :P 11:11:18 --- quit: virl (Read error: 104 (Connection reset by peer)) 11:11:22 Forths are for folks that want to interact - then codify a solution. 11:11:26 Sure. 11:11:37 But also, the language is always changed in the process. 11:11:42 --- join: segher_ (n=segher@dslb-084-057-220-020.pools.arcor-ip.net) joined #forth 11:11:42 no 11:11:45 It's a bunch of words, after all. 11:11:46 Yes. 11:11:49 The processes are 11:11:50 You add words. 11:11:58 the order the compiles. 11:12:16 the interps 11:12:21 pickle pancake strawberry moonlight. 11:12:28 Quartus, exactly. 11:12:52 It's like having a rewritable preprocessor and language and vocabulary/semantic 11:13:06 Rewritable = reinventable. 11:13:13 ahh 11:13:14 Mold it to the problem. 11:13:18 Not mold the problem to it. 11:13:50 Anyway, must eat lunch and avoid any argument. ;) 11:14:06 Instead of a fixed cpp, and C std==FOO and SOURCE - we get the lot, all interactive 11:14:12 laters 11:14:48 I'm ready for a pre-dinner snooze myself 11:18:31 --- quit: segher (Read error: 110 (Connection timed out)) 11:21:54 --- quit: PoppaVic ("Pulls the pin...") 11:36:02 --- join: rabbitwhite (n=roger@136.160.196.114) joined #forth 11:36:48 --- quit: ayrnieu (Remote closed the connection) 11:36:51 --- join: ayrnieu (i=julian@ip68-13-114-58.om.om.cox.net) joined #forth 11:50:31 --- quit: nighty_ ("Disappears in a puff of smoke") 11:50:51 --- join: nighty (n=nighty@66-163-28-100.ip.tor.radiant.net) joined #forth 11:50:57 --- join: virl (n=virl@chello062178085149.1.12.vie.surfer.at) joined #forth 12:05:04 --- quit: ayrnieu (Remote closed the connection) 12:05:17 --- join: ayrnieu (i=julian@ip68-13-114-58.om.om.cox.net) joined #forth 12:09:03 --- quit: rabbitwhite (Read error: 104 (Connection reset by peer)) 12:28:49 --- quit: Shain (Read error: 104 (Connection reset by peer)) 12:49:00 --- join: snowrichard (i=snowrich@adsl-69-155-177-157.dsl.lgvwtx.swbell.net) joined #forth 12:49:10 hi 12:49:20 hello 12:49:46 --- part: snowrichard left #forth 12:50:54 Quartus, how does your xor'ed hashed vocabulary scheme work for nested vocabularies? 13:03:36 --- join: Quartus_ (n=Quartus_@209.167.5.1) joined #forth 13:04:36 --- quit: Quartus_ (Client Quit) 13:05:28 --- join: Quartus_ (n=Quartus_@209.167.5.1) joined #forth 13:06:42 timlarson, any progress on your tutorial? 13:07:02 Quartus_, how does your xor'ed hashed vocabulary scheme work for nested vocabularies? 13:07:20 madwork, nested how? 13:07:47 Quartus, I was working over the weekend on my little language, but another issue (feature I am trying to add) in it took up my time. 13:08:17 tim, ah. 13:08:19 so I got to add the second set of stacks but did not get to try coding with them yet. 13:08:26 Well, uh, a vocabulary only visible from within the scope of another. I figured you'd explain the how. ;) But I imagine it's just all unique wordlists... 13:09:19 All wordlists are theoretically visible from anywhere with the standard wordlist mechanism. 13:10:03 If you set up named vocabularies or modules, of course the names can live within other wordlists. 13:11:23 I make a lot of use of a simple module/public:/private:/end-module facility for named modules with private unnamed 'nested' wordlists. 13:11:44 Right. I'm still wondering how xoring a hash key with a wordlist number won't potentially cause a collision with keys from other wordlists... 13:11:56 And named modules themselves can be nested. 13:12:18 madwork, how do you think collisions could occur? 13:13:17 xoring a key with a number produces an identical key from another wordlist. 13:13:19 Take the simple case of a name 'foo', imagine it hashes to a value of 1. Now add it to a two-bucket hashtable, first with wordlist 0, then with wordlist 1. 13:14:26 All words in the chain in a given bucket have the same hash, modulo the hashtable size. Disambiguation is via string matching on the name. 13:15:56 Oops, losing power here, back soon! 13:18:40 if I've still got battery life -- the same name, added to different wordlists, cannot wind up in the same bucket. 13:23:25 OK, so you've got a separate bucket for each wordlist. 13:24:03 Right. Put another way, your wordlists max is the number of buckets in the hashtable. 13:25:00 OK, so it's a double hash. The wordlist 'index' isn't xor'ed with the word's hash value to produce some unique key... 13:25:33 yes it is. 13:26:21 well, it's not necessarily 'unique', as such, it can't be a perfect hash, with or without wordlists. 13:26:28 Right. 13:26:42 But unique to the set of wordlists (apparently). 13:26:59 yes. Single hash. 13:27:26 Ok, back on mains power. :) 13:28:23 Unique for any given name for the set of wordlists (a.k.a the hashtable size). 13:28:26 I just don't see how you can avoid hashing 'foo' to some key value, xoring with the wordlist index (as I understand it) to get 1, and then not potentially get the same value by xoring 'bar' with wordlist 2, producing a hash value of 1 as well. 13:28:36 But, perhaps me-tarded. ;) 13:28:53 Of course you can. Each hashtable bucket holds a chain; the chain holds all words with the same hashvalue (modulo table size). 'foo' and 'bar' may well co-exist. 13:28:58 In a given chain. 13:29:14 How is that a problem? 13:30:27 Does the chain contain all words of the same wordlist? Or are you xoring the hash value with the power-of-two-minus-1 hashtable size to get the wordlist ID back? 13:30:59 Neither. A hashtable bucket holds all words that hash (xor'd with wordlist) to that bucket. 13:31:34 Well, to be pedantic, the chain (linked list) linked to that bucket holds all those particular words. They may be from many wordlists. 13:31:41 OK. 13:32:40 The wordlist ID of any given word is not stored, except by virtue of the position of the word in the hashtable. Perhaps it could be retrieved through binary manipulation based on the hash; I've never tried. 13:33:14 So, you XOR the hash value with the bucket ID to get the wordlist ID. 13:33:35 I think that'd work, but if there are any bugaboos in so doing I've never encountered it -- I have no need to retrieve the wordlist ID. 13:34:44 You might want to in order to implement WHICH functionality. 13:34:52 What does WHICH do? 13:35:08 Gives you a wordlist/vocabulary path for a word. 13:35:27 which baz 13:35:35 foo:bar:baz 13:36:07 That presupposes a search mechanism that can search the whole dictionary irrespective of wordlists, and also the presence of a named vocabulary facility. 13:36:53 Neither are impossible, but I don't provide either. 13:37:11 I assume WHICH would return only the most recently defined baz? 13:37:51 Oh, how entertaining, it seems I do retrieve the wordlist value by xoring the bucket & hash in WORDS. :-D 13:38:03 I had forgotten. 13:38:36 So based on that, WHICH wouldn't be tough to write, though again you'd wanted named vocabularies to get much productive use out of it. 13:39:42 Named vocabularies also not tough to manage. Were I to implement, I think I'd add all the vocabulary names to their own wordlist, and walk that to map wordlist ID back to a name. 13:40:45 I looked at one gforth's way of doing named vocabularies -- I think the next CREATE'd word was the one referenced for a name for a wordlist. Seems a bit clumsy to me, but perhaps it works out fine in practice. 13:42:27 You know, before I checked my sources, I would have said that I was doing WORDS by searching for each name within the particular wordlist to see if it matched. At some point I might have done so, but then realized the xor WID extraction was more sensible, but the earlier memory is the one that stuck. Heh. 13:42:48 Heh. 13:43:01 (sorry, was afk) 13:43:05 No worries. 13:43:30 At any rate, from my personal experience, I use named nested modules rather than named wordlists. I find it works very well. 13:44:13 What's the difference? 13:44:31 * madwork has implemented a pure named vocabularies mechanism. 13:44:33 I can wrap somebody else's library code with a module ... end-module, and then make public: only those words that I need to use later on, the rest are hidden from view. 13:44:46 can you call private words? 13:44:49 Ahh, right. How does the name come in to play? 13:45:13 so what was it slava what you wanted to ask me? or something like that. 13:45:21 All public: words in a module can transparently see all private: words in that module in the module's context, and you can open a module by name later (expose-module) to get at its private namespace. 13:45:55 virl: i wanted to tell you that factor 0.83 bootstrap is about 4x faster than in 0.82. it finishes in 2 and a half minutes on my power mac 13:46:49 ok, then I recompile it here and yeah. 100% faster than compiling gcc. 13:47:00 expose-module adds the private wordlist for the module to the search-order until you remove it. 13:47:13 virl: 0.83 is not out yet, the code is in darcs 13:47:23 i'm waiting for a contributor to finish the windows port 13:48:09 Quartus, are the public words actually attached to the module, or are they exposed/defined for the next wordlist on the context stack/list? 13:48:23 Public words go in the prevailing current wordlist. 13:48:32 Only the private words are associated with the name. 13:48:49 so.... 13:48:59 So when defining private words, the current wordlist is not actually the wordlist of the current module? 13:49:26 When defining private words, the current wordlist is the private wordlist of the enclosing module. 13:49:48 When defining public words, the current wordlist is the prevailing current wordlist that was active outside of the enclosing module. 13:49:50 To illustrate: 13:50:02 well. and I give xell another try. 13:50:10 So, next on the "stack" so to speak. 13:50:19 : foo ; module baz private: : gah ; public: : bar gah ; end-module 13:50:43 foo and bar are in the same wordlist. gah is in the private wordlist associated with the module named baz. 13:51:42 Is it possible to nest modules? 13:51:47 Yes. 13:53:23 It gets difficult to describe, but easy to use. For instance, the public words in a module defined in the private context of an surrounding module are private to the surrounding module. Hairy to describe but straightfoward in practice. 13:53:46 Makes sense, when looked at simply as nested vocabularies. 13:54:26 ok, now hitting 'enter' 13:54:40 It's convenient. Make it simple, for instance, to load a library twice, each time with different prerequisites set up, and expose its public facilities twice under different names. 13:54:50 Yep. 13:55:15 And I like the syntax. A significant reduction in ALSO ONLY PREVIOUS and so forth. 13:56:13 Right. Yes, I came up with a nice syntax for this as well, using { and } as ALSO and PREVIOUS. Vocabularies are defined as words, and they are immediate ( as are the { } words). 13:57:06 The virtue of it not being nested vocabularies, as such, is that if you had module foo private: module bar private: module baz : gah ; end-module end-module end-module you could get at baz's gah with a simple 'expose-module baz'. Module names would need to be unique, of course, or you'd only get the most-recent baz. 13:57:59 Yep, handy shortcut. 13:58:28 With my scheme, I'd have to use { FOO BAR BAZ ... } to get at BAZ. 13:59:14 Yes. Mine works in a Standard Forth wordlist/search-order framework. In fact I have a portable ANS version of the module/end-module facility kicking around somewhere. 14:00:49 I'm completely non-ANS for mostly everything, heh. 14:01:24 My Forth is a Standard Forth, with extensions. I've made use of other people's Standard Forth code quite a lot, I'm strongly in favour of it. 14:01:26 But actually, you can implement an ANS-ish Forth language with my VM. 14:02:00 Good stuff. Well, I think it makes sense for your environment, of course. 14:02:42 Personally, I spent very little time considering Forth until the standardization process began. Had no interest in having to re-learn it in each environment I might use. 14:03:40 and finished 14:03:44 One place I put the module facility to good use was in wrapping the Standard floating-point output facility (on comp.lang.forth a few months back) so that it would work with more than one kind of floating-point representation in Quartus Forth. 14:03:57 well, this time factor has a good compilling speed. 14:04:04 7 minutes? 14:04:11 yep. 14:04:32 i'll keep working on it in later releases. 14:04:47 --- join: madwork_ (n=foo@derby.metrics.com) joined #forth 14:05:20 Argh. Network problems. Time to go home anyway. So long for now. 14:06:11 k. 14:06:45 --- quit: timlarson_ ("Leaving") 14:07:25 hmm.. the gui .. could it be that you wrap text into own objects? 14:08:45 is there a problem? 14:11:33 hmm.. it's interesting in some gui windows it's faster and in others it's slower, for example the boxes around links appears slower in memory window iirc 14:13:19 i've identified several bottlenecks in text rendering, i'll be doing some compiler work in 0.84 to speed that up 14:13:28 also repainting only the dirty region instead of the whole window each time will help 14:14:31 so looking at the exposure event region in each X exposure event ;-) 14:17:06 hmm, Factor seems to evolve into squeaky direction, well it has perhaps same problems. 14:17:18 I don't know so I'm on it 14:19:49 what are the problems in squeak? 14:20:32 well. look at the gui of it, it's something you can't understand really. 14:20:53 iirc, it's called morph or something like that 14:20:58 --- quit: tathi ("leaving") 14:21:06 squeak's gui is quite complex 14:22:35 --- quit: madwork (Read error: 110 (Connection timed out)) 14:23:31 what's the gadget thing? 14:23:57 a gadget is a rectangular region on the screen that can paint itself and respond to events. 14:40:29 i just read the scroll since i left, and guys, i gotta say "wow" on the thread about vocabularies! that's excellent, and i have it logged! thanks very much! 14:42:02 see, one of the things that i keep reminding myself is to `make things as simple as possible and no simpler' 14:42:04 I continue to be pleased with the free wordlists that come of the hashtable technique. Seems too good to be true. 14:42:14 i like my vocabulary setup 14:42:28 you're beleiving for a BUG? :) 14:42:31 that's funi 14:42:40 there's a global hashtable mapping vocab names to vocabs. each vocab is a hashtable mapping word names to words. 14:42:40 bug? 14:42:43 no 14:42:45 BUG! 14:42:47 heh 14:42:51 What are you talking about? 14:43:09 its much simpler than this stuff with threads, xor hash, etc. it seems like a workaround for the lack of an object/type/GC system. 14:43:13 that you cant believe something is so good 14:43:26 ...how does a bug figure into that? 14:43:38 you cant believe it's that good 14:43:44 You said that. 14:43:45 it's what you just wront 14:43:47 wrote 14:43:59 I know I wrote that. WHAT THE HELL DOES THAT HAVE TO DO WITH A BUG? 14:44:00 "seems too good to be true" 14:44:04 nm 14:44:37 Is what PoppaVic drinks now on the open market? Sheesh, man. 14:44:55 its always been on the open market, its called "drain cleaner" 14:45:08 If it were drain cleaner, it would have removed the plug by now. 14:46:04 slava, a Standard Forth system doesn't have a type system or a GC system or an object system, though I'm not sure how any of those three would aid in the low-level implementation of a dictionary. 14:46:28 did you read my description of factor's dictionary? 14:46:42 Yes. Hasthables. Mappings. 14:46:43 its a hashtable where the keys are vocab names, and the values are hashtables (mapping word names to words) 14:46:47 names are just strings 14:46:53 Names are always just strings. 14:47:12 Nothing in that description mentions, or would appear to depend on, a type system, object system, or GC system. 14:47:59 hashtables, strings, words and word definitions are data types. 14:48:11 Yes. 14:48:21 the GC just helps with issues such as what to do if the user removes a word or a vocabulary. 14:49:12 Ok. I'm not getting how a hashtable/wordlist system as I described seems like a workaround for an object system, a type system, a GC system, or any combination of the three. 14:49:28 because your hashtable is not reusable outside of the dictionary. 14:49:39 can you make a hashtable whose keys are user defined types? 14:50:04 that exists outside of the dictionary, as an object pointed to by a stack cell or variable 14:50:13 Sure, in Forth itself. The dictionary hashtable and its operators are optimized specifically for dictionary use. 14:50:30 but what if one doesn't want to use the dictionary. 14:51:04 Then use something else. I'm afraid that the answer is too obvious, perhaps I don't understand the question. 14:51:21 right, you cannot reuse the hashtable you implemented. reuse is one of the advantages of having a formalized type and object system. 14:52:04 The dictionary being a special case, I want it optimized along very specific lines, from the hashfunction on down. Generalized hashtables I'd build in Forth, tuned to a given application. 14:52:32 so you'd duplicate code. in factor, there is only one hashtable, one string type, one array type, and so on. 14:52:44 There is no universal-best-fit hashfunction, for instance. And I may want dynamically resizable hashtables, or something else. 14:52:47 slava url to Factor please? 14:52:57 http://factorcode.org/ 14:53:02 ty 14:53:08 if you want to try it, i suggest the code from darcs rather than the latest release, which is quite old. 14:53:39 slava is there a significant difference tween the darcs-code and non-darcs code? 14:53:51 Also, the dictionary (at least in Quartus Forth) lives in and uses memory spaces not generally accessible to an application, for reasons specific to the implementation, so that's another reason. 14:54:16 Quiznos: improved performance, better documentation, bug fixes. usual stuff you'd expect to see between two releases of a 0.x-version program. 14:54:26 okidoke ty 14:54:26 Quartus: fair enough. 14:54:42 Forth could be used to create a templated hash table supporting different "types" of keys or values. 14:54:59 right. 14:55:10 A general-purpose hashtable routine, good enough for initial use as a library at least, wouldn't be a lengthy bit of code. I did some work on a portable library of that sort awhile back, I should find it and dust it off. 14:55:16 but it boggles my mind why forths are not implemented with a core set of data structures, which are then used to build the dictionary, TIB, etc. 14:55:39 instead the dictionary, parser, TIB and so on are hand-coded and are not reusable for general mappings, string manipulation, and so on. 14:55:39 slava, because generic code is bloatier than specific code. 14:55:44 slava, it doesn't boggle my mind. Moore's explicit advice was never to build for the general case. 14:56:32 It's hard to follow the KISS principle with generic solutions as well. 14:56:52 not really. with a hashtable, the only 'genericity' you need is equality testing and hashcode generation 14:56:53 But to take a specific, see my concerns above about the nature of something as simple as a hashtable implementation -- there is no universally-good solution even for something like that. 14:57:29 Quartus, you use a chained hash table? Do you allocate or allot the memory for new nodes? 14:57:38 speaking of moore, i'm skeptical that something as stripped down as colorforth can be used to build useful applications 14:58:02 madgarden, yes, what they call 'external chaining', and headers are allotted in a special headerspace. 14:58:04 slava, probably not for you. 14:58:37 But programming is as much about personality as any other principle. 14:58:56 So, there's never any point in arguing about it. :) 14:59:05 Quartus, do you resize the table at any point? 14:59:18 madgarden, no, though it wouldn't be hard to. 14:59:24 --- join: I440r (n=mark4@24-177-235-246.dhcp.gnvl.sc.charter.com) joined #forth 14:59:27 ie. at a certain chain depth, etc. 14:59:28 You'd have to go back and rechain everything, of course. 14:59:32 Yea. 14:59:49 * madgarden is going to be adding hashed dicts and values soon. 14:59:58 I've tested to maximum capacity and the compilation speed is still dandy without resizing the table, so I didn't. 15:00:00 Right now I just use a linear lookup for the dictionary. 15:01:36 As I recall, lookup requires 1/2-average-chain-length number of string comparisons, and I have optimized the dictionary's caseless string-compare routine quite heavily. 15:01:56 comparing sequences for equality is another operation that is better generic 15:02:31 Well, see what I just wrote. I don't just check for equality. My Forth dictionary requires a caseless compare. 15:02:59 And accent-less, actually. Quite specific to the international characters provided in different builds of the OS. 15:03:01 a sequence compare with a user-specified equality tester, like in common lisp will do. 15:03:32 It would 'do', for some values of 'do'. It'd be slower, and on platforms without amazing horsepower, cycles count. 15:04:04 would it be slower than loading redundant word definitions several times, which duplicate the same logic with a minor detail changed in every case? 15:05:59 Point being that while there may be some similar functionality inherent in both the dictionary's use of a hashtable, and an application's use, both are specifically tuned for different purposes. Providing one routine with user-vectored hooks for comparison, hashfunction, etc. would work, but there would be tradeoffs. 15:06:27 --- quit: Ray_work ("User pushed the X - because it's Xtra, baby") 15:06:33 with an inlining compiler, the performance would be identical since the hooks would be copied in. 15:08:23 i just don't see the point of asking an application developer to write their data structures from scratch every time 15:08:28 Perhaps that's theoretically achievable. In my environment I am also limited by both the cycles available for optimization, and the memory available, so large-scale inlining isn't a good option. 15:09:02 There's no need for an application developer to re-write from scratch each time. He can work from library code. 15:09:10 high performance lisp systems were developed on systems much more limited than a palm. 15:09:42 Yes they were. I don't see how that's relevant. 15:09:50 it shows that its possible 15:10:04 It was possible to build Forth for those platforms, too. 15:10:40 lisp is higher level than forth, though, and better suited for application development 15:10:54 I am not at all clear what you mean by 'high performance', in any kind of objective sense. I don't have Forth vs. Lisp benchmarks for ancient hardware at hand. 15:10:57 precisely because it offers generic facilities and promotes code reuse, rather than hand-coding data structures from scratch 15:11:07 That's a matter of opinion, slava. Not everybody is in love with Lisp. 15:11:19 what I mean is compilers which optimize away the overhead of type systems, objects, GC, and so on. 15:12:06 Every compiler has its design goals, optimization strategies, etc., and one would hope does whatever can be done on any given platform to optimize code in line with those goals. 15:12:08 --- quit: Quiznos (Client Quit) 15:13:57 --- join: vatic (n=charlest@pool-162-83-254-201.ny5030.east.verizon.net) joined #forth 15:13:59 On one platform, compilation time and memory may be abundant, while the target resources are constrained; on another, they may both have constraints. 15:14:11 And so on. 15:14:21 doesn't mean you have to sacrifice something as fundamental as a generic hashtable or sequence to get good performance. 15:15:59 Depends on what you mean by 'good performance'. Speaking just as vaguely, there may well be a gap between 'good performance' and 'best performance', for a given set of criteria. For something as critical as compilation time on a handheld device, my criteria demand a hand-optimized specific routine. Could I also provide a generic hashtable faciltiy? Sure. 15:16:35 I'd do that in high-level code. 15:16:56 Portable unless there is some really compelling reason for non-portability. 15:17:15 --- join: Quiznos (i=1000@69-168-231-199.bflony.adelphia.net) joined #forth 15:20:50 I do export the optimized versions of both the case(etc.)-insensitive and case-sensitive hashfunction that the kernel uses. I'm certainly not against reusability, but I do believe it's important to decide what the best approach is on a case-by-case basis. 15:26:25 yeah 15:28:34 slava ? 15:28:41 yes? 15:28:53 I'd be surprised if an application actually needed a hashtable that is optimized for multiple wordlists, too. I'd expect multiple hashtables to be more appropriate in general terms, especially if you're working blind, with a black-box data structure provided by the language. 15:29:03 hi, the latest version of factor listed on the site is 0.82, is that a preferred version? 15:29:14 no, the preferred version is the code in the darcs repository 15:29:19 ok 15:38:09 good evening 15:38:16 hi crc 15:40:26 bit-error!!! :) 15:41:11 Quiznos, in one of Heinlein's books he suggests there are two kinds of jokes, "funny once" and "funny always". That one is neither. :) 15:41:31 kill joy :) 16:00:19 --- join: rabbitwhite (n=roger@136.160.196.140) joined #forth 17:03:54 --- quit: rabbitwhite () 17:08:16 --- quit: slava () 17:23:02 --- quit: Quartus_ ("jmIrc destroyed by the OS") 17:25:02 --- join: Quartus_ (n=Quartus_@209.167.5.1) joined #forth 17:38:48 --- quit: Quartus_ ("jmIrc destroyed by the OS") 17:50:22 slava? 17:50:49 slava is offline 17:51:25 thanks, made a memo instead 17:53:45 yay :) I figured out how to get stuff into the ion3 statusbar 17:53:51 woot 17:54:16 and I got my irssi activity monitor in there 17:54:27 woot woot 17:54:36 whats ion3 ? 17:54:48 I440r: window manager 17:54:48 a light wm for x11 17:55:07 oh. i only use windowmaker 17:55:14 or, ratpoison, icewm, wmii 17:55:34 in ion most I tried quite a few window managers 17:55:37 until I found ion 17:55:41 now I'm happy 17:55:43 coo 17:55:58 haven't tried windowmaker I don't think 17:56:53 everything comes up fullscreen always except for the row of tabs accross the top and the statusbar at the bottom 17:57:12 cool 17:57:13 except on desktop #3 where it pretends to be a normal window manager 17:57:17 is it kbd saavy? 17:57:25 i'm not a mooser at all 17:57:26 yes 17:57:28 coo 17:57:37 no mouse required 17:57:42 moosing for anytime bothers my wrist 17:58:33 I use the mouse for browsing with graphical browsers mostly 17:58:44 and copying 17:58:47 i cant even do that for long 18:09:10 I should learn to browse without the mouse 18:09:18 konqueror has a very nice feature for this 18:10:00 press and release ctrl and it puts a picture of a letter key by each link 18:10:41 cool 18:50:07 --- quit: I440r ("Leaving") 19:04:41 --- quit: uiuiuiu (Remote closed the connection) 19:04:42 --- join: uiuiuiu (i=ian@dslb-084-056-234-092.pools.arcor-ip.net) joined #forth 19:36:25 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-142-174.pools.arcor-ip.net) joined #forth 19:44:44 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 19:44:50 --- nick: snoopy_1711 -> Snoopy42 19:56:54 --- join: ttuttle (n=tom@unaffiliated/ttuttle) joined #forth 19:57:03 Hello. 20:08:42 --- join: slava (n=slava@CPE0080ad77a020-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 20:09:34 Hi ttuttle. 20:09:40 hi Quartus 20:09:49 hi slava 20:09:52 Hi slava. 20:10:02 hi ttuttle 20:10:05 Quartus: do you use a keyboard to input forth? 20:10:11 Quartus: or is grafitti sufficient? 20:10:43 slava - I get by with the fitaly keyboard and some shortcuts. 20:16:46 slava, I use both. Keyboard when I think to bring it with me, graffiti otherwise, or if I'm somewhere the keyboard wouldn't be convenient. 20:17:30 what do you write code in? 20:18:14 Two options for Quartus Forth: you can use the built-in memopad app, or use a Doc-file editor for longer sources. 20:18:25 have you ever thought of writing your own editor? 20:18:29 with cross-referencing features and so on? 20:18:32 it would be neat on a handheld 20:18:44 It might be. I haven't ever sat down to design such a thing. 20:19:38 --- quit: vatic ("Chatzilla 0.9.71 [Firefox 1.5.0.4/2006050817]") 20:22:42 slava, is that how your editor works? 20:22:49 Quartus Forth also works with 3rd-party memo-style editors. You can configure where it looks for files. 20:22:56 madgarden: there's no factor editor (yet) 20:23:28 madgarden: there will be one eventually. it will edit syntax tree objects, only using source to import and export code. you won't be able to make a syntax error. 20:24:03 Well, I'll sure as hell try! ;) 20:24:44 Can you extend the syntax/compiler in factor as in regular Forths? 20:25:05 you can define parsing words, and you can extend the compiler. the two are separate 20:25:17 Because I wonder how input-parsing words such as : or defining words would factor into this scheme. 20:25:23 the compiler processes a syntax tree that was read by the parser, its not a one stage process 20:25:28 So, would you have to define edit-time semantics? 20:25:32 : reads the next token from the input stream, pushes it on the stack 20:25:42 sucessive words are added to a vector of parsed objects 20:25:44 Ah. 20:25:51 ; takes the contents of the vector, and the word left on the stack by : 20:26:00 it adds a word definition to the dictionary 20:26:08 which is a hashtable, etc etc 20:26:12 Right. 20:26:39 the compiler is invoked by entering \ foo compile, where foo is a word. \ is a bit like ', in that it pushes the word following it on the stack (not the XT, like ' in forth) 20:26:56 Vector of "parsed objects." 20:27:12 madgarden: eg, { 1 2 3 } is parsed as an array containing three integers 20:27:21 OK. 20:27:25 while its being parsed, the parser appends tokens to a tree 20:27:38 words like { and } add branches, conceptually. really its just nested arrays. 20:28:08 instead of 'compiling' the address of a word or 'lit', the parser adds a word object or a number object to an array on the stack. the parser loop is very similar to forth. 20:28:29 its also similar to forth in that the parser only understands words and numbers. strings are read by a parsing word, just as in forth. 20:28:45 Are those arrays the final form of the "compiled" code? 20:28:51 no 20:29:02 slava, space-delimited? 20:29:03 the 'compile' word takes a word definition and compiles it to machine code. 20:29:17 Oh, cool. 20:29:26 no, not space delimited. everything is a pointer, except for integers. 20:29:46 Well, I mean space-delimited parsing of words. 20:29:58 so when you have a string in your input, the parser allocates a blank string (which is a block of memory with a header), copies the characters there, and deposits a pointer to this object in the parse tree. 20:30:00 Or, can you define delimiters and such. 20:30:09 Right. 20:30:12 yes, space delimited. I do make an exception for " so that "hello world" parses. however " is a colon definition like any other. 20:30:44 however, this only applies if " begins a token. 20:30:46 OK. " is special-cased, or you can special-case any such words to act as smart delimiters? 20:30:52 Gotcha. 20:30:56 you can define a parsing word named FOO", and you have to write FOO" blah blah". 20:31:26 its a special case. i haven't found the need for custom delimiters and i'm not sure how it would work if two loaded libraries clashed in some way. 20:31:53 I guess that's fair. 20:31:54 for example, if one piece of code makes ' a delimiter, and someone else defines a word named foo'bar. do you parse that as foo, and then call ', or is it foo'bar 20:32:03 i believe ciforth supports this feature 20:32:15 they use it as a trick to parse decimals 20:32:29 so that 123.022 parses as if it was 123 . 022, and . takes the last integer read, reads another one, and builds a float. 20:32:33 IIRC 20:32:49 ciforth has a vocabulary of single-character words and its NUMBER? uses them 20:32:51 Heh. 20:32:55 ayrnieu: ah. 20:33:02 yikes. 20:33:14 my number parser is completely hard-coded. its so simple and trivial, that its not worth making it extensible. 20:33:39 if somebody wants currency syntax or something silly like that, they can write their own routine :) 21:09:11 --- quit: ttuttle ("leaving") 23:21:28 --- quit: slava () 23:49:15 --- quit: Quiznos ("Read error: 42 (Excessive primes found)") 23:49:24 --- join: Quiznos (i=1000@69-168-231-199.bflony.adelphia.net) joined #forth 23:59:59 --- log: ended forth/06.07.24