00:00:00 --- log: started forth/06.08.04 00:18:02 --- quit: tate ("Leaving") 00:19:10 --- join: segher (n=segher@dslb-084-056-145-228.pools.arcor-ip.net) joined #forth 04:05:46 --- join: neceve (n=claudiu@unaffiliated/neceve) joined #forth 04:39:02 --- join: virl (n=virl@62.178.85.149) joined #forth 04:48:47 --- join: PoppaVic (n=pete@0-2pool198-122.nas30.chicago4.il.us.da.qwest.net) joined #forth 05:17:17 --- join: PoppaVic1 (n=pete@0-1pool46-111.nas30.chicago4.il.us.da.qwest.net) joined #forth 05:18:43 --- quit: PoppaVic (Nick collision from services.) 05:18:46 --- nick: PoppaVic1 -> PoppaVic 05:49:54 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #forth 06:08:11 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 06:08:41 lo, tathi 06:08:46 hi 06:10:46 morning folks 06:10:52 howdy 06:11:00 up for a question? 06:11:13 a real one 06:11:14 too 06:11:15 you can try - I'm just mulling a changeover 06:11:18 k 06:11:31 I'll believe it's real when I see it 06:11:45 :) 06:11:53 in eforth model and source, there's a word named `macro' - has anyone seen eforth-code implementing that word? 06:12:02 tada 06:12:12 how real is that? :) 06:12:42 * tathi doesn't know anything about eforth 06:13:00 it's decent, i'm using it on linux 06:13:01 I recall a 'macro' from ancient fig/f79-forths 06:13:08 really? hmm 06:13:11 WHat's it doing? 06:14:05 The one I recall would save literal-strings of commands to force-feed the input-stream. Like #define or even 'inline' 06:14:12 well, being that there's lack of comments in the source file, i conjecture that it's meant for a kind of textual replacement 06:14:47 when the macro is named, the content of the word is assembled instead of the name being compiled 06:14:57 ie, 06:14:57 Very, very old FIG newsletters documented such a thing. It seems to have benn obviated over the years, but I am not sure why. 06:15:14 macro next lodsw jmp ax end-macro 06:15:18 ax jmp 06:15:24 oh. That's different 06:15:39 That'd be something *FOR* a forth-assembler. 06:15:43 yea 06:16:16 that SHOULD use the name 'next' and shovel in the asm-code to the input-stream. 06:16:29 wait, is this in assembly-language code, or forth code? 06:16:31 i designed an asm syntax that i prefer over intel-proper 06:16:42 it's forth, he's using an asm example. 06:17:10 well the src is code with args following opcode 06:17:25 it's backwards but that doesnt matter to me, i'm gonna replace it 06:17:33 Quiznos: that def of macro/end-macro is precisely the sort of thing they wrote about 20 years ago 06:17:40 kk 06:17:49 Ting remembers it 06:17:52 and Meunch too 06:17:59 yep 06:18:18 For some reason, it was never adopted by "the world" - to include ANS, iirc 06:18:29 so, you think it's googlable? 06:19:01 try the FIG homepage and issues that are from the late 70's to early 80's 06:19:18 is text from back then public? 06:19:30 I would wager you could puzzle one out for gforth in less than a dedicated-day 06:19:54 k 06:20:04 Quiznos: the oldest backissues should be, yeah - I don't feel like moving and searching boxed materials. 06:20:38 what would i do with paper? 06:20:41 heh 06:20:44 np 06:21:02 paper is great - you can sit on "the throne" and read it over and over ;-) 06:21:09 ..or in a tub 06:21:18 ..or when power is out, etc 06:21:18 sure, you should see my libr 06:21:21 yep 06:21:51 although - I admit, a single-mantle Coleman Lamp is NOT really good for the eyes 06:22:02 huh. I don't see why you would need macro/end-macro 06:22:02 heh 06:22:06 couldn't you just do 06:22:19 : next lodsw ax jmp ; immediate 06:22:28 nope 06:22:30 i know the normal forthy way is to c, and , 06:22:36 right 06:22:42 no, on the intel chips, inline is better for performance 06:22:50 instead of jumping around 06:22:59 yeah, but isn't the assembler normally set up to run in interpret mode? 06:23:03 on the 32bitters, jmping kills the cache 06:23:19 so that definition *would* inline the code 06:23:21 macro ( "end-macro" ---) 06:23:27 my assembler is different, so i cant give a straight answer. 06:23:44 ah. 06:23:56 well, that's how I do it 06:23:56 alot of intel chip instructions are 0-operand and I take serious advantage of that traigt 06:23:58 trait 06:24:04 all you are doing is encapsulating a string for shoving immediately back into the istream. 06:24:30 well `the stream' is just to c, and , in place 06:24:37 no fuss no muss 06:25:04 I suspect the big-brawl was that folks wanted to make macros data-compilers and immediate-exec doers 06:25:36 I _do_ recall that it was interesting, but that later issues had folks screaming 06:25:47 that's interesting 06:26:10 (every FIG member seems to want to rewrite anything - usually in asm) 06:26:38 well yea 06:26:56 Quiznos: no "well, yeah" - it was silly. 06:27:14 a LOT of arguments in FIG were just plain silly. 06:27:22 well yea, that too heh 06:27:48 alright, so i'll just replace the whole thing. but i'm kinda liking the macro concept 06:27:52 still true -- a lot of arguments in here are just plain silly :) 06:27:59 I can understand if folks want to minimize code in high-level, and I can understand "this is optimal for a 6502", but goddamn. 06:28:07 heh 06:29:35 tathi: well, again - if they would all work the same, fine - they rarely all work the same. I dunno *HOW* many issues I had with logic/branching arguments.. But it ALWAYS involved 'guts' that folks should not have HAD to think about. 06:30:15 I think, while I was a member, that every issue had arguments about switch/case and if/else, etc 06:31:13 Quiznos: so how does your assembler work? 06:32:42 new opcodes are named to include its operation; programmer's registers are single char; so, a++ means inc ax and <>b means xchg ax, bx 06:33:00 reg> assembles to 06:33:03 --- join: Ray_work (n=Raystm2@199.227.227.26) joined #forth 06:33:04 ah 06:33:08 >reg for pop 06:33:17 poor mans assembler are nice 06:33:22 alot of consts that just get c, 06:33:22 so just for your forth; not a complete x86 assembler then? 06:33:26 hI 06:33:30 hi ray 06:33:31 Hi even 06:33:37 hi Ray 06:33:38 subject? 06:33:45 hi Josh :) 06:33:52 i do want to port some of that complex addressing over 06:34:21 but really there's only a need for the uncomplicated stuff at the moment 06:34:27 ya 06:35:02 Ray_work: Quiznos is explaining his "assembly language" syntax 06:35:13 i've never been satisfied with the asm syntax that Lax and Perry defined. (maybe it's older than them but it's not well factored IMO) 06:35:16 ah thanks 06:35:38 which bible page is that documented on..... /me ducks. 06:35:43 I still think that we need a "generic-assembler", sorta' like tathi's fovium stuff - think of it as a "portable assembler" 06:35:44 lol! 06:35:53 ray, i do have a good sense of humor 06:35:54 :) 06:36:27 I know, otherwise I wouldn't have :) 06:36:35 You know I do too? 06:36:38 yes? 06:36:46 well, for forth, i think coders should be focusing on the operations, not just rewriting the "locally authorised" syntax that chip makers deesign 06:36:47 design 06:37:10 I agree, let the C programmers and asm-heads write such .o 06:37:12 i also took idears from a really old article in DDJ for a redesign of the Motorola 68000 assembler 06:37:22 ray :) 06:37:29 sure i do 06:37:33 brb coffee 06:38:14 you mean the old Opcode argumentA, argumentB convention? 06:38:54 yea 06:39:03 it's soooo 1950s 06:39:04 :> 06:39:29 with today's language parsing skills and knowledge, there really is no need for that now 06:39:52 Regardless of the actual CPU, you still have the entire OS and all the hardware, and STILL need to do all the same things as they did in the 50's. 06:39:59 and you would like a forth thing or what? well then that would be argumentB argumentA opcode 06:40:07 the example from the ddj article i mentioned showed a 50% reduction in text when written in the new syntax 06:40:18 virl yea, more forthy flavor 06:40:20 source or target? 06:40:31 of the sample? 06:40:36 the 50% 06:40:50 50% reduction of text in the new syntax 06:40:56 well, I don't think it doesn't make something forthish with putting it into another direction. 06:40:56 ahh 06:41:03 as opposed to Motorola syntax 06:41:18 That's lovely, if it's nicely portable and NOT at the expense of readability. 06:41:19 well, where is that article? I'm interested 06:41:22 fewer letters, better style of referring to addressing modes 06:41:31 the idea is very portable 06:41:35 Verbose does NOT mean readable, let alone portable. 06:42:16 and then there's a book i have about implementing a os/coding system on 6502 "boxes" from Weitengarden (sp?) 06:42:25 This is sorta' another reason I am flogging this project of my own. 06:42:42 that book is from the very early 80s iinm 06:43:06 the "standard asm" syntax doesnt flow very well from mind-fingers-kbd-mind 06:43:14 it's very choppy and discrete 06:44:10 and with forth being a very expressive language, that makes using these syntax idears very easy to implement. 06:44:21 ' and find do all the real heavy lifting 06:44:57 that's my fave part of forth - symbol table entry, serching are already built-in 06:45:02 parsing too 06:45:37 as Chuck once wrote, coders like to reinvent interpreters; i'm well past that 06:48:54 another reason for simplifying the asm words is that i get to choose which which opcodes to include and that allows the coding of a kernel with relative-offsets instead of absolute address. there's one chip opcode that takes reloff as a operand instead of messing with addresing modes 06:49:36 i just need to figer out how to get back to one-segment binary program; the eforth-model doesnt make it clear 06:50:06 the package source assembles to ~32k right now 06:50:24 i'm not so hung up on binary size at the forth level any more 06:52:32 I still suspect yer missing a point, but.. As long as you are happy. 06:52:51 it's a work in progress; what point? 06:53:09 Chuck wrote a lot of stuff, I disagree with some of it - such as "colorforth" 06:53:41 what about colorforth? (i'm still processing that :) 06:54:38 Quiznos: what happens if you are colorblind? Why would the color matter to a textbook? Should editors that can use case, chars and colors be more aware? 06:54:47 good point 06:55:15 PoppaVic: that problem has been solved a long time ago with editor extensions that translate back to normal forth. 06:55:19 His "guts" or VM changes might be interesting, but he lost me with colors and such 06:55:28 mods 06:55:31 Ray_work: again, I'd ask "why"? 06:55:49 why not? 06:56:01 I think the translations should run the _other_ way. 06:57:16 I suspect he was clinging to the simple wordword stuff, and just added immediates all over - translators/interp. 06:58:32 ..maybe he even got too deep into the QM "color, style", etc terms 06:59:10 Even geniuses and inventors can be off, occasionally. 07:01:27 Quiznos: I'd like to see a baseline "language" - a core-voc (maybe with sub-wordlists) - that will "compile" ala' C, , and such in a form that is NOT pure cpu, but instead portable. Think of it as "portable VIRTUAL assembler". 07:02:00 I have to wonder how much support you'd need from a local asm, libs, objects. 07:03:30 It's even interesting to examine and speculate on what sorta' junk MUST be in the "vm" (registers??) and vmcontext (threads? procs?) 07:03:31 PoppaVic yea. for the last few days i've been wondering why meta-compiling (ie, compiling the compiler) is so different when compared to smallc compiling its own source code. i think i'm moving in that direction with a meta-compiler 07:03:53 what do you mean by "local asm"? 07:04:00 Quiznos: then yer heading my own direction, prolly from an angle. 07:04:02 afa support 07:04:11 perhaps 07:04:27 Quiznos: all that "asm" and #asm talk about is "ASM" - like it was a universal. 07:05:07 Yet, anything like forths could use a "virtual-asm" - the bootstrapped vm/engine base. 07:05:10 well, my idears are about 20 years old :) and they're fairly static afa further developement goes 07:05:39 afaict, vm and threads only need to save the "registers" and the user aread. 07:05:42 area 07:05:54 I lost track, when I hung around in #asm, of how many assemblers there are - multiples for every platform. 07:06:00 yep 07:06:30 right, which is why I am using C and structures and tried to codify the VMbase and VMcontext. 07:06:39 yea 07:06:52 which thread model are you using? 07:07:42 ..don't care if some idiot uses the "fubar-2000 assembler" or "gcc" - they still need objects to link into static, shared or plugin 07:08:47 Quiznos: I'm leaving it open.. Looks to me as though folks could use pthreads, pth, or just a new model - I don't CARE - All I wanted to do is leave a door in the wall for local-issues versus global/process/program issues. 07:09:00 k 07:09:12 bbs, gotta eats 07:09:17 WHat I _do_ is bootstrap a "main vm" 07:21:03 --- quit: PoppaVic ("Pulls the pin...") 07:21:16 --- join: vatic (n=cturner@pool-162-83-254-201.ny5030.east.verizon.net) joined #forth 07:22:33 --- join: PoppaVic (n=pete@0-1pool72-176.nas24.chicago4.il.us.da.qwest.net) joined #forth 07:54:24 DO, ?DO, LOOP, and +LOOP are immediate words. What's the norm for LEAVE? My implementation in Ting's Forth back from '91 allows LEAVE to be compiled either way. 07:54:43 hehehehehehaha 07:55:08 We already mentioned this today. Are you having fun yet? 07:55:23 Hi jcw. I'd make LEAVE immediate. 07:55:33 OK. 07:56:34 It's a tad tricky to implement, you need to allow for multiple LEAVEs, track them and resolve them all after the loop. 07:56:40 PoppaVic [vm] yea 07:57:12 you need to know whom does what to whom, and where and why and how. 07:57:30 who does what to whom ;) 07:58:03 yeah.. and the generic "ABI" doesn't help a lot, when code is hidden, obscure or buried. 07:58:43 Multiple LEAVEs in the context of something like : foo DO IF LEAVE THEN IF LEAVE THEN LOOP ; ? 07:58:47 gforth won't act like pfe or whatever 08:00:40 jcw, yes -- any combination including more than one LEAVE inside the loop. 08:01:01 That would seem to make an argument for a run-time LEAVE, would it not? 08:01:16 --- quit: neceve ("Leaving") 08:01:23 No, it's not tough to resolve in advance, and is more efficient done that way. 08:02:11 Until folks diddle the stack 08:02:31 "which stack?" 08:04:34 The green one. 08:04:46 asm and C are bad enough with one stack, adding more stacks adds more "issues" 08:04:57 "bad enough"... whaetver. 08:05:26 so, you need to know where you are and whom does whome, "whatever". 08:05:34 Apparently I am registered of freenode, but still can't send private messages. 08:05:57 Did you log in? 08:06:11 er, rather, did you identify? 08:06:31 Gotta check 08:06:34 hmm, freenode warns you - and it will punt a poser after an interval. 08:06:39 with /msg NickServ IDENTIFY 08:07:34 --- nick: jcw -> k4jcw 08:07:50 odd, that... No Forth IRC clients? 08:08:03 Interesting. Apparently 'jcw' is registered, but not passworded or something. 08:08:14 Yes. Factor has one. If you consider Factor Forth. 08:08:24 * PoppaVic chuckles 08:08:32 and retroforth too.. 08:11:01 the retroforth irc client will eventually be part of the RetroChess. 08:11:26 your cool chess thing 08:11:37 does it have an AI? 08:11:46 Nearly time for the Friday 11:15 conference call for work. Back in a bit. 08:12:10 virl: not yet, it's just a smart board, but the idea is to leave a board that an ai can drive. 08:12:17 Ray_work: and that makes me enthusiasic - hoe? 08:12:27 how, too 08:13:56 version one used commands like : mv / mvs / pp ( pawn-promote) / ep / and 4 castle comands BUT 08:14:15 my newest version can handle all of that just from the move stream. For instance. 08:14:34 I have to tend to agree with my phd buddy, as-is, "forth" is the worlds must _unsupported_ language. It's just deadly-sad I have to agree with him. 08:15:13 I don't *like* to agree with him, but it seems true - every day. 08:15:28 ah /me just realizes what you are REALLY saying... 08:15:40 yup 08:15:55 some times it takes a sec to parse you. 08:16:03 Don't get knotted, I sure like "forths", but geezus. 08:16:27 "forth" is the worlds must _unsupported_ language? 08:17:46 The dude works for IBM, and I can't argue with him, when he can reel off alternatives like a tape-player. 08:18:20 I can DISAGREE, but - even a week or 4 in here would support him.. 08:18:56 It's like living in ##C and folks that pray to lisp or java. 08:19:26 heh 08:19:53 Something is funky, and forth and C are missing it. Or Forthers and C'ers. 08:20:18 I think it has to do with translation and baselines like OS 08:20:22 what are missing? 08:20:52 "platform" (if OS is offensive) 08:21:13 "Expectations", in the other direction. 08:25:47 Quiznos: it's really odd - starting from shells, OS, (forget pipes), translatators, loaders/linkers, and then back up again - just.. weird. 08:26:42 add in SBC and then os, and posix, and ansi/ans, and then watch yerself go blind... Weird. 08:28:10 you mean that forth is lame? ill-equipted to interface with modern capabilities of modern hw and software? 08:28:42 I suspect it's an issue that is all language(platform(shell(interpreter+compiler))): metacompiler issues 08:29:19 agreed and that's why i'm rebellious of the whole thing and wanting to attempt to do aright. 08:29:21 or even "metainterpreter" - I can't tell, I have heard and seen all SORTS of arguments 08:30:48 Quiznos: which is why I began #Metabuilder, and am sure we need a "minish" (portable and extensible shell) to baseline the poor bastard. HOWEVER, a _lot_ of ABI is missing across-the-board. 08:31:33 I suspect I'd be done by now, if I'd have accepted gforth. 08:31:39 re ABI, what's on your essentials-list? 08:31:49 nods 08:31:57 Yet, in spite of your continual confusion about everything, people are happily using Forth (and C) to write actual code right this minute today, interfacing with modern hardware and software. Coincidence? Read the book. 08:32:07 hah! Lol 08:32:14 sizes and endian and order, mostly - I try to ignore it and let C deal with it. 08:32:21 Q, heh, dont be so hard on him :)( 08:32:31 Quiznos: that would be impossible :) 08:32:32 he ponders, that's all 08:32:35 heh 08:32:38 You mean 'don't take the troll bait', and I do try. 08:33:01 Quartus: well, if you send me a free palm and yer code, I can try - meanwhile, yer an spinoff-topic. 08:33:05 as it is pseudo-writ, ``questions are the beginning of knowledge'' 08:33:25 No, I'm directly on-point. I'm not talking about Quartus Forth specifically at all. 08:34:21 Quiznos: I've been coding for over 20 years.. On multiple platforms. Sooo... I have to wonder why we suffer sh, csh, bash, make and such - and not forths 08:34:50 IBM wanted REXX - fine - why? 08:34:54 You're confused as to why there's more than one approach to programming languages? 08:35:00 I just keep asking and tinkering 08:35:10 well, you're obviously one of us -- misguided into compromising our ideals :) 08:35:40 Quartus: not in the least: every language is another translator/interpreter/compiler and language. 08:36:04 So, you don't wonder why there's sh, csh, bash, make, and other tools, or you do? 08:36:23 yes, no - of course. 08:36:37 Want to pick one of those? 08:36:45 now that i think of it, forth is quite in line with what Backus lamented about in his speech about functional programming aupon recieving some award: 08:37:13 I'd think the answer would be obvious why so many different tools of similar or nearly identical function exist. 08:37:27 yes 08:37:27 basically he said (mind you he said this in the mid-70s!) that current (then and still i note now) programming languages are too low-level 08:37:28 answerS, actually. 08:37:45 Forth is precisely and can be all things to each coder. 08:37:59 it can slam bits and dance the OO-model 08:38:04 that's diverse. 08:38:29 no, it can't be. 08:38:36 prove it 08:38:59 or atleast support the claim 08:39:07 'prove it'? Why don't you prove that the color blue can't be all colors to all people? Forth can't be Haskell to anyone. 08:39:25 illogical: forth is not a color -- try to stay on point? 08:39:38 He's on point. That was an analogy. 08:39:54 fp as Backus told, starts as a concept, and all concepts are portable. 08:40:16 no forth is color (dispite Moore's use of color ;) 08:40:30 Quiznos - whatever Backus said, Forth can't be Haskell to anyone. 08:40:41 You need to look up the definition of what an analogy is, Quiznos. 08:40:42 ok 08:40:49 k4jcw ok 08:41:16 the point is that ayrnieu is thinking of concreteness instead of fluid concepts. 08:41:55 You must be able to read his unspoken thoughts, then. 08:42:18 i quit mind-reading when I learned the thoughts of God :) 08:42:20 lol 08:42:23 hah! 08:43:53 Ok. Check with your invisible friend on what an analogy is, and then come back. 08:45:01 --- join: nighty_ (n=nighty@66-163-28-100.ip.tor.radiant.net) joined #forth 08:45:06 yea yea sure sure 08:45:08 :) 08:45:22 hi 08:45:30 Hi nighty_. 08:48:02 * PoppaVic is still talking Ma' and the hospital with sis, sorry... 08:48:06 Haskell is just one implementation of function programming. again, Backus's point was that a new style of coding is required. lisp has it, haskell does a style of it, there are others also with varying degrees of agreement with Backus's speech. why cant Forth have some of it? 08:48:58 Which is an entirely different thing to say than "Forth is precisely and can be all things to each coder". 08:49:33 there's no contradiction tween those two statements 08:49:57 Quiznos - more carefully identify the style, then use it in your Forth programming, making changes as you need to support this style. Then publish your findings. 08:50:12 of course 08:50:35 i'm currently in the study phase of fp 08:50:44 and pondering also 08:50:57 learning to translate fp concepts to forth 08:51:06 Indeed. Chanting "Hosanna" about Forth being the grand solution to all things is neither useful nor correct. 08:51:40 wow. ok lemme rephrase that. forth is the most extensible IDE availabe. 08:52:08 in terms of the ``Tao of Unix'' it's has the highest level of Tao possible. 08:52:23 Actually, assembly does. 08:52:40 assembly is not an IDE though 08:52:48 so assembly fails 08:52:50 Neither is forth. 08:52:58 I mean, it doesn't seem to let me edit words in VI. 08:53:01 Once again, a vague, sweeping assertion. Using the word "Tao" makes it even more vague. If you think there's some purpose to be served in ranking IDEs in some order of less-to-most extensible, set some measurable criteria. 08:53:02 then you dont understand what ``tao of unix'' means. 08:53:03 no, 'assembly' is so fragile that almost anything you do to improve on it will leave you with something other than assembly. 08:53:08 so it's not really integrated. 08:53:46 Define fragile. I've been writing assembly on embedded processors and PCs for over 25 years. 08:53:52 It's only as fragile as the programmer is bad. 08:54:10 k4jcw - you're talking about something else, now. 08:54:29 I am? 08:56:30 yes, as soon as you indicated that the skill of a programmer had anything to do with what I said. In the context of Quiznos's vague quest to add FP styles to Forth, and his assertion that all features are tame to -- well, tame to the classification of Forth. As soon as you add much type checking to assembly, nobody will agree anymore that you have 'assembly'. 08:57:48 ayrnieu i note that you've mischaracterised my posts. 08:57:59 ok 08:59:04 'tame' and 'feral' here are fun befunge words, which I apply here to classification. Look them up! /me & 08:59:42 it's not good to redefine words without notice. 08:59:53 * PoppaVic apologizes, still strategizing mom coming from hospital 09:00:14 PoppaVic there's no need to apoligise for what must be done. 09:00:37 I know, but I can't talk in 5 directions at once, and I am missing a lot. 09:01:10 In the context of programming, I define 'fragile' as meaning that it is easily broken if changed. Properly designed code tends to be more robust, therefore less fragile. The ability to create more robust code is dependent on the skill of the programmer. 09:01:20 yep 09:01:43 So if you're using fragile in another context, it's not compatible with mine. 09:05:33 PoppaVic no one asks you to be pentafaced 09:05:59 everyone has expectations 09:06:26 all i demand is a lack of confusion and truth. 09:09:01 yeppers, or viewpoints under "understood" 09:09:24 honest opinions only need be expressed :) 09:10:40 sure, and experiences 09:10:53 agreed 09:11:11 "I've never had a problem with FOO..." 09:11:47 "every machine does BAR" 09:12:13 (of course, HOW is moot) 09:12:59 moo 09:25:33 gahh 09:28:34 what? 09:29:15 well, i found a forth2c translator 09:29:22 by Anton et al. 09:41:49 gahhh 09:57:18 --- join: Quartus_ (n=Quartus_@209.167.5.1) joined #forth 10:00:17 geezus... OK, back to life - lemme' recycle... 10:00:19 --- quit: PoppaVic ("Pulls the pin...") 10:02:01 --- join: PoppaVic (n=pete@0-1pool47-220.nas30.chicago4.il.us.da.qwest.net) joined #forth 10:02:50 found a c2forth package 10:03:12 Quiznos: apparently, Ma' is heading into "endgame" and w/o decent docs or even understanding - it was getting tearful and family-oriented 10:03:30 Quiznos: they just ain't greatly portable. 10:04:01 http://www.mpeltd.demon.co.uk/arena/c2forth110.zip 10:04:37 PoppaVic it can be a difficult situation but one thing i do know, she's in your future still. 10:04:47 yeah, I've burned a few downloads with such. zips make me ill to begin with, because I already know they are semidos 10:04:52 she's only going to sleep. 10:05:08 source is within the zip 10:05:24 peel back the url one level to get a page 10:05:36 Quiznos: no, I live here and care for her as I can - but I refuse to cater to psychoshit. Other than that, the tears run. 10:06:11 Quiznos: I meant the solutions within the .zip - usually they are really hard dos-cp/m based. 10:06:58 * PoppaVic tries to live "multitasking" 10:07:48 wow, you dont make it easy to help. 10:07:50 --- part: Quiznos left #forth 10:07:58 Sadly, I am afraid I won't be able to die first - leaving Ma' and the rest to the probs. Christ knows I been trying. 10:15:20 --- quit: Shain (Remote closed the connection) 10:16:55 You're just not trying hard enough. 10:18:09 "show me", pretend I'm from MO 10:18:43 Such wit. 10:18:59 k4jcw: that was what I thought about you 10:19:18 You're the one that said "Christ knows I been trying." 10:20:00 k4jcw: ain't it a bitch? Write up "the forth", "show me". 10:20:39 meanwhile, bugger off - I had not been dribbling on you. 10:23:54 fuck it.. I'm off to getting dinner ready. 10:23:57 --- quit: PoppaVic ("Pulls the pin...") 10:26:54 ain't he a charmer? 10:28:31 Indeed 11:17:41 DO always makes one pass through the loop, right? Whereas ?DO checks for equality. So DO juse compiles (DO), while ?DO compiles (?DO), and the CFA of the word after the address to the start of the loop after (LOOP) or (+LOOP)? 11:21:34 hmm. That might be one way it's been done. I compile an if ... then around a ?do. 11:23:05 I think in effect the ?do becomes an if. 11:23:36 I think this eforth implementation that I use for ideas has it's ?do loops screwed up. Either originally, or perhaps when I rewrote it. 11:23:41 Yes, but I actually compile the conditional. 11:24:00 Why? 11:24:14 simplicity. 11:24:50 What does it look like when you decompile it? Do you eliminate the (do) or (?do)? 11:26:24 looks like 2dup <> if do ... loop then, or close to that (not at my machines right now). 11:27:20 Oh, right. You'd still need the (do) to move the values to the return stack at runtime. 11:45:55 Quartus: replied to you email 11:49:04 thanks, I'll check it. 11:55:26 k4jcw, ?do is fairly infrequently used. For a long while I provided it for Quartus Forth only in Forth source form, a ?do with a wrapper for loop and +loop. 12:06:27 nighty_, your email didn't make it here. 12:07:00 uhmm 12:07:16 From: Christophe Prevotaux 12:07:16 To: "Neal Bridges" 12:07:16 Subject: Re: Dropping by 12:07:16 Date: Fri, 4 Aug 2006 14:45:14 -0400 12:07:16 Organization: Northern Light Technologies 12:07:17 X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i386-portbld-freebsd6.0) 12:07:19 well it's ok but I'd rather have you come by on tuesday since none of 12:07:21 the higher management is here today seems there are some vacations 12:07:23 on monday so there really no one at the office today. 12:07:25 If you do not mind 12:07:33 I don't mind, thanks. 12:07:38 --- quit: virl (Remote closed the connection) 12:07:47 :) 12:08:12 I asked yesterday to the upper brass if it was 12:08:16 they said yes 12:08:19 but then again 12:08:30 they don't always pay attention 12:08:54 If Tuesday suits better, that's no problem. 12:09:01 yes 12:23:07 I can't account for the mail not showing up, but it definitely didn't arrive in any form. 12:34:44 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-177-095.pools.arcor-ip.net) joined #forth 12:38:11 --- quit: Quartus_ ("jmIrc destroyed by the OS") 12:43:01 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 12:43:11 --- nick: snoopy_1711 -> Snoopy42 12:43:58 k4jcw: http://pastebin.ca/115717 12:44:17 That builds ?DO on top of DO/LOOP/+LOOP 12:47:48 nighty_ -- email just came through now. 13:04:58 lol 13:05:02 shitty radiant 13:05:08 email server 13:20:51 --- nick: Raystm2 -> nanstm 13:27:58 --- quit: timlarson_ ("Leaving") 13:31:00 --- join: Quartus_ (n=Quartus_@209.167.5.1) joined #forth 14:18:54 --- quit: madwork (Read error: 104 (Connection reset by peer)) 14:24:17 --- join: madwork (n=foo@derby.metrics.com) joined #forth 14:41:23 How does LOOP/+LOOP handle it's arguments, with regard to sign? I see that : foo -11 0 ?do i . -2 +loop ; prints 0 -2 ... -10. I don't think it's doing a simple >= type comparison. 14:54:03 it's defined in the Standard in terms of boundary-crossing. 14:57:27 index+increment crossing the boundary between limit and limit-1, as I recall it. Have a look at the http://quartus.net/dpans doc. 15:00:29 I was wondering more about an elegant method of detecting the boundary crossing. 15:01:21 I have one on file, but not until I'm back in the office. 15:01:40 Have a great weekend folks /me going home. see ya from there. 15:02:13 cya ray 15:03:02 --- quit: Ray_work ("User pushed the X - because it's Xtra, baby") 15:04:05 --- quit: crc (Remote closed the connection) 15:04:51 --- join: crc (n=crc@pool-70-110-183-96.phil.east.verizon.net) joined #forth 15:07:40 --- join: vatic_ (n=charlest@pool-162-83-254-201.ny5030.east.verizon.net) joined #forth 15:10:31 --- mode: ChanServ set +o crc 15:14:29 --- join: I440r (n=mark4@24-177-235-246.dhcp.gnvl.sc.charter.com) joined #forth 15:14:41 --- quit: I440r (Read error: 104 (Connection reset by peer)) 15:15:07 --- join: I440r (n=mark4@24-177-235-246.dhcp.gnvl.sc.charter.com) joined #forth 15:18:36 --- mode: ChanServ set +o I440r 15:19:00 --- quit: vatic (Read error: 110 (Connection timed out)) 15:19:28 --- mode: ChanServ set +o tathi 15:19:36 }:) 15:23:45 --- nick: vatic_ -> vatic 15:33:59 --- quit: nighty_ (Read error: 113 (No route to host)) 15:40:38 Ooooootay. Except for the boundary crossing on negative values, counted loops work. 15:40:41 * k4jcw is pleased. 15:41:15 I can set you up with the easy way of testing all boundaries in about a half-hour. 15:42:34 kewl 15:43:02 Incidently, I went with a non-immediate LEAVE. It was easier to implement. 15:43:09 normally I'd suggest testing the cpu flags, but I'm assuming you're in C. 15:43:10 And it handles all the nesting conditions. 15:43:15 Correct. 15:43:39 yes, a non-immediate leave will do that, but it's more expensive at run-time. 15:44:03 True. But only when (leave) is executed, and how often is that, compared to words like dup, swap, drop, etc? 15:45:17 Actually, as mine goes, it's not even all that expensive. Basically 4 stack pops, a dereference, and a push. 15:45:25 If it were hugely more difficult to do it at compile-time, I'd buy into the argument that it might not be worth bothering, but it's not that tough and it's then a win for customer. 15:45:44 plus you'd learn how. :) 15:46:16 heh 15:47:15 your particular Forth doesn't have run-time speed as a design requirement, as far as I can tell, so it'd come down to you learning how, which is as good a reason as any. 15:47:45 True, run-time speed is not a requirement. 15:47:58 I wonder if I have enough infrastructure in place to run any of the benchmarks. 15:49:15 The most obvious improvement at this time is to keep the top of stack in a "register". I thought about that at design time (all 3 seconds worth), but elected not to do that. 15:49:27 there's a kind of neat way of tracking the list of LEAVEs, actually, so if you're interested we can go over it at some point. 15:49:59 I'd like to hear the theory, definitely. As to whether I'll change what is now a working implementation... The odds are low of that. 15:50:02 hmm, why not? Though register is just a suggestion to the compiler, in C. 15:50:53 Well, in this case, the top of stack would be a global struct, so when I needed the TOS, I wouldn't have to pop it. Because of the type, it's not capable of being a true register. 15:50:55 well, that's up to you. My practice is to build a working implementation as reference, and then refine it to the best available technique thereafter. 15:51:16 oh, right. Typed. 15:51:42 so your system will run glacially regardless. 15:51:43 At some point, I really need to stop tinkering with the interpreter and actually write the application it's intended to be used for. 15:52:16 I'd like to benchmark mine against gforth and see if they even in the same ballpark. 15:52:59 I think yours will be in parking lot JJ, level 7, the day after the last game of the season. :) 15:54:06 uh huh 15:55:33 an unavoidable consequence of your design choices. As I say, if speed isn't a criterion, it's not. 15:56:27 I think before you go summarily writing it off, we need to see some numbers. 15:57:12 have you got enough in there to run fibonnaci, or the sieve of eras. bench? 15:57:23 Dunno. Point me at one, let's find out. 15:57:45 gforth has'em as far as I recall. 15:58:35 Don't have RECURSIVE 15:59:27 You mean RECURSE ? 15:59:41 No. 15:59:49 \ compute fibonacci numbers 15:59:49 : fib recursive 15:59:49 dup 2 < 15:59:49 if 16:00:09 where did you pull that from? 16:00:17 http://dada.perl.it/shootout/fibo.gforth.html 16:00:34 For some non-standard Forth. 16:01:22 I don't recall gforth having that. RECURSE is all you need, anyway. 16:02:02 http://ftp.complang.tuwien.ac.at/forth/gforth/Docs-html/Calls-and-returns.html 16:02:59 at a guess, 'recursive' would make the current word under construction visible by name. RECURSE is the standard word, and easy to write. 16:03:46 : recurse last ( or latest ) @ , ; immediate 16:04:23 my comment on that in isforth is \ foot in self shoot 16:04:24 heh 16:06:45 k4jcw, there's a fib.fs in my gforth directory, makes no use of 'recursive', just 'recurse. 16:06:50 'recurse', rather. 16:09:00 recursive fib is horrible 16:09:13 : fid rot 1 0 1 do tuck + loop nip ; 16:09:17 erm no 16:09:20 0 1 rot 1 do 16:09:26 i think lol i forget 16:09:35 0 1 rot 1 do tuck + loop nip 16:09:46 erm no let me look 16:09:47 I disagree with the comments in that link about 'recursive' being somehow more clear than 'recurse'. 'recursive' takes some passive action on the current definition, and can clearly be stuck anywhere in the word's definition ahead of the first use of the word. Takes no actual action except to do a reveal on the current header. And in the future, if you change the word's name, you have to go into it and change the 16:10:11 yea 0 1 rot 1 do ... 16:10:21 RECURSE says 'call the current word now, damn it'. None of this namby-pamby 'make this vaguely recursive in some way' stuff. :) 16:10:33 exactly 16:10:39 but i do not like recursion EVER 16:10:49 i think that anything you can do with it can be done better without 16:11:08 Well, I know every time I need to calculate the fibonacci sequence, I .. hang on... I've NEVER NEEDED TO DO THAT. :) It makes a pretty good benchmark though. 16:11:26 ya and benchmarking is kinda pointless lol 16:11:48 I can think of a number of uses for benchmarking. 16:12:07 only if your benchmarking your own code and a candidate replacement for it 16:12:19 comparing your machine to mine is ghey lol 16:12:24 That. Comparison of compilers on the same platform, too. 16:12:36 Comparison of algorithms. 16:12:48 yes THAT is the valid 16:12:55 So that's three uses right there. 16:12:57 you go ahead and run ONE quicksort on 348965287346952873468972 items 16:13:18 and ill do it 90 million times in the same time with radix counting (assuming i got the memory :) 16:13:59 Where is your gforth directory? 16:14:01 I once optimized a sort in a chess program, found out that bubblesort was hands-down fastest for the list of ten items I needed to sort. 16:14:24 That's often the case. 16:14:33 quartus a shuttle sort would have maybe done better 16:14:41 shuttle is like one minor step up from bubble 16:14:42 Depends on the data, where it's stored, and what type of comparisons. 16:14:59 You can read all about it in the Knuth books. 16:15:04 Certainly none of the library sorts beat it. I think second-runner-up was a hardwired sort (there's a name for that, network sort maybe? I'd have to look it up). 16:15:06 and how pre sorted it is 16:15:12 i like heap sort 16:15:33 I like letting the SQL server do it. 16:15:43 Benchmarking was critical in discovering that hashtable sizes didn't need to be prime-sized, too. Many uses, these benchmarks have. :) 16:15:55 k4jcw, where's my gforth directory? Right here on my harddrive. :) 16:16:14 arr arr arr. Are all you Canadians such comedians? 16:16:18 Or just in the winter months? 16:16:24 Only when the questions are this funny. What do you mean? 16:16:39 You said you had a fib bench. 16:16:42 Yeah. 16:16:44 I was presuming it was somewhere I could get it. 16:16:44 Comes with gforth. 16:16:48 Do you have gforth? 16:16:55 Yes. 16:17:00 Should be right there. 16:17:17 Gah. Let's play "Guess where this package puts the files nobody ever looks at". 16:17:45 http://pastebin.ca/115934 16:17:45 isforth has 3 versions of fib - the one i quoted i came up with 16:18:06 the recursive fib function recurses on itself one hundred and thirteen million times to calculate the 40th fib 16:18:23 '34 fib' should be a reasonable bench. 16:19:30 utime main utime .s drop nip swap - . ==== 1621233 16:19:36 (the seconds value did not change). 16:19:40 That's for gforth 16:20:17 Ok. 16:21:03 This mostly tests the speed of the nest/unnest mechanism. 16:21:15 Mine... takes longer. Right at 10 seconds. 16:21:23 --- quit: Quartus_ ("jmIrc destroyed by the OS") 16:21:34 thers a better one for that 16:21:36 So five times slower at least. 16:21:39 : x0 noop ; 16:21:46 : x1 x0 x0 ; 16:21:52 : x2 x1 x1 ; 16:21:58 : x3 x2 x2 ; 16:21:59 I sense a binary progression. 16:22:02 take that all the way up to x20 16:22:06 k4jcw, try gforth-fast on your platform. 16:22:44 1387740 16:22:49 .3 seconds faster. 16:23:07 Quartus: my reciept of your entry about RECURSIVE above was truncated because of length. I didn't get to read it all. :( 16:23:18 --- nick: nanstm -> Raystm2 16:23:25 'recursive' takes some passive action on the current definition, and can clearly be stuck anywhere in the word's definition ahead of the first use of the word. 16:23:33 Takes no actual action except to do a reveal on the current header. 16:23:39 And in the future, if you change the word's name, you have to go into it and change the references to it as well. 16:24:28 I'd add that it's confusing in that it doesn't make the word recursive in any way. It makes it able to call itself by name, which enables recursion, but doesn't cause it. 16:24:38 Now, I could inline all my stack accessors. That would probably have a little impact. 16:24:47 You're very kind to accomodate. 16:25:05 k4jcw, looks like you're at about 6X from my calculation. 16:25:16 I'll be surprised if you can break 5X. 16:25:38 The Sieve is a more comprehensive benchmark. Worth a try. 16:28:21 I can't wait to try all of those algo's soon. 16:28:40 http://pastebin.ca/115942 16:29:39 2649000 on this old crate for that code under gforth. gforth-fast gives 1924000. 16:31:40 very cool. 16:32:05 I can only ever use gforth-fast for some still unknown reason. 16:32:17 Odd. Latest gforth? 16:32:37 Well, ya know, I havn't checked in a while... 16:32:45 I should prob'ly update. 16:33:18 0.6.2? 16:33:20 * Raystm2 googles 16:33:59 ya latest. 16:34:24 You know, I don't think Bernd has updated in a while, maybe years even. 16:35:16 k4jcw, ready for the loop test algorithm? 16:35:35 Raystm2, I don't know about Bernd, but 0.6.2 has a last-august date on it here. 16:36:19 Do you get to use a first name if you've never met the person? If so, It's all a Krok, Ray Krok that is. He made it happen when all McDonalds employees were asked to use only first names. Spread from there. Or that's the myth. 16:36:41 That's not what Mr. McDonald told me. 16:36:47 HEHE 16:38:53 Here's the algorithm, in case you scroll back, anyway: Compute index minus limit. Store as a. Copy a to b. Increment b by the loop index. If signs of a and b differ, you're done. 16:44:36 HA 16:44:51 I inlined everything, and now it takes 6.8 seconds. 16:45:50 good evening 16:46:01 k4jcw, so you're at 5x. 16:46:20 6.078 with march=athlon-xp -O3 -fomit-frame-pointer 16:46:20 Hi crc. 16:46:46 Try 4.6x now. 16:46:50 You owe me a beer. 16:46:59 You're still in parking lot JJ, k4jcw, but don't feel too badly; you've got a typed, token-threaded Forth written in C. 16:47:24 And 90% of the functionality was working in the first 12 hours. 16:47:25 and it's about 5x slower than gforth? 16:47:28 is that what that number is? 16:47:32 Yes. 16:47:32 No way, pal -- recompile gforth with march=athlon-xp -O3 -fomit-frame-pointer and we'll talk. :) 16:47:34 tathi, yes 16:47:40 Actually, it already is. 16:47:45 that's not bad at all 16:47:58 That's just the fib benchmark, tathi. 16:48:10 Nesting and unnesting. 16:48:40 yeah, I got that 16:48:56 hi crc 16:48:57 Curious about the sieve. 16:48:58 hi tathi 16:49:04 Getting ready to try it. 16:49:04 hi k4jcw 16:49:23 Not to rain on your 4.6x, k4jcw, but gforth is no speed-demon itself. It is written in C, though, so it's some variety of apples-to-apples I guess. 16:49:54 Perhaps not, but I feel gratified that it's not totally out in the weeds. 16:50:04 I don't know if it does inlining. There are optimizers in there but I've never dug into what they do. 16:50:07 It's definitely faster than eForth on a 11.5926Mhz 8051. 16:52:58 As far as speed-optimized Forths go, gforth is already itself out in the weeds; you're only 4.6 times further out into them than it is. :) 16:53:28 well, for the fib, anyway. 17:00:43 --- quit: I440r (Read error: 110 (Connection timed out)) 17:01:25 gforth took 2.276, mine took 10.192 17:01:28 --- join: I440r (n=mark4@24-177-235-246.dhcp.gnvl.sc.charter.com) joined #forth 17:01:39 4.47x 17:02:50 Same code? 17:03:14 And is that gforth, or gforth-fast? 17:03:28 The code I ran under gforth was the same source I fed mine. 17:03:32 And gfroth-fast. 17:04:31 So just over 4.5x on average for the two benches. 17:04:36 Yea 17:05:36 Those two don't exercise much of the system, but it gives you a vague idea. I'd guess that gforth-fast is about as fast as a portable C implementation of Forth can get without delving into assembler. 17:05:41 With my standard build (no inlines, no march=, no fomit), the sieve takes 18 seconds. 17:06:31 fomit accounts for 2.7 seconds of that 18. 17:06:44 Guessing the aggressive inlining accounts for much of the rest. 17:06:53 Fixing to see 17:07:17 -O2 to -O3 with fomit shaves another .2 seconds off 17:07:37 Inlining is always a win, especially when the inlined sequences are as short or shorter than a call would be (speaking in STC terms, of course). 17:08:07 Going to march=athlon-xp is good for .5 seconds. 17:08:14 But I think you're talking about inlining the C functions, right? 17:08:22 So all optimizations on, except inlining, I get 14.603 17:08:26 Yes. 17:08:47 Ok. I was talking about inlining the code sequences in the compiled Forth. 17:08:57 Ah 17:09:13 My dogs are getting angry. Feeding time was 7. 17:09:19 So the C inlining is the biggest win for you there. Interesting. 17:10:17 Feed the dogs. Let me know if that loop-termination test algorithm I posted above works for you. 17:27:13 Correction: Compute index minus limit. Store as a. Copy a to b. Add the loop increment to b. If signs of a and b differ, you're done. 17:35:30 It seems to be going to the limit, instead of the limit - 1 17:35:48 : foo 10 0 ?do i . cr loop ; is pring 0..10 instead of 0..9 17:36:07 Check your code. That algorithm should be sound, it's tested. 17:36:15 Do check the corrected version I just posted. :) 17:39:24 I just ran a quick test in C against the parameters in your test, it triggers at 9 here. I can paste it if you want it. 17:39:52 Yea. Make sure I didn't misunderstand you. 17:40:27 http://pastebin.ca/116000 17:43:40 Interesting. I was checking for sign differences with (a ^ b) & 0x80000000. Which should work. 17:44:30 That's a simple sgn I threw in there, but #define sgn(x) (x & 0x80000000) is a drop-in that works fine for this code. 17:44:47 Avoids a bunch extra code gcc throws in to make the flags regular. 17:44:54 Yea 17:45:59 But the second sgn() breaks it. 17:46:10 For what it's worth, (a^b)&0x80000000 works fine in my test here. 17:46:16 Breaks what? 17:46:24 Goes 0..11 instead of 0..1 17:46:26 er, 0..10 17:46:40 I'll re-check. 17:47:01 10 PRINT"MADGARDEN IS COOL!" 17:47:01 20 GOTO10 17:47:08 Woops, wrong window. 17:47:13 I was gonna say... 17:47:15 ;) 17:47:19 I think you just demonstrated that you're not :) 17:47:23 You want the RadioShack window from 1980, madgarden. :) 17:47:32 Heh! Indeed I do. 17:48:11 (a^b) & 0x80000000 triggers at 9; it's working. 17:48:43 Second sgn() I posted, (x & 0x80000000) triggers at 9; it's working too. 17:49:16 First sgn() I posted, (x>0)-(x<0) 17:49:21 Is also working. Triggers at 9. 17:49:41 Yes. The first one works. The second (x & 0x8...) doesn't 17:49:47 Does. Using it here right now. 17:50:29 Doesn't! 17:50:45 New paste on the way. 17:51:08 http://pastebin.ca/116007 17:51:08 You on a x86 box? 17:51:11 Yup. 17:51:25 : basic 10 come-from ." Madgarden is cool!" 20 come-from 10 go-to ; 17:51:34 That should cough up 0 0 1 0. 17:52:05 ayrnieu, :) 17:52:07 Perhaps you're working with unsigned longs? 17:52:15 What forth does that work in? 17:53:41 madgarden - it doesn't. 17:54:11 k4jcw, or worse -- floats? 17:54:16 uh, no. 17:54:18 ints. 17:54:27 madgarden - but you could probably implement it simply enough, with immediate words using BEGIN and AGAIN and a forth-particular data structure. 17:54:28 Did you try the code I pasted? 17:54:38 Yes, it works properly. 17:54:44 Ok. That's the second sgn. 17:55:08 I'm surprised gcc at -O3 generates such lousy code for the first, more readable sgn. 17:55:41 ayrnieu, hmm. 17:56:47 Or, the come-from could compile a temporary table entry, matching label to address, looking it up on go-to. 17:57:05 Even #define sgn(x) ((x & 0x80000000) >> 31) generates better code, and valid flags. 17:57:11 madgarden - that's what I said, except I said 'forth-specific data structure' instead of 'compile a temporary table entry' 17:57:57 madgarden - actually, a Forth does exist that does something like this -- without the label-number generality. 18:00:56 H3sm , by Rick Hohensee. It had (0) (1) (2) (3) (4) and ->0 ->1 ->2 etc, as I recall. 18:01:21 so, : (0) 0 postpone come-from ; immediate : ->0 0 postpone go-to ; immediate 18:02:10 D'oh. I had limit - index backwards, due to stack indexing. Interesting that it worked with the one sgn(), but not the other. 18:02:36 Also, I don't really care for the 0x8..., as that's very non-portable. There should be some macros in limits.h that make that more accessible. 18:03:05 I'd stick with the first sgn, except that it generates lousy code under GCC. 18:03:56 0x800... should be able to be replaced with ~INT_MAX 18:04:59 ayrnieu, yes, you did. I don't listen very well. ;) 18:05:11 And there is __WORDSIZE is 32, so the 32 can be replaced. 18:05:22 What 32? 18:05:31 31, rather. 18:05:34 __WORDSIZE - 1 18:05:47 oh, in that last sgn. 18:05:47 Still assumes the sign is stored in the high bit, but I think we can let that slide. 18:06:07 I wonder why gcc feels hell-bent to clean up all the flags when they don't leave the confines of the function. 18:10:43 I don't pretend to be a C language-lawyer, but maybe sizeof(long)*8 gets you something moderately portable. 18:11:23 You don't need valid flags in that code, anyway, just any method of determining if signs differ. 18:15:56 return (signbit(index-limit)^signbit(index-limit+increment)); with a suitable signbit() forces gcc to make code that's as good as any other I've been able to squeeze out of it in this little effort. 18:16:54 I've always thought it best to write naive code and let gcc's much-lauded optimizer figure out the best road to Rome, but here's a trivial example where it does a poor job of that. 18:23:55 --- join: jcw (n=jcw@adsl-065-006-151-062.sip.asm.bellsouth.net) joined #forth 18:24:50 return ((index-limit)^(index-limit+increment)) & 0x80000000; 18:24:58 That's the best I've been able to coerce yet. 18:25:11 --- quit: k4jcw (Read error: 113 (No route to host)) 18:25:19 What's the last thing I said that got through? 18:25:21 Six instructions + ret. 18:25:30 Still assumes the sign is stored in the high bit, but I think we can let that slide. 18:25:43 #define sgn(x) ((x & ~INT_MAX) >> (__WORDSIZE - 1)) 18:25:44 really, x should be (x) 18:25:44 Because C macros are truly teh evil. 18:25:44 Incidently, the difference in size between the inlined and non-inlined is 76392 non, 102868 inlined. 18:25:44 26K 18:25:54 OK. 18:26:07 Yes, I figured out the (x) thing. Thought it'd be easier to show the code without the macro def. 18:26:13 1; 18:29:38 So there you go. Six x86 instructions to handle all permutations of signed and unsigned loops, with any loop increment. 18:29:47 Pretty slick. 18:30:54 There may be some craftier way involving cpu flags, but not anything you can do without dropping into asm, I think. 18:32:07 What were the six instructions you wound up with? 18:33:48 http://pastebin.ca/116047 18:34:35 They're crazy. The default lifetime is forever? 18:39:24 http://pastebin.ca/116050 18:40:17 Interesting 18:42:59 Is GOTO *really* so bad? 18:43:20 Depends on how you use it. But as a rule, yes. 18:43:49 It's not as bad as, say, Patrick Swayze's Road House. 18:44:07 madgarden - no, GOTO in itself means little. The programming methodology that coincided with it, however, is universally and rightfully reviled. 18:44:25 That's the problem right there. 18:44:34 What was that other horrid movie, with the girls who worked at country bar? 18:44:47 Coyote Ugly, I believe. I avoided it. 18:44:54 I think GOTO perfectly suites line-numbered code. 18:44:55 One could argue that in assembly, GOTO (jmp) is used quite frequently. 18:44:58 It's rather easy to follow. 18:45:11 jcw, yes of course... no program would operate without it. 18:46:02 Line numbers are a Fortran curse that was perpetuated in BASIC, which is a Fortran dialect. 18:46:12 madgarden - which has nothing to do with having humans program in terms of it. 18:46:13 Yes, that's it. Coyote Ugly. Never saw it, but it looks bad. 18:47:22 You appreciate Fortran line numbers a lot more, the first time a stoned operator drops your card deck on the floor. 18:47:47 you could also disappreciate stoned operators, and card decks, and floors, and Fortran :-) 18:48:02 I'd have to get to where I appreciated Fortran in some way before I cleared that second hurdle. 18:49:01 We look back and sneer now at antiquated languages like Fortran and COBOL, sure. But ever wonder where we'd be without them? 18:49:19 Further ahead. 18:49:26 Or no computers at all. 18:49:36 Which may be what you were implying. 18:50:12 jcw - I don't wonder that, which A) inspires no guilt in me, and B) inspires no guiltful fondness for Fortran or COBOL. 18:50:25 Further ahead. Those early clankers took hold due to accidents of history and other similar factors, not because they were best-of-breed. All spilled milk at this point. 18:50:59 You may as well criticize us for not appreciating the early European's incredibly disgusting cities, because without them the Europeans wouldn't been quite so diseased and horrible when they set out to conquer the rest of the world. 18:52:13 I doubt that, Quartus. I doubt very many languages were created in a vacuum. They've all taken concepts from early languages and architectures. It's evolutionary. 18:52:39 Sort of like saying if we'd skipped the interal combustion engine, and got straight to fusion power plants. 18:53:11 it's the priviledge of the fusion-powered future to sneer on the oil-powered present. 18:53:21 The history of early computer languages isn't quite that simple or straightforward; there were a great many factors involved. There's some traceable lineage, to be sure, but it's not all about that. 18:53:32 I agree. 18:54:22 My point is simply that I don't agree that we'd be all that much further ahead if Fortran simply hadn't existed. 18:54:36 And now we have the pinnacle of technology... XML. Oh, and SOAP. 18:55:08 Now, you want to talk about technologies that actually retarded development, let's talk about the PC, and the 640K/1M barrier, with segmented address spaces. 18:55:17 If the first compiler were written for a better language than Fortran, one without its horribly awkward quirks, it seems clear to me we'd be substantially further ahead, though the argument is well in the pointless category. 18:56:38 One or two space missions might have succeeded where Fortran killed'em, too. 18:56:56 jcw - there's little reason to strongly believe anything about this. It's much easier to observe what actually happened, to have some idea about how it happened, and then again to focus more on what is happening /now/. 18:58:03 for things that are happening now, I discovered two days ago that Windows -- undear, barren windows -- has for a while now come with a decent and useful programming language: JavaScript. 18:58:17 You just lost all credibility. 18:58:26 For certain small values of 'useful' and 'decent'. 18:58:45 For decent values of 'decent', and for domain-limited but not terribly bounded values of 'useful'. 18:58:57 That'd depend on your crietera. 18:59:20 jcw - why? Because I've overlooked VBScript, or whatever hellish halfsystems that windows already came with? 18:59:29 Of course, some people claim that BrainF**k is a useful programming language, too. 18:59:34 Quartus - no, that wouldn't. 19:00:28 No. Because I've written a fairly substantial amount of JavaScript. And it's not terribly useful, except in a very limited environment, with a very limited set of functionality. 19:01:03 jcw - why have I lost all credibility? Because I made the fairly inarguable assertion that I believed windows machines to come with (and therefore have, whenever some foreign bureaucracy provides a windows machine) no programming languages? And then to assert that I've discovered that all windows machines actually have one? 19:01:19 --- quit: vatic ("Chatzilla 0.9.71 [Firefox 1.5.0.6/2006072814]") 19:01:35 It was the "decent and useful" part that did you in. 19:01:45 No, because you asserted that JavaScript is useful and decent. You went on to say that neither of those were subjective. 19:01:56 The distance from /no programming language/ to /JavaScript/ is unspeakably, horrifingly huge. From here to Mars and back again. From unlife to a small mammal. 19:02:26 jcw - would you say that JavaScript is more useful than 'no programming language'? 19:02:54 Quartus - no, jcw certainly didn't taunt my credibility based on that future evident. Please keep up with the causality. 19:03:14 Think I'm following along just fine. 19:03:23 It also depends on your criteria for a "programming languagte". The reality is that Windows still comes with debug, that allows you enter assembly mnemonics. You can even save your source, and redirect it as input. Now, you have limited functionality, but your ultimate power is unlimited, because with that simple too, you can BUILD anything. 19:03:28 well, stop observably failing to keep up, then. 19:03:31 But it's not C, not Perl, and not even Java. 19:04:26 jcw - no, it's not. I've still -- in two days -- gotten a great deal of use out of it. 19:05:17 ayrnieu, if you want to go all ad-hominem, go back and read what I wrote. I said that "[jcw said you had lost all credibility] because you asserted that JavaScript is useful and decent." I went on to say "You went on to say that neither of those were subjective." I didn't attribute jcw's comment to the latter sentence. 19:06:54 Quartus - OK, I took your "That'd depend on your crietera." as referring to my "For decent values of 'decent', and for domain-limited but not terribly bounded values of 'useful'." and then again that your next remark meant to rebuke my response. 19:07:16 --- quit: uiuiuiu (Remote closed the connection) 19:07:18 --- join: uiuiuiu (i=ian@dslb-084-056-227-051.pools.arcor-ip.net) joined #forth 19:08:47 still, "windows machines inherently have a decent and useful programming language", even if it still lacks a decent development environment or even a decent /text editor/, is something that is happening now. 19:09:15 JavaScript is widely considered deeply broken from the design on up to the lack of an independent standard implementation across browsers, and the lack of a rigid specification that a given implementation can be tested against. 19:09:17 Also, Windows doesn't come with JavaScript, it comes with JScript. There is significant difference, in that JavaScript only runs in browers, while JScript is part of the Active Scripting junk. 19:10:02 jcw - Windows comes with IE. 19:10:09 --- join: Shain (i=steve@c-67-161-56-76.hsd1.ca.comcast.net) joined #forth 19:11:15 I think we all know that. 19:11:27 And most of us regret it. 19:11:29 jcw - great, but did 19:11:59 I don't seem to be able to determine if JScript is capable of reading or writing files. 19:12:00 yeesh, I need to get dvorak on this keyboard. Madness to have ^J next to ^H 19:14:28 jcw - I don't think JavaScript (which you say differs from JScript in that the former doesn't-come-with-windows-and-only-runs-in-browsers-such-as-what-IE?) can read or write files, no. Part of the domain limitation; still, it's enough to mark smart documents, to perform some mechanical editing, and to write memorization drills. 19:14:47 to make smart documents. 19:15:31 Perhaps it's on the resource CD, but I thought Win2K and XP came with REXX. 19:15:57 No rexx in Win2K that I'm aware of. 19:15:58 well, it's a good thing that windows ever existed, because I can't possibly think that we'd be at all ahead in the computer game without it :-) 19:16:09 I haven't seen built-in rexx since OS/2. 19:16:13 I like Win2K. 19:16:17 It must be on the resource CD, then. 19:16:32 I did a vast amount of work in rexx quite a few years ago. 19:16:34 There's also a very early port of Perl. 19:18:01 I wrote some very trivial REXX scripts a number of years ago, but certainly not enough to form a real opinion about REXX. 19:19:35 It has some interesting features. 19:20:18 * ayrnieu has somehow classed REXX with awk. 19:21:23 awk is a very handy thing. 19:21:30 Interesting the number of machines it's been ported to. 19:24:03 Rexx has arbitrary precision arithmetic, typeless variables, variables with stems (these double as arrays), exception handling, an INTERPRET command; few other bits and pieces. 19:25:39 --- nick: saon -> TeX_programmer 19:30:21 --- nick: TeX_programmer -> saon 19:30:58 This is ludicrous. Someone finds a cooler on the sidewalk, and they call the bomb squad. 19:31:23 Turns out to have had a homeless persons clothes, some trash, and alcohol containers. 19:31:41 Like downtown po-dunk Gainesville is a terrorist target... 19:34:52 --- join: nighty_ (n=nighty@CPE00119576a9c5-CM0012c90d36fc.cpe.net.cable.rogers.com) joined #forth 19:36:47 ayrnieu, without Windows we'd likely be using Commodores, running some evolotion of GEOS or AmigaOS. 19:36:56 I'd rather be living in that alternate reality, TBH. :) 19:37:15 Especially the AmigaOS. That machine had so much potential. 19:37:29 Yes, and the OS fit on a damned floppy. 19:37:45 Granted, there were also ROMs involved, but still. It's a good setup. 19:38:07 Not to mention if you actually wanted to DO anything after you booted the OS, you spent a lot of time swapping diskettes. 19:38:20 Yes, but what were Windows machines doing then? :) 19:38:29 Booting from 5MB HDs. 19:38:40 Amigas had HD's as well. 19:38:46 I just never had one myself. 19:39:01 Anyway, it would have evolved nicely from there. 19:39:24 I'm trying to remember the exact timeline when I had my A1000 with dual flops, but I'm pretty sure my PC had a 67MB MFM drive at that time. 19:39:31 And the HDs for Amigas were expensive. 19:39:36 Way more expensive than PCs. 19:40:53 I remember going to the video/PC rental store and renting just about everything they ever got for the Amiga, and making copies of it. 19:41:53 Oh yea, and remember that the diskettes were 880K. The PCs were still at 720K at the time, IIRC. 19:42:58 I must have gotten mine somewhere near the end of '85 or early '86. 19:43:13 I just want a 3GHz C64... is that too much to ask? 19:43:40 heh 19:43:52 I think I have a Forth cart for a C64. 19:45:04 There were a few. 19:45:13 I never had any as a kid, wish I had. 19:45:29 But I have since played with Blazin' Forth for the C64, and it's one of my favorite Forths. 19:47:41 I don't know which one I have. I think has a green label. I had a C64 that turned out to be non-functional. I put it up on eBay for $0.99 (plus shipping), and had no takers. Had a joystick, a disk drive, and a printer interface. I ended up tearing it down, and pulling out the socketted chips. Turns out the SID chip is worth the most, at somewhere around $20. Surprised no one bought it just for that. 19:48:42 Yes, the mighty SID. :) 19:56:11 madgarden - why do you like that forth so much? 19:56:32 ayrnieu, it's fun. :) 19:56:51 madgarden - also, I don't seriously care about the implications of windows not having existed. That's a poke at an earlier conversation. 19:56:52 And the way he does things is a lot like how I'd have done it. 19:57:12 ayrnieu, I don't care about the earlier conversation. You guys argue too much. :) 19:57:21 well, how does it differ from modern forths? 19:57:26 I'd have liked to be using Commodore now, though. 19:58:03 Well, it's based on F83, but has C64-specific extras such as words for sound, sprites, turtle graphics, and nice little debugging tools and string words. 19:58:09 Just a nice little accessible package. 19:59:11 ftp://ftp.forth.org/pub/Forth/Compilers/native/misc/commodore64/blazinforth.doc 19:59:23 It's actually a text file. 20:00:14 The D64 should be there as well. 20:00:42 Compuserve: 70066,603 Heh. Compuserve IDs. I had forgotten about those. 20:00:59 I plan to take my Forth VM and make a fun, interactive C64-like environment. 20:01:58 One Forth think I have NEVER liked (and probably actually slowed me down from doing more Forth projects) are blocks. 20:02:05 I *despise* blocks. 20:02:57 I've quite liked blocks in the context of Pygmy and Enth/Flux. 20:03:40 Up until recently I had a HP LX-200 with Pygmy on it. I tinkered around, but never did anything with it. 20:03:51 The LX-200 is fun, but the screen is too small. 20:08:36 The argument for blocks is that they are simple, work, and are good enough. 20:09:03 ayrnieu, can you describe? 20:11:54 madgarden - describe what? Pygmy and Enth/Flux? 20:12:25 Yes, and the endearing aspect of their usage of blocks. 20:17:28 it is more that they offer complete environments with good block editors and support. You would have to work at it to get file support in either system -- the reverse of handling blocks in most other forths that I use. 20:18:06 Ahh. 20:18:26 I'll have to check them out. 20:19:03 so, when this is the path of least resistance, and when the system already has useful bits in blocks, I did not resent the system for not giving me files. 20:19:28 (if I sound strange, I have lost use of quotes to my IME) 21:11:39 --- quit: nighty_ (Client Quit) 21:12:00 --- join: nighty_ (n=nighty@CPE00119576a9c5-CM0012c90d36fc.cpe.net.cable.rogers.com) joined #forth 22:49:50 --- quit: nighty_ (Read error: 104 (Connection reset by peer)) 22:59:14 --- join: nighty_ (n=nighty@CPE00119576a9c5-CM0012c90d36fc.cpe.net.cable.rogers.com) joined #forth 23:15:17 --- join: nighty__ (n=nighty@CPE00119576a9c5-CM0012c90d36fc.cpe.net.cable.rogers.com) joined #forth 23:15:24 --- quit: nighty_ (Read error: 104 (Connection reset by peer)) 23:23:49 --- quit: segher (Read error: 60 (Operation timed out)) 23:24:52 --- join: segher (n=segher@dslb-084-056-155-088.pools.arcor-ip.net) joined #forth 23:31:33 --- quit: nighty__ (Read error: 104 (Connection reset by peer)) 23:31:37 --- join: nighty_ (n=nighty@CPE00119576a9c5-CM0012c90d36fc.cpe.net.cable.rogers.com) joined #forth 23:59:59 --- log: ended forth/06.08.04