00:00:00 --- log: started forth/21.07.12 00:19:37 --- join: rain3 joined #forth 00:56:54 --- quit: cbridge_ (Connection closed) 00:57:07 --- join: cbridge_ joined #forth 01:06:05 --- join: Glider_IRC__ joined #forth 01:08:59 --- quit: Glider_IRC_ (Ping timeout: 120 seconds) 04:22:03 --- quit: rain3 (Quit: Leaving) 04:51:31 you can always use the double xor to swap between two items without having an intermediate variable. 04:56:50 double xor? 09:07:17 eris[m]1: I'd assume it's the trick that lets you do something like `x = x ^ y`, `y = x ^ y` 09:07:57 `x = x ^ y` 09:10:23 ahh 09:10:38 i wonder what that would look like on the stack 10:05:31 kinda doesn't make sense on a stack, unless it's how you implement swap internally. 10:09:23 the double xor trick for swapping two values without an intermediate. 10:22:15 the limitation is of course the items cannot be the same because x ^ x = 0 10:22:24 for x : bool 10:27:04 they can be the same. x=1, y=1 ... x=x^y -> x=0 ... y=x^y -> y=1 .. x=x^y -> x=1... final state: x=1, y=1. 10:28:18 oh I mean if x and y are the same storage location 10:28:25 but yeah as long as they're separate it's fine 10:28:32 ohh 10:32:51 remexre: ^ would be a nice exercise to formally verify 10:33:31 I would opt for a Hoare logic assertion, {{ X ::= a ; Y ::= b }} XOR_SWAP {{ X ::= b ; Y ::= a }} 13:06:05 --- join: Glider_IRC_ joined #forth 13:08:58 --- quit: Glider_IRC__ (Ping timeout: 120 seconds) 15:56:12 maw 20:07:09 re maw 20:31:44 --- quit: Vedran (*.net *.split) 20:31:44 --- quit: bluekelp (*.net *.split) 20:33:01 --- join: Vedran joined #forth 20:35:30 --- join: bluekelp joined #forth 22:44:29 --- quit: Glider_IRC_ (Connection closed) 22:45:07 --- join: Glider_IRC_ joined #forth 23:59:59 --- log: ended forth/21.07.12