00:00:00 --- log: started retro/12.12.07 01:10:19 --- join: tangentstorm (~michal@108-218-151-22.lightspeed.rcsntx.sbcglobal.net) joined #retro 07:26:26 --- join: kumul (~kumul@66-50-75-241.prtc.net) joined #retro 07:27:23 hahaha... brain-warped C and C++ guys on another channel are arguing that "operators" aren't functions.... 07:28:58 "operators avoid the necissity of having to write the underlying code in ASM" 07:30:21 I guess the C and C++ guys think "magic gremlins" so the work of +-*/&&|| and the like... 07:31:41 probably they mean infix notation 07:32:38 interestingly, in APL, + and - are called functions, and there's a separate thing called an operator that's like a higher-order function. 07:33:16 hmm... I never studied APL... that sounds interesting. 07:35:43 I'm really trying to understand the "operators avoid the neccissity" comment.... how would infix (which many C operators are, of course) have anything to do with it? 07:36:22 i don't know. they could very well just be talking nonsense 07:36:57 my best guess is they're saying that functions are "gosubs" whereas operators are syntactic sugar for primitive cpu operations. 07:39:39 I pointed out that "*" for the m6809 in gcc is implimented by an assembly routine that's coded exactly like a function. I'm assuming the comiler converts infix to prefix and calls "*" JUST LIKE A FUNCTION. 07:40:08 I guess I'm just forth-brain-warped now. 07:41:15 huh. why does it do that? 07:41:43 when people say the "C" and it's causins (the rest of modern functional programing languages) are "infix" it bothers me. In my mind C is both "infix" and "prefix"... it you consider operators just functions, of course. 07:42:10 also postfix c++ :) 07:42:27 and whatever you call x ? a : b ; mixfix? 07:43:03 * beretta runs away in syntactic madness 07:44:01 yeah, I forget about that old chestnust! 07:44:41 i was surprised today to discover that retro's "while" loop is actually the equivalent of a "do..while" loop in c 07:45:34 why would that be surprising? 07:46:27 would one think retro's while would be more like "while....", with the test at the begining? 07:46:30 because i'm trying to compile a loop that executes 0 or more times and i don't think there is one 07:46:41 I don't know reto yet, BTW. 07:47:04 ouch! reall? 07:47:54 I'm pondering retro's "quotes"... they seem neat, but I'm not sure of the benfits. 07:48:25 they basically let you do higher order functional programming 07:48:30 lisp-like stuff 07:49:46 although... I've *tried* to break apart many forth word in the middle of a loop and failed (of course!) so quotes would be more reconizable as a "don't mess with me" part of the code. 07:50:20 that too 07:50:38 there's a language called... i don't know... it's a russian forth 07:51:08 sometimes "BEGIN" and "AGAIN", and brothers get lost in a sea of word (esp. all upper-case forths) 07:51:13 but the idea was all the control structures use exactly 1 argument 07:51:55 parable is much more quote-oriented. have you looked at it? 07:51:59 ( it's crc's other project ) 07:52:39 I think my forth uses only 1 argument for control. (I use FOR/NEXT rather than DO/LOOP) 07:53:58 and unlike some forths, my "FOR" tests the argument before executing the loop... I was tired of things breaking because of a "0" arg. 07:54:40 I honestly haven't used a "DO" loop in so long, I don't remember where the test comes... 07:59:03 beretta: i mean there's no begin/again in that language 07:59:25 if you want that, you have to make a named function i guess 07:59:56 I had posted about how i might make a compiler that emits code in a single pass on a stream with no lookahead, and someone showed me that 08:00:03 lemme find it. it's kind of neat. 08:00:38 DSSP is the language. no wonder i couldn't remember :) 08:00:43 http://brokestream.com/daf.txt 08:01:16 thanks! 08:01:43 the owner of the site (not the author of that paper) also made this thing: http://brokestream.com/fo.py.html 08:02:22 hmm... by "look adhead" do you mean a forward reference in addition to a input-wise look ahead? 08:03:58 ooo.. this looks like a good read. 08:04:46 http://b4lang.blogspot.com/ 08:05:44 so I'm assuming that one can create your own control structure in Retro so you can have a "for" rather then "do..while" 08:06:15 beretta: sure. it really is just a forth, but it doesn't follow the ANS forth tradition 08:06:34 ahh.... I don't follow the ANS forth either... 08:06:34 and in fact there's already a "times" verb that does what a for loop does 08:07:04 the link i just posted is to what i was trying to do with my compiler 08:07:05 I tend to free-think now. writing forths has liberated my mind. 08:07:11 or assembler or whatever 08:07:35 its a *comsembler" :) 08:07:41 the idea was kind of that you could stream instructions in real time to a second instance that would execute them on the fly 08:07:58 haha.. comsembler. i like it. 08:08:03 definitely better than asspiler. :) 08:08:12 rolf! 08:10:21 I remember reading an interesting thing once that said one could look at the return stack as a stream (or a reverse stack) of instructions. It *sounds* cool, but really, istn't Forth just an indirection of that (e.i. a stream of address to code?) 08:10:55 --- quit: karswell (Excess Flood) 08:11:42 a new forthie friend of mine keeps building functions onto RP rather than CP and executing the stack directly... it a brain-twister, but works. 08:11:58 what's RP and CP? 08:12:26 return vs call? 08:12:30 oh... RP is the return address pointer, and CP is the compiler pointer. 08:13:02 ah. retro calls CP HERE and there's no RP 08:13:22 the data and return stacks are separate from the rest of ram 08:13:26 uhm... I think retro has "push" and "pop"... 08:14:07 yep. i'm just saying that's the only way you can actually access it. no pointer you can see from inside the vm 08:14:20 huh... 08:15:11 I'm writing a complier that uses retro as a portable assembly language. 08:15:26 completely different from the compiler i wrote about in that post :) 08:15:37 even though RP (and SP) can be in a different space, doesn't mean there value isn't important... I found that out with ponder how to impliment stack frames (for throwing/catching errors) 08:16:12 --- join: karswell (~coat@93-97-29-243.zone5.bethere.co.uk) joined #retro 08:17:41 My new VM started out NOT having traditional RP!, RP@, SP!, and SP@... just like retro's Ngaro, but then had a hard time with: (1) easily saving the entire machine state, and (2) doing things like executing the stacks (or building temp buffers in them). 08:17:42 yeah. i was about to say that i wound up designing a separate area at the end of ram that was just like HERE but for tracking the stack in pascal 08:18:14 er.. like HERE but counting downward 08:18:37 what do you mean executing the stack? 08:21:35 well... building a word in the stack (just like you would do with HERE) then executing it. It came in handy when I went to redefine defered words in the outer interpreter... one would normally do that in "immediate" mode, but that mode wouldn't work if you're try to redefine the interpreter! 08:22:19 oh 08:22:41 so a quote is something like that 08:22:52 when you say [ 2 2 + ] 08:23:08 it compiles the code just like if you'd defined a new word... but it doesn't add anything to the dictionary 08:23:13 instead it just puts the address on the stack 08:23:20 true one would build the function in HERE (as usual) execute the word, then reset HERE and the dictionary likage(s) to erase the word so don't need anymore 08:24:28 yeah. crc's previous language had garbage collection and he's mentioned implementing it for retro too.. which would make quotations pretty clean 08:24:35 yes, I would like to know how retro impliment quotes better. 08:24:38 not sure what parable does in that respect 08:24:51 take a look at kernel.rx 08:25:24 i went through and commented every step of the quotation compiler trying to understand it 08:25:28 it's pretty neat 08:26:17 nice... I will look that. I'm interested if retro compiles a "lit" to the compiled code, and maybe a "bra" to jump over the quote... or other? 08:26:55 or does the quote's runtime get compiled to another code area? 08:27:45 [ basically turns on the compiler and remembers the address... then ] goes back and compiles a jump to the end 08:27:54 at the start address 08:28:06 but there's also a helper function that gets called at runtime 08:28:13 source: + + / [[ foo bar ]] if .... 08:28:46 i don't understand that :) 08:28:48 memory: plus plus div lit 2 bra 4 foo bar if .... 08:29:30 bra = branch always? 08:29:40 oh.. sorry, yes... 08:29:57 so plop the address of foo onto stack (lit) 08:29:57 mat2 uses something similar. that must be a standard thing. :) 08:30:15 and jump over the quote's runtime ( bra ) 08:31:35 but there's also code for the ] 08:31:58 well... it's nice to have just one HERE. but the code would run faster if you had HERE and THERE: HERE is for compiling named word, and THERE is just for no-name words (quotes) 08:32:04 you're defining a function inline, so ] is a return like ; 08:33:05 I have a half assed quotes that defines "]" like this: : ] pp ; ; 08:33:34 which simple means: compile exit! 08:33:35 because you'd avoid the initial jump at runtime? makes sense, but then you have to track both of those memory spaces 08:33:44 :) 08:33:44 exactly! 08:35:49 or you could have a temp buffer where you build the quotes and move them into HERE after finishing the definition they're defined in. That would probably be a headache trying to figure out and resolve the quote's new addresses. 08:37:41 http://bazaar.launchpad.net/~crc-x/retro-language/retro/view/head:/image/kernel.rx#L324 <- the actual code 08:38:11 beretta: hrm. actually, it's how strings already work 08:38:42 really ? 08:38:46 by default, strings are in a rotating buffer and they only get saved to HERE if you call keepString 08:39:02 oh yeah.. I remember reading that. 08:39:07 keepString should probably be in that same kernel.rx there. 08:39:29 I see very little diference between string and quotes 08:40:08 wait a minute..... 08:40:15 * beretta ponders factoring 08:41:36 my "slit" word is perfect... is for plopping a string address onto the stack at run time, and jumping past the string's data... just like a quote. 08:42:04 quotes = strings ? 08:42:21 string = a blob of memory with an address. 08:42:31 quote = a blob of memory with an address. 08:43:36 a quote just treats a blob as action, and a string just treats a blob as data. 08:44:11 yes 08:44:41 that's why it's called a quote, basically. it's just like if you put the code in a string and evaluated the string later. 08:44:55 so: + + / [[ foo bar ]] if .... becomes: "plus plus div blob length [code/data] if ..... 08:46:02 I should start inlining blobs into me code... it's too "nice" not to. 08:46:12 why do you keep saying + + / ? 08:47:19 no reason... just generic run-of-the-mill words... just to demonstrate regular compiled words rather than quoted.... 08:47:56 oh 08:48:00 gotcha 08:48:17 why [[ ? :) 08:48:19 although.. I'm not sure if there's enough benefits in retro's quoted control words to bother with. 08:49:15 i think [[ actually is for doing things inside a quote that you want to execute at compile time 08:49:18 oh sorry... I used [[ and ]] for my quotes, and [ and ] for traditional forth-asspiler on/off... retro switched the meanings around. 08:50:25 i guess whether it's a benefit or not comes down to your style of programming 08:50:28 which I'm fine with... it's a different forth, and there's nothing wrong with not following ANS. 08:50:37 they actually come from a language that was developed independently of forth 08:50:52 it was called Joy and it was a purely functional language 08:51:25 developed by a professor of logic in australia 08:52:29 those ideas got popularized by a guy named slava prestov in Factor ... and i believe that's how the ideas made their way into retro 08:54:22 Dr von Thun ( the professor ) taught classes on symbolic programming in pascal, and joy was sort of the language he developed to express symbolic computation in a very simple way on a computer 08:54:23 I'm temped to say that traditional forth and retro are just syntactically different.. but not in fuction... although I will have to study "combiners" and the such before I decide on that.... 08:55:44 beretta: well forth is so flexible there's really nothing that can't be part of forth :) 08:56:13 it's mostly a stylistic difference. 08:57:16 yeah... one could take ANY forth and do quotes.... and yes, thanks for pointing out the kernel.xs code... it is just a "blog" like a "slit" blob. 08:58:06 if you can stand to read the font on this page, von thun provided a pretty good review of how he arrived at the ideas in joy: http://www.latrobe.edu.au/phimvt/sympas/s42minjoy.html 08:59:07 BTW: HERE, is just "CP@" where CP then could be defined as a normal memory variable or something like a extra machine register, if you have one (ngaro doesn't) 09:00:08 HERE (and thus CP) is used so much that it would make sense to have it in "fast" memory. 09:01:18 I found a tremendous speed up was to make "FOR" primitive. Traditional DO's and FOR's loops are crazy slow. 09:01:26 yeah but that would break the "no registers" rule 09:02:11 well. actually that's a ngaro issue. another retro implementation could very well use registers. 09:02:58 tangentstorm: I added quotes to retro after coming to like the block concept from smalltalk. I borrowed the factor terminology though. 09:03:07 yeah... and interestingly enough... one doesn't have extra registered on say a x86 cpu :) 09:03:30 in fact, that's one reason i'm targeting retro instead of ngaro... Mat2's implementing a crazy fast interpreter in assembly using a different threading model 09:04:35 crc: oh! i knew i'd seen you mention factor somewhere. i guess i just assumed. 09:04:40 crc: thanks, I don't know smalltalk, or its "block" but I'll readup. 09:05:04 they're all the the same thing though. lambda, blocks, quotes... 09:05:06 well no 09:05:55 beretta: in smalltalk, a block object is used to pass code to other objects. e.g., 4 < 5 ifTrue: [ ... ] ifFalse: [ ... ] 09:06:11 joy and retro and factor use the combinatory logic style 09:06:39 that's actualy where RPN comes from too. combinatory logic. ( the P = polish, after a polish logician ) 09:06:49 OK... that's one area of retro I'm fuzzy on: combinations (there benefits and uses) 09:07:11 the difference between lambdas (anonymous functions like in lisp/smalltalk) and what combinatory logic does is that the combinators don't have named arguments 09:08:42 forgive me but I giggle over this in retro's intro: "hyper-static global environment" 09:09:17 I hear Darth-Vader's voice (Jame Earl Jones) in my head when I read that :) 09:09:49 beretta: http://c2.com/cgi/wiki?HyperStaticGlobalEnvironment for where that came from 09:10:11 (my other current language, parable, is not a "hyper-static global environment") 09:11:14 yeah... I love c2... I know h-s-g-e is a real thing, but it sure sounds sci-fi :) 09:11:52 * crc is contemplating mutating parable into a smalltalk/forth hybrid 09:12:54 crc: :) did you see that link i posted earlier? 09:13:03 http://brokestream.com/fo.py.html 09:13:38 i've never used it. might give you food for thought 09:20:27 tangentstorm: thanks; I'll look it over 09:20:31 erk.... I hate hardware. 09:22:29 I'm interacing to a routine that uses hardware to read in some serial data AND return it's CRC... it's neat that it does this, as it would be faster than doing it in forth, but how is that reusable in a general sense ? 09:23:01 I don't have any other serial hardware that returns the CRC of its data... 09:24:31 I would hate to throw out it's CRC, but now does the rest of my serial devices have to return a CRC? errkkk.... 11:36:14 --- join: Mat2 (~Claude@91-65-144-133-dynip.superkabel.de) joined #retro 11:36:24 helo 11:36:30 ^hello 11:58:33 --- join: ivan``_ (~ivan@unaffiliated/ivan/x-000001) joined #retro 11:58:57 helo ivan 11:59:18 I mean hello, sorry 11:59:40 (keyboard damage) 12:05:21 --- quit: Mat2 (Quit: Verlassend) 12:05:53 --- quit: ivan`` (*.net *.split) 12:16:28 hey Mat2 12:16:55 would you guys buy a greenarray chip pre-soldered to a breadboard? 12:16:59 https://twitter.com/tangentstorm/status/277144094655000576 12:17:11 trying to talk schmartboard into making one :) 12:29:35 --- join: Mat2 (~Claude@91-65-144-133-dynip.superkabel.de) joined #retro 12:54:28 if reasonible (say 40-50) I would be interested after the new year 12:57:47 hi tangentstorm, crc and all others 12:58:22 crc: :) cool 12:59:47 it depends on he price I would say 13:02:48 if it cost remarkable less than 120 I'm interested 13:07:12 $50 is about the max i can afford too 13:07:38 that price would be ok for me 13:07:53 the chip is $20 though so it'll be kind of tight 13:09:04 would be nice to bring my ISA to the GA144 *g* 13:09:15 but if we can show them there's enough demand maybe it'll be worth it to them to make it 13:10:05 can you give me a link ? I will write them an e-mail if this helps 13:10:06 i really think with the parallel aspects people would buy it just like arduino and rasberry pi 13:10:26 http://www.schmartboard.com/index.asp?page=products_csp&id=532 13:10:32 the main problem of the chip is: It is no SoC ! 13:10:47 yeah 13:11:00 it should be paired with something 13:12:26 anoher problem is: It's an complete asynchron design and most special circuits depend on synchron signals 13:13:11 it would be nice for example to combine a GA144 with a propeller mcu for video generation and so on but 13:13:34 I have an ARM board to use with it... 13:13:39 this would result in extended energy demands 13:14:29 I should be trying to sell it to the bitcoin people. :) 13:14:41 probably the raspberri pi board would be a cheap solution 13:15:24 tangentstorm: You are not the only one who came to this idea 13:16:10 anoher market would be probably a flexible replacement for CPLD's 13:16:16 ^anoher 13:16:22 i don't want it for bitcoin, i just think that's a good market for people who just want to use it as a calculator. 13:16:28 ^another 13:16:34 who don't need to hook it up to anything 13:16:49 probably 13:17:43 as replacement for CPLD's, a VHDL compiler would be a demand I guess 13:17:55 had to look CPLD up, but yeah, exactly. it's just something fun to play with where you have 144 computers. 13:19:19 the GA144 have the advantage to be reconfigurable at high speeds, that is something FPGA's do not offer 13:20:00 sadly it can't be compared to hem because FPGA'S tend to implement much more logic specific ressources 13:20:46 so I think it is more comparable to a CPLD if combined with some flash memory 13:21:48 * Mat2 these apple keyboard drive me crazy 13:21:55 :) 13:22:30 in other news... I was talking to a guy in #fpc yesterday and he turned out to be the same guy who's site you showed me ( the microkernel for embedded devices ) 13:23:12 i've been telling them about retro/ngaro and avm and my little compiler 13:23:30 what was his response ? 13:23:51 couple guys seemed pretty interested in it 13:24:01 it's a logged channel.. hang on 13:24:18 that's good 13:26:19 http://www.elesoft.net/lift/lift.php?prefs[channel]=100&prefs[linecount]=35&prefs[starttime_hour]=0&prefs[starttime_mins]=1&prefs[startdate_day]=5&prefs[startdate_month]=12&prefs[startdate_year]=2012&prefs[endtime_hour]=23&prefs[endtime_mins]=59&prefs[enddate_day]=7&prefs[enddate_month]=12&prefs[enddate_year]=2012&prefs[submit]=Submit 13:26:24 search for Laksen 13:26:44 you might like the stuff up top by PascalDragon too 13:26:49 he was talking to a guy making an OS 13:28:39 tha is something I have in mind 13:28:45 ^that 13:29:45 yesterday I've found an effort to write an OS in freebasic ! 13:29:56 mikeos? 13:30:11 no.. that's assembly + a basic written in assembly i think 13:30:17 yes 13:30:43 these people writing an microkernel in freebasic 13:31:49 :) why not? 13:34:56 because there runtime library is probably larger than the whole kernel 13:35:02 hahaha 13:45:12 * Mat2 completing compiler backend for AVM 13:53:50 tangentstorm: Do you know if there exist an equivalent function or procedure to mmap or mprotect ? 13:55:13 I can compile into an allocated buffer but need to mark the reserved address space as executable or will risk a protection fault 14:59:30 ok, I've write a wrapper function 16:29:16 half time. iAtom64 EMT64 backend near finshed 16:29:46 ^finished, get some sleep, ciao 16:30:42 --- quit: Mat2 (Quit: Verlassend) 22:49:45 --- quit: kumul (Quit: WeeChat 0.3.9.2) 23:59:59 --- log: ended retro/12.12.07