00:00:00 --- log: started forth/05.10.22 00:05:51 --- quit: swalters_ (Read error: 110 (Connection timed out)) 04:23:55 jow friends 04:24:03 can some explain me this? 04:24:46 1111111111111111111111111111111111111100000000000000000000000000 1111111111111111001111000 or . -110001000 ? 04:25:32 shouldn't it be something like -1001111000 04:25:41 well i did 2 base ! 04:26:19 i assume that or is bitwise or 04:34:46 which forth? 04:34:56 gforth 04:35:10 oh.. ans forth. *brr* 04:35:37 is that bad? 04:36:30 not really... but I think there are forths out there which are more fun to use than ans forths. 04:37:14 but when i do that "or" why is the result confusing? 04:38:12 virl : hi, 04:38:39 virl: I didn't go to Waco last night, I have to go today. 04:39:01 If you want to discuss Glypher, I'm available till I get the call to go to Waco. 04:39:05 ok, I don't know why it prints that humulus, because I have also here gforth and it doesn't print that bogus. 04:40:38 lets try in on a 32 bit machine ;) 04:41:19 so, on which machine do you use it? 04:41:28 64bit 04:41:44 ok.. 04:42:41 on a 32 bit machine it returns the same thing -110001000 04:43:38 --- join: snoopy_17 (i=snoopy_1@84.58.163.124) joined #forth 04:44:38 ping Raystm2 04:45:53 pong 04:48:50 did you recieved my questions? 04:51:06 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 04:51:30 --- nick: snoopy_17 -> Snoopy42 04:57:22 virl yes did you recieve my answer, 04:57:35 I think I might not be registered. 05:05:39 yes, I recieved them. what do you mean with 'I might not be registered'? 05:06:22 I wasn't registered. My NICK that is, I didn't register when I last /joined 05:07:03 if I don't register, then I can recieve messages from registered users but I can't send back till I register. 05:07:53 ah... ok. 05:08:23 virl: just installed gforth-0.5 and that's the result: 05:08:25 2 base ! ok 05:08:25 1111111111111111111111111111111111111100000000000000000000000000 ok 05:08:25 11111111111111111001111000 ok 05:08:25 or ok 05:08:28 . -110001000 ok 05:08:38 what's goin on here? 05:08:47 ok.. here it works.. 05:08:56 Unless the users are mode +6 05:09:10 (..like me, because I'm not afraid of no spambots!) 05:09:19 * Robert heads off to the shower. 05:09:36 you can also allow only particular users 05:10:13 with /msg NickServ help LIST 05:13:48 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 05:16:08 Ah, didn't know that. 05:23:08 well now you know 05:23:30 True. :) 05:24:35 Robert: do you understand my problem? 05:25:09 humulus: the results look correct to me... 05:25:11 humulus, I get the same answer. It's not wrong. 05:26:15 Use U. to display the value as an unsigned cell. 05:26:19 Good morning Quartus. 05:26:24 Morning Raystm2. 05:27:32 there we go, it's two complement , the signed value 05:33:11 And don't let the naysayers get you down, Gforth is a perfectly fine Forth. 05:33:43 I agree. 05:33:47 well i know the guy who wrote it :) 05:33:54 :) 05:44:18 is there anything like a plus for unsigned numbers? 05:44:58 The same + works for both signed and unsigned numbers. 05:46:12 'naysayers'? wtf 05:47:03 and how do i convert from signed 2 unsigned? 05:47:19 2 complement conversion? 05:47:27 yes.. 05:47:56 You don't need to perform any conversion, humulus; it's a question of representation. You either use . (signed) or U. (unsigned) to display the result. 05:48:32 ok, and i need uhex. :) 05:48:50 hex u. does that. 05:50:06 Quartus, why do you hate me? 05:50:24 virl, with all due respect, what the hell are you talking about? 05:52:40 'naysayers' did you mean me with that? 05:52:52 Among others, yes. 05:57:00 very friendly *sarcasm* 05:57:21 Perhaps you don't know what 'naysayer' means. 05:59:08 ok, that could be. 05:59:23 http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=naysayer 06:27:04 --- join: PoppaVic (n=pete@0-1pool67-81.nas22.chicago4.il.us.da.qwest.net) joined #forth 06:27:36 Howdy-doody 06:34:10 Hi. 06:34:24 --- join: PoppaVic_ (n=pete@0-1pool72-247.nas24.chicago4.il.us.da.qwest.net) joined #forth 06:34:40 --- quit: PoppaVic (Nick collision from services.) 06:34:50 --- nick: PoppaVic_ -> PoppaVic 06:36:32 * PoppaVic thumb-twiddles 06:37:07 --- quit: aum () 07:20:03 whoa.. 07:58:03 --- quit: Pepe_Le_Pew (Read error: 104 (Connection reset by peer)) 08:13:49 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 08:24:07 --- quit: snowrichard ("Leaving") 08:29:05 tathi: you alive today? 08:30:57 nope 08:32:02 ok, then I won't exhume you 08:36:13 * JasonWoof fines PoppaVic $2.47 worth of odd word tax 08:36:51 JasonWoof: DEMOCRAT! ;-> 08:37:25 Heh. 08:37:46 He speaks lies! 08:38:00 I was going to mention that I downloaded and built the "latest" FICL, today 08:38:22 Also emailed the author - looks like it's gone dead 08:39:44 two democratic party systems are really crazy *us bash* 08:40:22 I never much understood 2 parties (wings) and having to declaim your pref to vote 08:42:24 --- join: qFox (n=C00K13S@92pc222.sshunet.nl) joined #forth 08:42:32 it's pretty stupid. 08:43:16 * qFox pokes Robert 08:43:18 well, first they tell you to vote; then you talk about "wasting a vote" - I gave up long ago 08:44:05 I vote by buying powders, primers and assorted bullets Keep yer head down and yer powder-dry, folks. 08:45:27 yeah, lets hear it for a system where it's bad to vote for the guy you really want 08:46:03 Yeah. Or understanding a left issue and a right issue can be valid: while despising both wings 08:46:17 Hoi, qFox :) 08:46:24 Long time no see. 08:46:59 yeah, not cruising irc much anymore 08:47:03 I was watching - I think "west wing" - last week, and just discovered that (according to one character) "Democracy is the Art Of Compromise" - Funny... I don't recall that. 08:47:16 qFox: :~( 08:47:33 the west wing is left wing propoganda 08:47:38 yep 08:47:59 otoh, I don't see much that suggests the other party 08:48:36 I440r: please recall, I am too old - I can tell, but I can also appreciate some of the issues and characters. 08:48:56 your not that much older than myself :P 08:49:02 10 maybe 20 years max 08:49:08 i cant remember how old you are heh 08:49:14 Of late, when we suggest "right wing", it seems to imply just Jesus-Freaks. 08:49:33 im VERY right 08:49:34 45, I440r - I never wanted to be around this long. 08:49:39 im the most right wing person you will ever meet :) 08:49:47 I doubt it ;-> 08:49:50 poppa thats only FIVE years more than me 08:50:03 i think bush is left wing 08:50:06 "It's not the years, honey - it's the miles" 08:50:20 i think ashcroft should have been shot as a trator 08:50:51 I can think of dozens of folks that should (have been|be) stonewalled 08:51:53 oh yea.. im a jesus freek too :) 08:52:20 bush... left wing? 08:52:22 why? 08:52:36 lol 08:52:40 Expendable. I've never imposed such on another - I do tend to peeve my friends by probing their belief-systems. 08:53:11 JasonWoof: hard-right volken seem to believe he's acting like a commie lately. 08:53:54 Watching the PBS news always offers a few interesting insights. 08:54:35 bush is most definatly not a republican 08:54:35 he is a rino 08:54:59 he should be making hard core constitutionalists his judicial nominees 08:55:02 he wont 08:55:08 because he doesnt have the balls to do so 08:55:36 carter held the entire country to randsom by witholding federal funding to any state that would not enact a 55 mph law 08:55:43 carter was a communist but he had balls 08:56:08 bush is a limp wristed "lets all just get along" bullshit artist 08:56:16 he caves in to the left too often 08:56:29 You keep forgetting 08:56:30 he has been in office for 8 years. how many judicial nominees has he made ? 08:57:01 ..Of latem the issue with the SC is almost entirely the concept of "federal trumps State - ALL the time". 08:57:43 So, there are many, many side issues anymore - most of which deal with what whom can reinterpret to steal from whom. 08:59:15 good to see this is still a forth channel at least 08:59:22 The right would - apparently - dearly love to reinterpret the const/bor in such a way as to bolster the Daddy-State of Feds trump all. 08:59:27 --- quit: I440r (Excess Flood) 08:59:39 qFox: yeah, that's more partisan than politics lately. 08:59:42 Wow. 08:59:56 Freenode kicks you off for right-wing political rants? :) 09:00:04 wouldnt you/ 09:00:52 The left.. well, the left sounds like commies/socialists half the time - with weird rants. I wish to hell Perot had created a party with "staying power". 09:00:57 Nah, I440r is a cool nut. 09:01:03 * Robert is an isForth user. :) 09:01:54 I have to agree with my buddy at IBM: "Forth is the worlds most unsupported language".. We got more damned variants than C does... And those are bad enough 09:02:41 isforth? wasnt that the forth with denotation? 09:02:50 the one i used before changing to yours? 09:02:59 or was isforth the one from..... somebody in here 09:03:04 hell, last I checked even x86 had like 4 variant-assemblers 09:03:14 --- join: I440r (n=mark4@adsl-70-243-97-161.dsl.lgvwtx.swbell.net) joined #forth 09:03:42 wb, i4 - check the log ;-) 09:04:41 grrr 09:04:45 flooded off lol 09:04:46 hehehe 09:06:43 * PoppaVic considers a Beerrun... 09:09:23 I was suprised to discover no dcell math in FICL; they made the efforts to support doubles, but damned if I can see why they bothered. 09:10:00 Learning they eschewed autoshit was pleasant, however. 09:10:08 --- quit: I440r (Excess Flood) 09:10:23 wow. i4 has "issues" 09:11:42 he's a flooder! 09:11:46 what has the world come to... 09:12:00 OK.. I'm gonna' slide out for awhile and get some brew. BBL, if chores don't nail me. 09:12:02 --- quit: PoppaVic ("Pulls the pin...") 09:14:32 Hehe. 09:14:41 qFox: Are you still into coding? 09:18:48 i am, but my study is taking up most of my time currently 09:19:31 :~( 09:19:45 * Robert is doing homework atm. 09:21:42 whats your current project then? :p 09:22:15 Hobby project or for school? 09:22:20 w/e 09:22:25 both? :p 09:23:13 For school - just some scientific computing stuff. 09:23:28 "scientific" booo ;) 09:23:58 Hobby projects - trying to implement a smalltalk environment, writing a system for microcontrollers (so that I can use that to build some small computer systems), hmm... 09:24:10 You can see some of my old and new projects on www.robos.org 09:24:15 its up again? 09:24:19 Yeah. 09:24:21 kk 09:24:33 it was dead a while back when i was reorganizing projects on my website 09:24:42 Yeah... 09:24:56 Now it's on my own line again. 09:25:11 ic 09:25:48 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 09:26:04 Hi. 09:26:44 been reading the code for that sod32 that I downloaded 09:30:25 --- quit: snowrichard (Client Quit) 09:40:28 what is sod32? 09:41:35 Yet another hobby Forth. 09:41:52 Written by the same twit who wrote the fake interview with Moore 09:42:10 He also collects lunchboxes. The same one, over and over, in different colors. 09:43:14 --- join: I440r (n=mark4@adsl-70-243-97-161.dsl.lgvwtx.swbell.net) joined #forth 09:43:23 Hi, flooder. ;) 09:45:33 irc will hate you now. 09:48:43 --- join: PoppaVic (n=pete@0-1pool46-248.nas30.chicago4.il.us.da.qwest.net) joined #forth 09:49:25 Ice-cold Brew AND another chore killed! Whee! 09:53:53 OK. What did I miss? Last I heard, we had politics, ficl and I4 bouncing ;-) 09:54:25 Hello, fortherinos 09:54:32 heh 09:56:16 Now, the interesting part is a dev-hiatus of 2+ years on ficl. And, we are really no better off than we were 20 years ago. 09:57:51 I'm still trying to decide why folks bailed on FIG-forth for umpty-variants, myself. It's fairly depressing 09:59:04 Raystm2: I have pretty-well decided we need something like ficl, but in terms of a MetaCompiler. Keerist only knows where THAT leads. 09:59:39 I'm unfamiliar with ficl. 10:00:33 It's sorta' interesting.. Designed in C to act as a "command language" suitable for embedded devices, RAM and ROM - and letting C call ficl or ficl call C. 10:00:58 no autoshit, just an ansi and linux version of a simple Makefile. 10:01:53 A lot of the ideas we've discussed here are covered in it. But, then it looks like he stopped development in '03 10:05:16 thanks for the update :) 10:05:45 I was amused to make it build on this powerbook 10:06:21 I have yet to build a forth. 10:06:53 I think my first will be to concatenate colorforth to some portion of retro8.2 to make a more universal booting cf. 10:07:01 Most are pretty irksome to build 10:08:13 I understand why so many borrow from each other at some level, 10:08:52 once a solution is found somewhere, best to expoit it then re-invent it. 10:09:06 yeah, they can't even all agree on anything 10:09:49 the study of the fractional forth community would be a study in humanity, I suppose. 10:10:05 It's even worse than the C-universe 10:10:19 ..borders on the "my asm is better than yers" universe 10:10:43 yes 10:11:35 ..they can't agree on an intermediate file-format, and can't manage to handle dlopen-shit, let alone C - on the whole - but want to argue 10:11:50 you can pick the stack but you can't pick a forth 10:12:48 Well, when the business world is volitile, I choose to pick the man, rather then the business, to back. 10:12:57 hmm, and then we have the entire "well, it can't Metacompile - but it's OPTIMIZED!" universe 10:13:15 So, I choose colorforth cus the man is working on it. and I choose Retroforth cus that guy is stable as well. 10:13:28 sorta' - in either case 10:14:29 I reserve my right to disagree even with Chuck - but then too, I never felt I should learn umpty-asm and rewrite everything over and over. 10:15:20 And, I always felt that dipping into the "gcc-Metacompiler" was NEVER a good idea. 10:15:34 ACK 10:16:34 Note: ficl manages to build with gcc ala' "-ansi" - and, other than not seeing "vocs" or any dcell math, it seems to be working. 10:18:18 Basically, I have some agreement with the ficl author (see sourceforge) - because most forths believe THEY are the OS 10:19:14 ..and frankly, all the forth is is an extensible-shell/engine. 10:20:14 Doesn't matter to me if you use C or foo, but you should be able to generate and execute the pcode as well as interpret/compile source. 10:21:19 However, dipping down to a SPECIFIC "assembler" is just compiling-direct, (w/o optimizing)... And most forths don't even recognize shlibs/dll/so 10:55:30 I give - it must be time to cook, eat and read. 10:55:33 --- quit: PoppaVic ("Pulls the pin...") 11:37:09 --- quit: neceve (Remote closed the connection) 11:54:21 --- quit: I440r ("Leaving") 12:32:45 --- quit: warpzero ("leaving") 12:33:19 --- join: warpzero (n=warpzero@wza.us) joined #forth 12:41:30 --- join: sproingie (i=foobar@64-121-2-59.c3-0.sfrn-ubr8.sfrn.ca.cable.rcn.com) joined #forth 14:10:52 --- nick: Raystm2 -> tiff 14:19:31 --- quit: OrngeTide (Network is unreachable) 14:36:15 --- join: OrngeTide (i=orange@rm-f.net) joined #forth 14:53:23 --- join: swalters (n=swalters@6532183hfc82.tampabay.res.rr.com) joined #forth 15:09:12 --- quit: OrngeTide ("gone. email me if you want something") 16:07:41 Hey all. 16:17:29 Hi again. 16:18:43 What's up? 16:19:54 Homework. :( 16:20:00 Haskell, this evening. 16:21:22 Not one I've had much to do with. 16:22:40 It's OK. Compared to Prolog and Java. 16:22:42 robert, until we meet again ;) 16:22:55 prolog, dont ever mention that rotten ..... 'language' again 16:22:57 * Robert blinks. 16:23:01 :D 16:23:23 but haskell is ok, although i personally do prefer imperative languages 16:23:33 man I'm too tired to code this 16:23:41 btw, use helium, its a good front for haskell 16:23:55 (its actually made in java ;) 16:23:55 Yeah, I like functional language for... functional stuff. Like mathematical functions. 16:24:09 but its being developped by my university 16:24:10 Sucks when you're having to deal with reality though. 16:24:33 so check it out, its got a good help library. good indication where things go south etc 16:24:41 "oh, what do you mean? Moving an entire list to modify its middle element is not good?" 16:24:50 :p 16:25:44 oh yeah i was exiting 16:25:47 --- quit: qFox ("this quit is sponsored by somebody!") 16:46:03 --- join: aum (n=aum@60-234-156-82.bitstream.orcon.net.nz) joined #forth 17:07:59 dangit, I need mutual recursion 17:08:57 I was hoping not to run into that for a while 17:10:54 For what? 17:11:08 my dependancy compiler 17:11:25 my source is is kindof a database of definitions 17:12:08 so you say "i'd like to execute foo" 17:12:17 and it goes "Ok, let's see if foo is compiled.." 17:12:35 "nope, ok, now let's see if the words in foo's definition are compiled..." 17:13:06 does some nice recursion, and eventually compiles everything needed to compile foo, then foo itself 17:13:17 No mutual recursion so far. 17:14:01 it's a bit more complex with my system for handling immediates 17:14:17 and some source tokens don't trigger the dependancy compiling 17:14:36 (commented-out-color and there's a seccond form of ' (tic) that doesn't) 17:15:08 it can be done without mutual recursion, but not the way I factored it 17:15:10 My immediate reaction to that is that it sounds like there's some complexities there that make me wonder if they can't be simplified and removed. 17:15:25 that'd be nice 17:15:39 certainly had me pretty confused for a while 17:16:20 On a slightly un-related note, I've been looking over some implementations that use two wordlists, one for compilation, one for interpretation; they seem a terribly complicated solution just to avoid a handful of state-smart words. 17:16:26 the immediates thing adds to the complexity considerably 17:16:52 yeah, that's another solution 17:17:17 that's what colorforth does 17:17:19 My turnkey generator works in similar fashion to what you describe above. 17:17:28 so in the macro definition you define dup to spit out some asm code 17:17:39 but then to be able to execute DUP (not compile it) 17:17:52 you need another definition in the regular dictionary, so you do this silly thing: 17:17:56 : dup dup ; 17:18:04 colorforth still gives me hives, unfortunately. I'm waiting for Chuck to rediscover the mnemonic assembler. 17:18:22 part of the complexity of my dependancy compiler is that it does this for you 17:18:37 That does sound quite complex. Is there a good justifying reason for the complexity? 17:19:15 trying to make immediates cleaner for the programmer 17:19:23 Cleaner how? 17:19:40 you don't have to make two versions of it, or make it state-smart 17:19:42 you just write: 17:20:02 : dup 1 op, ; immediate 17:20:28 I see. In 17:20:36 in Quartus Forth I handle this via inlining. 17:20:41 and it'll make a runtime version if you even need one 17:21:26 My DUP is flagged inline. So the interpret loop executes it if state is 0, and inlines it if state is 1. 17:21:47 oh 17:21:48 interesting 17:21:56 doesn't work well with my vm, but... 17:22:11 or it's wasteful of space anyway 17:22:43 Well, I also have immediate words for things like IF that wouldn't have a useful interpreted version anyway. 17:22:51 well, could probably manage I suppose. it's just complex 17:23:04 So the only things that are inlined are things that *must* be, like R> and >R, and short sequences like DUP that are actually shorter than a subroutine call. 17:23:12 right. there are centainly words that are immediate only 17:23:27 I suggest that the inlining (or similar) approach is actually less complex than what you're describing. 17:23:49 not sure if there are any that you use in definitions and at runtime that aren't basically inlining 17:24:05 could be 17:24:18 Have you considered not having an immediate state? Compiling each line into a temporary buffer and executing? That might eliminate your whole issue. 17:24:35 but with my vm, it's very wasteful (speed and space) to just memcopy the definition in 17:24:53 don't think that would work 17:25:25 If you memcopy the 1 opcode, isn't that exactly the same as what : DUP 1 op, ; immediate does? 17:25:27 well, maybe it would 17:25:33 no 17:25:38 I pack opcodes into words 17:25:43 5 or 6 of them 17:26:03 Oh. So your inliner would have to do that instead of a memcopy. Same idea. 17:26:31 right. so for the compiler, it should really do "1 op," anyway 17:26:38 Sure. 17:26:39 so it seems logical to have that be the def of DUP 17:26:56 Seems to me it complicates the rest of your implementation not to have an inliner. 17:27:14 really? 17:27:24 From here. You know the lay of the land better than I do, of course. 17:27:36 the simple way to do it would be: 17:27:41 : dup [ 1 op, ] ; 17:27:55 no inlining one way or another 17:28:03 Sure. That's a working DUP. Hardly the most efficient. 17:28:16 For efficienty you want that opcode:1 right in the target definitions that use DUP. 17:28:22 *efficiency 17:28:55 yep 17:29:00 So you can do it by making DUP a compiling word, as you've done, and then doing handstands to provide an interpreting version, and etc. 17:29:21 Or you could set up an inliner, flag such words inline, and magically they all fall into place without having to make each one a compiling word. 17:29:45 It's a factoring exercise -- remove the common op, code out of each such word into a central place. 17:30:29 that does sound appealing 17:30:36 not because of complexity of the emplementation 17:30:43 Think it over, I think you'll like it more and more. 17:30:46 but because it seems easier to switch things from inlining to not 17:30:57 I think to inline something I'll have to change the color of each source token in the def 17:31:03 (with my current approach) 17:31:21 unfortunately with the way my vm works, it is pretty complex to inlide compiled defs 17:31:31 opcode packing, and absolute addressing 17:32:51 From the description of your VM, I think I can see the outline of how you'd do it. 17:33:06 If OP, can handle the incremental packing, then that part is done. 17:33:39 If you set a (for now) restriction of only inlining words that don't do absolute addressing, you'll be able to begin with relative ease. 17:34:05 so no conditionals 17:34:18 well, for/if 17:34:27 Key thing you need for an inliner is to know the length of the word. 17:34:42 yeah, I thought of that. but that's easy 17:34:52 Yes, no absolute addressing until or if you sort out an easy way to manage it. But a huge number of your short words like DUP are going to be nothing but a sequence of one or more opcodes. 17:35:03 I have the defs stored seperately. so I know where the end is at compile time 17:35:33 A relative-branch instruction might be a nice thing to have, to work around the absolute addressing issue. 17:35:42 gotta make sure you don't inline the ; though 17:35:47 Right. 17:35:57 so you do something like this? 17:36:05 : dup 1 op, inline ; 17:36:05 ? 17:37:03 No... 17:37:07 : DUP [ 1 op, ] ; inline 17:37:20 It's a flag, like immediate. 17:37:32 so your inliner just won't inline a ; ? 17:37:38 Right. 17:37:53 hmmm 17:38:00 All the heaving lifting is done in the inliner. 17:38:24 Not that it's heavy; quite a short routine. 17:38:44 Mine also reverses tail-calls. 17:39:04 Converts them back from jumps to calls. 17:39:27 I'll think about it 17:39:45 seems I would need a dissassembler to make it work in my environment 17:39:51 How come? 17:40:15 Surely just a recognizer that can spot an RTS-equivalent? 17:40:44 Or, more simply, won't the RTS be the last instruction in all such inlined words? So OP, all but the last opcode. 17:41:01 what's rts? 17:41:10 ReTurn from Subroutine 17:41:11 Return from Subroutine. Exit. 17:41:22 Whatever your VM equivalent is. 17:41:31 ; if you like. 17:42:04 RTS is the name the 68K processors use, isn't it? 17:42:22 Yes. 17:42:48 man, hadn't thought of reversing tail-calls 17:42:58 but I figured there'd be stuff like that that would make it complex 17:43:30 That's the only one I've run into. 17:43:45 it's only at the end...you leave out the return, and if the last thing was a call, you make it a branch. 17:44:13 seems complex to me just knowing what the last one is 17:44:23 I mean knowing that it is the last one 17:44:26 you have to look ahead 17:44:32 or do some complex counting 17:44:46 You already know the length of the word in opcodes, right? 17:45:07 words hold up to 6 opcodes 17:45:21 sometimes only 5 fit 17:45:32 But you'd know how many you laid down at compile time. 17:45:34 sometimes it has less because allignment is required 17:45:37 Store that. 17:45:49 I'd have to store how many opcode-words 17:45:55 and how many opcodes in the final word 17:46:05 or just opcode-words and look ahead 17:46:14 That's a complexity incurred because of opcode-packing, unfortunately. 17:46:35 But certainly you can store, at compile-time, all the information you need to do the inlining. 17:46:37 Oh. You'd also have to deal with exiting from the middle of a word too, wouldn't you? 17:46:59 That's starting to sound like a nuisance. 17:47:13 Tathi, it's not a nuisance; you copy everything but the final exit. 17:47:31 Well, I do, anyway. :) If you have an EXIT in an inlined word, it compiles an EXIT into the target word. 17:47:42 ah, ok. 17:47:49 That's an extremely minor issue. I think it's come up once in seven years. 17:48:03 I gotta get ready to go. 17:48:08 thanks for the idea. I'll mull it over 17:48:11 Sure! 17:48:12 Err...now I'm confused. 17:48:26 : foo 1 . 2 . exit 3 . ; inline 17:48:35 : gah 4 . foo 5 . ; 17:48:43 gah -> 4 1 2 ok 17:48:55 Yeah. 17:48:58 yikes 17:49:02 Jason uses multiple exit points a LOT. 17:49:18 Those aren't words you'd want to inline, then. 17:49:42 That's a lot of stuff you can't inline. 17:49:49 I'm thinking primarily of the myriad words that map directly to a simple sequence of opcodes. 17:50:04 Sure, a number of things won't be ideal for inlining. But a lot of stuff is. 17:50:04 Yeah, I suppose. 17:50:41 Just suggesting it as a way to get around the complexities he's currently wound up in, managing each definition as its own compiler. 17:51:04 Right. 17:51:30 As a code-copying facility, it can provide optimization options for the programmer, too. 17:51:38 Given that they understand it copies code, and what that means. 17:52:01 One user in seven years expressed a desire for inlined EXITs to be converted into branches to the end of the sequence. 17:52:26 But knowing they aren't, you can code around that without any great effort, should you need to make such a definition inlined for some reason. 17:53:17 Quartus Forth definitions are position-independent code, anyway, so that makes the inliner somewhat more generally applicable -- but it is nonetheless rarely used in apps. 17:53:42 It is used quite a bit in the kernel. 17:54:40 A hundred words are inlined. 17:55:04 Many new defined words are too -- constants, and variables, for instance. 17:55:13 Sure, but EXITs are much more infrequent in standard forth. 17:55:32 They're infrequent in definitions like DUP in your VM, too. 17:55:56 A constant in Quartus Forth defines as this: 5 constant foo generates : foo 5 ; inline 17:55:57 Herkforth provides conditional exit words, and uses them almost as often as IF..THEN 17:56:14 Especially for short words. 17:56:24 tathi, I don't dispute that. But are there not still a huge body of kernel words that are just opcode sequences? No EXITs? 17:57:09 Sure. I'm just saying, anything that contains control flow, no matter how short, is about 50% likely to have an EXIT-equivalent. 17:57:25 Ok. 17:58:29 Were it me, I'd experiment with converting those during inlining to branch instructions. Or not inlining such words. 17:58:46 As a general rule of thumb, I'd say that words with control flow are too long to be usefully inlined anyway. 17:58:55 Yeah. It might not be a problem. 17:59:52 It also need not be a programmer-accessible facility, should it prove to have restrictions that make it only of primary use in the kernel itself, and you don't feel like documenting the caveats. 18:02:09 Personally I found the inlining facility of tremendous use in building the kernel; far simpler than making state-smart compiling words, or having two wordlists. 18:02:34 Certainly I believe it to be a simpler approach than on-the-fly generation of interpreting versions of compiling words. 18:03:35 I rather like two wordlists myself. But then, I've never added support for multiple vocabularies to my forths, so it's not much of an issue. 18:03:47 And automatically inlining variables and constants is trivial, and its a free optimization. 18:04:08 True. 18:04:23 Since working with module/end-module, I'm greatly enamored of wordlists. 18:04:23 Though I think herkforth, being a colorforth, already has that fairly well centralized. 18:04:50 tathi, perhaps - I'm not familiar with its internals, except as they are reflected in discussions with JasonWoof. 18:05:19 I'm not sure either. Haven't played with it in quite a while, since he has been doing major refactoring. 18:07:16 Inlining gives me most -- all? -- of the advantages of two wordlists for compilation, without the overhead of the additional definitions. 18:08:57 I can see that. I suppose it's mostly just a habit for me. 18:09:31 I would find it troublesome to write all the additional unit tests, and to maintain two definitions instead of one. 18:09:48 Oh, I don't maintain two definitions. 18:10:18 You have to, though you might have some syntactic sugar to make it seem as though it were one. 18:11:08 Hmm. 18:11:22 Even a state-smart word is effectively two definitions separated by a conditional. There aren't many of those, though. 18:11:53 Oh, I see. I just have a word IMMEDIATE that ensures the latest definition has headers in both lists (which I rarely use). 18:12:12 and a word COMPILED that creates an executable version of the latest "macro". 18:12:22 I see. 18:12:34 And I pretty much just test the compiled version to ensure that it's working correctly. 18:13:01 That strikes me as a complicated solution. 18:14:10 But if it's what Chuck is doing, maybe there's some uber-minimalist reason for it. :) 18:14:14 Yeah, my compiler tries to do optimizing before it actually compiles things, and it's kind of decentralized. 18:14:23 Oh, I don't particularly follow Chuck. 18:14:44 It's just that I have more invented forth than learned it. 18:15:32 So I often don't know about the "usual" way of doing things... 18:15:51 And wind up doing things instead that are interesting, but perhaps not as clean. 18:16:29 Well, I've sometimes found myself tangled in the wires such as JasonWoof described, and when that happens, the answer is always 'factor'. 18:17:04 Absolutely. :) 18:18:34 In this case, that says to me to factor out the compiler-function of each of these short words, and let them instead be the data for a central routine that does it instead. 18:19:33 Which is fundamentally how any \Forth operates on an abstract level anyway. 18:22:03 The simplest description of the compilation part of Forth reads words, gets their code address, and compiles a call. Inlining is a trivial extension of that. 18:22:28 Imagine if there were no compilation loop -- every word would have to manage its own compilation. 18:22:43 And I'll bet somebody somewhere has tried it. :) 18:24:25 There are some crazy people out there. :) 18:24:55 I've encountered proponents of eliminating the handling of literals, too, requiring that any such be prefixed with (lit) or similar. 18:25:00 I should know - I'm probably one of them. ;) 18:25:11 That usually precedes the suggestion of removing all forward-parsing words. 18:25:12 Now that just sounds ugly. 18:25:29 so you'd have (string) foo : (lit) 5 . ; 18:25:41 Yup. 18:25:49 Catch is that (string) is still forward-parsing. 18:26:16 You have to parse somewhere. 18:26:19 An alternative approach caches any unrecognized text as a string, but I'm sure you can see the immediate problems with that. 18:27:01 Such as the inability to redefine an existing name, and the problem of what to do with strings that aren't consumed. 18:30:53 I suppose (lit) could set a flag, instead of foward-parsing. But at the end of the day these all seem like pointless exercises to me, an effort to make the language 'regular'. I get the same sort of feeling about functional languages, though I can't claim any particular expertise there. 19:34:58 --- nick: tiff -> Raystm2 20:28:38 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 20:31:06 --- quit: snowrichard (Client Quit) 21:28:59 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 21:30:38 --- quit: snowrichard (Client Quit) 21:57:27 --- quit: sproingie (Remote closed the connection) 23:59:59 --- log: ended forth/05.10.22