00:00:00 --- log: started retro/12.09.07 06:51:13 --- join: impomatic (~digital_w@46.208.99.87) joined #retro 07:23:02 --- join: Kumul (~Kumul@67.224.135.43) joined #retro 08:21:43 hi all 09:29:31 hi erider 09:36:13 HEY CRC 09:38:40 hey crc in a stack diagram is it the first position of the top of the stack or the bottom? (n1 n2 -- n3) 09:42:22 ok it looks like the right hand side is the top of the stack 09:56:53 --- quit: impomatic (Quit: impomatic) 10:38:09 n1 n2 -- n3 10:38:21 before execution, n2 is top and n1 is second, etc 10:38:26 after execution n3 is left 11:01:26 --- quit: CIA-105 (Ping timeout: 246 seconds) 11:36:33 --- join: CIA-105 (cia@cia.vc) joined #retro 11:39:27 --- join: impomatic (~digital_w@46.208.99.87) joined #retro 12:28:26 Yeah thanks I see that 13:58:40 --- quit: karswell (Remote host closed the connection) 13:59:46 --- quit: Kumul (Ping timeout: 272 seconds) 14:13:37 --- join: karswell (~coat@93-97-29-243.zone5.bethere.co.uk) joined #retro 14:37:08 hi all 14:43:37 --- join: Kumul (~Kumul@67.224.135.43) joined #retro 14:43:43 Hi :-) 14:46:46 hi impomatic 14:47:05 did you finally get some time to look at joy 14:48:26 Not yet :-( I've had less free time than I expected... 14:48:45 ah bummer 14:50:22 I've been extending my Forth... I promised someone I'd have the majority implemented by Sunday :-) 14:50:51 you have made your own forth? 14:52:58 Yes, it's here: http://www.retroprogramming.com - written top down, starting with the interpreter loop. 14:53:26 I only needed to implement about 35 words to have a working interpreter with colon definitions, etc. 14:54:05 cool it is asm 14:54:27 Of course it needs a few more words defined to be useful... 14:55:36 what words do you think it is missing 15:02:09 Most of the math / comparison words. All of the control structure words. Nothing too tricky. 15:02:44 * erider didn't look at the whole thing yet 15:03:19 very well commented 15:03:20 It seems the ANS'94 core standard is 200+ words. Too many. I'm tempted to make a Forthlike language instead of Forth. 15:03:32 I can't take credit for the comments :-) 15:05:01 It took me over an hour just to read Mike's comments... 15:05:03 hey do you know how within works 15:05:16 the forth word 'within' 15:05:20 Yes. 15:05:28 I just implemented it. 15:05:35 :-) 15:07:20 how does it work? well how many args does it take 15:07:24 --- join: Mat2 (5b4085c5@gateway/web/freenode/ip.91.64.133.197) joined #retro 15:07:29 hello 15:07:33 hi Mat2 15:07:45 hi erider 15:08:56 how are things going 15:09:24 Three arguments... the value, lower limit and upper limit. Returns true if the value is within the limits. 15:09:37 quite well, i'm seaching for a way to upload my newest sources to lauchpad 15:10:20 It works for signed and unsigned numbers. Luckily the standard suggests the following implementation : WITHIN OVER - >R - R> U< ; 15:10:42 uh, ANSI forth 15:10:55 : digit? ( char -- tf ) [CHAR] 0 [CHAR] 9 1+ WITHIN ; 15:11:04 Mat2: Forth on the Launchpad? 15:11:43 my own vm and retro version at work 15:11:49 erider: that looks like it should work... 15:12:44 I mean the software repository of canonical (ubuntu) 15:12:48 yeah it works 15:13:15 I am rewriting the lets build a compiler 15:13:20 https://launchpad.net/navm <- this 15:13:50 there version is like this: : alpha? ( char -- tf ) >UPC 'A' 'Z' 1+ WITHIN ; 15:14:24 impomatic: I am not to sure why we need the 1+ 15:18:05 according to the spec, WITHIN is LOWER <= VALUE < UPPER. No idea why :-( 15:19:00 <= UPPER would make more sense to me. 15:20:49 $+ does know what this does 15:33:35 impomatic: a brain death implementation of within can test ranges value for value though a loop so the loop behaviour can be the reason for the spec) 15:35:17 sorry I mean the loop termination rule is probably the rational behind this 15:35:53 very obscure detail 15:39:22 how to you mean 15:42:20 I mean you can test for a range between two values in two ways: compare the test value with the first and last value of the range or the inefficient (some will call this common) way 15:43:09 of testing the value against all possible values in a range though a loop 15:43:42 ah ok I follow now 15:44:32 in the last case the loop behaviour is important, because loops can end at there last iteration of *after* the last comparision 15:48:32 I am have a challenging time with loops 15:49:20 I think you prefer easy to handly recursions the scheme way 15:49:52 sorry handle 15:50:39 I have been sticking to two structures DO LOOP and BEGIN UNTIL 15:51:05 why dont you use for .. next ? 15:51:10 retro's are easier to follow 15:51:30 it not in the forth I am using 15:53:19 Mat2: how many core words do you use 15:53:30 16 15:53:41 really? 15:54:52 yes, but my vm is uncommon for forth 15:55:10 how so 15:56:36 I bundle up to 16 4 bit instructions into an opcode and let them execute in some kind of fused software-pipeline 15:57:03 oh 15:57:09 so the basic primitives can be really very basic 15:58:48 easier to follow 16:00:09 #, @, !, +, lshift, rshift, and, or, (cond), push, pop, swap, over, b, (docol), exit 16:00:46 what is b 16:00:57 unconditional branch 16:01:05 the assembler mnemonics are: 16:01:30 ah ok 16:01:46 LI, LD, ST, SHL, SHR, AND, GOR, CP, PSH, POP, SWP, OVR, B, BS, BR 16:02:21 these instructions can be freely combined to an opcode 16:02:44 or new instructions can be compiled at runtime from existing instruction streams 16:03:03 extending the instruction set 16:03:24 some instruction combinations are useless, like DUP+DROP 16:03:33 what platform are you using this on 16:03:55 so these bit combinations are replaced with complex instructions which consume two lots 16:03:59 sorry, slots 16:04:16 each platform with a decent C compiler 16:07:29 is this colorforth 16:08:19 no, but I think machine forth has influenced me 16:08:44 machine forth is what it is called 16:08:44 and the readings of aha from jeff fox's homepage 16:10:12 machine forth was charles moore's propagation of using a MISC style vm as common immediate representation for a forth system 16:11:08 www.complang.tuwien.ac.at/anton/euroforth/ef99/thomas99a.pdf 16:12:48 colorforth eveolved from this idea as I know 16:12:58 ^evolved 16:14:01 and it is indeed a very good idea, look at the dispatch performence: 16:15:48 at current execution of $10000000 instruction interations of my vm execute at 0.77 s and gforth-fast with dynamic compilation execute equivalent code with 1.100 s 16:16:05 in^ 16:17:07 (atom n550, 1.6 gHz) 16:18:57 ngaro need 22.37 s 16:26:13 for interpreters of course, not compiler (or assembler implementations) 16:27:19 ciao 16:27:23 --- quit: Mat2 (Quit: Page closed) 21:09:03 --- join: arescorpio (~arescorpi@222-206-17-190.fibertel.com.ar) joined #retro 22:37:08 --- quit: arescorpio (Quit: Leaving.) 22:39:23 --- quit: Kumul (Quit: gone) 23:59:59 --- log: ended retro/12.09.07