00:00:00 --- log: started retro/12.03.23 00:02:25 --- log: started retro/12.03.23 00:02:25 --- join: clog (~nef@bespin.org) joined #retro 00:02:25 --- topic: 'Retro Language | http://retroforth.org | Logged @ http://rx-core.org/dev/rancid | Latest Release @ http://s3.retroforth.org/download/11.x/retro-11.3.tar.gz' 00:02:25 --- topic: set by crc!~crc@li125-93.members.linode.com on [Thu Mar 15 04:25:15 2012] 00:02:25 --- names: list (clog __tthomas__ karswell CIA-98 virl SimonRC @crc aguai ivan`` oPless @ChanServ yiyus TheStitch) 00:39:25 --- quit: virl (Remote host closed the connection) 00:58:59 --- join: sunwukong (~vukung@catv-80-98-247-63.catv.broadband.hu) joined #retro 04:17:12 retro: 03crc  * rcrc@questor-20120323111649-5qku3gwoyaw6spu1 10rx/www/index.html: move git mirror from github to google code 06:17:22 the ngaro-port8 branch has some minor revisions to the spec, along with a C implementation (using escape sequences) 06:28:52 --- join: virl (~virl__@85-127-248-189.dynamic.xdsl-line.inode.at) joined #retro 07:43:02 retro: 03crc  * rcrc@questor-20120323144240-whx346zxnus9o5sx 10rx/vm/complete/retro.py: python: 'clear' now works 07:47:12 --- quit: virl (Remote host closed the connection) 08:05:20 ngaro-port8: python vm has escape sequence support 08:29:26 --- join: __tthomas__1 (~tthomas@slosvr6.aeromecheng.com) joined #retro 08:30:11 --- quit: __tthomas__ (Quit: Leaving.) 08:30:49 --- quit: __tthomas__1 (Client Quit) 08:31:05 --- join: __tthomas__ (~tthomas@slosvr6.aeromecheng.com) joined #retro 08:42:29 <__tthomas__> : copyArgs ( v1 v2 v3 -- v1 v2 v3 v1 v2 v3 ) [ 2over ] dip dup [ 2rot ] dip ; 08:42:35 <__tthomas__> I am amazed that works.. 09:04:43 --- join: Kumul (~Kumul@adsl-72-50-91-28.prtc.net) joined #retro 09:18:26 why? 09:28:48 <__tthomas__> I wasn't sure what would happen when I did a [ 2rot ] dip or [ 2over ] dip since when I did [ 2dup ] dip the result was unexpected.. 09:29:54 <__tthomas__> though when I think about it, [ 2dup ] dip did exactly what it should have.. 09:30:48 <__tthomas__> I was expecting result of operation to go to top of stack, but it doesn't.. 09:56:17 the ngaro-port8 branch now has sample implementations in C and python (using escape sequences) 10:05:05 ls 10:13:51 retro: 03crc  * rcrc@questor-20120323171327-i3wfn69rsyxw8khn 10rx/library/unsigned.rx: merge in unsigned' vocabulary 10:43:11 retro: 03crc  * rcrc@questor-20120323174247-thvepm58uyphm3hw 10rx/RELEASE_NOTES.rst: fill in more from release notes 10:49:01 retro: 03crc  * rcrc@questor-20120323174838-ztfh3is1je3vtbig 10rx/vm/complete/retro.py: fix display of backspace under python implementation 11:34:35 ruby implementation in ngaro-port8 is functional now 11:34:44 clear 12:48:30 retro: 03crc  * rcrc@questor-20120323194805-1pyb0svccfmgahel 10rx/ (7 files in 3 dirs): improved console support via new i/o port 13:05:05 --- join: Mat2 (5b4085c5@gateway/web/freenode/ip.91.64.133.197) joined #retro 13:05:18 g'Day ! 13:05:45 --- join: virl (~virl__@85-127-248-189.dynamic.xdsl-line.inode.at) joined #retro 13:05:52 <__tthomas__> hi 13:06:27 after reading Jeff Fox explanation of AHA I had an aha experience 13:06:48 <__tthomas__> heh, me too.. 13:07:22 <__tthomas__> I was hoping to meet him this year at forth day.. then found out he passed away earlier last year.. 13:08:55 i'm sure he is now by his ancestors 13:09:28 <__tthomas__> impression I got he was a great guy.. did lots for the community.. 13:09:49 <__tthomas__> I definitely learned alot from his website 13:10:53 yes, very informative 13:11:36 <__tthomas__> found this to be a useful resource recently.. http://www.colorforth.com/arith.htm 13:12:29 thank you, nice multiply routine 13:13:35 <__tthomas__> his code is almost always insanely brief and simple.. 13:15:47 I'm begin today with an token based editor 13:17:52 <__tthomas__> cool 13:18:41 and finally found a way to integrate retro style classes with the colorforth model 13:19:27 <__tthomas__> how is that? use last 3 bits of address? 13:21:41 a token have a prefix and a postfix which is interpreted at edit time 13:22:38 each prefix is mapped with a class routine which is executed 13:23:07 <__tthomas__> now just need an editor that works with binary data vs. text.. :) 13:24:01 i will use the first and last byte of each token, so all UTF-8 13:25:05 <__tthomas__> ah, so not using his two array dictionary, with editor containing location info vs. actual text.. 13:27:02 the dictionary is a fixed array and each token beside prefix and postfix byte is a hashed index into it 13:27:54 --- join: roarde (~roarde@pdpc/supporter/active/roarde) joined #retro 13:27:59 each dictionary field contains the start address to compiled code 13:28:27 simple 13:29:51 <__tthomas__> I think immediate words get run at edit instead of compile time too.. so always a 1 to 1 mapping between source and code.. 13:30:39 <__tthomas__> I would honestly have to play with colorforth to know for sure, I have read about it but never really used it.. 13:30:40 immediate words are simply class routines which are executed at edit time 13:30:56 (in my system) 13:31:14 for this exist a immediate prefixä 13:32:14 <__tthomas__> it is interesting, there is no string support in colorforth.. 13:34:39 one advantage is: There exist no differention between immediate and other compiled words, if you want to execute a word at edit time just choose the right prefix 13:35:51 <__tthomas__> yeah, and the interpreter is super simple, you can just put numbers on the stack and execute words.. the comment prefix is super cool.. Can use it to stop a word from executing, just change it from yellow to white.. 13:37:12 one difference exist: the packed opcode format in my vm is very dense (1/2 byte for each instruction), so subroutine calls use much more space (8 byte address). The compiler can just inline everything and code grow will be very small 13:37:13 <__tthomas__> it is like a do nothing class I guess.. 13:37:58 <__tthomas__> so what is your stretch goal, fast or small as possible? 13:38:06 both :) 13:38:15 --- quit: roarde (Quit: Leaving) 13:38:17 <__tthomas__> heh.. 13:38:29 --- join: roarde (~roarde@pdpc/supporter/active/roarde) joined #retro 13:38:48 inlined code is smaller and faster, because no return-stack overhead 13:38:54 involved 13:39:41 together with the execution of 2 instructions per dispatch this resulted in very high performance 13:40:07 <__tthomas__> depends on how much code your inlining.. if you are inlining more code than required for a subroutine call, it is faster but larger.. 13:41:02 right, good factored code should typical fit into 16 instructions which is one opcode 13:41:31 and you can compile subrotine calls (with another prefix of course) 13:41:49 <__tthomas__> if you don't need to include an address or register sure.. 13:42:39 it's a harvard architecture, all data is seperated in a second address-space 13:43:59 (so an interpreter would have no problems to fetch and execute 3 or 4 instructions per dispatch at demand) 13:44:17 <__tthomas__> harvard usually means code/rom vs. data/ram though.. and would still need to include addresses in code segment.. 13:44:48 adresses are stored in the data segment 13:45:37 at subroutine calls, the instructions fetches two adresses, one for the code and one for the storage of immediate data 13:46:12 this way subroutines can share there immediate data 13:46:39 <__tthomas__> so all opcodes have single operand? implied address? 13:47:08 no only branches and lit 13:47:27 <__tthomas__> okay, that makes more sense.. so it isn't a zero operand instruction set.. 13:48:01 no 13:48:36 but branches can fetch tos as address at demand 13:48:42 --- quit: roarde (Ping timeout: 260 seconds) 13:49:38 <__tthomas__> have you considered having an address register, that can autoincrement and optionally store load from data stack? 13:49:50 and all branches can be taken conditionally 13:50:14 each data-stack element can be used for this 13:51:25 LaInc n - loads tos with address pointed by stack-element n and increment it 13:51:48 LaDec n - same but decrement pointer 13:52:07 LaIncBe - same but branches if pointer address = nos 13:52:25 LaIncBe n a (a = address) 13:53:20 n and a are immediate-data in the data segment 13:53:51 LaIncBe is a fused instruction (2 slots) in the opcode 13:54:26 each opcode consists of 16 instructions where two are executed as bundles 13:56:34 there exist also rep instuctions which reloads the opcode-cache from a hidden shadow-register so loops inside an opcode are free and cost no memory fetch 13:58:04 retro: 03crc  * rcrc@questor-20120323205738-4z3t0jv1gcc0t6w3 10rx/ (3 files in 2 dirs): start of new console' vocabulary to use i/o port 8 with fallback to ansi 14:00:09 token interpretation works fine this moment 14:00:12 :) 14:03:42 <__tthomas__> One thing always found fascinating and I think this is one area that forth is really bad at, is how inefficient memory to memory copies are.. 14:03:58 you mean cmove ? 14:04:20 <__tthomas__> c18 instruction, almost half are dedicated to making memory copies more efficient.. 14:04:43 <__tthomas__> no I mean have to move address and value to stack, increment both source and destination, load and store.. 14:05:11 yes, Mr. Moore's design benefit from the index registers 14:05:13 <__tthomas__> I think memcpy is probably even more common than arithmatic.. 14:05:27 <__tthomas__> s/arithmatic/arithmetic 14:05:48 probably 14:05:50 <__tthomas__> considering these days most devices are memory mapped.. 14:06:23 that's why im wondel about the resitance against his ideas 14:06:30 resistance, sorry 14:06:55 <__tthomas__> do most processors offer opcodes that make memory copying faster? 14:07:14 that's a weak point from RISC designs 14:07:28 traditionally 14:08:39 on x86 there exist these string instructions for this task 14:09:10 some newer architectures have special memory to memory instructions 14:09:50 <__tthomas__> lots of hardware supports dma to sidestep, video cards support dma and faster bus to get around slower PCI bus.. 14:10:24 if you have this choices, that's good 14:12:24 to be effective these dma functionality should be part of a soC 14:12:27 <__tthomas__> it seems obvious, wonder why it has taken so long for architectures to support memory copy operations.. if it is only newer architectures that can.. 14:13:52 one problem can be cache hierarchies, most modern architectures are very sensible against cache misses resulting in a lot of wasted cycles 14:17:22 on x86 there exist special instruction to invalidate the cache 14:17:29 at demand 14:18:21 <__tthomas__> Looks like handling ram is offloaded to RAM controller, so cpu is uninvolved, which would explain the lack of memory to memory support.. 14:18:41 <__tthomas__> DMA just talks directly to RAM controller over bus.. 14:19:48 yes and cache lines can get out of sync 14:20:30 that's why I'm suggesting best way would be to integrate dma into processor design in some way 14:21:14 sadly I don't know no mainstream architecture with such feature 14:21:19 <__tthomas__> Most programming languages are pretty bad about it too... c gives you memcpy which is usually implemented in Assembly so it isn't too bad, but other languages it involves a for loop and a counter.. 14:22:19 *shock* 14:23:32 now I suspected why memory operations are such slow in freepascal 14:27:38 found an error, bugfixing, brb 14:33:18 these linux kernel interface... 14:33:50 and I though MS-DOS was crazy 14:36:09 you need to create a buffer just to output one byte to stdout, wow, good job ! 14:41:53 <__tthomas__> heh.. yeah, but you can treat a byte as a buffer... 14:42:08 <__tthomas__> char buffer = 7; 14:42:52 <__tthomas__> write(stdout,(char *)&buffer,1); or something like that.. 14:43:19 yes, that's my workaoround 14:43:26 workaround 14:43:43 but it's a mess 14:44:21 <__tthomas__> I personally find types annoying.. just use ints for everything including pointers.. and char * for strings... 14:44:46 types are useless for me 14:45:15 only souce of multiple limitations 14:45:53 and error prone in C because of it's weak type system make the entire concept absurd 14:46:00 <__tthomas__> if you have the memory, then why would you ever declare something as an unsigned char? 14:46:16 for compiler optimisation purposes 14:46:34 <__tthomas__> are 8 bit registers faster than 32 bit ones? 14:47:02 faster in which aspect ? 14:47:10 you mean faster access time ? 14:47:31 <__tthomas__> I mean if you have a 32 bit register available, what is the benefit of using an 8 bit one? 14:48:26 for older architectures like z80 8 bit register acesses are always faster because the old Zilog cpu has only a 8-bit ALU so 16 bit procesing tokes 4 ectra cycles (if I remember correctly) 14:48:37 extra 14:49:24 <__tthomas__> good point, though ints are usually defined by architecture size, so 16 bit platform an int is 16 bits.. 14:50:38 <__tthomas__> atmel 328P has 16 bit and 8 bit registers, I think 16bit are used for addressing.. Not sure if alu uses 16bit or only 8bit registers.. 14:51:09 on x86 > iPentium the opposive can be true because acceses to register parts can block these register for the next cycle 14:52:05 <__tthomas__> the backends I have looked at for C compilers only used a couple of registers, and most of registers were completely un-utilized.. 14:52:43 looks like amtel 32 should be a good target for me 14:53:21 <__tthomas__> I really liked the AP7000 AVR32 platform.. 14:53:58 i've found boards are cheap for these platform 14:54:35 by the way I was shocked abouth the price of a ga144 development board 14:54:43 about 14:54:46 <__tthomas__> what do you mean? 14:55:13 ~420 Euro is to much for me 14:55:15 <__tthomas__> it was around 500 which is reasonable.. 14:55:36 <__tthomas__> for professional 14:56:02 yeah, I will order a much cheaper FPGA board instead 14:56:29 and learn VHDL 14:58:41 <__tthomas__> If you can solder you can get one for around 30 bucks.. I will send you link.. 14:59:13 <__tthomas__> http://www.schmartboard.com/index.asp?page=products_csp&id=532 14:59:35 thanks, looks good ! 15:00:06 seems I get a way for programming this cpu ! 15:00:15 --- join: roarde (~roarde@pdpc/supporter/active/roarde) joined #retro 15:00:56 <__tthomas__> http://www.greenarraychips.com/home/documents/budget.html 15:02:01 <__tthomas__> This should get you started, I have one, but don't have a good small pitch soldering iron, and really don't want to F it up, so next time down south will try to get time to solder it.. I have an electronics lab at my work, full of nice EE's... 15:02:36 --- quit: roarde (Client Quit) 15:02:51 --- join: roarde (~roarde@pdpc/supporter/active/roarde) joined #retro 15:04:36 nice 15:05:11 <__tthomas__> if you want to do FPGA stuff, buy this board http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=53&No=83 15:06:03 <__tthomas__> there are two cheaper ones but you can't beat the features of this board for the price.. 15:06:58 <__tthomas__> and for doing fpga stuff, I would recommend using http://www.myhdl.org/doku.php/start You can test and verify your designs from python and generate both verilog and vhdl.. 15:08:33 I will takea look, thanks 15:11:27 so my simple line editor is working 15:12:25 and I found colored sources nice to read 15:15:45 <__tthomas__> Cool, do you have a repo anywhere? 15:15:59 <__tthomas__> AFK - UPS 15:17:37 I have an assembla repro but must check up mercurial first 15:18:44 not these weekend, but end of next week I will upload the current state 16:02:12 need some sleep, ciao 16:02:14 <__tthomas__> mercurial is good stuff, I use it for all my personal projects.. I have never used it, but I like the layout of codeplex, I have used google code but only for svn.. 16:02:17 <__tthomas__> night.. 16:02:18 --- quit: Mat2 (Quit: Page closed) 16:02:35 --- quit: sunwukong (Quit: ERC Version 5.3 (IRC client for Emacs)) 16:07:31 Is the minimal version of core in the 11.3 tarball? 16:13:57 <__tthomas__> what do you mean by minimal? 16:15:37 There used to be a comment in core.rx that "we now have a brutally minimal retro" not too far after metacompiler was done. 16:16:01 "minimal" is basically cleaning up and building the image at that point. 16:16:27 <__tthomas__> That should still work, after initial dictionary is built would just have to move save and bye words right after initial dict and call them.. 16:17:00 <__tthomas__> It might not be enough to use the metacompiler at that point though.. 16:17:05 right. crc did something like that and made it available, just can't remember where 16:17:27 <__tthomas__> That was an old version, on his blog he has a post on how to build minimal kernel.. 16:18:17 <__tthomas__> it would probably still work, I could try if you want.. 16:20:50 ah. found the post. thanks. 16:22:25 <__tthomas__> sure thing 16:35:27 <__tthomas__> crc read through new spec for Ngaro, it looks pretty good, there are some unknowns since I haven't done a lot with curses, other than just setting color of text and positioning.. Like for instance, if you are doing a multicolumn layout, you would want to update everything at once and not have your changes show as you are making them.. something like clear, write(2,7,"Lat: 127.0000 N), etc... update(); very bad pseudocode.. 16:37:18 <__tthomas__> Though I suppose force video update could cover that, not exactly sure how that would work.. 16:48:55 <__tthomas__> Though it is possible to do this stuff in vt-100 as well, so what works for one should work for other.. 16:55:41 --- quit: ivan`` (*.net *.split) 17:28:30 --- quit: roarde (Quit: Leaving) 17:30:37 __tthomas__: still lots to contemplate. but at least it's started now 17:31:24 <__tthomas__> http://ascii-table.com/ansi-escape-sequences.php interesting.. I think new ngaro console will work well, doesn't cover everything but covers the important things.. I would consider adding clear screen, clear line.. not sure if hiding cursor is possible, but that would good.. 17:31:48 <__tthomas__> cursor position would be good as well.. 17:31:55 roarde: I'll update the bits needed for the minimal image soo 17:31:59 son 17:32:02 soon 17:32:09 * crc hates typos 17:32:26 <__tthomas__> I can typo at 80 words a minute.. 17:32:40 clear screen is covered in the display character code at present 17:33:06 e.g., a negative character code will clear the display 17:33:33 <__tthomas__> cool, now just need a rogue implementation to test all features.. :) 17:40:02 <__tthomas__> well, heading out now.. later.. 17:40:08 --- quit: __tthomas__ (Quit: Leaving.) 19:30:57 --- join: roarde (~roarde@pdpc/supporter/active/roarde) joined #retro 22:22:44 --- quit: roarde (Remote host closed the connection) 22:23:46 --- join: roarde (~roarde@pdpc/supporter/active/roarde) joined #retro 22:36:38 --- quit: roarde (Remote host closed the connection) 22:37:20 --- join: roarde (~roarde@pdpc/supporter/active/roarde) joined #retro 22:38:55 --- quit: roarde (Remote host closed the connection) 22:39:46 --- join: roarde (~roarde@pdpc/supporter/active/roarde) joined #retro 22:55:57 --- quit: Kumul (Quit: gone) 23:59:59 --- log: ended retro/12.03.23