00:00:00 --- log: started retro/12.09.09 06:33:58 morning 06:43:55 so the dictionary space is also use for data allocation as well 07:30:05 in some/most simpler forth systems, yes 10:58:15 I am not sure is that is a good thing or bad 12:31:32 why? 12:31:36 it depends on the system 12:32:06 directory is better for a write-once-only stuff or things that can be easily FORGOTten 12:32:34 for random allocation and freeing you need a proper heap 14:06:22 I don't know if the data should share the same place as the functions 15:01:24 that is how most forths traditionally operate, or even I would say - take advantage of that 15:12:04 ok sounds good 15:12:56 --- join: impomatic (~digital_w@146.90.199.184) joined #retro 15:15:42 hi impomatic 15:17:26 --- join: Mat2 (5b4085c5@gateway/web/freenode/ip.91.64.133.197) joined #retro 15:17:36 hi @ all 15:25:27 hi Mat2 15:25:27 Hi :-) 15:26:35 Hi erider and impomatic 15:29:24 whats new 15:30:11 erase takes a array and sets the elements to zero right? 15:31:49 erider: i'm working on my retro clone 15:34:22 really 15:37:34 is erase some kind of block fill routine ? 15:38:36 ERASE ( a u -- ) sets the contents u addresses starting from a to zero. 15:40:49 thanks 15:45:13 : ERASE ( addr u ) 0 DO 0 + ! LOOP ; would this define that? 15:46:49 nah something missing hold on 15:48:24 I think Forth has FILL. 15:52:40 --- join: Kumul (~Kumul@67.224.135.43) joined #retro 15:57:03 yes 15:57:34 you forget the counter I 16:00:20 I think fill deal with chars 16:00:53 gforth has erase as code word 16:03:06 : erase 0 do dup i + 0 swap ! loop ; (some fig forth) 16:03:41 : ERASE 0 ?DO DUP ! + LOOP DROP ; 16:05:19 I forgot the 0 16:05:25 yes 16:10:46 the stack comment for ! is (value adress-) 16:11:52 thanks 16:13:30 here is a short defination with for next: 16:13:35 : erase for dup 0 swap ! 1+ next drop ; 16:14:16 does DO consume the stack args 16:14:46 --- quit: SimonRC (*.net *.split) 16:15:55 --- join: SimonRC (~sc@217.155.91.250) joined #retro 16:16:00 no, do will pop the loop range and store each iteration in a veriable, that is 'I' 16:16:35 so the range on the stack is safe? 16:16:50 of the data stack, yes 16:17:18 for the return stack, this is implementation dependent 16:17:56 so we need to dup the addr 16:17:59 ? 16:18:21 you must dup the adress, because ! consume it 16:19:00 variable test 16:19:09 0 test ! 16:19:27 0 (n) 16:19:34 test (n a) 16:19:42 ! (-) 16:20:47 * erider is trying to follow the flow mentally but is mental picture is failing 16:22:02 the ! word pop two arguments from the data stack, a value and a address 16:22:42 so if you do not dup the address before storage it will be lost 16:24:15 hmm, it is late here and my english seem to morph into german a bit, sorry 16:24:31 this is the hardest part of the language :-( 16:24:39 I follow 16:26:10 in a functional language, like scheme (ok, it is not strictly a functional language) each defination has a constant state 16:27:03 you can see it the same way with forth (or other stack based languages) 16:28:15 words consume there parameters, so the stack state must be saved at demand 16:29:02 I have issues when there are loops /me needs to write it down on paper 16:29:20 this is like concatentation of functions resulting in functions changing state 16:30:02 if you have problems, take the natural way and implement loops as recursions 16:31:29 practice following the stack 16:33:04 ore use locals 16:33:55 ficel uses {n a} to define two local place holders for stack element 1:n and 2:a 16:34:19 no locals need to practice 16:41:31 I will take a break and sleep a bit, ciao 16:41:32 so DO take NOS and puts it in I 16:42:24 no I is a variable incremented each loop iteration 16:43:05 does the range get push to the return stack 16:43:32 that can be, for most older forth you can bet it will be 16:43:33 2 0 do 2 .. 0 is not on the stack anymore right 16:44:05 try 10 0 do i . cr loop 16:44:51 I get an addr 16:45:06 but in : ; it works 16:46:08 that is because do and loop are compile related words 16:47:22 each forth word can have two states, an run-time state which is compiled, and an immediate state, which is executet at compilation time 16:47:49 sorry executed 16:48:33 yeah I get that 16:48:40 the do and loop words of your forth are compile only definations, so there can only be used inside definations 16:50:32 so I fall to bed, ciao 16:50:49 --- quit: Mat2 (Quit: Page closed) 17:02:05 --- quit: erider (Ping timeout: 246 seconds) 17:17:07 --- join: erider (~chatzilla@pool-173-69-153-119.bltmmd.fios.verizon.net) joined #retro 17:17:40 --- quit: erider (Changing host) 17:17:40 --- join: erider (~chatzilla@unaffiliated/erider) joined #retro 18:18:36 --- part: impomatic left #retro 20:43:24 --- join: arescorpio (~arescorpi@222-206-17-190.fibertel.com.ar) joined #retro 21:42:04 --- quit: arescorpio (Read error: Connection reset by peer) 22:45:40 --- quit: Kumul (Remote host closed the connection) 23:59:59 --- log: ended retro/12.09.09