00:00:00 --- log: started forth/09.02.25 00:00:16 --- join: workthrick (n=mathrick@0x55529153.adsl.cybercity.dk) joined #forth 00:35:16 --- quit: nighty__ (Remote closed the connection) 00:52:00 --- join: ASau (n=user@host63-231-msk.microtest.ru) joined #forth 00:52:27 --- quit: ASau` (Read error: 104 (Connection reset by peer)) 01:03:11 --- join: gogonkt_ (n=info@218.13.44.251) joined #forth 01:09:59 --- join: fasta (n=a@217.109.160.5) joined #forth 01:10:29 How can one define min without using if? 01:15:03 --- quit: gogonkt (Read error: 110 (Connection timed out)) 01:21:06 By using bit-wise logical operations. 01:27:23 --- join: qFox (i=C00K13S@132pc222.sshunet.nl) joined #forth 01:29:02 ASau: yes, that was the hint in the gforth tutorial. 01:30:32 --- join: H4ns1 (n=Hans@p57BBA289.dip0.t-ipconnect.de) joined #forth 01:31:56 --- quit: H4ns (Nick collision from services.) 01:31:59 --- nick: H4ns1 -> H4ns 01:33:17 --- nick: schmx -> schme 01:41:24 ASau: can you give an additional hint? 02:11:01 x*1 = x, x*0 = 0, for all x. 02:27:42 --- quit: schme (Remote closed the connection) 02:31:28 --- join: schme (n=schme@c83-249-80-232.bredband.comhem.se) joined #forth 03:11:51 --- quit: nxt (Read error: 113 (No route to host)) 03:20:38 : min 2dup - >R tuck < R> and + ; 03:21:02 8 words though, too long ;-) 03:24:38 To be honest I just found a solution involving the mathematical property, but not using and, xor or invert. It's quite a nice trick. Is it also faster than with the conditional? 03:24:48 I prefer more clear way: 2dup < tuck and >r invert and r> or 03:25:35 fasta: it all _depends_. 03:25:49 ASau: that makes pforth core dump 03:25:53 2 94444 2dup < tuck and >r invert and r> or 03:26:00 : min 2dup xor >R tuck < R> and xor ; is the same thing 03:26:31 fasta: don't use >R in the interpreter 03:26:36 ASau: ok, on x86 03:26:46 segher: I don't like such approaches. 03:27:20 asau: i would just use IF THEN here, the compiler can figure it out (or not) -- life is too short, heh 03:27:29 more readable is nicer 03:27:30 It also doesn't really work. 03:27:42 sure it does 03:27:56 min 2dup < tuck and >r invert and r> or ; 2 323232 min => 323232 03:28:15 fasta: my code is for "max". 03:28:23 fasta: replace "<" with ">". 03:28:37 that's asau's, not mine. maybe he flipped the conditional. that's what testing is for, heh 03:28:45 yah 03:29:02 I like this one: a * (a < b) + b * (a >= b) 03:29:39 Multiplication is usually slower than bitwise operation. 03:29:54 that calculates : negmin ( a b -- -a|-b) min negate ; 03:30:29 unless this is C, or something 03:30:53 segher: yes, this was C. 03:31:07 true is 1 -- ew 03:31:33 It's 11111111111 is forth, right? 03:31:41 segher: Which is good in fact. 03:31:41 didn't count the number of bits 03:31:48 fasta: yes. 03:31:51 all bits set, yes 03:32:18 which is the same as "true", and the same as -1 on 2's complement machines 04:09:28 --- join: _workthrick (n=mathrick@0x55529153.adsl.cybercity.dk) joined #forth 04:09:38 --- quit: _workthrick (Read error: 104 (Connection reset by peer)) 04:21:18 --- nick: gogonkt_ -> gogonkt 05:31:44 --- join: gogonkt_ (n=info@59.38.224.11) joined #forth 05:44:25 --- join: Vanax (n=Spock@cpe-77-83-47-44-dsl.netone.gr) joined #forth 05:46:15 --- quit: gogonkt (Read error: 110 (Connection timed out)) 06:26:57 --- join: impomatic (n=John@nat66.mia.three.co.uk) joined #forth 06:29:00 I'm implementing Forth in Redcode. 06:29:13 Any suggestions before I go too far in the wrong direction? 06:29:15 Any suggestions? http://impomatic.blogspot.com/2009/02/implementing-forth-in-redcode.html 06:47:44 --- nick: gogonkt_ -> gogonkt 06:58:44 --- quit: gnomon (Read error: 110 (Connection timed out)) 07:27:32 --- join: Twey_ (n=Twey@unaffiliated/twey) joined #forth 07:27:36 --- quit: Twey ("Reconnecting") 07:28:13 --- nick: Twey_ -> Twey 08:05:41 --- quit: ASau ("Off!") 08:24:24 --- quit: workthrick (Read error: 110 (Connection timed out)) 08:34:34 --- join: kar8nga (n=kar8nga@a-197.vc-graz.ac.at) joined #forth 08:58:46 --- quit: kar8nga (Remote closed the connection) 09:11:17 --- quit: impomatic ("mov.i #1,1") 09:18:04 --- quit: fasta ("Ex-Chat") 09:25:06 --- quit: Vanax ("Leaving") 10:01:04 --- join: ASau (n=user@193.138.70.52) joined #forth 10:03:42 --- join: kar8nga (n=kar8nga@f-3.vc-graz.ac.at) joined #forth 10:44:21 --- quit: preflex (Remote closed the connection) 10:47:03 --- join: preflex (i=mauke@66.249.129.40) joined #forth 10:58:43 --- quit: preflex (Remote closed the connection) 11:19:36 --- join: preflex (i=mauke@rm-f.net) joined #forth 11:28:03 --- quit: kar8nga (Remote closed the connection) 12:05:57 --- quit: qFox ("Time for cookies!") 12:07:34 --- join: qFox (i=C00K13S@132pc222.sshunet.nl) joined #forth 12:24:26 --- join: H4ns1 (n=hans@p57A0C9C4.dip.t-dialin.net) joined #forth 12:24:42 --- quit: H4ns (Nick collision from services.) 12:24:46 --- nick: H4ns1 -> H4ns 12:25:27 --- join: H4ns1 (n=Hans@p57BBA289.dip0.t-ipconnect.de) joined #forth 12:58:03 --- join: hagna (n=hagna@70.102.57.178) joined #forth 12:58:15 wooo amforth on atmega168 12:58:26 it works 13:00:37 hagna: congrats 13:00:47 hagna: you found yourself the right assembler, i guess 13:02:59 H4ns: well yeah the problems were not that specifically 13:03:55 atmega168, on a board of yourself? 13:05:09 H4ns: yes 13:37:21 --- quit: hagna ("leaving") 13:43:47 --- join: H4ns2 (n=hans@p57A0F5AE.dip.t-dialin.net) joined #forth 13:44:12 --- quit: H4ns (Nick collision from services.) 13:44:14 --- nick: H4ns2 -> H4ns 14:31:29 --- quit: qFox ("Time for cookies!") 14:41:27 --- join: workthrick (n=mathrick@users177.kollegienet.dk) joined #forth 14:43:20 --- part: X-Scale left #forth 15:18:37 --- join: hagna (n=hagna@70.102.57.178) joined #forth 15:18:43 so what does .frt stand for? 15:20:15 It can be anything. 15:20:28 Don't look at file name suffix, look into the content. 15:32:58 --- join: nxt (n=nxt@77.207.25.109) joined #forth 15:41:04 --- quit: Twey ("leaving") 15:48:53 heh 16:20:51 --- join: X-Scale (i=email@2001:470:1f08:b3d:0:0:0:2) joined #forth 16:26:52 --- quit: hagna (Read error: 113 (No route to host)) 16:51:22 --- join: hagna (n=hagna@97-117-49-108.slkc.qwest.net) joined #forth 17:04:55 --- join: hagna_ (n=hagna@71-219-23-152.slkc.qwest.net) joined #forth 17:11:08 --- quit: hagna_ (Read error: 60 (Operation timed out)) 17:18:58 --- quit: hagna (Read error: 110 (Connection timed out)) 17:52:56 --- join: nighty__ (n=nighty@210.188.173.245) joined #forth 18:05:27 --- quit: H4ns (Read error: 104 (Connection reset by peer)) 18:07:14 --- join: H4ns (n=hans@p57A0F5AE.dip.t-dialin.net) joined #forth 18:56:57 --- join: gnomon (n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com) joined #forth 21:16:51 --- quit: tarbo (Connection timed out) 21:17:48 --- join: tarbo (n=me@unaffiliated/tarbo) joined #forth 21:25:25 --- join: H4ns2 (n=hans@p57A0F5AE.dip.t-dialin.net) joined #forth 21:26:35 --- quit: H4ns (Nick collision from services.) 21:26:38 --- nick: H4ns2 -> H4ns 22:09:10 --- quit: workthrick (Read error: 110 (Connection timed out)) 23:08:27 --- quit: H4ns ("Leaving.") 23:29:25 --- quit: gogonkt ("leaving") 23:30:41 --- join: gogonkt`` (n=info@59.38.224.11) joined #forth 23:52:23 --- join: workthrick (n=mathrick@0x55529153.adsl.cybercity.dk) joined #forth 23:53:05 --- join: ASau` (n=user@host87-230-msk.microtest.ru) joined #forth 23:59:59 --- log: ended forth/09.02.25