00:00:00 --- log: started forth/06.08.10 00:07:55 Still there Raystm2? 00:09:50 Don't know why I had it in mind that tester.fs is based around EVALUATE; it isn't. I just built a tester.fs-alike for rf, it's here: http://pastebin.ca/124767 00:13:38 Minor update: http://pastebin.ca/124774 00:39:03 a revision: http://pastebin.ca/124825 00:39:11 (discovered that ?dup in the rf ans stuff was broken) 00:47:02 Oddly the ?dup in the rf ans stuff looks ok, seems to work at the prompt, but behaved oddly in use. I have a clumsy one in there now. : ?dup dup if dup then ; is a bit better. 00:50:09 --- join: virsys (n=virsys@or-71-53-74-48.dhcp.embarqhsd.net) joined #forth 00:55:05 --- quit: juri_ (Read error: 110 (Connection timed out)) 00:57:23 Last one for tonight, minor mod. http://pastebin.ca/124837 01:06:33 --- quit: Raystm2 (Read error: 131 (Connection reset by peer)) 01:09:56 --- join: Raystm2 (n=NanRay@adsl-69-149-58-109.dsl.rcsntx.swbell.net) joined #forth 01:10:02 --- quit: virsys (Remote closed the connection) 01:14:56 Raystm2 -- http://pastebin.ca/124837 03:52:09 --- join: vatic (n=chatzill@pool-162-83-254-201.ny5030.east.verizon.net) joined #forth 04:16:24 * madgarden pulls the pin. 04:18:27 --- join: PoppaVic (n=pete@0-1pool72-79.nas24.chicago4.il.us.da.qwest.net) joined #forth 04:24:26 --- join: virsys (n=virsys@or-71-53-74-48.dhcp.embarqhsd.net) joined #forth 04:37:36 --- quit: vatic (Remote closed the connection) 05:59:54 --- join: madwork (n=foo@derby.metrics.com) joined #forth 06:38:10 --- join: Ray_work (n=Raystm2@199.227.227.26) joined #forth 06:55:15 --- join: vatic (n=chatzill@pool-162-83-254-201.ny5030.east.verizon.net) joined #forth 07:02:07 --- quit: k4jcw (Remote closed the connection) 07:04:58 --- join: k4jcw (n=jcw@adsl-065-006-151-062.sip.asm.bellsouth.net) joined #forth 07:16:26 --- quit: PoppaVic ("Pulls the pin...") 07:17:59 --- join: PoppaVic (n=pete@0-1pool46-58.nas30.chicago4.il.us.da.qwest.net) joined #forth 07:25:07 --- join: nighty (n=nighty@66-163-28-100.ip.tor.radiant.net) joined #forth 08:03:01 I've implemented (maybe even correctly...) catch/throw, but I don't know how to use them. 08:03:11 Anyone got a very simple test case for catch/throw? 08:12:16 --- quit: PoppaVic ("Pulls the pin...") 08:20:06 k4jcw: would this be of use? http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Exception-Handling.html#Exception%20Handling 08:22:15 hmmm, a little. I'd like a more concrete example. 09:02:43 Well, ['] foo catch should be exactly like ['] foo execute, but leave a zero on the stack. 09:03:26 ['] foo execute that is 09:03:30 (no comma) 09:04:33 Any THROW inside foo, or a word FOO calls, will result in a return to the CATCH, leaving the value passed to THROW on the stack. 09:05:17 So : foo 42 throw ; : bar ['] foo catch . ; bar will display 42. 09:07:05 Likewise : gah 42 throw ; : foo gah ; : bar ['] foo catch . ; bar will also display 42 (the depth of the THROW is irrelevant, it's a non-local return). 09:14:09 0 THROW is a null operation. 09:37:54 Hopefully that's of some help. 09:38:07 Yes. Thank you. 09:38:42 The stack depth is also rolled back to where it was at the time of CATCH, though no guarantee is made of the stack contents being entirely unchanged. 09:39:23 You've confirmed most of how I suspected it operated, with the exception of the 0 THROW 09:41:33 That allows this sort of thing: 09:41:34 : / dup 0= -10 and throw / ; 09:41:46 This throws a -10 (division by zero) only if the divisor is zero. 09:42:28 You'll need a default handler, probably established by QUIT, to catch THROWs when there's no CATCH. 09:42:47 You could build that into THROW instead. 09:43:03 Yah. If the handler is NULL just skip it. 09:43:15 I wouldn't skip it. I'd report it. 09:43:24 ah 09:43:33 : foo -10 throw ; foo should report a -10 exception. 09:45:38 Likewise : / dup 0= -10 and throw / ; 1 0 / should do the same. 09:47:03 Of course you can display text strings for exceptions, which is always helpful. You can add your own exception code to let your users know when they've done something that's specifically wrong in the context of your compiler. 09:47:12 er, exception codes, I mean. With text strings. 09:51:48 Handlers are chained, as well. 09:55:21 THROW always returns to the most recent handler. If that handler doesn't want to deal with the THROW, it can re-THROW it to the next-highest handler in the chain. 10:07:39 --- quit: vatic ("*poof*") 10:51:04 --- quit: virsys (Remote closed the connection) 11:18:32 OK, so 0 THROW just consumes the 0 and continues on, right? 11:23:01 --- join: Quartus__ (n=Quartus_@209.167.5.1) joined #forth 11:24:22 I'll repeat that, since I don't know if you're doing a rejoin or what. 11:24:23 OK, so 0 THROW just consumes the 0 and continues on, right? 11:39:52 right. 11:40:13 I'm mobile. 11:41:05 OK, looks like my catch/throw implementation is working. 11:41:41 Maybe I'll implement try/recover/endtry 11:45:01 I built that on top of catch/throw once, but never used it. Catch/throw suffices. 11:47:18 --- quit: Quartus__ ("used jmIrc") 11:48:46 --- join: Quartus__ (n=Quartus_@209.167.5.1) joined #forth 11:57:35 --- join: swsch (n=stefan@pdpc/supporter/sustaining/swsch) joined #forth 12:01:45 http://www.triangledigital.com/front.htm Anyone ever messed with one of these? 12:10:15 not I. 12:29:34 --- join: swsch_ (n=stefan@pdpc/supporter/sustaining/swsch) joined #forth 12:37:33 --- quit: swsch_ ("Leaving") 12:45:53 --- quit: swsch (Read error: 110 (Connection timed out)) 12:53:36 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-102-005.pools.arcor-ip.net) joined #forth 12:54:11 --- quit: Snoopy42 (Nick collision from services.) 12:54:28 --- nick: snoopy_1711 -> Snoopy42 14:25:00 --- quit: nighty ("Disappears in a puff of smoke") 14:44:34 ray, alive out there? 14:45:25 --- nick: Raystm2 -> tiff 14:49:17 --- join: Patrick` (n=pitt2@i-195-137-14-213.freedom2surf.net) joined #forth 14:49:39 good evening 14:49:55 thanks! 14:50:07 of all the channels I've wandered into over the years, you've been most courteous 14:50:41 for reasons which will never become a bad influence on society, I'm interested in seeing a gate-level circuit diagram of a minimal forth hardware implementation 14:50:51 You are thanking the channel, or crc? 14:50:58 hi crc 14:51:07 both, operators are ambassadors 14:51:19 as I've been advised it makes for very very terse cpus as well as machine code 14:52:58 There are a couple good ones in the homebrew CPU webring. Let me get you a starting pointer. 14:53:00 my end goal is a working cpu of some description, emulated in some sort of software like VHDL or one of the "toy" electronics simulators 14:53:17 which strike a balance between "usability" and "minimal turing machine" 14:53:38 forth to me seems a lot more comprehensible than other asm I've seen 14:53:59 http://del.icio.us/jcwren/homebrew?setcount=50 There are least one on this page, and I think two. 14:54:07 thanks 14:54:40 You might also check my VHDL links there also (change 'homebrew' to 'vhdl'). I don't know that I've got them all cross referenced or not. 14:54:46 Also links to some verilog implementations of various forth/stack chips can be found at http://www.ultratechnology.com/chips.htm 14:54:51 9 ttl boards with what I assume are 16-pin chips on them. niiice. 14:55:57 You should be able to take Xilinxs design software and synth the schematics into VHDL. 15:00:16 I'd assume someone's done this before, though 15:00:43 seen just how terse you can get a (apart from memory size) turing-complete computer 15:11:08 --- quit: Cheery ("Download Gaim: http://gaim.sourceforge.net/") 16:19:22 --- nick: tiff -> Raystm2 16:19:32 Hey Ray. 16:21:22 Hey Quartus. How's test comming? 16:21:45 crc replied to my note last night about ' | is \ 16:23:12 he informs me that \ is not a vector so "is" will not change it. Must use instead ' | alias \ 16:23:58 of course that's when I said, "But that's how you use it in ANS file. 16:24:09 I'm awaiting responce. 16:24:36 Well, if it's not meant to work, perhaps it could fail meaningfully instead of bombing. 16:24:48 oh wait i'm wrong again here. 16:25:03 ~| alias \ 16:25:08 Anyway, I pasted up the tester port: http://pastebin.ca/124825 16:25:25 ' | alias \ works fine as far as I can see. 16:25:31 the tilde is a prefix to return the address. 16:25:59 Nevertheless ' seems to do the trick just as well, at least for \. 16:26:11 with your permission, I will copy that paste and add it to Retroforth pastebin. 16:26:24 I'm sure you are correct. makes sence to me. 16:26:26 I found some weirdness with the ?dup in the ans file that crc wrote, looks like it should work fine but doesn't, so I wrote my own. I pulled in a few other bits & pieces from that file. 16:26:26 Sure. 16:26:40 thanks . 16:26:58 * Raystm2 nods about ?dup 16:26:59 Had to go with {{ and }} instead of { and }, because rf uses { and } for something else. 16:27:15 you know, i've never known when to use ?dup. 16:27:16 yes. 16:27:27 There's a .S in there that shows what's actually on the stack, I needed that for debugging ?dup. 16:27:36 ya. 16:28:05 I found a bug in rf-windows where if you paste multi-line code into the window it's running in, it replaces the first character of the last line pasted with an 'r'. Completly bizarre. 16:29:03 Does m: not exist in rf anymore? 16:31:21 the macro, well, all classes of words have been re-worked for the Rx core. 16:31:51 I was trying to make some code work from the rf forum that contains m:. Any drop-in replacement? 16:32:07 umm.... crc ping :) 16:32:21 it's still above my experiance. 16:32:27 Ah, ok. 16:33:09 * Raystm2 checks out the ANS test file till crc returns ping. 16:33:41 I'm sure all the words in there could be rf-ized, but I was porting it across, so I did a minimal amount of bending to make it fit. 16:34:28 still, this is excellent, thank you . :) 16:34:58 Sure, maybe it's of some use. I wouldn't want to code without integrated unit tests, it's too handy a technique. 16:35:06 I think he's gonna like this very much. 16:35:23 Yes, I agree. Let the computer help you. 16:37:18 The code that had m: in it was written for some earlier version, to allow a word to call an earlier version of itself. Change things so the new word wasn't findable until it was complete. Need that for ANS compatability. 16:38:00 I'd also need, but haven't really yet gone looking for, some method of reclassifying the last-defined word as 'self', I think it's called, which appears to be the equivalent of an IMMEDIATE word in the Forth I understand. 16:39:02 .self reclass maybe. I'll try it. 16:39:19 crc is logging this, thank goodness :) 16:40:03 Well, looks like self is the class I want, but .self reclass does something horrible that I don't want. 16:40:26 * Raystm2 acknowledges. 16:40:54 Ah. ' .self reclass I think. Curious it should need the xt. 16:41:10 Yup, that does it. 16:41:53 so... : immediate ['] .self reclass ; 16:42:19 You talking retroforth? 16:42:40 Yes, I ported a quick & dirty version of the ANS tester.fs over to it yesterday. 16:42:50 Ah. 16:43:03 puts me in mind of scheme tests. 16:43:27 rf drives me a little nuts, as it changes enough from version to version (naming, features) that old snippets of code in the forum often no longer work. 16:43:33 *cough* porting ANS to it oh my god 16:44:24 rf isn't fundamentally all that different internally from any other Forth; it's got some capricious name-changes that I keep having to look up, but I can work around that. 16:46:03 Like many forths, it's written for the owner, with an eye out for the user. 16:46:50 Not hard to make a names-changes file, or to omitt using some of the newer conventions. 16:47:10 But it does break back compatability. 16:47:29 Sure, but much as a book written with, say, the word 'the' replaced by 'byr', you'd go nuts trying to read it. So if I'm to use it, I want to work with the language without having to learn new names for things which aren't, in fact, different or new in any way. 16:47:39 fortunately, these older RF's are archived and if you like one in particular you can still get it. 16:48:14 Quartus, I certainly understand that. 16:48:39 I was worried about using RF for a while because I would learn something... then it would change. 16:48:55 * Raystm2 had to do some quick catching up. 16:48:55 Right. That kept me from seriously considering Forth itself for many years, until the standardization effort began. 16:49:16 I didn't want to learn Forth anew on every platform. 16:49:34 The thing that clinched the deal for me is that I can reach crc daily. 16:49:48 I have the author at my fingertips. 16:50:14 I'm sure that helps in learning what's what. But it means if you write code for rf, it runs in rf. Noplace else. 16:50:18 If I had Quartus forth on a PDA, I'd certainly use it because we talk every day, practically. :) 16:50:49 It's Standard, so you'd at least have a reference without having to chat with me. :) 16:50:50 true, but if it runs in rf it runs on practically any machine. 16:50:55 Yes. :) 16:51:47 * Raystm2 is not opposed to standards and loves the fact that forth breaks it often. 16:51:49 Raystm2, it runs anywhere you have rf. That code won't run in Gforth. It won't run on the Palm. It won't run on a Windows mobile device. It won't run in an embedded system. It won't run in Buttle's Java Forth on a cell phone. Etc. 16:52:10 there is that. 16:52:13 It's x86 specific, to boot. 16:52:29 but if I had to port is to any of those, very little changes thanks to the Rx-core. 16:53:24 A bunch of the additionally-available drops x86 opcodes right into the definitions. There'd be a lot of changes. 16:54:05 ah so you are correct. 16:55:42 So I'd like to experiment with the additional ideas that are in rf, but I'd really like to do it as an addition. Having to remember that in rf, it's 'r' instead of 'r@' because somehow the former is preferred to the latter, that in a for/next loop it's 'r' instead of 'i', things like that are remarkably frustrating for me, as somebody who already knows Forth. So I'm hoping it's not hard to bridge those, and certai 16:57:12 That there's if/then, but no else, because I'm supposed to dislike else because the language designer does, so I have to go find an else that works and drop it in. Little things. :) 16:57:22 you truncated after "So I'm hopping it's not hard to bridge those, and certai" 16:57:30 So I'm hoping it's not hard to bridge those, and certain other, gaps. 16:57:45 thanks 16:59:34 Quartus, I believe that when crc started out, this was going to be a minimalist forth ala colorforth. But it's matured and in doing so, it is tending towards a more standard forth. All these things you expect in a forth may very well find their way back. 16:59:55 Hope so. I don't mind building them once, but if the underlying strata shift much, I'd have to keep rebuilding them. 17:00:57 * Raystm2 is wishing crc would get in here and defend his position. :) 17:02:06 I think he has before, and it's that he doesn't much care about compatibility. As a user, I do care; I'm interested in what he's doing, I'm not going to convert my programming world to rf-only Forth. 17:02:25 --- join: juri_ (i=[Jnlb2Ko@volumehost.com) joined #forth 17:02:37 ya. 17:03:08 Even something as simple, and to my mind, necessary as inline unit tests like the port of tester.fs couldn't work without something as simple as DEPTH, for instance, which I had to find in an ancillary file and drop in and hope that it would work. 17:03:35 It has a hard-coded hex machine instruction in it. Will that keep working in future rf versions? I don't know. 17:03:49 Does that suggest that it should be internalized in the kernel? I say yes, definitely. 17:04:52 I see. 17:05:19 If you can't build a facility that's demonstrably useful using only the exposed words, then that facility needs to be part of the kernel. 17:08:10 sp! sp@ rp! rp@ are key candiates for that in what I've done so far with rf. They're needed for DEPTH and CATCH/THROW, at least. 17:08:11 * Raystm2 nods* 17:09:21 ELSE is built with an x86 branch opcode written as hex, also. 17:32:41 Is rf fixed-case-sensitive, or is it configurable? 17:36:53 retro is case sensitive 17:39:42 Thanks. 17:43:31 Quartus: what was the problem with my ?dup implementation? 17:49:27 I'm still not sure. Looks fine, works at the prompt. In one definition I used it in, it was doing something very odd, I think it may have been exiting the definition it was contained in, but don't take that as gospel. I'll see if I can reproduce the fault. 17:49:51 Is there anything remotely conditional about the way that definition would work? Some circumstance under which it wouldn't behave the same way? 17:50:19 0; is a conditional, but should always work within a definition 17:50:32 I'll see if I can make it happen here. 17:51:12 Ok, I've got the failure happening, let's see if I can make a minimal test-case. 17:55:32 It's failing when I use it with DEPTH, which I've also put in this paste: http://pastebin.ca/125918 17:55:43 If I replace ?dup with the more naive : ?dup dup if dup then ; 17:55:44 it works. 17:56:07 You'll see the paste there calls t multiple times. It should do nothing each time as long as depth is 0, but the second time through it has a value on the stack. 17:57:49 It's a very odd bug. I had to write a version of .S that showed the actual stack items before I could figure it out. 18:05:14 http://csclub.uwaterloo.ca/media/Eric%20LaForest:%20Next%20Generation%20Stack%20Computing.html I guess most people here have seen this already? 18:05:43 Up on Slashdot today. 18:06:20 And everywhere else, since all Slashdot, digg, osnews, etc do is copy each other. 18:06:39 Actually, osnews has original content. 18:09:00 I havn't established the "trades" habit yet. Very rarely go into c.l.f. I'm not a very good forther, am I? 18:10:47 What is 0; ? 18:10:58 Quartus: this is now fixed in 9.2.7 18:11:48 Thanks. What was it? 18:11:57 buggy tail call elimination 18:11:59 0 =if ; then ; 18:12:06 What about this: hex f . 18:12:08 crashes 9.2.6. 18:12:32 f is actually a word... 18:12:40 * crc thinks on this a bit 18:12:42 Oh. 18:12:45 f = false. 18:13:02 Yes, a word defined as f would be legal there, and be found first. Ok. 18:13:07 f ( flag xt -- ) 18:13:13 execute xt if flag is false 18:13:37 I didn't think about the fact that it is also a valid hex number.... too used to the prefixes I guess 18:14:15 Yea, it just occurred to me that mine doesn't handle bases either. You get decimal or hex, where hex's are preceeded by 0x 18:14:39 k4jcw, yours? 18:14:44 my Forth. 18:14:47 Or near-Forth. 18:14:54 right-- link? :) 18:15:00 There is none. 18:15:20 oh okay. 18:15:23 I'm up to U< in the coretest. Easy way to code that for rf? 18:15:40 What does 0; do? 18:15:43 Why do I assume everybody does a web page about every thing they are working on. 18:15:58 return if 0 on stack. 18:16:21 it doesn't consume the stack value, iirc. 18:16:25 k4jcw: drop TOS and return to caller if TOS=0, otherwise continue execution and leave TOS alone 18:16:51 That is not an intuitive name. 18:16:59 I agree with k4jcw on that. 18:17:19 0; speaks to me. it says on zero return else continue. 18:17:57 Raystm2, I tend to make the assumption about web pages. I don't know if I'll be able to release this or not. It's designed as a script language for automating product testing at work. 18:18:04 It's rather more complex than that to describe, as it leaves the cell on the stack if it's zero, but consumes it if it's not. Or wait, it's the other way around. 18:18:30 yes other way around but point taken. 18:18:31 Pulling a name out of the thin air, I'd call it 0=exit 18:22:10 Apparently suggesting an alternative name for a word in someones implementation is great way to shutdown a channel :) 18:22:25 the word (and name) was taken from JasonWoof's HerkForth 18:22:35 No. You're okay. :) 18:22:58 * Raystm2 is foody and about to go to the ............ 18:24:06 I like 0; and have used it, but I suppose I was around when JasonWoof announced it and described it. 18:24:36 it's like a little boarder in your code. :) 18:24:39 Every other Thursday night (today being one) we go up to a local bar/restaurant where a friend ours manages. The have an open mic, and a gal who hosts it that's pretty good. We bailed way early, as they had a bunch of kids in there (like 7!) for open mic. Usually they require them to be 21 (drinking age), but somehow there was a miscommuniation. 18:25:07 boarder? Someone sleeping in your code? 18:25:08 yikes :) 18:25:32 Ya, and if I don't hurry up and wake up it'll never get done. 18:26:44 --- quit: virl ("Verlassend") 18:27:35 --- join: virl (n=virl@chello062178085149.1.12.vie.surfer.at) joined #forth 18:31:44 macro: u : u< u this may work... 18:36:29 Thanks. I worked something else up more naive, but I'll revisit it. 18:45:33 crc, the version of REPEAT in your ANS file isn't doing the trick, is it easy to fix? Looks hairy. 18:48:37 on this one, I'm not sure 18:48:56 I'm 60% passed the coretest, but that's failing. 18:51:07 REPEAT is conventionally : repeat postpone again postpone then ; but you don't have AGAIN defined. 18:53:17 Oh hang on, it is defined, part of rf. Let me see. 19:01:01 --- quit: virl (Remote closed the connection) 19:03:58 * crc needs to get some sleep; will be back tomorrow 19:04:11 Ok. With luck I'll be through the coretest. 19:09:25 --- quit: uiuiuiu (Remote closed the connection) 19:09:27 --- join: uiuiuiu (i=ian@dslb-084-056-224-026.pools.arcor-ip.net) joined #forth 19:48:32 --- join: ayrnieu (n=julian@pdpc/supporter/sustaining/ayrnieu) joined #forth 19:57:45 --- join: virsys (n=virsys@or-71-53-74-48.dhcp.embarqhsd.net) joined #forth 21:00:35 --- join: segher_ (n=segher@dslb-084-056-137-089.pools.arcor-ip.net) joined #forth 21:07:26 --- quit: segher (Read error: 110 (Connection timed out)) 22:11:01 --- quit: virsys ("bah") 23:09:44 --- quit: JasonWoof (Read error: 54 (Connection reset by peer)) 23:09:46 --- join: JasonWoof (n=jason@unaffiliated/herkamire) joined #forth 23:09:46 --- mode: ChanServ set +o JasonWoof 23:28:48 --- join: virsys (n=virsys@or-71-53-74-48.dhcp.embarqhsd.net) joined #forth 23:59:59 --- log: ended forth/06.08.10