00:00:08 hm, ok, that isn't being printed on my console 00:00:10 so hm 00:00:17 -!- lithpbot has quit (Remote closed the connection). 00:00:32 -!- lithpbot has joined. 00:00:33 > (a d) 00:00:33 (err) unmatched ( 00:00:46 ahh, i seeeeee 00:00:53 me am stoopid 00:01:18 -!- lithpbot has quit (Remote closed the connection). 00:01:22 let's try now 00:01:29 -!- lithpbot has joined. 00:01:29 > (a d) 00:01:30 (err) unbound: a 00:01:32 woot 00:01:45 oklopol: there you go 00:01:56 > (a(b(c)d)e) 00:01:56 (err) unbound: a(b(c 00:01:59 hm 00:02:09 oh 00:02:10 -!- lithpbot has quit (Remote closed the connection). 00:02:12 silly me 00:02:16 bah 00:02:19 i'll implement some primitives first 00:05:27 ok 00:05:36 -!- lithpbot has joined. 00:05:37 now it has lambda, quote, set , def, if 00:05:40 oklopol: ping 00:05:43 > (set a 4) 00:05:44 4 00:05:46 > a 00:05:46 4 00:05:51 > (set a 5) 00:05:51 5 00:05:52 > a 00:05:52 5 00:05:58 > (quote a) 00:05:58 a 00:06:13 > (if 0 (quote yes) (quote no)) 00:06:13 yes 00:06:23 > (if () (quote yes) (quote no)) 00:06:24 yes 00:06:26 hm 00:06:26 :P 00:07:25 -!- lithpbot has quit (Remote closed the connection). 00:07:45 -!- lithpbot has joined. 00:07:46 > (if 0 (quote yes) (quote no)) 00:07:46 yes 00:07:49 > (if 1 (quote yes) (quote no)) 00:07:49 yes 00:07:53 Retarded. 00:07:56 no 00:08:03 0 is true in all lisps i know of 00:08:07 not in this one 00:08:09 for example 00:08:12 my boolean function returns 1 or 0 00:08:18 but it isn't returning 0 for "0" which is bizzare 00:08:20 lame 00:08:27 ololobot's lisp does it 00:08:41 -!- lithpbot has quit (Remote closed the connection). 00:08:54 -!- lithpbot has joined. 00:08:58 > (if 0 (quote yes) (quote no)) 00:08:59 yes 00:09:17 bsmntbom1dood: if C does it, it must be right. 00:09:43 of course 00:09:46 -!- lithpbot has quit (Remote closed the connection). 00:09:54 and you need a client that does last-spoken tab completion 00:10:11 ifthis doesn't work i don't know what's wrong: 00:10:14 -!- lithpbot has joined. 00:10:15 > (if 0 (quote yes) (quote no)) 00:10:15 no 00:10:17 woot 00:10:19 > (if 1 (quote yes) (quote no)) 00:10:19 yes 00:10:22 > (if () (quote yes) (quote no)) 00:10:23 no 00:10:24 > (if (1) (quote yes) (quote no)) 00:10:25 -!- lithpbot has quit (Remote closed the connection). 00:10:27 hahahugjgf 00:10:32 wtf, two false values? 00:10:36 yes 00:10:38 0 and () are false 00:10:50 0 because that's what the to-boolean returns 00:10:59 () because it makes no sense to have nil true 00:12:05 it makes no sense to have 0 fale 00:12:14 -!- lithpbot has joined. 00:12:16 i don't really care if you think that 00:12:20 > (if (1) (quote yes) (quote no)) 00:12:21 -!- lithpbot has quit (Remote closed the connection). 00:12:36 (1) is an error... 00:12:49 yes, i know that 00:12:50 -!- lithpbot has joined. 00:12:52 it's failing at a previous point 00:12:57 (if (1) (quote yes) (quote no)) 00:13:01 > (if (1) (quote yes) (quote no)) 00:13:01 -!- lithpbot has quit (Remote closed the connection). 00:13:52 -!- lithpbot has joined. 00:13:53 > (if (1) (quote yes) (quote no)) 00:13:53 (err) not callable: 1 00:13:56 > (if () (quote yes) (quote no)) 00:13:56 -!- lithpbot has quit (Remote closed the connection). 00:14:19 all right 00:14:19 finally 00:14:21 i've got it 00:14:24 grrr 00:14:31 bsmntbombdood: what 00:14:34 it's been an hour and it's still not 1/255 done 00:14:41 bookkeeping time 00:14:57 :D 00:15:01 oklopol: ok 00:15:03 oklopol: it's all there 00:15:04 everything 00:15:06 -!- lithpbot has joined. 00:15:06 bsmntbom1dood: are you sure it works at all :D 00:15:09 > (if () (quote yes) (quote no)) 00:15:09 no 00:15:11 ehird`: you sure :D 00:15:16 > (if (quote (1)) (quote yes) (quote no)) 00:15:16 yes 00:15:20 pretty sure!! 00:15:22 > if 00:15:23 #native-function:9 00:15:24 > ((((lambda (a) (lambda (b) (lambda (c) ((a c) (b c))))) (lambda (a) (lambda (b) a))) (lambda (a) (lambda (b) a))) 8) 00:15:24 (err) unbound: c 00:15:24 > cond 00:15:25 (err) unbound: cond 00:15:33 uhh 00:15:36 should c be unbound 00:15:41 c can't be unbound there. 00:15:52 (lambda (c) ((a c) (b c))) 00:15:55 no way. 00:15:57 > (def test (x) ((lambda (y) y) x)) 00:15:58 #function:86 00:15:59 > test 00:15:59 #function:86 00:16:05 > (test 2) 00:16:05 2 00:16:19 anyway 00:16:21 def works now, oklopol 00:16:23 do it in chunks 00:16:52 kay 00:17:03 (def NAME ARGS CODE...) 00:17:05 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:17:05 #function:ab 00:17:07 > (def k (a) (lambda (b) a)) 00:17:07 #function:bb 00:17:09 > (((s k) k) 3) 00:17:10 (err) unbound: c 00:17:58 (def s (x) (lambda (y) (lambda (z) ((x z) (y z))))) 00:17:59 > (def s (x) (lambda (y) (lambda (z) ((x z) (y z))))) 00:17:59 #function:e8 00:18:04 > (s k) 00:18:04 (err) unbound: k 00:18:12 fuck the what 00:18:16 > k 00:18:16 (err) unbound: k 00:18:21 but... 00:18:35 :DSDSDSD 00:19:18 http://rafb.net/p/Q6qc8624.html 00:19:21 i have no idea what went wrong 00:19:24 tell me my bug :D 00:19:46 i can tell you on monday when i have time :<<< 00:19:50 :< 00:19:51 gotta go sleep now 00:19:55 alright 00:19:57 bye! 00:19:58 :) 00:20:21 -!- lithpbot has quit (Remote closed the connection). 00:20:32 -!- lithpbot has joined. 00:20:33 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def k (a) (lambda (b) a)) 00:20:33 #function:39 00:20:35 > s 00:20:35 #function:29 00:20:36 > k 00:20:37 #function:39 00:20:37 godaamn so slow 00:20:46 > (((s k) k) 3) 00:20:46 (err) unbound: c 00:20:54 > s 00:20:54 #function:29 00:20:56 > k 00:20:56 (err) unbound: k 00:20:59 bsmntbom1dood: you sure it isn't just in an infinite loop or smth? 00:21:02 i'm sure 00:21:11 bsmntbombdood: make it print out EVERY iteration 00:21:12 just to be sure 00:21:22 i've used it on shorter strings 00:21:23 kay, reallity sleepity -> 00:21:25 it works fine 00:22:20 -!- lithpbot has quit (Remote closed the connection). 00:22:47 -!- lithpbot has joined. 00:22:59 -!- RedDak has joined. 00:23:02 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def k (a) (lambda (b) a)) (((s k) k) 3) 00:23:03 (err) unbound: c 00:23:05 > s 00:23:05 #function:29 00:23:06 > k 00:23:06 #function:39 00:24:12 -!- lithpbot has quit (Remote closed the connection). 00:24:26 -!- lithpbot has joined. 00:24:45 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def k (a) (lambda (b) a)) (((s k) k) 3) 00:24:45 (err) unbound: c 00:25:49 -!- lithpbot has quit (Remote closed the connection). 00:26:01 -!- lithpbot has joined. 00:26:05 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def k (a) (lambda (b) a)) (((s k) k) 3) 00:26:05 (err) unbound: c 00:26:53 -!- lithpbot has quit (Remote closed the connection). 00:27:04 -!- lithpbot has joined. 00:27:16 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def k (a) (lambda (b) a)) (((s k) k) 3) 00:27:17 (err) unbound: c 00:31:22 -!- ecl has joined. 00:31:32 -!- ecl has left (?). 00:32:00 aah, shit 00:32:09 tihs ,haa 00:32:23 my algorithm, running on my computer, would take 460 years to compute hello world 00:32:24 :( 00:33:25 AHAHAHAHAHAHAHAHAHAAHAAHAHAHAHAHAHAHAHAHAHHSAADJOASDLSKHDLKF 00:36:19 -!- lithpbot has quit (Remote closed the connection). 00:36:41 -!- lithpbot has joined. 00:36:48 > (set a 2) 00:36:48 2 00:36:49 > a 00:36:49 2 00:36:56 > (def id (x) x) 00:36:56 #function:1b 00:36:58 > (id 2) 00:36:58 2 00:36:59 -!- ehird` has left (?). 00:37:03 -!- ehird` has joined. 00:37:21 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:37:21 #function:3e 00:37:26 > (def k (a) (lambda (b) a)) 00:37:26 #function:4e 00:37:30 > (((s k) k) 3) 00:37:30 3 00:37:35 oklopol: WOOT!! 00:37:38 oklopol: IT WORKS!!! 00:38:05 ooh, i can reduce it a bit 00:38:50 -!- lithpbot has quit (Remote closed the connection). 00:38:52 there 00:38:53 it's ready 00:39:01 -!- lithpbot has joined. 00:39:15 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:39:16 -!- lithpbot has quit (Remote closed the connection). 00:39:28 Um. 00:39:37 -!- lithpbot has joined. 00:40:06 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:40:06 #function:29 00:40:11 > (s s) 00:40:11 #function:2e 00:40:13 > ((s s) s) 00:40:14 #function:37 00:40:18 > (((s s) s) s) 00:40:18 #function:46 00:40:24 > ((((s s) s) s) s) 00:40:24 #function:5b 00:40:29 Okay. 00:40:31 Time for gc. 00:40:33 -!- lithpbot has quit (Remote closed the connection). 00:47:56 PL 00:47:58 OK 00:48:00 I think the gc should work 00:48:04 -!- lithpbot has joined. 00:48:26 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:48:27 -!- lithpbot has quit (Remote closed the connection). 00:48:54 -!- lithpbot has joined. 00:48:58 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:48:59 #function:29 00:49:06 > (def k (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:49:06 #function:48 00:49:12 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:49:12 #function:c4 00:49:16 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:49:16 #function:140 00:49:23 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:49:23 #function:1bc 00:49:24 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:49:24 #function:238 00:49:26 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:49:26 #function:2b4 00:49:27 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:49:27 #function:330 00:49:30 hm. 00:49:38 -!- lithpbot has quit (Remote closed the connection). 00:49:55 -!- lithpbot has joined. 00:49:58 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:49:58 #function:29 00:50:28 -!- lithpbot has quit (Remote closed the connection). 00:50:32 that was stupid 00:50:32 XD 00:50:55 -!- lithpbot has joined. 00:50:56 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:50:56 #function:29 00:51:01 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:51:01 #function:48 00:51:05 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:51:05 #function:67 00:51:06 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:51:06 #function:86 00:51:09 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:51:09 #function:a5 00:51:12 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:51:13 #function:c4 00:51:14 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:51:14 #function:e3 00:51:21 > if 00:51:21 #native-function:9 00:51:30 Hmm, wtf. 00:52:08 -!- lithpbot has quit (Remote closed the connection). 00:52:37 -!- lithpbot has joined. 00:53:02 -!- oerjan has joined. 00:53:16 -!- lithpbot has quit (Remote closed the connection). 00:53:21 oh hello oerjan 00:53:28 -!- lithpbot has joined. 00:53:30 i'm putting the finishing touches on lithpbot's gc 00:53:34 yes -- a gc written in python 00:53:55 but...python is garbage collected 00:54:00 ...so you don't need one 00:54:12 i do, because i append every object to a list 00:54:18 for the sole purpose of keeping them alive 00:54:20 so my gc can run 00:54:20 :D 00:54:26 hmm 00:54:36 i wonder, how many objects should i let be allocated before i gc()? 00:54:44 well that's stupid 00:54:50 hehe yeah 00:54:52 but fun 00:55:03 give me a number :P i can't decide how many objects it can allocate before i run the gc 00:55:09 right now it's at 200 00:55:28 424242 00:55:37 far too high 00:55:37 :P 00:55:46 4242 then 00:55:53 probably too high :P 00:55:54 meh 00:55:56 i'll leave it at 200 00:56:01 with the fast turnover of irc it's about right 00:57:51 -!- lithpbot has quit (Remote closed the connection). 00:58:01 made it save symbols and numbers 00:58:02 -!- lithpbot has joined. 00:58:02 it should probably depend on how many objects remained after the last gc 00:58:07 i guess 00:58:12 > > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:58:12 (err) unbound: > 00:58:15 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:58:16 #function:2b 00:58:20 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 00:58:20 #function:4a 00:58:23 hmm 00:58:29 > (quote a) 00:58:29 a 00:58:36 any reason to use hex numbers? 00:58:42 jix: in the printout? 00:58:45 yeah 00:58:46 because it's a faux-memory location 00:58:46 :) 00:58:51 ah 00:58:53 twice that + 200, perhaps? 00:59:22 -!- lithpbot has quit (Remote closed the connection). 00:59:30 * ehird` debugs to check symbol/etc saving is working 00:59:33 -!- lithpbot has joined. 00:59:39 > (quote a) 00:59:40 a 00:59:42 > (quote a) 00:59:43 a 00:59:51 > (quote a) 00:59:52 a 00:59:59 hm 01:00:28 -!- lithpbot has quit (Remote closed the connection). 01:00:39 -!- lithpbot has joined. 01:00:46 > (quote a) 01:00:46 a 01:00:50 oh 01:00:50 duh 01:00:51 hahaha 01:01:24 -!- lithpbot has quit (Remote closed the connection). 01:01:32 I didn't actually fill the dict =) 01:01:35 -!- lithpbot has joined. 01:01:40 > (quote a) 01:01:40 a 01:01:41 -!- RedDak has quit (Remote closed the connection). 01:01:42 > (quote a) 01:01:43 a 01:01:45 > (quote a) 01:01:45 a 01:01:48 Hm. 01:01:51 It's still growing., 01:02:12 -!- lithpbot has quit (Remote closed the connection). 01:02:38 s debug code 01:02:40 * ehird` adds debug code 01:03:17 -!- lithpbot has joined. 01:03:42 > (quote a) 01:03:43 a 01:03:49 > (quote a) 01:03:49 a 01:03:56 Ok, something ELSE is making it grow. 01:04:24 Ayee! 01:04:32 but why would it? 01:04:35 a monster hiding in your code, growing.. 01:04:37 it retains quote and a 01:04:41 and quote just returns its first arg 01:05:06 -!- lithpbot has quit (Remote closed the connection). 01:05:10 more debug output time. 01:05:17 -!- lithpbot has joined. 01:05:21 > (quote a) 01:05:22 a 01:06:01 -!- lithpbot has quit (Remote closed the connection). 01:06:03 the cons cells in (quote a) themselves? 01:06:07 .. 01:06:09 duh 01:06:11 -!- lithpbot has joined. 01:06:11 i am so stupid 01:06:18 * ehird` removes debug 01:06:25 -!- lithpbot has quit (Remote closed the connection). 01:06:35 Um 01:06:36 -!- lithpbot has joined. 01:06:38 It should take up memory, right? 01:06:46 I shouldn't cache cons cells should I? 01:06:50 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 01:06:50 #function:29 01:06:51 > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 01:06:52 #function:48 01:07:08 unless you are using hash consing, that would be hard 01:07:18 indeed 01:07:28 ok, so the functions right now are 01:07:33 lambda, quote, set, def, if 01:07:38 in which language is it written? 01:07:40 I wonder what comes next, logically, for 'essentialness'? 01:07:43 I'd guess cons, car, cdr 01:07:50 everything is so similar and anything. 01:07:52 jix: Python. with a gc implemented in Python! 01:07:56 oklopol: hey! welcome back from sleep :P 01:08:01 haha 01:08:02 oklopol: I got your example working 01:08:05 that has style 01:08:06 oklopol: and I wrote a goddamn gc 01:08:06 heh, hi 01:08:10 A GODDAMN GC 01:08:22 :D 01:08:22 cüüüül 01:08:25 writing a realtime gc is harder 01:08:36 jix: yeah it does a Big Global Stop 01:08:38 i'm a bit too tired to get excited right now 01:08:43 but yay 01:08:46 . 01:08:57 ehird`: you either have to add code to all reads or to all writes (which is more sane as reads are more common) 01:09:01 that sucks... 01:09:20 yeah well 01:09:20 who cares 01:09:21 :) 01:09:28 you do care if you need speed 01:09:49 so if you need speed and realtime ... :/ 01:10:09 i don't need speed 01:10:10 this is a toy 01:10:18 and you don't need realtime 01:10:22 ehird` must be after speed, that's why he's simulating a gc. 01:10:24 but i was talking about writing a gc in general 01:10:27 oklopol: ;) 01:10:53 two gc's on top of each other must naturally be twice as fast. 01:10:55 because the only thing i read about gcs is how to do a realtime gc because i thought i need that but then i didn't do that project anyway 01:11:09 oklopol: as bf interpreted in bf is twice as fast as uh wait... 01:11:14 i'll try sleeping again, see ya :| 01:11:19 jix: exactly! 01:11:21 aww, bye oklopol :( 01:11:27 can't you test my lexical scoping :P 01:11:27 bye, nights -> 01:11:31 hehe 01:11:38 i saw your tests already :)' 01:11:48 * oklopol is a fanatic logreader 01:11:49 yeah 01:11:53 but that's not lexical scoping 01:11:56 that's not your test 01:11:57 :P 01:11:58 that you used 01:11:59 on ololobot 01:12:06 oksy 01:12:08 i'll 01:12:09 test 01:12:15 > (def a 5) 01:12:15 -!- lithpbot has quit (Remote closed the connection). 01:12:19 LOL 01:12:21 whooooops :)) 01:12:23 the last nights were horrible... i was soldering stuff the last whole days and then i started to dream of soldering SOIC chips and made one solder bridge next to the other :( 01:12:27 def is *not* for funxx 01:12:35 even worse than it was in real 01:12:36 i'll stop that crapping out, wait 01:13:11 -!- lithpbot has joined. 01:13:23 now there's cons and car/cdr 01:13:24 > (set a 5 ) 01:13:24 (err) unmatched ) 01:13:27 > (set a 5) 01:13:28 lol? 01:13:28 5 01:13:33 > (cons 1 2) 01:13:34 (1 . 2) 01:13:38 anyway 01:13:40 you continue 01:13:55 > (set f (lambda () a)) 01:13:55 #function:2c 01:13:58 > (f) 01:13:59 -!- lithpbot has quit (Remote closed the connection). 01:14:05 looooooool? 01:14:06 also 01:14:09 you can do (def f () a) 01:14:10 grass can be green 01:14:16 yeah i know 01:14:17 !! 01:14:21 Huh? 01:14:36 anyway 01:14:40 reloading bot 01:14:43 with fix 01:14:46 -!- lithpbot has joined. 01:15:05 did.i.do.something.wrong.or.was.the.bot.the.one.doing.the.non.working? 01:15:08 bot 01:15:11 > (set f (lambda () a)) 01:15:11 #function:1b 01:15:16 > (set a 5) 01:15:16 5 01:15:19 > (set f (lambda () a)) 01:15:19 #function:2c 01:15:26 > (f) 01:15:26 5 01:15:31 cül 01:15:36 > (set a 7) 01:15:36 7 01:15:37 that isn't all of it :< 01:15:38 ah 01:15:39 :P 01:15:40 > (f) 01:15:41 5 01:15:43 ... 01:15:44 wait, what. 01:15:48 hah, you have the same thing i have 01:15:49 that's not right 01:16:00 i'll fix thanks :P 01:16:08 the same thing i berated oklopol for 01:16:09 fixity faxity 01:16:32 oerjan: you are all red and gooey 01:16:33 oerjan: looool 01:16:41 self.closure = table.copy() 01:16:43 perhaps it's the highlight. 01:16:43 gooey? 01:16:44 THAT might be the problem 01:16:46 do you think? 01:16:47 ;) 01:16:49 ah 01:16:54 gooey was just for fun. 01:16:55 but 01:16:58 i only have one table 01:17:01 table = {} 01:17:03 with the bindings 01:17:07 so, i don't see how else i could make a closure 01:17:12 oerjan: how could I? :P 01:17:18 indeed you want tables by reference in scheme 01:17:29 right, but how would i do that here 01:17:44 i'm gonna say magic. 01:17:52 scopes are essentially mutable objects 01:17:56 correct 01:18:00 but, unlike some implementations 01:18:07 i don't have [{},{}...{}] as a scope 01:18:09 i just have one 01:18:12 and copy it to get a function's closure 01:18:16 how do i, um, fix :P 01:18:28 ehird`: you have to keep a list of tables i think 01:18:29 an alternative is to have an indirection 01:18:42 storing a variable as a mutable cell 01:18:42 and first look in the first table then in the next one 01:18:56 jix: yeah, but how do i make a closure then? when i've done that all hell breaks loos 01:18:57 e 01:19:00 and storing a reference to that cell in the scope table 01:19:15 then you can do tables by copy 01:19:17 jix's sounds simpler 01:19:19 :| 01:19:22 but oerjan's is probably better 01:19:24 so, oerjan 01:19:27 i'll have a class "var" 01:19:34 which has a property "dest", which is an object 01:19:40 mine is used much in languages where most variables _aren't_ mutable 01:19:41 and store {name: var-object} in the table 01:19:42 right? 01:19:50 hmm 01:19:54 although with that way 01:19:56 if you do 01:19:59 ML, haskell etc. 01:20:05 (def f () x) 01:20:06 (set x 2) 01:20:06 without x being defined before 01:20:07 you can't get to it 01:20:11 but that's a problem now anyway 01:20:12 -!- pikhq has quit (Connection timed out). 01:20:14 how would i fix that? 01:20:44 ah yes that's a problem in scheme, you have all those forward references 01:20:51 yeah 01:20:59 should i kill myself or is there a way out? :P 01:21:00 -!- Sgeo has joined. 01:21:02 but i don't know the details right now... the only scoping thing i recently wrote was the one for the macro assembler i'm working on and that one is completely borked 01:21:41 i think a list of scopes fits scheme better 01:22:39 ML/haskell essentially need a complete preparsing stage on anything that can contain forward references (the whole module in haskell, each rec block in ML) 01:23:09 ok 01:23:12 (well haskell even allows mutually recursive modules, but support is a bit sketchy) 01:23:19 so how would i grab a closure? 01:24:17 let each scope contain a reference to its parent 01:24:22 ok 01:24:24 so 01:24:27 and just use references to them 01:24:34 [{_p: None, ...}, ..., {_p: prev, ...}] 01:24:36 right 01:24:42 but how exactly do i get a closure 01:25:09 you store the surrounding scope with the function 01:25:28 so... just copy the list of scopes, really 01:25:35 self.closure = scopes[:] 01:25:46 right? 01:26:12 you don't need copy, just reference 01:26:30 that won't copy the scope mappings 01:26:32 just the list of scopes 01:26:45 um, the scopes are the scope mapping 01:26:47 *s 01:26:56 as far as i consider it 01:27:14 [{k:v},{k:v},...{k:v}] 01:27:18 [...] is the list of scopes 01:27:22 each individual one is a scope 01:27:29 note that scope are mutable and you want changes to them to be shared 01:27:33 *scopes 01:27:41 yes 01:27:42 -!- GreaseMonkey has joined. 01:27:44 coping the list of scopes 01:27:48 does not copy the individual scopes 01:28:28 however, you don't need a list, if each scope contains a reference to its parent 01:29:17 right, but they're basically equiv. 01:29:25 it's stack-as-linked-list vs stack-as-array 01:29:31 ehird`: no 01:29:38 you all have a point. hang on to it, i'll try sleeping -> 01:29:41 because you will get a tree 01:29:58 ok 01:29:58 so 01:30:02 hmm but yeah array would work too but you'd keep more copys... 01:30:03 table = {_p: {...}, blah} 01:30:08 then copy table? 01:30:12 but that won't work!!! 01:30:17 because, if a value is updated in table 01:30:20 then it won't be seen 01:30:21 so.. 01:30:28 _no_ copying 01:30:37 ok 01:30:40 i think i get it now 01:30:41 let me try that 01:31:00 i only need new scopes for functions, right? 01:31:05 i.e. push a scope for funcall 01:31:07 pop after 01:32:29 oerjan: right? 01:32:33 and right before 01:32:39 more or less, everything desugars to lambdas 01:33:44 i think that works 01:34:19 maybe i should mention i only understand the theory, i've never tried to implement it :D 01:35:34 -!- lithpbot has quit (Remote closed the connection). 01:35:40 let's see if this works. 01:35:46 -!- lithpbot has joined. 01:35:53 > (set x 2) 01:35:53 2 01:35:54 > x 01:35:54 2 01:35:56 > set 01:35:56 #native-function:5 01:36:01 > (def f () x) 01:36:01 #function:22 01:36:04 > (f) 01:36:04 -!- lithpbot has quit (Remote closed the connection). 01:36:09 apparently not 01:36:33 oh wait 01:36:34 -!- lithpbot has joined. 01:36:36 > (set x 2) 01:36:37 2 01:36:42 oh what now oerjan. 01:36:45 > (def f () x) 01:36:45 #function:20 01:36:46 > (f) 01:36:47 2 01:36:47 when you call a function you don't just push a new scope 01:36:53 yeah i realised that 01:36:58 you save the old scope-list 01:37:03 make the new one your closure 01:37:03 you also replace the entire stack with the one in the closure 01:37:06 yeah 01:37:09 then restore it at the end 01:37:10 i do that 01:37:13 > (set x 5) 01:37:14 5 01:37:15 > (f) 01:37:15 5 01:37:16 woot 01:37:27 > (def g () (set x 7) (f)) 01:37:28 #function:3a 01:37:29 > (g) 01:37:29 7 01:37:32 damnit!!! 01:37:40 oerjan: this is dynamic scoping 01:37:41 > x 01:37:42 7 01:37:43 ... 01:37:44 wait, no 01:37:46 this is fucked up scoping 01:37:49 no it's correct 01:37:56 no 01:37:59 > (def g () (set x 7) (f)) 01:37:59 #function:4d 01:38:01 because you never defined x, so it's at top level 01:38:04 uhh 01:38:06 i did define x 01:38:08 as top level 01:38:12 set is define too 01:38:19 so it is shared 01:38:20 set x 7 should have set it in g's scope 01:38:22 then f should have ignored it 01:38:23 and no 01:38:24 oh 01:38:25 my lisp does not work that way 01:39:05 you agree that that is wrong? 01:39:07 -!- lithpbot has quit (Remote closed the connection). 01:39:11 that is a bit impractical if you _do_ want to set a variable which exists in an outer scope 01:39:12 it's dynamic scoping 01:39:18 -!- lithpbot has joined. 01:39:19 and yeah whatever 01:39:23 > (set x 5) 01:39:23 5 01:39:30 > (def f () x) 01:39:31 #function:20 01:39:32 > (f) 01:39:32 5 01:39:36 !bf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++.+++++++. 01:39:39 Hel 01:39:43 > (set x 6) 01:39:43 6 01:39:45 > (def g () (set x 7) (f)) 01:39:46 #function:38 01:39:46 > (f) 01:39:46 6 01:39:47 not optimal yet ^^ 01:39:47 oerjan, damnit 01:39:48 stop that 01:39:51 -!- lithpbot has quit (Remote closed the connection). 01:39:55 I was trying to read my debug output 01:40:01 oh :) 01:40:02 -!- lithpbot has joined. 01:40:11 > (set x 5) 01:40:12 5 01:40:25 > (def f () x) 01:40:26 #function:20 01:40:30 > (f) 01:40:30 5 01:40:37 oh 01:40:46 oerjan: i need to push a new stack AFTER replacing the closure 01:40:49 not just replace it 01:41:11 -!- lithpbot has quit (Remote closed the connection). 01:41:15 oerjan: :) 01:41:22 -!- lithpbot has joined. 01:41:23 > (set x 5) 01:41:24 5 01:41:27 > (def f () x) 01:41:27 #function:20 01:41:28 > (f) 01:41:28 5 01:41:39 > (def g () (set x 7) (f)) 01:41:39 #function:32 01:41:41 > (g) 01:41:42 5 01:41:45 hurrah 01:41:48 > (set x 7) 01:41:48 7 01:41:49 > (f) 01:41:49 7 01:41:50 > (g) 01:41:50 7 01:41:54 > (set x 50) 01:41:54 50 01:41:56 > (f) 01:41:57 50 01:41:57 > (g) 01:41:58 50 01:42:01 oerjan: IT WORKS :D 01:43:04 now let me try something more complicated 01:43:20 okay 01:43:26 i'll implement arithmetic while yo udo 01:43:37 oh and eval 01:44:20 oerjan: i'm excited what is it 01:44:21 :P 01:45:30 hm wait 01:45:47 no arithmetic 01:45:52 oh 01:45:56 what arithmetic do you need 01:46:00 i'll implement those first 01:46:16 just + 01:46:23 i just finished doing + 01:46:25 -!- lithpbot has quit (Remote closed the connection). 01:46:28 it's loading now 01:46:36 -!- lithpbot has joined. 01:46:38 anyway i'm not sure it will work because of your strange set 01:46:40 oerjan: there you go 01:46:43 hm 01:46:44 my strange set? 01:47:26 better test + 01:47:26 > + 01:47:27 #native-function:15 01:47:30 > (+) 01:47:30 0 01:47:31 > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x) ) 01:47:31 (err) unmatched ) 01:47:37 spaces freak it out oerjan 01:47:41 remove that one at the tend 01:47:44 > (+ 5 2) 01:47:44 7 01:47:46 oh 01:47:47 > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x)) 01:47:47 #function:5e 01:47:50 it's paul graham's thing :) 01:48:03 (set f (counter 42)) 01:48:06 > (set f (counter 42)) 01:48:06 #function:68 01:48:10 > (f) 01:48:10 (err) tried to add non-number 01:48:14 oh 01:48:15 duh 01:48:16 let me fix that 01:48:37 -!- lithpbot has quit (Remote closed the connection). 01:48:44 i didn't eval the arguments to + 01:48:45 :) 01:48:48 -!- lithpbot has joined. 01:48:49 > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x)) 01:48:49 #function:37 01:48:53 > (set f (counter 42)) 01:48:53 #function:41 01:48:54 > (f) 01:48:54 43 01:48:56 > (f) 01:48:57 43 01:48:58 > (f) 01:48:58 43 01:49:00 :| 01:49:01 alas 01:49:06 why does that not work? 01:49:07 oh, i see 01:49:13 ok 01:49:18 should changes like that persist? 01:49:21 there are two different x'es 01:49:28 that would mean, all variables change 01:49:29 err 01:49:31 persist 01:49:32 which would be odd 01:49:38 oerjan: ok, how should i do it to make that work 01:50:06 you need to make set not introduce a new variable if there is one in an outer scope 01:50:17 okay 01:50:18 can do 01:50:35 also you need a way to introduce one anyhow. def is fine for that. 01:50:44 set will introduce if it doesn't find on 01:50:45 e 01:51:23 -!- lithpbot has quit (Remote closed the connection). 01:51:24 ok 01:51:25 testing it 01:51:34 -!- lithpbot has joined. 01:51:48 oerjan: there you go 01:51:57 hm? 01:52:05 i changed set to do that 01:52:06 :) 01:52:11 > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x)) 01:52:12 #function:37 01:52:18 > (set f (counter 42)) 01:52:18 #function:41 01:52:19 it searches down until it finds a var, if it doesn't find one, it creates one in the current scope 01:52:28 i can't think when you'd need to just define a var, so :) 01:52:31 (f) 01:52:35 > (f) 01:52:35 43 01:52:36 > (f) 01:52:36 43 01:52:40 wtf :| 01:52:48 oh 01:52:48 duh 01:53:02 -!- lithpbot has quit (Remote closed the connection). 01:53:05 fixed. 01:53:14 -!- lithpbot has joined. 01:53:24 oerjan: so when would you want to define a var but not set it? 01:53:29 > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x)) 01:53:29 #function:37 01:53:32 > (set f (counter 42)) 01:53:33 #function:41 01:53:34 > (f) 01:53:34 43 01:53:36 > (f) 01:53:36 44 01:53:37 it's just a matter of hygiene 01:53:38 yay!! 01:53:39 > x 01:53:40 (err) unbound: x 01:53:42 > a 01:53:42 (err) unbound: a 01:53:56 oerjan: ok, well "def" defines functions 01:54:01 > (set f (counter 9)) 01:54:01 #function:55 01:54:02 oerjan: give me a name for 'make var, but don't set it' 01:54:08 > (f) 01:54:08 10 01:54:13 argh! 01:54:17 oh 01:54:18 sorry 01:54:18 ? 01:54:21 i messed up 01:54:26 heh ok 01:54:29 but, yeah, give me a name 01:54:32 and i'll make it 01:54:34 > (set g (counter 50)) 01:54:35 #function:62 01:54:36 also, it has to set the var somehow 01:54:39 so it's in its table 01:54:41 > (g) 01:54:42 51 01:54:43 > (f) 01:54:43 > (f) 01:54:43 11 01:54:44 12 01:54:48 > (g) 01:54:48 52 01:54:49 > (g) 01:54:50 53 01:54:51 so yeah that works 01:54:52 yay 01:54:56 but, what should it set it to? 01:54:57 0? 01:55:03 it has to set it for it to get in the table 01:55:31 it's not about not setting 01:55:39 what does defvar do then 01:56:42 it's about not confusing local and global variables by accident 01:57:25 !bf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++.+++++++..+++.-------------------------------------------------------------------.------------.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.--------.+++.------.--------.-------------------------------------------------------------------. 01:57:28 Hello, world! 01:57:34 oerjan: so tell me what it should do! 01:57:39 what does defvar do, exactly 01:57:41 !bf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.<++++++++++++++++++++++++++++++++++++.>+++++++.<+++.>----------------------------------------------------------------.------------.<++++++++.>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++.------.<-------------------.>- 01:57:42 --------------------------------------------------------------------------. 01:57:44 fuck 01:57:45 Hello, world 01:57:49 the basic idea for this being that set should _never_ create a new variable, while def always should unless there already is one in the exactly same scope 01:57:58 okay 01:58:02 so what should def set the var to? 01:58:27 ah 01:58:27 (def x 1) would set it to 1 01:58:34 *defvar 01:58:36 def is for functions 01:59:05 in scheme, define is for both 01:59:10 this isn't scheme 01:59:47 although think about it, you can get around the need for defvar with some lambda trickery 02:01:01 so 02:01:08 tell me what def should do in pseudocode 02:01:10 > (def counter2 (a) (lambda (x) ((lambda () (set x (+ x 1)) x) x))) 02:01:10 #function:94 02:01:32 (set h (counter2 3)) 02:01:36 > (set h (counter2 3)) 02:01:36 #function:9e 02:01:43 > (h) 02:01:43 (err) need 1 args, got 0 02:01:58 huh? 02:02:13 counter2 returns a lambda 02:02:19 lambda need to be given arguments 02:02:29 oh wait 02:02:35 so, can you tell me what def does 02:02:36 thank you 02:02:38 i need to go like no 02:02:39 w 02:02:55 > (def counter2 (a) ((lambda (x) ((lambda () (set x (+ x 1)) x)) x)) 02:02:56 (err) unmatched ( 02:03:14 oerjan!!! 02:03:18 what does def do?????? 02:03:27 > (def counter2 (a) ((lambda (x) (lambda () (set x (+ x 1)) x)) x)) 02:03:28 -!- lithpbot has quit (Remote closed the connection). 02:03:32 damn 02:03:43 you made it gc 02:03:44 :P 02:03:59 def introduces a new variable unless there is one in exactly the same scope 02:04:29 introduce 02:04:30 define introduce 02:04:33 set to something? 02:04:41 and if there is one in the same scope what does it do? 02:04:42 yes 02:04:46 if i know these two things, i can do it 02:04:51 then it just sets that instead 02:04:59 !bf +++++++[>+>+++<<-]>>+++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++.+++++++..+++.<+++++++++++++++++++++++++++++++++++++.------------.>++++++++.--------.+++.------.--------.<+.>>++++++++++. 02:05:01 Hello, world! 02:05:05 okay, oerjan 02:05:06 I will do that 02:05:22 ok the A* - closed list part works :) 02:05:32 (where - is without) 02:05:46 that part of the A* algorithm introduces more overhead than it does good in this case 02:07:14 ok, oerjan 02:07:14 done 02:07:15 and it's like 1000 times faster than my old lisp implementation 02:07:18 and also added -, *, / 02:07:21 -!- lithpbot has joined. 02:07:29 (/ 1 0) 02:07:33 > (/ 1 0) 02:07:33 -!- lithpbot has quit (Remote closed the connection). 02:07:36 hahaharigjdiogj 02:07:42 ;) 02:08:12 fixed 02:08:20 -!- lithpbot has joined. 02:08:21 > (set a 2) 02:08:22 (err) unbound: a 02:08:29 > (def a 2) 02:08:29 (err) need at least 3 args, got 2 02:08:31 oh 02:09:31 -!- lithpbot has quit (Remote closed the connection). 02:09:36 ok oerjan, here we go 02:09:42 -!- lithpbot has joined. 02:09:43 > (set var 2) 02:09:44 (err) unbound: var 02:09:47 > (def var 2) 02:09:48 -!- lithpbot has quit (Remote closed the connection). 02:09:50 AUWRHUIASDHSAD 02:10:03 * oerjan calls the acronym police 02:10:05 i did eval 02:10:07 instead of leval 02:10:13 -!- lithpbot has joined. 02:10:13 > (set var 2) 02:10:14 (err) unbound: var 02:10:16 > (def var 2) 02:10:17 2 02:10:22 > (set var 3) 02:10:22 3 02:10:26 > (def var 2) 02:10:26 2 02:10:38 wait 02:10:41 i'll rewrite counter 02:10:51 > (def counter (a) (def x a) (lambda () (set x (+ x 1)) x)) 02:10:51 (err) def takes 2 arguments if not defining func 02:10:56 oh damnit 02:11:04 -!- lithpbot has quit (Remote closed the connection). 02:11:27 almost there now :) 02:11:42 -!- lithpbot has joined. 02:11:43 > (def counter (a) (def x a) (lambda () (set x (+ x 1)) x)) 02:11:43 #function:3d 02:11:50 > (set f (counter 3)) 02:11:50 (err) unbound: f 02:11:55 > (def f (counter 3)) 02:11:55 #function:52 02:11:57 > (f) 02:11:57 4 02:11:58 > (f) 02:11:58 5 02:12:00 > (f) 02:12:00 6 02:12:04 > (/ 1 0) 02:12:04 -!- lithpbot has quit (Remote closed the connection). 02:12:09 What. 02:12:26 Fixing 02:12:27 yay 02:12:34 btw didn't you have to go? 02:12:37 -!- lithpbot has joined. 02:12:38 yes i do :| 02:12:39 > (/ 1 0) 02:12:44 > (/ 1 0) 02:12:44 (err) divide by zero 02:12:47 > (/ 0 1) 02:12:47 0 02:12:53 > (* 5 2) 02:12:55 10 02:12:59 > (+ 1 2 3) 02:13:00 6 02:13:04 OKAY 02:13:05 finally 02:13:08 i'm going 02:13:16 bye 02:13:17 tomorrow: persistance of memor 02:13:17 y 02:13:19 -!- lithpbot has quit (Remote closed the connection). 02:14:23 -!- ehird` has quit (Read error: 104 (Connection reset by peer)). 02:27:18 !bf ++++++++++[->>+>++>+++>++++>+++++>++++++[<]<]>>>>>>>++++++++++++.+++++++++++++++++++++++++++++.+++++++..+++.<<++++.<++.>>>++++++++.--------.+++.------.--------.<<<+.<<. 02:27:21 Hello, world! 02:27:35 Hello, EgoBot! 02:27:44 that's a rather long hello world 02:27:57 the first part is a stupid hardcoded value 02:28:10 "++++++++++[->>+>++>+++>++++>+++++>++++++[<]<]" that part 02:28:15 yeah 02:28:33 but when you start with that part you shouldn't be able to get below 168 bytes 02:28:39 that's pretty much what my greedy algorithm is like 02:28:49 mine isn't greedy 02:28:53 except it tries more possibilities for the factor 02:29:03 orly? 02:29:16 i use a modified A* so it is optimal 02:29:22 A*? 02:29:24 code plz 02:29:42 http://en.wikipedia.org/wiki/A*_search_algorithm 02:30:13 but my heuristic is pretty bad atm so it isn't as fast as it could be 02:30:21 hmm 02:30:32 i don't feel like understanding that now 02:31:12 all posibilities to print the string using ><+-. given a initial pointer position and memory state represent a graph 02:31:28 where each edge represents the printing of one character 02:32:24 you can assign weights to the edges... the number of chars it takes to output that character 02:32:41 ostensibly it looks like A* is what i needed 02:32:48 then you can use any algorithm to search the shortest path in a graph to get the optimal code for that initial memory state 02:33:09 i searched that tree by brute force 02:33:33 ouch 02:33:44 yeah 02:33:44 that tree is pretty large 02:34:00 hence the 460 year hello world 02:35:10 i skipped the part witht he closed list because i was lazy and skipping that part can't result in a wrong result 02:35:12 it only makes it slower 02:35:26 and it's fast enough right now 02:36:05 i wonder what the best way to choose the initial state is 02:36:42 i was think try all possibilities of evenly distributed ints in largestchar-smallestchar of the input string 02:37:32 smaller than smallest char might even be better 02:37:38 why? 02:37:47 try to output 13 02:37:59 huh? 02:38:09 i hope that number was the right one 02:38:32 +++[->++++<]>+. is shorter than +++++++[->++<]>-. 02:38:43 hmm 02:38:44 the first one generates 12 (which is below the char 13) 02:39:11 and if you have the string 13,50,30,60 it would be bad to not generate the 13 using 3*4+1 02:39:44 well, what i was doing tried up to 8 factors of [2, 256] 02:39:52 and picked the shortest 02:40:56 if you had a small way to generate them you could do the most common letters in the string 02:42:40 you might go backwards - find the initial state that makes the rest shortest 02:42:52 (of some length) 02:44:39 -!- Sgeo has quit (Read error: 110 (Connection timed out)). 02:47:31 !bf +++++++++[->++++++++>+++++<<]>.+++++++++++++++++++++++++++++.+++++++..+++.>-.------------.<++++++++.--------.+++.------.--------.>+.>++++++++++. 02:47:35 Hello, world! 02:47:51 !bf +++++++++[->++++++++>+++++>+<<<]>.+++++++++++++++++++++++++++++.+++++++..+++.>-.------------.<++++++++.--------.+++.------.--------.>+.>+. 02:47:55 Hello, world! 03:17:51 -!- GreaseMonkey has quit (Read error: 110 (Connection timed out)). 03:18:48 -!- GreaseMonkey has joined. 03:26:28 -!- jix has quit ("CommandQ"). 04:01:27 -!- cherez has quit ("Leaving."). 04:05:08 -!- pikhq has joined. 04:16:18 -!- cherez has joined. 06:44:47 -!- bsmntbom1dood has quit (Read error: 104 (Connection reset by peer)). 06:47:20 -!- bsmntbom1dood has joined. 07:22:51 -!- pikhq has quit (Read error: 110 (Connection timed out)). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 09:33:29 -!- GreaseMonkey has quit ("Every time you screw up AWOS, GreaseMonkey kills a kitten."). 09:09:53 -!- RedDak has joined. 10:44:56 -!- Tritonio has joined. 11:04:28 -!- lament has quit (Read error: 110 (Connection timed out)). 11:13:45 -!- oerjan has quit ("leaving"). 11:37:22 -!- Tritonio has quit (Remote closed the connection). 11:39:47 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 11:52:49 -!- lament has joined. 11:53:47 -!- jix has joined. 11:54:37 -!- oklopol has joined. 12:19:17 -!- RedDak has quit (Remote closed the connection). 12:21:58 !bf +++++++++[->+++++++++++>++++++++>+++++>+<<<<]>>.<++.+++++++..+++.>>-.------------.<<++++++++.--------.+++.------.--------.>>+.>+. 12:22:01 Hello, world! 12:23:41 !bf 12:23:41 ++++++++[>++++[>++>+++>+++>+<<<<-]>+>->+>>+[<]<-]>>.>>---.+++++++..+++.>.<<-.>.+++.------.--------.>+.>++. 12:24:02 !bf ++++++++[>++++[>++>+++>+++>+<<<<-]>+>->+>>+[<]<-]>>.>>---.+++++++..+++.>.<<-.>.+++.------.--------.>+.>++. 12:24:06 Hello World! 12:24:28 i know my textgen isn't perfect yet ;) 12:24:37 Neither am I :) 12:25:44 but i haven't implemented nested loops for the first part yet 12:35:43 !bf ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<+++++++++.<] 12:35:45 ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<++ 12:36:10 !bf ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<+++++++++.<] 12:36:14 ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<++ 12:36:22 Hm, that's odd. 12:38:46 !bf 124 (140): ++++++++++[->+++++++>++++>++++++++++>+++>+<<<<<]>++.>>+.+++++++..+++.<++++.>>++.<++++++++.--------.+++.------.--------.>+.>. 12:38:49 Hello, world! 12:39:10 !bf ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<+++++++++.<]++++++++++. 12:39:13 ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<++ 12:39:28 ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<+++++++++.<]++++++++++. 12:39:40 !bf ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<+++++++++.<]++++++++++. 12:39:44 ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<++ 12:42:07 maybe egobot has a line length limit? 12:43:56 !bf >>>++++++++++++++++++++++++++++++++++++++++<<<++++[>++++++++++[>++++++++++[>.<-]<-]<-] 12:44:00 ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 12:44:01 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 12:44:20 -!- oklopol has joined. 12:44:36 Yup. 381 characters. 12:44:50 That quine is 392. 12:44:52 make it shorter then ;) 12:44:58 :| 12:45:04 You. 12:45:07 :) 12:47:05 !bf 12:47:20 !bf 12:47:24 Hm, that doesn't work. 12:48:34 !bf [ 12:48:54 !bf ++++++++++++++++++++++++++++++++++++++++++++++++. 12:48:58 0 12:49:08 !bf ] 12:49:14 !bf_textgen Hello, world! 12:49:17 Huh? 12:49:23 !bf_txtgen Hello, world! 12:49:39 !help 12:49:44 help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 12:49:45 1l 2l adjust axo bch bf{8,[16],32,64} funge93 fyb fybs glass glypho kipple lambda lazyk linguine malbolge pbrain qbf rail rhotor sadol sceql trigger udage01 unlambda whirl 12:50:18 121 +++++++++[>++++++++>+++++++++++>+++++><<<<-]>.>++.+++++++..+++.>-.------------.<++++++++.--------.+++.------.--------.>+. [205] 12:50:28 uh that one is stupid >< 12:51:46 ah it doesn't include the newline 12:51:46 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 12:52:00 -!- oklopol has joined. 12:59:02 -!- ololobot has quit (Read error: 104 (Connection reset by peer)). 13:05:42 -!- RedDak has joined. 13:24:07 -!- oklopl has joined. 13:27:17 -!- oklopl has quit (Read error: 104 (Connection reset by peer)). 13:27:20 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 13:28:21 -!- oklopol has joined. 13:33:47 !bf +++++++++++++++[->+++++>+++++++>++++++++>++>+++<<<<<]>---.>----.+++++++..+++.>>>-.<++.<-.<.>-----.<---.--------.>>+. 13:33:49 Hello, world! 13:34:01 my best one without \n so far 13:34:53 !bf +++[->+++++<]>[->+++++>+++++++>++++++++>++>+++<<<<<]>---.>----.+++++++..+++.>>>-.<++.<-.<.>-----.<---.--------.>>+. 13:34:57 Hello, world! 13:35:04 and some manual tweeking makes it even better 13:38:24 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 13:39:52 -!- oklopol has joined. 13:48:59 -!- RedDak has quit (Read error: 104 (Connection reset by peer)). 13:49:08 -!- RedDak has joined. 13:58:53 -!- RedDak has quit ("I'm quitting... Bye all"). 14:06:37 -!- RedDak has joined. 14:18:30 !bf +++++++[->++++++[->++>++>+<<<]>-->+++>-[<]<]>>++.>.>--. 14:18:34 Hi! 14:40:37 !bf ++++++++++[->+++++[->+>++>++>++>+<<<<<]>++>>+>++>->+++[<]<]>>++.>+.>--..+++.>>++++.>++.<<-.<.>-----.<---.<-.>>>>+. 14:40:42 Hello, world! 14:40:45 but without newline 14:43:50 !bf 113 (134): ++++++++[->+++++[->++>++>+++>+>+<<<<<]>->+++>>-[<]<]>>.>---.+++++++..+++.>>>++++.<.<-.<.>-----.<---.--------.>>+. 14:43:54 Hello, world! 14:51:01 !bf ++++++[->++++++[->++>+++>+++>+++>+>+<<<<<<]>>->>++>+[<]<]>>.>-.>..+++.>>++.>----.<<-.<.>-----.<---.<-.>>>>+. 14:51:04 Hello, world! 14:54:02 -!- pikhq has joined. 14:57:53 with newline: 14:57:55 !bf 119 (136): ++++++[->+++++[->++>+++>+++>+<<<<]>>->>+>++[<]<]>>.>-.>..+++.>++.------------.<++++++++.--------.+++.------.<-.>>+.>--. 14:57:58 ouch 14:58:30 that's not hello world 14:58:47 !bf ++++++[->+++++[->++>+++>+++>+<<<<]>>->>+>++[<]<]>>.>-.>..+++.>++.------------.<++++++++.--------.+++.------.<-.>>+.>--. 14:58:50 hum 14:59:31 ah found the bug i think 14:59:54 !bf +++++++++[->++++[->++>+++>+++>+<<<<]>>->>+>+[<]<]>>.>++.>..+++.>-.------------.<++++++++.--------.+++.------.<-.>>+.>+. 14:59:58 Hello, world! 15:00:01 better :) 15:02:28 not shorter than dbc's but it takes only 15 secs to generate that 15:05:48 wait dbc's generates a different output 15:06:24 yeah i'm getting that down to 106 bytes too ^^ 15:08:11 but that seems to be some magicall limit 15:08:40 it reaches 106 pretty fast and then stalls 15:10:53 !bf +++++++++[->++++[->++>+++>+++>+<<<<]>>>->>+[<]<]>>.>>++.<..+++.>>----.+++.<.<++++.----.+++++.>.<--.>++++.------.>--.>+. 15:10:58 Hello #esoteric! 15:15:56 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 15:16:09 -!- oklopol has joined. 15:47:36 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 15:48:47 -!- oklopol has joined. 15:53:30 -!- oklopl has joined. 15:54:02 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 15:59:18 !bf +++++[->+++++[->++>++<<]>->>++[<]<]>>>+.<+.+++.>+.<.>+.++++.<+.++++.-.--.++.+++.>.<-.>.>. 15:59:22 3.14159265358979 16:02:51 -!- Nucleo has quit ("Snak 5.3.1 IRC for Macintosh - http://www.snak.com"). 16:08:37 -!- oklopl has quit (Read error: 104 (Connection reset by peer)). 16:08:43 -!- oklopol has joined. 16:16:15 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 16:17:41 -!- oklopol has joined. 16:19:36 -!- ehird` has joined. 16:26:32 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 16:28:01 -!- oklopol has joined. 16:30:14 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 16:33:03 -!- oklopol has joined. 16:43:03 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 16:45:43 -!- RedDak has quit (Remote closed the connection). 16:55:25 I borrowed the exact output text from Urban Müller's hello world. 16:57:36 -!- oklopol has joined. 16:58:22 (capital W and no comma, that is) 16:59:46 oklopol: hello 17:01:46 dbc: i'm able to get down to 106 bytes with that too... but not smaller 17:02:01 dbc: true hello world is: Hello, world! 17:02:02 ;) 17:03:01 !bf 106 (127): ++++++++[->++++[->++>+++>+++>+<<<<]>+>->+>>+[<]<]>>.>>---.+++++++..+++.>.<<-.>.+++.------.--------.>+.>++. 17:03:04 Hello World! 17:03:06 that's my version 17:03:20 !bf_txtgen Hello, world! 17:03:30 !help 17:03:34 help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 17:03:36 1l 2l adjust axo bch bf{8,[16],32,64} funge93 fyb fybs glass glypho kipple lambda lazyk linguine malbolge pbrain qbf rail rhotor sadol sceql trigger udage01 unlambda whirl 17:03:38 !bf_txtgen x 17:03:42 ehird`: it takes some time 17:03:52 and it doesn't include the final newline 17:03:56 does it not? 17:03:57 damn 17:04:22 35 ++++++++++++[>++++++++++>>><<<<-]>. [43] 17:04:26 117 ++++++++++++++[>+++++>+++++++>++>+++<<<<-]>++.>+++.+++++++..+++.>>++.<++++.<++++++++.--------.+++.------.--------.>+. [691] 17:04:34 ... the second one is x 17:04:40 hello world is tiny and "x" is huge XD 17:04:52 wiat 17:04:52 no 17:04:55 the former is x 17:06:00 !bf 118 (140): +++++++++[->++++[->++>+++>+++>+>+<<<<<]>>->>+>>+[<]<]>>.>++.>..+++.>-.>----.<<++++++++.--------.+++.------.<-.>>>+.>+. 17:06:04 Hello, world! 17:06:06 with final newline 17:07:12 !bf 116 (160): +++++++++[->++++[->++>+++>+++>+++>+<<<<<]>>->>+>+>+[<]<]>>.>++.>..+++.>>-.------------.<++.<.>-----.<---.<-.>>>+.>+. 17:07:16 Hello, world! 17:08:19 -!- RodgerTheGreat has joined. 17:09:29 hi, everyone! 17:12:38 !bf ++++++++[->+++++[->>++>+++>+++>+>+>++<<<<<<<]>+>->->-->+>-[<]<]>>>.>>+.>----.>.>++.<<<<-.>-----.+++.--.<+++.>>>>++.<<<+++.---.<<-.>.>.----.<++.<<++. 17:12:42 Hi, RodgerTheGreat 17:12:47 :) 17:13:34 wahoo got a new shorter hello world!!! 17:13:49 106 was the old record right? 17:14:07 !bf 104 (109): ++++++[->++++++[->++>+++>+++>+>++<<<<<]>>->>->++>++[<]<]>>.>-.>..+++.>++.>+++.<<.+++.------.<-.>>+.>>--. 17:14:11 Hello World! 17:14:18 I dunno 17:14:30 don't most of them generate the string "Hello, World!" ? 17:14:51 RodgerTheGreat: the 106 byte version generates "Hello World!" same for the original bf hello world (according to dbc) 17:15:12 and most generate "Hello, world!\n" this one generates "Hello World!\n" 17:15:57 "Hello, world!\n" is grammatically and unixly correct 17:16:16 but i was trying to get shorter than dbc's so i have to use the same output 17:16:21 unless Hello World is a name or title 17:16:22 ehird`: agreed 17:17:05 * ehird` wonders what to name the equality predicate in his lisp 17:17:09 eq, equals, =? 17:17:43 equ? 17:18:05 sounds foreign 17:18:19 (eq 1 2) (equals 1 2) (= 1 2) 17:18:36 (eq '(1 2) '(3 4)) (equals '(1 2) '(3 4)) (= '(1 2) '(3 4)) 17:19:07 RodgerTheGreat: it's a rather 'unique' lisp in that it's implemented in Python but I wrote my own GC ;D 17:19:23 equ is what I use in several of my languages 17:19:32 interesting 17:19:53 it's a rather dumb stop-the-world mark and sweep gc 17:20:05 it runs every 200 object allocations. 17:22:30 it'd be interesting if you exposed some of the GC's parameters to programs 17:22:38 like what 17:23:02 like the number of object allocations it waits for 17:23:15 ah 17:23:27 IMO the gc is an implementation detial 17:23:29 *detail 17:23:29 :-) 17:23:38 (so is memory allocation) 17:23:54 I suppose, but you could allow for greater performance tweaking 17:24:56 dude 17:24:58 it runs on python 17:25:04 -!- lithpbot has joined. 17:25:05 the gc cant even free because you can't free in python 17:25:09 it just removes it from the big list 17:25:14 which python's gc eventually collects 17:25:18 it's sloooooow 17:25:19 :) 17:25:21 > 2 17:25:21 2 17:25:27 > (+ 5 4 1) 17:25:29 10 17:25:34 > (/ 1 0) 17:25:35 (err) divide by zero 17:25:37 > (/ 0 1) 17:25:37 0 17:25:55 > (eq 1 1) 17:25:55 1 17:25:57 > (eq 1 0) 17:25:57 0 17:26:00 > (eq 1 1 1 1) 17:26:00 1 17:26:01 > (eq 1 1 1 1 0) 17:26:02 0 17:26:44 > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1))))) 17:26:45 #function:83 17:26:52 > (fact 1) 17:26:53 -!- lithpbot has quit (Remote closed the connection). 17:26:56 hah 17:27:04 hmm 17:27:08 it caused the gc to die 17:27:09 ah, i see 17:27:12 i have a bug in the gc 17:27:46 -!- lithpbot has joined. 17:27:47 > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1))))) 17:27:47 #function:41 17:27:50 > (fact 1) 17:27:52 -!- lithpbot has quit (Remote closed the connection). 17:27:56 ... wow 17:28:00 it went on a gc spree 17:28:10 doing god knows what 17:30:03 let's try taht again :) 17:30:06 -!- lithpbot has joined. 17:30:08 > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1))))) 17:30:08 #function:41 17:30:11 > (fact 1) 17:30:17 -!- lithpbot has quit (Remote closed the connection). 17:30:23 maximum recursion depth 17:30:23 :| 17:30:59 debug time 17:31:07 -!- lithpbot has joined. 17:31:08 > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1))))) 17:31:08 #function:41 17:31:17 > (fact 1) 17:31:22 -!- lithpbot has quit (Remote closed the connection). 17:31:52 ... 17:31:52 Call #function:41 with [-29] 17:31:52 ... 17:31:54 hmmmmmmmmmmmmmmmmmmmmmmmmmm :P 17:32:10 -!- lithpbot has joined. 17:32:18 > (def isone (n) (eq n 1) 17:32:19 (err) unmatched ( 17:32:22 > (def isone (n) (eq n 1)) 17:32:22 #function:38 17:32:25 > (isone 1) 17:32:25 0 17:32:30 loooooooooooooooooooooooooooooool? 17:32:42 > (eq 1 1) 17:32:42 1 17:32:47 Nonsensical 17:33:13 aha 17:33:15 -!- lithpbot has quit (Remote closed the connection). 17:33:18 silly me 17:33:26 -!- lithpbot has joined. 17:33:27 > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1))))) 17:33:27 #function:41 17:33:30 > (fact 1) 17:33:30 1 17:33:37 > (fact 2) 17:33:38 2 17:33:39 > (fact 4) 17:33:40 24 17:33:51 > (fact 10) 17:33:52 3628800 17:33:57 wow, that's pretty fast 17:34:10 > (fact 30) 17:34:11 265252859812191058636308480000000L 17:41:13 > evak 17:41:13 (err) unbound: evak 17:41:15 > eval 17:41:15 #native-function:13 17:41:17 > (eval 2) 17:41:17 2 17:41:18 > (eval '2) 17:41:19 (err) unbound: '2 17:41:26 > (eval (quote (eval 2))) 17:41:26 (eval 2) 17:43:46 -!- lithpbot has quit (Remote closed the connection). 17:44:07 -!- lithpbot has joined. 17:44:09 > (eval (quote (eval 2))) 17:44:09 2 17:46:56 -!- lithpbot has quit (Remote closed the connection). 17:47:18 -!- lithpbot has joined. 17:47:23 > (set a 2) 17:47:23 (err) unbound: a 17:47:33 > (define a 2) (set a 5) a 17:47:34 5 17:48:43 > (or 0 0 0 2) 17:48:43 0 17:48:46 wtf 17:48:56 oh 17:49:13 -!- lithpbot has quit (Remote closed the connection). 17:49:24 -!- lithpbot has joined. 17:49:42 > (or 0 0 0 2) 17:49:42 2 17:49:47 > (or 2 0) 17:49:47 2 17:49:50 > 02 17:49:51 2 17:49:55 > (and 0 0) 17:49:56 0 17:49:58 > (and 1 0) 17:49:58 1 17:50:00 oh. 17:50:20 -!- lithpbot has quit (Remote closed the connection). 17:50:31 -!- lithpbot has joined. 17:51:18 > (and 1 0) 17:51:18 0 17:51:20 > (and 1 1) 17:51:21 1 17:51:25 > (and 1 2) 17:51:25 2 17:57:45 > (and 0 2) 17:57:46 0 17:57:51 > (and 0 (/ 1 0)) 17:57:51 0 17:57:55 hmm 17:57:58 that should give an error 17:58:02 shouldn't 17:58:02 > (/ 1 0) 17:58:02 (err) divide by zero 17:58:07 > (and 0 (/ 1 0)) 17:58:08 0 17:58:09 yeah 17:58:12 the error should bubble up 17:58:13 (at least i expect and to short cut) 17:58:18 oh 17:58:18 right 17:58:19 yes 17:58:24 you're right 17:58:25 :P 17:59:54 i'm silly 18:00:05 i'm naming my auto-saving-to-disk InterpreterState replacement AutoPickleIntepreterState3000 :) 18:08:28 -!- lithpbot has quit (Remote closed the connection). 18:19:46 72/XEKOIE9yBDG3+6m8G8UrDt0Tm9iNTWg 18:33:10 -!- jix has quit (Nick collision from services.). 18:33:20 -!- jix has joined. 18:42:16 back 18:42:25 bsmntbombdood: whut 18:45:46 lisp object = symbol | cons pair | string | number, right? 18:47:02 function 18:47:08 vector 18:47:10 port 18:47:28 ah yes, lambda 18:47:38 i think i can pass on vectors :| 18:47:43 ports, maybe, but probably not needed 18:47:47 null 18:47:55 nil is the empty list 18:47:58 But yeah 18:48:08 and you didn't have lists 18:48:35 yeah well 18:48:38 lists = cons pairs 18:48:40 though i may change that 18:48:44 wrong 18:48:48 null isn't a pair 18:48:53 lists = well formed cons pairs + nil 18:49:05 yes 18:49:11 although, i may represent them as python lists [1,2,3] 18:49:17 cheaper than linked list operations 18:49:24 (Though the slicing for cdr would be slow. 18:49:54 boolean, symbol, char, vector, procedure, pair, number, string, port 18:50:02 are scheme's types 18:50:13 + null 18:50:47 scheme != list 18:50:48 :P 18:50:50 er 18:50:51 ? 18:50:52 lisp 18:50:55 scheme != lisp 18:51:00 it is a lisp dialect 18:51:02 right, scheme \subset lisp 18:51:07 not really 18:51:11 it's a superset and a subset 18:51:19 scheme \wonky-thing lisp 18:51:29 "lisp" is nothing but dialects 18:51:36 :) 18:51:44 not in the 70s! 18:52:05 yes... 18:52:40 but anyway, i'm not sure i need booleans 18:52:47 if NIL is false and everything else is true 18:52:55 (i guess T will be a self-evaluating symbol too) 18:53:07 yeah, cl doesn't have booleans 18:53:12 then again 18:53:15 I find nil/t kind of ugly 18:53:20 #t and #f is much nicer 18:53:31 how does scheme do characters? the syntax 18:53:45 #\ 18:53:56 is that related to #t and #f in any way? 18:54:03 ? 18:54:27 the syntax 18:54:41 sure, the both start with # 18:54:50 i mean conceptually 18:54:50 :P 18:54:57 no 18:55:22 vectors start with # too 18:55:30 i've never got why scheme needed vectors 18:55:40 uhhhhhhh 18:55:45 i mean natively 18:55:52 they don't seem important enough to become a core type 18:56:04 because there's no way to implement any O(1) access time collections without them 18:56:10 duh 18:56:28 so basically vectors are an implementation detail kind of thing 18:56:37 no... 18:56:39 'our lists aren't arrays of memory, but we have a vector that is!' 19:01:02 anyway, let's see 19:01:09 i think i need ports, so 19:01:29 SYMBOL, CONS, STRING, NUMBER, PORT, NIL 19:01:37 bsmntbombdood: do you really think anything else is useful? 19:01:56 chars, vectors 19:02:07 oh, booleans too 19:02:09 ok, and chars 19:02:16 but i really don't know why i would want vectors? 19:02:24 can you tell me a situation where they are really infinitely useful? 19:02:34 but really all you need to implement at first is pairs, symbols and fucntions 19:02:53 you can't implement hash tables, arrays without vectors 19:03:00 ok, i guess 19:03:11 no collection can have better than linear time indexing 19:03:19 a vector is just a list that is an array of memory, right? nothing extra? 19:03:36 a vector is a C array 19:03:45 right 19:03:46 a list with linear time indexing 19:03:52 *constant 19:04:33 anyway, i know the standard functions for lists (car, cdr, cons, set-cdr, set-car, etc.) and numbers (well duh), but what about for ports and vectors? 19:04:37 what are the standard functions and their names? 19:04:58 write-char, read-char 19:05:26 yeah 19:05:30 what about vectors? 19:05:45 call-with-input-port, call-with-output-port for opening files 19:06:03 wait, is that for vectors? 19:06:04 vector-ref, vector, make-vector, vector-set! 19:06:08 ah 19:06:16 i think I will start with these: 19:06:24 SYMBOL, CONS, STRING, CHAR, NUMBER, BOOLEAN, FUNCTION, NIL 19:06:29 i'll leave out ports and vectors until later 19:08:26 -!- sebbu2 has joined. 19:12:11 bsmntbombdood: do you think my errors should be first-class? 19:12:19 i could do things like implement try-catch then 19:13:11 o 19:13:23 -!- oklopol has left (?). 19:13:23 -!- oklopol has joined. 19:13:33 * oklopol needs logs... 19:13:44 oklopol: hello 19:13:51 oklopol: i'm rewriting my lisp, again 19:13:52 but cleanl 19:13:53 y 19:14:06 i ditched multiple classes, now I just have a LispObject class 19:14:53 hehe, i see 19:15:00 but now logs. 19:15:30 :P 19:17:22 bsmntbombdood: any opinions? 19:21:58 bsmntbombdood: :S 19:25:13 finally 19:25:34 i guess i should start skipping the debugging parts of logs :) 19:26:31 oklopol: haha 19:26:59 -!- sebbu has quit (Connection timed out). 19:27:52 oklopol: should i make lisp errors first-class lisp objects? 19:28:43 oklopol: or... nothing 19:28:47 i.e. just python exceptions 19:28:51 lisp objects would be cooler :P 19:30:47 i like having errors first class 19:30:55 in numbda, some syntax errors are first class. 19:31:18 you can do (8 8) + 4 19:31:22 8 8 is a syntax error 19:31:36 error evaluates to 0 19:32:03 lmao 19:32:08 no i mean 19:32:13 i know what you mean 19:32:13 it still throws by default 19:32:18 but you can catch it 19:32:20 and manipulate it in lisp 19:32:24 yeah 19:33:58 does your lisp have floats or whatever? 19:33:59 or just ints 19:35:01 hmm, i'm pretty sure it doesn't have floats if it doesn't have strings 19:35:04 but not sure 19:35:52 oklopol: should i have error types and descriptions or just errors 19:35:55 something like 19:36:08 "type=int-error, message=divide by zero" 19:36:18 instead of just "message=divide by zero" 19:36:42 just make one error type unless you have a more flexible type system overall 19:36:48 err i mean extendable 19:37:13 i don't see any point making error types really 19:37:21 unless you can define your own 19:37:32 since you can't pattern match on them or anything 19:37:36 also asdfasdfasdfasdfasdfasdfasd 19:37:58 tomorrow, test @ university, and i still gotta return my demos tonight. 19:38:13 i'm so tired i can barely keep my eyes opn 19:38:21 *nop 19:38:24 x 19:38:25 D 19:38:27 *xD 19:41:48 also, for some reason i'm going to watch a few episodes of south park first. 19:55:21 bsmntbombdood: are characters automatically casted to strings in scheme? 20:21:54 oklopol: otools, what is it 20:33:31 otools is something i use for parsing 20:33:56 it basically does tokenization, and there may be an infix parser, don't remember 20:34:24 oh 20:34:30 it provides my Itr class 20:34:38 that's basically StringIO 20:35:13 made my own, stringio lacked something, don't remember what 20:35:19 .curr() 20:35:24 anyway, i'm writing a "tokentools" right now :) 20:35:29 it does tokenization and also some parsing helpers 20:35:43 e.g. an accept([tok,tok,tok...]) method 20:36:01 what i'd actually like is something like StringTokenizer in java 20:36:23 although you could improve it a lot. 20:36:34 mine is kind of like that 20:36:50 it's very flexible as far as where it splits actually 20:37:06 you give it a function to tell it whether a character is a splitter or not 20:37:14 and also ignores multiple splitters in a row 20:37:22 err kay... 20:37:33 basically it tokenizes and helps a lot with parsing 20:37:43 why not give it a regexp representing a token? 20:37:48 and split by that. 20:38:09 because you can pass it str.isspaec 20:38:12 *isspace 20:38:13 :-) 20:38:22 k 20:38:31 so you can't do like 4+5 20:38:40 or even (4 + 5) 20:38:49 yeah you can 20:38:53 oh 20:38:54 i see. 20:38:59 well not relaly 20:38:59 lambda x: x.isspace() or x == "+" 20:39:02 *really 20:39:12 :O 20:39:29 so... 4+5 would be ["4", "5"] and ignore the addition symbol? 20:39:54 oh 20:39:57 hmm 20:40:02 ok, it'll hvae 20:40:03 or alternatively you'd have "4 5" be tokenized into ["4", " ", "5"], in case you save the separators as well 20:40:06 splittokens and ignoretokens 20:40:21 i think you need to think this through a bit ;) 20:40:22 Tokenizer(blah, x.isspace, lambda x: x == "+") 20:40:22 well 20:40:29 of course depends what you wanna use it for. 20:40:33 + is a splitter and gets added on 20:40:34 isspace isn't 20:41:37 seems a bit hacky to me, but it seems to work for most grammars 20:41:42 hmm hmm 20:42:01 oh, yeah, the demos 20:42:10 i'm not sure if that's the right word 20:42:30 ok 20:42:33 how should i do it then 20:42:38 to make 5+4 work 20:42:59 yours will actually tokenize most things correct. 20:43:33 how should i do it though in your opinion 20:43:33 ;) 20:43:40 the problem with not using regexes is stuff that can be of any length naturally can't be parsed trivially, like numbers & identifiers 20:43:53 but you rarely have those next to each other without a space in between 20:44:14 the only stuff not always separated by ws are operators and parens, i think 20:44:33 and what you thought of making actually parses that quite nicely 20:44:35 *tokenizes 20:44:59 how about i just return delimiters 20:45:03 seems ok, no? 20:45:04 i'm not telling you what to do, just analyzing that for fun; also, demos 20:45:07 hmm 20:45:15 java lets you do that 20:45:18 just return delimiters? 20:45:24 hmmm 20:45:26 new StringTokenizer(blah, "abc", true) 20:45:32 third optional parameter is returnDelims 20:45:37 that's how you would e.g. parse sexprs 20:45:37 so 20:45:42 i'll just return 'em 20:45:45 it's not hard to do 20:45:50 if tok.isspace(): continue 20:46:57 oklopol: seems flexible enough, no? 20:47:23 -!- RedDak has joined. 20:47:24 very seems. 20:47:30 wanna do my demos for me? 20:47:42 demos? 20:48:08 these exercises we gotta do at home and demonstrate for the whole calssa 20:48:11 ...class 20:48:22 ah 20:48:50 oklopol: your lisp doesn't do tail recursion 20:48:54 no. 20:49:04 i couldn't think of a trivial way to do that 20:49:17 well... 20:49:31 i can now, i prolly could then too, but was too lazy even for that 20:49:38 while last_caller == self: ... 20:49:42 or rather 20:49:44 at the end 20:49:49 err 20:49:50 if eval(car) == self 20:49:55 then do nothing 20:49:57 else break 20:50:00 all wrapped in a while True: 20:50:07 hmm, you do know when tail recursion applies? 20:50:16 yeah 20:50:20 or was that just a simplification 20:50:21 prolly. 20:50:24 when you're at the end and there's a list with eval(car) == sel 20:50:24 f 20:50:32 end = end of execution, not function 20:50:33 almost. 20:51:44 you can just as well have circular recursion, and still have tail recursion 20:52:00 in fact, in some languages, you don't even need to recurse and still have tail recursion. 20:52:19 if you can do code generation @ runtime 20:53:14 i'm gonna start soon. 20:53:30 why not now... 20:53:51 because you're bored 20:53:54 and lazy 20:54:10 i'm not bored 20:54:23 lazy then 20:54:29 that goes without saying 20:55:13 glah, okay, i *have* to start them now; and i will! -> 20:56:13 -!- Sgeo has joined. 20:58:24 -!- dak has joined. 20:58:58 * oklopol loves doing ascii karnaugh maps... 20:59:54 oklopol: i thought you were starting them 21:00:14 i did 21:00:21 that what the karnaugh map is for 21:00:28 ah 21:00:29 :P 21:03:13 i don't understand why we have to do this stuff, base-10 addition is harder than boolean algebra 21:03:45 well i find base-10 addition really hard! i have 8 fingers! 21:05:35 -!- RedDak has quit (No route to host). 21:05:56 cül 22:10:10 5 22:10:58 -!- jix has quit ("CommandQ"). 22:18:16 -!- dak has quit (Read error: 104 (Connection reset by peer)). 22:43:57 -!- oerjan has joined. 22:51:41 Hi oerjan 22:52:43 * pikhq cleans up 10,000 blue voting credits 22:53:44 hello 22:55:40 I suppose no one's going to work on PSOX for me? lol 22:55:57 i thought you were so infatuated with it all you did was work on it :p 22:56:07 * Sgeo has become distracted from it :( 23:12:11 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 23:12:25 -!- oklopol has joined. 23:20:01 * pikhq has removed 10,000 blue voting credits from 10,000 CFJs 23:20:28 Shoobadafa. 23:23:02 is it possible to do a crossing in wireworld? 23:23:34 i remember trying to do it some time ago, but forgot to ask here where someone might actually know 23:27:06 oklopol: my lisp is going to have loads more things in this incarnation 23:27:26 currently i have symbol, cons, string, character, number, boolean, procedure, primitive, error, nil 23:27:31 and i plan to add port and vector 23:28:33 -!- sebbu2 has quit ("@+"). 23:30:22 bindings[LispObject(SYMBOL, "prim_name")] = LispObject(PRIMITIVE, prim_func, (min, max)) # is a bit ugly though 23:35:47 and you use port for..? 23:36:01 umm 23:36:02 scheme ports 23:36:05 i actually don't know what that is in lisp at all, perhaps i should check instead of guessing. 23:36:07 stdin, stdout, files, streams, ... 23:36:12 okay, i did know 23:36:13 basically it's a stream 23:36:18 a socket would also be a port, for example 23:36:26 yeah i guessed then 23:36:40 anyways, what are you using them for? 23:36:41 hey 23:37:00 um 23:37:00 i just realized your lisp isn't made just for an irc bot, i just wanted you to put it on one. 23:37:01 ports 23:37:01 :P 23:37:07 and yeah 23:37:08 :P 23:37:15 i'm a slow realizer. 23:37:25 this time i'm going to create a seperate program for the bot 23:37:28 i couldn't make one of the assignments :<< 23:37:30 and make it call out to the lisp one 23:37:32 exercises 23:37:33 whatever 23:37:44 yeah, that's bettah 23:37:45 so i don't add irc-specific stuff to the interp 23:37:49 and also if it crashes 23:37:50 the bot doesn't 23:44:31 ehird`: you could create an irc module or something to load 23:45:29 oerjan: possibly 23:45:33 but, meh