00:00:00 --- log: started forth/16.01.15 00:14:26 --- quit: littlebluedana (Ping timeout: 252 seconds) 00:16:18 --- join: atommann (~atommann@210.3.149.230) joined #forth 01:24:06 --- join: Carisius (~Carisius@cm-188-171-1-147.telecable.es) joined #forth 01:41:55 --- quit: proteusguy_satri (Ping timeout: 255 seconds) 01:41:58 --- quit: proteusguy (Ping timeout: 264 seconds) 01:54:24 --- join: proteusguy_satri (~proteusgu@ppp-110-168-230-177.revip5.asianet.co.th) joined #forth 01:54:51 --- join: proteusguy (~proteusgu@ppp-110-168-230-177.revip5.asianet.co.th) joined #forth 01:54:51 --- mode: ChanServ set +v proteusguy 02:01:58 --- quit: ASau (Ping timeout: 240 seconds) 02:08:14 --- quit: atommann (Ping timeout: 265 seconds) 02:29:01 --- quit: bb010g (Quit: Connection closed for inactivity) 02:31:26 --- quit: impomatic (Ping timeout: 265 seconds) 02:37:01 --- join: impomatic (~impomatic@79.16.114.87.dyn.plus.net) joined #forth 03:05:01 --- join: true-grue (~true-grue@176.14.216.104) joined #forth 03:05:19 --- quit: Carisius (Read error: Connection reset by peer) 04:25:55 --- join: atommann (~atommann@222.248.65.23) joined #forth 04:58:10 --- join: Kumool (~kumool@adsl-64-237-236-129.prtc.net) joined #forth 05:05:31 --- quit: atommann (Ping timeout: 256 seconds) 05:13:04 --- join: xyh (~xieyuheng@111.50.93.123) joined #forth 05:13:29 --- join: xyh_ (~cicada@111.50.93.123) joined #forth 05:39:52 --- nick: xyh_ -> quininer 05:40:22 --- nick: quininer -> Guest41305 05:40:43 --- nick: Guest41305 -> qniuiuer 05:42:22 --- nick: qniuiuer -> xhy 06:29:28 --- quit: nighty^_ (Remote host closed the connection) 06:35:03 --- join: nighty^_ (~cp@www.taiyolabs.com) joined #forth 06:47:48 --- quit: impomatic (Ping timeout: 240 seconds) 07:01:09 --- join: impomatic (~impomatic@79.16.114.87.dyn.plus.net) joined #forth 07:06:38 --- quit: nighty^_ (Quit: leaving) 07:06:55 --- join: nighty^_ (~cp@212.83.160.157) joined #forth 07:10:25 --- quit: true-grue (Quit: Leaving) 07:10:44 --- join: true-grue (~true-grue@176.14.216.104) joined #forth 07:27:07 --- quit: xhy (Remote host closed the connection) 07:29:46 --- quit: xyh (Ping timeout: 255 seconds) 07:44:08 --- join: vsg1990 (~vsg1990@pool-74-110-57-203.bflony.fios.verizon.net) joined #forth 08:16:22 --- quit: john_metcalf (Ping timeout: 245 seconds) 08:21:45 --- join: bb010g (uid21050@gateway/web/irccloud.com/x-garnftzprghjrjsh) joined #forth 08:24:40 --- join: littlebluedana (61542dd5@sourcemage/apprentice/minozake) joined #forth 08:53:56 do the two dragon heads in the gforth logo represent the two stacks? 09:03:23 --- quit: true-grue (Quit: Leaving) 09:21:15 --- join: little_bit (~tomkl@unaffiliated/tomkl) joined #forth 09:28:36 --- join: xyh (~xieyuheng@111.50.93.123) joined #forth 09:48:05 --- quit: littlebluedana (Ping timeout: 252 seconds) 09:52:23 --- join: littlebluedana (61542dd5@sourcemage/apprentice/minozake) joined #forth 10:01:59 --- join: proteusguy_sat2 (~proteusgu@ppp-110-168-229-92.revip5.asianet.co.th) joined #forth 10:02:03 --- join: proteusguy_ (~proteusgu@ppp-110-168-229-92.revip5.asianet.co.th) joined #forth 10:03:34 --- quit: proteusguy_satri (Ping timeout: 264 seconds) 10:03:52 --- quit: proteusguy (Ping timeout: 245 seconds) 10:07:05 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 10:15:25 --- quit: xyh (Ping timeout: 246 seconds) 10:17:25 --- join: xyh (~xieyuheng@111.50.93.123) joined #forth 10:20:18 is there a standard Forth word that exchanges the stack and return pointers 10:21:11 like if it were called s/r you could have : rdup s/r dup s/r ; 10:37:18 sp! 10:37:29 for gforth I don't know it it's standard 10:38:11 or better 10:38:27 sp@ 10:38:57 argh what am I thinking :) 10:40:40 nvm 10:59:01 --- quit: bb010g (Quit: Connection closed for inactivity) 11:14:42 --- join: true-grue (~true-grue@176.14.216.104) joined #forth 11:17:56 --- join: bedah (~bedah@dyndsl-037-138-031-004.ewe-ip-backbone.de) joined #forth 11:21:53 --- join: bb010g (uid21050@gateway/web/irccloud.com/x-zaftewabykefftgv) joined #forth 12:52:33 --- quit: xyh (Remote host closed the connection) 13:03:35 --- join: ASau (~user@netbsd/developers/asau) joined #forth 13:13:53 --- quit: littlebluedana (*.net *.split) 13:25:07 --- quit: little_bit (Ping timeout: 246 seconds) 13:26:53 --- quit: bedah (Quit: Ex-Chat) 13:27:22 --- join: little_bit (~tomkl@unaffiliated/tomkl) joined #forth 13:55:57 --- quit: asagk (Ping timeout: 276 seconds) 13:57:13 --- quit: true-grue (Read error: Connection reset by peer) 13:58:59 --- join: xhy (~cicada@111.50.93.123) joined #forth 13:59:01 --- quit: bb010g (Quit: Connection closed for inactivity) 14:08:17 --- join: asagk (~asagk@i59F6B0DE.versanet.de) joined #forth 14:30:18 --- join: bb010g (uid21050@gateway/web/irccloud.com/x-pqkpjpdirxycolsj) joined #forth 14:44:14 --- join: karswell (~user@135.18.198.146.dyn.plus.net) joined #forth 15:13:22 --- quit: saml (Quit: Leaving) 15:45:49 --- quit: xhy (Ping timeout: 246 seconds) 16:41:20 --- quit: Kumool (Remote host closed the connection) 16:41:36 --- join: Kumool (~kumool@adsl-64-237-236-129.prtc.net) joined #forth 17:07:10 --- quit: Skuzzzy (Read error: Connection reset by peer) 17:12:21 --- quit: Kumool (Read error: Connection reset by peer) 17:39:01 --- quit: bb010g (Quit: Connection closed for inactivity) 17:57:51 --- join: Kumool (~kumool@adsl-64-237-237-193.prtc.net) joined #forth 18:09:21 --- join: malyn_ (~malyn@unaffiliated/malyn) joined #forth 18:09:57 --- quit: malyn (Ping timeout: 250 seconds) 18:09:57 --- nick: malyn_ -> malyn 18:25:46 --- join: lewis1711 (~lewis@c27-253-68-112.sunsh1.vic.optusnet.com.au) joined #forth 18:27:30 say I had some computationally intensive word "w ( n -- n )". How do I cache some result like that? ": w1 1 w ;" will just run the computation everytime you call w1 19:04:42 --- quit: Kumool (Ping timeout: 245 seconds) 19:06:27 lewis1711: : w1 [ 1 w ] ; 19:07:23 lewis1711: [ and ] control the "state" flag, which determines whether we're compiling or interpreting. when we hit [, we turn off the compiler, and run "1 w", then we turn it back on and continue compiling the rest of the definition into the last defined dictionary entry until we hit ; 19:07:31 lewis1711: very useful. 19:09:16 --- join: gde33 (kvirc@546A0B75.cm-12-3a.dynamic.ziggo.nl) joined #forth 19:10:37 lewis1711: so, you can do something like variable foobar : foo [ 1 2 + foobar ! ] foobar @ ; 19:10:59 lewis1711: the computation is just done once, when the word is compiled. does> also helps in this scenario, as it was built for this kind of thing. 19:14:05 --- quit: Zarutian (Quit: Zarutian) 19:14:18 little_bit, aha thanks that looks like what I want. trying to search for [ docs 19:14:23 hehe. 19:14:40 lewis1711: you should take a peek at the 'create ... does>' idiom in Forth. 19:15:14 hmm, gforth doesn't have it 19:15:18 it does! 19:15:51 lewis1711: : array create cells allot does> swap cells + ; 20 array foo 19:15:52 : ten [ 9 1 + ] ; 19:15:52 :1: unstructured 19:15:57 lewis1711: ahhh. 19:16:04 lewis1711: : ten [ 9 1 + . ] ; try that. 19:17:19 I am lost. guess I need to look at create do 19:17:23 little_bit, I tried that one 19:17:29 I don't get what I am dropping with . 19:18:19 lewis1711: : ten [ 1 9 + ] literal ; 19:18:23 sorry. 19:19:24 lewis1711: "literal" will compile whatever's at the top of the stack into a literal for ten's dictionary definition. 19:20:19 little_bit, ten seems to have no stack-effect when defined that way 19:20:25 except to place ten on the stack, and drop what was on there 19:21:00 lewis1711: http://pastebin.com/WZfP4jBf 19:21:16 lewis1711: its stack effect is ( -- n ) 19:22:19 why is . needed? 19:22:24 lewis1711: it isn't. o.o 19:23:17 sorry, misread! 19:23:23 ok i kind of get [ and ] 19:23:26 need to check out literal 19:25:50 lewis1711: http://www.forth.com/starting-forth/sf11/sf11.html 19:26:47 lewis1711: Ctrl+F, "literal". should see an example with "FOUR-MORE". 20:36:35 --- join: proteusguy (~proteusgu@ppp-110-168-230-74.revip5.asianet.co.th) joined #forth 20:36:35 --- mode: ChanServ set +v proteusguy 20:38:02 --- quit: proteusguy_ (Ping timeout: 245 seconds) 20:38:02 --- quit: proteusguy_sat2 (Ping timeout: 245 seconds) 20:54:25 --- join: proteusguy_sat2 (~proteusgu@ppp-110-168-230-74.revip5.asianet.co.th) joined #forth 21:38:58 --- quit: vsg1990 (Quit: Leaving) 22:10:37 --- quit: little_bit (Ping timeout: 260 seconds) 22:46:18 --- join: xhy (~cicada@111.50.93.123) joined #forth 23:11:19 --- nick: xhy -> xyh 23:22:18 --- quit: xyh (Quit: ChatZilla 0.9.92 [SeaMonkey 2.39/20151206235742]) 23:59:59 --- log: ended forth/16.01.15