00:00:00 --- log: started retro/11.11.10 01:12:31 --- quit: yiyus (Ping timeout: 260 seconds) 01:39:27 --- join: yiyus (1242712427@je.je.je) joined #retro 07:23:06 docs: add footnote on negative shifts to the core functions list : http://rx-core.org/rx.fossil/info/5bb3ded312ebf830be5e30cadd3d1e1d5ee57e03 07:25:15 crc: is there a way to signal the running image that a port function has not been implemented? 07:25:36 not currently 07:26:16 so the current vm's just ignore these commands and hope that noone will notice? 07:26:52 yes 07:27:07 ok 07:27:38 which code does use the canvas commands? 07:28:05 the canvas' vocabulary is optional; it's part of the library. nothing in the core language uses the canvas 07:28:17 (I've written some little games using canvas for my kids to play) 07:28:59 is that code somewhere? I would like to have a small "test" to see if I got it right, without fighting agains myself learning the language as well 07:29:13 which I will do next ;) 07:29:27 (I know Forth so the transition is not as painful) 07:37:57 add a tic-tac-toe and simple example of canvas' usage : http://rx-core.org/dev/playground.fossil/info/737320dc2be5ed6fc68d91082d0f9bcf97f45116 07:38:18 I'll get more into the repo later 07:38:40 ah cool thanks! 07:38:51 I hope I will be able to finish the vm tonight 07:42:39 cool 07:53:40 crc: btw what's been your rationale for the usage of port 0? wouldn't a simple wait have sufficed? Or has this another benefit? 08:03:49 crc: also so far all memory cells are signed 32 bit values. How does retroforth store strings on the stack? for the filename for file i/o for example 08:03:54 length data? 08:04:50 "string" -> s|t|r|i|n|g|6 (TOS) 08:05:10 actually string in reverse 08:05:16 oh well I should see 08:18:11 strings are stored in memory. they are zero terminated. you pass a pointer on yje stack. 08:20:04 the port 0 was useful in the original prototype. the design of the VM has seen only minimal changes since the original implementation many years back 09:02:49 docs: intro to retro: expand notes on string implementation a little : http://rx-core.org/rx.fossil/info/a031cfff3e36df94727e303cf406b36a3fcc26c4 10:38:02 initial port of a simple drawing application using canvas [original was for retro 10] : http://rx-core.org/dev/playground.fossil/info/7fa17d1509391fbb0f4feeedd1e113488f503442 11:32:05 crc: I see! one advantage I have seen on my way home is that you can make wait a nop if you pass a flag to port 0, which might be useful 12:13:35 crc: sorry I don't understand that quite. who allocates the memory for the strings and how? the vm does not provide instructions for this, so how would I pass a file name to the "open a file" I/O call? 12:22:30 --- quit: scj (Ping timeout: 240 seconds) 12:22:30 strings are handled by the application being run 12:23:52 --- join: scj (~scj@shells.mycrosoft.us) joined #retro 12:24:26 crc: oh now I get it 12:24:55 crc: how do I return a string to the applicatoin then? 12:25:13 for input I take the address off the stack read char by char until I hit a \0 12:25:18 but for output? 12:25:40 normally the application will leave the address of the desination buffer on the stack before invoking an i/o function 12:26:37 I still need to document this :( 12:27:08 for example, take the getEnv function in retro, which uses -10 query on port 5. 12:27:35 you pass it a buffer and the string corresponding to an environment variable name 12:27:59 the vm will read the name, find it, and write the results back into the application memory starting with the buffer address provided 12:29:41 (I think that the getEnv function is the only place where this actually happens; everything else works byte-by-byte) 12:32:35 and how do I know the size of the buffer? 12:45:19 the application should make allowances for this. (e.g., most applications won't use the full memory space. for queries that need this, I would use the extra memory space after the end of the application requirements for the buffer) 12:49:45 so I can write to the address in good faith 12:53:08 --- join: edrx (~Eduardo@router.puro.uff.br) joined #retro 12:54:09 also what should I return if the requested variable is not set? 0? 12:54:17 an empty string? 12:55:07 set the string to nothing but a zero 12:56:20 ok 13:00:54 --- part: edrx left #retro 15:43:15 --- join: erider (~chatzilla@unaffiliated/erider) joined #retro 15:43:19 hi all 15:59:09 anyone here today 16:18:38 have a good night to all 16:18:45 --- quit: erider (Quit: ChatZilla 0.9.87 [Firefox 5.0/20110615151330]) 16:57:56 finally home from work 18:14:54 --- join: roarde (~roarde@152.179.141.18) joined #retro 18:15:01 --- quit: roarde (Changing host) 18:15:01 --- join: roarde (~roarde@pdpc/supporter/active/roarde) joined #retro 18:28:52 --- quit: roarde (Ping timeout: 240 seconds) 23:59:59 --- log: ended retro/11.11.10