00:00:00 --- log: started retro/09.12.31 04:11:18 --- quit: zbrown (farmer.freenode.net irc.freenode.net) 04:11:19 --- quit: retro-commit (farmer.freenode.net irc.freenode.net) 04:11:51 --- join: retro-commit (n=Karere@c-68-80-139-0.hsd1.pa.comcast.net) joined #retro 04:11:51 --- join: zbrown (n=suifur@rufius.xen.prgmr.com) joined #retro 05:27:34 --- quit: sixforty ("Leaving.") 05:41:52 --- join: crcx (n=Karere@c-68-80-139-0.hsd1.pa.comcast.net) joined #retro 12:42:36 --- quit: zbrown (farmer.freenode.net irc.freenode.net) 12:42:36 --- quit: retro-commit (farmer.freenode.net irc.freenode.net) 12:53:41 --- join: retro-commit (n=Karere@c-68-80-139-0.hsd1.pa.comcast.net) joined #retro 12:55:35 --- join: zbrown (n=suifur@rufius.xen.prgmr.com) joined #retro 13:02:51 --- join: erider (n=chatzill@unaffiliated/erider) joined #retro 14:28:20 whats up everyone 15:01:23 --- quit: zbrown (Remote closed the connection) 15:02:21 --- join: zbrown (n=suifur@rufius.xen.prgmr.com) joined #retro 15:27:37 just got home :) 15:44:20 hi 15:44:46 crc have you played with reva 15:49:22 yes 15:49:37 * crc used to be semi-active in developing reva 15:49:55 --- quit: crcx (Remote closed the connection) 15:50:45 crc: its like retro right? 15:51:00 similar to the older retro system 15:51:07 but with some more advanced features 15:51:29 advanced features? 15:51:46 contexts, turnkey, optimizing compilation 15:51:56 ah 15:52:06 turnhey is a nice feature 15:52:38 retro 10 allows for turnkey images :) 15:54:00 js version 15:54:21 the js version does, depending on the browser 15:54:31 (not all of them support saving the images locally) 15:58:46 crc: retro 10 is completely js implementation right? 15:58:51 no 15:59:19 retro's current implementation is a split vm / memory image 15:59:35 there are vm's written in c, c#, go, js, and java 16:00:45 ah ok 16:01:10 the memory image can be used across the various implementations with only minor tweaks (e.g., the js implementation can't load a raw binary, so I have code to convert the raw binary into a js function for loading) 16:02:06 ok 16:02:21 and that is the js version you have for chrome? 16:02:38 yes 16:04:02 ah ok 16:04:15 hey did you see my post about backspace 16:04:17 bbiab; I have to get the kids ready for bed 16:04:20 yes 16:04:31 I'm investigating the cause currently :) 16:04:53 ok 16:05:05 I will be here 16:05:10 for most of the night 16:10:24 crc: do you still have the retro interpreter on the your website to play with? 16:23:19 yes 16:23:37 try this one though: http://crcx.ath.cx:52850/ 16:23:47 it's a testbed with the latest image + some extensions loaded 16:25:42 crc: are you looking at the backspace or delete 16:25:56 backspace works in some browsers 16:26:08 chrome isn't passing the backspace to my keyboard handler :( 16:26:17 I ok 16:26:27 I am using chrome 16:27:00 me too 16:27:24 ok 16:27:42 I am playing around with reva right now 16:28:11 reva 9.0 16:28:29 9.0.8 is the most current 16:28:52 I have it on a windows image 16:30:21 * erider is trying to remember how to use words 16:30:49 try "help wordname" 16:31:04 I think it still has an integrated help system 16:32:49 yes it does thanks youi 16:33:10 no problem 16:34:40 nice 16:34:50 it has examples too 16:36:23 crc: I want to play with the address words (pointers) ! @ etc.. 16:39:23 http://ronware.org/reva/wiki/Reva_Tutorial 16:40:19 cool!! 16:41:05 also http://ronware.org/reva/wiki/Intermediate_Tutorial 16:42:20 crc: have you see the debugger example 16:42:25 in reva 16:43:12 it hooks into a running process but send 0xcc 16:47:11 that would be cool "a pure forth debugger" that can debugger native win/linux executables 17:41:50 crc: are you still hanging in there 17:50:53 * docl just got home from work 17:51:05 hi 17:51:15 how ya doing? 17:51:25 happy new years eve 17:51:27 good and you 17:51:37 same to you 17:51:41 pretty good 17:52:39 seems like the biggest obstacles for ngaro portability are things like keypresses, timers, and gui stuff 17:52:55 basically it's all the stuff that guis generally take care of 17:53:59 yeah guess you need to tap into the browsers APIs 17:54:13 right, for the browser version 17:54:47 * erider is not versed in javascript 17:55:03 js is pretty simple from what I recall 17:55:05 I don't know how hard it will be 17:55:22 I haven't tried reading the retro javascript code though 17:55:45 there are some things that need to be done I guess 17:56:40 but I think crc will figure it out 17:57:42 docl: how is the block ed coming 17:58:01 it's nice. haven't done anything in the last few days on it though 17:58:12 have you played with it yet? 17:58:25 no 17:58:54 but I have just installed a forth implementation to play with it again 17:58:58 it is in the forthlets package 17:59:19 * docl has forks of a bunch of crc's repos 17:59:45 http://github.com/crcx 18:00:29 ngaro is where the executable for retro comes from. retro10 is where the retroImage file comes from. 18:00:44 forthlets is where we put apps like rem and chorder 18:00:56 wheke is for libraries like strings and arrays 18:01:21 interesting 18:01:32 wheke is a word for octopus... probably because it is all the arms of retro reaching out 18:02:50 if you want to share changes you make, you can either make gists or fork the projects and push your changes to the forks 18:03:19 until the backspace is working I will play with forth in the OS setting :) 18:05:18 and not in browser mode 18:08:31 yeah browser mode is a bit too quirky for me at the moment 18:12:20 docl: how do you use the editor 18:12:51 go to forthlets and type "retro --with apps/rem.retro" 18:13:03 (assuming linux, and assuming retro is in the path.) 18:13:38 ok some you call it from the cli 18:13:46 ok cool 18:14:26 I thought maybe you needed to add it on the fly with "needs rem" 18:14:35 you could make a shell script to call it for you I guess 18:14:46 not a way to do that at present :( 18:15:43 I see 18:17:28 what are v, a, c == char? l == long int? maybe 18:18:22 in the code there are comments you can read. 18:18:54 v is view (it is part of the original block editor, short for view) 18:19:26 l = lines c = columns 18:19:54 for this program anyway :) 18:20:25 ah ok 18:27:01 docl: I wonder if it will work in reva 18:27:27 good question 18:28:04 nah 18:28:09 I think reva may be like retro 9 or 8, which used counted strings and "parse" instead of zero terminated strings and "accept" like we use in retro 10 18:28:15 not without tweaking 18:29:38 that is one thing the is crazy about forth. there are many forths 18:29:52 yeah... 18:30:37 there's so many ways to solve a programming problem... not everyone is going to agree on one single way 18:31:14 like strings... 18:31:27 a string is just a bunch of chars in a row, right? 18:31:36 but how long is that row? 18:31:59 you can just say how long it is every time you use the string 18:32:18 yeah but to make forth a followed language there should be one standard cross implementations so you can move code from one forth to the next 18:32:43 hmm 18:32:47 there is ANS forth 18:33:41 yeah 18:34:18 each forth the is different is a different language in my opinion 18:38:01 dialects 18:38:11 true 18:38:23 the lure of forth is that it lets you make your own dialect 18:38:37 you make your own words, then make words out of those... 18:39:15 yeah but there still is syntax the you need to use 18:39:26 and if you don't like the name of a word you just change it. or make another word that does the same thing 18:39:46 there's so many choices. swap drop or nip? 18:40:28 true 18:41:29 the only thing that I see that most forths follow is : ; 18:41:41 hehe 18:41:54 words bye . : ; 18:42:12 yup :) 18:42:42 of course you don't even need those :P 18:43:49 humm 18:43:50 ' bye is quit ' : is sub{ ' ; is } ' . is print-tos 18:46:25 that would be cool because that would be added to the dictionary 18:47:07 yep 18:47:15 the ' word is part of retro 18:47:38 it takes the word after it and finds the address it points to, and places that on the stack 18:48:35 is makes a vector to the word. we used to have one called alias, I think it may not be in the dictionary anymore. 18:49:24 ( name -- xt ) 19:08:00 : alias create ['] .word last @ dup d->class ! d->xt ! ; <- not sure why this does not work. 19:11:18 create makes a word. it is of the class .data initially 19:12:12 so to make it type .word we need to get the xt of .word, which is what ['] does when you are compiling. (['] is a macro that does at compile time what ' does at interpret time.) 19:13:06 last @ goes to the dictionary entry for the word that was just created. last is a variable that always points to the most recently made word. 19:13:20 oh I see my bug 19:13:31 I used ! right after dup 19:13:47 so it just saved the class address to itself, which is useless 19:14:36 what I needed to do was tuck 19:14:38 : alias create ['] .word last @ tuck d->class ! d->xt ! ; 19:14:39 ! is like assign or better yet "foo = 3" == 3 foo ! right? 19:14:49 right 19:15:03 pronounced "store" 19:15:10 and @ is "get" 19:15:15 no wait, it's "fetch" 19:15:18 * docl calls it get 19:15:24 for some odd reason 19:16:13 but foo has to be declared first before you can store to it right? 19:16:25 with that alias definition you can make a new word that is type .word, and yet points to the address you give it. with ' that lets you alias one word to another 19:16:35 right 19:16:43 variable foo 19:16:49 10 foo ! 19:17:00 you can also use 10 variable: foo 19:17:21 that is how you would initialize a variable 19:17:31 10 constant bar is how you do a constant 19:17:48 constants do not need you to use @, but variables do 19:18:00 a constant is like a word with the stack diagram 19:18:07 ( -n ) 19:18:21 variables are more like ( -a ) 19:18:28 a is short for address 19:18:35 n is for number 19:18:59 a variable is basically a pointer 19:19:50 "create" makes a pointer as well, but does not allocate any space 19:20:07 so it just points to "here" 19:20:13 back again 19:20:37 create foo variable bar would thus make foo and bar be aliases for the same variable 19:21:08 variable allocates space 19:21:13 right 19:21:29 create foo 1 allot = variable foo 19:21:42 here = heap @ 19:21:56 1 allot = heap ++ 19:24:41 heap ++ = heap @ 1 + heap ! 19:25:21 there's lots of little labor-saving words in forth... basically that's the point, you get to write short words and make more words out of them. 19:26:02 sometimes you use create for arrays. for example: 19:26:11 mylist 0 , 0 , 0 , 0 , 19:26:18 makes an array of 4 cells 19:26:23 oops 19:26:27 create mylist 0 , 0 , 0 , 0 , 19:26:40 this is equal to: create mylist 4 allot 19:27:06 actually maybe not quite equal since the first example fills it wit 0s 19:27:30 allot only changes where here is pointing to 19:29:52 so maybe I want something that initializes the list with zeros... 19:30:00 docl: I could change that easily enough... 19:30:28 : zallot dup here swap 32 fill allot ; 19:30:39 (I forget if that's the right order for fill) 19:31:25 : zallot ( n- ) repeat 0; 32 , 1- again ; 19:31:28 another way of doing the exact same thing: : zallot for 0 , next ; 19:31:31 would be more efficient 19:31:32 and you can use @ and + to scale to array 19:31:49 docl: but it wouldn't handle negative allotments 19:32:08 oh yeah, I forgot allot accepts negatives 19:32:40 the repeat example is nifty 19:35:08 : abs dup 0 hmm, how would I use that to do negative allotments? 19:39:11 better to have the general purpose allot, and a separate allot word for initializing memory if you need to 19:39:32 yeah 19:40:01 otherwise you'll need conditional inside the allot word 19:40:46 which complicates allot a lot :) 19:41:27 : allot ( n- ) dup 0 or: 19:41:39 : allot ( n- ) heap +! ; 19:41:53 : zallot ( n- ) for 0 , next ; 19:42:06 erider: as you can see there's tons of ways to decide to do things... no wonder not all forths are like :) 19:42:20 the second is more words, but a cleaner separation IMO 19:42:32 * docl agrees 19:42:34 yeah 19:42:55 seperating things like this is what forth is about IMO 19:43:27 I stick to the basics 19:43:40 : array create allot ; 19:43:52 7 array myarray 19:44:26 that does the same as create myarray 7 allot 19:45:35 note that "create" does the parsing for the string (myarray) at interpret time. when the compiler is active (after a : ) it does nothing. 19:46:46 there's a lot of power in distinguishing compile time from interpret time... 19:47:05 docl: remember the stack comments... 19:47:12 oops 19:47:28 : array ( "n- ) create allot ; 19:47:45 or would that be ( n"- )? 19:47:54 n"- 19:48:51 : array ( n"- ) create allot ; 19:49:21 : zallot ( n- ) for 0 , next ; 19:49:49 : array ( n"- ) create zallot ; ( might be better ) 19:50:20 zallot is a good candidate for stage2 19:50:25 :) 19:50:37 hmm 19:51:23 any questions from the audience? ;) 19:53:00 * docl just noticed in my examples, one time I used 32 and the other time I used 0, for the same thing 19:53:21 32 is the space character, which is good for initializing a string 19:54:06 0 is number zero, also can terminate a string 19:54:53 : spaceallot ( n- ) for 32 , next ; 19:56:27 docl: ifExists and ifNotExists - would ifDefined and ifNotDefined be better names? 19:56:44 might be 19:57:03 is there a specific context where camelCaps is preferred? 19:57:25 nope 19:57:37 basically wherever there's more than one english word to the word name? 19:58:03 that's generally what I'm doing, except in a few cases (variable names) 19:58:12 ok 19:58:31 I noticed getLine, for example 20:00:07 defined !defined 20:00:27 hmm 20:00:47 [crcx/retro10] e6630e: fast-render => fastRender 20:01:00 a few renamings, and I added zallot 20:01:36 I wonder if we should factor out something like blockIf, and use "defined blockIf" and "not defined blockIf" 20:03:01 possibly, but is there a good example of another place we need block conditionals? 20:05:24 maybe for compatibility issues. but with ngaro that shouldn't be a factor. 20:05:49 * docl will see if he can think of some 20:05:55 ok 20:17:47 [crcx/forthlets] 3c5424: use ifDefined instead of ifExists 20:25:22 docl: you running retro 10 on linux 20:29:22 yeah 20:29:46 you are not running the js version right 20:29:50 no 20:30:03 you used git to get from the repo 20:30:10 yep 20:30:29 crc: are you using svn too 20:30:38 erider: git, not svn 20:31:28 so you are not using svn too :( 20:31:39 no 20:31:45 I gave up on svn 20:36:55 crc: I can use svn pretty good :) 20:37:37 svn doesn't handle massive restructurings as well as git does 20:37:54 * erider is running linux mint now 20:39:46 [crcx/ngaro] 471211: add stubs for canvas ports to graphical vm 20:40:06 crc: is it like svn in general ie git update etc .. 20:40:15 git add 20:40:20 git commit -m 'message' 20:40:28 git push 20:40:54 git clone 20:40:56 git pull 20:41:04 would cover the basic commands 20:41:13 git pull "is to get the repo" 20:42:49 pull latest changes from remote repo 20:50:36 erider: the fundamental difference between git and svn is that svn is centralized and git isn't 20:50:54 each git repo is a full copy, with all history, etc stored locally 20:51:24 with svn, you can make a local copy, and push/pull from a single master repo 20:51:38 with git, I can pull from a master repo, or any other copy of the git repo 21:07:46 [crcx/ngaro] 9111e1: graphical port: setting colors and drawing pixels ... 21:19:47 [crcx/ngaro] f8c4ca: graphical port: added vertical and horizontal line... 21:25:46 [crcx/ngaro] 6de88a: graphical port: added rect and solid rect 21:30:38 still buggy, but getting closer to being usable 21:36:46 --- quit: erider (Read error: 113 (No route to host)) 21:50:48 [crcx/ngaro] e9c120: graphical port: update after a draw operation 22:07:18 cool 22:07:47 [crcx/ngaro] c14aab: fix color maps 22:08:24 docl: I should have this mostly complete by the end of the weekend 22:09:47 [crcx/ngaro] c85798: match resolution of js canvas port 22:10:14 :) 22:19:47 [crcx/ngaro] 48aca1: fix to rect and solidRect positioning 22:21:54 the two canvas demos are running now, with only minor display bugs 22:22:38 where are the demos located? 22:23:20 forthlets/apps/canvas and forthlets/games/canvas 22:24:51 ok : (draw ( n- ) over 350 50 50 solidBox 22:24:51 Word Not Found 22:25:07 is there something else I'm supposed to load first? 22:25:29 that was apps/canvas/draw.retro 22:25:35 sorry 22:25:41 retro10/source/extras/canvas.retro 22:25:45 has to be loaded first 22:25:56 ahh 22:33:04 cool, it draws! 22:36:46 [crcx/forthlets] df44ff: use "fw" and "fh" to obtain resolution info 22:36:47 [crcx/ngaro] 733288: more rect fixes 22:39:33 I'll do circles later, then it should be all set :) 22:39:51 :) 22:40:42 the sdl-based implementation has a hybrid canvas/framebuffer. you can directly access the video memory starting at address 6000000 22:42:54 nice! 22:43:06 tictactoe is taking a long time to load 22:43:27 here it is 22:44:11 it's almost instant for me :( 22:44:44 it was faster this time 22:44:54 I wonder why 22:45:34 * crc will try to find out later today :) 22:46:37 ahh 22:46:37 I need to get some sleep now, but should be back in ~6-8 hours, or maybe earlier; depending on the kids 22:46:45 it has to do with the stdout I bet 22:47:07 it tries to inform you of all the pixels being written to... takes time to scroll by. 22:47:12 I removed that a little while ago 22:47:37 when I switch to a different screen it loads quickly 22:47:37 it was useful while debugging the rects 22:48:17 ah, now it is gone. instant! 22:48:56 good :) 23:59:59 --- log: ended retro/09.12.31