00:00:00 --- log: started forth/01.11.16 00:07:06 --- join: MrZzzz (~mrreach@209.181.43.190) joined #forth 00:07:12 --- nick: MrZzzz -> MrReach 00:07:37 --- mode: ChanServ set mode: +o MrReach 04:48:17 --- quit: MrReach (varley.openprojects.net irc.openprojects.net) 04:49:04 --- join: MrReach (~mrreach@209.181.43.190) joined #forth 04:49:04 --- mode: niven.openprojects.net set mode: +o MrReach 06:21:08 --- join: edrx (edrx@200.240.18.84) joined #forth 06:48:24 --- quit: MrReach (varley.openprojects.net irc.openprojects.net) 06:51:50 --- join: MrReach (~mrreach@209.181.43.190) joined #forth 06:51:50 --- mode: niven.openprojects.net set mode: +o MrReach 06:54:37 --- quit: edrx (varley.openprojects.net irc.openprojects.net) 06:56:55 --- join: edrx (edrx@200.240.18.84) joined #forth 07:15:33 --- quit: edrx ("[x]chat") 09:10:53 --- join: edrx (edrx@copacabana-ttyS24.inx.com.br) joined #forth 09:55:17 --- quit: edrx (varley.openprojects.net irc.openprojects.net) 09:57:48 --- join: edrx (edrx@copacabana-ttyS24.inx.com.br) joined #forth 10:53:12 *YAWN* ... hiya! 10:53:36 edrx: was it you that was talking about fast-dispatch objects?? 11:18:40 MrReach: no, it wasn't me 11:18:48 ok 11:21:57 btw, I have just rewritten my minimal Lua-based Forth... http://www.mat.puc-rio.br/~edrx/miniforth/mf1.lua is all its code, except for the implementation of regex and regmatch (in C, and quite standard) and the demo - http://www.mat.puc-rio.br/~edrx/miniforth/yoneda.mflua ... 11:22:42 * MrReach goes and browses, since he's still drinking his morning coffee 11:23:27 is it really morning there, or just because you've just waken up? 11:23:42 just me, i tend to be a night owl 11:23:49 it's 11:23 here 11:24:31 me too 11:24:46 I've been going to about around 6:00am most nights 11:24:59 * MrReach nods 11:25:33 I take it ... 11:25:45 that the last part of the second URL is an example application? 11:25:52 yes 11:25:59 no, still lua defs, I guess 11:26:37 which part? 11:27:10 each ::lua .. ;; line defines a new function in the dictionary, but the ... is lua code 11:27:21 * MrReach nods. 11:27:30 the %: lines are comments 11:27:41 does any of this ever start to LOOK like for code? 11:27:46 yes, I remember 11:28:39 not yet, because I haven't created yet any mechanism for whatever could play the role of an inner interpreter, even if it is going to be a macro facility 11:28:52 ok 11:30:22 it seems that I'm the only one who decided that the essence of forth is "parse one word, then execute it, then repeat" instead of something based in interpreting bytecodes 11:30:41 heh, I guess so 11:31:11 one of those words to execute is colon, of course 11:31:23 yes 11:31:24 which changes the parsing behavior somewhat 11:32:36 yes, and we could even code that in a way that the "parser behaviour" is represented by a very simple function, and at some point it is replaced by another one with a more complex behaviour... like acting different depending on STATE 11:33:31 yes, and getting immediate words to behave properly 11:33:38 yup 11:33:51 Pygmy never had a STATE variable 11:34:00 at the beginning eveything is immediate... 11:34:22 the text interpreter was one loop ... while the colon compiler was another loop altogether 11:34:28 really? how? ":" would parse everything by itself up to ] or ;? 11:34:50 that seems pretty 11:35:08 the system stayed in the colon word until the def was done 11:35:29 hm 11:35:41 right now, in most ANS systems, colon simply sets state and exits 11:35:57 I thought it more elegant the pygmy way 11:36:31 heh, until it came to pygmy's bizarre way of using vocabularies 11:36:40 I'm trying to devise a way where there can be as many of those loops one likes, and to leave them to enter another (without nesting) one just has to return in some special way, tell where to enter next 11:36:45 how was it? 11:37:45 there was only two vocabs, if a words was in one vocab, it was immediate, otherwise it was a normal word 11:38:18 what was the search order? :) 11:38:19 immediate words could not be executed interactively unless there was specifically a non-immediate version of it 11:38:42 heh, search for immediate word, then normal word, in colon 11:38:59 while interpreting from keyboard, only normal words were searched 11:39:13 aah, so : also activated the search in the second vocabulary... 11:39:19 yes 11:39:42 --- mode: MrReach set mode: +o edrx 11:39:48 that's not bad - at least it is clear 11:40:13 the ANS way with all those semantics for a word is very hard to understand 11:40:15 it was an odd little beast ... originally based on one of Moore's creations ... ported to x86 DOS 11:40:38 do you know if there is a *nix version of it? 11:40:56 I heard somewhere that someone also ported the same forth to a microcontroller and it's currently controlling a deep-space satellite 11:41:05 I think I have looked at its code and found it fascinationg, but couldn't ever run it 11:41:21 it should run under DOSEMU 11:41:45 especially the newer versions, as they don't do direct screen srites anymore 11:41:57 no, never seen a *nix version 11:42:02 (it metacompiles) 11:42:43 some days ago I was discussing with someone (don't remember his name or channel) who was saying that using Forth for spaceships only did make sense when memory was at premium 11:42:59 he was defending lisp on the ground that it doesn't crash 11:43:09 heh 11:43:46 maybe, but it can sure bork 11:44:01 but it was pretty obvious that the Forth system in satellites and such had tricks for never crashing, but most people (includind me) don't know how 11:44:19 forth progs also tend to have more rigoruous testing 11:44:36 * edrx dicts bork and finds nothing 11:44:53 --- join: Speuler (akhandel@195.30.184.27) joined #forth 11:44:54 also, it's hard to write very complex code in forth ... so simplicity tends to be the banner flag 11:45:03 sure, because it is so easier to get a grasp on the whole system 11:45:06 greetings, Speuler! 11:45:12 hi Speuler 11:45:12 good day to you 11:45:15 hi all 11:45:18 g'day 11:45:43 i won a major struggle with nasm yesterday 11:45:55 glad about 11:46:01 details? 11:46:04 congrats ... did you discover the error in the preprocessor? 11:46:29 --- mode: MrReach set mode: +o Speuler 11:46:39 was bluddy difficult to get headers of a forth interpreter, written with nasm, into seperate space, consecutively 11:46:52 thank you mrrreach 11:47:08 i think i tricked it out 11:47:17 oh? I shouldn't think it would be ... although you'll have to put .section directive in me macros 11:47:27 i did 11:47:41 thought too that it would be easy 11:47:42 what made it difficult? 11:48:02 new sections bombed on me 11:48:17 oh? how so? 11:48:19 and when they didn't i couldn't find the data which was supposed to be there 11:48:45 heh, everything fine, except data not in the binary? 11:48:48 so now i compile headers in the .data section, in a different range than other data 11:49:03 now "words" almost works 11:49:12 almost means, some headers 11:49:55 another struggle i had, with the diskless x workstation, has been resolved too 11:50:02 I've been digging into the guts of WinPE files to learn how to make a Forth linker ... quite versatile, actually 11:50:03 bluddy pxe bootrom 11:50:14 boots now 11:50:17 heh, needed an upgrade? 11:50:22 nope 11:50:32 managed to do with what i had 11:50:49 took a while to find it though 11:50:56 pxelinux was the key 11:51:01 * MrReach nods. 11:51:11 some obscure software switch? 11:51:31 no tool to convert boot images into pxe compatible format 11:51:45 I need to go to the univ to print some articles for the weekend 11:51:54 ok, edrx, be well 11:52:04 see ya, take care you two 11:52:07 yo must live right next door to it 11:52:10 i found some netboot rom in pxeformat, which i could boot to boot itself :) 11:52:16 I sued to ... miss those days 11:52:20 used to 11:52:31 kind of metaboot 11:52:34 always interesting people around to talk to 11:52:47 leaving us already ? 11:52:57 MrReach: not exactly, 20 mins from it... 11:52:59 not me, but edrx is 11:53:24 oh, ok, I used to live 5 mins walk from Sacramento State Univ, in California 11:54:14 Speuler: sounds like a complicated mess ... chicken and egg sort of thing 11:54:39 pxelinux is quite allright 11:54:56 Speuler: yes, I am somewhat interested in nasm things (I used nasm to compile the bytecodes for one of my forth prototypes) but I want to print ~300 pages in articles and spiral-bind them later 11:55:05 so 11:55:08 later 11:55:09 --- part: edrx left #forth 11:55:23 gives the possibility to do pass kernel pars per client w/o the need to change the dhcp config 11:55:47 ah! pretty nifty! 11:56:12 i.e. no restart of dhcpd config necessary, just edit the pxelinux config file 11:56:30 and next time the ws boots, it runs with the new config 11:56:49 I should think that editing DHCP config for machine specifics shouldn't be too difficult 11:57:17 dhcp sends the kernel to boot with? 11:57:37 not difficult, but dhcpd doesn't use a changed config w/o restarting or signalling it 11:57:46 (that's a pretty complex ethernet controller, when you think about it) 11:57:51 with pxelinux, no need for that 11:58:00 no 11:58:15 dhcpd sends the pxelinux boot loader 11:58:22 ah! ok 11:58:31 that one downloads the boot image 11:58:39 it is a bootstrap 11:58:51 so the machine is expected to have a HD? 11:58:55 looks up a list of config files. 11:58:58 no 11:59:04 just bare motherboard 11:59:10 all on board 11:59:15 pxebootloader in ROM? 11:59:18 yes 11:59:53 gosh, lots of parts in computers nowadays ... thinking fondly of C64s @:^> 12:01:06 if the ws get ipaddress 192.168.1.10, it tries to read the config file for ascii respresentation of 192.168.1.10, then 192.168.1, then 192.168, then 192, and finally default 12:01:15 so what was the prob with NASM? 12:01:31 i couldn't find the headers 12:01:50 why didn't nasm create the extra segments? 12:02:06 and it seems to be very difficult to put data into decending addresses 12:02:29 I bet THAT's true 12:02:43 heh, that's not the way assemblers work, generall 12:02:44 y 12:02:46 like, first headers on highest address, next header below etc 12:03:01 about all of them i could org to the desired address 12:03:01 why does it make a difference in your system? 12:03:18 and have a macro do the calculation, and restoring to the previous address 12:03:26 not with nasm 12:03:48 because my headers will grow downwards 12:03:54 why would you be doing that ? 12:03:57 oh? 12:04:16 why? what advantage does that offer? 12:04:26 db n,"lastheader",n,"previousheader" 12:04:44 i can easily run through headers, not requiring a link field 12:04:52 and search last header first 12:05:25 actually, there's a pointer to xt in the header too 12:05:35 but constant size, easy to skip 12:06:02 with that structure i am quite flexible when rearranging headers 12:06:13 or casting them into a different format 12:06:36 heh, that 'n' *IS* a link field 12:06:49 they're just reltive links, rather than absolute ones 12:07:21 ok, so using a doubly linked list? 12:07:30 that's a bit different 12:07:33 no links 12:08:03 just cell+ count 2dup type + would loop through headers 12:08:12 'link' = some field used to find the previous or next occurance 12:08:17 no link 12:08:26 the header count byte is the "link" 12:08:34 * MrReach nods. 12:08:49 when moving headers around, one would need to uzpdate links 12:08:55 or they would have to be relative 12:09:04 a count byte is almost a relative link 12:09:09 so i reuse it 12:09:25 byte behind a header is start of next header 12:09:47 oh, ok 12:10:02 that presumes that they will always be flush up against each other 12:10:03 throwing away any header would just need to move the last headers up 12:10:18 so i can relocate headers easily 12:11:18 as this header representation can be used, but can be cast into different format too, i see it as the storage format 12:11:29 saves me the link fields 12:11:32 actually ... 12:11:41 if you want to do that type of thing ... 12:12:02 it might be interesting to put either/both the header and the code into allocated memory 12:12:09 exactly 12:12:14 that's one of the reasons 12:12:14 so that you can delete and move around w/o effort 12:12:25 code, i'm not sure about 12:12:31 transient code, yes 12:12:33 probably 12:12:40 but code has more problems 12:12:51 as words may refer to code addresses 12:13:02 when moving around code, those references would have to be changed 12:13:10 that's a thing i wouldn't like to do 12:13:10 hard to say ... I'm still expecting someone to write a forth where redefining a word changes all previous occurances of its behavior 12:13:42 not me, either, but so many languages work that way 12:13:43 make an error, and your system stops working ... 12:14:07 : dup nip ; -> crash 12:14:39 not very friendly for beginners 12:17:22 what would be the advantage of such a thing ? 12:17:45 maybe you could flag words as persistent 12:17:57 to keep them from being changed 12:18:33 or are you writing a book about 1001 interesting ways to crash a computer ? 12:18:50 try 0 dup base ! . 12:19:10 or, for that matter 1 dup base ! . 12:19:35 (actually, 1 base ! 2 . would be better) 12:20:07 heh 12:20:24 pulling your teeth .. eeh toes of course 12:20:38 in most cases, people would not be redefining system words 12:20:55 what is a system word exactly ? 12:21:02 or, if they were, it would be to expand already existing functionality 12:21:34 a word that deals with input, interpreting, or output 12:22:03 maybe a vocabulay which redefines previous occurances, and in other vocs only the semantics for future use are changed 12:22:14 that might work 12:22:31 dup is neither input, output, or interpreting 12:22:33 I'm not saying it hsould be done ... only that I expect someone to do it 12:23:03 or are all stack words system words ? 12:23:11 couldn't say 12:23:28 you'd open a pandora's box there 12:23:45 smalltalk, lisp, python, tcl all allow redefining already existing procs 12:24:14 I have found it useful in those languages in the past ... but not sure of its relevance to forth 12:25:14 maybe instant recompilation would do the trick too 12:25:27 what is that? 12:27:32 I'm thinking more along the lines of how to allow the user to read/write binary libraries to disk 12:27:44 (in my theoretical ponderings) 12:28:24 the redefinition of words was just something that popped up as a "this might be interesting someday" 12:34:34 brb 12:34:55 ok 12:41:23 i'll ove to another machine in a moment. 12:41:35 as you please 12:41:39 to the diskless 12:41:54 the server (machine next to it) becomes available in a moment 12:42:03 heh, ok 12:42:05 ( i did a kill -STOP netscape :) 12:42:15 people will be relocated to a better machine :) 12:42:40 see you later 12:42:46 --- quit: Speuler () 12:49:04 --- join: trimesch (trimesch@passionsfrucht.icafe.spacenet.de) joined #forth 12:49:18 hi 12:50:06 --- nick: trimesch -> Speuler 12:53:23 hihi 12:53:28 hi again 12:53:43 I'm thinking more along the lines of how to allow the user to read/write binary libraries to disk 12:53:45 (in my theoretical ponderings) 12:53:45 i'm just sitting behind the diskless machine now 12:54:05 not easy as this is quite os dependent 12:54:14 or one would need a loader program 12:54:27 for mor or less platform independent binaries 12:55:02 of course also a loader for platform specific images may work 12:55:14 Win32 and Linux ELF formats are nearly identical 12:55:32 the prob isn't in getting it loaded 12:55:40 it's in getting the pointers right 12:55:54 i assumed loading means linking too 12:56:00 ah! ok 12:56:18 --- mode: MrReach set mode: +o Speuler 12:56:23 thank you 12:56:40 for example, moving the kernel into a .DLL or a .so is pretty trivial 12:56:40 how does sh3 asm look like ? 12:56:55 but, in doing so, the words become frozen 12:56:59 any cpu which resembles the sh3 ? 12:57:13 the kernel may be "frozen" 12:57:21 hmmm ... it's pretty much like any other asm 12:57:42 because it's risc, though, the operand size is more implicit 12:57:42 as soon the system sits in mem, one is free to rearrange it 12:58:01 i know very little about the sh3 12:58:08 beg parden? say that again? 12:58:34 rearrange a .so file? 12:58:35 hitachi said that they see the sa110 as the cpu they strive to be comparable with 12:58:48 oh, ok 12:58:50 the reference 12:59:15 acknowledging the lead 12:59:25 inofficially of course 12:59:46 no, not a file. if it is loaded into mem, it is not a file anymore 12:59:56 but you can write a new image to file 12:59:57 heh, well I'll say with some confidence that the sh3 is *WAY* easier to write a dis/assembler for than the Pentium 13:00:05 no doubt 13:00:30 it may be easier to program too 13:00:38 the sh3 is a bit funky with the delayed branch and jump calls, but it's workable 13:01:17 I have yet to sit down and translate the various addressing modes into a forth sytax 13:02:01 but they look pretty much addressing modes on other processors, if not a bit more limited 13:02:14 that's what strikes me on the h8 13:02:41 that's there's nothing particularly unusual? 13:02:43 i wouldn't mind if it would have a few more powerful addressing modes 13:02:56 is h8 risc? 13:02:57 it is risc like too 13:03:02 heh 13:03:15 that is the trademark of risc machines, though 13:03:21 focus on registers 13:03:27 no memory operations 13:03:33 * MrReach nods. 13:03:41 except move, and bit ops 13:03:55 setting a single bit in memory is easy 13:03:56 "feel lucky you can write something to memory at all" ... heh 13:04:19 bset #bitnumber, @register 13:04:43 sh3 has the same extention ... most ops require move to register first, but bit ops will work directly w/ memory 13:04:48 it has autoincrement fetch and autodecrement store, though 13:04:57 so does the sh3 13:05:15 with variable increments, depending on operand size 13:05:17 7 general purpose registers ? 13:05:24 +1 as stack pointer ? 13:05:30 also, several base+index modes 13:05:42 erf ... 13:05:46 yes and no 13:05:56 15 + 1 stack 13:06:05 32 bit i suppose 13:06:10 the lower 8 are banked with shadow registers 13:06:17 for supervisor mode 13:06:20 yes 13:06:52 whole bunch of control registers 13:07:31 the sh3 has four, I think 13:07:47 the sh3e adds IEEE floating point support 13:08:07 register halves, lower half divided into 8 bit regs ? 13:08:10 and the sh3-DSP adds all kinds of wierd instructions I don't really understand 13:08:27 no 13:08:37 different then 13:08:43 you have either 8bits, 16bits, or 32bits 13:08:58 not an "upper 16 bits" ... etc 13:09:10 h8 reg is ERn (32bit), En Rn (2x16 bit) RnH RnL (2x8 bit) 13:09:28 however ... the is sign and zero extention from any one to another 13:09:36 organized as En RnH RnL 13:10:02 and logical left and right shifts to work with bytes elsewhere in the word 13:10:53 on H8 depends on whether you use shift on RnL Rn or ERn 13:11:03 but some strange exceptions 13:11:06 such as 13:11:26 add.w #num, reg16 is ok 13:11:34 add.l #num, reg32 is ok too 13:11:56 another thing I found interesting ... 13:12:06 but add.b #num, reg8 doesn't exist 13:12:09 is that integer divisions are done interavely 13:12:30 iterively? 13:12:42 division steps ? 13:12:51 yes 13:13:24 good 13:13:29 quite different than on x86, where you load the divisor and dividend into registers, issue the DIV command and the answer appears magically 13:14:14 but I can see where there is an advantage ... you only need to interate for the precision you need 13:14:24 iterate, even 13:15:42 so what was your question about the sh3?? 13:17:11 IIRC your question was about the assembly, rather than the hardware itself 13:19:59 incidently, I think it's a bit overkill for a forth engine 13:20:22 forth primitives seldom need more than two registers ... so what do do with the rest? 13:21:20 WinCE allocates about 1/2 of them ... not sure about EPOC or PalmOS 13:23:27 hello? 13:40:38 --- quit: Speuler (Remote closed the connection) 14:08:09 --- join: tcn (tcn@bespin.org) joined #forth 14:15:54 --- quit: tcn ("[BX] I'm off like a prom dress...") 14:30:00 --- nick: MrReach -> MrGone 14:39:20 --- join: Speuler (l@passionsfrucht.icafe.spacenet.de) joined #forth 14:39:26 hi again 14:43:22 hi 14:43:26 --- nick: MrGone -> MrReach 14:43:31 what happened to you? 14:43:43 --- mode: MrReach set mode: +o Speuler 14:44:48 somebody needed to demonstrate the netboot 14:45:10 ok ... 14:45:11 and i did some talking since 14:45:17 planning 14:45:21 so what was your question about the sh3?? 14:45:23 next steps 14:45:24 IIRC your question was about the assembly, rather than the hardware itself 14:45:27 incidently, I think it's a bit overkill for a forth engine 14:45:31 forth primitives seldom need more than two registers ... so what do do with the rest? 14:45:36 WinCE allocates about 1/2 of them ... not sure about EPOC or PalmOS 14:45:40 h8 is not ideal for forth engines 14:45:58 but there are worse ones 14:46:03 no jmp indirect 14:46:11 oh well it has, but a limited one 14:46:31 sh3 has jump to register value, for sure 14:46:32 only jump @address:8bit 14:46:42 @@adr:8 14:46:53 so does h8 14:46:57 also, sh3 call puts return value in register, have to manually load it onto stack 14:47:12 return value 14:47:13 ? 14:47:25 generally ... 14:47:27 return address ? 14:47:47 CALL adr sets the PC to adr and puts previous contents of PC on return stack 14:47:49 like the link register on arm 14:47:50 yes 14:48:23 at lest SOME of the CALL instructions on sh3 put return adr in register 14:48:33 might be version to push, but not sure 14:49:09 direct threaded may be more efficient 14:49:12 are you extremely fond of the contional assemblers? 14:49:27 conditional assemblers? 14:49:28 define: "extermely" 14:49:36 extremely 14:50:11 heh, do you get angry/pissy if the IF ... ELSE ... THEN , BEGIN ... UNTIL are not in the assembler? 14:50:21 no not really 14:50:44 i prefer powerful macro capabilities to conditional asm 14:51:00 I ask because my preference is for "label JMP" or "label BNE" 14:51:58 i quite follow you there 14:52:08 .. don't ... 14:52:50 ok, many Forth assemblers use "structured conditionals" ... IF etc that don't use labels as targets 14:53:07 my understanding of conditional assembly is that the decision is done at assembly time 14:53:32 oh, i get you 14:53:49 I prefer labels 14:53:59 you mean, using hi-level control flow constructs which assemble to conditional branches 14:54:08 for the most part, the two systems are mutually exclusive 14:54:13 yes, that is what I mean 14:54:22 you can do that with macros 14:54:29 if they're powerful enough 14:54:36 heh, I'm not asking how to do it 14:54:49 I'm asking if you are fond of that type of source code 14:54:55 i mean, if one / me requires it, one / me can add that myself 14:55:09 no need to be integrated feature 14:55:34 it can help to write cleaner code 14:55:34 the only probs I'm having atm are how to implement forward branches 14:55:47 i.e. a branch to a label that has yet to be defined 14:55:56 instead of just conditionally branching wherever you like 14:56:18 yes, tends to encourage proper structure 14:56:52 if the branch offset is never shorter than an address reference, you can link all forward refs, using the branch address as link field 14:57:11 as soon one resolves, you replace the link against the destination 14:57:26 and remove the branch from the linked list 14:57:26 yes, but ... 14:57:47 problems with 8 bit offsets 14:57:57 suppose I write "