00:00:00 --- log: started forth/05.01.30 00:46:36 --- quit: ez4 ("Quitting!") 01:16:16 --- join: Raystm2_ (~Ray@adsl-69-149-63-57.dsl.rcsntx.swbell.net) joined #forth 01:20:33 --- quit: madgarden (Read error: 54 (Connection reset by peer)) 02:40:56 --- join: Quiznos (~b@69-168-231-199.bflony.adelphia.net) joined #forth 02:41:04 re, morning and hi 02:42:03 any one awake for a q: 02:43:54 bummer 02:44:58 well, lemme know one someine wakes. 03:09:24 --- quit: Quiznos ("[BX] Reserve your copy of BitchX-1.0c18 for the Amiga today!") 03:26:02 --- join: aum (~aum@60-234-138-239.bitstream.orcon.net.nz) joined #forth 03:27:45 * aum wonders if multitasking in forth is worth the effort, or whether it's just a waste of RAM and CPU 04:20:57 --- join: froop (~wossname@rn-v1w5a06.uwaterloo.ca) joined #forth 04:26:42 --- join: Topaz (~top@cerberus.saywell.net) joined #forth 05:42:17 --- join: madgarden (~madgarden@Ottawa-HSE-ppp4082712.sympatico.ca) joined #forth 08:03:57 --- join: Narrenschiff (~ritchie@itsnotthatbig.plus.com) joined #forth 08:42:46 --- join: robert (~purple@c-f778e055.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 09:45:16 --- join: manuel_ (manuel@siff.bl0rg.net) joined #forth 09:45:17 hi 09:45:24 Hi manuel_ 09:45:26 Hi, manuel_ 09:47:59 --- quit: Raystm2_ ("User pushed the X - because it's Xtra, baby") 09:48:22 i've written my first forth program, which reads barcodes from a barcode scanner, and checks if it is in ean 8 or ean13 format 09:48:39 i'm not sure about style and stuff, can i paste it somewhere so you coul dmaybe give me some criticism/hints? 09:48:50 if it doesn't bother you, that is :} 09:48:55 Sure 09:49:14 Which Forth system do you use? 09:49:30 gforth 09:49:51 Which system do you run it on? 09:49:56 (I'm just curious) 09:50:12 http://paste.lisp.org/display/5392 09:50:16 running on freebsd 09:50:21 and it's some kind of unknown scanner 09:50:26 that prints stuff on the serial console 09:50:29 delimite by linefeed 09:51:08 i'm writing the stuff on the pc first 09:51:09 OK, checking. 09:51:16 but eventually it'll end up on an AVR 09:51:23 not sure if the AVR will be programmed in forth though 09:51:44 after that i'll try to build the barcode -> prize DB in forth 09:51:58 just to get used to it 09:52:09 i have some trouble wrapping my head around it :} 09:52:24 Another microcontroller crazy Forther... :) 09:52:49 * robert just got his HUGE program to run in the exact 400000 cycles needed for one PAL frame. 09:52:53 not really for now :} 09:52:55 On a PIC18F 09:53:32 hee! 09:53:40 Looks pretty nice, good luck with the database. :) 09:54:04 I haven't written any framey syncy stuff since I was about 14, and that was on the Z80. I miss silly stuff like that. 09:54:34 Actually I'm going to use it as a video chip for a z80 computer. :) 09:55:23 sounds interesting! 09:56:07 Looks good overall 09:56:17 ok 09:56:30 so it's not a bad idea to use the buffer and a length variable? 09:56:33 * crc would try to eliminate the "else" in ean? though 09:56:39 Not in my book ;) 09:56:58 crc: yeah the else was the second thing i wasn't really sure about 09:57:19 manuel_: Personally I prefer values (or whatever you prefer to call them), i.e. variables which aren't indirect. 09:57:33 They act like constants. 09:57:42 You might want to use PAD to keep the buffer somewhere safe 09:58:03 (Doing that would prevent buffer overruns into compiled code) 09:58:16 * crc dislikes values 09:58:48 Yeah 09:58:54 A lot of people do. 09:59:00 I declare a holy war against them. 09:59:13 (This is the Forth community. :) 09:59:40 I won't say *not* to use them though 10:00:03 Right, use what you feel like. 10:00:08 Yup 10:00:18 Forth is flexible enough for everyone 10:02:50 ok, so i could make the length of the scanned barcode a value 10:02:58 use that instead of the cumbersome barcode-length @ 10:03:24 and put the string on the pad inside main as it will be converted to a d on the stack by ean? 10:04:32 Yup 10:06:11 --- quit: Topaz (Remote closed the connection) 10:08:15 manuel: a question? are you clearing the barcode-buf between reading say and ean13 followed by and ean8? or is that necessary? 10:10:54 sorry? 10:11:37 i didn't get the question 10:12:11 that's okay -- i'm sorta new too so please be patient while I re-pose the question :) 10:12:57 I notice that the main word allows for you to do a read from one bar-code type to another. 10:13:23 read-barcode gets the string from the serial port 10:13:31 when you have an ean-13 in the buffer you have 13 chars in buffer. 10:13:36 and then ean? converts it to a double-precision integer if the checksum is correct 10:13:38 yes 10:13:54 the next read-barcode overwrites it 10:14:15 when you read the ean-8 you still have 5 char in the buffer from the last read that don't get written over. 10:15:01 that doesn't matter really 10:15:12 i'll move it to pad anyway, i'm busy doing another thing right now :} 10:15:24 k 10:22:08 so i would put the stuff on pad, and read-barcode would set the values barcode-buf barcode-length? 10:23:54 this is a bad idea i guess 10:26:37 http://paste.lisp.org/display/5392#1 10:27:02 I don't have any way to test it, but that should work I think. With values and PAD as the buffer 10:27:11 so TO reassigns a value 10:27:14 Yes 10:27:22 100 to FOO 10:27:22 ok that's nice 10:27:25 Same as: 10:27:30 100 FOO ! 10:27:32 and all i have to care about is that the value on PAD is consumed inside a word 10:27:49 :) 10:28:04 PAD is good for things like buffers 10:29:20 ok 10:29:25 thank you 10:29:34 i'll go about implementing my hash-table then 10:31:23 --- quit: Narrenschiff ("Leaving") 10:33:10 * Raystm2 answered my own question -- answer is that "read-barcode" feeds the barcode-length to ean-8? and ean-13? and therefore ean-8? doesn't care if there are 5 chars left over in the buffer from the last ean-13? read. 10:34:24 Ray: I'd clean the buffer anyway, if I could afford the CPU cycle's and extra memory 10:35:20 i see. 10:35:52 That way you leave the buffer in a known state 10:36:04 * crc cleans TIB in Retro8 for that reason 10:36:11 understood :) 10:36:58 I havn't "played" with retro8 yet this week end -- need to :) 10:37:31 I'll be uploading a new alpha (smaller and faster) in an hour or so 10:37:43 With the dictionary and code separated :) 10:37:53 Go!! crc!! :) 10:39:18 * Raystm2 just finished of c4thches3 for colorforth the windows version. did Appelman nasm version yesterday. 10:39:31 awesome 10:40:36 it uses a 2d jump table with a double for next loop. that's new for me :) 10:42:19 I think I can make version 4 use a 2d array instead and make a fourth version of the game that is more like a traditional board with chess algebra notation as the api 10:43:42 very cool 10:43:54 * crc wants a chess game for retro8 :) 10:45:17 it's comming, believe me. I don't know what my malfunction is but for the last two years, I've written a lot of chess. 10:48:09 Chess is a Good Thing 10:49:18 one last bug in b18chess. then I'll be ready to convert all the do loops to for next and any complicated if statements to jump statments. 10:49:44 that just might be all I need to do to port this. 10:50:04 cool 10:51:03 * crc goes to get lunch; bbs 10:51:03 the last bug prints a colon in place of a "A" in the "list of previous moves" and in the save-file during whites pawn promotion to queen 10:51:53 simple to fix but sensitive to install :) 10:52:19 so far everything I've tryed breaks earlier castleing notation :) 10:53:20 but i know it's fixable -- just i don't "see" it right now -- but i will. 10:55:48 Hi 10:56:55 --- join: Herkamire (~jason@h000094d30ba2.ne.client2.attbi.com) joined #forth 10:56:55 --- mode: ChanServ set +o Herkamire 10:57:33 Hi arke Hi Herkamire :) 10:58:16 Hi Herkamire :) 11:03:57 hi guys :) 11:04:57 --- join: zoly (~l@ppp-62-245-208-251.mnet-online.de) joined #forth 11:05:11 'morning 11:05:22 Hi, zoly and Herkamire and arke and Raystm2. 11:05:38 hi rob 11:05:54 Hi Robert and Zoly :) 11:06:17 re 11:08:40 --- join: slava (~slava@24.43.80.135) joined #forth 11:08:45 hi 11:10:38 aum, does your forth OOP do inheritance? 11:11:04 --- join: lma (~markus@dialin-212-144-154-027.arcor-ip.net) joined #forth 11:12:57 --- quit: Raystm2 ("User pushed the X - because it's Xtra, baby") 11:21:55 back 11:24:22 --- join: Purdu3 (~Purdu3@12-222-128-22.client.insightBB.com) joined #forth 11:29:49 --- quit: lma (Connection refused) 11:32:34 --- join: Raystm2 (~Ray@adsl-69-149-63-57.dsl.rcsntx.swbell.net) joined #forth 11:41:10 crc, you got screen interface in jsforth 11:41:23 what are the words? 11:41:51 readline ( addr line# -- len) and writeline ( addr len line -- ) 11:42:12 grabs screen line, copies to forth mem, and vice versa 11:44:16 pad dup 0 readline 2 writeline copies top line two below 11:45:58 terminal emu mark 3 now 11:47:15 Nice 11:47:50 bit slower now. but look is quite ok with firefox 11:47:55 opera got worse 11:48:20 * crc needs more RAM 11:48:31 with outfile on , you can switch to the mark 2 terminal emu 11:49:46 (no "direct screen" with mark 2 driver) 11:52:41 Is there a word to clear the screen? 11:52:43 i've emailed diphi 11:52:47 cls or page 11:52:54 ok 11:53:22 proposed code swap 11:54:39 cool 11:55:01 merging best of both worlds, maybe 11:55:11 we can hope 11:55:23 hist term look nicer 11:55:29 do you use screens and blocks for your sourcecode? or files? 11:55:31 but my interpreter is better 11:55:38 i intend to 11:55:48 not implemented yet 11:56:27 * crc has implemented a block editor for zoly's forth :) 11:56:38 Just lacking load/save of blockfiles... 11:57:02 i need to find out how to get the contents of a web page which i read 11:57:40 no luck with that yet 11:58:03 :( 11:58:22 Once you get that working, I'll be able to load my editor without retyping it? 11:58:32 definitely 11:58:38 4 load 11:58:53 or whereever it would be 11:59:50 i could hardcode some blocks with source into the code 12:00:15 and load them into an array upon start 12:00:31 but, there wouldn't be a permanent save with that 12:07:42 * crc considers posting RetroEditor for RetroForth on the wiki... 12:09:10 The only reason not to at this point is that it won't run on any forth other than Retro8, which hasn't been publically released yet 12:10:07 the standard switching stuff in jsf does work 12:10:15 I noticed that :) 12:10:29 fig -> no more words, only vlist 12:10:42 --- quit: madgarden ("Miranda IM! Smaller, Faster, Easier. http://miranda-im.org") 12:10:44 also, semantics of words change 12:10:57 leave works differently in fig/f79 12:11:02 tick too 12:11:44 to get back to other standard, you need jsf 12:12:05 (the only word available through all standards to get out again) 12:12:46 there's jsf, ans, f83, f79, fig 12:12:53 retro has been prepared 12:15:32 prepend + to name of standard, to have words of several available at the same time 12:16:11 user added words are visible through all standards 12:17:43 nice 12:18:20 * crc has a version of his "v"iew block code that works under gForth now 12:19:03 from gforth to jsforth it is just a small step 12:19:33 --- quit: Purdu3 (Remote closed the connection) 12:19:37 if its not using anything i haven't implemented yet, it should run w/o mods 12:19:47 lest i've misinterpreted standard somewhere 12:20:05 The code is: 12:20:06 : row dup 64 type 64 + cr ; 12:20:06 : .rows 8 for r@ 8 - negate . row next ; 12:20:06 : .block ." Block: " blk @ . ; 12:20:06 : ?--- emit '- emit '- emit '- emit ; 12:20:06 : x--- '+ ?--- ': ?--- '+ ?--- ': ?--- ; 12:20:07 : --- space space x--- x--- x--- x--- cr ; 12:20:09 : vb --- blk @ block .rows drop --- ; 12:20:11 : .stack ." Stack: " .s ; 12:20:13 : status .block .stack ; 12:20:22 : v cr vb status ; 12:20:47 looks like everything you need is present 12:21:02 .stack ? 12:21:12 ah right. seen it 12:21:14 :) 12:21:26 It's pretty well factored I think 12:21:50 Neat 12:22:01 That code is pretty nice to watch. 12:22:59 How so? 12:23:08 '- won't work. [char] - or char = would 12:23:13 ahh 12:23:21 '- works in gForth 12:23:33 * crc likes numeric prefixes... 12:24:36 fixed 12:25:08 And posted to http://forthfreak.net/wiki/index.cgi?RetroEditor 12:25:18 good idea 12:25:59 This is the 12th version of RetroEditor that I've written, not counting each port to forths other than Retro :) 12:27:27 '- 3 emits 12:27:50 : emits for dup emit next drop ; 12:28:22 why not ." ---" ? 12:28:22 I try to avoid loops 12:28:32 Hmm 12:28:35 * crc should do that 12:28:49 I didn't add ." in compiled words until recently ;) 12:29:10 s" ---" type 12:29:20 s" is also fairly recent 12:31:41 19 bytes smaller when using ." ;) 12:32:16 * crc is still working on the editor; it still has some rough spots 12:34:15 Raystm2: you can do a "getretro" whenever you're ready to fetch the latest updates to retro8 12:34:41 --- join: rastm2 (~rastm2@adsl-69-149-63-57.dsl.rcsntx.swbell.net) joined #forth 12:34:44 yes sir 12:34:51 doing now 12:34:54 :) 12:36:29 got it 12:36:33 opening 12:37:07 running 12:37:38 It's a little smaller, faster, and has a couple of bug fixes 12:37:59 Including the fix to the classic mode bug that arke found :) 12:38:14 is the learn.blk there? 12:38:45 nope 12:38:51 btw, interactive javascript console: : js begin cr query 0 parse eval again ; 12:38:52 use lib/tutorial r 12:39:33 I'll be updating the tutorial a bit this week 12:40:12 tutor running :) 13:05:10 --- quit: rastm2 ("leaving") 13:54:29 slava: yes 13:54:45 slava: but only single inheritance 14:05:12 yikes, my overzealous optimiser 14:05:30 if a func has no code, the optimiser was removing the func totally 14:05:54 :) 14:06:01 Is that a bad thing? 14:06:19 yes, because calls to that func would end up as calls to the next-defined func 14:06:27 hmm 14:06:44 * crc wonders why you you'd have words with no actual code in them 14:06:57 stubs 14:07:20 * crc doesn't believe in stubs 14:07:33 i use stubs extensively while developing 14:10:11 hmm 14:10:14 Why? 14:10:28 --- join: TheBlueWizard (TheBlueWiz@modem-061.nyc-tc03b.fcc.net) joined #forth 14:10:44 so i can incrementally write/test without too much going on at once 14:11:05 * crc wonders how you can test code that does nothing :) 14:11:51 you're having a lend of me, aren't you crc? 14:12:02 ? 14:12:16 you got one dry sense of humour 14:12:31 I'm actually curious 14:12:49 I'd like to know how stubs that do nothing can aid in debugging 14:13:20 well, sometimes i like to compile/test a prog with some of its funcs implemented as stubs 14:13:47 because i want to observe the behaviour of other funcs in a simpler context 14:14:15 in this case, i'm building a multitasker for my forth 14:16:18 ok 14:16:21 yes! 14:16:27 yes? 14:16:32 :) 14:16:41 The PIC Forth? 14:16:44 yep 14:17:01 just got rerouting javascript external errors to forth throw working 14:17:28 >*pain*< 14:17:42 aum: Cool. Do you know where I can get sample code for serial (SPC) EEPROMs from the 18f458? 14:18:06 robert: tried www.piclist.com ? 14:18:18 Nope, I'll have a look at that site. 14:18:39 means, i can : foo s" this cause error" eval" ; ' foo catch to deal with external error in forth 14:18:43 robert: if you're desperate, download the freeware CCS C compiler, write some code which hits SPC EEPROM, and disassemble it 14:20:32 * crc assumes that the actual functions you make as stubs wouldn't affect the course of execution or data stack... 14:20:41 correct, of course :) 14:20:50 ok 14:20:56 or, i just set them to have predictable stack effects 14:21:03 I think I understand now; thank you 14:21:07 np 14:23:03 aum: Don't think I'll get that desperate. 14:23:22 http://www.piclist.com/techref/microchip/memory.htm <--- nice. 14:23:27 man, assembler coding is such a meditation, requiring such patience - it should be a prescribed discipline at monasteries 14:24:07 :) 14:24:46 My assembly is pretty much identical to what my Forth compiles 99% of the time 14:25:16 crc: you must have good opto then 14:25:33 very little opto actually 14:25:47 that means wither, your compiler optimized to hand crafted code, or you are are lousy assembly programmer :) 14:25:50 either 14:25:51 I have a handful of primitives for various stack ops 14:26:06 And a few compiler macros that inline common stack ops 14:26:09 same here 14:26:26 I don't want a complex optomizer in the core 14:26:27 many paths to zion 14:27:30 Most words compile to a sequence of CALLs, with a JMP at the end. With a few words inlined for size+speed reasons 14:27:32 aum: Heh. 14:27:50 aum: I spent 4 days on getting some code to run in exactly 400000 cycles. 14:28:03 wow! 14:28:15 what for? for exact time delays? 14:28:18 Had to redo it a few times because I misread some instruction timings. :/ 14:28:27 Yeah, PAL generator. 14:28:46 With character table lookup, DMA, and so on. 14:28:51 eh? you got a PIC spitting video? 14:29:19 Right. 14:29:26 wild shit man 14:29:30 At least I _hope_ that's what it's spitting out. 14:29:42 Otherwise I'll stand here with an exploded TV when testing it. ;) 14:29:51 So I'll make sure to check the code carefully first 14:29:56 robert: fed it into a CRO? 14:30:06 CRO? 14:30:17 cathode ray oscilloscope 14:31:22 Ah. 14:31:27 No, I don't have any. 14:31:38 But I'm using the Microchip simulator. 14:33:49 * aum loves the multipass capability of assemblers 14:36:22 Hehe, right. 14:38:35 bbl 14:39:51 Bye, crc 14:42:57 what's so special about multipass? wouldn't 2-pass be enough? 14:43:29 some refs may change in pass 2 14:43:52 what i like is, unlike forth, you can ref forward as well 14:44:01 some assembler do that many passes until generated code doesn't change anymore 14:44:13 aum, you can fwd ref with 1 pass 14:44:30 you can do that with forth too 14:44:51 yeah, some refs would get changed after pass 2 (if one wants to continue compacting the resulting output), but that's quite rare, so not worth it IMHO 14:46:50 aum, my forth compiler is single pass, but library is resolved against when it is included at the end 14:47:10 i.e. lib includes as result of unresolved words 14:47:44 forth is usually singlepass though 14:48:02 library is organized as well to build new fwd refs 14:48:15 as result, only required words are compiled 14:49:04 (i was considering an optional 2nd pass: in that case, the words taken from lib are compiled first, for better branch optimzing) 14:50:13 optional because code would work identically with only 1 pass. a few bytes saved would be the only gain 14:52:50 aum, half of my forth life i was working with fwd referencing forths 15:03:42 --- quit: TheBlueWizard (Nick collision from services.) 15:04:23 --- join: TheBlueWizard (TheBlueWiz@modem-131.nyc-tc03a.fcc.net) joined #forth 15:05:32 tbw, you said you use an interactive javascript console ? 15:06:32 I have an el cheapo javascript based debugger 15:07:10 kinda interactive, but extremely crude, as it only accepts Javascript code then click on Run button to see what happens 15:07:28 ah, ok. couldn't call this what i run a debugger. but maybe i could interest you for it. 15:08:09 only, i can't exit it ... 15:08:47 been using jsforth to code an interative js console 15:09:00 after js, it accepts only javascript 15:09:20 I will take a look at it, but later...right now I'm chatting with my buddy tonite 15:13:32 re 15:18:33 phew, hard part's done - written the multitasker 15:18:42 Cool :) 15:18:59 * robert will also need to study timesharing on PICs soon 15:19:13 just a dumb round-robin scheme, with voluntary 'yield' by tasks 15:19:37 Planning to use a single PIC as a keyboard controller and for "mass storage" (EEPROM), while having an interface to the main CPU. 15:20:16 robert: go on 15:21:33 Well, it's the problem with how to manage everything at once. The PIC should offer resaonable response times when data is sent from/requested to the main z80 CPU. 15:22:17 And it will also have to read/write EEPROM, take care of a keyboard, etc. 15:22:34 fun 15:22:35 The keyboard can be done using interrupts, I guess. 15:22:45 especially the mandatory wait for eepromp writes to finish 15:22:48 And I was thinking about using the new bus features of thepic18f 15:23:17 Well, then's a good time for some keyboard interfacing. :) 15:23:34 true 15:23:52 ya gonna set up a timer for global clock? 15:26:02 Perhaps. 15:26:25 That way I could at least do kb I/O in the background. 15:26:57 And connect the kb clock line to an interrupt-triggering input. 15:27:07 ..and use the interrupt feature on the bus. 15:27:09 i'll have to set up a global timer clock with this multitasker, so that individual threads can have accurate 'ms-delay' functions 15:27:11 What a mess. :) 15:27:28 embedded programming is /always/ a mess 15:29:55 But more real than coding on a Pentium. 15:30:30 A Pentium, with all its magic, is like a dark forest full of scary creatures. You never know how long walking through it will take. 15:32:01 lol true...especually with kernel level coding 15:33:08 well, for an os-less system, pentium in protected mode is nicer than 8086 15:33:20 I'd say it's true outside the kernel as well, but then you have the extra creatures called "kernel", "libraries" and "other processes" glowing in the dark. 15:33:53 --- join: raystm22 (~color4th@adsl-69-149-63-57.dsl.rcsntx.swbell.net) joined #forth 15:34:20 zoly: Well, 8086 being a 16-bit patch to an 8-bit version of a 4-bit processor... Yeah. A 32-bit patch to that is good. 15:34:35 not just because of 32 bits 15:34:52 registers are more general than on 8086, for example 15:36:52 Yeah. 15:37:02 I like the extra addressing features. 15:45:22 31-39 cycles for task context switching - not bad i guess, considering that the task's IP, data stack ptr and return stack ptr have to be swapped in and out 15:46:01 comes in at around 1us for a 40MHz PIC18F 15:46:03 Pretty good. 15:46:11 Uhm. 15:46:24 Is that machine or clock cycles? 15:46:35 same thing on pic18f 15:46:42 due to the 18f's caching 15:47:06 Hm? No 15:47:25 It too requires 4 clock cycles per instruction 15:47:33 yes, but it pipelines 15:47:41 --- nick: Raystm2 -> spike_anarchy 15:48:09 so while reading instruction n, it's finishing instruction n-3 15:48:16 Hmm.. 15:48:34 * robert checks the data sheet 15:49:42 --- nick: spike_anarchy -> Raystm2 15:49:43 Either you're wrong or the simulator has a terrible bug in it. 15:50:20 read the datasheet 15:50:43 I am 15:52:22 Ah, I found it 15:52:42 what section? 15:53:14 4.5 of 18f458 15:53:25 Says the clock is divided by four. 15:53:34 To produce those cycles. 15:54:17 There's also a diagram 15:54:34 oh, so it's still 4 clock ticks per cycle 15:54:40 Yeah. 15:54:54 well damn then, guess my multitasker now costs 4us/switch 15:55:11 I'm going to use a 10MHz clock, multiply to 40MHz internally, and then divide back to 10MHz. ;) 16:02:03 wow 16:02:11 how do you set up internal clock multiplication? 16:03:22 Check 2.5 16:03:34 Haven't tried it yet, so I don't know if I got that right 16:03:56 gotta go....I will look at javascript stuff later 16:04:30 --- part: TheBlueWizard left #forth 16:15:39 --- join: I440r (mark4@216-110-82-59.gen.twtelecom.net) joined #forth 16:16:27 Hi 16:17:51 --- quit: aum () 16:28:04 I440r: hey dude 16:28:08 I440r: whats up? 16:33:00 hi :) 16:33:06 not much, playin guitar right now :) 16:39:47 cool. 16:39:51 have you worked on the assembler? 16:39:58 no 16:40:03 aah. 16:40:11 so its still the way i left it 16:41:05 :/ 16:41:40 hmm 16:41:47 well i was looking at it again the other day 16:41:53 was thinking about doing some more on it. 16:42:00 adding single byte instructions 16:42:41 and, uuh, i dodnt 16:42:41 :) 16:46:57 :) 17:10:24 --- join: aum (~aum@60-234-138-239.bitstream.orcon.net.nz) joined #forth 17:10:48 Hi again 17:11:11 Did you see the frequency multiplier section? 17:23:35 --- quit: Raystm2 ("Client exited") 17:25:51 yep 17:26:08 shame it's only got 4x mode - would have liked a 2x mode so i could recycle my 20MHz rock 17:26:45 (atm, i'm single-stepping thru my multitasker kernel - intense shit) 17:28:54 Hehe, interesting. 17:30:13 my usual lame assembler hacking - averaging one error per 3-4 lines of code 17:31:26 Hehehe 17:34:04 * crc is back for about 1-1.5 hours 17:36:01 Hi 17:36:58 Hi robert 17:37:46 * crc is trying to decide what a Forth debugger for a slightly optomized STC forth needs... 17:38:50 real programmers just place their hand near the CPU, and feel the vibe and *know* what's going on 17:39:18 umm, that's hard on anything beyond a 386.... 17:39:22 * aum years ago used to know what was happening from the timbres coming from the antique disk drives 17:39:32 The heat kind of damages the nerve endings a bit ;) 17:39:38 heh 17:39:45 i did say 'near' 17:41:15 Hmm 17:41:26 Heat sinks and fans kind of make it hard to feel the vibe 17:41:47 Though if I could regulate fan speed by software, I could know if something is wrong by the sound... 17:57:04 aum, ping 17:57:29 aum, about inheritance -- i was thinking OOP with delegation is easier to implement and more flexible 17:58:11 pong 17:58:33 yep, my oo definitely has inheritance and unlimited generations of subclassing 17:58:44 but only single inheritance - no multiple inheritance 17:58:57 ok 17:59:07 see with delegation, instead of classes extending classes, objects extend objects 17:59:15 you can change the delegate of an object in runtime for funky effects 17:59:15 each instance contains a vtable ptr 17:59:26 hmm 17:59:30 no, each instance just has a slot 17:59:32 for the delegate 17:59:48 when a method is called on an object, if the object's class doesn't define it, instead of raising an error, you jsut call the method on the object's delegate (if its set) 18:00:00 all i got is where an object contains a vtable ptr, and the vtable (method table) for the class backlinks to its parent's vtable, and so on 18:00:01 if its not set, delegate to a special class that throws a 'undefined method' error 18:00:17 with this scheme, vtables would not have a 'parent' link 18:00:19 they'd just be flat 18:00:26 but method dispatch would be more complex 18:00:28 atm, i silently/quietly fail if method doesn't exist 18:00:53 hmm 18:02:53 i need auto recovery from 'method not found', because my oo tries to invoke an 'init' method when instantiating 18:03:35 * aum leaps, roars and bounces around the room, off the walls and ceiling 18:03:41 got my multitasker working 18:03:50 Congratulations. :) 18:03:53 my multitasker is crap, it copies the stacks to switch co-operative tasks 18:04:01 (again) 18:04:13 slava: copies the stacks? or stack pointers? 18:04:31 aum, both 18:04:40 you need separate stacks 18:04:55 aum, it should flip the pointers, but then each data/callstack pair would have 12kb overhead for guard pages 18:05:05 i have task control blocks of 6 bytes - 2 for task IP, 2 for task data stk ptr, 2 for ret stk ptr 18:05:42 you don't have stack bounds checking 18:05:57 i do, but its done by the mmu with guard pages so there's no runtime overhead, just 12kb wasted 18:06:53 i could introduce stack bounds checking but it would be a cruel overhead on the PIC 18:07:18 --- join: ez4 (~ez4@pcp01518726pcs.reding01.pa.comcast.net) joined #forth 18:08:30 aum, right 18:09:05 aum, factor could run on a cpu without an mmu given enough ram, but you'd have to forgo stack bounds checking to get good performance 18:09:13 sample multitasking prog - www.freenet.org.nz/pic18forth/mtdemo.f 18:10:23 bit limitation in my impl though - no ability to create/delete tasks at runtime 18:10:28 s/bit/big/ 18:11:07 hmm 18:12:40 man it's sooo hot here, i'm almost melting over the kbd 18:12:49 over 100% humidity 18:17:04 aum, i define lots of small objects with a delegate slot to some other object: TUPLE: literal value delegate ; 18:17:16 aum, i hate objects with lots of fields. 18:17:37 yeh, too many fields can be a waste 18:18:10 not sure i understand what you mean by 'delegate' - do you mean that if an object lacks a certain method, it can 'nominate' another object to receive that method? 18:18:15 yes. 18:18:57 i could do that, but not as nice - i'd need to have a ref to the second object within the first object 18:19:03 right. 18:19:25 i also define tuples that can't delegate to anything: TUPLE: point x y ; 18:19:29 you make me think though slava - seems i might need to implement a 'has-method?' method 18:19:43 --- quit: saon ("Lost terminal") 18:19:46 having good reflection can simplfy your implementation 18:20:06 emphasis on /good/ - bad reflection impl can be very costly 18:20:29 although your goals are different than mine, being a PIC and all 18:20:35 yep 18:20:36 i can spend 700 lines on an object system :) 18:20:43 luxury! 18:20:59 * aum counts lines of code in his oo system 18:21:09 when i do a gui, you'll be able to look at a hashtable or anything else in the gui directly 18:25:09 the runtime for my oo system takes 142 bytes of machine code 18:25:20 cool 18:26:09 it also allows early binding, eg 'myinstance someclass::somemethod' instead of 'myinstance -> somemethod' 18:26:54 cool 18:26:57 i don't have this 18:26:57 early binding is way faster - just as fast as forth non-oo funcs, but uglifies the code and gives more responsibility to user 18:27:17 my compiler will optimize away vtable dispatch soon 18:27:39 wow! 18:27:48 for late binding as well? 18:28:00 well, only if it can infer the type 18:28:06 right 18:28:36 also in some cases i will compile multiple copies of the same word, each one specialized for a certain class of input parameters 18:28:56 so if a word calls 5 late-bound methods on the same object, 5 vtable dispatches become 1 18:29:00 my compiler is a bit neanderthal for method hits - 'myinstance -> somemethod' compiles to '(literal)(myinstance) (->)(2-byte hash of 'somemethod') 18:29:29 have you heard of sun's self language? 18:29:38 no 18:29:43 is it an experimental oo thing? 18:29:43 its smalltalk-like, it was a project at sun research in early-mid nineties 18:29:53 it got killed when the other group in the lab invented java, which was a damn shame. 18:30:11 java is a damn shame 18:30:15 self was even more late-bound than smalltalk because methods belonged to individual objects 18:30:23 and objects could delegate to each other 18:30:57 costly i guess? 18:31:10 but they achieved performance close to C by compiling lots of versions of frequently-called methods -- 1 in 10 apparent late-bound message sends in your source actually became a real dispatch and not a direct jump 18:31:36 that is truly an advantage of statically typed langs 18:31:43 self is dynamically typed 18:31:58 with static typing, the compiler has a lot more free reign to optimise 18:32:02 x + 2 sends the message + to x with arg 2; you can't assume its an integer or anything 18:32:23 but you can compile two versions of this piece of code, one assumes x is an integer and does a cpu opcode to add 2, the other does a vtable lookup 18:32:34 interesting 18:32:54 i'm addicted to python, where you can interrogate types of args at runtime and do all kinds of cool shit 18:33:03 they would even inline late-bound method bodies, if the same method was being called, all the time at one place 18:33:12 Hrm, this week's exercise is to implement a Forth in Java 18:33:18 and recompile the body without inlining if suddently some other class's method starts getting called from that call site 18:33:35 robert: you mean, in your CS class? 18:33:40 Yeah. 18:33:48 First useful program EVER. 18:33:55 aum, self solved the problem of late-bound method dispatch performance in a really comprehensive way. 18:33:58 The teacher probably hit his head. 18:34:06 heh 18:34:19 how *much* forth do you have to impl? 18:34:25 --- join: saon (1000@c-24-129-90-197.se.client2.attbi.com) joined #forth 18:34:26 Well.. 18:34:33 Just a postfix calculator. 18:34:46 robert: i recommend you have a look at jython - a really cool full python impl in java 18:34:58 Heh 18:35:04 jython allows python objects to invoke java methods, create java objects, even receive java callbacks 18:35:06 --- join: Raystm2 (~Ray@adsl-69-149-63-57.dsl.rcsntx.swbell.net) joined #forth 18:35:14 you can subclass a java class in python 18:35:18 An interpreter that runs in a VM? Wow. 18:35:30 it's not exactly, er, /fast/ 18:35:56 but it does allow python apps to be packaged/distributed in standalone .jar files 18:35:57 I come to think of The Simpsons, when Bart sews a pidgeon to a rat. 18:36:06 rofl 18:36:34 actually, cpython is so slow that jython is competitive 18:36:46 depends on how the cpython code is written 18:36:59 bad cpython surely is a dog 18:37:06 the implementation of cpython does not have a compiler of any sort 18:37:16 wha? 18:37:37 it /does/ have a compiler 18:38:10 anyway - time for my annual haircut - might help me cope better with the heat here 18:38:21 anyone else here in the southern hemisphere? 18:38:25 not a native compiler 18:38:33 i used to live in new zealand 18:38:42 slava: py2exe.sf.net 18:38:49 slava: yeah? where? 18:38:53 wellington 18:39:00 oh, cool city! :)) 18:39:34 best vibe in any city i've lived in, save for SFO 18:39:43 and perhaps SYD 18:39:55 i've been to sydney 18:40:18 did you go to the Cross? 18:41:05 man, i soo gotta go afk, this heat is killing me - AMD box makes it worse... 18:41:08 bbl.. 19:05:35 --- join: asymptote (~dmesg@68.48.8.92) joined #forth 19:09:54 --- quit: froop ("does anybody read these things") 19:15:44 --- join: tathi (~josh@pcp01375108pcs.milfrd01.pa.comcast.net) joined #forth 19:17:59 --- quit: saon ("leaving") 19:41:55 --- quit: robert (".") 19:56:28 --- join: Sonarman (~snofs@adsl-209-233-52-90.dsl.snfc21.pacbell.net) joined #forth 20:25:09 --- quit: tathi ("bed") 20:40:31 --- join: saon (1000@c-24-129-90-197.se.client2.attbi.com) joined #forth 21:00:40 --- part: asymptote left #forth 21:22:19 --- join: asymptote (~dmesg@68.48.8.92) joined #forth 21:23:06 --- part: asymptote left #forth 22:20:25 --- quit: Sonarman ("leaving") 22:37:36 --- quit: zoly (Read error: 110 (Connection timed out)) 23:59:59 --- log: ended forth/05.01.30