00:00:00 --- log: started forth/13.05.02 00:51:59 --- join: Spamchecker20 (spam@svr1.eptic.me) joined #forth 01:11:27 --- part: Spamchecker20 left #forth 01:51:47 --- join: nighty^ (~nighty@tin51-1-82-226-147-104.fbx.proxad.net) joined #forth 02:19:38 --- join: Indecipherable (~Indeciphe@41.13.48.233) joined #forth 02:22:38 --- join: epicmonkey (~epicmonke@188.134.41.112) joined #forth 02:24:42 "Because Forth programmers don't often change the way these particular words work, we're not going to study them any further. " 02:45:13 --- quit: epicmonkey (Ping timeout: 256 seconds) 02:58:40 --- quit: nighty^ (Ping timeout: 272 seconds) 03:24:57 --- join: nighty^ (~nighty@tin51-1-82-226-147-104.fbx.proxad.net) joined #forth 03:26:33 --- quit: Indecipherable (Quit: used jmIrc) 03:46:34 --- join: epicmonkey (~epicmonke@188.134.41.112) joined #forth 04:20:51 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 04:32:28 --- quit: tangentstorm (Ping timeout: 264 seconds) 04:42:15 --- join: lucasaiu (~user@fsf/member/lucasaiu) joined #forth 04:46:27 --- quit: dto (Remote host closed the connection) 04:51:09 --- join: tangentstorm (~michal@108-218-151-22.lightspeed.rcsntx.sbcglobal.net) joined #forth 04:58:13 --- join: RodgerTheGreat (~rodger@71-13-215-245.dhcp.mrqt.mi.charter.com) joined #forth 06:35:51 --- join: ncv (~quassel@unaffiliated/neceve) joined #forth 06:54:45 --- quit: Nisstyre (Ping timeout: 252 seconds) 06:57:16 --- join: Nisstyre (~yours@oftn/member/Nisstyre) joined #forth 07:04:53 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 07:22:51 --- quit: jevin (Quit: Textual IRC Client: www.textualapp.com) 07:25:01 --- join: jevin (~jevin@72.12.217.220) joined #forth 07:46:32 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 07:56:58 --- quit: ncv (Ping timeout: 272 seconds) 08:10:26 --- join: ncv (~quassel@92.114.78.17) joined #forth 08:10:26 --- quit: ncv (Changing host) 08:10:26 --- join: ncv (~quassel@unaffiliated/neceve) joined #forth 08:28:01 --- quit: lucasaiu (Remote host closed the connection) 08:50:30 --- join: Tod-Work (~thansmann@50-202-143-210-static.hfc.comcastbusiness.net) joined #forth 08:52:49 --- quit: Nisstyre (Quit: Leaving) 08:53:25 --- join: Nisstyre (~yours@oftn/member/Nisstyre) joined #forth 09:10:12 --- join: kumool (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 09:11:57 --- quit: kumul (Ping timeout: 256 seconds) 09:26:53 --- join: protist (~protist@37.172.69.111.dynamic.snap.net.nz) joined #forth 09:28:40 --- join: itsy (~john_metc@43.22.125.91.dyn.plus.net) joined #forth 09:28:41 --- quit: john_metcalf (Read error: Connection reset by peer) 09:31:03 --- quit: itsy (Read error: Connection reset by peer) 09:31:37 --- join: john_metcalf (~john_metc@43.22.125.91.dyn.plus.net) joined #forth 09:33:07 --- join: itsy (~john_metc@43.22.125.91.dyn.plus.net) joined #forth 09:33:07 --- quit: john_metcalf (Read error: Connection reset by peer) 09:34:45 --- quit: dto (Remote host closed the connection) 09:37:40 --- quit: itsy (Read error: Connection reset by peer) 09:52:10 --- quit: protist (Quit: Konversation terminated!) 10:28:32 --- quit: ncv (Remote host closed the connection) 10:30:27 --- quit: kumool (Ping timeout: 256 seconds) 10:51:17 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 11:59:08 --- quit: jevin (Quit: Textual IRC Client: www.textualapp.com) 12:05:31 --- join: kumool (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 13:04:49 --- join: jevin (~jevin@72.12.217.220) joined #forth 13:28:06 --- join: Onionnion (~ryan@adsl-68-254-164-186.dsl.milwwi.ameritech.net) joined #forth 13:47:11 --- quit: Onionnion (Quit: Leaving) 14:51:03 --- join: goingretro (~kbmaniac@host31-51-110-231.range31-51.btcentralplus.com) joined #forth 14:58:58 --- quit: dto (Remote host closed the connection) 15:06:15 --- quit: epicmonkey (Ping timeout: 264 seconds) 15:56:51 --- quit: Tod-Work (Quit: Leaving) 16:06:43 --- quit: dessos (Quit: leaving) 16:17:08 --- quit: nighty^ (Quit: Disappears in a puff of smoke) 16:37:08 --- join: dsfd (~dsfd@108.162.180.237) joined #forth 16:37:41 --- quit: dsfd (Client Quit) 16:49:30 --- join: ASau` (~user@p5797F5CD.dip0.t-ipconnect.de) joined #forth 16:52:42 --- quit: ASau (Ping timeout: 240 seconds) 17:07:48 --- quit: Nisstyre (Ping timeout: 276 seconds) 17:08:39 --- quit: kumool (Ping timeout: 264 seconds) 18:17:23 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 18:18:17 --- join: dessos (~dessos@c-174-60-176-249.hsd1.pa.comcast.net) joined #forth 18:34:15 --- quit: ttmrichter (Ping timeout: 276 seconds) 19:12:47 --- join: ttmrichter (~ttmrichte@31.25.101.133) joined #forth 20:04:31 --- quit: tangentstorm (Ping timeout: 246 seconds) 20:05:27 --- join: tangentstorm (~michal@108-218-151-22.lightspeed.rcsntx.sbcglobal.net) joined #forth 20:08:46 --- join: t4nk521 (43a69480@gateway/web/freenode/ip.67.166.148.128) joined #forth 20:09:28 Is there a way to force a word to update it's definitions of other words? 20:10:09 if you want dynamic binding you'll want to use vectoring 20:11:59 I think that's what I'm looking for 20:11:59 Forth has what is called a "hyperstatic global environment" 20:11:59 ie word references are bound based on the most recent (temporal) definition 20:11:59 to have words update their references when other words are redefined later cuts across the grain, so to speak, and you will have to create the necessary layer of indirection yourself (or write words to do it for you) 20:12:39 t4nk521: perhaps you could elaborate on why you want things to work differently 20:13:39 gotcha. I think I'm just playing with the language at this point. Using it mostly interactively as I go. 20:14:09 I'd bet the simplest way to make yourself happier would be to edit in a source file 20:15:36 well i think it could be done but would lose performance 20:15:36 yunfan: dynamic binding you mean? 20:15:36 yes, it has overhead 20:15:36 that's why it isn't done by default 20:15:41 but it is certainly possible 20:15:42 RodgerTheGreat: just like what python lua does 20:16:08 Is there a way to turn on dynamic binding globally rather than per word? 20:16:26 that really depends on your forth implementation 20:16:40 as far as I know there's no universal facility for that sort of thing 20:16:40 Right now I'm using gforth 20:17:43 I've recently come from learning lisp and have gotten kind of use to hot code swap while stuff's running. 20:18:00 to clarify, dynamic binding is not the way things are ordinarily done in Forth. It is possible to *add* if you want, but having it is not as simple as flipping a switch somewhere 20:18:18 gotcha 20:18:23 t4nk521: it's a little like if you were working in emacs and decided you'd like to have lexical scope 20:18:43 RodgerTheGreat: The recent version has that now :) 20:18:51 well there goes my analogy 20:19:56 i am just start implementing my own forth on python and i decide to impl a high level forth without vm and bytecode 20:20:27 Thinking Forth spends some time talking about vectored words- that may have some useful ideas, t4nk521 20:20:57 one problem made me stuck for hours is which core word should i start to append to the Dictionary :] 20:21:41 and finally i decide it should be next the word 20:21:41 RodgerTheGreat:: That's great. I'm on chapter two so far so I'll just keep plugging along. 20:22:28 on a case-by-case basis what you'd basically do is make it so that for "dynamic words" a variable is allocated to store the XT of the current definition, and the words would have a body that just does the equivalent of ": word current-xt @ execute ; 20:22:30 " 20:22:59 create ... does> could clean this up 20:23:36 Like a jump to reference sort of thing then 20:23:53 but a straightforward implementation based on this would mean you'd probably be leaving a bunch of junk definitions in the dictionary as you re-define and re-re-define words 20:24:10 so then you'd have to modify the compiler to assemble word bodies in a heap or something 20:24:18 RodgerTheGreat: where can i got to know the implementin details about if then ? "starting forth" just ignore them for its not a commonly used tech 20:24:34 What about redefining Interpret? Would that be worth doing? 20:24:47 t4nk521: um, redefining it to do what? 20:25:49 yunfan: if your forth implementation has "see", you could disassemble the included definitions of IF 20:26:16 To basically jump to current words definition. I guess : would have to be redefined as well. 20:26:28 i think dynamic binding requre you to reimplement the findword 20:26:43 in general, IF compiles a BRANCH0 and leaves an address on the stack, THEN uses that address to patch the jump target left by IF 20:27:22 RodgerTheGreat: then how the nested if then be implement? since the outer if must find the outer then's address 20:27:52 yunfan: the address left by IF goes on the stack. Nesting falls out naturally. 20:27:59 yunfan: think about it 20:28:07 i could see some method for this, like if wee met IF, we search THEN from back 20:28:17 IF and THEN are immediate words 20:28:34 they leave their arguments on the parameter stack at *compile* time 20:28:46 yes i know it 20:29:19 what's my problem is on nested case, how the most out IF matched the outer THEN 20:29:28 t4nk521: the key is that you would have to look up the word definitions when the word is *executed*, rather than when it is *compiled*, which is the essence of why we'd need to add another layer of indirection 20:30:11 yunfan: Think about this: " A if... B if... then then" 20:30:22 you push the address of the first if on the stack 20:30:30 RodgerTheGreat: i got it, when COMPILER meet IF 20:30:33 then you push the address of the second if on the stack 20:30:52 the first then takes an address from the stack and gets the closest matching IF 20:30:55 it execute it and left its HERE address on the stack, and goes next 20:31:26 when compiler meet THEN , it got an address of IF from the stack , and write its HERE address to that address 20:31:50 so it could solve the nested if then problem 20:32:15 another problem is how about mixing case? 20:32:25 --- quit: cataska (Read error: Connection reset by peer) 20:32:26 like do loop 20:32:33 --- join: cataska` (~user@210.64.6.233) joined #forth 20:33:16 do if .. then loop 20:33:28 oop, it could solved the same way, ok 20:34:12 i need to look for fig79 20:34:17 and if you want to catch mismatched control structures you could place some kind of sentinel on the stack and have THEN ensure it's consuming an address left by IF and so on 20:34:44 not foolproof but it's easy to catch most casual errors that way 20:34:50 there are all sorts of fig79 implementations on the fig page, yunfan... mostly pdfs you would need to retype 20:34:55 or run through ocr 20:35:14 'sup, tangentstorm 20:35:49 RodgerTheGreat: you are wight i could drop 2 data to the stack, one is type another is address :] 20:35:58 exactly 20:36:24 yunfan: I use that technique in Forth Warrior so that beginners get error messages instead of being left confused 20:36:59 * tangentstorm is looking at pascal/delphi code today 20:37:11 and to handle the case where you have an IF but no matching THEN you can make it so that the BRANCH0 you lay down initially points to a word that just prints an error message 20:37:19 tangentstorm: i have designed my pyforth's dictionary which could contain codename, codetype, codefield ... 20:37:36 cool :) 20:38:12 and i think i could add a word-find-cache for finding the word stuff 20:39:18 RodgerTheGreat: that's it, what should i do if i meet a error? just flush all like swiftforth? 20:39:21 i dont like it 20:40:08 when you encounter an error you can either pretend it's fine or stop dead in your tracks. The former is treacherous. I prefer the latter. 20:41:40 oh , there is another important problem 20:41:48 --- quit: t4nk521 (Quit: Page closed) 20:41:51 how many core words in your implementation? 20:42:34 i found each time i want to make a core word, it could be defined by other core words 20:42:34 lessee 20:43:15 i think i might influenced by jeforth 20:43:29 which only have 1 word in the finalluy version 20:43:41 Forth Warrior has 54 builtin core words 20:44:09 then how many internal stats it have? 20:44:13 which includes both the really basic stuff like [ and nice-to-have things like typeln and comments 20:44:29 I have no idea what you mean 20:44:47 you can see the guts of the thing here: https://github.com/JohnEarnest/Mako/blob/master/games/Warrior2/MakoForth.fs 20:44:47 internal stats like CP 20:45:38 the only state of the compiler is basically here, head and a variable to keep track of whether I am interpreting or compiling 20:45:50 ah, what does [ really do? only cause the states from interpreter to compiler or more other job? 20:46:16 it just updates the interpretation/compilation mode 20:46:56 so : basically does "create ]" 20:47:18 got it 20:47:23 basically 20:48:12 i think it could add a mark action, when it found the compiling work failed, it could restore the dictionary index 20:48:33 if you want, sure 20:49:07 but when you start dealing with defining words and so on it becomes somewhat more difficult to do that 20:51:18 and when interpretering the word, how many depth of rstack could be? 20:51:58 i mean you need to push the HERE addr to rstack before you goto the componet words' addr 20:54:23 --- quit: kumul (Quit: Leaving) 23:02:57 --- quit: Shark8 () 23:05:12 --- quit: RodgerTheGreat (Quit: RodgerTheGreat) 23:17:36 tangentstorm: can you send me the fig forth's standard pdf which you have mentioned 23:45:08 http://www.forth.org/fig-forth/contents.html take your pick 23:47:15 ok 23:47:38 just heard that forth was used for terminator 2 the movie's effects 23:51:01 :) haha cool 23:59:59 --- log: ended forth/13.05.02