00:00:00 --- log: started forth/05.01.04 01:49:12 --- join: bbls (~bbls@80.97.121.133) joined #forth 03:31:18 --- join: aum (~aum@60.234.138.239) joined #forth 03:34:29 Hi 03:34:36 hi 03:35:58 hi 03:37:09 i think i've arrived at a workable model for ePICforth - default 16-bit, with 2+ 2! etc for 32bit, and c+ c@ c! for 8bit 03:38:07 : 03:38:08 :) 03:38:46 so '$4a' pushes '00 4A' onto the stack, where 'c$4a' pushes just '4A' 03:40:10 Big endian? 03:40:17 little endian 03:40:37 sorry, i meant: '$4a' pushes '4a 00' 03:40:41 Ah, OK. 03:40:43 definitely little-endian 03:41:10 my brain is seized up in little-endian mode, after too many years developing for embedded x86 boards 03:41:41 I'm raised with x86, so... 03:41:46 plus, it's quicker/easier to up-cast and down-cast between different bytes sizes 03:41:48 Learned to appreciate it, 03:41:52 Exactly. 03:44:36 but by allowing words which push/pop single bytes to/from stack, i'm giving lots of rope for app-writers to hang themselves 03:45:18 Like Forthers aren't used to that. 03:45:21 need to support 8-bit ops though - only got total 96 bytes for return and data stacks combined 03:45:41 word calls push 3 bytes onto return stack (ret addr + frame marker) 04:05:13 need 2 sets of variable/value words though - one set to allocate from RAM, and another to allocate from EEPROM 04:08:22 I don't even remember if I had any EEPROM vars. 04:08:34 Or just read/write to EEPROM words. 04:08:48 As most variables are in RAM anyway 04:09:16 in ePICforth, '@' and '!' access RAM if address < 200h, and EEPROM if address >= 200h 04:09:55 it's a crude hack which wastes 500 bytes of EEPROM, but provides a contiguous von Neumann memory model 04:10:03 s/500/512/ 04:10:06 Yeah, I had a similar mapping. But the variable words by default allocated RAM 04:10:45 so i might be best off for 'variable' to allocate RAM, and (say) 'fvariable' to allocate EEPROM, i guess 04:17:23 How does that waste 512 bytes of EEPROM, btw? 04:18:13 because /logical/ address 0x200 maps to /physical/ address 0x200 in eeprom 04:18:23 Oh. Why? 04:18:43 otherwise, there's a constant need for offset addition/subtraction, which bloats code and /further/ slows the vm 04:19:18 Wouldn't it be a single 8-bit subtraction? 04:19:21 i thought of having EEPROM address 0000 mapping to logical address 200H 04:20:10 also, it's a moot point since the total address space is 64k 04:20:30 and with 64k of eeprom, i still have to mask off the bottom 0200 for RAM anyway 04:20:46 Oh, OK. 04:20:57 I forgot you're working with external EEPROM. 04:21:13 Anyway, the address space limitation is a good reason. 04:21:36 Otherwise I'd say that there's no need to worry about ONE subtraction when you're using something that slow. 04:22:22 hits to eeprom from forth code are hideously slow - need to shut down the read sequence, move the EEPROM's cursor to the location i want to access, do the access, shut down the read, and move the cursor back to pointing to the next opcode 04:22:49 'find' takes about 1200ms to search the whole dictionary, for example 04:22:58 Haha. 04:23:03 that's when find is written in forth 04:23:03 Do you use hashing? 04:23:08 no hashing 04:23:15 Ooookay. 04:23:17 can you suggest a good small/fast/easy algo? 04:23:29 i rewrote find as a C primitive, and it's way faster 04:23:42 This one I stole from Mark. length*4 + first char*2 + second char 04:23:53 Where second char = 0 in case of a one-character name. 04:24:03 How much RAM do you have? 04:24:26 3 banks of 80-96 bytes 04:24:34 OK. 04:24:36 bank2 is for the stacks - 96 bytes 04:24:45 bank3 sorry 04:24:48 How about some caching? 04:24:52 bank0 is used for the vm C variables 04:25:17 banks 1 and 2 give about 180 bytes for forth variables 04:25:52 oh, with that hashing - what about when words differ only in their 3rd and subsequent chars? 04:27:24 Every hash slot contains a pointer to a linked list. 04:27:58 So you may still have to do some searching, but considerably less than otherwise. 04:28:11 is it a 1-byte hash? 04:28:20 isForth uses modulo 64. 04:28:40 So the hash table would take an extra 128 bytes. 04:28:43 Pretty affordable. 04:29:19 actually quite nice - cuts search time by >99% :) 04:30:04 When I changed to hashed dictionaries in my DOS Forth it got about 30% faster. I think that's because I do a read() syscall with a one-byte buffer. ;) 04:30:09 So the real bottleneck is there. 04:30:12 --- join: swsch (~stefan@swsch.sustaining.supporter.pdpc) joined #forth 04:30:22 Will change it some day 04:30:25 Hi swsch 04:30:31 hi Robert 04:30:36 but does that require each dictionary entry to have 2 link fields - one regular forth backlink, and one 'next word that shares this hash slot' link? 04:31:22 No. 04:31:59 The backlink, is that what "last" or "latest" returns+ 04:32:00 ? 04:32:07 yes 04:32:18 OK, then no. I just use one such variable. 04:32:42 Because words like "immediate" obviously don't care which hash slot that is used. 04:32:53 for instance, my dictionary entries are 2-byte backlink, then word length field (with bit7 as 'immediate' flag), then the name, then straight into the code 04:33:42 You can add words in the opposite order. 04:33:54 I.e. the hash slot will always point to the most recent word in the slot. 04:34:09 And that word points to the one which previously was in the front, etc. 04:34:54 not sure i understand - does this hashing scheme allow iterating through the whole dictionary in reverse order of word definitions ? 04:35:08 or do you iterate hash-slot by hash-slot? 04:35:18 Right. 04:35:50 It adds a little complexity, I admit, but compared to what you gain it's worth it. 04:36:06 For some bizarre reason Chuck et al are opposed to hashing, but I can't see why. 04:36:15 actually that makes sense, since the only possible problem (ie, redefining words) is solved by the fact that the word names are the same, so the new version of the word will sit in the same slot 04:37:01 so if i have ': someword ... someword ... ;', then later usage of 'someword' is guaranteed to get latest vers 04:37:11 bbiab 05:07:53 back 05:08:24 Hi again 05:08:28 yo 05:08:33 was walking the dog 05:09:07 and confronting a question - would there be any possible use for a smartcard running forth microcode? 05:10:48 Geek toy? 05:12:35 haha 05:13:18 painful thing about smartcards is they only give you access to 2 I/O pins, and digital-only, not analog 05:15:21 Hmm.. well.. 05:15:57 2-line interface to a terminal :) 05:16:06 yep 05:31:55 --- quit: bbls (Read error: 110 (Connection timed out)) 06:06:41 hmm, 8 x 24LC512 eeproms opens up a total 512k address space 06:07:13 * aum goes away to bed with that thought 06:07:17 What will you use all that for? 06:07:20 Hehe, good night. :) 06:43:36 --- join: snowrichard (~richard@adsl-69-155-177-153.dsl.lgvwtx.swbell.net) joined #forth 06:46:33 Hey snowrichard 06:47:00 good morning I was getting my coffee 06:47:42 saw the swedish red cross director on CNN this morning 06:48:10 Is he down in Asia? 06:48:38 he was talking about there being so many swedish tourist there 06:50:03 Yes, more than 2000 Swedes missing still. 06:55:09 darn missed getting my trash out 07:03:36 --- quit: snowrichard ("Leaving") 07:25:32 --- join: bbls (~bbls@80.97.121.133) joined #forth 07:37:27 --- join: snowrichard (~chatzilla@adsl-69-155-177-153.dsl.lgvwtx.swbell.net) joined #forth 07:46:45 --- quit: snowrichard ("ChatZilla 0.9.61 [Mozilla rv:1.7.3/20040913]") 09:13:46 --- join: arke (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 09:26:56 --- quit: arke ("CGI:IRC (EOF)") 09:29:27 --- join: arke (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 09:41:55 --- join: zoly (~l@ppp-82-135-1-10.mnet-online.de) joined #forth 09:42:01 g'day 09:42:12 crc ? 09:45:22 teh hies 09:45:51 there has been a bit of work done on an improved wiki markup processor at http://www.forthfreak.net/misc/wikiprocessor.f 09:46:05 zoly, mnet - never heard of them. Are they a new ISP? 09:46:10 oh joy. 09:46:14 nope. 09:46:24 merged with nefcom recently 09:46:52 probably the best provider around 09:47:27 neat. 09:47:45 can't wait until I get to move back ... :/ 09:47:49 many one-liners :) 09:48:51 :) 09:50:20 reason for "not many wiki in forth" has been given as "most forths lack that level of string processing" 09:50:42 that's what the stringstack lib is used for 09:50:49 can be found on same wiki 09:51:11 http://www.forthfreak.net/wiki/index.cgi?StringStack 09:52:30 where can i find a good oop model for forth? 09:52:33 :) 09:52:43 bbls: don't. It's evil. :P 09:53:01 well, it well suitable for large projects i suppose 09:53:06 bbls: look here 09:53:08 http://www.forthfreak.net/wiki/index.cgi?SmallOOPS 09:53:19 thx 09:53:21 this is more of a demo 09:53:30 i just want to see the idea 09:53:30 but works 09:55:19 :) 10:01:25 that model has one of the cleaner oo syntaxes imho 10:01:48 that's good :) 10:02:03 parent class: newclass new: object { method do something } 10:02:35 that's the three basic operations: creating subclasses, instances and methods 10:03:50 do you people know any good forth -> asm? 10:03:57 that does not make use of system calls? 10:05:31 bbls, there's a target compiler, not quite finished, but working, at http://www.forthfreak.net/wiki/index.cgi?NativeCodeCompiler 10:05:47 but for i/o it uses system calls, not libs 10:06:07 ok, so as long as i don't use i/o it won't make system calls, don't? 10:06:13 in fact, it uses no non-source-forth-libs at all 10:06:35 right. 10:07:00 http://www.forthfreak.net/wiki/index.cgi?NativeCodeCompilerWorkingExample 10:07:26 i'm interested into writing a kernel from scratch in forth 10:07:45 everybody does 10:07:57 but if it does syscalls then you can't do it 10:08:25 the kernel you'd make would use the i/o you've defined for it 10:08:35 not the host systems i/o 10:09:04 i mean that usually you write a forth interpreter in asm and then the rest of of the kernel in forth 10:09:13 if you write a kernel, it is your job to provide i/o functions 10:09:15 what i want is the entire kernel in forth 10:09:28 (including the forth interpreter) 10:09:44 http://www.forthfreak.net/wiki/index.cgi?ForthForth 10:10:00 this uses a vector table for i/o 10:10:12 oh, ok 10:10:17 i.e. you stick address of i/o routines in there 10:10:24 i've understood 10:12:39 are you running linux ? 10:13:40 no, windows 10:13:49 win2k 10:14:22 i've used to run linux, but now with win2k i don't need it that much anymore 10:15:08 then forget about the compiler, it generates ELF programs (those run under linux) 10:15:25 i do have mingw tools 10:15:35 all i need is objcopy 10:15:50 to extract the binary content out of the elf 10:16:20 objcopy: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big s 10:16:20 rec symbolsrec tekhex binary ihex 10:16:21 --- quit: arke ("CGI:IRC (EOF)") 10:16:23 possibly the evaluation swiftforth would be a better choice 10:16:42 so my objcopy supports elf32 10:17:10 --- nick: zoly -> zoly_afk 10:17:16 bye 10:17:58 it's not open source so i preffer not to use it 10:18:24 i don't like to have my projects being dependant on commercial tools 11:26:38 --- nick: zoly_afk -> zoly 12:31:13 --- part: slava left #forth 12:56:45 --- join: tathi (~josh@pcp01375108pcs.milfrd01.pa.comcast.net) joined #forth 13:04:50 --- join: arke (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 13:13:42 --- join: SeaForth (~SeaForth@c-24-1-126-202.client.comcast.net) joined #forth 13:20:18 --- quit: tathi ("leaving") 13:23:37 --- join: tathi (~josh@68.81.165.175) joined #forth 13:38:33 tathi: can you help me out with something? 13:57:45 --- quit: arke ("CGI:IRC (EOF)") 14:46:08 --- join: Topaz (~top@spc1-horn1-6-0-cust217.cosh.broadband.ntl.com) joined #forth 15:55:34 --- quit: tathi ("leaving") 15:57:12 hi all 16:02:04 hi crc 16:02:10 Hi zoly 16:03:15 just busy on WikiWords and [wikiwords] 16:06:07 got exactly one no-oneliner 16:09:32 --- quit: Topaz (Remote closed the connection) 16:14:23 --- join: Sonarman (~snofs@adsl-64-169-93-51.dsl.snfc21.pacbell.net) joined #forth 16:52:03 --- quit: Sonarman (Read error: 110 (Connection timed out)) 17:16:38 http://forthfreak.net/wikiprocessor.f , linked to from http://www.forthfreak.net/wiki/index.cgi?WikiWrittenInForth 17:18:47 how well does it work? 17:19:37 stable. still minimal. 17:20:11 just bullets, headers, WikiLinks, [wikiliks], !PreventionOfLink, ![prevention] and free text 17:20:23 --- join: Teratogen (~leontopod@intertwingled.net) joined #forth 17:20:56 ok 17:21:09 * crc should update RetroWiki sometime... 17:21:39 want half a page of sample output, and the corresponding test lines ? 17:21:44 sure 17:21:53 i'll put it on the wiki in a moment 17:24:13 crc: http://www.forthfreak.net/wikitest 17:24:34 * swsch is away: going ... going ... gone. 17:25:20 it doesn't close the
  • tags 17:26:33 ah,ok. been using kwiki output as reference :( 17:29:22 hehe 17:30:32 Other than that, it looks pretty good to me 17:30:49 maybe use all caps or all lowercase for the tags though 17:40:25 --- quit: bbls (Read error: 110 (Connection timed out)) 17:44:50 --- join: Sonarman (~snofs@adsl-64-160-167-67.dsl.snfc21.pacbell.net) joined #forth 17:47:43 would it make sense to put it on sourceforge ? 17:55:58 no 17:56:03 sf sucks 17:56:54 * crc closed down the sf.net account for retroforth last month 17:57:14 I prefer to host things myself 17:58:01 * crc is considering offering free hosting for open-source forth projects 18:10:21 sf bandwidth is awful 18:11:20 and the admin interface sucks 18:17:29 crc what sort of admin interface would you offer if you were to offer free hosting to open source projects? 18:18:12 I'm not sure yet 18:18:28 I wouldn't require a "file release system" though ;) 18:20:43 * crc is open to suggestions 18:21:39 ftp :) 18:21:58 that's a given. 18:23:21 rsync :) 18:25:13 hmm, I've never used rsync 18:30:28 oh, I love it. 18:30:45 that's how I update websites 18:30:56 make changes and test locally, then just run rsync 18:31:10 and it copies all the changes (even the one's I'd forget if using FTP) 18:31:15 securely and compressed 18:31:26 sounds nice 18:33:59 * crc goes to bed; be back tomorrow 19:03:42 --- join: TheBlueWizard (TheBlueWiz@modem-095.nyc-tc03a.fcc.net) joined #forth 19:49:44 --- quit: Sonarman (Read error: 110 (Connection timed out)) 20:02:33 --- join: I440r (~mark4@216-110-82-59.gen.twtelecom.net) joined #forth 20:04:26 hiya I440r 20:04:32 hi 20:05:49 faring well? 20:06:02 not too bad 20:06:05 exhausted :) 20:08:14 * TheBlueWizard smiles and nods 20:38:59 --- join: slava (~slava@CPE00096ba44261-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 20:39:05 I440r, ping 20:39:36 hi 20:44:29 hiya slava 20:46:08 --- quit: aum (Remote closed the connection) 20:53:10 bye 20:53:12 --- quit: slava ("Leaving") 21:13:31 --- part: TheBlueWizard left #forth 21:24:38 --- join: Sonarman (~snofs@adsl-64-160-166-188.dsl.snfc21.pacbell.net) joined #forth 21:52:35 grrrrrr 21:52:37 I hate html 21:53:39 Hehe 21:53:49 wish I could just do Replace it with Forth. ;) 21:54:27 come to think of it... I wish you could do all controlls that way 21:55:40 22:03:50 if all controlls had the same syntax it would make my life a lot easier 22:09:31 --- quit: zoly (Read error: 104 (Connection reset by peer)) 22:14:23 --- quit: Sonarman ("night") 22:20:32 --- join: aum (~aum@60.234.138.239) joined #forth 22:20:53 Hi aum 22:21:10 Will your PIC Forth support locals? 22:21:22 just finished locals last night :) 22:21:30 implemented with return stack frames 22:21:50 Neat 22:23:19 supports the John-Hopkins syntax, ie '{ stkvar1 2:stkvar2 | localvar1 ... -- }' 22:24:29 Would you mind exlpaining that? 22:26:13 yes - imagine a word 'fred' that takes 2 args, x and y 22:26:21 you'd call it with (say) '2 3 fred' 22:26:30 fred's definition starts with: 22:26:39 : fred { x y } 22:27:01 the '{' reads up to the '}', and transfers that many args from data stack to the return stack 22:27:14 in this case, 2 cells get moved from datstk to retstk 22:27:47 and thereafter inside fred, the word 'x' looks at the current retstack frame, copies the first cell onto the data stack 22:27:50 I see. But isn't that just for named parameters? 22:28:00 but also private locals 22:28:05 if you defined fred as: 22:28:15 : fred { x y | private1 private2 ..} 22:28:20 --- join: zoly (~l@ppp-62-245-161-48.mnet-online.de) joined #forth 22:28:34 you get private local variables created on the retstack frame as well 22:28:45 and according to convention, these get initialised to zero 22:28:54 create does> gets pretty close to OO in some respects 22:29:08 zoly: except that it only offers a single method 22:29:15 right 22:29:43 first person to create a comfortable, readable, efficient OO for forth will have scored a coup 22:30:00 wanna read my forth oo syntax ? 22:30:12 aum: OK, nice. 22:30:32 superclass class: foo class: subfoo 22:30:41 { method1 dosomething } 22:30:42 Robert: slight price paid wrt efficiency - every hit to a local variable results in memory block move 22:30:55 { method2 dosomethingelse } 22:31:07 ( those methods go to class "subfoo" 22:31:09 ) 22:31:11 aum: "hit to a local variable"? What? 22:31:19 new: instance_of_subfoo 22:31:25 retrieving or setting the value of a local variable 22:32:14 aum, more concise syntax can be found here: http://www.forthfreak.net/wiki/index.cgi?SmallOOPS 22:32:45 aum, search for "demo + test" , starts with syntax explanation 22:33:01 zoly: nice you've been offering another oo model - however i would counsel against use of '{' in your syntax - '{' and '}' are usually for local vars 22:33:04 there are lots of oo implementations in forth 22:33:20 aum, i tend not to use local vars. 22:33:30 so i didn't really care 22:33:49 well, if the oo is good, one can use attribute space inside the object instead of local vars :) 22:34:06 it sure knows instance data 22:34:09 what would be a dream is a forth where everything on the data stack is an object 22:34:37 i built a forth-python interface some time ago 22:34:48 aum: that tends to happen automatically in forths written in oo languages ie python 22:35:01 and handled some interesting issues - eg, refcounting of items on stack 22:35:22 i do that for strings stack 22:35:33 saves a lot of time and space with duplicated items 22:35:53 as strings are clumsier to handle than integers 22:36:36 so string stack elements use a kind of copy-on-write 22:36:52 zoly: neat 22:37:51 are there any word attribs i need apart from 'immediate' and 'compile-only' ? 22:37:54 I haven't made a solution for strings that change at runtime. 22:39:02 thats the same stringstack stuff i'm using as base for the wiki markup to html translation i'm currently working on 22:39:08 http://www.forthfreak.net/wiki/index.cgi?StringStack 22:39:09 --- quit: I440r ("Leaving") 22:39:29 i dunno why, but there's something really addictive about forth 22:39:45 hmmm... my wiki doesn't require anything of that sort 22:39:48 the feeling of being an outcast ? 22:39:56 Haha. :) 22:40:08 I purposely designed my wiki syntax so it can be processed one char at a time 22:40:11 heh, yes, forth h4x0rz often tend to be loners 22:40:33 not in here 22:40:37 Herkamire: helps for things like image links, for example 22:40:54 zoly: oh crap, you're right 22:41:10 http://xxxx.xxxx/xxxx.png 22:41:21 with links (image or otherwise) I read the whole thing in, and handle it diferently if there's a colon in it 22:42:09 just uploaded a new version a few minutes ago: http://www.forthfreak.net/wikiprocessor.f 22:42:33 http://www.forthfreak.net/wikitest this is what and how it translates currently 22:42:47 sorry, no time for that now. 22:42:51 zoly: you really need to write apache in forth :OP 22:42:56 I've gotta finish up my work and go to bed soon 22:43:19 * aum wonders if anyone is working on a 'mod_forth' module for apache 22:43:19 don't rewrite apache, make something simple 22:43:36 aum: isn't it weird that there doesn't seem to be a mod_forth? 22:43:44 there's a mod_bf for god sake 22:44:20 Hehe. 22:44:24 But bf is special. 22:44:40 It's like the law that in an online flamewar, Hitler sooner or later is mentioned. 22:44:55 bf is also implemented sooner or later for a specific platform/application. 22:47:02 what??? there's a mod_bf? as in the BrainFuck language? 22:50:19 Right 22:53:52 maybe i should look at a mod_forth 22:55:22 * aum goes off for his daily hit of rtcw:et 22:55:25 --- quit: aum () 23:14:08 I think a mod_forth for apache2 would not be at all hard. I even started doing it once 23:19:26 --- quit: Herkamire ("bed") 23:27:37 --- quit: cmeme ("Client terminated by server") 23:28:17 --- join: fridge (~Jim@CommSecureAustPtyLtd.sb1.optus.net.au) joined #forth 23:28:23 --- join: cmeme (~cmeme@216.184.11.2) joined #forth 23:33:46 --- join: swsch_ (~stefan@p5091FE7F.dip.t-dialin.net) joined #forth 23:41:45 --- quit: swsch (Read error: 60 (Operation timed out)) 23:55:40 --- quit: fridge ("Leaving") 23:59:59 --- log: ended forth/05.01.04