00:00:00 --- log: started forth/09.06.01 00:52:10 --- quit: mark4 (Read error: 104 (Connection reset by peer)) 01:09:38 --- join: mark4 (n=mark4__@70.162.227.36) joined #forth 01:33:01 --- quit: nighty__ (Remote closed the connection) 02:03:30 --- quit: gogonkt (Read error: 104 (Connection reset by peer)) 02:05:37 --- join: gogonkt (n=info@58.248.188.62) joined #forth 03:26:35 --- part: X-Scale left #forth 04:44:58 --- quit: schme (Read error: 113 (No route to host)) 04:52:24 --- quit: mark4 (Read error: 104 (Connection reset by peer)) 05:09:55 --- join: mark4 (n=mark4__@ip70-162-227-36.ph.ph.cox.net) joined #forth 06:07:00 --- join: crc (i=d8012b82@gateway/web/ajax/mibbit.com/x-163ed598f6f2e24a) joined #forth 06:14:57 --- quit: kar8nga (Read error: 110 (Connection timed out)) 07:08:32 --- quit: proteusguy_ (Read error: 110 (Connection timed out)) 07:11:14 --- join: proteusguy_ (n=proteusg@61.7.144.97) joined #forth 07:11:59 --- join: impomatic (n=John@217.171.129.67) joined #forth 08:18:24 --- join: pgas (n=user@pdpc/supporter/active/pgas) joined #forth 08:19:46 --- join: _Pb (n=Pb@75.131.194.186) joined #forth 08:31:21 --- join: GeDaMo (n=gedamo@212.225.121.248) joined #forth 08:46:15 --- quit: Deformative (SendQ exceeded) 08:47:31 --- quit: _Pb ("Leaving") 09:15:26 --- quit: crc ("http://www.mibbit.com ajax IRC Client") 10:51:34 --- join: kar8nga (n=kar8nga@a-172.vc-graz.ac.at) joined #forth 11:16:53 hi, I'm following the gforth tutorial, and it says something about using bitwise operation instead of if, it gave this implementation of a "foo" that returns 0 or 14: 11:16:55 : foo ( n1 -- n2 ) 11:16:55 0= 14 and ; 11:17:43 then as an assignment says "implement min (returning the minimum of 2 numbers) without if" 11:18:04 I admit I can't figure out how this can be done 11:18:37 any hint? 11:22:00 It probably involves subtracting one from the other 11:27:34 hmm, I was thinking of trying to conditionaly executing something, but you maybe write that it's more likely some kind of computation 11:27:51 Think in terms of masks 11:30:20 argh 11:30:40 *you maybe right (among other mistakes) 11:35:18 The comparison operators 0=, 0<, etc. return either -1 or 0 -- good for masking 11:48:16 well, ok, I still don't see how to use this 11:48:52 Do you want more hints or a solution? 11:50:05 let me think a bit about it 11:53:56 An interesting problem. I wonder what the minimum number of words to implement it would be. 11:54:30 I'm pretty sure the solution I came up with wouldn't be the minimum number of words :P 11:58:06 Nor mine (9 words) 11:58:23 I started at 10 and got down to 9 11:58:59 Hmmm... trying to optimize :-) 12:01:46 I have a suspicion you could do something clever with xor 12:02:45 But then I always think that about bit manipulation problems :P 12:23:01 Well I can't do anything clever :-/ 12:23:16 Nor me 12:29:30 I take that back ;-) Less than 9 words now! 12:29:44 Crap! :P 12:39:32 Hmmm... -ROT doesn't appear to be in ANS Forth 12:39:54 It's not? 12:40:34 I can't find it on this list http://ficl.sourceforge.net/dpans/dpansf.htm 12:41:12 Hmmm ... I tend to avoid -rot, maybe that's why 13:20:08 ok....I needed some help from http://www-graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax...with this an obvious solution: 13:20:09 tuck 2dup < rot rot - and + 13:22:56 pgas: you've managed to come up with a different solution from impomatic and me :P 13:23:31 well, it's not exactly mine ;) 13:24:01 That's quite similar to one of mine :-) 13:24:34 over 2dup < -rot xor and xor 13:25:04 pgas: now see if you can find a better solution ;-) 13:28:12 well, I'll think I'd better spend my time learning some more forth 13:28:16 see you 13:28:21 --- quit: pgas ("/quit") 13:30:11 --- join: schme (n=marcus@c83-249-82-162.bredband.comhem.se) joined #forth 14:26:31 --- quit: GeDaMo ("Leaving.") 14:33:39 --- quit: kar8nga (Remote closed the connection) 14:36:13 --- quit: impomatic ("http://retrocode.blogspot.com") 14:39:16 --- quit: schme (Read error: 113 (No route to host)) 14:48:24 --- join: crc (n=charlesc@c-68-80-139-0.hsd1.pa.comcast.net) joined #forth 14:53:00 --- quit: mark4 (Read error: 104 (Connection reset by peer)) 15:10:01 --- join: mark4 (n=mark4__@ip70-162-227-36.ph.ph.cox.net) joined #forth 15:24:42 Hmm...you missed this one. : max over - dup 0> and + ; 15:24:44 :) 17:23:06 --- join: nighty__ (n=nighty@210.188.173.245) joined #forth 17:41:56 --- join: X-Scale (i=email@89-180-227-11.net.novis.pt) joined #forth 18:10:57 --- quit: crc (Client Quit) 18:25:38 --- quit: gnomon (anthony.freenode.net irc.freenode.net) 18:25:39 --- quit: segher (anthony.freenode.net irc.freenode.net) 18:25:39 --- quit: tarbo (anthony.freenode.net irc.freenode.net) 18:26:02 --- quit: proteusguy_ (anthony.freenode.net irc.freenode.net) 18:26:04 --- join: segher (n=segher@84-105-60-153.cable.quicknet.nl) joined #forth 18:26:18 --- join: tarbo (n=me@unaffiliated/tarbo) joined #forth 18:26:25 --- quit: TreyB (anthony.freenode.net irc.freenode.net) 18:26:25 --- quit: tathi (anthony.freenode.net irc.freenode.net) 18:26:34 --- join: gnomon (n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com) joined #forth 18:26:46 --- join: TreyB (n=trey@74.203.168.157) joined #forth 18:26:46 --- join: tathi (n=josh@dsl-216-227-91-166.fairpoint.net) joined #forth 18:26:47 --- quit: tarbo (SendQ exceeded) 18:27:01 --- join: proteusguy_ (n=proteusg@61.7.144.97) joined #forth 18:29:53 --- join: tarbo (n=me@unaffiliated/tarbo) joined #forth 19:13:05 --- join: sunwukong (n=vukung@ortros.den.rcast.u-tokyo.ac.jp) joined #forth 21:18:46 --- quit: Def (Remote closed the connection) 21:19:06 --- join: Def (n=joe@c-71-238-45-45.hsd1.mi.comcast.net) joined #forth 21:31:26 --- quit: Def (anthony.freenode.net irc.freenode.net) 21:36:37 --- join: Def (n=joe@c-71-238-45-45.hsd1.mi.comcast.net) joined #forth 23:45:40 --- quit: sunwukong ("bye") 23:59:59 --- log: ended forth/09.06.01