00:00:00 --- log: started forth/05.03.29 00:10:56 --- quit: Herkamire ("off to bed") 00:54:41 --- join: YoyoFreeBSD (~yoyo@222.90.3.99) joined #forth 05:29:47 --- join: tkb (~tkb@63.163.164.6) joined #forth 07:16:57 --- quit: yumehito (Read error: 104 (Connection reset by peer)) 08:12:36 whats the easiest way to access network functionality with gforth? 08:13:04 is there an existing dictionary or established method for doing network ops? 08:51:44 err idunno but isforth has some basic code in there - you can port that maybe ? 08:52:05 it is very basic tho and needs alot of rework to make it clean 08:52:09 but it does work 08:55:11 --- join: [Forth] (mark4@rrcs-24-242-160-169.sw.biz.rr.com) joined #forth 08:59:36 --- join: sk1p (alex@pD9E3D92F.dip.t-dialin.net) joined #forth 09:13:19 http://alex.homelinux.net/~alex/tmp/forth.txt - can someone explain what the constant would contain? 09:19:41 --- join: qFox (C00K13S@82-169-140-229-mx.xdsl.tiscali.nl) joined #forth 09:25:53 sk1p, -- you wouldnt be skip carter would you ? :) 09:26:18 nope :) 09:26:24 ok :) 09:26:36 the code at the above url is incomplete btw :P 09:26:46 why? 09:26:52 whats missing? 09:27:23 erm actually maybe its not but i usually see a structure defined with a start and an end 09:27:31 isforth has struct: and ;struct 09:27:43 hrm.. 09:27:59 its from an apple fcode driver 09:28:16 ok 09:28:22 fcode is weird :P 09:29:38 code? url? 09:29:52 http://alex.homelinux.net/~alex/tmp/forth.txt 09:30:00 oh 09:30:22 trying to understand what value the constant will have 09:30:40 1 2 3 and 4 09:30:48 oh wait 09:30:58 i dont know what field does obviously 09:31:25 and in all fairness, dont know how struct behaves in forth 09:33:31 hmm 09:38:38 qfox how struct behaves depends on who defined it :) 09:38:42 exactly 09:39:04 but i'm out of forth for a bit now so i wanst sure whether it had a standard of some sort 09:39:19 structs are usually built using defining does> words 09:39:24 there is no forth standard. at all. anyone who tells you there is is lying 09:39:32 even standard forths are all different 09:39:46 ehm, i think i've been around long enough to know that :\ 09:40:01 hehe 09:40:06 sounds like a lot of fun ;P 09:40:11 it was a jab at the ans NON FORTH standard :P 09:50:39 --- quit: sk1p ("leaving") 09:50:57 --- join: sk1p (alex@pD9E3D92F.dip.t-dialin.net) joined #forth 09:56:46 I440r, you might want to go easy on scaring away the new people :) 09:57:18 lol 09:57:32 :P 09:57:53 There is in fact a Standard, and it's pretty easy to comply with; even I440r could do I think ;) 09:57:56 look dammit... im NOT PSYCHO!!!.... ok ??? 09:57:56 heh 09:58:06 i refuse to :P 09:58:22 tho isforth isnt THAT far off the standard, there are some issues i have with said standard 09:58:26 Note, however, that there is a specific Standard he refuses to comply with. 09:58:33 in fact i would say i was diametrically opposed to it 09:58:49 but even IT isnt "standard" 09:58:55 Yes it is. 09:58:58 you cant comply with the standard 100% as written 09:59:04 How so? 09:59:41 err i forget the details but jeff fox has posted many a posting on clf stating that if you comply with this part you cant comply with taht part 09:59:41 also 10:00:02 Jeff isn't exactly a normative source for interpreting the Standard. 10:00:05 show me any ans forth program and you see GLUE code in it to make it compatible wtih the xyz and forth and the abc ans forth 10:00:19 Well, I can show you bunches of ANS programs that have no such glue code. 10:00:23 err i believe he was originally on the team as was chuck no ? 10:00:39 and they wont run on all ans forths 10:00:48 Jeff? No. Moore invented it; Rather helped develop it. Jeff runs a company out of California that reportedly designs chips. 10:00:55 Moore works there now. 10:01:01 i know 10:01:08 chuck and jeff have both been in here 10:01:13 If they're Standard programs, they will in fact run without modification on Standard forths. 10:01:14 jeff was semi regular here for a while 10:01:30 my point exactly! 10:01:43 Your point was exactly the opposite of that. 10:01:46 #ifdefined _this_or_that_compiler 10:01:50 No #ifdefs. 10:01:53 define things here they didnt there 10:01:57 Nope. 10:02:03 i wont support condistional compilation in my compiler 10:02:03 at all 10:02:21 A minimal Standard system doesn't even have conditional compilation words. 10:02:39 fastest way to obfuscate your code is to inject it full of conditional compilation and other bs red tape 10:02:51 True. But that's not relevant here. 10:03:36 u took a look at the fsl ? 10:03:45 most of that code is splattered with #ifdef's 10:03:46 ick 10:04:02 I've seen the FSL. It has a bunch of conditional compilation to avoid redefining facilities that exist in some Forths. 10:04:33 The conditional code isn't there to make sure it runs, however. 10:04:53 its there to make sure it compiles 10:05:06 Show me. 10:05:19 i knew you were going to say that lol 10:05:30 i cant show you atm - but ive seen it ALOT!!! 10:05:44 specially in marcel h's code (yes i know iforth is not standard) 10:06:07 It's not, and the existance of code that has conditional compilation words in it does not mean that it's impossible to write portable code that doesn't. 10:06:08 --- join: Herkamire (~jason@c-24-218-95-147.hsd1.ma.comcast.net) joined #forth 10:06:08 --- mode: ChanServ set +o Herkamire 10:06:17 And that's true for C, Java, Forth, what-have-you. 10:06:44 i know - its part of why i hate c 10:07:01 c is totally NOT PORTABLE lol 10:07:02 So we're still dealing with your hyperbolic statement that the Standard isn't Standard. 10:07:26 even non portable forth is easier to port by hand 10:07:56 I agree. So can you dial back the Standard-slamming a bit? Either that, or back it up; you're scaring the animals. :) 10:08:47 :) 10:08:58 and annoying the ppl who USE the standard too methinks :) 10:09:05 A bit. 10:09:45 And probably making newcomers think it isn't worth the effort. 10:09:51 my biggest gripe about ans is that it fixed things that wernt broken and refused to fix things that were 10:10:07 Ok, but it's just a mark on a page; time marches on. There'll be amendments. 10:10:28 It wasn't an attempt to fix things, just to codify existing practice. 10:10:40 no. the "wasnt broken" fix was inventing "postpone" which fixed compile and [compile] 10:10:49 and the refusal to fix is also going to stay with us 10:10:51 There's a rationale behind that. 10:10:53 ans refused to define NOT 10:11:08 no theres a rationalization - theres a difference lol 10:11:08 Because existing practice was divided. 10:11:37 79 standard had a broken NOT. 83 fixed it. ans wimped out and refused to define how not SHOULD behave - and NOT should behave like a NOT... 10:11:45 Because existing practice was divided. 10:11:49 im sorry but x 5 = invert blah blah just doesnt scan the same way 10:12:11 It's one line in your code to make the world all ok again, pal. :) 10:12:12 and how difficult would it be for you to go throu your 20 or so source files and convert all your not's to 0='s ? 10:12:26 more red tape glue code 10:12:38 that you have to remember to put in 10:12:51 #ifnotdefined not blah blah 10:13:37 So far we've got that you want NOT defined, and you don't like POSTPONE. You can define NOT as you please, and you don't have to use POSTPONE -- COMPILE and [COMPILE] are still there. 10:14:08 they arent required by the standard 10:14:44 and if i define NOT as i please ill define it as : not 100 0 do i . loop ; 10:14:50 its sillyness 10:15:09 If that's what you want NOT to do, fine -- it's not a Standard word, so go to town. 10:15:25 COMPILE and [COMPILE] are in CORE EXT. Only the most minimal system wouldn't have 'em. 10:15:26 why didnt they simply keep the 83 standard definition of NOT and if the 79 std ppl or the fig ppl didnt like it they could always EDIT their code!! 10:15:31 theres a novel idea lol 10:15:59 ok if compile and [compile] are there - why do we need postpone 10:16:24 i will never understand the word postpone or the reason for "inventing" it 10:16:52 As I recall the discussion, it was because there's no simple way to ascertain whether to use [COMPILE] or COMPILE with some implementations. 10:17:22 Hey, I440r, I wouldn't despair; I'll bet you can understand it if you really try :) I'll help. :) 10:17:41 quatrus compile and [compile] are totally different 10:17:55 one compiles the next word in the input stream the other the next token in the execution stream 10:18:23 how is it difficult to define which one to use when ? 10:18:49 It comes down to whether the words are immediate or not -- let me dig up Rather's discussion on this for you. 10:18:57 i know 10:19:05 hence my comment in my sources 10:19:41 postpone was invented in order to relieve you of the responsability of knowing which words were and which words were not immediate. i.e. it is a means of relieving you of the responsability of knowing the language you are programming in 10:20:10 and you can [compile] non immediate words 10:20:58 yes, but if you don't know they're immediate you get unexpected results. And one implementation's words may be immediate, where another's are not, so if you're writing portable code, you have no way of knowing if the target Forth is or isn't, and so you use postpone instead. 10:21:11 It doesn't free you from knowing your own Forth; it allows you to write code that runs on others. 10:21:44 lol 10:21:57 so they didnt define which words need to be immediate and which words dont. 10:22:06 They do, some words are specifically defined as immediate. 10:22:10 it all just looks like a huge copout to me 10:22:16 But others are not specified, and might go either way. 10:22:19 yes - and some may or may not be 10:22:24 Right. 10:22:37 huh 10:22:39 The Standard expressly permits the widest possible range of implementation strategies. 10:22:47 if the word is in the standard it should be stated as either being immediate or not 10:22:49 is there any chance there will be a newer forth standard? 10:22:58 i hope not :) 10:23:01 That would restrict the range of implementation strategies. 10:23:04 I always assumed that ans was it 10:23:19 Quartus, i consider the ans standard to be more restricting than that 10:23:28 There's a new effort underway now to create -- not an ANS Standard, but a new document with some enhancements. 10:23:40 if i HAD to follow the standard i couldnt have done some of the things i did do 10:23:52 I440r, if they rigidly defined which words were and were not immediate, you'd be complaining about that. 10:24:05 specifically - (and i know why) - you cannot guarantee on entry into any given word that the top item of the return stack is your return address 10:24:24 Quartus, only if they defined them wrong lol 10:24:29 Right, again, to permit the widest possible range of implementation strategies. 10:24:38 Some Forths return-stack is *not* the call stack. 10:24:51 i consider not knowinig at any given time what is at the top of the return stack to be the equal of not knowing what is at the top of your parameter stack 10:25:09 I don't like that the ANS tries to support the widetst range of implementation strategies 10:25:10 err - the "retuyrn" stack IS the call stack. 10:25:27 the problem is you cant guarnatee that any given definition wont be inlined by the optimizer 10:25:37 Herk, and that's cool; nobody's forcing you to comply with the Standard. But that was a stated goal, and it holds to it quite well. 10:25:57 The return stack in a Standard system doesn't have to be the call stack. 10:26:24 Quartus, no - the return stack is ALWAYS the "FORTH" call stack it may or may not be the processor stack 10:26:29 in isforth its NOT the processor stack 10:26:52 Not true; it does not have to be either the call stack, or the processor stack. There is no requirement for return addresses to appear on it at all. 10:26:56 i know whats at the top of my parameter stack at all times. i know whats at the top of my return stack at all times 10:27:01 even on entry into a word 10:27:22 Quartus, exactly 10:27:28 On many, probably even most, Forths, indeed the return stack is the call stack, whether or not it's also the processor stack. But it doesn't have to be. 10:27:48 And the Standard leaves it that way, again, to allow the widest possible range of implementation strategies. 10:27:57 It's not an implementation Standard, you see. 10:28:10 I don't really know if they did a good job. I don't really write ans code. but I get the impression that trying to write anything significant so that it will run as is on different ANS forth compilers is a major pain 10:28:37 It's about as painful as it is under C; as soon as you step outside of the libraries, you're in a dark place. 10:28:50 writing code specifically so that it will run on all cpu's under all operating systems - would THAT be good ? 10:28:55 look at the linux kernel sources 10:29:11 it'd be nifty, but it's a pipe dream. Linux kernel source is hardly devoid of #ifdefs. 10:29:23 it compiles and runs on x86, ppc, sparc, ..... 10:29:32 And has bunches of cpu-specific assembler. 10:29:48 but the truth is.. you dont have ONE source, you have 2890468243 different sources all interleaved into the same files as a hube gordian knot 10:30:07 writing portable code is silly because in forth the effort to port said code is negligable 10:30:13 Yes. That's the nature of portability. 10:30:49 so... designing a standard that is specifically tailored to make code portable is basically forcing said code to look like an unmade bed 10:31:07 i take great pains to make my sources readable. i go out of my way to reduce cruft 10:31:14 ans goes out of its way to maximize cruft 10:31:27 : blah postpone x postpone y postpone z ......... ; immediate 10:31:44 Clarity of code isn't necessarily at odds with portability. 10:31:46 ans sources just look sooooo untidy to my eyes 10:31:53 it is 99% of the time 10:32:08 99% of programmers write unclear code whether they're aiming for portability or not. 10:32:17 again true 10:32:25 but ans encourages you to write untidy code :P 10:32:26 tho! 10:32:37 there are still SOME coders who can write neat ans sources 10:32:41 i just dont see that many. 10:32:45 and thats only a MINOR gripe 10:33:01 You may have trouble writing clear Standard code, but you're not everybody. Wil Baden, for instance, writes marvellous Standard code. Clear as any I've seen. 10:33:09 but i would write slower, less optimal code simply to make it more readable. 10:33:25 err actually i cant stand wills code lol 10:33:49 tho i definatly respect him as a coder and one of the orignal founding fathers of the forth language 10:33:51 funny thing with forth... I never run other people's code 10:33:52 he has been i here too.. . 10:34:09 Herkamire, the overhead of developing it is also negligable in forth 10:34:12 or close to 10:34:17 I don't think I've run more than an algorithm written by someone else 10:34:29 and you are always happier with your own code than you are with someone elses 10:34:39 I440r, if you just make the arbitrary decision that anything written to run on Standard Forths looks bad to you, then we've little to discuss; that's not objective data. 10:34:46 well, I've tried other peoples forth systems. but downloading forth source... don't think I've done more than 10 lines. 10:35:04 Quartus, ive seen very little ans forth that appealed to me 10:35:11 not NONE: just very little 10:35:30 For my part, I've re-used a great deal of other people's forth code. It's been far easier when that code is Standard. 10:35:59 I440r_: true. If I think it will be even vaguely close to the same amount of time in the long run, I would rather write something myself than take the time to find existing code and learn how it works. 10:36:13 even up to twice as long for writing it myself. 10:36:18 I440r_: I believe you share this trait 10:36:24 but lots of people don't 10:36:34 lots of people like finding things that are already written and hooking them together 10:37:47 i am not 100% against borrowing other peoples code :) 10:37:57 so, anyone got an idea what value the constant in this code will get? http://hush.alex.homelinux.net/~alex/tmp/forth.txt 10:38:23 cant even read that - no idea what its doing 10:38:43 Is that part of something larger? 10:38:47 I440r_: yeah, browsing is fun. but downloading the whole file and trying to use it as is... 10:39:19 herc i once tried to port jeff fox's chess program to isforth - had minimal success, simply because i wasnt really trying lol 10:39:26 sk1p: you'd need to show the definitions for everything in there except the numbers and CONSTANT 10:39:27 Quartus: yea, but thats the hole struct 10:39:32 also wanted ian osgoods forth to work here too... gave up on that for now 10:39:53 sk1p: I'm not farmilliar with any STRUCT code. and even if I was, it might not be the struct code you're using 10:40:05 Herkamire: its fcode, from apple firmware 10:40:07 there are many different implementations for structs in forth 10:40:29 sk1p, I don't know how STRUCT and FIELD are defined there. At a guess the constant ___08b6 would be 4 address-units further along than ___08b5. 10:40:54 It looks like somebody got sloppy and terminated a struct with a constant instead of an end-struct or equivalent. 10:41:19 Odds on STRUCT puts a zero on the stack, and FIELD creates constants from it and then increments it. 10:42:14 The ____ jazz makes it look auto-generated. 10:42:30 yes, its "decompiled" from fcode 10:42:46 Then it's the decompiler being sloppy, or 'clever' I suppose :) 10:43:33 hrm :) 10:43:55 i guess i have to ask the author then 10:43:56 thanks 10:44:05 I'd put a dollar on ___08b2 being a constant with value 0; ___08b3 being 1; ___08b4 being 2; ___08b5 being 6, etc. 10:44:38 oops -- 08b5 being 4, I mean. 10:45:02 and 08b5 being 8. That's if FIELD works in address-units, and not in cells. 10:46:16 hm.. i could just boot my computer into openfirmware and try to execute it there.. 10:46:29 That's so crazy, it might just work. 10:47:33 sk1p: looks like it's just like the other FIELDs 10:48:01 I didn't see, but I would guess that: : field over + constant ; 10:48:14 i agree. 10:48:26 so CONSTANT would be the same as FIELD except it clears the stack so you can't define further fields 10:49:21 field ( offset size "new-name< >" -- offset+size ) Create new field offset specifier, named new-name. 10:49:49 struct ( -- 0 ) Start a struct...field definition. 10:51:39 Given that, ___08b6 would be 8. 10:51:53 oops... field increments the offset. so it would be: : field + dup constant ; 10:52:10 Herk, doesn't it post-increment? 10:52:22 oh yeah 10:52:28 : field dup constant + ; 10:52:49 no 10:52:56 : field over constant + ; 10:53:02 ah right. sorry. 10:53:20 took me a few tries in my head to get it without a swap 10:53:31 : field over + swap constant ; is just ugly 10:54:05 See if you can work in a NOT and a POSTPONE for I440r. 10:54:25 :D 10:54:47 : field over + swap constant ; \ not postponed 10:54:52 hehehe 10:55:32 i'm a bit confused, the name for the field is actually _after_ the field word 10:56:10 Yes, CONSTANT forward-parses. 10:56:17 ugh... 10:56:24 hehe 10:56:50 Forth defining words do that. CREATE : CONSTANT etc. 10:57:24 ah, ok 10:57:36 For practicality. 11:04:42 so the numbers at the beginning are the field lengths, and the last constant is all the numbers added? 11:13:13 the number before field in each line is the size of the field. The constant at the end is the offset after the last field, which comes out as the same as all the numbers added, so yes. 11:13:40 okay, thanks :) 11:13:44 Sure :) 12:04:34 --- quit: warpzero (Read error: 104 (Connection reset by peer)) 12:17:45 --- quit: qFox ("this quit is sponsored by somebody!") 13:37:59 --- part: tkb left #forth 13:46:31 --- quit: YoyoFreeBSD (Read error: 60 (Operation timed out)) 14:48:40 --- join: sly007 (sly007@82.229.193.185) joined #forth 14:53:02 --- quit: sly007 (Client Quit) 15:19:43 hi all 15:39:55 --- join: aum (~aum@60-234-138-239.bitstream.orcon.net.nz) joined #forth 16:36:12 --- quit: I440r_ ("Leaving") 16:40:42 --- join: warpzero (~warpzero@wza.us) joined #forth 17:20:43 Quartus, lol. dont use not - ya wanna annoy me use invert and postpone :) 17:21:00 sooooo limp wristed names :P 18:06:27 : antithesis invert ; 18:08:51 --- join: YoyoFreeBSD (~yoyo@219.144.190.23) joined #forth 18:34:38 --- join: sk1p_ (alex@pD958CA47.dip.t-dialin.net) joined #forth 18:46:32 --- quit: sk1p (Read error: 110 (Connection timed out)) 20:11:45 --- join: yumehito (yume@giguz.turbo.nsk.su) joined #forth 20:41:45 : I440r postpone invert ; immediate 22:28:03 --- quit: aum () 22:39:53 --- quit: Herkamire ("off to bed") 23:02:03 --- quit: YoyoFreeBSD (sterling.freenode.net irc.freenode.net) 23:02:03 --- quit: Fractal (sterling.freenode.net irc.freenode.net) 23:02:03 --- quit: Quartus (sterling.freenode.net irc.freenode.net) 23:02:03 --- quit: ianp (sterling.freenode.net irc.freenode.net) 23:02:03 --- quit: SeaForth (sterling.freenode.net irc.freenode.net) 23:02:03 --- quit: [Forth] (sterling.freenode.net irc.freenode.net) 23:02:03 --- quit: onetom (sterling.freenode.net irc.freenode.net) 23:02:03 --- quit: yumehito (sterling.freenode.net irc.freenode.net) 23:02:03 --- quit: sk1p_ (sterling.freenode.net irc.freenode.net) 23:02:04 --- quit: Frek (sterling.freenode.net irc.freenode.net) 23:02:04 --- quit: swalters (sterling.freenode.net irc.freenode.net) 23:02:04 --- quit: arke (sterling.freenode.net irc.freenode.net) 23:02:04 --- quit: madgarden (sterling.freenode.net irc.freenode.net) 23:02:05 --- quit: cmeme (sterling.freenode.net irc.freenode.net) 23:02:05 --- quit: ccfg (sterling.freenode.net irc.freenode.net) 23:02:05 --- quit: skylan (sterling.freenode.net irc.freenode.net) 23:02:05 --- quit: I440r (sterling.freenode.net irc.freenode.net) 23:02:40 --- join: [Forth] (mark4@rrcs-24-242-160-169.sw.biz.rr.com) joined #forth 23:02:48 --- join: yumehito (yume@giguz.turbo.nsk.su) joined #forth 23:02:48 --- join: sk1p_ (alex@pD958CA47.dip.t-dialin.net) joined #forth 23:02:48 --- join: Frek (2649-ident@h89n2fls31o815.telia.com) joined #forth 23:02:48 --- join: swalters (~swalters@2416457hfc118.tampabay.res.rr.com) joined #forth 23:02:48 --- join: arke (f2@bespin.org) joined #forth 23:02:48 --- join: madgarden (~madgarden@Quebec-HSE-ppp3618098.sympatico.ca) joined #forth 23:02:49 --- join: onetom (~tom@ns.dunasoft.com) joined #forth 23:02:54 --- join: YoyoFreeBSD (~yoyo@219.144.190.23) joined #forth 23:02:54 --- join: Fractal (jah@selling.kernels.to.linus.torvalds.at.hcsw.org) joined #forth 23:02:54 --- join: Quartus (~trailer@ansuz.pair.com) joined #forth 23:02:54 --- join: ianp (~ian@inpuj.com) joined #forth 23:02:54 --- join: SeaForth (~SeaForth@c-24-1-126-202.client.comcast.net) joined #forth 23:03:04 --- join: cmeme (~cmeme@216.184.11.2) joined #forth 23:03:04 --- join: skylan (~sjh@dialup-216-211-47-83.tbaytel.net) joined #forth 23:03:04 --- join: I440r (mark4@rrcs-24-242-160-169.sw.biz.rr.com) joined #forth 23:03:04 --- join: ccfg (ccfg@dsl-roigw3de0.dial.inet.fi) joined #forth 23:59:59 --- log: ended forth/05.03.29