00:00:00 --- log: started forth/13.04.30 00:11:42 --- nick: ASau` -> ASau 00:14:38 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 00:44:05 --- quit: dto (Remote host closed the connection) 01:26:07 --- join: epicmonkey (~epicmonke@188.134.41.112) joined #forth 03:11:46 --- join: protist (~protist@175.172.69.111.dynamic.snap.net.nz) joined #forth 04:39:12 --- quit: cataska` (Remote host closed the connection) 05:08:37 so if i want to drop sth from RS,i should use r> drop? is there any one word version? 05:12:51 yunfan: You can make one. :D 05:13:25 ttmrichter: i mean the native code 05:13:32 You can still make one. 05:13:38 Just write the assembler word. 05:13:44 ah, got it 06:18:54 ttmrichter: and why they have two words I and R@ acts same? 06:19:53 I'm not sure. 06:20:16 http://www.forth.com/starting-forth/sf5/sf5.html 06:20:19 check this 06:20:34 from the illustration, I and R@ acts the same 06:21:57 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 06:25:35 yunfan: i almost wonder if that's an error... 06:25:51 but in any case I and J are used for FOR loops. 06:26:03 Yeah, I'm pretty sure that's an error. 06:26:13 I should copy the second item, I think. 06:26:38 tangentstorm: that's why i ask here, i doubt its wrong in typo 06:26:56 well let's think it through. 06:27:22 one of the rules is you can't return from a for loop (because it's using the return stack) 06:28:07 does FOR always increment by 1? or is there a step? 06:28:55 it's DO 06:29:07 Nope. R@ and I are the same thing. And J is the third item on the return stack. 06:29:09 Very odd. 06:29:29 I and R@ being aliases might make sense just for naming convention purposes. 06:29:38 But J being #3 makes no sense to me at all. 06:30:30 ttmrichter: if you use for loop, the first and second parammeters are the loop control 06:30:50 then J could be another paramater which might use for other things 06:32:03 I think the return stack must contain both the counter and the end value, and it must do a comparison. 06:32:18 I think it must always increment by 1, but i'm not sure. 06:32:27 yunfan: Oh, to go waaaaaaaaaaaaaaaaaay back to your original question. 06:32:31 I'm slapping my forehead here. 06:32:32 rdrop 06:32:44 That's the word that drops the top of the return stack. 06:32:46 Duh. 06:32:52 I feel like a moron now. 06:33:31 so in a nested loop it must be: ( J I ) 06:33:43 ttmrichter: is it your found or an exists wrod? 06:33:45 word 06:33:53 It's in the spec. 06:34:06 ok that's what i need 06:34:10 i like balance 06:42:09 --- quit: dto (Remote host closed the connection) 07:13:16 ttmrichter: tangentstorm just found the difference 07:13:47 : test2 do ." R@: " r@ . ." I: " I . ." J: " J . cr loop ; ok 07:13:50 cr 5 0 test2 07:13:52 R@: 2147483643 I: 0 J: 269104071 07:13:54 R@: 2147483644 I: 1 J: 269104071 07:14:48 it seems their difference is the sign? 07:15:29 ... 07:16:11 i've no idea, its just 2147... seems like 2^31-1 07:16:37 it's... counting downward. 07:17:06 computers like to count downward. 07:17:39 is it? i see they are incred by +1 07:17:40 i'm suprised it isn't counting downward from 5 07:18:01 are you sure it's 2^31-1 and not 2^31-5? 07:18:07 * tangentstorm does the math 07:18:19 * tangentstorm tells python to do the math :) 07:18:34 you're right 07:18:42 >>> 2**31-5 07:18:46 2147483643L 07:18:51 i am using python too :] 07:19:00 ok 07:19:28 yeah it's doing some bit-twiddling there. 07:19:40 it's basically hacking it to act like -5 07:20:05 got it, when it go to 0 , the loop could be stop 07:20:11 yeah 07:20:26 so, there isnt 2 parammeters for control the loop structure 07:20:29 only one 07:20:30 except if it's really adding 1 then bit 32 should be 1 07:20:33 it should be -0 07:21:44 interesting optimization 07:21:51 like it'll hit %0111111... and then roll over to 1000000 07:22:04 and then they check that bit or something. 07:22:17 the loop word check that 07:22:22 wait 07:22:33 am i being dumb here? 07:22:36 hang on 07:22:52 i was off by one .. .ok 07:22:56 2 ** 8 = $ff 07:23:03 or 11111111 07:23:21 yep 07:23:23 so on an 8 bit machine, that would roll over to 00000000 and set an overflow flag 07:23:45 so you can either check for zero or check the overflow flag. 07:24:00 so I must undo that optimization. 07:24:14 but if that's the case i wonder why J is the 3rd stack value. 07:24:22 what's in between? 07:24:26 i don't believe it. 07:24:29 yep, there's an condition branching opcode in intel cpu 07:24:34 i saw that in CSAPP 07:24:38 i also don't think J and I even work outside of DO 07:24:58 but i do think loop dont use that 07:25:15 been a long long time since i did any assembly hacking, but that does sound vaguely familiar. 07:26:38 tangentstorm: I and J do work outside of loops. 07:26:44 btw, would this overflow checking failed on my i7 cpu which is x86_64 cpu but i run i386 and pae kernel t 07:27:02 the gforth thought its running on i386 platform 07:27:27 : test ( x y z -- ) >R >R >R R@ . I . J . rdrop rdrop rdrop ; 07:27:34 Try that with 10 20 30 test 07:29:18 ttmrichter: it cant stop 07:29:55 What? 07:29:59 Which Forth are you trying this in? 07:30:04 In gforth it works fine: 07:30:16 : test ( x y z -- ) >R >R >R R@ . I . J . rdrop rdrop rdrop ; ok 07:30:16 10 20 30 test 10 10 30 ok 07:30:18 ttmrichter: gforth i just compiled that this afternoon 07:30:56 ttmrichter: i got infinite loop and output 07:31:14 But ... I just cut-and-pasted my gforth session there. 07:31:17 btw, the J's value is like what i ouput in test2 07:31:28 so i guess its the return address 07:31:28 ttmrichter: oh i was looking at the 83 standard because it's easier to navigate. guess that changed with ANS 07:32:01 ttmrichter: let me paste and run again 07:32:05 --- quit: protist (Quit: Konversation terminated!) 07:32:35 ttmrichter: same thing happen 07:32:52 Weird. Looks like you've got a bugged gforth or I do. 07:33:03 maybe its about my pae kernel stuff 07:33:04 tangentstorm: I still think the '83 standard is the best one overall. 07:33:32 the amd 64 version ubuntu lack of many packages, so i installed i386 version with a pae kernel 07:36:10 The only way I can see this being an issue is if you've got gforth compiled one way and your kernel/userspace compiled another. 07:37:06 i just download the source tarball from official and then use their shell script BUILD-FROM-SCRATCH 07:37:12 its gforth-0.7.2 07:41:52 Mine's 0.7.9 07:41:55 Built the same way. 07:43:04 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 07:43:50 ttmrichter: http://paste.ubuntu.org.cn/204149 this is the output of my `uname -a` and `gcc -v` 07:46:11 now even cant using bye :] and ^-c , buggy 07:49:46 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 07:51:26 ttmrichter: sorry i made a big mistake 07:51:43 ttmrichter: the console i use is SwiftForth 07:52:26 just found on gforth i and r@ output the same while on SwiftForth not 07:53:53 You'd have to check SwiftForth's docs on i and r@ and such. 07:57:51 and the book explain j in nested loop sample 07:58:04 j could be the outer loop's index value 08:01:02 * yunfan drinking kvass :] 08:01:16 :O kvass 08:01:32 kulp: you like it? 08:01:32 i haven't had kvass in ... like fourteen years 08:01:41 well i don't really remember ;) but i didn't dislike it 08:01:47 my parents brought some home from russia 08:01:48 yunfan: I've taken to drinking it lately, but that Wahaha stuff isn't the real thing. 08:02:00 * ttmrichter misses the real thing. 08:02:32 kulp: i just bought that from an online supermarket , coundt believe could bought that in china 08:02:54 --- quit: dto (Ping timeout: 272 seconds) 08:02:58 yunfan: why, are alcoholic drinks highly regulated there ? 08:03:00 ttmrichter: you got it, i just driking the wahaha brand kvass 08:03:13 Yeah, the real stuff is far richer in flavour. 08:03:28 kulp: I think I could send my five year old son to the local store to buy hard liquor for me. 08:03:43 It's about as regulated as ... a completely unregulated thing. (My simile engine is offline; too tired.) 08:04:00 ttmrichter: are you in china too, or germany ? :P 08:04:06 China. 08:04:08 aha 08:04:09 ttmrichter: yes, chinese children has more freedom than westen country onee 08:04:12 interesting 08:04:42 Weirdly enough, kulp, in most day-to-day affairs the average Chinese person has more freedom and fewer interactions with police than the average, say, American. 08:04:45 he could also by tobacoo or driving 08:04:56 ttmrichter: interesting 08:05:01 I'm not sure my son could drive legally. 08:05:03 ttmrichter: pity you can't breathe the air, though ! 08:05:10 ;) 08:05:14 The inevitable accident would have the cops coming down hard on me in seconds. 08:05:33 ttmrichter: the problme is no one would think he couldnt drive if he have learnt driving 08:05:33 ttmrichter: do you speak chinese ? 08:05:46 (i know chinese is not a spoken language per se) 08:05:49 (i mean some dialect of) 08:06:34 kulp: I speak "Survival Chinese". Enough Mandarin to get buy in day-to-day matters. 08:06:40 kulp: i just couldnt believe a foreight wine could be bought easily on super market, that made me superise 08:06:51 yunfan: ah, i see 08:06:51 but maybe its just the beijing's special case 08:06:54 yunfan: You haven't been paying attention. 08:07:04 I can get any major brand of liquor here in Wuhan even. 08:07:12 It's trendy right now. 08:07:45 ttmrichter: i know you could buy those at special shelf 08:07:46 (It's also a bit overpriced for my tastes.) 08:08:13 but this one, i have saw it on the shelf which holds cola and chinese wine 08:08:37 The cheaper stuff I can get just off the rack right next to the 白云便 (not sure of the last character; don't have a bottle to check). 08:08:41 only see this and beers which are forginor brand 08:09:17 I see Bombay Sapphire gin in my local supermarket a ten minute walk from home. 08:09:36 that's cool 08:09:44 btw, i often see in the movie 08:09:47 I think there's Jack Daniels too. 08:09:52 a white guy just drink wine like water 08:10:01 haha i was just going to ask about bombay sapphier 08:10:01 But I don't really drink whiskeys so I didn't pay much attention. 08:10:03 sapphire 08:10:09 but what about blue sapphire ! 08:10:09 ;) 08:10:32 I've never heard of that one. 08:10:33 and he looks didnt rich 08:10:42 Bombay Blue and Bombay Sapphire are available. 08:10:52 so if wine is cheaer in westen country compare to wine in china? 08:11:01 What kind of wine? 08:11:14 'Cause 白酒-equivalents tend to be pretty pricey actually. 08:11:22 i dont know , the color is brown 08:11:31 maybe whiskeys? 08:11:42 You can't buy 5l bottles of hard liquor in Canada, say, for $10 which I can do the equivalent of here (although the stuff is putrid!). 08:11:59 Browns can be whiskeys or dark rums, usually. 08:12:11 often saw in movie a poor police officier(who would be a hero next 90minutes) drink those like water 08:12:49 Well there's cheap whisky like there's cheap 白酒. But it's still more expensive than here. 08:12:49 ttmrichter: oh i messed it up never mind 08:12:56 i just wonder if he could afford for his hobby 08:13:05 Sure he could. 08:13:13 Just don't have anything else. :) 08:13:40 ttmrichter: you cant compare the absolutely price in china 08:13:50 --- join: Tod-Work (~thansmann@50-202-143-210-static.hfc.comcastbusiness.net) joined #forth 08:14:04 I'm not. I'm comparing relative pricing. 08:14:07 ttmrichter: you need the compare their price in local currency and the local incoming number 08:14:18 I can get 5l of cheap 白酒 here for 60RMB. 08:14:41 I can't get 5l of *any* hard liquor in Canada for a comparable price, even with cost of living adjustments. 08:14:54 60RMB would be about $60 (give or take) in Canada. 08:15:10 And for $60 I could get 3 750ml bottles of cheap whiskey. 08:15:17 ttmrichter: but the 60 RMB ones in china is not the original wine i think 08:15:30 I don't know what it is, but it's putrid. :) 08:15:37 ttmrichter: its made of alcohol and water 08:16:01 Yeah, very likely. 08:16:11 But as I said, I can't get ANYTHING comparable in Canada. 08:16:13 if you want real wine, you need pay more than 100RMB from my opinion 08:16:31 For 5l of it maybe. :) 08:16:52 what about european country? 08:17:07 5L is a large quantum 08:17:22 Most western countries tax hard liquors. 08:17:35 If you go with red and white wines or beers the taxes are more variable depending on where you go. 08:17:53 Germany has practically no tax on beer for example; France practically none on red or white wines. 08:18:18 got it 08:18:38 do people pay tax for their homebrew? 08:19:28 Highly variable. 08:19:38 In Ontario, they're supposed to (but my father never did). 08:20:28 westen country police is interesting 08:20:37 Which ones? 08:20:39 i see many freedom and limitation 08:20:58 American cops are ... not necessarily the most pleasant human beings int he world. 08:20:58 but i think maybe its what they say right and duty 08:21:10 Don't confuse movies with reality. 08:21:35 A lot of that "duty" stuff is ... not reflected in real cops. 08:22:20 and i just saw from wikipedia, in austrilia they are forced to do voting 08:22:31 if they dont , would got fine 08:22:56 Let me show you Canada's national police force in action: http://www.youtube.com/watch?v=1CR_k-dTnDU 08:23:40 That's a fruitless law. 08:23:56 It's a feel-good thing that just encourages people to spoil their ballots. 08:26:02 ttmrichter: you 'are canadian 08:26:09 Yes. 08:26:58 it seems you dont like all peopare equal in ballots 08:27:11 I think the ballot is a sham. 08:27:19 A bunch of rich people decide who you get to vote for. 08:27:23 Then you have a "choice". 08:27:34 It's idiotic. 08:28:24 oop 08:29:01 i got the oppusited understanding 08:29:09 You're intended to. 08:29:20 The people who decide who you get to vote for don't want you knowing that's how it works. 08:29:41 So you get loads of advertising and pressure (like that Aussie law) to make you think it's somehow your duty to uphold the sham. 08:30:56 every one hashis own target 08:31:37 I'm not sure I understand. 08:32:02 --- quit: kumul (Ping timeout: 272 seconds) 08:32:25 i just wonder what you want to do fo avoiding the "sham " might lead us to 1984 08:33:01 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 08:34:07 well i already in, i hope you freedom man wont :] 08:36:00 Oh, Orwell was absolutely correct. 08:36:06 The only thing he got wrong was the date. 08:36:39 His saying that history is just the ongoing, never-ending struggle of the middle class trying to switch places with the upper class is the truth. 08:37:01 Oh, perhaps it's more accurate to say that Orwell and Huxley together were correct. 08:37:09 By themselves they each got important things wrong. 08:38:25 ttmrichter: and what's the problem of china do you think ? 08:38:41 Paranoid leadership holding back the populace. 08:39:03 Absolutely hideous educational system that actively interferes with education just when China needs education the most. 08:39:10 Selfishness. 08:39:13 Those would be the big three. 08:39:57 Anyway, I'm hitting the sack. 08:39:59 Chat later. 08:40:49 ok 08:53:45 --- join: c00kiemon5ter (~c00kiemon@foss-aueb/coder/c00kiemon5ter) joined #forth 08:54:45 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 09:15:01 --- join: tathi (~josh@dsl-216-227-91-150.fairpoint.net) joined #forth 09:15:02 --- mode: ChanServ set +v tathi 09:19:55 Hmm...just saw the logs, thought I'd pop in for a couple of things... 09:20:14 RDROP drops the top item of the rstack -- it's not in any standard, but it's somewhat commonly available... 09:20:50 I and R@ have different names because they don't have to be the same at all (though often they are). 09:21:05 R@ puts the top item of the rstack on the data stack 09:21:19 I extracts the current loop index from whatever DO put on the rstack. 09:21:29 But there's no standard for what DO puts on the stack. 09:22:02 That totally depends on the Forth. Could be ( index limit ) or ( limit index ) or anything else. 09:22:33 Some systems subtract the limit from the index so that the loop stops when the index wraps around to zero. 09:22:49 So on those systems you would have something like : I 2R@ + ; 09:23:31 Is that more than you ever wanted to know about it yet? :) 09:27:45 --- quit: Nisstyre (Quit: Leaving) 09:27:51 tathi: have tested that ont SwiftForth 09:29:23 tested what? 09:29:30 anyway, its realy clear of your talking, are you live on forth tathi 09:29:44 tathi: tested what you said i and r@ 09:29:47 Ah. 09:29:55 Yeah, they're often the same; that's the traditional thing. 09:30:12 I'm not on IRC as often as I used to be. 09:30:17 they are same on gforth while not same on swifthforth 09:30:24 Ah, I see. 09:30:49 I've been tinkering with Forth for about 12 years now, so I have picked up a bunch of these little bits of history... 09:30:51 so can i add you to my contact if you have gtalk ? 09:31:18 Er...I have a google login, dunno about gtalk 09:31:19 brb 09:31:54 ok , i hope next time you could arrive here earlier :] 09:53:49 heh 09:55:52 Ah, I see, gtalk requires a gmail account. 09:56:23 which I don't particularly want... 09:56:55 --- quit: kumul (Ping timeout: 256 seconds) 09:58:49 tathi: it doesn't 10:00:31 it says it does... 10:00:40 Oh, I didn't read the whole thing. 10:00:47 You have to sign up for one, but then you can delete it. Nice. 10:04:51 And...they won't let you sign up for gmail without making a phone call to you. Forget that. 11:00:08 --- quit: jdavidboyd (Remote host closed the connection) 11:02:05 --- quit: Inode (Ping timeout: 256 seconds) 11:06:56 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 11:13:07 --- quit: dto (Remote host closed the connection) 12:14:04 --- join: Inode (~inode@109.169.40.195) joined #forth 12:18:27 --- join: fantazo (~fantazo@213.129.230.10) joined #forth 12:25:32 --- quit: Inode (Ping timeout: 255 seconds) 12:33:18 --- join: Inode (~inode@time.uk.chromedpork.net) joined #forth 12:40:42 --- quit: Inode (Ping timeout: 245 seconds) 12:42:07 --- join: Inode (~inode@time.uk.chromedpork.net) joined #forth 12:49:34 --- quit: Inode (Ping timeout: 248 seconds) 12:57:21 --- join: jdavidboyd (~user@72.185.97.240) joined #forth 13:01:03 i was proud of myself for *finally* getting to the point where my homebrew forth would add numbers 13:01:23 but then i went back to list all the words to be implemented and ... wow. so i'm only just starting 13:01:27 hehe 13:02:15 two weeks of re-learning x86 assembly nights and some weekend time - and now i'm realizing i have so long to go 13:02:38 well how many do you plan to implement in assembly ? 13:02:49 you could probably implement maybe a dozen in assembly and the rest in forth 13:02:59 Eh. I think it's more than a dozen. 13:03:09 But it does go faster once you can code in Forth. 13:03:25 bluekelp: this project? https://github.com/bluekelp/uforth86 13:03:40 yeah i need a few more words (primitives) then i might be able to do the rest inside itself 13:03:43 that's the plan 13:03:45 tathi: yes 13:04:28 but i'll need to redo all the interpret/execute/etc words (currently asm only) to "match" the Starting Forth "reference implementation" 13:04:39 every time i see bluekelp i think someone is talking to be because people call me kelp 13:05:03 but it's only ~3kb w/o compiler. so it's small. which was the primary goal 13:05:12 yeah, i keep thinking ppl are talking to me too 13:06:31 --- join: Onionnion (~ryan@adsl-68-254-164-186.dsl.milwwi.ameritech.net) joined #forth 13:07:11 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 13:07:25 anyway. my first forth. i'm happy. taking a break while on vacation though. maybe 13:07:53 \o/ 13:08:02 you'll probably beat me to finishing mine 13:10:15 anyone know details or links to how to implement an assembler in a forth? refs to polyforth say it has one, swiftforth probably does too. 13:10:51 not sure if the C based ones like (?) gforth include assemblers or not 13:10:56 gforth has a bunch 13:11:07 win32forth has one 13:11:29 there are a bunch of ways to do it, depending on how fancy you want to get... 13:11:52 x86 is kind of irregular, which makes it annoying in some ways... 13:12:06 iirc the one win32forth uses is fairly readable 13:12:09 ideally something to help me bootstrap my own project :) i don't consider an initial "stdin dump" to be part of the size of the system 13:18:16 eh, I take that back, it's kind of huge. 13:22:12 with @ and ! i might be able to peek and poke my way into something "the hard way" :) 13:24:30 do you have byte fetches and stores? 13:24:45 You'll want those. 13:25:57 There was recent discussiun in c.l.f which started from the origins of fig-forth Bernd Paysan described how to build metacompiler. 13:26:21 not yet. i'll make a b! and b@ or something. ! and @ are top of my list for next words 13:26:40 in theory, NUMBER and EMIT were enough to get me to "Hello, world!" 13:26:42 c! and c@ as in char 13:26:44 the architecture i'm writing for doesn't have bytes :) 13:26:54 (or at least, it doesn't have octets) 13:26:56 just cells 13:27:04 kulp: well then, you won't need to assemble x86 machine code, will you? :) 13:27:08 true :P 13:27:09 then i assume the assembly there would be cell based? 13:27:15 yeah 13:27:19 so i'm cheating 13:27:23 x86 is ugly to program for 13:27:26 * kulp programs for x86 ;) 13:27:29 hopefully not (assembling my own x86 opcodes). but we'll see 13:27:45 eventually that would be very very useful for it to do given some of the intended uses 13:27:57 OK, glancing through a bunch of Forth systems, kforth's assembler looks the most readable. 13:28:10 But I still think I'd just start from the Pentium manuals or something. 13:33:38 i'm mainly interested in figuring out how to architect one. i'm still relatively "new" to forth. keep picking it up to play with but never really dug in and wrong anything in it 13:33:45 --- join: RodgerTheGreat (~rodger@71-13-215-245.dhcp.mrqt.mi.charter.com) joined #forth 13:33:54 i wrote a forth before i really wrote much forth :) 13:34:15 said almost every forth programmer ever 13:34:34 ASau told me to learn a lot more forth before i wrote a forth 13:34:36 opinions ? 13:34:41 or i think it was he 13:36:10 I'd agree 13:36:26 it'll help design your own well. but for a simple one capable of "4 4 + 1 - ." i just followed Starting Forth and winged it 13:36:31 i'm sure it'll bite me soon 13:36:39 I spent four or five years tinkering with Forth from the implementor's end. 13:36:57 But then going and actually learning to write decent Forth code was a revelation. :) 13:37:22 kulp: my opinion is that you shouldn't take anything ASau says too seriously 13:37:27 I'm forthifying one text interpreter which I made before I knew Forth even excisted. It had stack and compilation of words with $wordname { } 13:37:52 RodgerTheGreat: yeah but maybe i'm wrong about that and only associate it with him so that i can ignore it ;) 13:38:02 lol 13:38:19 well it definitely doesn't hurt to write more forth 13:38:59 * fantazo sees that we have here the daily anti-Asau talking going on. 13:39:06 there are many people who just implement a forth interpreter and then forget about it and never get to the point of writing a real application in forth 13:39:54 RodgerTheGreat: yeah, and many of the real lessons of the language are in learning to write good code *in* Forth, I think. 13:39:55 that can be a learning experience, but you'd learn more if you also wrote something useful (for whatever definition of "useful" you like) in the actual language 13:40:02 this is hilarious. it's like ppl writing a c compiler w/o writing c. heh. but guess i'm in good company 13:40:03 yes 13:40:22 bluekelp: if I wrote a C compiler, I wouldn't write it in C 13:40:31 Oh, you're totally in good company. Seems like most people are attracted to forth because, "hey, I can write my own compiler!". 13:40:38 but really, I would avoid writing a C compiler if at all humanly possible 13:41:01 tathi: it's fun and educational, you just have to keep going after that 13:41:31 i really only started to write my own forth (other than for learning) b/c all the others are huge. i want something that's small and will (eventually) run on bare hardware 13:41:45 I've written a forth in forth, I just ALSO used that to write a game 13:42:15 RodgerTheGreat: I kind of invented Forth for myself at age 16, so I tend to think the implementation is kinda obvious and doesn't teach much. Read a line, parse a word, look it up in the dictionary, execute it or compile it. If it's not a word, maybe it's a number. 13:42:24 chuck has said that he believes everyone should write their own forth. I think it's good to experiment and tinker and try different things 13:42:29 That's about all there is to it. :) 13:42:41 true 13:42:55 but then when you start using it for things you start thinking of ways to make it nicer 13:43:06 Yeah, exactly. :) 13:43:16 like perhaps you want string literals with special-case syntax so they look nicer 13:43:28 or convenient inline anonymous words 13:43:29 etc, etc 13:43:36 and THAT is where you learn 13:43:48 but you'll only learn that way by using your language as you extend it 13:44:15 and you should read other people's forth code too, so you can incorporate their ideas 13:44:19 Hmm. I've come back around to using pretty plain Forth. 13:44:31 maybe they have some words you'd find useful, or maybe they have a better name for something 13:45:32 I might be too newbie but for me the hardest part of coding with forth is to name the words 13:45:56 finding really good names for things is always a difficult problem 13:46:15 I tend to take that as an indication that I'm factoring things wrong... 13:46:21 sometimes 13:46:38 But yeah, I spend quite a bit of time rearranging things until I find a way to break it into pieces that have obvious names. 13:46:44 So I guess it comes to the same thing. 13:47:17 that's the hard part of programming in almost any system (except asm maybe). naming. communicating and factoring for humans - not computers. 13:47:41 I keep my limit where stack jugling or memory accessing isn't obvious any more 13:48:26 bluekelp: when you're writing really well-factored code the names will take the place of most comments (in an ideal world) 13:48:27 Vuokko: yup. Old school forth seems to use a lot more global variables than I'm really comfortable with. :) 13:48:56 RodgerTheGreat: well, except for the comments about "why" instead of "how", which are usually the important ones anyway. 13:49:32 that's why I say "most" 13:49:57 fair enough 13:50:09 "how" comments generally shouldn't be there in the first place, because they're repeating the code itself (or worse, lying about the code itself) 13:50:16 hear hear 13:50:56 "why" can sometimes be expressed by the way things are factored, like if you define a nice vocabulary for creating structs they may make the layout of a record clear in a way that would otherwise require comments 13:51:15 "There are only two hard things in Computer Science: cache invalidation and naming things." -- Phil Karlton 13:51:16 you may still need a note here or there if the purpose of a field is non-obvious 13:52:52 if you have a complex algorithm, often the best "why" comment will explain the proper name of the algorithm (Floyd–Warshall all-pairs shortest path for a dense matrix) 13:53:04 so you can find out more by consulting literature 13:55:02 I debugged once some code with SEE and there wasn't comments after I looked at the source, there was \ because overflow, this works and I was so happy and enlightened 14:04:27 kulp: fun activity: implement a 1d cellular automaton in forth that prints out successive rows as ascii art or whatever 14:04:38 RodgerTheGreat: ooh hmm 14:04:44 that's a good one 14:04:58 it's complicated enough to be interesting to write/factor but will easily fit on a page or less 14:05:08 made a note 14:05:39 I've made a few things like that; if you get one to the point where you're satisfied with it we can compare notes 14:06:02 life's a blur right now, won't happen soon, but i did actually put it in my electronic todo list 14:06:06 thanks for the suggestion 14:06:16 another related fun activity is something that generates random mazes and prints them out in some ascii-art representation 14:06:43 that one's much more open-ended and depends on how complex/nice looking you want to make your output and what approach you want to take for making your maze 14:07:24 the former is mainly about 1d arrays and the latter is mainly about 2d arrays, but in either case many internal representations are possible 14:08:06 and finally an activity I often suggest is doing something like this with Forth: http://countercomplex.blogspot.com/2011/10/some-deep-analysis-of-one-line-music.html 14:08:22 very easy and allows for great creativity 14:11:13 yeah you linked that one before 14:11:19 it's in my bookmarks :) 14:11:23 cool 14:28:06 --- quit: fantazo (Remote host closed the connection) 14:31:40 I've propably asked this one before and my solution has been to take my old text parser and forthify and make it use Qt but at least I don't know any Forth for creating linux/windows crossplatform graphical desktop apps. Or am I wrong? 14:32:58 if I recall last time we discussed this you had some goofy constraints like it had to appear native but be entirely keyboard driven right? 14:34:53 --- quit: epicmonkey (Ping timeout: 256 seconds) 14:35:32 I suggested using an HTTP server and using a browser for the interface 14:36:15 it has some ugliness and caveats but could be very simple to write and would be portable 14:36:28 Well yes, I've thought through it I can be satisfied with having separate console window for my own purposes. 14:37:16 and I tried to use the browser approach but I found that would be too risky. I don't know how people make webpages which don't brake all the time 14:37:59 as I said, there's some inherent ugliness in working with a browser, but most UI libraries are pretty bad too 14:40:23 Ok. So I'm claiming some new territory when I try to make QT as my work horse :) From there I can use QtScript to make UI and do hopefully interesting things 14:50:07 --- quit: nighty-_ (Remote host closed the connection) 15:28:42 --- quit: Tod-Work (Quit: Leaving) 15:40:01 --- join: kumool (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 15:40:03 --- quit: kumul (Ping timeout: 256 seconds) 16:25:11 --- quit: kumool (Ping timeout: 258 seconds) 16:36:35 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 16:49:19 --- join: ASau` (~user@p5797F762.dip0.t-ipconnect.de) joined #forth 16:52:22 --- quit: ASau (Ping timeout: 272 seconds) 17:15:17 --- quit: dto (Ping timeout: 245 seconds) 17:45:19 --- join: kumool (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 17:46:57 --- quit: kumul (Ping timeout: 245 seconds) 17:55:20 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 17:57:14 --- quit: kumool (Ping timeout: 258 seconds) 18:28:59 --- quit: jdavidboyd (Remote host closed the connection) 18:45:59 --- join: Nisstyre (~yours@oftn/member/Nisstyre) joined #forth 18:54:15 --- join: kumool (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 18:55:49 --- quit: kumul (Ping timeout: 258 seconds) 19:05:17 --- join: xpoqp (~xpoqp@unaffiliated/xpoqz) joined #forth 19:42:47 --- quit: Onionnion (Quit: Leaving) 19:51:57 --- quit: RodgerTheGreat (Quit: RodgerTheGreat) 20:26:31 --- join: Bahman (~Bahman@2.146.52.115) joined #forth 20:26:40 Hi all! 20:30:31 --- join: Shark8 (~Shark8@69-20-190-126.static.ida.net) joined #forth 20:51:17 Ahoy, Bahman. 20:51:35 ttmrichter! 20:58:48 --- quit: kumool (Quit: Leaving) 22:07:40 --- join: Bahman1 (~Bahman@2.146.52.115) joined #forth 22:11:28 --- quit: Bahman (Ping timeout: 264 seconds) 22:14:53 --- join: Bahman (~Bahman@2.146.52.115) joined #forth 22:17:03 --- quit: Bahman1 (Ping timeout: 264 seconds) 23:32:34 --- quit: Shark8 () 23:44:23 --- quit: Bahman (Quit: Leaving.) 23:59:59 --- log: ended forth/13.04.30