00:00:00 --- log: started retro/10.02.05 01:32:56 --- join: virl (~virl__@chello062178085149.1.12.vie.surfer.at) joined #retro 04:26:59 --- quit: crcx (Remote host closed the connection) 04:35:30 --- join: crcz (~crcz@bespin.org) joined #retro 07:33:02 good morning 10:38:25 --- join: erider (~chatzilla@pool-173-69-160-231.bltmmd.fios.verizon.net) joined #retro 10:38:32 --- quit: erider (Changing host) 10:38:32 --- join: erider (~chatzilla@unaffiliated/erider) joined #retro 10:38:48 hi 10:48:11 hi erider 11:24:32 --- join: blueskiesokie (~471df08c@gateway/web/freenode/x-emfmkuijdnfuupem) joined #retro 11:35:28 hello 11:43:41 hi 11:48:51 whats new 11:49:18 nada here, just browsin for stuff i can do on my peek 11:49:43 got it out of the closet and dusted it of the other day, gonna try it out again 11:55:46 --- join: Mat2 (~5b43e0dd@gateway/web/freenode/x-evcgygrgmddeqjda) joined #retro 11:55:53 hello 11:59:26 hello 12:03:06 hello 12:03:50 what's going on ? 12:06:45 ok, it seems not much yet 12:06:53 hi mat 12:06:59 ;l #forth 12:07:13 hi crc, have you interest in another bench test ? 12:07:35 mat, i csn run it after i get home tonight 12:08:18 still at work for another 2-3 houtsrs 12:10:14 thanks, I have changed the benchmark a bit so the opcode bundling features of AVM are now used, these decreses the run-time on my celeron asus netbook by 90% 12:10:54 I will upload the new benchmarks in an hour 12:16:47 *Mat2 hopes the results for the celeron cpu gives an better insight into the ratios for your Dual Code II mac* 12:17:22 ok 12:17:38 i'll pull and run as soon as i get home 12:19:56 :l ##forth 12:20:34 hmm, the client is sensitive to leading spaces. i may have to work on that 12:20:54 #:m #forth hi docl 12:21:16 yup. denitely neeeds work 12:21:47 back to single-channel mode 12:21:47 hi crcz 12:21:55 hi docl 12:22:03 hi Mat2 12:22:59 I will give some new experiences about token threading to the forum soon 12:23:06 any suggestions for my forum? structure or anything? 12:23:29 I found the new design better as the old one (more colorful) 12:23:34 :) 12:24:37 I just tweaked the CSS a bit 12:24:55 will you post the url on something like clf ? 12:25:12 I should 12:25:26 I don't use usenet much though 12:25:55 --- quit: blueskiesokie (Quit: Page closed) 12:26:17 ...and you don't know what kind of people (trolls) special on clf will be inspired to join 12:26:27 hehe 12:26:42 well I can always ban trolls :) 12:27:19 yes, and there are many serious people also 12:31:00 I can post some infos about the forum on the cmelforth and reva forum, possibly it interessts some folk there 12:31:04 interests 12:32:07 I think it would interest helmar also, the author of 4p (formerly helforth) 12:32:22 sounds great! 12:32:45 he don't have a forum for his forth at current 12:33:06 * docl has looked at 4p 12:33:35 we can set him up one then if he's interested :) 12:34:15 I found the sources (4p) a bit chaotic but the JIT compiler was an inspiration for my native code compiler (extended-ngaro) 12:37:40 the tiny stove he descries on his site is nifty 12:38:01 * docl is reading the 4p sources now 12:38:21 actually I don't think I had looked at before. I must have been thinking of foerthchan 12:39:22 you're right, the code is a bit chaotic 12:39:37 I should look at your ngaro-extended stuff 12:39:41 how does it work? 12:40:35 the native code compiler is an extension to the instruction set, one opcode for compilation of vm-code streams and one for execution 12:41:59 compiled streams can be called from ngaro though an opcode prefix so compiled code is handled like any other instruction (the compiler extend the instruction set) 12:43:38 at run-time of course 12:45:43  12:45:52 a stream... that's just a string of code, right? 12:46:23 i have a non-extended subset of mat's ngaro in 10.5 12:47:19 cool 12:47:29 the stream isn't a string 12:47:51 I mean a sequence of vm-code 12:48:24 not string (ascii chars), but sequence of numbers (codes) 12:48:26 codes 12:48:34 makes sense 12:48:37 more quirks in thoiis client 12:48:43 :| 12:48:52 i need to get it to ignore the trackball 12:49:15 hmm, looks like some ANSI escape codes ?!??? 12:50:16 with unicode 12:52:04 im not sure what sequences it dumps into the input stream 12:52:29 UTF-8: +/- character 12:53:02 carriage return 12:53:38 ill add a filter to strip out non-ascii sequences 12:54:04 i think the trackball is simulating the keybaord, which this client 12:54:24 ***arrow keys, which this client doesnt support 12:55:54 likely 13:03:19 *reminds Mat2 on the Commodore Basic screen-editor which inserts control-codes if one use a joystick or mouse in Port 2* 13:06:37 docl: Can I sent Helmar you e-mail address ? 13:07:31 your 13:20:26 docl ? 13:20:52 hmm ok, I will sent him only a link to the forum 13:27:27 yeah sure, so ahead 13:27:36 sorry, was afk 13:28:30 as soon as he signs up I can give him admin access, he can admin his own forum(s) that way. 13:32:57 let us see if he's interrested 13:33:05 admin access is only for a limited number of people I trust of course, but I'm pretty sure Helmar is in that category. 13:35:53 whats up guys 13:38:00 hi erider 13:38:59 have coded an threading-benchmark which utilize AVM code features like opcode bundling and conditional execution. 13:39:42 and now i'm writing a Wiki entry about benchmarking with the current results including the tests from crc 13:39:50 * erider is really starting to like reva 13:40:16 Reva is fine (but cpu dependent) 13:41:57 its good to play with forth and assembly at the same time 13:43:14 you will find that Forth can be as high level as you want 13:43:42 really for a language that is in love with numbers 13:47:34 Mat2: I would say at the top-level it is high level but building the low level stuff it still low level diddling 13:48:07 if that makes sense :) 13:48:54 hmm, another crazy bench result 13:49:54 *Mat2 begins slowly to think Intel's dual core cpu line must have a really bad integer performance* 13:51:10 Mat2: have you seen this http://docs.google.com/View?id=dg2mc47m_116g29h297q 13:54:03 --- quit: Mat2 (Ping timeout: 248 seconds) 13:59:14 --- join: Mat2 (~5b43e0dd@gateway/web/freenode/x-jvbqynqrtywiiaiu) joined #retro 13:59:24 Mat2: did you get that link 13:59:35 hmm, no, what link ? 13:59:42 Mat2: have you seen this http://docs.google.com/View?id=dg2mc47m_116g29h297q 14:00:05 --- quit: SimonRC (Ping timeout: 246 seconds) 14:00:18 I know this 14:00:38 ok sorry :) 14:01:09 but I have expected these bad performance 14:01:29 Mat2: you said that you are a rainbow forth user 14:01:46 hmm, no I have played a bit with it 14:02:06 but it was ease to use in opposition to colorforth 14:02:24 because of dvorak keyboard layout 14:03:03 Mat2: what is you day to day forth implementation 14:03:15 your* 14:03:21 retro and gforth 14:03:37 ah 14:03:56 but I like the concepts of colorforth 14:05:04 and have an predilection for functional programming 14:14:00 Mat2: which one 14:14:07 --- join: SimonRC (~sc@fof.durge.org) joined #retro 14:14:11 hi 14:14:24 factor 14:14:32 and haskell 14:16:22 factor is that forth 14:16:50 factor is more like lisp with an postfix syntax similar to forth 14:17:19 I like ruby and scheme for functional languages 14:17:48 you can program with functional style without problems in forth also if you be aware of possible side effects 14:18:10 and colorforth can be seen as an functional language 14:18:25 onyl avoid to use variables 14:18:56 only 14:20:47 hmm avoid to use variable 14:24:48 Mat2: I don't get haskell 14:27:09 there's a good introduction: http://learnyouahaskell.com/introduction 14:28:34 ok, the monad concept is a bit overabstracted 14:34:50 * erider doesn't have the room in his head to try to look at another language right now ( C, ruby/python, forth, asm, scheme) will keep him busy for a long time 14:35:09 Mat2: thanks 14:58:32 crc: are you readin ? 15:07:38 yes 15:07:46 still not home though 15:10:27 http://rapiddatabase.assembla.com/wiki/show/avm/Benchmarks 15:27:16 crcz I think you have something with the one size cell 16:00:03 crc: the new benchmark file is AVM: test-threading-BrImm-opt.c, for ngaro and gforth: sb-threading-opt.4th 16:00:50 --- quit: SimonRC (Ping timeout: 246 seconds) 16:01:09 I must get some sleep 16:01:14 ciao all together 16:02:11 --- quit: Mat2 (Quit: Page closed) 16:13:14 --- join: SimonRC (~sc@fof.durge.org) joined #retro 16:21:06 crc so reva macro is used instead of immediate? 16:21:45 back 16:21:50 erider: basically, yes 16:22:13 ok 16:22:26 erider: retro has one addressable memory unit: 32-bit cells 16:22:40 I like it :) 16:23:25 it's a big simplification 16:24:08 yeah one size fits all 16:48:53 it really simplifies memory access 16:49:00 and reduces the wordset you have to deal with 16:49:31 that is cool 16:52:04 erider: did you see docl's double-linked list code? 16:52:11 no 16:52:18 one second... 16:52:20 but this is interesting 16:52:32 I have a 2d array word now 16:52:37 http://forthfreak.net/misc/bashforth.examples/SmallOOPS.bashforth 16:52:43 http://www.forthcommunity.com/forum/viewtopic.php?f=9&t=19 16:53:44 erider: that's LGPL :( 16:54:36 I was just looking at it because I thought it was interesting the there was a forth implementation in bash and a OOP extension 16:54:44 --- quit: SimonRC (Ping timeout: 246 seconds) 16:56:43 results of mat's new benchmark on my system: 16:56:44 http://gist.github.com/296438 16:59:47 brb 17:05:26 --- join: SimonRC (~sc@fof.durge.org) joined #retro 17:42:17 hmm 17:44:03 crc so vocab is used for context 17:44:20 contexts are far more powerful than vocab 17:44:47 contexts can have custom 'find' type words, etc bound to them, have a search order, etc 17:45:21 * erider is not up on context and the usage yet 17:46:23 I am working with the most basic forth words that are in most forth implementation 17:46:32 ok 17:46:55 * crc is only aware of two forths with contexts: HelFORTH / 4p and Rea 17:46:57 *Reva 17:47:06 I am just playing with the most common primitives 17:47:44 reva uses ~ for context I think 17:49:16 so vocab is some type of class 17:49:57 vocabs are data structures with a class of .vocab 17:50:51 it looks like it has a run-time and compile-time behavior 17:51:15 yup 17:51:36 it kind of reminds me of create ... does> 17:52:08 create ... does> is built over word classes (in retro) 17:53:37 I think I am finally getting it but still I don't get .class stuff 17:53:49 most forths have two loops 17:54:02 ok 17:54:06 the first is the interpreter, used when "state" is off (set to 0) 17:54:11 begin again 17:54:11 it does the following: 17:54:15 1) lookup a word 17:54:20 2) if found, execute the word 17:54:27 3) if not found, try to convert to a number 17:54:34 4) if successful, push number to stack 17:54:42 5) if not successful, report error 17:54:49 6) repeat 17:54:59 I get that 17:55:03 then there's a compiler loop, which is used when "state" is on 17:55:18 does the same, except step 2 is "compile the word if not immediate, or execute if it is immediate" 17:55:25 retro uses a single loop 17:55:30 1) lookup 17:55:55 2) if found, push xt of word and xt of class to stack, then execute the class 17:55:55 --- quit: virl (Read error: Connection reset by peer) 17:56:04 the rest is the same 17:56:22 is class >body 17:56:34 the classes take care of dealing with the distinction between compiling and interpreting 17:56:36 no. 17:56:41 >body = xt of word 17:56:51 the class is a separate word that deals with other words 17:57:02 docol 17:57:10 no docol 17:57:41 classes are just words, like everything else 17:58:04 but it is in the definition of each word when compiled 17:58:11 not in retro 17:58:18 retro has no docol 17:58:39 ok how is the header arranged 17:58:40 classes are assigned in the dictionary header, as a pointer to a word that will handle the xt 17:58:50 first, a link to the previous entry 17:58:58 second, the xt of the word 17:59:06 third, the xt of the word's class 17:59:12 fourth, the name of the word 17:59:16 that's it 17:59:42 xt of the words class hmmm 17:59:47 the exact order can vary, so we have d->xt, d->class, and d->name to access them in a readable and portable manner 17:59:52 but those are the fields 17:59:57 (in retro) 18:00:13 so it is just a field of flags 18:00:27 3 pointers, and a string 18:00:43 (the name field is a variable-length string, not a pointer) 18:01:09 I am talking about the xt class 18:01:18 xt class is a pointer 18:01:27 ah ok 18:01:33 it holds the address of the class handler 18:01:36 and it points where 18:01:48 it holds the address of the class handler 18:02:20 and the class handler is another interpreter 18:02:20 it could potentially point to any word 18:02:31 no, it's just another normal word 18:02:39 there's only one actual interpreter loop 18:02:52 the class can do whatever you want 18:03:50 | link | xt | xt class | len |-> name of word | 18:03:55 no len 18:04:01 the name is a zero-terminated string 18:04:27 ok 18:04:37 code sample: 18:04:39 three pointers and a string 18:04:39 : .hello ( a- ) ." Hello from " xt->d d->name type cr ; 18:04:39 : foo 1 . ; 18:04:39 ' .hello reclass 18:04:42 erider: yes 18:05:15 erider: this uses the 10.5 image file (for xt->d ), but shows a class that just displays a message 18:06:01 so d->name will content the most recent definition 18:06:07 no 18:06:16 it access the name field of a dictionary header 18:06:23 ( d-a ) 18:06:32 d being a pointer to a dictionary header 18:06:35 a being the address of the name string 18:07:11 and you reclass .hello? 18:07:14 (latest image at http://retroforth.org/retroImage)3 18:07:26 http://retroforth.org/retroImage)3 18:07:27 what did you change the class to 18:07:33 http://retroforth.org/retroImage 18:07:39 ' reclass 18:07:53 changes the class field of the most recently created word to the specified address 18:08:02 so it changes foo to use .hello as the class 18:08:56 so when foo is found by the interpreter loop (the "listen" word): 18:09:03 the address of foo is pushed to the stack 18:09:11 the address of the class (.hello) is pushed to the stack 18:09:15 the class is then called 18:09:52 so it gets the address of the word (foo), finds the header corresponding to it (xt->d), then uses d->name to get the name and "type" to display it 18:14:55 so now foo can call .hello 18:15:07 foo doesn't call .hello 18:15:26 the interpreter passes the address of foo to .hello 18:15:33 and .hello uses it somehow 18:17:40 so who is the caller 18:17:47 listen 18:17:53 ultimately 18:18:07 listen calls .hello, which handles foo 18:18:48 so I guess with this style it give retro flexibility 18:19:29 reva does something similar 18:19:38 erider: it allows a lot of flexibility 18:19:50 we aren't limited to compile/interpret behaviors 18:20:00 we can have classes that do all sorts of things 18:20:18 like what 18:21:21 tracking statistics, handling other threading models (e.g., mix direct, indirect, and subroutine threaded code) 18:21:28 display debugging information 18:21:31 I want to understand the true power 18:23:34 : .show-source-before-handling ( a- ) dup :see .word ; 18:23:34 : foo 12 . ; 18:23:34 ' .show-source-before-handling reclass 18:24:00 when foo is execute, it'll display its code before being executed or compiled 18:24:53 variable called 18:24:53 : .update ( a- ) called ++ .word ; 18:24:53 : foo 12 . ; 18:24:53 ' .update reclass 18:25:09 in this one, the contents of the 'called' variable are increased by 1 each time 'foo' is called 18:25:19 so you can track how many times it's encountered 18:26:59 or: 18:27:02 : .increment ( a- ) ++ ; 18:27:02 variable foo 18:27:02 ' .increment reclass 18:27:07 foo foo foo foo 18:27:08 ' foo @ . 18:27:12 does much the same as: 18:27:30 : increment create 0 , does> ++ ; 18:27:33 increment foo 18:27:36 foo foo foo foo 18:27:39 ' foo @ . 18:28:07 * crc will stop for a moment to let you read the examples 18:28:38 thanks I am trying to figure it out 18:38:07 crc I can't get this code to run in my retro 18:38:23 erider: what errors are you getting? 18:38:36 no :see 18:38:44 so older than 10.4 18:38:52 download http://retroforth.org/retroImage 18:39:09 and use this image (it's the latest, from my personal source tree) 18:42:37 hey are : .show-source-before-handling ( a- ) dup :see .word ; : foo 12 . ; together 18:42:59 : .show-source-before-handling ( a- ) dup :see .word ; 18:43:02 would be a class 18:43:05 : foo 12 . ; 18:43:10 is just an example to use with it 18:43:23 ' .show-source-before-handling reclass 18:43:24 ok 18:43:43 you could replace that 'foo' with something else, use 18:43:52 ' .show-source-before-handling reclass 18:44:00 after defining the word 18:46:31 crc can you talk to me about the concept of what we are talking about 18:46:47 ok 18:47:26 at a fundamental level, word classes are a way to group related words, based on runtime and compile-time behaviour 18:47:45 a word class is a function that takes an address and does something with it 18:48:00 the "core" classes for me are .word .macro and .data 18:48:11 .word is used for ~90% of all words 18:48:33 it will either execute a word, or compile a call to it, depending on the state of the 'compiler' variable 18:48:58 .macro is used for anything that needs to be run at compile time, rather than compiled into a definition 18:49:11 it will *always* call the word, and never compile a call to it 18:49:26 .data is used for all data elements (variables, constants, numbers, and so on) 18:50:09 it will either leave the address/number/etc on the stack, or compile it as a literal value (via the 'lit' instruction) into a word's definition 18:50:23 these three will cover all of the core functionality a forth system needs 18:50:32 do you follow so far? 18:50:41 yes 18:50:45 ok 18:51:09 rather than restrict the behavior to these three areas, we allow for the user to create custom classes 18:51:20 but I am trying to tie them to some other concepts that I understand in forth but I am finding it hard to do 18:51:33 most forths don't have the concept of a word class 18:52:20 the ability to create classes allows for some additional things 18:52:36 so we have three behaviors run-time compile-time and ??? 18:52:47 the number of behaviors is variable 18:52:54 generally you have run and compile time 18:53:16 but with classes, there's no formal split between compile time and runtime 18:53:24 just a single variable that the classes look at 18:53:56 so you have a stage effect tied to a word 18:54:17 words are bound to classes, which determine behaviour 18:54:44 the behavior can be anything. compile. run. increment value. decrement value. display text. etc 18:54:48 no limits 18:55:47 ok 18:56:06 so action in general 18:56:10 retro is unusual in terms of how flexible it is 18:56:15 erider: yes 18:56:34 the interpreter calls the class handler, which decides what action to take with the xt of the word 18:56:58 so the interpreter can be really simple, and encompass any behavior the programmer wants 18:57:28 going a step further. when a header is built (by 'create'), it's given a default class of .data 18:57:34 : changes this to .word 18:57:43 after the ; you can assign other classes 18:57:53 e.g., immediate will do: ' .macro reclass 18:58:01 to change the class of the most recent word to .macro 19:02:29 so by changing the class you can change the behavior 19:04:26 crc or in better words by changing the pointer to something else you can get different behavior 19:05:01 yes 19:05:11 we would call this changing the class 19:06:25 is that where reclass comes into play 19:08:36 let me think on what we talked about and I have more questions I will hit you up tomorrow caio 19:08:49 if I have*** 19:11:14 ok 19:13:17 --- quit: erider (Ping timeout: 256 seconds) 19:36:22 * crc added a link to this discussion in the log to the WordClass wiki page. Should hopefully be helpful as a reference in the future. 20:38:14 --- join: sixforty (~sixforty@pdpc/supporter/active/sixforty) joined #retro 23:59:59 --- log: ended retro/10.02.05