00:00:00 --- log: started forth/01.10.16 00:02:53 --- join: MrReach (mrreach@209.181.43.190) joined #forth 00:36:30 hi - anyone home? 00:36:41 yep 00:36:50 even chatting on IRC 00:36:59 ahh 00:37:08 what's on your mind? 00:37:11 are there many people using forth? 00:37:24 not compared to other languages, really 00:37:37 what do you find particularly appealing about forth? 00:37:39 there ARE quite a few enginers who use it 00:37:48 how close it is to the iron 00:38:02 also, how simple it is 00:38:07 like, running native instead of running under an OS 00:38:09 ? 00:38:18 not neccessarily 00:38:31 suitability for bit-bashing? 00:38:54 when I write a word, even a high level one, I've a good idea of exactly what machine code is going to be executed 00:38:59 yes 00:39:33 i've started writing a set of words for C library interface - do you think this is a fair goal? 00:39:46 yes 00:39:52 which forth? 00:39:56 ficl 00:40:07 win32forth, Aztek, and gforth already have such things 00:40:13 ah, ok 00:40:20 gforth - problems are: 00:40:26 1) needs cygwin 00:40:34 on windows, yes 00:40:35 2) can't be packaged into a single executable 00:40:52 3) painful to add c funcs to 00:41:00 well, that's my early reaction to it 00:41:12 adding C funcs to ficl is a breeze 00:41:47 also, ficl can turn forth source files into c source, for compilation into the system 00:42:13 i need multi-platform capability which win32forth doesn't have 00:42:38 * MrReach nods 00:42:59 can't see aztek on forth.org - got a url for it? 00:43:03 PLEASE use a system where specific procedures are looked for in specific libraries 00:43:11 yeah, just a sec ... 00:44:24 docs ... http://www.ksarul.freeserve.co.uk/azintro.htm 00:44:35 file ... http://www.ksarul.freeserve.co.uk/aztec.zip 00:45:03 thx - but is it windows-only? 00:45:15 what do you think a good timer interface would be? 00:45:26 yes, it is ... written in C 00:45:51 timer interface - as in, set a timer and receive an interrupt? 00:45:57 yes 00:46:08 execute some word at some time in the future 00:46:31 like, at a particular time, or n msecs in future? 00:47:04 which forth are you using? 00:47:16 well, my app needs n msecs in future, but time-of-day alarm would be a natural extension 00:47:30 whoch forth doesn't really matter 00:47:36 gforth and win32forth 00:47:59 how about: 00:48:00 I'm only asking you about the FORTH interface ... not implementation 00:48:24 doat ( word-addr msecs -- ) 00:49:05 actually, I was going to use the TCL convention ... AFTER ( xt-callback u-msecs -- hdl ) 00:49:35 DOAT might be good for the time-of-day callback 00:49:50 i don't know anything about TCL 00:50:22 it has a good, but primitive, timer function 00:50:32 is TCL a language? 00:50:44 yes, a bytecode compiled interpreter 00:51:03 TCL = Tool Control Language 00:51:29 has an *OUTSTANDING* Windows/Windows/MacOS windowing library 00:51:34 do you use object oriented forth? 00:51:37 runs identically on all platforms 00:51:45 yes, sometimes 00:53:03 sorry, typo'd ... 00:53:12 has an *OUTSTANDING* Windows/XWin/MacOS windowing library 00:53:46 is tcl an extensible language like forth? 00:53:54 yes 00:54:07 depends what you mean 00:54:22 rather easy to define new looping constructs 00:54:29 or redefine existing ones 00:54:33 aum: you can change its syntax like Forth, for example 00:54:39 sorry, can't 00:54:47 more difficult to package into single .EXE ... but possible 00:55:15 it's essential for me to be able to package an app into a single exe 00:55:19 erm ... I've seen stuff that DOES change the syntax 00:56:10 but, nonetheless, not a good idea to mess witht he basic syntax 00:56:27 hmmm ... I wonder if that might be considered a flaw in forth 00:56:46 by the way, a few days ago I coded a Forth-like language on top of a Tcl-like language, in a fantastically simple way... anyone who would like to take a look, and maybe discuss it? 00:57:11 i'm new to forth, and know nothing of tcl 00:57:28 heh, sure wish you would write a Tk-like widget system in Forth, instead 00:57:44 what is "TCL-like"? 00:58:15 I don't use much X, I wouldn't be the right person to write a Tk 00:58:19 * aum continues writing C syscall words... next is printf 00:58:26 MrReach: an interpreted glue language 00:58:47 edrx: you use windows? 00:58:54 sure, I'll glance at it 00:59:10 which glue language? 00:59:21 god, I hope not perl or something like that 00:59:26 MrReach: no, never used Windows 00:59:29 MrReach: Lua 00:59:41 oh! you mentioned that the other day 01:00:05 aum: not "putch"? 01:01:31 no - not putch 01:01:44 so here are the two main files... http://angg.twu.net/LUA/miniforth.lua.html is its code (80 lines of code, enough for bootstrapping) and http://angg.twu.net/LUA/yoneda.mflua.html is a demo 01:02:31 when miniforth begins interpreting yoneda.mflua it has only one word at the dictionary, "lua-until" 01:03:29 that runs getword() to parse the next word (a delimiter), then getuntildelim(...) to parse everything until the next occurrence of the delimiter... 01:03:33 so I see in the docs 01:03:51 ah, ok 01:03:54 and it executes everything between the two as Lua code 01:04:30 why did you choose to parse with regexp rather than character scanning? 01:04:36 so in the first block of the demo we define another word in the dictionary, "::lua", and a few auxiliary functions... 01:06:03 MrReach: because I'm not worried with speed now that I'm just bootstrapping things, and I'm always getting worried by becoming lost in programs that don't fit in a computer screen... as regexp libs already exist I decided to use them for basic parsing 01:06:50 when I grow up I'll try to do something better than regexps (I have some pending project about that) but I have other priorities right now 01:08:23 heh, the example is nearly unreadable to me 01:08:32 * MrReach nods. 01:09:03 I was just going to ask that :) 01:09:39 the three lines "::lua" define the words %:, pstack, p 01:10:00 %: discards the rest of the line, so the block of %: lines below is a big comment 01:10:11 ok, was wondering about that 01:10:30 p parses the next word, evaluates it in lua and prints the result 01:10:43 ok 01:10:45 lua allows returning several values, so 01:10:59 p 1,"hello" prints 1 "hello" 01:11:01 had gotten the parse part, but looked like printed the def, then execed it 01:11:47 -> is the lua assigment operator?? 01:11:54 and <-> is for exchange? 01:12:03 sorry, you're right; p 1+2,"hello" prints 1+2,"hello" and then 3 "hello" 01:12:39 how do you expect colon to work? 01:12:44 no, these arrow words are just for constructing a data structure for a sort of a theorem prover that I'm trying to work with... 01:12:55 ah! ok 01:13:11 -> would be "implies"??? 01:13:18 a real colon -- or "semi-real" colon 01:13:40 heh, well, you're gonna have to build a colon look-a-like 01:13:51 has two senses: "implies" and "function taking the things at the left to the things at the right" 01:13:57 there are only 30 prims in eforth 01:14:14 I already have one, but it only lets me code the defs in lua 01:14:20 oh, ok, I think I understand 01:14:44 how fast is lua? 01:14:47 it would be easy (thought not so trivial as "::lua") to add a macro-like colon that executes a string 01:15:15 MrReach: very fast, like 8 or ten times faster than perl or python 01:15:24 you could do it the way most forths do, with STATE 01:15:41 and it is a minimal language made to be extended and changed in all possible ways 01:16:07 aum: you watching? 01:16:21 edrx: how portable? 01:16:24 actually I had another forth-like language that used an interpreted language to build bytecoded programs... 01:16:50 that is what I was thinking you would end up doing with lua, eventually 01:17:03 MrReach: very portable, is written in ansi C and runs on nearly everything 01:17:08 table of high-lev defs, and a table of prims 01:17:18 exactly 01:18:14 but I also wanted something very minimal that I could use to bootstrap the rest, and that would be easy to explain to other people, and, most important of all, that would be fun to use 01:18:58 I am quite pleased with this idea of Lua + parsing using regexps + dictionary that starts with one word 01:19:39 why don't you call it "::prim" instead of "::lua"?? 01:20:14 well, I like the idea ... but regexp's are VERY slow, as you prob already know 01:20:36 even a high level character scanner will be faster (in most languages) 01:21:00 ah, and I was also thinking on writing a preprocessor for Lua that would let me code Lua stuff (and changes to the preprocessor itself) using a forth-like syntax 01:21:52 hmmm ... why don't you code a conventional forth token interpreter? 01:22:36 when I take in consideration how many years I have spent in search of a language that would let me express easily what I think then the total of a days that I had of CPUs running my programs seem almost nothing 01:22:49 of a few days 01:23:04 heh 01:23:04 what do you mean by "conventional"? 01:23:46 the "dictionary" is simply a large array of 16 or 32 bit "words" ... threading into each other 01:24:20 except for primitives, which are coded as negative values, perhaps executed in a large switch statement 01:24:30 my bytecode interpreter isn't very conventional because it is byte-oriented, with one-byte and two-byte-long instrcutions 01:24:44 maybe I'll get at that point someday 01:24:55 why variable length? 01:25:24 but probably making a low-level dictionary will be one of the last steps 01:25:41 because I like to see all the bytecode of a program in the screen at once 01:26:14 I have some psychological problem with black boxes 01:26:43 HAHA! 01:26:57 bytecode always looks meaningless to me 01:27:45 and because I had some ideas about blurring the distinction between code and data in a certain way, and for my first experiences with parsing bytecodes I decided to try variable-lenght instructions 01:27:56 I prefer black boxes 01:28:16 ah! ok, that's a different matter then 01:28:48 when you start dealing with self-modifying code, things often start looking REALLY wierd 01:29:02 it also means you're square in AI territory 01:29:06 well, I remember how it was when I used HS-Forth on DOS, around 1992-1995, and I knew what every byte of the program did... and I liked that very much, and I want to have something like that for *nices 01:29:18 or you're playing with permament mess 01:29:26 heh, that too 01:31:12 why not write in NASM then? 01:31:12 you're ALLOWED to be as weird as you want 01:31:12 I use nasm to generate the bytecodes starting from something that is easier to debug and to explain to others 01:31:12 huh? could you rephrase? 01:31:12 yes 01:31:47 I didn't want to generate the bytecodes for my byte-oriented inner interpreter directly in bytes 01:31:47 please do 01:33:36 ok 01:33:36 and NASM provided advantage how? 01:33:36 for several reasons (including laziness) I decided to generate a nasm file instead 01:33:36 oh! you mean a a "save format"??? 01:33:36 or a debug format? 01:33:36 I didn't have to deal myself with forward and backward references, and I could use nasm features to generate nice listings with the bytes and some text around 01:33:38 what is a "save format"? 01:34:02 a file format that looks somewhat different than the memory image 01:35:07 My idea was that when a forth program were ready it would have (or could have) only what would be strictly necessary for running - no dictionary in most cases, and every unnecessary word would be stripped in a metacompilation step 01:35:33 have you looked at Almy's ForthCMP ??? 01:35:37 btu until then we could add as much extra info as it would be convenient to do 01:35:52 was it for FPC? 01:36:06 for F83, I think ... yes worked with FPC 01:37:13 I didn't like fpc... by the way I carried the HS-Forth way of using the whole screen both to edit and to run (as in the old PC basic) to Emacs 01:37:29 could you tell me more about forthcmp? 01:37:39 yes, it was pretty slick 01:37:56 it used a "library" of forth source 01:38:05 and, given an application ... 01:38:29 would recursively pull words from the library and place them into a temp application build file 01:38:53 such that only the words needed were defined in that file, and in the proper order 01:39:01 great - seems exactly like teh Right Thing, that people never do 01:39:13 then it would compile that file into a .COM file 01:39:46 the .COM file had a few machine code optimisations 01:39:51 and ran incredibly fast 01:41:13 I would like to see the details of those optimizations (like peepholing) some day.., it's a shame that i386 asm is so unbelievlably unorthogonal and ugly... 01:41:24 heh, of course, you had to have a forth word called MAIN 01:43:21 optimisation today is a different animal than it was on the 80386 01:44:21 HS-Forth had something very nice: the dictionry and the forth code (and also the asm code) were all kept in separate segments... if some word was temporary then as soon as you didn;t need it you used to "behead" it, removing it from the dictionary... and that was the first step before removing its code as unreachable... 01:44:47 I thought it was Pygmy that used "behead" 01:44:56 he later changed it to "prune" 01:45:22 by the way, do you know some place (online) that has Forth proverbs? 01:45:35 not really 01:45:52 as in clever sayings? 01:45:56 yes 01:46:05 nope, I don't 01:46:45 I had some DDJ Forth books (compilations of articles) with some chapters on that 01:46:57 well, time for me to go do something productive for a while 01:47:00 but I lent them to a friend 01:47:02 me too 01:47:06 and then sleep 01:47:10 nice talking to you 01:47:21 I was about to say the same, with the same words 01:47:26 heh 01:47:33 cheers then 01:47:35 g'night 01:47:37 --- nick: MrReach -> MrGone 02:15:22 --- quit: edrx ([x]chat) 03:05:42 --- quit: MrGone () 03:10:07 --- join: MrGone (mrreach@209.181.43.190) joined #forth 03:10:16 --- nick: MrGone -> MrReach 03:55:43 --- nick: MrReach -> MrGone 04:08:18 --- quit: aum () 12:37:06 --- quit: MrGone (varley.openprojects.net zelazny.openprojects.net) 12:40:45 --- join: MrGone (mrreach@209.181.43.190) joined #forth 12:40:45 --- join: I440r (mark4@A010-0101.BLMG.splitrock.net) joined #forth 12:40:45 --- mode: farmer.openprojects.net set mode: +oo MrGone I440r 12:52:22 --- nick: MrGone -> MrReach 12:52:26 heya, I440r 12:55:54 I just reregistered this nick 12:59:16 want to chat about an alternate timer interface that I came up with? 13:03:30 --- join: Speuler (schwan@tangerine.icafe.spacenet.de) joined #forth 13:03:36 g'day 13:03:45 hiya, Speuler 13:22:44 --- mode: MrReach set mode: +o Speuler 13:22:50 hi 13:22:59 hello mark&mark 13:23:00 --- mode: I440r set mode: +o clog 13:23:04 :) 13:23:06 heh 13:23:12 hows everything going ???:) 13:23:26 I440r: gimme your teflon # again please 13:23:29 pretty good 13:23:43 (812) 988-9453 or (812) 988-9455 13:24:27 i've put it on a paper napkin, but lost or used it somehow 13:24:40 i've put it on a beer felt now 13:24:51 ft hehe 13:25:02 but your gona have a beer soonare or later he 13:25:15 have put it in my pocket already 13:25:20 :) 13:25:33 as long i don't do that with the beer, everything should be ok 13:25:34 how soon do yo u think they will need me ? 13:25:39 i need a job real fast :) 13:26:00 I'm on a non-forth project now till christmas 13:26:09 this is a job just to keep me warm 13:26:36 presumably, the forth job is going to proceed in january 13:27:05 rite now i do a 8051 to H8 13:27:05 i know - but ill take any asm jobs till the forth one wakes up 13:27:08 port 13:27:15 give me time to get to grips with teh OOP side 13:27:37 ugh. porting the 51 ot a lesser hitachi processor >??? heh 13:27:45 the 51 is my fave processor 13:27:48 contriller 13:27:49 proceedings is porbably straight forth, no oo 13:27:52 contrOller 13:27:54 probably 13:28:03 51 sucks 13:28:12 8051 is the best. nuff sed :) 13:28:21 they want to get rid of it quickly 13:28:38 bad luck then. can't market you with that 13:28:54 keep that secret then :) 13:29:01 im an expert at 8051. 13:29:04 i can. can you ? 13:29:10 im even writing an 8051 simulator 13:29:21 tho i havent touched it in a while 13:29:29 heh, Speuler 13:29:29 ive not touched anything in a few months 13:29:32 they got some 8051 experts but no H8 experts (except me now :) 13:29:56 actually, the have flown in 4 hitachi specialists 13:30:07 japanese ... 13:30:16 ugh 13:30:25 give me 3 hours with the datasheet 13:30:29 the newer uPs are cleaner, more versatile, and have more efficient instruction set 13:30:30 ill be their expert for them :) 13:30:41 if you know 68000, H8 is easy 13:31:21 R0L R0H , together R0 . ( 8 + 8 bit for a 16bit register) 13:31:44 E0, R0, together ER0 for a 32bit register 13:31:52 you got ER0...ER7 13:31:59 ER7 is stack pointer 13:32:06 32 bit sp ? 13:32:10 how much memory 13:32:22 16meg adress range 13:32:25 4 kb ram 13:32:34 address 13:32:52 i mean built in. or is it all external memory 13:33:01 does it distinguish between internal ram and external ? 13:33:03 'bout ROM and EEPROM i'm not sure (i now the previous series, the 30xx 13:33:05 ) 13:33:09 this is the AE4 series 13:33:09 can you use all the internal if you have external ? 13:33:28 is all in same address range of 16 meg 13:33:39 how about flash that can be programmed IN CIRCUIT by running code ON THAT FLASH 13:33:43 self programming flash 13:33:55 there are 8051's that can program their own flash 13:33:55 internal ram and ports are at begin and end of address space 13:33:58 perfect for a forth 13:34:11 h8 as EE write instruction 13:34:16 has ... 13:34:50 Speuler: why don't you give the exact model number (or perhaps a URL to the datasheets) 13:34:52 ??? 13:34:59 hitache AE4 13:35:04 hitachi 13:35:13 no url at hand right now. 13:35:19 try www.hitachi.jp 13:35:31 or www.hitachi.com 13:35:36 ive heared good stuf about the h8 - hitachi are good controllers 13:35:49 only controllers i saw that i DO NOT like are motorola controllers 13:35:51 they suck 13:35:52 or search google for hitachi AE4 datasheet 13:36:20 H8 is the result of motorola and hitachi joint venture. 13:36:30 H8 resembles 68000 a lot 13:36:42 simpler addressing modes 13:36:47 ct yes - but the 68k is a motorola PROCESOR. not controller 13:36:48 fewer registers 13:36:57 their PROCESSORS are my fave 13:37:01 their controllers SUCK 13:37:09 ah 13:37:34 just ask the guy that developed teh 8051 - he worked for them - he left because they have their head up their ass :) 13:37:51 i mean 6502 not 8051 13:38:02 he developed the 6502 on his own 13:38:09 Speuler: what series is that uP? 13:38:46 6502 is mos technoloties 13:38:52 rockwell was 6502 i think 13:39:02 no. they had a version of it 13:39:08 mos technoloties developed it 13:39:18 its the mos 6502 13:39:41 the AE4 is the cpu family replacing the 304x series 13:39:48 almost identical 13:39:50 thanks 13:40:02 AE45 13:40:07 AE4x 13:45:38 I440r: problem: port is a jvm 13:45:53 oo again 13:45:55 blah 13:45:59 no forth 13:46:05 ugly code 13:46:17 (8051) 13:46:34 java virtual machine ? 13:46:45 i got the translator to translate about 99.8% today 13:46:50 yes 13:47:13 i'm on ther project since monday 8 days ago 13:47:43 basically, the 8051 part is, except the remianing 0.2 %, finished 13:48:00 looking at the family overview, those H8s are nice machines 13:48:09 now it is getting it to run on H8, and optimize it 13:48:15 bytes and cycles 13:48:24 quickly 13:48:29 I can't find any reference to the AE4x at all, oh well 13:48:45 by yesterday, if possible 13:48:54 real rush job 13:49:03 that sucks 13:49:14 whole december is testing 13:49:22 that means that the verification phase will prob be scrapped 13:49:30 eep! 13:49:49 not a project to learn a new cpu with 13:49:56 or a new kind of program 13:50:19 that's why the hitachi experts came in 13:50:27 (and me ahem) 13:50:53 Speuler: you have jvm experience?? 13:51:16 previous project was forth implementation of java oo model. 13:51:18 nope 13:51:43 at intervie, i said "experience with virtual machines on H8" 13:51:55 (i didn't say "JAVA vm..." 13:51:57 ) 13:52:07 HAHA! 13:52:13 but i'va done 4 projects on H8 before 13:52:21 on the 304x 13:52:23 close enough to forth virtual machine to count 13:52:29 and two on H8/338 13:52:46 as they were lacking H8 expertise altogether, i was in 13:53:10 "could i work with changing specs" ? 13:53:21 ACK! 13:53:21 (yes, i'm specialist on that :)) 13:53:44 "I cna work with them, but you'll freeze them if you want the device to work" 13:54:12 the balance of experience and skills in my case was just right to get me the job. 13:54:16 what, exactly, is the purpose of the tool? 13:54:26 and the recommendation of the previous project leader 13:54:37 (same building, same floor) 13:55:18 they've been tipped about me by the head of research ... 13:55:28 that probably counted too 13:56:01 MrReach: i'm sorry, i'm not authorized to say 13:56:24 ok 13:56:26 only, that the machine it runs on is tiny 13:57:17 abut 1/130 of a square inch 13:58:22 checkout www.gdm.de , folow the english link 14:00:10 possibly we get a vistor on this channel in a few moments 14:00:33 ok, I'll be sure to harrass them and call them names @:^> 14:00:46 he is remarkable in that respect that he got a forth book from forth inc for free from a bookshop 14:00:59 oh? how? 14:01:05 they couldn't sell the book? 14:01:13 no, he won't come. he goes to the snack bar instead. 14:01:18 exactly 14:01:32 heh, says much about forth 14:02:30 too expensive. 14:02:40 they asked about 100 $ for it 14:02:47 ack! 14:02:52 $100 American? 14:03:05 so the guy who has ordered it initially ran away screaming 14:03:17 250 dutch guilders 14:03:44 that's about 80 hamburgers 14:04:33 good grief 14:04:43 or 200 liters of milk 14:07:39 or about half a car 14:08:00 half a month rent 14:08:15 500 lettuces 14:08:51 a lettuce is 20 cent in the states ? 14:09:32 I have no clue ... I dont do the shopping 14:11:39 2 duron 800 mhz cpus 14:12:03 or 640 megabytes of ram 14:12:16 (brand ram !) 14:12:35 a screamer 14:16:05 i'll have to attend an early meeting tomorrow morning. so i'll be peddling campsitewards now 14:16:20 ok, gotta do some honey-do's myself 14:16:25 be well 14:16:38 I#ll chek out this #hannel again 14:16:47 heh 14:17:00 when i'm back to work hehe 14:17:19 have a debian installation running now here 14:17:39 that's good news 14:18:00 mrreach, please tell I440r about my moonlighting job i got here recently ... 14:18:14 g'd night 14:18:25 ok, but am going to be away from comp for a while 14:18:29 fare well 14:19:18 --- nick: MrReach -> MrGone 14:25:38 --- part: Speuler left #forth 14:25:40 --- join: aum (aum@210-54-227-86.adsl.xtra.co.nz) joined #forth 14:44:35 hi aum 14:44:37 u code forth ? 14:44:41 who aum 14:44:48 whois aum 14:44:54 argh i keep forgetting the / hehe 14:45:03 ive been playhing mud too long :P) 15:37:50 can't talk now - will be back in 2-3 hours 15:37:53 --- quit: aum () 16:41:11 --- quit: I440r (Ping timeout for I440r[A010-0101.BLMG.splitrock.net]) 17:34:30 --- quit: MrGone () 18:28:49 --- join: futhin (thin@h24-66-209-114.cg.shawcable.net) joined #forth 19:26:19 --- join: MrGone (mrreach@209.181.43.190) joined #forth 20:36:47 --- quit: futhin (Ping timeout for futhin[h24-66-209-114.cg.shawcable.net]) 21:21:30 --- join: aum (aum@210-54-227-86.adsl.xtra.co.nz) joined #forth 21:30:00 --- quit: aum () 21:41:30 --- join: edrx (edrx@200.240.18.103) joined #forth 21:43:50 --- quit: edrx ([x]chat) 22:05:18 --- join: aum (aum@210-54-227-86.adsl.xtra.co.nz) joined #forth 22:46:58 --- quit: aum () 22:52:02 --- join: z-e-d (zed@amhi23eiy26i4.bc.hsia.telus.net) joined #forth 23:39:37 --- part: z-e-d left #forth 23:59:59 --- log: ended forth/01.10.16