00:00:00 --- log: started forth/03.12.18 01:07:37 --- join: junk___ (~junk@njd.paradise.net.nz) joined #forth 01:08:13 --- nick: junk___ -> njd 01:14:19 --- join: schihei (~schihei@pD9548CEB.dip.t-dialin.net) joined #forth 01:26:07 --- quit: junk__ (Read error: 110 (Connection timed out)) 01:30:04 --- quit: Serg_Penguin () 01:54:34 anybody awake? 02:16:31 Yes 02:33:42 sup Robert? 02:34:16 I'm...awake. 02:34:18 And away 02:34:57 away? 02:37:30 Away. In bed, reading. 02:38:47 thats what laptops are for. 04:33:21 --- quit: fridge (Remote closed the connection) 06:18:24 --- join: I440r (~mark4@saturn.vcsd.com) joined #forth 06:22:57 --- join: oooo__ (o@virgo.bombsquad.org) joined #forth 06:25:33 --- quit: oooo_ (orwell.freenode.net irc.freenode.net) 06:25:33 --- quit: mur (orwell.freenode.net irc.freenode.net) 06:25:46 --- join: oooo_ (o@virgo.bombsquad.org) joined #forth 06:25:46 --- join: mur (~mur@uiah.fi) joined #forth 06:26:13 --- join: mur_ (~mur@uiah.fi) joined #forth 06:35:37 hi 06:35:43 hmmm 06:35:58 --- quit: oooo_ (Read error: 104 (Connection reset by peer)) 06:40:16 --- quit: mur (Read error: 110 (Connection timed out)) 06:40:27 --- nick: mur_ -> mutr 06:40:30 --- nick: mutr -> mur 07:58:50 brb 07:58:52 --- quit: I440r ("Leaving") 08:06:28 --- join: kc5tja (~kc5tja@66-91-231-74.san.rr.com) joined #forth 08:06:28 --- mode: ChanServ set +o kc5tja 08:12:53 --- join: I440r (~mark4@saturn.vcsd.com) joined #forth 08:27:08 --- quit: clog (^C) 08:27:08 --- log: stopped forth/03.12.18 08:27:23 --- log: started forth/03.12.18 08:27:23 --- join: clog (nef@bespin.org) joined #forth 08:27:23 --- topic: 'A channel dedicated to the Forth programming language, its implementation, its application, and its philosophy.' 08:27:23 --- topic: set by kc5tja on [Fri Dec 12 07:57:32 2003] 08:27:23 --- names: list (clog I440r @kc5tja mur oooo__ Robert hovil tathi schihei njd Herkamire onetom OrngeTide wUoNrFk ianp chandler warp0x00 madgarden skylan @ChanServ TreyB MysticOne) 09:18:52 --- join: MrReach (~mrreach@209.181.43.190) joined #forth 09:18:52 --- mode: ChanServ set +o MrReach 09:18:52 --- quit: Herkamire (Read error: 54 (Connection reset by peer)) 09:19:06 hihi! 09:19:40 hey 09:24:19 hi mrreach! 09:24:22 lol 09:24:25 ltns :) 09:24:32 greets, no so long 09:24:36 you testin yer clients ctcp :)O 09:24:53 how goes it 09:24:58 just wondering if you were even in the building where your client was idle 09:25:05 quite well 09:25:19 im at work trying to fix a stack error :P 09:25:32 stack undreflow and im not seeing it :/ 09:25:44 ill put some dummy values on the stack and see who eats one 09:25:49 I finally bit the bullet and started writing a P4 dis/assembler w/ linker 09:25:55 yea ? 09:26:01 thought you'd like to know 09:26:09 eax #1 mov or "mov eax, #1" 09:26:17 or "either" 09:26:21 reverse polish, of course 09:26:24 lol 09:26:29 1 # EAX MOV 09:26:41 ill be able to fix that and maybe use it :) 09:26:47 withy full credits and permission that is 09:26:54 did i send you my 8051 assembler ? 09:26:54 ' someword >DFA [] EAX MOV 09:27:04 dfa ? 09:27:11 data field address 09:27:19 ' >body ? 09:27:32 i thinbk dfa is more inline wiht nfa cfa etc :) 09:27:40 lots of segments, so have to move around (in the target environment i'm planning to use this for) 09:27:40 pfa ? 09:27:52 exactly why I used that name 09:28:20 can you accept dcc ? 09:28:32 NFA = dictionary, CFA = machine code, DFA = memory loc of CREATEd word 09:28:41 not sure, go ahead and try 09:29:04 offering... 09:29:16 accepted 09:29:34 doesnt seem to be moving :/ 09:29:47 failed ... mrreach@bigfoot.com 09:29:51 ok 09:30:28 I'm writing one directly compilable for both windoze and linux 09:31:00 STC with code-copying and primitive peephole optimising 09:31:36 I'm betting that you'll LOVE working on the optimiser 09:31:46 (if I ever get that far) 09:32:54 sent it - might get it twice 09:33:01 ok, thanks 09:33:22 it would be an interesting experiment - but i wouldnt want it for a production run :)\ 09:33:31 why is that? 09:33:59 you lose SEE - i point you in the direction of swiftforth/swiftx for a classic example 09:34:08 you lose the 1:1 corelation between source and object 09:34:21 thus losing the predictability of the compiler 09:34:22 yep, I remember you making that observation last year 09:34:41 it makes it impossible to do certain things in the code - i.e. it restricts what you can and cant do 09:34:54 hmmm ... like what? 09:35:36 heh, you can always turn the optimiser off, or use a CODE or INLINE definition 09:36:56 correct 09:37:27 but i would disagree with anyone using no optimizations during develop turning them on for production if they said the two ran identcally 09:37:42 oh, quite so 09:37:55 however some day i may make an optimizer for isforth 09:37:57 most software houses use test suites 09:38:01 so my users have that option 09:38:33 heh, if you go to Intel site, they have "VTune" ... 09:38:54 lol, ya 09:38:58 which is supposed to exercise every single control flow branch in C and C++ programs 09:39:25 an impressive bit of software, but can't imagine how it would work effectively 09:40:37 or usefully :P 09:41:11 anyway, today I'm fighting with myself about the assembler syntax 09:41:31 make it as close to intel syntax as you can :P 09:41:35 thats my take on it :) 09:41:45 yep 09:41:56 been reviewing NASM syntax 09:42:19 much cleaner than MASM/TASM 09:42:47 heh, there's a "Dr. Dement" who does sleep studies ... how ironic 09:43:13 lol 09:44:37 you're writing for 8051 now? 09:44:54 on a PC host? 09:45:39 the assembler is mine - im developing an umbilical 8051 compiler for thge Cygnal line of controllers 09:45:41 its almost done 09:45:54 i have a non umbilical version of it already where the target itself does the compiling 09:45:56 cool 09:46:12 what does it use for mass storage? 09:46:13 cygnal is awesome, you can run code out of flash while erasing or programming flash 09:46:21 flash - they all have flash 09:46:26 ok 09:46:32 100 thousand writes typical 09:46:39 20k minimum 100k typical 09:46:53 yep, got a flash card for my PDA 09:46:59 quite amazing 09:47:23 PDA sucks, the flash card is awesome 09:47:31 lol 09:48:34 what p[rocessor in the pda ? 09:48:52 SH3, runing at 10Mhz (I think) 09:49:03 do a forth for it :) 09:49:05 I don't have probs with the mup 09:49:11 been thinking about it 09:49:39 it's getting data into/outof the damn thing that is the problem 09:49:44 if i ever got a pda it would be to do a forth 09:49:57 code on pc - put code on flash 09:50:02 put flas in pda.... 09:50:09 oh, it syncs ok 09:50:24 next I'll get one with a keyboard 09:50:38 (I bought a floding keyboard for this one ... it's so-so) 09:50:58 floding = folding 09:51:06 Hey MrReach :) 09:51:12 greets, Robert 09:52:08 My Forth already produces native code via subroutine threading and peephole optimizing. 09:52:28 And it has a 1:1 source to object code mapping. 09:52:30 kc5tja: I'm interested ... what platform? 09:52:41 There is precisely one object code sequence for one source code sequence. 09:53:00 Linux 09:53:13 does it meta-compile? 09:54:18 kc5 the object for "dup tuck blah" depends on the optimizer 09:54:39 thats a bad example 09:54:40 MrReach: Not yet. FS/Forth itself doesn't exist; only its bootstrapping target compiler. 09:55:02 I440r: Your whole argument is invalid. 09:55:28 I440r: I use Chuck's code production engine, which he himself asserts there is a precise, 1:1 code to object code relationship. 09:55:33 kc5 i dont think it is - any time ive worked with code thats compiled with an optimizing compiler its been way more difficult to debug 09:55:45 almost impossible to decompile for a start 09:55:50 And as far as using more sophisticated optimizations on program code and saying they don't run identically, that's correct; the latter runs better. 09:55:51 use see in swiftx 09:55:53 useless 09:56:00 I have, and I had no problems iwth it. 09:56:14 I don't **WANT** the system to store the source code. 09:56:17 I want it to store the executable. 09:56:22 SOurce code is the job of source files/blocks. 09:56:23 erm try using see on a word that has a ." in it - it disassembles the text 09:56:37 it doesnt heven have the smarts to know where the compiler inserts a dotquote 09:56:39 I440r: No kidding. 09:56:52 isforth doesnt have that problem 09:56:55 It doesn't have to have the smarts. 09:56:59 It's a nonproblem. 09:57:00 see WORKS in isforth 09:57:05 i disagree 09:57:07 See this. 09:57:08 See that. 09:57:09 See what? 09:57:11 who cares? 09:57:14 It's a non-issue. 09:57:18 being unable to see something is very annoying 09:57:25 its a usefull tool except in swiftx 09:57:36 I disagree. 09:57:40 fine 09:57:41 whatever 09:57:47 When I want to know the source fo XYZ, I look at the block that contains XYZ. 09:57:49 It's not an issue. 09:58:14 Criminey, I paid $1000 for my computer when I got it. I want to *use* it. 09:59:12 err say again in english ? 09:59:27 heh 10:00:22 I paid $1000 for a CPU that runs very fast. But without optimization, I can't use that performance. 10:01:15 erm that really does sound like a weak arguement - optimizing CODE does almost NOTHING - optimize your algorithms 10:01:23 write me a compiler to optimize my algorithms 10:01:30 then ill agree with you 10:02:12 while we're making unrealistic demands of people, give me $10,000 while you're at it. 10:02:23 NOW 10:02:39 I440r: Optimizing algorithms are important. 10:02:53 thats the only way your going to get significant gains in your code 10:02:54 But when you've already optimized your algorithms, and there's nothing left to optimize, code is all you have. 10:03:02 I440r: No shit, sherlock. 10:03:13 not the ONLY way 10:03:15 a heavilly optimized bubble sort is going to be out performed by a totally crap shell sort 10:03:15 I didn't invest 15+ years of my life to not figure that out by now. 10:03:20 and shell is but ONE up from bubble 10:03:44 Now you're blowing the argument so far out of reality that you're showing just how horrifyingly ignorant of the situation you really are. 10:04:05 * MrReach laughs 10:04:06 If I were implementing a sort routine, NO SHIT I wouldn't use Bubble. DUHH! 10:04:13 ok well your resorting to personal flames 10:04:27 Because you're insulting my intelligence. 10:04:29 ok you use quick sort and optimize it to hell and back 10:04:36 cry me a river 10:04:44 ill use a radix counting and do 100 milluonh sorts on the same data in the time it takes you to do it once 10:05:02 Umm...yeah. Right. 10:05:07 no - just your opinion 10:05:22 your taking my opinion as a personal insult 10:05:25 thats NOT my fucking problem 10:05:47 I440r: No. You're claiming that I'm so stupid that I'd favor code optimization over algorithm optimization as a first step. And that's patently wrong. Despite claims to the contrary you continue to stick to that argument, over and over and over again. 10:06:04 All just because I favor the use of code optimization. 10:06:05 i personally do NOT want #forth to turn into just another clf where if anyone expresses an opinion they get PERSONALLOY flamed 10:06:22 thats like a c coder taking forth code as a personal insult 10:06:24 duh 10:06:33 * kc5tja notes I440r is way off on yet another tangent. 10:06:46 If you can't stick to the core of the argument, don't argue at all. 10:06:50 your the one using smoke and mirror arguements not i 10:06:58 I440r: no, you're the one missing the point 10:07:11 Smoke and mirror? I invite you to prove me wrong on **ONE** thing I said. 10:07:21 the point is i dislike optimizing compilers and i think a non optimizing compiler is easier to use 10:07:27 Obviously the first step is to choose the right algorithm for the job. 10:07:30 kc5 turned that into a flame war 10:07:44 tathi pick an algorithm to solve a problem 10:07:45 But _after_ you do that, there's still plenty of room for _code_ optimization to speed things up. 10:07:52 thers ALWAYS a better one 10:08:11 and for a sort i would never personally pick quicksort 10:08:15 I440r: Look back in the logs. You argue that optimizing compilers are inappropriate for production code, on the sole basis that it won't let you SEE the code you put in. I claimed it was a non-issue, because you have original source to begin with. 10:08:35 no. i said "i would never use one" not" nobody should" 10:08:44 your the one twisting the4 arguement and redirecting it 10:08:46 not me 10:08:52 mmhmm. 10:09:08 ahh. whatever. 10:09:37 actually, I440r, you said you wouldn't trust it for suddenly turning on before shipping out the door 10:09:52 not 100-% 10:10:22 i wouldnt trust it to work absolutely identical to the unoptimized code 10:10:28 He also hinted at the fact that optimized code didn't run "the same" as non-optimized code. 10:10:34 that'fine 10:10:52 it supposed to, but sometimes doesn't 10:10:56 kc5 has obviously never seen code that works when not optimized but breaks when it is or vice versa 10:10:58 i have 10:11:08 But in fact, optimized code does run "the same" -- if it takes the same inputs (of which I consider the state of all memory an input), and produces the same outputs, then by definition, it must run the same. 10:11:18 but then, you can always develop/test with the optimiser on 10:11:39 I440r: I absolutely have. And that proves the optimizer is broken. But that does **NOT** prove that optimized code is not equivalent to unoptimized code. 10:11:43 and that make development time testing more difficult 10:11:58 because I have **ALSO** seen code that **DOES** run the same between optimized and unoptimized code. 10:12:09 kc5 ALL optimizers will exhibit this behaviour with the right (wrong?) code 10:12:18 I440r: Nope. Not in my experience. 10:12:32 I've put basic and really gnarley code through C optimizers, and they all produce proper code. 10:12:36 kc5 has tested all optimizers he has ever used for every possible condition 10:12:40 ok i stand corrected 10:12:51 I440r: You are twisting the argument. I never said that and you know it. 10:13:16 But here's the deal: you cannot prove that optimized code is bad on the basis that the optimized code runs differently than the unoptimized code. 10:13:21 i stand by my statement. any optimizer will be broken for some given source 10:13:21 -O3 in gcc has produced incorrect code for me. but -O3 is known to be experimental. 10:13:27 you said not in your experience 10:13:32 Just because you had ONE bad instance of ONE buggy optimizer does NOT mean that the whole concept is condemned to hell for eternity. 10:13:56 lol thats not my only objection to optimizers 10:14:02 in fact its the LESSER objection 10:14:22 i trust compiler writeres have advanced since then 10:14:24 So far as I've read, that's **THE** crux, the sole driving point, to your whole argument. 10:14:31 but optimized code is more difficult to debug 10:14:39 noooo 10:14:41 read again 10:14:43 Again, I haven't suffered this liability. 10:14:46 but optimized code is more difficult to debug <-- that is 10:14:52 -O2 on 2.95.3 has never produced bad code for me. and I've gigabytes of code through it. 10:15:00 You trust code by building from first concepts. 10:15:14 nbeway its lunch time 10:15:15 Once you've established the correctness of lower-level code, you work on towards higher level code. 10:15:17 neway 10:15:32 back in half an hour 10:15:36 As long as you stick to that, you can't go wrong. Debugging becomes trivial then. 10:15:52 oh - DO scroll back, you will see i DID say that someday i will MAYBE write an optimizer for isforht 10:15:54 buggy optimizers don't bother me. because they will get noticed if you have a *complete* test plan. which you should. 10:15:57 I've never, ever, ever had -O3 produce bad code for me. 10:15:59 for YOU to use if YOU so chose 10:16:02 (on x86 platform, 2.95 or 3.2) 10:16:28 --- join: Herkamire (~jason@h000094d30ba2.ne.client2.attbi.com) joined #forth 10:16:35 kc5tja: yea. I have. it's pretty rare but -O3 can fail. at taht point I go on bugzilla and submit a bug:) 10:16:44 the price I pay for using open source. 10:16:48 I've never, ever been in a situation where a program ran so poorly I considered using -O3 10:17:14 hovil: I rarely use -O3. I only use -O3 on code that iterates through lots of data, processing as it goes. 10:17:14 hovil: I run -Os a lot. which is everything in -O3 except things that make it bigger. it produces some pretty tight executables. 10:17:29 really if the compiler can optimize you might as wel take advantage of it, it's free 10:17:42 E.g., I'll use -O3 -fomit-frame-pointer -march=athlonxp for my box, when building multimedia applications, for example. 10:17:46 -O0 (no optimization, the default) produces pretty sad code. 10:18:05 * kc5tja is happy to point out that FS/Forth's software runs subtly faster than -O0. :D 10:18:13 Using nothing but subroutine threading. 10:18:22 (and primitive inlining, but no peephole optimization) 10:18:24 I build with -march=i486 (or better) on all applications. It important to have access to instructions like bswap and cmpxchg 10:18:38 kc5tja: how does/will fs/forth spit out executables? 10:18:40 Pentium has bswap and cmpxchg. 10:18:57 hovil: I ripped the idea of generating a statically linked ELF header for I440r's isforth. 10:18:58 kc5tja: i486 has bswap. pentium has cmpxchg 10:19:06 but i ment to type i586 :) 10:19:11 s/ment/meant 10:19:14 geez I can't type 10:19:15 FS/Forth and isForth represent two diametric opposites of philosophies. (As you probably already got) 10:19:52 OrngeTide: Well, Athlon is Pentium compatible. :D But I find there is a noticable performance difference when I compile -i686 and -march=athlon. 10:20:14 kc5tja: yea. i'm not using athlon though. :) 10:20:42 * kc5tja knows. I'm just saying that mere instruction ordering and register allocation techniques can make or break an application's real-time performance requirements. 10:20:58 sure. well there is -mtune as well. 10:21:11 ? I wasn't aware of that. I'll have to read up on that. 10:21:23 I *would* like to figure out how to use its profiling support though. I tried several times in the past, and failed every time. 10:21:33 It'd compile, it'd run, but it wouldn't generate any useful reports. 10:21:34 -march=i386 -mtune=athlon is good for making linux distros. then they still run on some old 386. 10:21:45 * kc5tja nods 10:22:34 optimizers are complex and full of blackmagic. i really wouldn't like to write one. :P 10:23:05 I would. 10:23:18 i'd rather do some real work. 10:23:19 me too 10:23:20 Because I feel that optimizations are, contrary to what Intel and AMD both think, *NOT* black magic. 10:23:38 peephole optimizers aren't blackmagic. 10:23:43 I patently and firmly and vehemently disagree with the whole concept of documentation too large and too complex for public consumption. 10:24:14 * kc5tja has intentions to explore global optimization of Forth code, similar to what RAFTS has done, but employing dataflow analysis and maybe even a bit of type inferencing to help out. 10:24:30 now more optimizing forths would be nice. 10:24:55 sometimes i feel like forth is stuck in the 80s. 10:24:56 bigForth uses RAFTS as its optimization engine, and it routinely falls in the same ballpark as gcc -O3. I'd say that's a nice treat!! 10:25:18 I just don't like bigForth because it's ... big. :) 10:25:19 tell me about the optimiser, OrngeTide, been thinking about it for a week 10:25:45 MrReach: it's kc's optimizer. 10:26:03 My optimizer works by agglutination. 10:26:22 When the compiler sees 56, it compiles the code for DUP, then loads EAX with 56. 10:26:44 OrngeTide: that was in regard to your "I'd rather do real work" statement 10:26:45 When it sees +, it realizes, "Hey, I just pushed a literal on the stack," so it ALLOTs by a negative amount, and re-compiles "ADD EAX,56". 10:27:05 When it sees @, it realizes, "Oops! I know I just emitted an ADD instruction," so it recompiles "MOV EAX,[EAX+56]" 10:27:06 etc. 10:27:21 me nods 10:27:30 The end result is that it collapses large series of instructions into a single CPU instruction. 10:27:46 that's close to what I'm planning, but I'm not gonna be as high-level 10:28:01 MrReach: well I don't believe writing compilers, optimizers, etc. is for me. I'd rather write something that directly affects real people. rather than something that could only be appreciated by other programmers. 10:28:17 This technique is of course self-limiting. There are ways to generate code that the optimizer can't agglutinate. 5 + dup drop @ will defeat the optimizer easily. 10:28:32 But probabalistically, it'll produce very nice code. 10:28:53 colon starts compiling JSRs, if the target word is small enough, it copies its code into the current def (unless the 'no-inline' bit for that word is set in the dictionary) 10:28:56 I know that the code my target Forth produces is easily already at half the speed of gcc's *best possible* output by employing this technique. 10:29:23 semicolon finishes up the def, then calls the optimiser on it 10:29:57 My RAFTS-inspired optimizer will work by building a complete dataflow graph of the software in memory first. 10:30:22 It won't actually compile anything to code until a word is actually needed, whereby a global analysis is performed to optimize everything as much as it possibly can. 10:30:24 kc5tja: yea. i've been thinking about optimizing pushing literals (especially CONSTANTs). if you keep the top stack element in a register (which isn't hard). you should be able to notice a PUSH and a POP nearby one another and remove them, leaving the code to set the top stack register. *shrug* 10:30:29 the optimiser steps one instruction at a time, running a series of rules, like "if-looking-at ... then do ..." 10:31:23 OrngeTide: simply removing a PUSH/POP will cause errors 10:31:24 OrngeTide: Yep. It's a very simple optimization trick. It's still not the best possible code, but it does make a huge impact on performance. I know my code is at least three times faster than gforth's best possible configuration in most cases, and much, much faster in other cases. 10:31:33 ooops 10:31:35 Exact numbers will be forthcoming as the compiler is completed though. 10:31:45 well good forth code has a lot of factoring. so i'm not so sure optimizing at the scope of : to ; would yield very good results 10:31:47 OrngeTide: simply removing a POP/PUSH will cause errors 10:31:56 MrReach: no. it won't cause errors. 10:32:03 OrngeTide: Precisely why my RAFTS-inspired optimizer will do global optimizations. 10:32:23 yes, it needs to change to MOV EAX, [EBX] 0 10:32:27 yes, it needs to change to MOV EAX, [EBP] 0 10:32:49 so that the TOS register is changed 10:33:03 It'll examine data flow from everything. Words that are used relatively infrequently AND which are obscured by later definitions, will almost certainly be inlined. :) 10:33:10 5 6 + .. that will look like PUSH T ; MOV T, 5 ; PUSH T ; MOV T, 6; POP X ; ... 10:33:21 (and in the case where your definitions are short, one-line definitions, that's usually the case) 10:33:21 that was a pretty serious error in Tom Almy's TCOM for a long time 10:33:25 the PUSH T ; MOV T, x ; POP .. is the key. 10:34:22 I'd read the RAFTS papers ... very impressive 10:34:35 Yep. 10:34:35 more than i want to get into right now 10:34:39 * kc5tja nods 10:34:40 Ditto here. 10:35:03 brb (food) 10:35:25 * kc5tja also wants to explore an even deeper machineForth implementation for x86 Linux, where all data stack elements are kept in registers (since 6 are available, this imples a 6-deep data stack). 10:35:35 Just for fun and research more than anything else. 10:35:42 And who knows? It might yield some interesting surprises. 10:36:17 Words like SWAP and OVER become compiler state changes at this point, as no real register manipulations need occur in emitted object code. 10:36:27 How would that be implemented? 10:36:27 Without having to move tons of registers every time. 10:36:27 Should prove useful for words that operate on vectors. 10:36:46 You only canonicalize the registers on basic-block boundaries. 10:37:07 A basic block is defined as the longest contiguous series of instructions that (a) is not the target of a branch, and (b) does not itself branch. 10:37:16 6 available? 10:37:24 EAX, ECX, EDX, EBX, ESI and EDI. 10:37:34 ah! 10:37:36 EBP would be data stack, and ESP the return stack, so those are "in use" at all times. 10:38:01 Well, in my Forth, I use ESI as the data stack pointer, so I would instead use EAX, ECX, EDX, EBX, EBP, and EDI. :D 10:38:08 But you get the idea. 10:38:09 Robert: http://dec.bournemouth.ac.uk/staff/pknaggs/thesis/chap-5.ps 10:38:26 tathi: What is that? 10:38:34 Robert: the 4 top stack items are kept in registers ... 10:38:39 but ... 10:38:54 each item is not assigned a specific register 10:38:55 you could probably do most of it by simply tracking which register is the "top" statically, at compile time. 10:38:58 thing about keeping stack items in registers 10:39:04 Oh. 10:39:11 when a register expires, it is filled with new stack item 10:39:12 OrngeTide: Precisely. 10:39:13 there would be cases that wouldn't work. and then things get complex. 10:39:23 Though, it's better to let each register have its own stack binding. 10:39:36 but for nearly all your "normal" stuff it'd work out quite nicely. 10:39:53 OrngeTide: and when calling a subroutine, when the registers need to be dumped to stack o(or somewhere) 10:40:02 * kc5tja notes that this kind of optimization is the core of most Forth native code optimizers anyway, so it's useful research for me no matter how you look at it. :) 10:40:26 but you'd want to do some pretty heavy inlining. since there could be up to 6 possible permutations of the compiled version of every word. 10:40:41 peephole can use registers pretty effiently 10:40:50 my forth sucks, it doesn't do any of this. :P 10:41:06 OrngeTide: Even so, looping within the word still requires canonicalization fo registers. 10:41:16 --- quit: Herkamire (Read error: 104 (Connection reset by peer)) 10:41:26 but it has problems in scheduling the multi-execution pipelines 10:41:46 MrReach: All Forths except thsoe that use dataflow graphs to optimize have this problem. 10:41:54 s/thsoe/those/ 10:41:54 kc5tja: yea. you usually don't enter a loop with more than a couple items on your stack. so saving them wouldn't hurt you that much. 10:41:57 Hmm.. seems like a neat idea. But not as good as getting a real machineforth CPU. :) 10:42:16 Robert: Well, of course. That's a given. But we can only work with the tools we're given. 10:42:25 Unlike Chuck, we don't have $100K to fab a new chip whenever we wnat. 10:42:26 want 10:42:29 and pieces within the loop that have 0 difference between stack-in and stack-out could use the register trick. 10:42:31 Damn, I can't type today either. 10:42:32 kc5tja: Exactly :) 10:42:36 kc5tja: Heh 10:42:53 just buy an F21 :) 10:43:17 OrngeTide: No. Not only are they no longer in production, Jeff Fox is charging an immense amount for an F21 to help recover costs. 10:43:20 is anyone selling F21s? I know MuP21 is available.. but i wouldn't want that 10:43:25 Last price he quoted me for one was something like $250. 10:43:31 yow 10:43:33 yeah, with the 2000MIPS video card, and the 5.1 surround sound, etc 10:43:56 Is the MuP21 still in actual production? 10:44:00 I don't think that is either. 10:44:21 for $250 i could get a xess.com board and put a stack computer in an FPGA. the board has PS/2 keyboard and VGA jacks too so it could actually be fun:) 10:44:25 according to MPE, they just brough back the RTX2000+ this last month 10:44:46 you can still order MuP21 afaik. but it's not being produced anymore. 10:44:54 Yeah, I've always wanted to build a stack CPU in an FPGA. 10:45:01 * kc5tja is pretty sure he could get some good performance out of it. 10:45:08 my friend got one a couple years ago. it took him forever for it to work. there are a lot of undocumented fixes you need to do to it. 10:45:14 hell with that ... I'm writing for PC hardware 10:45:29 I'll write for Macintosh if someone wants to give me one 10:45:29 PC hardware sucks. 10:45:45 Mac hardware is the same as PC hardware now-a-days. 10:45:46 write it for a gameboy advance. arm7tdmi :) 10:45:57 * kc5tja notes that PowerPC motherboards are 90% ATX motherboards. :( 10:46:06 gah. Another bug in the GNU assembler... 10:46:26 What I'd like is a truely up to date version of the Linux system call API. 10:46:33 tathi: oh i had to wrestle with tons of bugs in gas at my last job. they wouldn't let me upgrade binutils to a less buggy version either. 10:46:36 but i was doing weird stuff. 10:46:37 I have one that's dated for 2.2 kernels, and frankly, it's all I really need. But still.... 10:46:39 --- join: Herkamire (~jason@h000094d30ba2.ne.client2.attbi.com) joined #forth 10:46:42 tathi: Heh. I found a new one in NASM the other day... 10:47:06 have you folks played with YASM yet? 10:47:07 OrngeTide: I've only found stuff in the macro processor 10:47:23 OrngeTide: working on PPC, and code generation seems fine. 10:47:30 The thing with gas is that it's designed to support gcc exclusively; as long as gcc interoperates with it in a bug-free way, gas is "bug-free." 10:47:38 yup yup 10:47:59 though actually, every time I've found a bug, I've just upgraded and it has been gone. 10:48:04 We'll see if that's true this time. 10:48:08 Nice. :) 10:48:13 I had macros that would expand to XML in a special section of my executable. that way when a developer used my macro I could create a unique id for his line of code and allow him to write 16-byte long log messages that would get pasted back together into full blown strings :) 10:48:15 heh, that's not a good way to live 10:48:19 leads to ulcers 10:48:23 tathi: ah. 10:48:59 tathi: one of my problems was the x86 version of gas (an old version) uses / as a line comment character. but + * - % work like mathematical characters. 10:49:14 * MrReach laughs 10:49:14 it's really hard to do division in a macro with / 10:49:25 oh dear 10:49:29 s/with/without 10:49:57 heh, I wonder what idiot made that descision 10:49:59 so i wrote a recursive macro that did long division... 10:50:06 :) 10:50:08 they fixed it in a recent version. 10:50:56 mine uses # as a line comment character, not ; 10:51:12 anybody have a preference for syntax in forth assemblers? 10:51:15 but the parser still seems to do weird things with semicolons 10:51:17 i prefer using // or /* */ 10:51:27 yeah 10:51:34 MrReach: I like forth assemblers that use postfix syntax :) 10:51:46 * tathi seconds that. 10:51:51 well, that's a descision that's already been made 10:52:01 ,ax ,bx ,add 10:52:03 :) 10:52:03 the one i'm writing will be postfix 10:52:14 0 # EAX MOV 10:52:50 i think pygmy forth allowed you to do asm without actually taking thigns out of forth mode. :) 10:53:04 123 [] [EBP] [EDX] *4 EAX MOV 10:53:21 most of them use the forth parser 10:53:28 which was handy cuz you could just do 16 ,int .. and call an interrupt 10:53:30 I've used Pygmy extensively 10:53:47 oh , was my friend's forth. 10:53:59 it's been a few years since i used pygmy 10:55:15 i'm wondering how to handle segmentation conveniently 10:55:22 i'm trying to decide what part i should write first in my forth. i suppose it would be the dictionary. 10:55:24 sections, rather 10:55:39 sections? 10:55:57 OrngeTide: my rule is "Get it to print strings, then things get MUCH easier" 10:56:10 OrngeTide: in the executable file 10:56:16 oh. ELF sections? 10:56:27 yep 10:56:36 my forth is a bootstrap. i decided it was less complicated that way. 10:56:46 ELF and PE32 10:56:49 cool 10:57:04 hrm.. print strings. i was thinking of getting it to parse numbers first. ehheh. :) 10:57:10 they are almost identical anyway 10:57:10 ill try your way though. 10:57:30 objcopy can convert them between one another pretty easily:) 10:58:30 heh. If I fix my macro so it actually *works*, the bug isn't a problem anymore. 10:58:56 "hacking around broken tools" 11:00:16 --- join: bwb (~nate@ip68-4-123-127.oc.oc.cox.net) joined #forth 11:00:35 no, I was using the address of a local label, but then forgot to put the actual label in. 11:00:54 just stupid on my part. 11:01:00 * kc5tja loves postfix assemblers too. 11:01:03 heh, didn't it barf properly? 11:01:12 hey 11:01:14 some people really hate postfix assemblers. 11:01:17 OrngeTide: However, Pygmy did NOT allow inline assembler. 11:01:24 Postfix assemblers are the bomb. :) 11:01:30 kc5tja: yea. it was my friends forth i was thinking of. 11:01:36 For starters, it gets proper register ordering right on Intel CPUs :) 11:01:38 it did when I wrote a module to do that 11:01:40 he never finished it. but the inline part worked. and that was about it. hehe 11:01:49 However, FS/Forth *will* permit inline assembly. In fact, the compiler *depends* on it. :D 11:01:59 oh. that's cool 11:01:59 + is a macro in FS/Forth that emits code via inline object code generation. 11:02:37 kc5tja: not too different from colorforth? 11:02:40 I wrote an INLINE ... ENDINLINE setup for pygmy 11:02:58 bwb: Almost a complete ripoff from ColorForth. I also am using CF's optimization rules too. 11:03:10 :) 11:03:17 Only I'm going to do more optimizations (e.g., 56 + @ will properly generate MOV EAX,[EAX+56]). 11:03:27 Maybe not right away, but it will do them. 11:03:36 ah 11:04:21 I just realized that I won't be able to structure the optimiser like I thought I could 11:04:25 bloody hell 11:04:35 --- quit: Herkamire (Read error: 104 (Connection reset by peer)) 11:05:39 I _was_ going to use a LOOKING-AT ... REPLACE-WITH process 11:06:07 but I just realized there's data that needs to be cut out of the old sequence and pasted into the new one 11:08:48 in the assembler ... how should immediate data be distinguished from displacements?? 11:09:17 so far, that's the only part of the syntax I'm not satisfied with 11:09:38 it shouldnt - other than context 11:09:43 it IS an immediate really 11:09:58 what's that? can you rephrase? 11:10:40 a displacement is an immediate valuea 11:10:45 perhaps give and example ... load 10 into EAX ... load contents of address 10 into EAX 11:11:09 mov # 10 [eax], whatver 11:11:10 heh, i *AM* aware of that 11:11:12 MrReach: How are you going to shorten code too with just a replace? 11:11:24 could be the same as mov [eax+10], whatever 11:11:44 neither of those are a forth syntax 11:11:54 so translate 11:12:04 i dont code forth syntax asm if i can avoid it :P 11:12:57 bwb: replace the bytes for, say, push eax, move eax, 10, pop ebx, add eax, ebx ... into add eax #10 11:14:05 right now, I'm thinking along the lines of ... 11:14:30 10 # EAX MOV \ move the number 10 into EAX 11:14:46 10 [] EAX MOV \ move the contents of address 10 into EAX 11:15:43 then, displacement+base+index*scale can simply be appended into the instruction 11:16:09 MrReach: Right, but don't you have to shift rest of the code or do you just pad with a bunch of nop's? 11:16:12 oh, wb, I440r 11:16:38 no, the rest get shifted, and any jumps get adjusted 11:16:47 ah, that seems like a pain 11:17:09 it certainly is, but makes big diff in execution speed 11:17:16 yeah 11:18:04 50-60 rules applied repetitively can shorten code to 1/3 the size and 10x the speed 11:19:00 oh, also, I can align branch targets to 32 byte cache boundries 11:19:21 that can also make a substiantial diff on machines that pipeline 11:19:31 --- join: slava (~slava@CPE0080ad77a020-CM.cpe.net.cable.rogers.com) joined #forth 11:19:36 is anyone familiar with "shuffle notation"? 11:19:37 (which mine doesn't, it's a k6-2) 11:19:59 heh, can't say as I am 11:20:07 in my extremely perverted forth-like langauge, 2dup is defined as: 11:20:07 ~<< 2dup a b ~~~ a b a b >>~ 11:20:24 ~<< and >>~ are sort of like : and ;, but their content is not normal code but a stack diagram 11:20:53 ah! notation can be operators? hmmm 11:21:31 sounds pretty close to true turing 11:22:51 anyway ... gonna go take a nap 11:23:22 --- nick: MrReach -> MrAway 11:48:23 --- quit: schihei (Client Quit) 12:03:31 --- part: bwb left #forth 12:10:20 I440r: Depends on CPU architecture. You can have both an immediate value and a displacement on the 68000. :) move.l #$DEADBEEF,$ABCD(A5,D2.L) 12:10:39 true 12:10:59 you can have the same in x86 cant you 12:11:00 ? 12:11:01 68020's addressing modes frighten me. 12:11:04 Nope. 12:11:08 move [eax+$1234], # 5 12:11:16 Hmm...that's news to me. 12:11:35 move memory immediate is one that alot of people overlook 12:11:38 so is push immediate 12:11:40 push #5 12:11:45 yeah, I knew about push immediate. 12:11:53 There are a few opcodes that the 68K has that x86 doesn't. 12:11:57 err, addressing modes. 12:12:07 Not including the post-increment, pre-decrement. 12:12:23 * kc5tja whacks Intel in the nads for becoming the processor of choice. 12:12:28 move $1234, $2345 12:12:37 move.l even 12:12:38 Yeah, that's one of them. :) 12:12:48 thats the one i miss most 12:12:54 Memory-to-memory in general is what's lacking. 12:12:55 you can simulate it 12:13:06 but it takes multiple instrucitons lol 12:13:10 * kc5tja nods 12:13:16 you can PUSH an address 12:13:18 Does push have a push memory form? I forget. 12:13:21 thats a mem to mem move 12:13:25 yes 12:13:33 push dword [xyzzy] 12:13:36 nice. 12:13:42 Now does POP also support that mode? :) 12:13:46 push contents of memopry address 12:13:47 yes 12:13:49 pop [xyzzy] 12:13:50 Good. 12:13:59 erm you HAVE to specify size 12:14:03 push word/dword 12:14:03 * kc5tja nods 12:14:09 No bytes though, eh? 12:14:12 cant push/pop a byte tho 12:14:20 Makes sense. 12:14:27 (given Intel's stack mechanisms0 12:14:28 ) 12:14:29 even 12:14:54 * kc5tja probably found a killer-app for FS/Forth -- food service point of sale terminals. :) 12:15:02 :) 12:15:09 * kc5tja was just reflecting on how utterly HORRIBLE In-N-Out's terminals are. :( 12:15:26 someone once said isforth is a nasm killer app but it doesnt make ppl wanna rush out and get nasm so i disagree lol 12:15:28 they probably run SCO :-) 12:15:38 I'm used to them now, so I can navigate fairly easily. But man, it sucks when a customer wants to change one thing that you put in a while ago, and you have to redo the whole order because of it. 12:15:41 No. 12:15:50 They run Windows NT 4.0 build 1381. 12:15:59 nasm is its own killer app. 12:16:07 it's head-and-shoulders above the rest 12:16:10 nasm? Or fasm? 12:16:12 it always scares me when they talk about build numbers in the thousands 12:16:13 lol 12:16:14 nasm is written in C. :) 12:16:23 I've seen a few apps using nasm now 12:16:34 I440r: Frankly, it should be in the tens of thousands. If that. A compile is a build. 12:17:10 kc5tja: but nasm is really really pleasant to use 12:17:13 as far as x86 goes 12:17:32 * kc5tja remembers how when *one* terminal hangs, ALL terminals hang, so you have to sit and reboot every one until you find the one that is truely the problem. 12:17:50 * kc5tja knows -- I have used nasm before. fasm looks nice, but I already know nasm, and don't have a need to switch. 12:18:02 Are they finally at 1.0 yet? Or still 0.98? 12:18:10 nasm is almost as good as a386 12:18:15 almost 12:18:23 0.93 12:18:24 erm 12:18:25 98] 12:18:31 nasm also needs better documentation I think. 12:18:42 Even quick-reference cards would be nice. 12:19:32 in shiney laminated plastic !!!! 12:21:21 Heh 12:25:16 Well, I'm going to get some food. Then I need to finish registering for classes at the college, and then I'll be back. 12:25:23 * kc5tja is away: schtuff for school. 12:30:52 do parsing words make code harder to read? 12:31:55 understand i mean 12:38:54 what is a rural centre outside of california? 12:43:36 --- quit: tathi ("leaving") 13:02:57 --- quit: hovil ("Leaving") 13:04:22 Hmm.. 13:04:29 What might the word ? do in enth/flux? 13:07:58 Robert: Perhaps AND the top of stack with a value, so as to set the CPU flags for use by IF and related words. 13:08:05 (if it's implemented similarly to ColorForth's ?) 13:08:12 (if not, then ? is a synonym for @ . ) 13:09:11 : ready c/r -1 ? drop ; 13:09:13 That's the word 13:09:20 And c/r returns a bit mask... 13:09:40 OK, it ANDs the top of stack with -1 (but discards the integer results) so as to set the Z and S flags in the CPU's flags register. 13:10:08 Thanks :) 13:10:14 n/p 13:10:29 Didn't know it optimized things that way.. 13:19:57 -1 ? is equivalent to TEST EAX,0FFFFFFFFh 13:23:05 slava: That depends on the context. 13:23:16 (sorry; I didn't see your post until just now. :)) 13:25:33 kc5tja, in general do you believe postfix is any harder than prefix or infix notation? 13:25:47 personally i like infix less and less, especially when its used for non-math stuff 13:28:16 I abhore infix for a lot of things. 13:28:23 I'm used to it for math, obviously, but even there, I prefer postfix. 13:28:54 I do like prefix for some things though, especially having recently learned Scheme and such. But prefix and postfix each are so similar that I elect not to think about it much. 13:29:27 I feel that parsing words are important to Forth. It's an enabler (e.g., : `enables' one to make definitions easily). 13:29:34 However, it can be easily abused, like any tool. 13:32:14 --- join: zardon (~zardon@d216-232-233-5.bchsia.telus.net) joined #forth 13:45:00 --- join: fridge (~fridge@dsl-203-33-164-75.NSW.netspace.net.au) joined #forth 13:45:26 abused methods is what makes code bad, NOT the method - i.e. goto 13:45:31 goto is not evil 13:46:42 yeah 13:46:53 in C you need goto as a form of 'unwind-protect' 13:47:08 or gforth's direct threading is implemented using goto 13:47:29 i remember writing code in primary school in qbasic... line numbers... *shudder* 13:47:37 now *that* is bad use of goto 13:49:59 only because you had nothing else 13:51:06 * wUoNrFk returns, possibly without gosub! 13:51:29 goto has it's place. 13:51:45 hell, most of 'basic' assembly can be considered nothing but 'goto's (jmp jmp jmp jmp!) 13:51:57 when used in a manner that doesnt obfuscate or where IT is the best choice 13:54:48 obfuscation ? using setjmp() and longjmp() in C as a way of doing exception handling :) 13:55:46 lol 13:57:27 doesn't C have continuations now, with getcontext()/setcontext()? at least on solaris and glibc... 13:57:50 something about that just seems wrong... 13:58:05 its just like people trying to simulate lambdas using templates and what not in C 13:58:07 C++ 13:58:28 see now your talking a forign language :/ 14:00:30 slava: Lambdas are just unnamed functions. 14:00:44 Continuations are just copies of the return stack. 14:00:52 These things aren't hard to implement. 14:01:08 Whether they add anything useful to the language which has evolved for decades without them is the real question, though. 14:02:31 Especially without support for closures. 14:03:00 r> dup 2>r <-- that something isforth has to do when it forks! 14:03:23 setjmp()/longjmp() sound like they're the same thing as the newer fangled *context() functions. 14:03:23 lambdas are headerless words ? 14:03:26 duplicate the current return address? 14:03:40 I440r, yes 14:03:42 yes. because FORK has to return to the forking word TWICE 14:04:27 in fact i think fork cant be implemented the same way other syscalls are implemented in isforth 14:04:53 shouldn't the forked process get an entirely new, copied, stack? 14:05:12 nope 14:05:16 copy on WRITE 14:05:19 not read 14:05:33 and a pop doesnt write to the stack 14:05:44 oooh i know how to solve this 14:06:19 make all syscalls do a write to the return stack lol 14:06:24 a NOP write to the return stack 14:07:30 slow everyone down just for this one special case 14:07:32 hrm 14:07:34 no thanx 14:07:36 I440r, how does isforth differ from gforth? 14:08:06 gforth is either coded in c or uses a c wrapper 14:08:11 i dunno which 14:08:27 isforhth is also not crippled by being ANS compliant 14:08:36 isforth doesnt use any external libvs 14:08:39 libs 14:10:54 I440r: Not strictly speaking, because Forth does not depend on Lambda calculus to achieve operation, like C and Lisp/Scheme do. 14:11:22 Forth is a concatenative language, and as such, depends on combinators to achieve its operation. 14:11:34 More details are available on the Concatenative mailing list, hosted by my good friend, Billy Tanksley. 14:12:35 k 14:13:00 I440r: Fork needs only return once; each thread will see the same return address, and will return accordingly. Only the return value of the function changes between the two. 14:13:36 kc5 the fork syscall returns twice 14:13:44 the word calling fork will therefore return twice 14:13:47 gforth implements a virtual machine in C. The actual Forth environment is a traditional, direct-threaded Forth. 14:14:12 It returns precisely once per thread -- e.g., in each thread, it returns once. 14:14:18 It does not return twice in one thread. 14:14:25 isforth implements the virtual machine in forth/assembler 14:14:33 i knnow 14:14:55 Then I don't know why you need to replicate the return address. 14:14:55 but it does return twice and the first thread to return is going to pop the return address off the return stack 14:14:56 or.... 14:15:00 Each thread sees its own, unique copy of the stack. 14:15:03 will the second thread have its own ebp ? 14:15:05 (even if it is COW) 14:15:12 It *must*. 14:15:15 kc5 no - its not copied until write 14:15:16 ohh 14:15:22 but that doesnt matter 14:15:23 ! 14:15:24 your right 14:15:35 takes me a min or to to grasp some things lol 14:15:44 :) 14:16:18 What I fear most is not the kernel interface, but getting the ELF executable to link against libdl.so, as that requires not a statically linked app, but a dynamically linked file. 14:16:44 the hard part will be to forthify all the calls to a given lib 14:16:56 I'll deal with that on a case by case basis. 14:17:27 compile time will need to map a library and extract all the names and compile them as offsets/values somehow 14:17:51 I'm only going to do that for libdl ONLY; all other libraries will be accessed via libdl. 14:17:58 so you can use blah blah libname.function run-lib-function or something 14:18:02 It's slower to go that route, but it's easier to implement. 14:18:59 this isnt a high priority for isforht 14:19:01 Since my dictionary provides a (name,address) binding only (no other fields exist per dictionary entry), I'm intending on mapping the library function's entry point directly to the word. However, beware: the return stack (yes, the return stack!) must be established properly before invoking such functions. 14:19:06 its on the mental todo list 14:19:53 : malloc >r libc-malloc dup r> drop ; <-- example stub word 14:20:25 >r puts the value to pass to malloc on the x86 stack, libc-malloc directly invokes it, dup copies EAX return value onto the data stack, and r> drop cleans up the return stack. 14:20:31 It's ugly, but it works, and that's all I care about. 14:20:45 (and if you look at the generated assembly language for it, it's *almost* what a C compiler produces anyway, so . . .) 14:20:54 why doesn't libc-malloc return on the return stack? 14:21:01 then you replace dup r> drop with r> 14:21:38 slava: Because the function to create the name binding is going to be very simple. I don't want to pack too much intelligence into that word, because it would require knowledge a priori of how many arguments to take, etc. 14:22:28 slava: You also have to understand that FS/Forth is a native code compiler. When it sees libc-malloc, the address bound to that label is the function of malloc() in libc.so. Thus, it's compiled as a CALL instruction right into it, just like a C compiler would produce. 14:22:43 i must admit i'm not familiar with the x86 calling conventions for C 14:22:56 Same as any other CPU, only the machinism is different. 14:23:05 Push arguments onto the CPU stack, call the function, clean up the stack. 14:23:14 but return value is in registers not CPU stack? 14:23:20 Correct. 14:23:31 FS/Forth keeps its top of data stack in EAX. 14:23:39 aha 14:23:44 bbl gotta go buy 50 rounds of 45 acp for my test tomorrow 14:23:47 Most Forths do something very similar. 14:23:49 --- quit: I440r ("bbl") 14:24:13 Some use EBX, but EAX is more natural for a native code producing Forth. 14:25:05 And actually, that's a good point: the C function will "destroy" EAX: therefore, I have to preserve it somehow before invoking the C function. 14:25:26 how about pushing a dummy value to top of stack (EAX) before libc calls? 14:25:28 : malloc >r dup libc-malloc r> drop ; will work. 14:25:35 * kc5tja nods -- that's basically what I do. 14:25:40 Or, intended to do rather. :) 14:26:18 i'd think what a compiler destroys would be based upon each individual compiler... unless there's actually a spec for it.... but assuming the compiler will destroy eax (and perhaps ecx) would make sense. 14:26:39 kc5tja, wouldn't it make sense to have r> drop as a hand-coded primitive word? 14:26:39 wUoNrFk: It destroys EAX because it must use it for the return value. 14:26:50 slava: I'm giving an example of the mechanics. 14:27:09 slava: In reality, I'm probably going to use compiler macros to automate the process of stack frame construction. 14:27:09 for malloc, okay :) what about about C 'void foo(...);' functions ? 14:27:20 wUoNrFk: What about them? 14:27:47 variable arity functions are a bad idea in a concatenative langauge 14:27:55 slava: It happens all the time. 14:27:59 really? 14:28:00 they don't have a return value, as such would you assume they destroy eax ? :) 14:28:08 slava: What's *worse*, by a long shot, is words that return a variable number of results. :/ 14:28:18 wUoNrFk: Certainly. 14:28:20 is ?dup considered a mistake? 14:28:25 hehe 14:28:27 slava: By Moore himself, even. 14:28:32 what about pick and roll? 14:28:47 these 3 always seemed klunky to me 14:28:55 pick and roll have been thoroughly debunked for decades. They do not exist in any Forth Chuck Moore has written since 1983. 14:29:06 I like ?dup 14:29:17 Even ANSI Forth claims that, while supported, they should not be used. :) 14:29:23 But I never use pick or roll. 14:29:39 They are officially "deprecated." (which is why I wonder they put them in the standard at all, but I digress) 14:29:57 * kc5tja has never used roll, but I have used pick a few times when I was first learning Forth. 14:30:11 I haven't touched pick in over 7 years though. :) 14:30:19 before you realized that having more than 3 or 4 values passed to a word leads to an incomphrenesible mess? :) 14:30:21 Congratulations ;) 14:31:09 slava: I forget why I used PICK, but that wasn't the reason. 14:31:46 I think I used PICK only five times in my whole Forth career. 14:32:27 It is a pain in the butt to use though. I can never remember what, exactly, 0 PICK does. Does it replicate the 0 or the element above it? (Turns out to be the element above it, but I still have to consciously think about it). 14:32:59 It's also virtually unimplementable on a Forth CPU with the data stack on the die itself. 14:33:28 And ROLL is harder to support than PICK, since to be truely useful, ROLL would have to execute in a single cycle. :) 14:36:43 * kc5tja still vows to build his own computer from the ground up someday. Probably using FPGA hardware. 14:38:34 cool! 14:55:22 * kc5tja wants to build everything from scratch too. CPU, VGA interface, sound, etc. 14:55:38 The only thing I'll re-use is the keyboard and mouse interfaces, and IDE interfaces. 14:55:55 No floppies on my box either. :) CompactFlash or SmartMedia. 14:58:37 But, that's all a distant dream for me at the moment. 14:58:47 Right now, I have a much more important set of tasks in front of me. 14:59:22 * kc5tja is back (gone 02:33:59) 14:59:31 I forgot I was marked away. Oops. :) 15:26:59 --- join: chrisrw (~chris@ca-cmrilo-cuda1-c3b-124.vnnyca.adelphia.net) joined #forth 15:38:56 --- join: I440r (~mark4@saturn.vcsd.com) joined #forth 15:39:53 y0 Mar 15:39:56 kMark 15:39:59 Mark 15:41:46 hi 15:48:30 whats up? 15:50:38 not much still at work for a while 15:50:46 i left early by accident lol 15:53:50 loll 15:57:07 --- join: Sonarman (~matt@adsl-64-160-165-106.dsl.snfc21.pacbell.net) joined #forth 15:57:23 y0 Matt 15:57:50 hi 16:06:38 --- quit: njd (Read error: 110 (Connection timed out)) 16:16:12 --- quit: fridge (Remote closed the connection) 16:20:56 --- join: fridge (~fridge@dsl-203-33-164-75.NSW.netspace.net.au) joined #forth 16:27:56 --- join: futhin (thin@bespin.org) joined #forth 16:27:57 --- mode: ChanServ set +o futhin 16:30:14 thin!!!!!!!!!!11 16:30:15 thin!!!!!!!!!!11 16:30:15 thin!!!!!!!!!!11 16:30:15 thin!!!!!!!!!!11 16:30:16 thin!!!!!!!!!!11 16:30:18 :) 16:30:34 * chrisrw is away: I'm busy 16:30:58 chrisrw: who are ya 16:32:51 neverm,ind 16:33:10 --- quit: I440r (Read error: 110 (Connection timed out)) 16:36:38 heh 16:41:38 hmmm:) 17:08:41 futhin: Just a quick update. FS/Forth's target compiler emits well-formed, statically linked ELF executables now. 17:08:48 futhin: Still need to work on FS/Forth itself though. 17:08:57 I'll start work on that shortly. 17:09:33 kc5tja: How have PICK and ROLL been debunked? ROLL, especially... what is the "proper" way to avoid using them? 17:09:35 is it running on linux now? 17:10:14 madgarden: Factor your code, and place the items on the stack (roughly) in the order you need them to be, when you need them to be there. 17:10:37 madgarden: Don't put 156 items on the stack, then automagically expect to be able to use everything. 17:10:50 futhin: The target compiler is, but not FS/Forth itself. 17:11:07 The target compiler is pretty sweet, all things considered. :) 17:11:16 * kc5tja is thinking of putting it up on my website for others to look at. 17:12:06 kc5: How about ROT and -ROT? Kosher? 17:12:22 madgarden: I think they're OK, but they're right at the limit of what you want to use. 17:13:14 Seems that >r is used to tuck values away quite a bit. 17:13:20 * kc5tja nod 17:13:21 nods even 17:13:27 That's its purpose. 17:13:51 Heh, my Forth-like doesn't allow access to the return stack. 17:15:30 * kc5tja uses the return stack extensively. 17:15:55 Well I imagine a real Forth needs to. 17:15:59 I even manipulate return addresses in a few cases, implementing control structures the Schemers only dream about, thanks to zero-overhead partial continuation support that Forth provides. 17:16:11 Mine's a Forth-like C abomination though. ;) 17:17:14 That sounds fun, and scary. 17:24:09 --- join: TheBlueWizard (TheBlueWiz@pc33dn1d.ppp.FCC.NET) joined #forth 17:24:09 --- mode: ChanServ set +o TheBlueWizard 17:24:23 hiya all 17:24:42 hi there 17:24:52 hiya madgarden 17:25:11 hi! :D 17:25:24 whassup? 17:26:38 Not much... getting my kid to clean up his toys, listening to C64 tunes, pondering whether I can actually get any programming done tonight or not. 17:27:43 my nephew has too many toys 17:28:09 C64 tunes == SID tunes? 17:28:12 when I was a kid, I had like... 5 toys. fricking spoiled little *grumble*... 17:28:20 Aye laddy, SID tunes are the shiznit. 17:28:24 Or something. 17:31:05 * chrisrw is back (gone 01:00:33) 17:31:33 y0 kc5tja futhin MrAway TheBlueWizard Sonarman 17:31:40 fridge: arke :) 17:32:05 hiya chrisrw 17:32:12 :) 17:32:19 * kc5tja is examining the possibility of reselling AmigaOne pre-configured computers, with Linux on them. 17:32:24 :O 17:32:47 I loved my Amiga. 17:32:55 And my C64. 17:32:57 * chrisrw and his frieend consider leasing out CPU cycles 17:33:17 Well, AmigaOS 4 isn't out yet, and when it does come out, it'll still be partially dependent on the custom chips (a later version is expected to be completely independent; something like Kickstart 4.1 or so). 17:33:23 As I understand the technical bulletins. 17:33:29 So Linux is all we are going to get for the time being. 17:33:33 http://c64upgra.de/c-one/ 17:33:37 That looks kinda neat. 17:33:48 Besides, it's a PowerPC-based motherboard, and I think that's more than worth the additional cost of an A1. 17:34:18 Though, a 133MHz path to RAM is really sluggish if you ask me. They *really* need to improve that. 17:34:25 hrm 17:34:42 Though I shouldn't talk; my computer only has a 100MHz path. :D 17:34:43 i have a greeeat idea for a compiler 17:34:53 kc5tja: are you saying you're thinking of becoming a reseller? 17:34:58 --- join: njd (~junk@njd.paradise.net.nz) joined #forth 17:35:06 terve 17:35:17 TheBlueWizard: It's a possibility. My parents have their web store set up, and I think it'd be nice to hook into their business plan without any real overhead on my part. 17:35:20 teervee mur 17:36:02 moikka chrisrw 17:36:16 terve mur...mitä kuuluu? 17:36:26 TheBlueWizard: The community appears to be moderately active too. There are a few Linux-related AmigaOne projects on SourceForge. 17:36:42 * kc5tja just looked at AmigaOne-Linux, which appears to concentrate on the kernel, then getting Debian Linux ported to the platform. 17:36:44 kc5tja: hmm 17:36:45 mur: eer!? 17:36:49 That'd probably be the way I'd go. 17:37:18 tbw loma alkoi :) toivottavasti saa levättyä! 17:37:27 chrisrw: another greeting :) 17:38:00 Seems like a fringe market, though. 17:38:12 mur: ok :) moikka then :) 17:38:44 --- join: I440r (~mark4@12-160.lctv-a5.cablelynx.com) joined #forth 17:38:57 hiya I440r!!! :) 17:39:10 * TheBlueWizard has to look up some words :) 17:39:12 hey Mark :) 17:39:38 TheBlueWizard: What are you thinking? 17:40:09 kc5tja: thinking about your plans? 17:40:28 TheBlueWizard: Well, you went `hmm' and that was that. :) 17:41:28 I'll be right back, I hope. I have to run some more errands. 17:41:33 * kc5tja is away: schtuff in general... 17:42:02 kc5tja: ah, I 'hmm'ed cuz of the AmigaOne-Linux setup and all that...more a "nod" than anything else, really 17:43:01 ! 17:43:43 I440r: what is this enigmatic exclamation point? 17:45:31 an enigma 17:45:49 hey Markk? 17:45:54 and now to sleeep 17:45:55 cya 17:46:14 ya ? 17:46:17 byee mur 17:46:27 hyvää yötä, mur 17:46:39 I440r: hhow abouut C lib support for isforth? 17:47:20 one day maybe 17:47:28 not top of the todo list :) 17:47:39 more important things first 17:48:02 like? 17:48:45 assemnler 17:48:51 hh 17:48:51 m,etacompiler 17:48:53 heh 17:48:55 x 17:49:06 dns 17:49:08 still havent figured out the assembler? 17:49:34 ill write it if you tell me how XD 17:49:35 havent even really started 17:50:14 OK... I'm a bit fuzzy on the concept of a Forth metacompiler. What is it? 17:50:42 XD? 17:51:51 XD is an emoticon... scrunched eyes and big laughing smile. 17:53:45 ah 17:54:52 hrm 17:55:10 hehe 17:59:51 * kc5tja is back (gone 00:18:17) 18:00:00 * TheBlueWizard figures out what mur said, and smiles...."Joo....saapa (some) levättyä!!!" :) 18:00:07 * MysticOne sends kc5tja away 18:00:32 madgarden: A meta-compiler is a compiler that compiles itself as easily as it can compile any application. 18:02:09 * chrisrw is considering a scoped forth 18:02:32 a bit more accurate: a meta-compiler is a program that creates a compiler...in this case, a Forth metacompiler is typilcally used to create a new Forth system for another platform 18:03:19 * kc5tja thinks he's going to stop using the Forth community terms for these things anyway. 18:03:24 They're arbitrary and have no significant meaning. 18:03:34 * kc5tja is going to rename his target compiler FS/CrossCompiler. 18:04:02 :) 18:04:13 Especially if I start reselling PowerPC-based Linux boxes, I definitely want to support PowerPC on my FS/Forth platforms. :) 18:04:58 * TheBlueWizard nods re: Forth's tendency to use specialized meaning, especially as it is often hard to describe Forth in traditional computer science sense (not that it isn't impossible, mind you) 18:10:04 Ahh, a cross compiler. Gotcha. :) 18:10:08 --- quit: Sonarman ("leaving") 18:11:21 um....I could argue it is a half way house between a meta-compiler in traditional sense and a cross-compiler 18:11:38 that is what a Forth meta-compiler really is 18:11:56 again, see my remark about trying to describe Forth ;) 18:13:20 i see little difference between a meta compiler and a cross compiler except that a metacompiler cross compiles for the same architecture :) 18:13:32 futhin! 18:13:37 when did you get in here :P 18:13:54 * TheBlueWizard blinks in surprise at futhin! 18:13:57 hiya futhin! 18:14:02 :P 18:14:03 wheres bongo ? 18:23:50 ugh 18:23:50 ugh 18:25:48 hmm? 18:32:45 * MysticOne watches MXC ... 18:33:31 MXC? 18:34:26 motor cross country 18:34:38 thats my guess 18:34:40 anyway 18:41:55 Meterosexual eXtreme Cooking? 18:45:49 lol 18:51:08 --- nick: chrisrw -> GeorgeCarlin 18:55:25 --- join: Robert_ (~snofs@c-305a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 18:56:25 http://forums.fark.com/cgi/fark/comments.pl?IDLink=757197 18:56:40 hiya Robert_ 18:56:48 --- quit: Robert (Read error: 113 (No route to host)) 18:57:03 ding dong the witch is dead 18:58:10 good 18:58:19 madgarden: since you have kid(s), do you have a plan? a philosophy to back your plan? 19:03:56 --- nick: GeorgeCarlin -> chrisrw 19:04:40 futhin: Heh sure, put me on the spot. :P 19:05:49 well it's something i've got an interest in 19:06:13 its not like parents have to do things chaotically with no plan and end up having kids who hate them 19:08:15 Well of course. I have many plans, not just one. And in some cases I have no clear plan. 19:08:33 Raising a kid has nothing to do with my career plan, for instance. 19:52:55 Maybe you could be more specific. :P 19:53:15 well how old are they? 19:53:24 I have one boy, he's 5. 19:53:59 Wow, I don't think we had this many ops online at one time in a long time. :D 19:54:12 futhin: Want to buy an AmigaOne machine preloaded with Linux? :D 19:54:20 A quarum! 19:54:40 TreyB: quorum :) 19:55:05 Spoil-sport :-) 19:55:34 yeah...and damn proud of it :) 19:55:40 i think the important thing is to realize people ULTIMATELY learn by DOING. not by sitting in a classroom listening to a teacher. students can't actually be TAUGHT.. teaching is a misleading word 19:56:07 I totally agree. 19:56:31 That's why I think that video games should be used as a teaching tool, for one. Interestingly, MIT is doing research into this area. 19:56:38 I mean, learning should be fun. 19:56:43 thus i think the imporatn thing is to get one's kid to do things.. give them the tools and the encouragement and the environment (environment is damned important, and that includes the things people say.. i.e. if parents are negative about a kid's ideas, he's in a shitty environment) 19:57:02 true...but often a good *teaching* makes a world of difference! well, gotta go...bye all! 19:57:17 laters TheBlueWizard 19:57:30 bye kc5tja 19:57:35 i think summer camps or even military bootcamps are excellent examples of a great learning environment 19:57:45 futhin: Yea I totally agree. Kids should be nurtured as much as possible... especially their ideas. 19:57:52 * kc5tja loved basic training in the Air Force. 19:57:59 --- part: TheBlueWizard left #forth 19:57:59 I've got mine in Judo. 19:58:06 Really taught me a lot about myself, though not so much about how to do other things. 19:58:11 But that can be just as important. 19:58:39 madgarden: i also think kids should be grounded in reality. they should start working at around 13 years old 19:58:50 grounds them in reality & gives them work ethic 19:58:58 altho i'm still thinking about that 19:59:08 because i didn't work at all and became all lazy/intellectualized 19:59:21 there might be a trade off 19:59:30 * kc5tja has horrible work ethic. :D 19:59:34 work might've made me less intellectualized 19:59:59 There is a trade off. 20:00:00 i've noticed that most intellectual people are also lazy 20:00:08 I think work ethic can sometimes be a negative thing... 20:00:14 Laziness breeds invention. 20:00:33 Though the corporations they'll slave for would have them believe otherwise. 20:04:37 tell me baby 20:04:40 how deep is your stack 20:05:06 do you a depth to you baby? 20:06:31 who was it that broke workers down into 4 types, smart/active, smart/lazy, dump/active, dumb/lazy 20:06:42 dumb/active 20:07:02 check out the stack on her! 20:07:56 and to avoid the dumb/active types at all costs 20:08:45 haha, that's a good point 20:09:06 Most prone to accidents and screw-ups I'd imagine. 20:09:12 And lots of them. 20:09:39 ops are the minority here 20:09:45 And that's why they call him One Eyed Three Finger McGee! 20:09:53 so are away's 20:10:08 oh noo! 20:10:33 for the first time in my life im part of a majority! 20:10:55 chrisrw: i think you're already part of a majority 20:11:05 how so!? 20:11:35 i put you in the same category as robert, mur, and all the ypn people.. the category of things that go squish when i step on them 20:11:54 and that's a majority baby 20:13:14 ... 20:13:34 im not a normal #ypn person 20:14:01 What's YPN? 20:14:12 #ypn :) 20:14:14 chrisrw: i agree, you're definitely smarter than them 20:14:23 YPN = young programmer's network 20:14:28 * chrisrw bows 20:14:55 Huh... interesting. People form these groups because... ? 20:14:56 futhin: well, at least 75% of them 20:15:24 no, don't be modest, all of them are dumb as doorknobs 20:17:52 unknown_lamer kunphuzil a_shadow chrisrw yauu Twintop vend kewl Lemmih madsie jadrax_ broken HeavyJoost devusb geqo nmtj Neumann 20:18:01 bold = smart :) 20:21:29 --- join: Sonarman (~matt@adsl-64-160-165-106.dsl.snfc21.pacbell.net) joined #forth 20:22:43 y0 Matt 20:23:09 hi, vhris 20:25:41 --- join: Robert (~snofs@c-305a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 20:25:46 --- quit: Robert_ (Read error: 54 (Connection reset by peer)) 20:43:52 --- join: snowrichard (~richard@adsl-068-209-159-248.sip.shv.bellsouth.net) joined #forth 21:03:54 OK, I'm going to bed. 21:04:06 My headache is getting worse, and aspirin isn't helping. 21:04:33 --- quit: kc5tja ("THX QSO ES 73 DE KC5TJA/6 CL ES QRT AR SK") 21:37:31 anybody left? 21:39:17 nope 21:39:22 were all assleep :) 21:39:26 of course not 21:39:27 hush! 21:39:32 nobody talks on #forth 21:39:45 we're products of your imagination 21:40:26 I think my Michael system is stable enough for me to write an article for the bespin page soon 21:40:54 cool 21:40:56 approximate word count should 21:41:00 be how much? 21:41:14 michael ? 21:41:32 5265298469348463245 words 21:41:33 a forth-like thing written in C 21:41:35 altho i'm planning on replacing the bespin site with a forum & blog site 21:41:39 oh :P 21:41:52 there's no word count limit 21:42:30 the complete manual is only a few 8 1/2 x 11 pages 21:42:52 but I can summarize to a few screens 21:43:12 what can it do? 21:43:19 nevermind :P 21:44:09 it has basically C operators in a RPN notation, along with a few forth stack ops. A SYSTEM command to run bash scripts to call external programs easily. 20 levels of include files 21:44:16 there that is it summary 21:44:51 token threaded. 21:45:17 http://veteransinaction.org/michael 21:47:37 --- quit: chrisrw (Remote closed the connection) 21:57:44 --- quit: snowrichard ("Leaving") 22:02:56 --- quit: Sonarman (Remote closed the connection) 22:15:17 --- join: Robert_ (~snofs@c-305a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 22:20:18 --- join: Robert__ (~snofs@c-305a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 22:22:02 --- quit: Robert (Nick collision from services.) 22:22:05 --- nick: Robert__ -> Robert 22:26:26 --- join: Robert__ (~snofs@c-305a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 22:29:03 --- quit: Robert (Nick collision from services.) 22:29:05 --- nick: Robert__ -> Robert 22:38:18 --- quit: Robert_ (Read error: 110 (Connection timed out)) 23:10:17 --- nick: MrAway -> MrReach 23:30:32 --- part: MrReach left #forth 23:35:18 --- quit: TreyB (zelazny.freenode.net irc.freenode.net) 23:35:18 --- quit: MysticOne (zelazny.freenode.net irc.freenode.net) 23:35:53 --- join: MysticOne (mysticone@mysticone.usercloak.freenode) joined #forth 23:35:53 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 23:39:14 --- quit: TreyB (zelazny.freenode.net irc.freenode.net) 23:39:14 --- quit: MysticOne (zelazny.freenode.net irc.freenode.net) 23:39:14 --- quit: onetom (zelazny.freenode.net irc.freenode.net) 23:39:16 --- quit: ianp (zelazny.freenode.net irc.freenode.net) 23:39:16 --- quit: warp0x00 (zelazny.freenode.net irc.freenode.net) 23:39:16 --- quit: ChanServ (zelazny.freenode.net irc.freenode.net) 23:39:16 --- quit: Robert (zelazny.freenode.net irc.freenode.net) 23:39:16 --- quit: oooo__ (zelazny.freenode.net irc.freenode.net) 23:39:16 --- quit: skylan (zelazny.freenode.net irc.freenode.net) 23:39:16 --- quit: njd (zelazny.freenode.net irc.freenode.net) 23:39:16 --- quit: fridge (zelazny.freenode.net irc.freenode.net) 23:39:17 --- quit: mur (zelazny.freenode.net irc.freenode.net) 23:39:17 --- quit: futhin (zelazny.freenode.net irc.freenode.net) 23:39:17 --- quit: madgarden (zelazny.freenode.net irc.freenode.net) 23:39:17 --- quit: slava (zelazny.freenode.net irc.freenode.net) 23:39:17 --- quit: chandler (zelazny.freenode.net irc.freenode.net) 23:39:31 --- join: futhin (thin@bespin.org) joined #forth 23:39:31 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 23:39:31 --- join: MysticOne (mysticone@mysticone.usercloak.freenode) joined #forth 23:39:31 --- join: Robert (~snofs@c-305a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 23:39:31 --- join: njd (~junk@njd.paradise.net.nz) joined #forth 23:39:31 --- join: fridge (~fridge@dsl-203-33-164-75.NSW.netspace.net.au) joined #forth 23:39:31 --- join: slava (~slava@CPE0080ad77a020-CM.cpe.net.cable.rogers.com) joined #forth 23:39:31 --- join: mur (~mur@uiah.fi) joined #forth 23:39:31 --- join: oooo__ (o@virgo.bombsquad.org) joined #forth 23:39:31 --- join: onetom (~tom@cab.bio.u-szeged.hu) joined #forth 23:39:31 --- join: skylan (sjh@vickesh01-4887.tbaytel.net) joined #forth 23:39:31 --- join: madgarden (~madgarden@Kitchener-HSE-ppp3576567.sympatico.ca) joined #forth 23:39:31 --- join: warp0x00 (~warpzero@dsl.142.mt.onewest.net) joined #forth 23:39:31 --- join: ChanServ (ChanServ@services.) joined #forth 23:39:31 --- join: chandler (~darmok@64-145-60-36.client.dsl.net) joined #forth 23:39:31 --- join: ianp (ian@inpuj.net) joined #forth 23:39:31 --- mode: zelazny.freenode.net set +oo futhin ChanServ 23:40:42 --- quit: TreyB (zelazny.freenode.net irc.freenode.net) 23:40:42 --- quit: MysticOne (zelazny.freenode.net irc.freenode.net) 23:40:58 --- join: MysticOne (mysticone@mysticone.usercloak.freenode) joined #forth 23:40:58 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 23:57:05 --- part: futhin left #forth 23:59:59 --- log: ended forth/03.12.18