00:00:00 --- log: started forth/10.02.21 00:05:33 There doesn't seem to be an unhide option. 00:05:49 Because if it is hidden, then you cannot get word to unhide. 00:06:07 SO I should be able to implement hide by simply making the defintion name null. 00:45:53 --- join: qFox (~C00K13S@5356B263.cable.casema.nl) joined #forth 01:09:17 --- join: kar8nga (~kar8nga@jol13-1-82-66-176-74.fbx.proxad.net) joined #forth 01:09:49 --- quit: kar8nga (Remote host closed the connection) 01:10:14 --- join: kar8nga (~kar8nga@jol13-1-82-66-176-74.fbx.proxad.net) joined #forth 01:12:50 --- join: GeDaMo (~gedamo@dyn-62-56-89-110.dslaccess.co.uk) joined #forth 02:42:53 --- quit: kar8nga (Remote host closed the connection) 03:34:04 --- join: kar8nga (~kar8nga@jol13-1-82-66-176-74.fbx.proxad.net) joined #forth 03:51:07 --- quit: TR2N (*.net *.split) 03:51:07 --- quit: schme (*.net *.split) 03:51:08 --- quit: gnomon (*.net *.split) 03:51:24 --- join: TR2N (email@89.180.230.255) joined #forth 03:54:51 --- join: schme (~marcus@c83-254-198-4.bredband.comhem.se) joined #forth 03:54:51 --- quit: schme (Changing host) 03:54:51 --- join: schme (~marcus@sxemacs/devel/schme) joined #forth 04:19:10 --- join: gnomon (~gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com) joined #forth 04:48:36 --- quit: GeDaMo (Quit: Now I lay me down to sleep; Try to count electric sheep) 05:32:17 --- quit: kar8nga (Remote host closed the connection) 05:59:00 --- quit: mathrick (Ping timeout: 260 seconds) 06:44:46 --- join: mathrick (~mathrick@users177.kollegienet.dk) joined #forth 06:52:08 --- quit: gogonkt (Ping timeout: 256 seconds) 06:53:47 --- join: gogonkt (~info@59.38.223.161) joined #forth 07:57:33 What would be the benefit of having a word hidden? Is this so you can manage the namespace seen by application user? 07:59:11 That sort of thing is usually done with vocabularies. 08:01:41 According to McCabe, "each vocabulary acts as a separate dictionary that can be individually searched or expanded." 08:02:02 Everything that your system starts up with is part of vocabulary FORTH. 08:02:39 You create a new vocabulary by saying 08:02:50 VOCABULARY IMMEDIATE 08:03:50 You can have as many vocabularies as you want, and they're all chained together in a lined list (not the linked lists that chains names together; this is a separate one built in the parameter field of the vocabulary words). 08:04:18 Only one vocabulary at a time can receive new definitions. You select one by saying 08:04:26 DEFINITIONS 08:04:57 I think that causes the parameter field address of that vocabulary word to get stored in a variable called CURRENT. 08:06:54 When you execute a vocabulary name it becomes what's called the "context" vocabulary, which means it gets searched first when Forth tries to look up a word. 08:07:53 I'm not an expert in this area, and I don't know that this is a terribly "agreed upon" part of how Forth works, though I'm sure the "standard" specifies it in some way. 08:09:21 I don't know if you first search the context vocabulary and then search FORTH, or if you just chain back into the main dictionary at the point where the context vocabulary word was defined. 08:09:39 That last way seems reasonable; it would work like this (if I can get this to draw right) 08:10:03 w1 --- w2 --- w3 --- vocab word --- w4 --- w5 --- w6 08:10:18 | 08:10:30 + 08:10:55 ------ vw1 --- vw2 --- vw3 08:11:02 Sorry, that's a bit sloppy, but maybe you get it. 08:11:32 so execution of vocab word would cause the search to start with vw3. Then it would check vw2, vw1, vocab word, w3, w2 w1. 08:12:02 On the other hand, you might want it to go to w6 after vw1. 08:12:34 Anyway, to make words available for building your system but then hidden you just stick them in a vocabulary that doesn't get searched when the user is working. 08:14:48 Ok, I got some of that wrong - see this web page, where vocabularies and lots of other stuff are described. This looks pretty old -- a lot of things may have changed over the years. 08:14:51 http://www.jimbrooks.org/web/forth/forthInternals.php 08:19:33 I used to fret over ways of being able 08:20:04 --- quit: KipIngram (Quit: WeeChat 0.2.6) 08:20:34 --- join: KipIngram (~kip@173-11-138-177-houston.txt.hfc.comcastbusiness.net) joined #forth 08:21:16 Sorry; I hosed my chat app. 08:21:44 I used to fret over wanting to set up a search list over an arbitrary number of vocabularies, but I don't know if the standard supports that. 08:26:44 --- join: ASau (~user@83.69.227.32) joined #forth 08:29:08 --- join: GeDaMo (~gedamo@dyn-62-56-89-110.dslaccess.co.uk) joined #forth 08:32:50 --- join: Maki (~Maki@dynamic-78-30-167-37.adsl.eunet.rs) joined #forth 08:41:20 Dobryj vecer. 08:42:11 --- join: tathi (~josh@dsl-216-227-91-166.fairpoint.net) joined #forth 08:43:44 KipIngram: I didn't read through all that, but... current systems have a stack of wordlists which are searched in turn (from the top down) until the name is found. 08:45:49 Yeah, that's what I always wanted. Sort of like a vocabulary stack. 08:46:42 yup 08:49:27 It's amazing how primitive the early Forth systems were. :) 08:50:08 Actually, it's amazing how primitive current Forth systems are, too. ;) :( 08:53:59 Yes, but it's amazing what you can do with even those early Forth systems. And that very primitive attribute makes them easy to create, easy to understand, etc. 08:54:01 --- join: erider (~chatzilla@pool-173-69-160-231.bltmmd.fios.verizon.net) joined #forth 08:54:04 It's amazing how some people try hard to solve irrelevant problems in Forth. 08:54:10 --- quit: erider (Changing host) 08:54:10 --- join: erider (~chatzilla@unaffiliated/erider) joined #forth 08:55:34 ASau for example? 08:57:03 For example recent UTF-8 stuff. 08:59:19 ah I see 09:00:02 I don't say it shouldn't be solved, I object the form. 09:00:59 "Standard" without any existing practice, 09:01:27 with major drawbacks in interface, 09:01:58 and written like its author never attended high school. 09:04:42 sounds pretty bad 09:05:19 And that's while we have more immediate problems. 09:05:30 Like maintaining separate name spaces. 09:06:18 Ah, yeah! I've completely forgotten. 09:06:22 How is that a problem? 09:06:27 And STRING PROCESSING TOOLS! 09:06:39 :D 09:06:43 hehe 09:07:45 tathi: there's common problem of local definitions. 09:07:54 I know at least 5 different approaches. 09:07:58 Ah, right. 09:08:38 This is the domain asking for standard instead of UTF-8. 09:08:45 --- join: tgunr__ (~tgunr@cust-66-249-166-11.static.o1.com) joined #forth 09:10:27 tathi: I've got quite dizzy idea. 09:10:52 Notice that modern hardware is 32-bits at the very least. 09:11:01 2 cells makes 64 bits. 09:11:42 This makes space for IEEE double precision number. 09:21:35 yes 09:22:09 sorry, was afk there 11:23:34 --- join: Quartus` (~Quartus`@74.198.8.58) joined #forth 11:27:17 --- quit: Snoopy_1611 () 11:29:28 --- quit: Al2O3 (Quit: Al2O3) 11:34:07 Is it correct to think that only DOCOL puts addresses on the return stack? 11:34:50 no 11:35:07 Can I have a counterexample? 11:35:16 loops may 11:35:19 >r 11:35:20 r> 11:35:25 both will as well 11:35:25 Well... 11:35:34 conditionals could, depending on how they're implemented 11:35:57 CATCH usually does as well. 11:36:07 And other related constructs. 11:36:26 Is it correct to think that return addresses are always forth virtual ip, so I am always returning to DOCOL? 11:36:44 Never actual asm or something like tht. 11:36:48 No. 11:36:52 x.x 11:37:26 They are opaque. 11:38:05 I suppose I do not properly understand NEXT. 11:39:00 Which of NEXTs do you talk? 11:39:16 joneforth or figforth 11:39:49 Forget FIG Forth, it isn't even archaic. 11:40:02 jonesforth then 11:40:09 Forget JonesForth either, it is broken. 11:40:15 >.> 11:40:17 Even by FIG Forth terms. 11:40:38 Well.. 11:40:53 If you want to study that level Forth, look at eForth. 11:41:30 Seriously. 11:44:20 I am having a hard tiem undrestanding eforth. 11:44:33 ?? 11:44:34 in some models, there is neither docol nor next. 11:44:48 Quartus`: I understand. 11:45:06 I am just trying to figure out at least one model so that I can implement my own. 11:45:31 so you see, even where there are constructs so named, behaviours may vary between implementations 11:46:26 Ok, well, when a builtin word finishes evaluation, it must return control to something. 11:47:04 sure. 11:47:37 But what does it return control to? 11:47:44 The top of the return stack doesn't quite seem right. 11:48:03 in terms of procedural flow, it returns to its caller. 11:48:06 There're several different strategies. 11:50:34 Hm. 11:51:45 And.. when a primative codeword is called, it doesn't mess around with docol's virtual instruction pointer? (the one used for indirect threaded code) 11:51:53 So that never needs to be put on the return stack. 11:52:06 In Forth there is a pointer that I will call IP (instruction pointer). It always points to the next cell to be executed in the currently executing colan definition. 11:52:45 When that cell designates a primitive, IP doesn't change. The inner interpreter just threads through the pointers to the primitive code and jumps to it. 11:53:07 Every primitive word ends with a copy of the inner interpreter. That's usually referred to as NEXT. 11:53:25 So basically these primitives just jump to one another in turn, bumping IP forward as they go. 11:53:36 So I shouldn't have said IP doesn't change - it gets incremented to the next spot. 11:53:37 --- quit: tgunr_ (Quit: tgunr_) 11:53:44 --- join: tgunr_ (~tgunr@cust-66-249-166-11.static.o1.com) joined #forth 11:53:52 Ok, but what about recursive DOCOL. 11:53:56 But when the cell IP points to designates a colan definition, then IP is going to haveto point to cells in *that* colan definition. 11:53:59 A DOCOL would change the IP. 11:54:06 So you have to save the currentvalue so that you can come back. 11:54:13 That's what goes onto the return stack. 11:54:18 That is what I figured. 11:54:24 Then you figured right. 11:54:27 --- quit: tgunr_ (Client Quit) 11:54:52 But it is safe to assume whenever popping an IP off the stack, one can always NEXT to DOCOL? 11:55:17 DOCOL will copy IP, increment it to the next cell (the one you wantto return to) and push that to the return stack. Thenit will use the copy to find the colan definitoin you're nesting to, and load IP with the address of its first word. 11:55:32 Oooh, EXIT would take care of it. 11:55:38 right. 11:55:43 I see. 11:55:46 --- join: davec (~tgunr@cust-66-249-166-11.static.o1.com) joined #forth 11:55:48 exit pops IP from the return stack and then runs next. 11:55:57 Simple. 11:56:00 yes. 11:56:15 --- nick: davec -> Guest72329 11:56:45 Ok; going back to read now. It just didn't look like you were getting any straight answers. Later on. 11:57:00 Thankyou. 11:57:06 You bet. 11:57:44 One quick question though, what if I am in IMMIDIATE mode. 11:57:49 NEXT will not have an IP to jump to. 11:57:50 Will it? 11:58:04 Or will IP always be some sort of "getnext" 11:58:23 --- quit: Guest72329 (Client Quit) 11:59:25 IMMEDIATE is something that affects the outer interpreter; not the inner one. The stuff we're talking about here always happens. 11:59:56 You might be executing app words, or words that comprise the outer interpreter, or whatever. IMMEDIATE just tells the outer interpreter whether or not to compile a pointer to a word. 12:00:06 the inner interpreter is threading through words that are already compiled. 12:00:11 Does that clarify? 12:00:33 Uhhh. 12:00:40 There is always an IP to go to, because the you're always running *something*. 12:00:58 What is the initial IP. 12:01:03 Right when a forth system starts. 12:01:51 Forth usually starts off executing a word called COLD. But then it goes into a word called QUIT, I think. That word is the outer interpreter. It's a loop that never stops unless you run a command that busts you out of it. 12:02:00 And it is a colan definition. 12:02:20 --- join: kar8nga (~kar8nga@jol13-1-82-66-176-74.fbx.proxad.net) joined #forth 12:02:26 So IP starts by running around in that, but its operation will parse words from the input stream and eventually execute them, which sends IP into those definitions. 12:03:01 Ok. 12:03:14 So I can initialize right to QUIT, yes? 12:03:37 Yes, more or less. 12:03:47 Makes sense. 12:03:49 It would initialize whatever it needs to and then start looping. 12:04:20 It 1) gets a line, 2) loops through the line word by word, 3) checks each word to see if its a word or a number... etc. etc. 12:04:43 It's what checks STATE and immediate flags to see if it should run or compile, and so on. 12:04:57 A lot of the smarts of how Forth interaction work live right there. 12:05:05 --- quit: tgunr__ (Ping timeout: 276 seconds) 12:05:11 It pretty much defines the user interface. 12:05:49 Very cool. 12:06:26 Well, I should probably get back to some work which is due in the immediate future rather than working on this Forth, thanks for the help Kip. 12:07:48 Surely; anytime. Very happy to nurture someone's interest in Forth. 12:30:17 --- quit: erider (Ping timeout: 248 seconds) 13:08:10 I put the book on call. 13:08:18 It should be at my local library sooner or later. 13:08:46 I was going to purchase it, but I figured that if it was good, I could purchase it, and let another member of my team check it out from the library. 13:33:13 --- quit: Maki (Quit: Leaving) 13:45:49 --- quit: Quartus` (Ping timeout: 264 seconds) 13:49:11 --- join: Quartus` (~Quartus`@74.198.8.58) joined #forth 13:57:09 --- quit: qFox (Read error: Connection reset by peer) 14:07:15 --- quit: ASau (Write error: Broken pipe) 14:07:22 --- join: Snoopy_1611 (Snoopy_161@dslb-088-068-201-200.pools.arcor-ip.net) joined #forth 14:07:49 --- join: ASau` (~user@83.69.227.32) joined #forth 14:10:10 --- nick: ASau` -> ASau 14:32:54 --- join: skas (~skas@eth488.act.adsl.internode.on.net) joined #forth 14:49:57 --- quit: kar8nga (Remote host closed the connection) 14:55:05 --- quit: Deformative (Ping timeout: 256 seconds) 15:04:16 --- quit: GeDaMo (Quit: Now I lay me down to sleep; Try to count electric sheep) 15:15:08 --- join: Deformative (~joe@141.212.202.151) joined #forth 15:25:08 --- join: erider (~chatzilla@pool-173-69-160-231.bltmmd.fios.verizon.net) joined #forth 15:25:50 --- quit: erider (Changing host) 15:25:50 --- join: erider (~chatzilla@unaffiliated/erider) joined #forth 16:15:49 --- join: nighty^ (~nighty@210.188.173.245) joined #forth 16:39:23 --- quit: Snoopy_1611 (Ping timeout: 276 seconds) 16:43:25 --- quit: Deformative (Ping timeout: 264 seconds) 17:18:48 --- join: Deformative (~joe@bursley-183118.reshall.umich.edu) joined #forth 18:11:10 --- quit: tathi (Quit: leaving) 18:13:50 --- quit: erider (Ping timeout: 256 seconds) 18:24:25 KipIngram: Well, I just purchased forth fundamentals. 18:24:43 So I have both a purchased and library version on their way. 19:31:16 --- join: xwl (~xw@NAT-Tech3.ncnu.edu.tw) joined #forth 19:39:54 --- quit: xwl (Quit: Leaving) 20:08:25 --- join: cataska (~cataska@210.64.6.235) joined #forth 20:53:22 --- quit: segher (Quit: This computer has gone to sleep) 22:07:43 --- quit: skas (Quit: Leaving) 23:59:59 --- log: ended forth/10.02.21