00:00:00 --- log: started retro/13.02.02 01:02:01 --- nick: tangentstorm -> tangentwork 03:28:38 --- nick: tangentwork -> reallyworking 03:42:52 --- quit: beretta (Ping timeout: 246 seconds) 03:55:55 --- join: beretta (~beretta@cpe-107-8-120-84.columbus.res.rr.com) joined #retro 04:38:48 --- join: erider (~chatzilla@unaffiliated/erider) joined #retro 04:38:56 hi 05:32:03 I asked YOU. If I wanted to ask HIM I obv would have. 05:43:44 ? 06:06:03 --- join: ncv (~quassel@89.35.216.197) joined #retro 06:06:03 --- quit: ncv (Changing host) 06:06:03 --- join: ncv (~quassel@unaffiliated/neceve) joined #retro 08:06:55 you can do threading if you want, erider ... you just have to implement it :) 08:07:10 erider: the go version of ngaro has some concurrency extensions. 08:07:36 ok cool 08:08:14 --- nick: reallyworking -> tangentwork 08:08:25 --- nick: tangentwork -> tangentstorm 08:08:36 forgot i was in disguise :) 08:14:29 I put two and two together and got tangentstorm :-) 08:48:47 guess it wasn't a very good disguise 08:49:42 well: today i am going to rewrite forth.rx using vm primitives for the flow control. 08:49:57 so that you can use "return" inside them. 08:50:16 because returning from a quotation isn't quite the same. 09:23:30 --- join: kbmaniac_ (~androirc@86.157.24.246) joined #retro 09:31:22 --- quit: crcx (Remote host closed the connection) 09:31:59 --- join: crcx (~crcx@li125-93.members.linode.com) joined #retro 09:34:28 finished up some server stuff. I'll get an alert on my ipad now if the irc client shuts down :) 09:34:48 cool :) 09:35:03 crcx: so what's up with the parable vm? 09:35:16 ( i haven't looked, just remember you tweeting about it a while back ) 09:37:02 tangent: I'm slowly writing implementations of the vm (rutime, not ui/compiler) in PHP and Python 10:23:34 what are you doing different from ngaro? 10:32:52 the vm supports some types, lacks jumps, and has a rather larger set (67 currently) of opcodes. also memory model is very different 10:34:25 you wrote a book about retro? http://forthworks.com/dev/corpse/article/9 10:34:43 no jumps?? interesting. 10:40:34 parable allows for calls and conditional calls, but has no jumps 10:41:28 I never did finish rewriting the book :( 10:42:16 it's cool that you wrote and published one to begin with! :) 10:43:39 I'd like to try again sometime. It'll be easier now that I'm not constantly changing things. 10:45:15 : words last [ d->name puts space ] ll.each ; <- this seems very nice.. i'm not sure how to replicate it with each@ ... 10:45:35 * tangentstorm looks up how "words" is defined now.. 10:48:43 : list ( a- ) [ d->name puts space ] 3 ( ^types'LIST ) each@ ; 10:49:34 i like this pattern of putting the type on the stack 10:50:58 i wonder if "." could be used to do that for any variable... 10:51:22 : words last repeat @ 0; dup d->name puts space again ; should work as well (without combinators) 10:52:41 :) quotes and combinators are a whole lot prettier than forth style. 10:55:23 did i ever post this here? http://games.tangentcode.com/retro/src/console.html 10:55:35 i don't think i did, because for ages i thought it was broken. 10:55:46 probably won't work on an ipad though. 10:56:10 color javascript terminal for ngaro.js 10:59:58 yes; I've played with it under chrome (at work). no luck on ipad (iirc, it loads, but no keyboard input is available). under ie on win8, just get a gray box 11:04:23 weak. 11:04:54 oh i have an android tablet now! i should try it the no-keyboard way myself... :) 11:05:40 --- quit: ncv (Remote host closed the connection) 11:08:05 --- join: ncv (~quassel@unaffiliated/neceve) joined #retro 11:28:35 --- quit: ncv (Remote host closed the connection) 11:46:52 calls are nothing more then a push/jump pair 11:48:40 yep 11:51:16 i really like this quotes-for-html syntax: http://forthworks.com/dev/corpse/article/124 11:59:42 reminds me of the website I had written in lisp macros 12:08:24 tangentstorm: are you still coding ngaro by hand in its opcode? 12:08:52 or did you finish that perl script 12:11:28 the perl script was sort of just an experiment... 12:13:00 i've got two assemblers in this directory that i created in retro itself the other day: https://github.com/sabren/b4/tree/master/rx 12:13:08 ( ng.rx and b4.rx ) 12:14:32 ng.rx is pretty close to what assembler.rx does, except it's for the current image rather than a target image... so you don't need # or :label or and you can call any normal word 12:14:59 it's pretty trivial. 12:15:44 b4 is an assembler for non-forth people i guess :) 12:41:09 tangent: which android tablet do you have? 12:41:28 nexus 7 12:51:24 any issues with it? 12:55:18 i haven't used it that much, to be honest. i got it for christmas and i've been pretty much glued to my main computer working all through january :) 13:04:27 --- join: Mat2 (~claude@91-65-144-133-dynip.superkabel.de) joined #retro 13:04:30 hello "! 13:07:32 hi mat2 13:13:42 hi crcx ! 13:13:50 what is going on ? 13:23:00 doing some maintenance on my server (removal of unused packages; tweaks to various scripts; archiving of old projects) 13:27:20 --- quit: erider (Read error: No route to host) 13:36:28 --- join: erider (~chatzilla@unaffiliated/erider) joined #retro 13:36:32 I'm preparing a website for metro 13:36:46 hi Mat2 13:36:51 hi erider 13:52:59 Mat2: what are you up to 13:53:41 try to find the mystery of good web design 13:53:52 lol 13:53:59 for a metro homepage 13:54:09 metro? 13:54:10 :) awesome! 13:55:05 my concatentative, functional retro dialect with auto parallelization for system programming 13:55:34 :-) 13:55:40 hi tangentstorm ! 13:55:43 that was a mouthful 13:55:47 --- quit: impomatic (Ping timeout: 248 seconds) 13:56:10 hello 13:56:17 hi 13:56:58 * tangentstorm is reviewing a bunch of retro stuff today, now that he's had some decent experience writing code 13:57:25 that's very helpful 13:58:31 I discarded hash tables in favour for stack tables, because there reach the same performance relation for small table-sizes 13:58:32 Mat2: did you throw the tcl code over the fence to your tcl guru 13:58:59 not yet, but he will study the code next week 13:59:03 stack tables, eh? 13:59:20 don't know what that is 14:00:37 tangentstorm Mat2 is very low level 14:00:39 that's because that is an approach of mine not documentated (instead for my work at DLR probably) 14:02:30 cool 14:03:29 the algorithm optimize array-bound searches though a stack-cache and make use of SIMD processing 14:04:59 so most seaches can by dynamical handled in an efficient scheme, dependent on a statistical approximation of token accesses 14:05:53 the advantage of it is, that these is an collision free method for accessing array content 14:06:53 it's also really simple to implement 14:07:48 for very large tables, traditional hashing is the better method though 14:16:33 I hape my description is understandable 14:18:46 * Mat2 language mishmash error at line, please consult your BASIC supplier for detailed information (signed. Mr. Gates) 14:19:00 :) 14:19:16 was in the other window trying to clean up my minesweeper code from the other day 14:19:33 i don't understand it, but it's not your language that's the problem :D 14:20:15 have you finished your game ? 14:20:18 i'd have to study the code in a debugger probably and draw little pictures 14:20:20 no 14:20:33 i implemented almost everything and made the ui 14:21:05 so, you make progress 14:21:09 :D 14:21:27 but i ran into problems at the end... i don't know if they were problems in retro or problems with me being tired and unfocused or both. :) 14:21:41 i'm looking at the code now and it's pretty bad 14:21:55 https://github.com/sabren/b4/blob/master/rx/minesweep.rx 14:22:05 a mix of good and bad maybe 14:22:29 as to say with the words of Mr. Moore :"factor, factor, and factor" 14:22:38 i had originally planned to make a graphic ui 14:22:48 but with time running out, i came up with another idea 14:22:53 and it's actually pretty neat 14:22:56 https://github.com/sabren/b4/blob/master/rx/draw.rx 14:23:22 i revector "ok" to show the game board 14:23:52 and then you can just type coordinates: a 3 + to put a flag on square A3 14:24:21 i made it show the stack as you type, like colorforth does 14:24:42 and if you hit "q" to end the game, you go back to the normal ok prompt 14:25:00 well. i made it green to stand out, and made the "word?" error red 14:25:28 nice idea ! 14:25:44 when i get it online, you'll be able to play it in the browser... so if people type "q" then they'll be able to experiment with retro and see what it is 14:26:18 noce :D 14:26:25 sorry nice :D 14:26:48 i now realize i spent way too much time messing with trying to manage the size of the grid when i could have just hard coded it at 16x16 14:27:47 i do like the SET type i made though. 14:28:04 you can use 0 enum| mon tue wed thu fri sat sun | 14:28:11 and then make a set of those 14:28:21 variable weekday 14:28:41 *g*, that is one of the reasons why Mr. Moore have a faible for simplicity (and he is right) 14:29:05 weekday @incl mon weekday @incl tue .... 14:29:24 i know there's a nice combinator to do this but i can't think of it right this second... 14:30:09 anyway... it turns those enumerated values into single bits 14:31:06 so then you can say weekday day in? 14:31:09 for some variable day 14:34:40 i know i'm not making any sense there. sorry. 14:35:45 i wrote this to modify a variable in place : @inc ( a- ) dup @ 1+ swap ! ; 14:35:50 then later i wrote this: 14:36:13 : @dec ( a- ) dup @ 1- swap ! ; 14:37:00 how would i factor out this common "do something with a variable" ? 14:38:35 : with ( aq- ) over @ ` do swap ! ; maybe? 14:38:47 I think it is well focatored out if you only want to increment and decrement 14:39:20 hmm 14:39:46 well i do a lot with set variables in pascal 14:40:29 I think about the best way for factoring pointer arithmetic 14:40:52 like in this game, i use four bits : flag? covered? mine? hint? 14:41:11 hint is for when it should show a number of neighbors that have mines 14:42:11 you can access each bit with mask operations. If you define a cell and use 8 bits for example this would mean 8 words for accessing it 14:42:47 that's what "in" does 14:42:55 and you can write a word for branching dependent on the flag state 14:43:08 0 enum| flag? covered? mine? hint? | ( 0 1 2 3 ) 14:43:15 0 asbit = 1 14:43:25 1 asbit -> 2 14:43:26 tangent: @inc is ++ and @dec is -- also see +! and -! for modifications in place 14:43:29 2 asbit -> 4 14:44:05 crcx: yeah. i think i may have actually implemented them with ++ and -- originally... 14:44:22 i'm trying to write this so it's easy to use as a test case for the oberon compiler 14:45:02 http://www.inf.ethz.ch/personal/wirth/Articles/Oberon/SETs.pdf 14:46:37 INC DEC are the ++ / -- functions. IN, INCL, EXCL are the primitive set operations 14:47:04 i found myself wanting to do these things on the stack part of the time, and with the variable other times 14:47:37 as rule, I would handle up to 3 parameters on the stack 14:47:59 but oberon code doesn't know about the stack :) 14:48:34 in oberon/pascal you'd use a variable or a function parameter. 14:49:08 not sure if my compiler is going to be smart enough to optimize un-necessary variable usages for a long time. 14:49:32 i'd be happy if it runs at all :) 14:49:32 you must check the stack state at compilation anyhow, so it's free to write a state-smart compiler 14:52:32 i'll have to think about that. 14:53:08 right now there's no logic in the compiler except walking and dumping the AST 14:53:32 dumping it using a template 14:53:45 the template contains retro code... 14:54:01 so the actual "compilation" is done by retro words 14:55:30 see, UPN code is already in some kind of SSA form - a reduced form with only one branch to be precise 14:56:47 so theoretical you do not need to transform from AST to SSA and then to IL code (here retro as backend) 14:57:28 : +! ( na- ) dup push @ + pop ! ; 14:57:48 : -! ( na- ) dup push @ swap - pop ! ; 14:58:18 for stack analysis 14:58:42 sorry.. just catching up. 14:58:49 UPN code? 14:59:02 UPN = german RPN, right? 14:59:09 sorry, yes 15:00:15 if you generate retro code, your compiler only need to update a stack-state flag 15:00:39 and compile depending on this flag 15:00:48 dynamical 15:00:54 what does the flag represent? 15:01:11 the depth and type of the stack at compilation 15:01:29 sorry stack-depth and types of there content 15:02:17 oh. i wasn't planning on doing *any* of that for this compiler. 15:02:35 no checking at all 15:02:41 other than syntax 15:02:49 and no optimizations at all 15:03:19 --- join: impomatic (~digital_w@46.208.232.87) joined #retro 15:03:26 but: i would put the types on the stack and they'd work sort of like how each@ works 15:03:46 like: *everything* would take types 15:03:56 so + would be lifted up to take 4 arguments 15:04:38 how will you ensure the type system of oberon ? 15:05:08 i will use another oberon compiler :D 15:06:01 once the good compiler approves some code, then i will compile that code to retro 15:06:56 what if doing it as described would be probably an easier and simplier approach ? 15:06:58 since the oberon compilers are written in oberon, i can just remove the code generation from them, replace that with the retro generator... and oberon will be self-compiling on retro 15:08:07 ok, but you can not implement the oberon type system in oberon without reinterpretation of the sourcecode as I see it 15:08:22 (I can be wrong, because not an expert in oberon) 15:08:50 i don't understand what you mean... but i could very well be missing something :) 15:10:03 the type-checking code is all done in the oberon compiler written in oberon. 15:10:35 so i can write a pretty dumb compiler that just trusts that everything is already typechecked. 15:10:48 as long as it emits correct code, i'm okay. 15:10:58 yes, but that depends on an oberon compiler implementing the complete type system 15:11:01 the problem is what if want to add a variable + a constant? 15:11:29 but it's easy: in my template, i just tag what everything is, and let retro handle it 15:12:03 so : 4 + x becomes 4 constant x variable + 15:12:39 and + is really a special compiler word that operates on 4 values, not the normal retro + 15:12:51 {+} maybe 15:13:45 *hopefully* i can implement this with something like : {+} ' + lift2 ; 15:14:06 what I mean is very easy: For compiling extensible types you will get into trouble if you try to compile a compiler which do not support extensible types itself, because the type of eg. records is not known at compile-time without parsing the complete source-code 15:15:09 so you will likely end up rewrite the whole compiler twice 15:15:18 ^rewriting 15:15:36 yes, that's the plan 15:15:49 it's a proof of concept, and i'm doing it backwards. 15:15:56 when i teach the course, i will do it forward 15:16:13 i will say: here is a virtual machine. let's make a forth from machine code... 15:16:23 then from forth i will make a lisp 15:16:39 and also a tool to parse grammars 15:16:45 and regular expressions 15:17:16 from those i build up very simple words that can generate the code for things 15:17:39 so i'll have a little word that compiles a repeat ... until loop 15:17:47 basically just a macro 15:18:51 it's late here, I must take care to get some sleep 15:18:56 see you later 15:19:03 anyway... once i have all that, i'll have a forth that looks like pascal, and write my compiler in that. :) 15:19:05 seeya 15:19:10 ciao @ all ! 15:19:23 --- quit: Mat2 (Quit: Verlassend) 15:26:25 --- nick: tangentstorm -> tangentsleep 15:55:11 --- quit: kbmaniac_ (Remote host closed the connection) 15:55:45 --- join: kbmaniac_ (~androirc@86.157.24.246) joined #retro 16:53:43 --- join: kumul (~Kumool@c-76-26-237-95.hsd1.fl.comcast.net) joined #retro 17:11:00 --- quit: kumul (Read error: Connection reset by peer) 18:17:59 --- join: HalfMadDad (~patrick@bas5-unionville55-1177882866.dsl.bell.ca) joined #retro 18:43:37 --- join: kumul (~Kumool@76.26.237.95) joined #retro 20:46:17 --- part: HalfMadDad left #retro 22:51:51 --- quit: kumul (Quit: Leaving) 23:59:59 --- log: ended retro/13.02.02