00:00:00 --- log: started retro/10.01.03 00:18:18 Interesting... got these numbers running my linked list unit tests... 00:18:24 op name num times run 00:18:24 VM_NOP 0 1686828 00:18:24 VM_LIT 1 596776 00:18:24 VM_DUP 2 354978 00:18:24 VM_DROP 3 192523 00:18:24 VM_SWAP 4 498816 00:18:26 VM_PUSH 5 255910 00:18:28 VM_POP 6 255289 00:18:30 VM_CALL 7 842791 00:18:32 VM_JUMP 8 68854 00:18:34 VM_RETURN 9 788402 00:18:36 VM_GT_JUMP a 0 00:18:38 VM_LT_JUMP b 2 00:18:40 VM_NE_JUMP c 88780 00:18:42 VM_EQ_JUMP d 69413 00:18:44 VM_FETCH e 456318 00:18:46 VM_STORE f 124043 00:18:48 VM_ADD 10 73111 00:18:50 VM_SUB 11 98 00:18:52 VM_MUL 12 160 00:18:54 VM_DIVMOD 13 4 00:18:56 VM_AND 14 110 00:18:58 VM_OR 15 0 00:19:00 VM_XOR 16 0 00:19:02 VM_SHL 17 0 00:19:04 VM_SHR 18 0 00:19:07 VM_ZERO_EXIT 19 192190 00:19:08 VM_INC 1a 290331 00:19:10 VM_DEC 1b 1788 00:19:12 VM_IN 1c 5801 00:19:14 VM_OUT 1d 29774 00:19:16 VM_WAIT 1e 11902 00:19:18 VM_OTHER 1f 1 00:21:31 And sorted with just the top few... 00:21:58 192523 VM_DROP 3 00:21:58 255289 VM_POP 6 00:21:58 255910 VM_PUSH 5 00:21:58 290331 VM_INC 1a 00:21:58 354978 VM_DUP 2 00:21:58 456318 VM_FETCH e 00:22:00 498816 VM_SWAP 4 00:22:02 596776 VM_LIT 1 00:22:04 788402 VM_RETURN 9 00:22:06 842791 VM_CALL 7 00:22:08 1686828 VM_NOP 0 00:22:14 Interesting the imballance between push and pop... 00:24:33 I'll go build the image total the nembers and that'll be my last spam on the topic... 00:34:37 --- quit: docl (Read error: 110 (Connection timed out)) 00:35:46 Ok this is from rebuilding the image. 00:35:51 1405321 VM_ZERO_EXIT 19 00:35:51 1896205 VM_POP 6 00:35:51 1901369 VM_PUSH 5 00:35:51 2184320 VM_INC 1a 00:35:51 2592068 VM_DUP 2 00:35:51 3427665 VM_FETCH e 00:35:54 3616721 VM_SWAP 4 00:35:55 4574574 VM_LIT 1 00:35:57 5798633 VM_RETURN 9 00:35:59 6227704 VM_CALL 7 00:36:01 12463392 VM_NOP 0 00:54:04 So very roughly, 1/4 of the instructions executed are a NOP. So there's an easy 25% speedup by changing the implementation of vectoring. 00:55:11 Maybe only 20% still... 00:57:08 I think I'll make a version of the vm with all the stack manipulations as primitives, and findout what the code really wants. But it's clear swap and dup are gonna be way up there. 02:46:59 Hmmmm are there tests to see if my changes broke the vm or not? 03:04:26 Eeep! Is this a bug, or by design? 03:04:46 : if ( f-) compiler @ 0; drop TRUE literal, ` =if ; compile-only 03:04:55 Shouldn't it be... 03:05:12 : if ( f-) compiler @ 0; drop FALSE literal, ` !if ; compile-only 03:20:58 wow... I added over and nip as vm primitives. nip caused about 0 change since it is basically only used in / and in code I just wrote. But over... a *huge* change. 03:21:03 670917 VM_NE_JUMP c 03:21:03 820152 VM_DUP 2 03:21:03 1040378 VM_STORE f 03:21:03 1418639 VM_DROP 3 03:21:03 1426663 VM_ZERO_EXIT 19 03:21:03 1808222 VM_OVER 20 03:21:05 1864331 VM_SWAP 4 03:21:07 2218961 VM_INC 1a 03:21:09 3477577 VM_FETCH e 03:21:11 4075953 VM_RETURN 9 03:21:13 4511893 VM_CALL 7 03:21:15 4634508 VM_LIT 1 03:21:17 9031836 VM_NOP 0 03:23:11 Notice that push and pop aren't in the top 13? It seems they are "mostly" used to implement over! 03:24:38 116127 VM_POP 6 03:24:38 121332 VM_PUSH 5 04:07:36 Fascinating, I think. With no over op code, about 90% of the time push/pop are implementing over, about 66% of the time dup is implementing over, and about 50% of the time swap is doing over. 09:27:22 js4: the definition of "if" has changed in the development codebase 09:37:42 js4: occurrence metrics: http://gist.github.com/268054 09:39:34 that should cover almost all words defined in the current development codebase of retro 09:41:59 --- join: sixforty (n=sixforty@pdpc/supporter/active/sixforty) joined #retro 09:49:08 hi sixforty 09:49:35 hi, crc 09:49:45 --- topic: set to 'Retro Forth | http://retro.tunes.org | http://retroforth.org | Stable Release 10.3.1 - January 2010' by crc 10:10:34 --- join: docl (n=luke@97-120-215-229.ptld.qwest.net) joined #retro 10:11:27 docl: http://gist.github.com/268054 for code occurrence metrics 10:12:30 cool 10:16:24 --- quit: docl (Nick collision from services.) 10:20:47 [crcx/retro10] 48d1b3: minor tweaks to formatting in README 10:20:47 [crcx/retro10] 80fb52: start adding commentary gists 10:23:36 --- join: docl (n=luke@97-120-215-229.ptld.qwest.net) joined #retro 10:29:36 --- join: docl_ (n=luke@97-120-215-229.ptld.qwest.net) joined #retro 10:31:28 --- join: nigol (n=nigol@63.120.broadband10.iol.cz) joined #retro 10:31:35 hi there 10:31:39 hi nigol 10:31:54 crc: hi 10:31:56 nigol: the midp code appears to crash after I hit space or enter 10:32:38 crc: I know, it is full of bugs. But I have much more improved version now. 10:33:43 crc: For now, it works setColor from your graphics library and now I'm working on other gfx primitives. 10:33:55 cool 10:34:13 * crc recently finished adding the graphics stuff to the sdl-backed implementation 10:34:24 btw, the vector font is pretty cool 10:35:21 crc: I will send you improved version :) 10:35:31 nigol: thanks 10:35:46 [crcx/retro10] 47a114: commentary files all rst format now 10:36:15 crc: Thanks. Main advantage of this font is, that you can simply scale it up and down. I will add this feature to ports soon. 10:39:00 crc: Current version sent. You can define setColor simply as in yours library : setColor 1 6 out wait ; 10:39:54 crc: But for now it accepts only RGB value for colors. I will add same colors, as yours VM using - from 0 to 15. 10:48:20 nigol: now it's working :) 10:49:22 crc: Great :) 10:51:11 "clear" doesn't work, so once output scrolls offscreen I have to quit/restart, but looks good otherwise 10:52:22 Hi everybody! 10:52:25 crc: Yes, I must fix this as soon as possible. BTW. what clear sends in current version? In older, there were some ANSI code or what... 10:52:32 js4: Hi 10:53:14 clear is tied to emit now; and is done by sending a negative value to emit 10:53:36 so the vm can clear the display in the best way, rather than trying to parse ANSI escape sequences 10:55:07 crc: Great, this is better solution IMHO. 10:55:33 any plans to have other curses like behaviors? -1 clear screen, -1xxxyyy goto row y Column x, -2 clear to end of line, .... 10:56:38 Doesn't make nearly as much sense for framebuffer type graphics output rather than character only... 10:56:53 js4: possibly in the future 10:57:22 js4: I've begun dabbling with an escape-sequence based library for console vm implementations 10:58:02 crc: Cool re. escape sequences for output. And thanks for the word occurances! They don't seem to include the words from the meta.retro though. 10:58:43 they don't cover the metacompiler words 10:58:51 those would have to be done separately 10:59:06 I'm working right now to find out "what is the distribution of lengths of straight line sections of forth?" i.e. how many ops before a call/ret/xxx_jump/xxx_exit 11:00:30 That bit of info will strongly affect any more cpu designs I do. If it is something like 4 then the c18 (5 bit opcodes, 18 bit cells) is closer to right than quark (4 bit opcodes, 32bit cells) 11:02:23 Are you interested in my changes to findout opcode usage and straight-line-distribution? If so I'll go ahead and set up with git, branch from head, merge my changes... 11:02:29 that'll vary a lot depending on code in question 11:02:30 js4: yes 11:03:46 [crcx/retro10] 9dae86: update initial images 11:03:48 I agree, it will def. depend on what code you run. Would be nice if there was already a nice big pile of code to build a performance measuring suite from. Right now I am using "build the image" as the benchmark. 11:05:21 ok... I'm off to learn git and all... 11:07:24 Maybe I should learn git too. 11:11:34 --- quit: sixforty ("reboot") 11:16:46 js4: there are the examples in the forthlets repository 11:18:19 nigol: git is pretty useful 11:21:03 crc: I heard that. But as I'm using Smalltalk most of time, git is not very usefull for me. 11:21:27 makes sense 11:23:25 crc: But for file-based prog. languages is git very helpful as I know. 11:41:19 I must go away, so happy coding. 11:41:37 --- part: nigol left #retro 11:44:51 hmmm do I need to give git a un/pw to access the fork I made on github? 11:46:37 you might need to register your ssh public key with github 11:48:31 see http://github.com/guides/providing-your-ssh-key 11:50:50 Looks like I gotta do that... I can't push to git://....../js4/retro10 12:03:25 * crc has made a clone of your fork and is awaiting updates :) 12:19:34 I made one update... but just noticed I don't have the vm directory. 12:19:44 that's a separate repo 12:19:51 o.o 12:19:52 * crc maintains separate repos for each part 12:20:06 ok... /me pokes at github 12:20:12 retro10, ngaro, wheke (the library), and forthlets 12:20:56 see http://gist.github.com/267807 12:21:35 So you see my changes yet? 12:21:41 yes 12:21:46 one patch 12:21:50 in (remap-keys) 12:22:03 1 commit... very boring... decided I better test the second one before pushing it... then found I have no vm ^_^ 12:22:23 yes, I checked in with out test building *blush* 12:22:43 * crc is currently booting windows in vmware so he can try to setup cygwin 12:25:37 ouch! I feel for you, installing cygwin in a vm... sigh.... enjoy network fun! 12:27:32 Cool, just tested my previous checkin, looks OK... now to make it erase characters on the screen... 12:28:50 ooops, something changed... hmmm.... 12:29:17 bah, the vmware disk image doesn't have enough space 12:29:31 * crc will try to connect to one of the machines at work.. 12:33:18 btw, if you go to http://github.com/js4/retro10/edit/hooks and add an email hook to "x121s at retroforth.org" your commits will be displayed in this channel by the retro-commit bot 12:34:37 replace " at " with the obvious character? shift2? 12:35:14 yes 12:35:42 ... 12:35:47 [js4/retro10] 87db69: make backspace erase characters it backs up over i... 12:35:50 ^_^ 12:36:29 now to go make my hacks to collect usage statistics cleaner... they kinna ugly right now... 12:36:59 retro .... --opstats file.text 12:37:03 look OK? 12:37:44 yes 12:37:52 no --opstats, no runtime cost, no output. with --opstats writes to named file when vm exits. 12:38:04 very good 12:38:24 later will read in the file and add to counts there... 12:41:42 work machine has ~7gb free; so should be ok for a cygwin install 12:45:11 * crc has noticed just now that the vms (other than the C one) all have backspace clear the previous character 12:45:38 The vm's are doing it? Hmmmm..... 12:46:14 well my code shouldn't make other vm's unhappy... I don't think... 12:46:56 no, but it is more efficient if the vm handles it 12:48:07 The problem is that if the vm does anything other than send the key to forth, then forth will be contraigned. Imagine how an editor written in forth will work? Remember in emacs control-h is *not* the delete backwards command. 12:48:33 js4: that's just the display code in emit, it's not altering the key being passed to retro 12:49:09 oh... hmmm... similar issue, but not as bad as doing something when you give the key to forth. 12:49:32 it is often nice for ^h when emited to just move the cursor, nothing else. 12:50:51 in some ports (javascript), it's not possible to simply move the cursor back non-destructively 12:51:09 Oh that stinks. 12:54:24 I can either change the console vm to match the others, or the others (except for the javascript one) to match the console vm 12:55:32 not doing the erase in the VM is more flexible for forth, but will make javascript inconsistent with others. tough call. 12:55:50 and it's your call too ^_^ 12:55:53 yup 12:56:01 * crc will think about this one for a while 13:02:51 cygwin install has begun 13:25:47 [crcx/ngaro] 96c40a: console port now has destructive backspace, matchi... 13:36:59 --- join: erider (n=chatzill@unaffiliated/erider) joined #retro 13:48:05 so how come git didn't complain when I submited my change to console vm? Nothing about your change was out there... 13:48:26 hi al 13:48:28 l 13:48:36 Hi Erider 13:50:36 hi there 13:58:39 wow, I can't figure out how lists.retro works at all. 13:59:41 js4: is there a lot of words you are not familiar with? 13:59:51 ok what is the case 14:05:01 yeah prolly I am lost at step 1 with the word ` 14:06:37 so I can't decide where lists is storing stuff. 14:08:38 are there words you recognize 14:10:24 I am not confident about for, and totally lost with `. The rest seem fine, but I think there a big piece of context I am missing... 14:15:37 js4: did you ask crc 14:16:39 only when I said "wow, I can't ..." 14:21:57 --- join: virl (n=virl__@chello062178085149.1.12.vie.surfer.at) joined #retro 14:22:04 well I am sure now the retro for is the one I expect. but there's some magic going on in that code I don't understand. 14:24:30 Hi virl 14:29:39 hi 14:29:47 yo.. what's up. 14:31:08 trying to understand http://github.com/crcx/wheke/blob/master/contrib/lists.retro 14:32:03 I *think* I understand ` now... 14:33:32 ` : If in compile mode, make the word that called ` run the following word from the input stream when the word that called ` is run. or maybe ... 14:34:43 no that is a bad description... let me try again.... 14:35:48 ` -- compile into my caller code to call 14:39:12 what is r 14:40:42 erider: same as r@ in reva 14:41:16 js4: ` is class-aware 14:41:30 Yes, that I get... 14:41:30 ` bar = ['] bar class-handler-of-bar 14:42:18 I think "1 2 3 3 list foo" add's foo to the dictionary, and stores 4 cells of data. 14:43:14 maybe "access foo 1" will give me 1, or maybe 3... or maybe 2... 14:43:18 js4: each fork is a separate copy, you'd have to pull from mine to get my changes 14:44:18 how can I see what pull would give me? Can I pick and choose parts to include or not? 14:46:44 so it plays with the return stack 14:47:14 js4: cherry picking is possible: http://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html 14:47:17 erider: yes 14:47:41 js4: github has visual tools to help 14:48:12 I can go to http://github.com/crcx/ngaro/forkqueue and see any patches pushed to any of the forks, and apply them from there 14:50:26 sav is kinda like a textual substitution macro -- ": foo sav ... ;" acts like ": foo dup push ... ;" 14:50:48 [crcx/ngaro] 7a9011: Add --opstats [file] to console vm 14:50:51 --- join: sixforty (n=sixforty@pdpc/supporter/active/sixforty) joined #retro 14:51:20 sav can't just do a "dup push" 14:53:01 js4: it could 14:53:10 actually no 14:53:15 it needs the ` 14:53:26 otherwise dup and push are compiled into sav 14:53:44 compare the difference with 'see'. 14:53:53 yep 14:54:47 [crcx/ngaro] 162cb0: remove "got here" message; minor formatting tweaks 14:55:34 js4: very nicely done 14:55:55 oops! SOrry about that "got here" 14:55:59 *blush* 14:56:09 not a problem 14:56:36 I don't understand *how* ` does it yet... but I think I understan what it does... 14:57:53 and maybe there is a bug... 14:58:24 details please 14:58:35 ": sav ` dup ` push ; : foo sav . pop ; 1 2 foo . . ." 14:59:08 js4: you need to make sav into a macro with 'immediate' or 'compile-only' 14:59:19 oh. 14:59:36 forgot that 15:00:11 * crc is going to get a lot of use out of --opstats 15:02:30 it is *very* interesting data I think. In particular it suggests to me remove all the different kinds of if opcodes, replace with one maybe two then add over as a primitive. And removing the if's is optional, just if you feel you need to stay under 32 operations. 15:03:11 it'll be a while before I make any changes to the core instruction set 15:03:12 infact my current tar-baby op code set has no if. it has only ret and a funny kind of zret. 15:03:43 adding instructions to the vm is easy... haven't tried removing any yet. 15:04:29 removing will be tricker due to the metacompiler 15:04:33 JZRET ( xa-xa|0a-)( if (0==x) ip<-a drop drop fi) 15:05:25 --- quit: sixforty ("Leaving.") 15:05:44 Yeah... may take a cople go rounds... 15:10:17 also... there are many places where you have something like 0 , or 8 # , or something. instead of using the nmemonic opcode. Haven't figured out why yet. 15:10:31 the network connection on my work system is slow today :( 15:10:36 v.v 15:10:53 hmmm... lunch time I think... bbiab 15:11:12 the core.retro could be cleaned up further, but I don't alter it often 15:11:37 and it's actually a slightly tweaked version of the original, non-metacompiled source 15:11:43 I can understand why, that code makes my head hurt when I think of trying to write something like it from scratch. 15:21:29 I've actually rewritten large portions of it more than once. It's not too bad if you remember to use # after constants/literals/etc 15:30:03 my intuition says there's a better way. But when I sit down to do it.... my head explodes. 15:34:31 I occasionally dabble at ideas for cleaner metacompilation, but haven't made any real progress 15:34:56 it's at least not worse than the original non-metacompiled source 15:36:34 * docl wrote lists.retro a few days ago 15:37:37 I am impressed, it's pretty clever. I should maybe submit my linked list implementation. It's not very clever, and is very straight forward. It does hint how to do a more general dynamic memory thing in forth, but I don't love it much. 15:38:28 feel free to share any code samples 15:40:16 ok.... about 10 lines of code, and about 110 lines of test code. I want to do a better test harness thing next time... 15:40:36 Should I make it two files? 15:40:43 yes 15:41:28 The test code does ": test ; ( .... tons .... ) forget test" 15:48:44 you can always use gist for the test code 15:49:52 I don't know what gist is, and I am pretty heavily influenced by "test first" coding practices. I *like* test code being checked in. 15:50:18 I just don't want it poluting my dictionary after it finished running. 15:50:55 gist.github.com 15:51:09 it's a pastebin type service provided by github 15:56:56 forget should work. It erases the compiled code as well as the names, right? 15:57:01 yes 15:59:57 you could also do "stub test ( add all kinds of temporary words ... ) forget test" as it forgets anything defined after the word as well. 16:00:24 stub test = : test ; 16:00:30 create test would be acceptable too 16:02:40 stub is generally preferable for readability to : ... ; where ... is an empty definition 16:04:47 [js4/wheke] 6fff6f: Simple linked list code 16:06:47 [crcx/wheke] 296100: Simple linked list code 16:07:10 wow... must not be too ugly then ^_^ 16:08:13 "ll.var" is the same as "variable" 16:08:28 0 variable: 16:08:36 --- quit: docl_ ("Lost terminal") 16:08:50 tiny difference... but yeah, just a 1 cell variable. 16:08:54 0 variable: is the definition of variable 16:09:05 really? lol. 16:09:29 yup 16:13:53 [js4/wheke] cf504d: removed ll.var -- use variable 16:13:57 for variables visible outside the program, we use app:varname 16:14:26 so ll:free.list ? 16:14:30 yep 16:14:50 I didn't think much about what to make visible or hide... ok, I'll go rename it... 16:14:59 although I wouldn't use the dot personally, possibly hyphen or camel case 16:15:43 are you familiar with {{ ... ---reveal--- ... }}? 16:15:50 IPersonallyDespiseCamelCaseBecauseItIsUnreadableInMyOpion. I-prefer.almost_anything=else. 16:16:03 :) 16:16:05 Yes I've seen it. I am just not sure what I would want to expose or not. 16:16:28 ll:freelist ? 16:16:48 rename all/some of my words to ll: too? 16:16:57 crc has recently started using some camelcaps in the dictionary, not sure I like it. (though if word lookup was caseInsensitive I probably wouldn't care) 16:17:24 yeah that would be good 16:17:26 ll:make, ll.data, ll.next, ll:push, ll:pop... ? all colons? 16:17:46 dot is used for functions 16:18:04 although since the definition of ll.next is ( 0 + ) I don't actually ever define it. 16:19:09 AllCamelsAreEvilSmellingHadToManageBeastsIReccomendKeepingTheNoseFarFarAwayFromTheTent. 16:19:19 LoL 16:19:25 s/Had/Hard/ 16:19:47 and woe betide if you capitalize the first letter ;) 16:20:13 crc: is there a reason for the dictionary to be case sensitive? 16:21:50 using getlength getLength and GETlength for different purposes would seem to me bad form 16:22:07 I keep thinkin I'll do CAPforth == RED-DEFINE, green-compile, Yellow-Run 16:22:45 GET-LENGTH 7 ret FOO .... get-length ... Get-Length Seven Add .... 16:23:09 docl: I can do case insensitivity as a library 16:23:29 ooops "GET-LENGTH seven ret" 16:24:41 or "Seven ret"?? Hmmm.... ok... I'll go put over, nip, rot, and a few others in the VM and work on getting "straight line code length distribution" 16:25:17 heh, we could make it dash-insensitive with some fancy footwork. all dashes not starting or ending the word could be stripped out 16:25:48 could have repercussions if you had something like cell-- though 16:25:55 Hmmmmm 16:26:43 ok, retro coding standard pkg:publicvar pkg.publicfun ?? 16:26:51 yep 16:27:01 : for words, . for variables 16:27:17 really? 16:27:30 that wasn't how I remember doing it in rem 16:27:31 actually, I have that backwards, sorry 16:27:35 :) 16:27:43 * crc is a bit tired due to overwork 16:28:50 wasn't there a gist on this topic? 16:29:23 http://gist.github.com/261779 16:30:22 that's the one :) 16:31:48 no wiki? 16:32:09 we have an old wiki that's currently locked to read-only 16:32:27 ok, np... 16:32:42 any more code review/ cleanup you want me to do with ll? 16:32:57 not at present 16:33:15 ok, I just saw another test case I need to check... 16:40:47 [crcx/retro10] 878d21: add code style notes 16:45:48 crc: are you doing double duty with retro js and retro os 16:46:21 erider: I just try to keep the vm implementations as consistent as possible 16:47:20 crc: are you using custom opcode for ngaro 16:47:59 ngaro is not compatible with any known cpu architecture, though it was loosely influenced by some of the MISC systems I've studied 16:48:50 crc: so where is the translation happening 16:49:12 ngaro acts as an emulator for the virtual computer 16:49:17 or is everything running inside the vm 16:49:29 it's all inside the vm in my implementations 16:49:52 mat2 has an implementation that is capable of limited compilation to native code 16:50:25 so you have emulated a cpu 16:50:33 yes 16:51:17 cool 16:56:46 [crcx/wheke] 6fff6f: Simple linked list code 16:57:40 heh, 131 tests... 17:03:02 nothing wrong with that 17:06:46 [js4/wheke] b77dcf: match coding standard, give more examples 17:06:53 So what does the commit message "[crcx/wheke] 6fff6f: Simple linked list code" mean? 17:08:07 js4: I think that docl has committed his simple linked list code to the repo 17:09:43 crcx = me, wheke = repo, 6fff6f = part of hash for the commit, "simple linked list code" is the commit message 17:11:53 * docl doesn't remember committing the linked list I was working on 17:12:41 erider: js4 has committed his own linked list code. I am reading through it to see how it compares to mine. 17:12:47 [crcx/wheke] b77dcf: match coding standard, give more examples 17:12:48 [js4/ngaro] e5e8b1: console port now has destructive backspace, matchi... 17:13:16 ah ok 17:13:17 http://gist.github.com/267777 has mine, including a port of it to reva 17:14:19 it's not complete enough to commit to a repo though, it was more for demonstrating how they work 17:20:37 I dunno... the messages from git are confusing me a little bit... I think I saw crc commit(? apply? merge? integrate?) my initial linked list code twice. 17:21:00 And in my fork queue it shows my own change probably won't apply cleanly to my fork. Huh??? 17:21:32 if any of your changes appear in the fork queue, ignore them 17:22:59 * docl is making some formatting changes to match ll.retro to the coding styles crc recommends 17:25:28 hey is tib like scratch 17:26:20 tib is where stuff goes when you first type it. you want to move it out of there before accepting another string from the prompt 17:30:49 docl: please, feel free! I'll try to more accurately reflect the style you submit in my future submissions. all: I have no code ownership issues -- it's *the* code, not *my* code. And I strongly believe any 1 coding standard is better than any 2, or 3 or... 17:31:10 :) 17:32:25 * crc will note that although there is copyright/license stuff listed on most of my source files, I really don't care what you do with my code either. I'd go public domain if it was legally possible. 17:33:12 one change I am tempted to make is to make the input be line buffered, and wait for a cr or lf till it starts running. This would let you backspace backwards over spaces. Is there a reason that isn't already done? 17:33:27 What is the legal reason preventing it? and what is ISC? 17:33:28 personal preference 17:33:47 js4: most countries apart from the USA don't recognize an actual public domain 17:33:53 ok, so I won't submit any line buffering code I write. 17:34:08 js4: and therefore contributors from outside the USA can't easily use code without a copyright/license 17:34:21 Oh.... can you point me at ISC? If it's reasonable looking to me I'll switch. 17:34:22 js4: ISC = simplifed BSD license preferred by the OpenBSD project 17:34:34 it's in the retro10 top-level directory 17:34:41 ok, I'll read it... 17:35:49 js4: if you add line buffering, please submit it. there's a lot of people who prefer that, and I'd be interested in trying to make it a loadable option. 17:35:57 ok, what me to slap that in ll.retro and ll-test.retro with my legal name instead of Charles Childers? 17:36:26 the copyright message I mean... though I'll wait till docl is finished fixing the code before I fix the comments ^_^ 17:36:34 * docl was working on line buffering. lemme see if I already gisted it or not 17:36:40 js4: look at contrib/saftey.retro for an example header block 17:36:56 * crc is gradually adjusting the libraries to list contributors and license 17:37:16 * crc is also putting license text in a licenses directory in the library 17:37:42 docl: http://gist.github.com/267730 ? 17:38:03 docl: you are here by granted limited power of attorney to type that stuff for me... if you want. My legal name is Jay Skeer. If you don't do it I'll do it and list you as a coauthor. 17:40:30 is CC0 fine? I think that's basically public domain with additional clauses that extend it to other countries without a public domain... 17:40:31 Hmmm... kinda complicated. I was thinking of a 1025 char buffer. You hit 1024 and it goes right now, even if you just typed "...... creat". The reason for 1024 is so it can gulp a whole block at a time if it gets them. 17:40:47 docl: CC0 is fine too 17:40:55 CC0 and ISC are my preferred licenses 17:41:05 Uh.... ISC I know... CCO is a CC license and I don't know it. 17:41:22 ISC does have a disclaimer of warrenty, which CC0 lacks 17:41:29 ISC it is then 17:41:44 * crc is currently doing CC0 for docs and ISC for code 17:42:57 ok it is in my wheke now 17:44:23 docl: have you used your linked list in any other code 17:44:43 crc: that's the one. it is still incomplete though, as it does not yet have a mechanism to look up the buffered text 17:44:46 [crcx/wheke] 82c75c: style issues, added license info 17:45:05 erider: no, I haven't 17:46:02 js4: I reworded a lot of the comments for brevity so I wouldn't have to go multiline. hopefully the meaning is still clear. 17:46:46 [js4/retro10] 3f6e65: add code style notes 17:47:14 hmm, I left some capital L's in there that I meant to take out 17:47:37 L is for link? or cell? 17:50:43 hmm 17:55:31 L is the address of a linked list element, a 2 cell block of memory in the heap with no dictionary header. 17:56:30 probably "a" should be used for an address. 17:56:55 that's why the stack diag for ll.data is ( L-a ). I am OK with a, but there are two different kinds of addresses those words deal with. 17:58:09 re. rewording, cool thanks! 17:59:13 hmmm the the github web page doesn't show me. Is there something I have to do to see your changes docl: ? 17:59:48 http://github.com/docl/wheke 18:00:11 click on the number next to "commit" and you can see the diff 18:00:38 looks like the crcx repo has the changes as well 18:02:06 to download from crcx to yours, use "git pull git://github.com/crcx/wheke.git master" from your working directory, then "git push" to update your github site 18:02:33 Looks good, I like it. 18:02:38 :) 18:03:19 do I "git pull git://github.com/***docl***/wheke.git" to get your stuff? 18:03:24 without the *'s 18:03:32 yes 18:03:50 though pulling crcx should work now that his is updated with mine 18:03:56 ok... 18:04:50 git is very eglatarian, you can just not pull from someone who has buggy code 18:07:11 it was created out of Linus Torvald's intense burning hatred of CVS 18:07:46 he did a google talk on the topic, lemme get the link 18:08:03 http://www.youtube.com/watch?v=4XpnKHJAok8 18:08:36 I'll watch later when the code is boring me... 18:08:52 good idea :) 18:09:00 --- quit: erider ("ChatZilla 0.9.86 [Firefox 3.5.6/20091201220228]") 18:11:46 [js4/wheke] fcc3fe: style issues, added license info 18:13:37 So want all the l's lower cased? Or a note at the tab about what L is and what a is in this context? Or make all the l's into a's? 18:13:56 crc: what do you think? 18:14:21 L:a like $:a I think. 18:14:34 or l:a... 18:16:15 lowercase l, with a note might be best 18:16:49 l is a specific case of a 18:17:43 ok, will do. 18:20:37 lowercase is preferable IMO 18:21:54 [crcx/wheke] fcc3fe: style issues, added license info 19:01:05 --- quit: docl (Read error: 104 (Connection reset by peer)) 19:04:40 --- join: docl (n=luke@97-120-215-229.ptld.qwest.net) joined #retro 19:17:24 is there a way to tell git to ignore certain files? like .o files? 19:17:46 [js4/wheke] 7d431e: Final (?) code format cleanup. 19:27:08 add the files to ignore to .git/info/exclue 19:27:32 err, .git/info/exclude 19:27:46 thanks! 19:28:24 no problem 19:28:46 [crcx/wheke] 7d431e: Final (?) code format cleanup. 19:29:47 [js4/wheke] dcee23: Really final code format cleanup. 19:29:47 lol 19:30:46 [crcx/wheke] dcee23: Really final code format cleanup. 19:32:28 now... I want to write something so that... 19:32:54 you can have the tests quit if ll.retro isn't included first using ifNotDefined 19:32:59 something like: 19:33:17 test=: a.name test words here 7 ; ( magically checks top 2 stack elements are =) 19:33:22 ifNotDefined ll.new { bye } 19:33:43 coolo, I'll do it. 19:34:33 eep! I deleted the copy ritght notice, but not the authors or license. lol... 19:39:50 didn't work 19:40:16 hmm, 10.3 image or one built from the repo? 19:40:48 built from repo I think... let me check... 19:41:06 10.3 didn't have the ifDefined / ifNotDefined, but the repo image should 19:44:14 ok ifNotDefined ifNotDefined RETRO 10 19:44:14 19:44:14 ok 19:44:50 that's not right :( 19:44:53 I get: 19:45:05 RETRO 10 19:45:05 ok ifNotDefined ll.new { bye } 19:45:05 ok Treebeard:library charleschilders$ 19:45:14 I typed "ifNotDefined ifNotDefined (" 19:45:38 ifNotDefined { ... code to execute if word is not found ... } 19:45:49 let me rebuild maybe... I suppose my changes to the vm might a broken... hard to see how though... 19:53:36 yeah, def broken, but not sure why... debugger time I guess... 20:04:43 $ $f --with ../t.retro --trace --opstats ./opstats.txt 2> t.trace 20:04:43 RETRO 10 20:04:43 20:04:43 ok ifNotDefined ll.new RETRO 10 20:04:43 20:04:43 ok bye) 20:04:45 Word Not Found 20:04:47 20:04:49 ok bye 20:04:51 Jay@black ~/src/forth/retro/git/retro10 20:06:08 js4: { and } not ( ) 20:06:26 c-style braces, not parenthesis 20:07:10 ifNotDefined ifNotDefined { bye } works for me 20:07:16 lol 20:07:43 * docl wonders why the reaction to parentheses though 20:08:09 Want the trace file? 20:08:11 docl: anything other than a { does the same thing 20:08:15 js4: sure 20:09:21 no then in "block" 20:09:29 yup 20:11:01 that fixed it 20:11:15 I added an error message if you don't use a { after the word 20:11:46 [crcx/retro10] a39024: fix to ifDefined / ifNotDefined 20:13:30 so the =if was jumping to 0? 20:13:33 yes 20:14:19 Hmmmm.... I'd change the start address to something other than 0 and have some code sitting at 0 waiting for that... maybe could be added to safety.retro ... 20:15:32 at 0 is a jump, so the target (in address 1) could be pointed to anywhere 20:15:55 except that if you save the image, the initial jump needs to be the entry point for the forth system 20:15:56 but then the image would be funny if you did a save. 20:16:46 so have to either change the start address (big deal) or hook save in safety somehow... but def worth watching that address 0's contents doesn't change. 20:20:43 here is save ] [ 1 @ literal, ] 1 ! 1 4 out wait ; 20:20:59 done. now you can alter the jump, and save will reset it to the original. 20:21:38 I did think ( was an especially funny character to use.... 20:21:59 is it possible to save just the blockfile, or just compiled code, to retroImage? 20:22:19 docl: compiled code, yes, with --shrink argument 20:22:47 [crcx/wheke] 827832: safety net: now reset initial jump on save 20:22:49 docl: no option to save just blockfile, since that can be various sizes and at different memory locations 20:23:18 maybe you could have a save-area argument which lets you specify which parts are getting saved. 20:24:26 are blocks allocated on the heap? 20:24:54 blocks are saved in the heap 20:24:59 generally near the end of memory 20:26:52 set-blocks changes the first block to an earlier point? 20:26:57 docl: you can use dd to extract 20:27:02 docl: yes 20:27:12 docl: use 'offset @ .' to get the address of the blocks 20:27:29 then: at the command line: 20:27:36 dd if=retroImage of=blocks skip=address ibs=4 20:27:47 you'll get a file containing the blocks 20:28:19 nice 20:28:56 it's a minor extra step, but not hard 20:29:01 * crc should document this too... 20:29:46 I want to write (simulations of) the block words. Including load. 20:30:28 should be fairly easy, I have fig source, I know fileio in c... 20:30:54 docl: http://gist.github.com/268300 20:30:56 if the ANS set isn't too bloated maybe do them. 20:37:27 thing is, I looked at that code ages ago and it (normally) hooks into listen/expect or a friend. 20:38:46 [js4/wheke] 3e689d: fix copyright, ifNotDefined ll.new { bye } 20:41:46 [crcx/wheke] 3e689d: fix copyright, ifNotDefined ll.new { bye } 20:47:46 [crcx/retro10] d54670: add notes on extracting and injecting the blocks i... 20:48:11 http://github.com/crcx/retro10/blob/master/doc/notes/blocks.rst - covering both extracting and injecting the blocks 20:50:30 would be easier to edit with a text editor if you could collapse them into bytes instead of cells. 20:51:10 colapse what into bytes? 20:51:38 if you extract the blockfile and look at it in an editor, you see three zero bytes after every space 20:51:47 because they are really cells 20:51:50 oh 20:52:19 ^@ is what I see in nano 20:53:19 tr -d \000 < with-nulls > just-text 20:53:20 ??? 20:54:02 didn't work 20:56:10 tr -d '\000' blocks.txt 20:56:47 works :) 21:00:01 sed -e 's/\(.\)/\1\x00\x00\x00/g' < blocks.txt > blocks.blk 21:00:08 depends on endian issues though 21:00:57 docl: then: 21:01:09 fold -w 64 blocks.txt >readable.txt 21:06:05 tr -d '\012' < readable.txt > blocks.txt 21:06:20 how does one add the nulls back in though? 21:07:43 good question 21:09:33 sed -e 's/\(.\)/\1\x00\x00\x00/g' < blocks.txt > blocks.blk 21:09:49 sed -e 's/\(.\)/\1\x00\x00\x00/g' blocks.blk 21:10:21 but you need to adjust the second part to put the non-null where it belongs. 1st, last, or whatever 21:10:41 sed -e 's/\(.\)/\x00\x00\x00\1/g' blocks.blk 21:10:43 maybe 21:11:50 though the newlines fold put in might need to get removed with tr 21:12:24 tr -d '\012' < readable.txt > blocks.txt 21:12:29 worked for me 21:12:52 yep that should remove linefeeds 21:13:57 but I would do: 64-chars-newline.txt | sed ... | tr ... > foo.blck 21:22:20 js4: the sed doesn't work for me. I get strings with x00x00x00 in ascii added, not binary nul's 21:22:48 what os and version of sed? 21:23:09 sed for me is 4.1.5, 2003 21:23:28 may be shell and quoting issues with the \'s 21:25:18 $ ls | sed -e 's/\(.\)/\1\x00/g' | od -x 21:25:18 0000000 0052 0045 0041 0044 004d 0045 002e 0072 21:25:18 0000020 0073 0074 5f0a 7300 7500 7000 7000 6f00 21:26:04 0000000 7852 3030 7845 3030 7841 3030 7844 3030 21:26:04 0000020 784d 3030 7845 3030 782e 3030 7872 3030 21:26:15 os = mac os x 10.5 21:26:43 my sed is messing up for a different reason... see 4th block of numbers on my second line? 21:26:57 yes 21:27:01 v.v 21:27:20 my sed is a bsd sed, not the gnu sed, so that may be part of my problem 21:27:40 http://gist.github.com/268323 21:27:43 ok, poke some with dd. I am sure it can pack and unpack... let me look at the manual... (it can even swab I think.) 21:28:42 docl: you'll have to adjust offset if you increase or decrease the number of blocks 21:28:52 true 21:28:54 docl: but looks good :) 21:29:10 block writable inject 21:29:42 sed wants newlines 21:29:59 but it shouldn't mess them up any... 21:30:19 huh? 21:30:28 does that work for you? 21:30:43 nope 21:30:46 if so, great. But sed is probably sticking a newline on at the end. 21:30:54 I still get the x00x00x00 added 21:31:22 sigh... mess with shell quoting. 21:31:39 try alias block="sed -e 's/\\( .... 21:31:43 and \\\( 21:31:46 and \\\\( 21:33:55 still no luck :( 21:34:12 poo! I have no mac, even virtual mac, to try. 21:34:16 sed --version ? 21:34:29 my sed has no --version 21:34:40 O.O 21:35:17 let me look at dd manual, I am sure it can do it... hold on... 21:39:55 oh, for sed also try \o000 \d000 \c@ 21:40:21 then try \x01 \o001 \d001 \cA \ca (should pad with control-a 21:40:37 then you just tr from control-a to control-@ aka null 21:40:58 My dd can't do this conversion... I don't think. 21:41:03 *maybe*.... 21:42:30 dd if=xxx of=xxx ibs=1b cbs=4b obs=4b conv=sync .... 21:42:58 * crc will have to try later. it's getting late and I have to be at work in ~6 hours. 21:43:41 cya later crc 21:44:36 eep! Sleep well, see ya! 23:59:59 --- log: ended retro/10.01.03