00:00:00 --- log: started retro/10.01.02 00:18:49 In anycase, it was the threads that forth might create I was more worried about. Though perhaps that's not the right mindset for forth. It has usually been cooperating tasks/threads. Maybe it's OK to simply say "Don't be inside a do/while when you do a task switch." 08:32:48 [crcx/ngaro] e7589b: tweaks to README 08:33:46 [crcx/wheke] 269f3d: fixed title 08:33:54 --- join: nigol (n=nigol@63.120.broadband10.iol.cz) joined #retro 08:34:01 hi nigol 08:34:06 Hi there. 08:34:13 crc: Hi 08:34:40 crc: Happy new year ;) 08:36:15 crc: How's going? I hope, you're fine. 08:36:28 I'm doing pretty good so far 08:36:58 crc: I'm happy hear that. 08:37:26 crc: I'm currently doing some hacking of MIDP VM for Retro. 08:38:38 cool 08:38:54 [crcx/wheke] ae0bca: cleaner "TO" in forth94 08:38:55 * crc is currently working on cleanups to the library 08:40:46 crc: Hope it'll be usable. I'm completely abandoned the standard forms interface and making new framebuffer interface with support for graphics. 08:40:54 cool 08:41:06 * crc will be happy to test on his blackberry when you're ready 08:42:21 crc: Blackberry has full QWERTY keyboard? 08:42:31 yes 08:44:28 crc: I can send you testing version if you want. Probably full of bugs ;) 08:44:44 please do. I'll be able to test tonight 08:45:26 crc: What's your email, please? 08:45:39 crc @ retroforth . org 08:46:06 crc: Ahh ok, sending now. 08:48:30 crc: It's on the way. 08:49:30 I'm using in this VM self-made vector font. Looks really 'retro' IMHO. 08:51:30 nigol: thanks. I'll send you feedback tonight or tomorrow :) 08:53:24 crc: ok, I'll do some more coding today. 08:54:54 My phone hasn't full keyboard, so I must solve input on this device. I'm able to input only numerals currently. 08:59:07 * crc will never go back to a non-qwerty phone 09:04:05 Maybe my next phone will be qwerty... 09:15:55 [crcx/wheke] 5b0b5a: more efficient mapping of UPPERCASE names to lower... 09:23:00 [crcx/wheke] 35c64f: more cleanups to forth94. code size down by 157 ce... 09:28:46 [crcx/wheke] 39ee81: use return stack instead of virtual variable. smal... 09:30:43 --- join: crcx (n=Karere@c-68-80-139-0.hsd1.pa.comcast.net) joined #retro 09:36:47 [crcx/wheke] 4139cd: "allot" is part of the core language; no need to d... 09:40:45 [crcx/wheke] 102e97: update optimizer library slightly [still broke for... 09:44:56 [crcx/wheke] 3b08d7: use return stack for switch/case:/break/default: 09:46:17 now off to work for a while; I'll watch the channel and reply when I can. 11:47:23 --- part: nigol left #retro 12:32:42 --- join: erider (n=chatzill@pool-173-69-160-231.bltmmd.fios.verizon.net) joined #retro 12:33:21 hi 12:37:13 --- quit: erider (Client Quit) 13:24:45 --- join: erider (n=chatzill@unaffiliated/erider) joined #retro 13:26:39 hi 13:27:43 hi erider 13:27:48 how's it going? 13:28:05 its is going good 13:28:14 cool :) 13:28:28 and youi 13:28:58 pretty good :) 13:29:40 * erider thinks he should play with is debugger more 13:30:02 you still playing with reva? 13:30:27 yes 13:31:07 I am getting ready to see how the syscall and dll module works 13:31:37 I was to call external functions that are native to the OS 13:31:42 want* 13:32:34 ah yes, syscalls. I remember those 13:33:20 * docl just downloaded reva, will start playing with it now :) 13:34:08 docl: its not too bad 13:34:25 it will due to play with forth for me 13:34:53 I tried freeforth but I like reva better 13:35:42 reva has a lot of variables in its dictionary compared to retro 13:36:44 docl: yeah but I am only play with the basic words that are common to most forths 13:37:07 playing* 13:37:23 cool 13:38:25 * erider is interested in the socket lib that reva has with is pretty user friendly 13:39:07 docl: accept take input? 13:39:49 yeah 13:40:30 in retro it takes input up until a certain char is reached. this is stored as a string at the address that "tib" points to 13:40:31 I am playing with create and allot at the moment 13:41:30 cool 13:42:42 create mylist 10 cells allot <- if you are planning to store 10 numbers in reva 13:43:28 I am using create text 10 allot 13:44:17 that works 13:44:38 with text cells aren't needed since each char is 1 byte 13:45:15 yeah I am trying to see how prompt works 13:46:45 ah nevermind it was some else who defined it 13:46:57 someone* 13:56:47 are there things you like about reva better than retro? 14:05:55 well I don't know yet 14:06:55 it looks like it is more newbie friendly 14:08:01 docl: yeah it has a good help feature 14:08:17 also some nice examples 14:09:50 that debugger might be a good way to teach myself some x86 assembley 14:10:18 yeah I liked that about it too 14:13:05 docl: is this you first look at reva 14:16:47 long is uses for most structure representation of a pointer 14:23:24 yeah it's my first look at reva, although it is a lot like some versions of retro 14:24:03 yeah that is one of the reasons I picked it 14:43:40 docl: whats new 14:50:07 * docl is reading about cryonics 14:54:03 ah 14:58:30 --- quit: crcx (Remote closed the connection) 14:58:37 back from work 14:59:30 hi crc 14:59:44 docl: reva started as a fork of retro 15:00:06 hi erider 15:00:30 crc: whats new 15:01:05 not much, finished work for the day, so will be doing more coding, then watching the new two part doctor who special 15:01:32 * docl remembers reading that about reva. which version of retro was it? 15:02:07 7.x I think 15:02:26 yeah, originally a split off of 7.4 15:02:32 about the time I started using retro 15:03:37 hold on brb 15:03:42 --- quit: erider ("ChatZilla 0.9.86 [Firefox 3.5.6/20091201220228]") 15:03:50 docl: yup. 15:15:46 [crcx/wheke] bb1622: police whitespace 15:16:46 [crcx/wheke] 9e825f: use zallot and variable in task.retro 15:16:52 --- join: erider (n=chatzill@unaffiliated/erider) joined #retro 15:17:20 back 15:18:46 [crcx/wheke] e5d47e: minor formatting tweaks 15:19:43 z" foo" 15:23:55 [crcx/wheke] 42fc8c: terminal-colors library now uses a special class a... 15:24:27 * erider is thinking about a framework in forth for malware analysis 15:24:46 I wonder if forth is suited for this 15:28:46 [crcx/retro10] b98a18: zallot now handles negative allocations 15:32:31 framework is a buzzword :) 15:32:51 yes it is 15:33:05 but I like it 15:34:45 I may have to worry about memory leaks with a lot of calls into the dlls 15:35:15 4 func: MessageBox as mbox 15:35:35 that is very simple what do you think crc 15:35:52 that's close to the old retro FFI 15:36:29 crc: what is the new way 15:36:38 current retro has no FFI 15:36:54 since the language is isolated from the host operating system 15:36:56 ah because of the portability 15:37:54 I could add FFI via the I/O system ngaro has, but haven't even begun to consider that yet 15:37:55 if I can make a few wrappers I can use forth as a cli in windows 15:38:37 --- quit: yiyus (farmer.freenode.net irc.freenode.net) 15:39:49 old ffi was: 15:39:53 from libraryname 15:39:59 #args import function 15:40:18 "as" was a word to rename the imported function 15:40:52 its not in the retro10 on the OS 15:41:03 no ffi in retro10 15:41:12 this was from 9.2.10 15:41:21 cool 15:43:01 --- join: yiyus (i=12427124@je.je.je) joined #retro 15:43:21 http://retroforth.org/get/old/9.2 15:44:23 nice 15:44:47 * crc has almost every release of retro available 15:46:17 except for the 5.x releases 15:46:34 crc: what are you using as a debugger on OSX 15:46:47 gdb? 15:46:49 who needs a debugger? 15:46:56 xcode has some nice tools included with it 15:47:24 yeah I have heard of xcode 15:47:52 I have xcode installed, but seldom run it 15:48:01 crc: debuggers are very useful in the learning process 15:49:08 http://gist.github.com/267730 15:49:43 there's a weird issue where it stops recognizing any dictionary words other than "echo" 15:50:03 it doesn't start until you've run echo 4 or 5 times 15:51:07 how is masking done in forth? like say you have to hex values ie 0x1000 and 0x2000 in C I would do this (0x1000 | 0x2000) 15:51:20 s/like/lets 15:51:20 in reva, 15:51:28 $1000 $2000 or 15:51:42 cool 15:51:47 and, or, xor, should all exist 15:52:03 actually all the words from this...echo are still in the dictionary, but the rest of the dictionary is gone 15:53:02 * docl suspects an issue with incr 15:55:29 thow a 1- after "lines" and before ">if" in incr and it doesn't corrupt the dictionary 15:55:58 * erider needs VirtualAllocEx, WriteProcessMemory, GetModuleHandleA, GetProcAddress and CreateRemoteThread to do dll injection for part to of the framework :) 15:56:25 erider: I can't help with any of that since I don't use windows anymore 15:57:06 :( 15:57:37 you don't have windows in virtualbox like I do? 15:57:44 * docl gets it now :) 15:59:42 erider: I have it in a vmware session, but I only run it on rare occasions 16:00:18 docl: bounds have to be adjusted since they start at 0 16:00:20 yeah once you go MAC it is hard to go back 16:00:35 erider: I'll use any OS with a decent command line environment 16:00:57 true 16:01:17 erider: windows doesn't cut it there without extra layers like cygwin, and even that's not well integrated into the system 16:01:41 powershell? 16:01:45 lol 16:03:19 erider: powershell is a scriptable .net environment, not really comparable to the whole POSIX infrastructure 16:03:36 I was just kidding 16:04:30 I know 16:05:28 ok, time for doctor who; I'll be back in about 2-2.5 hours 16:06:56 have fun :) 16:17:42 yeah 16:24:50 * docl will have commentary for my gist available soon 16:42:43 docl: variables should only hold numbers if spaces was not allocated right? 16:43:31 yes, they only have 1 cell allocated by default 16:43:59 http://gist.github.com/267730 has commentary now 16:49:31 docl: so I shouldn't use variable to store something the has a variable length 16:53:31 not unless you want to call allot afterward 16:54:22 I think I will just use pad 17:03:21 here is an example of how variable is useful with allot: 17:03:26 10 constant size 17:03:26 variable myarray size allot 17:03:26 : access ( a-a ) dup @ 1+ + ; 17:03:26 : apush ( na- ) tuck access ! ++ ; 17:03:26 : apop ( a-n ) dup access @ swap -- ; 17:03:29 : mypush ( n- ) myarray apush ; 17:03:31 : mypop ( -n ) myarray apop ; 17:04:52 "myarray" contains the index of the array, but it also tells us where the start of the list is. 17:05:08 the start of the list is of course 1 cell after the index. 17:05:20 * docl needs to alter that slightly for reva 17:06:16 I used pad 17:06:38 : dll_len ( $ -- n ) pad place drop pad count ; 17:10:04 : ++ dup @ cell+ swap ! ; 17:10:04 : -- dup @ cell- swap ! ; 17:10:04 10 constant size 17:10:04 variable myarray size cells allot 17:10:04 : access ( a-a ) dup @ 1+ cells + ; 17:10:06 : apush ( na- ) tuck access ! ++ ; 17:10:09 : apop ( a-n ) dup access @ swap -- ; 17:10:11 : mypush ( n- ) myarray apush ; 17:10:14 : mypop ( -n ) myarray apop ; 17:10:14 hmm maybe variable len : dll_len ( $ -- n ) len ! drop ; would be better 17:10:19 that should define a user stack in reva 17:12:33 variable len : dll_len ( $ -- n ) len ! drop len @ ; would be better 17:13:04 wouldn't that take two arguments? 17:13:25 oh you're using counted strings right? 17:13:55 so the stack diagram would be ( $n-n ) 17:14:42 it will take a string but I don't need the addr just the len 17:16:51 ah, mypop had an error. the -- should be before accessing. 17:17:14 but yes you are right it will get str n 17:17:16 : apop ( a-n ) dup -- access @ ; 17:17:42 you can use nip ( xy-y ) 17:21:14 my implementation is what I need 17:22:03 what are you trying to do? 17:22:21 : nip ( xy-y ) swap drop ; 17:23:05 variable tmp : nip ( xy-y) tmp ! drop tmp @ ; <- does the same thing, but less efficiently 17:23:51 ok 17:29:24 docl: how do you make a list 17:32:34 depends what for and how you are going to use it 17:33:49 the dictionary is an example of a linked list 17:34:17 need to make an array I guess 17:34:52 create myarray 10 allot 17:35:04 create myarray 10 cells allot 17:35:07 a list of numbers in order assigned to a variable name 17:36:04 ok how do I assign each cell with a value 17:36:10 ahh 17:36:24 you want to be able to access the array 17:36:41 yeah 17:36:49 I want some like this 17:37:06 create array 1, 2, 3, 4 , 17:43:17 docl: any words 17:44:01 --- quit: docl (Nick collision from services.) 17:44:16 --- join: docl (n=luke@97-120-215-229.ptld.qwest.net) joined #retro 17:44:22 sorry, power out 17:44:46 create array 1 , 2 , 3 , 4 , <- this should work for making the array 17:45:13 array 0 cells + @ array 1 cells + @ ... 17:45:24 that should let you get the values 17:46:11 ok let me try that 17:46:12 : access-array cells array + ; might be helpful 17:47:13 : access-array ( n-a ) cells array + ; 17:47:31 takes the index number and returns the address of the cell you are looking up 17:47:48 thanks 17:56:09 linked lists are a little tricky.... but the advantage is you can add a new element any time you want. that is one reason the dictionary is a linked list. 18:05:36 do you have an example 18:06:23 : a@ ( an-x ) cells + @ ; : a! ( xan- ) cells + ! ; 18:08:46 http://gist.github.com/267777 18:10:00 it won't work in reva yet though, as it uses accept and doesn't specify cells. 18:28:50 back 18:33:43 hi crc 18:48:12 http://gist.github.com/267784 18:58:37 what is R@ in retro? or do I need to : r@ pop dup push ; ? 18:58:52 r 18:58:58 thanks 18:59:16 no problem 19:22:22 sorry 19:27:27 why sorry? 19:39:43 I wasn't paying attention 19:46:00 0; only drops if TOS is 0? Right? 19:46:08 yes 19:52:50 crc: talk to you later 19:53:50 I got somethings done 19:54:16 c-ya 19:54:21 --- quit: erider ("ChatZilla 0.9.86 [Firefox 3.5.6/20091201220228]") 20:05:19 crc: with a keepString port, I might be able to get the linked list code working in reva 20:05:29 docl: I'll get that done shortly 20:05:33 docl: http://gist.github.com/267807 20:07:43 excellent summary 20:10:09 OK, so I've used sccs, cvs, rcs, p4 and svn. What is the basic git work flow? do you have a pointer to it? 20:11:06 the answer I want is like "svn co url; svn update; svn ci" 20:11:13 git clone url 20:11:14 git pull 20:11:26 git add 20:11:30 git commit -m 'message' 20:11:32 git push 20:11:54 git pull and git push also allow for referencing a url and branch 20:12:15 Hmmm... not so obvious... I better read a web page or two v.v 20:12:19 http://learn.github.com/p/normal.html 20:12:25 ^_^ THanks! 20:12:27 http://learn.github.com/ 20:15:44 docl: try this: : keepString ( $-$ ) dup getLength (") ['] drop compile ; 20:20:59 not working yet. 20:21:25 are the @+ and !+ ports supposed to use c@ and c!? 20:21:47 [crcx/wheke] a0a250: begin prep to make docs rst format 20:21:47 yes 20:22:02 * crc forgot about that... 20:24:13 still no luck for some reason. it crashes when I run the test code. 20:25:42 http://gist.github.com/267777 20:37:24 * crc is trying to understand reva's compiler 20:50:25 docl: 20:50:27 create strings 8192 allot 20:50:27 variable str 20:50:28 strings str ! 20:50:28 : keepString ( $-$ ) str @ swap dup getLength 0 do @+ str @ c! 1 str +! loop drop 0 str @ c! 1 str +! ; 20:50:31 give this a shot 20:51:41 also, cell+ not 1+ in access 20:51:54 and you need dup getLength before the 'type' in next 20:54:22 finally, it works :) 20:56:14 : type repeat @+ dup 0 =if 2drop ;; then emit again ; 20:56:25 if you want a retro-compatible type 21:00:13 accept evidently requires a newline before it begins to parse 21:00:35 I have no idea how the reva parser works 21:04:21 http://gist.github.com/267828 21:05:52 nice 21:06:21 I'll add more to it as needed 21:11:22 one day I'll implement ngaro in forth 21:14:45 :) 21:17:04 [crcx/retro10] d1fd24: include notes on obtaining retro via git 21:23:21 Hmmmmm a bug in retro's compiler? 21:23:30 what bug? 21:24:13 : znip; ( xy-xy | 0) dup 0 =if nip pop drop then ; 21:24:27 the nip is compiling to swap according to see. 21:24:54 10.3 ? 21:25:07 yep 21:25:44 I'll get a fix out tonight 21:26:04 the class handler was set wrong (this is fixed in the development code) 21:26:08 the behavior of znip; also seems to match what see is showing me. It is doing a swap, not a nip. 21:26:30 Interesting... what is nip's class, and can I fix it? 21:27:25 works on my version from git 21:27:37 js4: in image/source/stage2.retro, find the p: nip and remove it 21:27:40 then rebuild the image 21:29:07 in my dream forth cpu nip is a primitive... 21:29:14 rebuilding and testing... brb... 21:30:57 fixed! Thanks!! 21:31:36 np 21:31:49 thanks for letting me know 21:32:37 I'll have a 10.3.1 release out with the fix soon 21:33:04 you are welcome. (my dream cpu right now only has over and nip. No dup or swap or drop.) 21:33:33 (it only has 16 op codes.) 21:34:00 what opcodes? 21:36:36 It would be more accurate to say it only has 4 bit operation code. It has a few more opcode than 16 though... I am stil fooling around trying to stay out of the turing tar pit and stay at 4 bit opcodes.... 21:36:41 This is the current set... 21:36:45 first middle last 21:36:45 0 CALL I GETP RET 21:36:45 1 JEQZ I PUTP IVX 21:36:45 2 NZDJ I MULS NZDR 21:36:45 3 JUMP I DTOA 21:36:45 4 GET 21:36:47 5 PUT 21:36:49 6 LIT 21:36:51 7 PUSH 21:36:53 8 POP 21:36:55 9 OVER 21:36:57 A NIP 21:36:59 B ADD 21:37:00 C NAND 21:37:03 D ARSH 21:37:04 E XOR 21:37:06 F NOP ATOD NOP 21:37:11 8 4 bit opcodes per word. Diff behavior in first or last slots of a word. 21:37:50 That particular version is broken actually... still fooling around, but that's close to it. 21:38:55 basically it's ideas from quark aka nforth and c18 mixed together 21:39:22 you could set it to enter the codes based on key combos, like the chorder I was working on in forthlets 21:39:35 *giggle* 21:40:29 no, a human will need a smart assembler/compiler to use that instruction set. I may base my simulator on a hacked version of ngaro (sp?) 21:40:54 First make ngaro handle multiple opcodes per word, like c18 p21 and friends do. 21:41:53 back to my current toy -- linked lists in retro... 21:46:46 : dup over over nip ; : drop over nip nip ; : swap over push nip pop ; 21:54:02 feel free to hack ngaro as you see fit 21:55:24 yeah getting it to do packed instructions could be fun. I'd have to do most of that work in my own simulator anyway. And with ngaro/retro I have a working 5bit opcode machine now. 22:13:59 then instrument ngaro to track opcode usage, find out what instructions are really used and how often in a real forth system. Prolly will change my 'dream opcode set' when I see the usage info. 22:28:30 http://s3.retroforth.org/download/10.x/retro-10.3.1.tar.gz 22:34:32 * js4 clicks and gets an error 22:35:43 try again 22:35:48 I had a permissions issue 22:36:11 some metrics from the retro codebase + library + demos: 22:36:15 drop - 310 22:36:20 dup - 397 22:36:23 swap - 186 22:36:28 nip - 31 22:36:32 over - 58 22:36:35 tuck - 14 22:36:56 push - 110 22:37:00 pop - 165 22:37:13 do you mean to be taring the .git directories? 22:37:25 0; - 187 22:37:34 js4: no 22:38:15 very cool! Can you do that for all primitives? Can you also do that for user words? And I am interested in how often the instructions *run* not how often they appear in the source code. 22:38:56 I've not tracked runtime metrics 22:39:19 and I'll work on a full list of occurrences in source tomorrow 22:39:29 I need to get to bed soon :( 22:39:41 I'll hack it in if you want, adding a counter for the primitive opcodes executed should be easy. 22:39:45 Sleep well! 22:43:28 10.3.1 passes my limited tests. Yay! (Now I will go hack back in the bs and del that erase the character...) 23:59:59 --- log: ended retro/10.01.02