00:00:00 --- log: started forth/06.09.16 00:01:56 --- quit: JasonWoof ("off to bed") 00:02:07 --- quit: lukeparrish (Read error: 110 (Connection timed out)) 00:22:07 --- quit: virsys (Read error: 104 (Connection reset by peer)) 00:45:09 --- quit: Quartus (Read error: 104 (Connection reset by peer)) 01:02:36 --- join: virsys (n=virsys@or-71-53-74-48.dhcp.embarqhsd.net) joined #forth 01:08:33 --- quit: Raystm2 (Read error: 104 (Connection reset by peer)) 01:11:21 --- join: Raystm2 (n=NanRay@adsl-69-149-62-42.dsl.rcsntx.swbell.net) joined #forth 03:17:45 --- quit: neceve (Remote closed the connection) 03:20:47 --- join: neceve (n=claudiu@unaffiliated/neceve) joined #forth 04:21:51 --- quit: Anbidian ("sleep") 05:13:09 --- join: Quartus (n=trailer@CPE0001023f6e4f-CM013349902843.cpe.net.cable.rogers.com) joined #forth 05:13:09 --- mode: ChanServ set +o Quartus 05:20:53 --- join: PoppaVic (n=pete@0-1pool46-114.nas30.chicago4.il.us.da.qwest.net) joined #forth 05:55:36 --- quit: uiuiuiu (Remote closed the connection) 05:55:38 --- join: uiuiuiu (i=ian@dslb-084-056-219-031.pools.arcor-ip.net) joined #forth 06:41:34 good morning 06:43:31 --- join: JasonWoof (n=jason@unaffiliated/herkamire) joined #forth 06:43:31 --- mode: ChanServ set +o JasonWoof 07:55:09 --- quit: PoppaVic ("Pulls the pin...") 07:56:47 --- join: PoppaVic (n=pete@0-2pool236-161.nas22.chicago4.il.us.da.qwest.net) joined #forth 08:09:03 --- quit: snowrichard ("Leaving") 08:40:32 --- nick: lukeparr1sh -> lukeparrish 09:15:46 --- join: snowrichard (n=richard@12.18.108.191) joined #forth 09:34:22 --- join: Cheer1 (n=Cheery@a81-197-19-23.elisa-laajakaista.fi) joined #forth 09:34:53 --- nick: Cheer1 -> Cheery_ 09:35:28 --- quit: Cheery (Nick collision from services.) 09:35:36 --- nick: Cheery_ -> Cheery 09:50:17 --- quit: PoppaVic ("Pulls the pin...") 11:54:35 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-105-058.pools.arcor-ip.net) joined #forth 12:05:52 --- join: AI_coder (n=AI@ip-209-124-242-76.dynamic.eatel.net) joined #forth 12:06:10 Hi Quartus. 12:09:23 Does forth allow i (loop variable) to be reset? 12:11:37 : set_i_demo 10 0 do i . if i is 5 set i to 8 loop ; 12:11:43 --- quit: Snoopy42 (Read error: 110 (Connection timed out)) 12:12:00 0 1 2 3 4 5 8 9 12:12:06 --- nick: snoopy_1711 -> Snoopy42 12:13:03 actually what I really want to do is not the generic i, but the current value of the loop variable of one loop in particular. 12:13:47 loop1{ loop2{ loop3{ loop2_counter = 5 if something } } } 12:15:23 AI_coder, no, not in any safe way. 12:15:30 Is that just a dumb C way of doing things, but forth offers a much smarter solution? 12:15:58 Yes, there's undoubtedly a saner solution; I can't see the whole problem from here, of course. 12:16:18 Even the presence of nested loops in one word suggests there's a better solution. 12:16:36 It's actually two separate words. 12:17:43 basically there is an array of xt's and a loop executes each xt like --> xt_array_size 0 do array[i] execute loop 12:18:06 So I want one of the words that are in the xt array to change the loop's counter. 12:18:45 That raises a lot more questions than it answers. But supposing that's really what you need to do, you'd want to build your own counted loop instead of using do/loop. 12:18:59 Exactly! 12:19:28 If I found myself standing there in a Forth program, I'd want to do some serious review of my approach, and reanalyze the problem domain. 12:20:13 Yeah, the program is mostly for fun to test the limits of forth, so far it's given me far more flexibility than any other programming language I've ever used. 12:21:03 Making a lot of code do exactly what you want very quickly is and good run times and small memory consumption seems to be the forth way. 12:21:07 The place to focus for discovering the expressive power of Forth is factoring. Learn to factor well; your ability to do that well will scale directly. 12:21:47 Anyway, where can I read about forth counted loops beside do/loop? 12:22:07 The other looping structures are begin/while/repeat and begin/until. 12:22:52 --- join: slava (n=slava@CPE0080ad77a020-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 12:22:53 --- mode: ChanServ set +o slava 12:23:07 Hi slava. 12:23:10 hi 12:24:13 While we're talking about forth loops, does your book include code on how to do a C/C++/C#/Java/BASH/everyotherlanguage continue keyword for loops? 12:24:54 begin/while/repeat is an exit-in-the-middle loop. It can be extended to begin/while/while/repeat/then etc. as required. 12:35:07 Another option is to factor small, and then simply exit the word from within a begin/again loop. 12:36:13 for some reason i've always found recursion more natural than loops, especially loops with early breaks... but then i'm a math guy 12:36:38 Well, tail-recursion and begin/again are the same construct. 12:36:47 almost. 12:36:56 it might require factoring out another word 12:37:03 which i like, because its a spot to stick a stack comment 12:37:18 : foo begin ... again ; vs. (fictional) : foo ... tail-recurse ; -- same construct. 12:37:28 what i mean is, foo may have code before the 'begin'. 12:37:35 Sure. 12:37:38 in that case you want to define : foo blah blah (foo) ; 12:37:45 and have (foo) do the tail recursion. 12:38:07 Yes. 13:09:23 --- quit: AI_coder (Client Quit) 13:24:03 --- quit: Cheery ("Download Gaim: http://gaim.sourceforge.net/") 14:21:41 oh man 14:22:04 Yeah. 14:30:50 --- quit: slava () 14:37:38 --- join: Amanita_Virosa (n=jenni@ppp-70-243-36-192.dsl.hstntx.swbell.net) joined #forth 14:43:55 --- quit: Amanita_Virosa ("Mew.") 15:21:25 --- quit: madgarden (Read error: 104 (Connection reset by peer)) 15:23:27 hello 15:23:59 re, lilo has left the building. 15:24:12 read that, too bad 15:24:15 some sort of bicycle accident. 15:24:19 where did you read that? 15:24:28 in #gentoo 15:24:31 ok 15:35:21 --- join: AI_coder (n=AI@ip-209-124-242-76.dynamic.eatel.net) joined #forth 15:35:32 --- quit: AI_coder (Remote closed the connection) 15:36:29 --- join: plan9 (n=stian@stimpack.sletner.com) joined #forth 15:45:36 --- join: madgarden (n=madgarde@Toronto-HSE-ppp3712926.sympatico.ca) joined #forth 15:49:58 --- nick: madgarden -> Servbot 15:51:28 --- nick: Servbot -> madgarden 16:02:59 --- join: AI_coder (n=AI@ip-209-124-242-76.dynamic.eatel.net) joined #forth 16:03:36 How do you force a definition to exit early but not crash the program? 16:04:04 exit and ;s return from a definition apparently, but they also halt my program with :invalid memory address 16:04:54 something like : word var 20 > if exit then ...do something... ; 16:05:23 problem is the program crashes when var is larger than 20. 16:08:54 it seems pretty basic to have a function return keyword that works right? or is that too much to ask? 16:09:03 shouldn't crash unless you're leaving the return stack unbalanced. 16:09:39 perhaps you should explain what you mean. 16:10:41 you can't just exit from inside a do...loop -- you need unloop. 16:11:26 The definition looks just like I posted above, the definition first asks what the variable is, if it is bigger than twenty then it should return to the calling definition. 16:12:45 If that's all it is, it should be working. 16:12:56 hehe 16:13:03 --- nick: Quiznos -> QuizMournng 16:15:00 --- quit: AI_coder (Client Quit) 16:24:07 --- quit: virl (Remote closed the connection) 16:30:07 --- quit: segher_ (Read error: 104 (Connection reset by peer)) 16:37:51 --- join: segher_ (n=segher@dslb-084-056-131-030.pools.arcor-ip.net) joined #forth 16:37:59 --- quit: virsys (Remote closed the connection) 16:55:55 --- join: AI_coder (n=AI@ip-209-124-242-76.dynamic.eatel.net) joined #forth 17:15:41 --- quit: neceve (Remote closed the connection) 17:19:06 --- join: virsys (n=virsys@or-71-53-74-48.dhcp.embarqhsd.net) joined #forth 17:31:00 --- quit: snowrichard ("Leaving") 17:33:20 --- nick: QuizMournng -> Quiznos 19:01:23 --- join: nighty_ (n=nighty@CPE00119576a9c5-CM0012c90d36fc.cpe.net.cable.rogers.com) joined #forth 19:08:37 Lo 19:15:05 Hi nighty. 19:29:55 Quartus: just got back from Niagara falls 19:30:03 First time? 19:30:08 Quartus: Yes 19:30:18 Quartus: and I got a bonus speeding ticket 19:30:24 Quartus: and the way back 19:30:32 Heh. Did you go down in the Maid of the Mist? 19:30:47 Quartus: but the cop was nice he retained only 65 over 60 19:30:52 5 over 60 19:31:00 so only a fine 19:31:03 That's good. 19:31:09 and no point off my licence 19:31:21 My new car is a little too powerful 19:31:43 you quickly are over the limits without even noticing it 19:31:56 Did you enjoy the falls? 19:31:59 No I did not go in the Maid of the Mist 19:32:07 because we were with the kids 19:32:17 and thought they would be afraid 19:32:17 You should one day, it's impressive. 19:32:39 Next time we'll go :) 19:32:56 we followed the shore to go there 19:33:07 Oakville is very nice 19:34:11 Yes we enjoyed the falls 19:34:19 It's a pleasant drive down there. 19:34:19 but they were too many people 19:34:25 Yes, that's often true. 19:34:48 The caves behind the falls are fun to visit too. 19:35:03 Oh yes we will go next time 19:35:13 in the Rock Table 19:35:14 thing 19:35:16 But the Table Rock restaurant has bad food. 19:35:23 Table Rock 19:35:29 got it reversed :) 19:38:12 The Butterfly Conservatory is also fun. 19:38:21 I did not see this 19:38:35 we must have missed it 19:38:49 It's a bit of a distance away from the falls. Worth a visit next time. 19:49:56 We bought RCMP beavers toys for the kids :) 19:50:03 :) Cute. 19:50:07 the cop who stopped me 19:50:10 so them 19:50:12 he laughed 19:50:17 Heh. 19:50:35 he said, ok sir , you do not seem like a mad driver 19:51:05 and beside someone who bought RCMP toys to its kids can't be that bad :) 19:51:15 his kids 19:52:01 Good planning. 19:52:05 and he gave a little Toronto Police pins on badge to my boy 19:52:12 pin on 19:53:08 All in all it was a good day 19:53:13 and now I go to sleep :) 19:53:15 I dead tired 19:53:17 :) 19:53:19 Ok :) See you later. 20:52:46 --- quit: nighty_ ("Disappears in a puff of smoke") 21:04:29 --- join: airbrush (i=airbrush@216-237-193-86-access.northstate.net) joined #forth 21:48:24 --- join: virl (n=virl@chello062178085149.1.12.vie.surfer.at) joined #forth 22:55:59 --- join: Cheery (n=Cheery@a81-197-19-23.elisa-laajakaista.fi) joined #forth 23:59:59 --- log: ended forth/06.09.16