00:00:00 --- log: started forth/17.06.15 01:29:53 --- quit: karswell` (Remote host closed the connection) 01:31:16 --- join: karswell` (~user@213.2.9.51.dyn.plus.net) joined #forth 01:56:23 --- quit: mark4 (Ping timeout: 246 seconds) 02:29:48 --- quit: nighty- (Quit: Disappears in a puff of smoke) 02:41:57 --- join: true-grue (~true-grue@176.14.219.178) joined #forth 02:47:54 --- join: GeDaMo (~GeDaMo@62.56.75.248) joined #forth 03:21:19 --- join: wa5qjh (~Thunderbi@121.54.90.130) joined #forth 03:59:56 --- quit: wa5qjh (Quit: wa5qjh) 04:07:55 --- join: nighty- (~nighty@s229123.ppp.asahi-net.or.jp) joined #forth 04:34:55 --- join: MickyW (~MickyW@p4FE8D178.dip0.t-ipconnect.de) joined #forth 04:48:25 --- join: nighty-_ (~cp@www.taiyolabs.com) joined #forth 04:48:26 --- join: opamp (~textual@97-104-93-154.res.bhn.net) joined #forth 06:02:03 --- quit: opamp (Quit: My MacBook has gone to sleep. ZZZzzz…) 06:06:33 --- join: mtsd (3e5f4c02@gateway/web/freenode/ip.62.95.76.2) joined #forth 06:31:58 --- quit: GeDaMo (Ping timeout: 258 seconds) 06:45:28 --- join: GeDaMo (~GeDaMo@212.225.125.110) joined #forth 06:55:51 --- join: Chef_Gromboli (~Chef_Grom@static-72-88-80-103.bflony.fios.verizon.net) joined #forth 07:11:38 --- join: GeDaMo1 (~GeDaMo@212.225.125.110) joined #forth 07:11:38 --- quit: GeDaMo (Disconnected by services) 07:12:33 --- nick: GeDaMo1 -> GeDaMo 07:30:09 --- join: opamp (~textual@97-104-93-154.res.bhn.net) joined #forth 07:40:01 --- quit: mtsd (Ping timeout: 260 seconds) 07:51:11 --- quit: opamp (Quit: My MacBook has gone to sleep. ZZZzzz…) 09:07:11 --- quit: ZarutianPI (Read error: Connection reset by peer) 09:07:21 --- join: ZarutianPI2 (~pi@168-110-22-46.fiber.hringdu.is) joined #forth 10:06:14 --- quit: MickyW (Quit: Leaving. Have a nice time.) 10:15:53 been reading a bit about effiency of code, spefically code density. 10:16:38 It is sought after because if your code fits into Level 1 instruction cache then it wont be hit by memory fetch penalty 10:17:22 lets put aside the question of instruction execution pipelining for a while 10:18:23 the funny thing is, at least from my perspective, is that an entire 80's sized Forth VM fits into L1 caches or at least into the onchip L2 cache 10:22:55 --- join: meta4 (~jgw@c-24-8-47-119.hsd1.co.comcast.net) joined #forth 10:23:08 I fucking hate forth 10:24:05 why can't you create variables within a loop? 10:25:20 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 10:26:24 for a minute I thought you were mark4 and I was real confused 10:27:11 lol, sorry 10:28:17 ok, I don't HATE forth, but it's very frustrating trying to keep track of the stack within loops 10:28:48 --- join: mark4 (~mark4@99.30.241.51) joined #forth 10:29:23 You could try breaking the body out into a separate word 10:29:32 E.g. do i body loop 10:29:44 So you pass the loop variable on the stack 10:29:53 (Assuming you need it) 10:33:03 you can use locals in a loop in gforth: 10:33:03 : bar 10 0 do i { x } x x * . loop ; 10:37:27 basically I was just trying to set a flag, 0||1 10:53:01 like this (non-correct) code: : bar 10 0 do i 2 mod 0= if 0 { x } else 0 { x } then ." flag: " x . cr loop ; 10:55:01 oh, um, nvrmind - typo... 10:55:39 perhaps: 10:55:42 : bar 0 { x } 10 0 do i 2 mod 0= if 0 to x else 0 to x then ." flag: " x . cr loop ; 10:56:21 I'm not sure why you need x at all in that example, presumably your actual code is more complex 10:58:40 well, it shouldn't be complex.. for practice I was trying to write a primes finder using division test 11:00:57 so it's nested loops and the limit of the inner is N-1, for primes 1 - N 11:00:59 Once you understand that writing a parser and tying to it similarly trivial threaded code generator isn't all that hard and doesn't waste your oh-so-precious resources, you'll learn something new. 11:02:04 : bar 10 0 do i 1 and 1 xor ." flag: " . cr loop ; 11:02:28 yeah, I guess I'm not gonna be able to jump ahead in this Forth book; the syntax is too different 11:03:14 meta4: you only do yourself a disservice by "jumping ahead" 11:04:44 GeDaMo: ok, but how do you set flags within a if-then and use it outside of that if-then? 11:05:05 think it has to be a variable 11:05:16 Depends what you want to do with it 11:05:33 You can just leave it on the stack 11:06:10 I see, yeah it's not a local like '{ x }' 11:06:41 alright, off to other things for now 11:10:47 --- nick: ZarutianPI2 -> ZarutianPI 11:45:06 I really prefer the DSSP way of doing loops. http://web.archive.org/web/20120207091751/http://www.forth.org.ru/~dssp/msdos_e/papers/daf.txt ...just execute a word n times. 11:47:47 I considered throwing out DO ... LOOP and replace it with the somewhat classic FOR ... NEXT, but that's even more tempting. 11:52:12 : dssp_do s" 0 do" evaluate ' compile, s" loop" evaluate ; immediate 11:58:19 larsb: nothing stops you from writing most of your code with "for - next". 12:02:02 (If you have ever studied canonical code, e.g. FIG-Forth, you should know that "do - loop" is used as a primitive iterator across ranges, e.g. address ranges. That's why "do - loop" is wanted, while more restricted construct is plain redundant.) 12:09:36 --- quit: karswell` (Read error: Connection reset by peer) 12:09:41 --- join: gravicappa (~gravicapp@ppp83-237-166-163.pppoe.mtu-net.ru) joined #forth 12:11:02 --- join: karswell` (~user@213.2.9.51.dyn.plus.net) joined #forth 12:31:23 All true, but the primitive compiled by LOOP is - in my opinion - overly complex. I'd like to get rid of it. 12:34:06 I still haven't even implemented any of those in mine yet. I'm mostly getting by with just begin-while-repeat 12:34:36 Writing the code to work around semantic problems of half-assed solutions a la "djnz" is a lot worse. 12:35:12 * DGASAU wonders if "postpone" is rocket science to forth programmers... 12:37:00 what 12:39:09 If you don't write counted loops, then you're probably writing them in some uniform way with "begin - while -repeat" or not writing a lot of them at all. 12:39:24 In the latter case, you must be not writing a lot of code in Forth. 12:39:38 In the former case, you could have used "postpone" to implement shortcuts. 12:39:50 how is that? 12:40:40 : times postpone >r postpone begin postpone r> dup postpone while postpone 1- postpone >r ; immediate 12:41:23 Something like that. 12:41:33 do you understand that if somebody used that, they would meet both of the cases you just mentioned? 12:41:54 Not writing any Forth code? 12:42:12 Or not using counted loops? 12:42:21 < DGASAU> If you don't write counted loops, then you're probably writing them in some uniform way with "begin - while -repeat" or not writing a lot of them at all. 12:42:35 or they're using your method or something similar 12:42:48 maybe you're the one who thinks it's rocket science 12:42:57 If they use my method, they do write counted loops. 12:43:12 That's why they have implemented something like that in the first place. 12:51:38 --- quit: karswell` (Ping timeout: 255 seconds) 13:28:03 --- join: opamp (~textual@97-104-93-154.res.bhn.net) joined #forth 13:47:14 --- quit: MrBusiness (Ping timeout: 246 seconds) 13:48:55 --- quit: GeDaMo (Remote host closed the connection) 14:08:58 --- quit: gravicappa (Ping timeout: 240 seconds) 14:41:50 --- quit: dual (Ping timeout: 246 seconds) 14:43:39 --- quit: opamp (Quit: My MacBook has gone to sleep. ZZZzzz…) 14:47:49 --- quit: mark4 (Ping timeout: 255 seconds) 14:50:17 --- join: mark4 (~mark4@99.30.241.51) joined #forth 15:34:35 well, this explains why RTX 2010 has DONXT equiv opcode 16:01:47 --- quit: nighty- (Quit: Disappears in a puff of smoke) 16:08:41 --- join: wa5qjh (~Thunderbi@121.54.90.149) joined #forth 16:39:02 --- quit: wa5qjh (Remote host closed the connection) 16:40:37 --- quit: true-grue (Read error: Connection reset by peer) 16:47:43 --- join: nighty- (~nighty@kyotolabs.asahinet.com) joined #forth 16:49:09 --- quit: DGASAU (Read error: Connection reset by peer) 16:49:59 --- join: DGASAU (~user@lmpc.drb.insel.de) joined #forth 17:26:56 --- quit: Zarutian (Quit: Zarutian) 17:34:51 --- join: MrBusiness (~ArcMrBism@2602:306:8325:a300:e9c1:786c:6575:d9e7) joined #forth 17:48:13 --- join: dual (~bonafide@cpe-74-75-153-119.maine.res.rr.com) joined #forth 17:50:02 --- quit: dual (Client Quit) 18:01:29 --- join: dual (~bonafide@cpe-74-75-153-119.maine.res.rr.com) joined #forth 18:01:30 --- join: dual_ (~bonafide@cpe-74-75-153-119.maine.res.rr.com) joined #forth 18:01:50 --- quit: DGASAU (Read error: Connection reset by peer) 18:11:54 --- quit: dual (Quit: The early bird may get the worm, but the second mouse gets the cheese) 18:12:12 --- quit: dual_ (Quit: I cna ytpe 300 wrods pre mniuet!!!) 18:12:33 --- join: dual (~bonafide@cpe-74-75-153-119.maine.res.rr.com) joined #forth 18:20:37 --- quit: Chef_Gromboli (Quit: Leaving) 18:29:11 --- join: opamp (~textual@97-104-93-154.res.bhn.net) joined #forth 18:33:34 --- quit: opamp (Ping timeout: 260 seconds) 18:54:36 --- quit: dys (Read error: Connection reset by peer) 19:09:42 --- quit: mark4 (Quit: Leaving) 19:12:28 --- quit: Uniju (Ping timeout: 245 seconds) 19:19:16 --- join: wa5qjh (~Thunderbi@121.54.90.149) joined #forth 19:36:20 --- quit: wa5qjh (Remote host closed the connection) 19:51:12 --- join: DGASAU (~user@lmpc.drb.insel.de) joined #forth 21:11:51 --- join: karswell` (~user@213.2.9.51.dyn.plus.net) joined #forth 21:34:23 --- join: dys (~dys@ip-109-44-3-111.web.vodafone.de) joined #forth 23:59:59 --- log: ended forth/17.06.15