00:00:00 --- log: started forth/09.06.29 00:51:35 --- quit: thom_ (Read error: 60 (Operation timed out)) 00:55:08 --- join: thom_ (n=thom@pool-173-51-224-238.lsanca.fios.verizon.net) joined #forth 01:14:51 --- join: magic_user (i=4cac0c91@gateway/web/freenode/x-932f98bffb5bd939) joined #forth 01:17:03 --- quit: nighty__ (Client Quit) 01:22:21 --- quit: magic_user ("Page closed") 01:35:56 --- quit: thom_ (Read error: 60 (Operation timed out)) 01:56:38 --- join: proteusguy (n=proteusg@61.7.144.97) joined #forth 02:00:34 --- join: crc (n=charlesc@c-68-80-139-0.hsd1.pa.comcast.net) joined #forth 02:26:48 --- join: thom_ (n=thom@pool-173-51-224-238.lsanca.fios.verizon.net) joined #forth 03:15:42 --- join: thom__ (n=thom@pool-173-51-224-238.lsanca.fios.verizon.net) joined #forth 03:23:15 --- quit: thom_ (Read error: 110 (Connection timed out)) 03:49:24 --- join: cataska (n=user@210.64.6.233) joined #forth 04:48:54 --- quit: schme (Read error: 113 (No route to host)) 08:25:58 --- quit: thom__ ("This computer has gone to sleep") 08:27:08 --- join: GeDaMo (n=gedamo@62.56.88.122) joined #forth 10:30:13 --- join: _crc_ (n=Karere@bespin.org) joined #forth 10:35:22 --- quit: _crc_ (Remote closed the connection) 10:35:43 --- join: _crc_ (n=Karere@bespin.org) joined #forth 10:35:46 --- quit: _crc_ (Remote closed the connection) 10:36:00 --- join: _crc_ (n=Karere@bespin.org) joined #forth 11:56:22 --- join: GoNoGo (n=GoNoGo@cro34-3-82-236-93-215.fbx.proxad.net) joined #forth 12:05:14 --- join: Bucciarati (n=buccia@212.45.155.126) joined #forth 12:05:19 hi guys. 12:06:23 is this Forth? http://pastie.org/528337 12:07:21 --- join: impomatic (n=John@nat67.mia.three.co.uk) joined #forth 12:07:25 Hi :-) 12:07:44 I'm just writing the outer interpreter for my Forth. 12:11:02 It's annoying that FIND works with a counted string and >NUMBER doesn't (the count is on the stack) 12:12:25 well I think it is :) 12:12:26 bye 12:12:28 --- part: Bucciarati left #forth 12:12:59 <_crc_> That is Forth, in a block format. 12:14:32 impomatic: so write one that works the other way 12:16:59 some sort of block format, maybe. It's not the usual 64-char lines. 12:17:59 <_crc_> My forth doesn't use counted strings at all. 12:18:32 Yeah, I lean towards not using counted strings too. 12:19:31 If you have a word that takes addr len you can use it on a counted string easily enough, but not the other way around. 12:21:10 I've done that :-) Does >NUMBER handle a - prefix for negative numbers? 12:22:00 <_crc_> My strings are zero terminated 12:22:01 don't think so 12:22:29 _crc_: ah. :) Well, that's handy for interfacing with C, anyway. 12:23:31 http://forth.sourceforge.net/standard/dpans/dpans6.htm#6.1.0570 12:23:40 Also it outputs a double, is there still something with a period to indicate the difference between singles and doubles. 12:23:56 not with >NUMBER 12:24:00 <_crc_> My >number handles the - prefix 12:24:16 ok, sorry, the ANS >NUMBER 12:24:40 >NUMBER isn't really what you want for handling numbers in the interpreter, if you ask me. 12:25:08 tathi: thanks was reading that. It appears to say it doesn't handle the - prefix. But that doesn't make sense to me. 12:25:45 If >NUMBER doesn't handle -, then every word which calls it needs to handle - where appropriate. 12:25:59 <_crc_> Actually, the current Retro doesn't interface with C. But the zero term. strings are working well for me. 12:27:20 impomatic: can't help you there; it doesn't make sense to me either. 12:29:25 Oh well. 12:32:04 I mean, it makes sense to have a loop that converts digits, and handle the minus prefix and embedded periods/commas separately. 12:32:20 But I'm not sure why they standardized that loop instead of a word that does the whole thing. 12:33:22 Maybe at a higher level there wasn't enough common practice to standardize on? 12:35:06 Handling numbers is takes more than 50% of my outer interpreter. It looks ugly :-( 12:35:45 Forth should not be ugly ;-) 12:36:45 Is that including FIND? 12:41:39 No, I just meant the word for the interpreter. I wrote find in asm because it's half the size. 12:42:40 ah. 12:42:54 I have used this for basic number conversion: http://forth.pastebin.ca/1478691 12:43:10 But number conversion might also be a good candidate for writing in asm... 12:44:22 I will do, but it seems a shame not to do the job properly unless I ignore the standard. 12:44:44 Thanks for the code. 12:45:00 <_crc_> Retro's number handling code: http://paste.lisp.org/display/82710 12:45:53 What are all the # symbols? 12:46:17 Thanks, that might take a little longer to read through :-) 12:47:04 oh, compile a literal, probably...? 12:47:10 I haven't kept up with Retro lately at all 12:52:00 <_crc_> # signs compile the number as a literal. (This is written in a cross-compiler for the vm retro runs on) 12:53:00 <_crc_> Retro currently runs on most OSes. There are vm implementations in C, Java, C#, and JavaScript. 12:53:36 Yeah. I have tried it since 10, but didn't like the executes-when-you-press-space thing, so I didn't play with it much. 12:55:29 Oh, hey, backspace works now. 12:55:36 That will make it a lot more comfortable. :) 12:55:59 <_crc_> that is probably the most controversial bit in retro10 12:57:26 It wouldn't bother me so much if it also accepted a newline as a word separator. 12:57:43 --- join: crc_ (n=crc@baconfile.com) joined #forth 12:57:59 <_crc_> the addition of backspace has made it more comfortable to use 12:58:24 Yeah...looks like it still doesn't work on my terminal, actually. I just saw that in the docs. 12:58:40 I'll have to look into it; probably I have my backspace key mapped differently or something. 12:58:46 : allow-enter dup 10 =if drop 32 ;; then dup 13 =if drop 32 ;; then ; ' allow-enter is (remap-keys) 12:59:41 if you're using osx, there's a file under bin/ that fixes the backspace for the default keymap 12:59:48 Ah, very nice. And presumably I can do something similar to remap 127 to Ctrl-H for backspace 13:00:57 Of course, it's also annoying that it scrolls to a new line for each word, but that I can probably live with. :) 13:01:55 Does this make sense, or is it dumb? http://forth.pastebin.ca/1478715 13:02:34 It should be an interpreter loop, loading words and either executing or compiling as appropriate. 13:02:44 --- quit: GoNoGo ("ChatZilla 0.9.85 [Firefox 3.0.11/2009060215]") 13:03:21 I don't understand 0< STATE @ AND ... 13:03:40 oh, never mind 13:03:44 duh 13:03:54 cute 13:04:03 Sorry, comments would have helped 13:04:23 If you have AGAIN you could use that instead of 0 UNTIL 13:04:35 Otherwise looks ok 13:06:27 Thanks, will change it to again. I assume that should be adequate for the outer interpreter. 13:07:26 --- join: crc__ (n=crc@baconfile.com) joined #forth 13:07:35 I just need to handle the numbers and make sure I don't leave a part compiled word if it comes across an unrecognised word. 13:08:06 Yup. Of course, using just an immediate bit has the caveats discussed in Anton Ertl's paper on STATE-smartnes, but you probably don't need to care about that. 13:08:14 tathi: : nocr ; ' nocr is ok 13:08:30 crc__: you just have all the answers, don't you? :) 13:08:56 impomatic: some systems don't bother cleaning up partly-compiled words on an error. But some do. Up to you. :) 13:11:36 having answers helps if you want to support your users :) 13:11:51 You mean I can ignore part-compiled words because they have the hidden bit set? 13:12:29 It should only require resetting latest / here to remove it shouldn't it? 13:12:57 Sure. It depends whether you care about the wasted space. 13:13:31 Good implementations do clean up, but you can get by without it if you want. 13:18:49 Do you mean "State-smartness --- Why it is Evil and How to Exorcise it" 13:19:04 that's the one. 13:29:20 --- join: schme (n=marcus@c83-249-82-162.bredband.comhem.se) joined #forth 13:33:50 * crc__ returns to working with 13:50:39 --- quit: crc__ () 13:54:04 --- join: X-Scale (i=email@89.180.128.178) joined #forth 14:00:36 Is it normal to have a compile-only flag, or to have code at the beginning of each word to check if we're in compile-mode? 14:01:10 State Smartness Considered Harmful 14:01:31 * gnomon facepalms 14:01:49 It was mentioned by its proper name not even ten lines above and I still missed it. Sorry. 14:02:36 I believe color forth used two dictionaries, one for compiler words, one for interpret 14:03:27 Hmmm... I don't like the sound of that 14:04:24 Takes all sorts :P 14:26:45 I still don't understand the point of DOES> :-( 14:28:15 It rep[laces the default action of a CREATEd word 14:30:48 The most recently CREATEd word to be precise 14:30:56 Ah, I see. Should the default action be to call DOCOL? 14:31:21 The default action is to return the address of the words body 14:31:38 Equivalent to ' >body 14:38:43 So the default code field should return a pointer to the data field on the stack? 14:38:53 Yes 14:39:02 But does> replaces the default code field with one which calls docol? 14:40:06 I can't remember what docol does 14:40:35 But does> replaces the code pointer with a pointer to the code after the does> 14:40:40 Starts interpreting the data field 14:40:50 Although the address of the body is still pushed onto the stack 14:53:00 <_crc_> My forth doesn't include does> in the kernel. It is in the extensions package, and is defined to create a new word class. Not standard, but it works well. 15:08:31 --- quit: schme (Read error: 110 (Connection timed out)) 15:08:46 I assume does> is only of use when defining a defining word 15:14:40 --- join: thom__ (n=thom@pool-173-51-224-238.lsanca.fios.verizon.net) joined #forth 15:43:35 --- quit: GeDaMo ("Leaving.") 15:45:10 does> isn't normally used at the interpreter 15:45:15 * crc is home now 15:48:15 --- join: xjrn (n=jim@astound-69-42-10-25.ca.astound.net) joined #forth 15:49:27 my does> implementation: http://paste.lisp.org/display/82721 15:58:16 --- quit: thom__ ("This computer has gone to sleep") 16:08:45 --- mode: ChanServ set +o crc 16:14:32 --- join: thom_ (n=thom@pool-173-51-224-238.lsanca.fios.verizon.net) joined #forth 16:18:16 --- kick: crc_ was kicked by crc (crc) 16:39:16 crc, what's the {{ and }} do? 16:39:56 --- join: Al2O3 (n=Al2O3@c-76-121-136-249.hsd1.wa.comcast.net) joined #forth 17:05:45 --- join: nighty__ (n=nighty@210.188.173.245) joined #forth 17:33:13 start and close a local namespace 19:05:35 --- quit: Al2O3 () 19:06:27 --- join: Dialupas (n=Rodo1@v-209-98-172-182.mn.visi.com) joined #forth 19:07:28 --- quit: Dialupas (Remote closed the connection) 19:41:58 --- quit: xjrn (Read error: 110 (Connection timed out)) 19:51:38 --- quit: crc () 19:57:18 --- join: xjrn (n=jim@astound-69-42-10-25.ca.astound.net) joined #forth 20:21:16 --- join: Al2O3 (n=Al2O3@c-76-121-136-249.hsd1.wa.comcast.net) joined #forth 20:37:37 --- quit: proteusguy (Read error: 60 (Operation timed out)) 20:52:47 --- join: proteusguy (n=proteusg@61.7.144.97) joined #forth 22:55:30 --- quit: impomatic ("mov.i #1,1") 23:09:36 --- join: schme (n=marcus@c83-249-84-151.bredband.comhem.se) joined #forth 23:59:59 --- log: ended forth/09.06.29