00:00:08 <ehird`> hm, ok, that isn't being printed on my console 
00:00:17 -!- lithpbot has quit (Remote closed the connection). 
00:00:32 -!- lithpbot has joined. 
00:01:18 -!- lithpbot has quit (Remote closed the connection). 
00:01:29 -!- lithpbot has joined. 
00:02:10 -!- lithpbot has quit (Remote closed the connection). 
00:02:19 <ehird`> i'll implement some primitives first 
00:05:36 -!- lithpbot has joined. 
00:05:37 <ehird`> now it has lambda, quote, set , def, if 
00:06:13 <ehird`> > (if 0 (quote yes) (quote no)) 
00:06:23 <ehird`> > (if () (quote yes) (quote no)) 
00:07:25 -!- lithpbot has quit (Remote closed the connection). 
00:07:45 -!- lithpbot has joined. 
00:07:46 <ehird`> > (if 0 (quote yes) (quote no)) 
00:07:49 <ehird`> > (if 1 (quote yes) (quote no)) 
00:08:12 <ehird`> my boolean function returns 1 or 0 
00:08:18 <ehird`> but it isn't returning 0 for "0" which is bizzare 
00:08:27 <ehird`> ololobot's lisp does it 
00:08:41 -!- lithpbot has quit (Remote closed the connection). 
00:08:54 -!- lithpbot has joined. 
00:08:58 <ehird`> > (if 0 (quote yes) (quote no)) 
00:09:17 <oklopol> bsmntbom1dood: if C does it, it must be right. 
00:09:46 -!- lithpbot has quit (Remote closed the connection). 
00:09:54 <bsmntbombdood> and you need a client that does last-spoken tab completion 
00:10:11 <ehird`> ifthis doesn't work i don't know what's wrong: 
00:10:14 -!- lithpbot has joined. 
00:10:15 <ehird`> > (if 0 (quote yes) (quote no)) 
00:10:19 <ehird`> > (if 1 (quote yes) (quote no)) 
00:10:22 <ehird`> > (if () (quote yes) (quote no)) 
00:10:24 <ehird`> > (if (1) (quote yes) (quote no)) 
00:10:25 -!- lithpbot has quit (Remote closed the connection). 
00:10:50 <ehird`> 0 because that's what the to-boolean returns 
00:10:59 <ehird`> () because it makes no sense to have nil true 
00:12:14 -!- lithpbot has joined. 
00:12:16 <ehird`> i don't really care if you think that 
00:12:20 <ehird`> > (if (1) (quote yes) (quote no)) 
00:12:21 -!- lithpbot has quit (Remote closed the connection). 
00:12:50 -!- lithpbot has joined. 
00:12:52 <ehird`> it's failing at a previous point 
00:12:57 <ehird`> (if (1) (quote yes) (quote no)) 
00:13:01 <ehird`> > (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 <ehird`> > (if (1) (quote yes) (quote no)) 
00:13:56 <ehird`> > (if () (quote yes) (quote no)) 
00:13:56 -!- lithpbot has quit (Remote closed the connection). 
00:15:03 <ehird`> oklopol: it's all there 
00:15:06 -!- lithpbot has joined. 
00:15:06 <oklopol> bsmntbom1dood: are you sure it works at all :D 
00:15:09 <ehird`> > (if () (quote yes) (quote no)) 
00:15:16 <ehird`> > (if (quote (1)) (quote yes) (quote no)) 
00:15:24 <oklopol> > ((((lambda (a) (lambda (b) (lambda (c) ((a c) (b c))))) (lambda (a) (lambda (b) a))) (lambda (a) (lambda (b) a))) 8) 
00:15:52 <oklopol> (lambda (c) ((a c) (b c))) 
00:15:57 <ehird`> > (def test (x) ((lambda (y) y) x)) 
00:16:21 <ehird`> def works now, oklopol 
00:17:03 <ehird`> (def NAME ARGS CODE...) 
00:17:05 <oklopol> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:17:07 <oklopol> > (def k (a) (lambda (b) a)) 
00:17:58 <ehird`> (def s (x) (lambda (y) (lambda (z) ((x z) (y z))))) 
00:17:59 <ehird`> > (def s (x) (lambda (y) (lambda (z) ((x z) (y z))))) 
00:19:18 <ehird`> http://rafb.net/p/Q6qc8624.html 
00:19:21 <ehird`> i have no idea what went wrong 
00:19:46 <oklopol> i can tell you on monday when i have time :<<< 
00:20:21 -!- lithpbot has quit (Remote closed the connection). 
00:20:32 -!- lithpbot has joined. 
00:20:33 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def k (a) (lambda (b) a)) 
00:20:59 <oklopol> bsmntbom1dood: you sure it isn't just in an infinite loop or smth? 
00:21:11 <ehird`> bsmntbombdood: make it print out EVERY iteration 
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 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def k (a) (lambda (b) a)) (((s k) k) 3) 
00:24:12 -!- lithpbot has quit (Remote closed the connection). 
00:24:26 -!- lithpbot has joined. 
00:24:45 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def k (a) (lambda (b) a)) (((s k) k) 3) 
00:25:49 -!- lithpbot has quit (Remote closed the connection). 
00:26:01 -!- lithpbot has joined. 
00:26:05 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def k (a) (lambda (b) a)) (((s k) k) 3) 
00:26:53 -!- lithpbot has quit (Remote closed the connection). 
00:27:04 -!- lithpbot has joined. 
00:27:16 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def k (a) (lambda (b) a)) (((s k) k) 3) 
00:31:22 -!- ecl has joined. 
00:31:32 -!- ecl has left (?). 
00:32:23 <bsmntbombdood> my algorithm, running on my computer, would take 460 years to compute hello world 
00:33:25 <ehird`> AHAHAHAHAHAHAHAHAHAAHAAHAHAHAHAHAHAHAHAHAHHSAADJOASDLSKHDLKF 
00:36:19 -!- lithpbot has quit (Remote closed the connection). 
00:36:41 -!- lithpbot has joined. 
00:36:59 -!- ehird` has left (?). 
00:37:03 -!- ehird` has joined. 
00:37:21 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:37:26 <ehird`> > (def k (a) (lambda (b) a)) 
00:38:05 <ehird`> ooh, i can reduce it a bit 
00:38:50 -!- lithpbot has quit (Remote closed the connection). 
00:39:01 -!- lithpbot has joined. 
00:39:15 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:39:16 -!- lithpbot has quit (Remote closed the connection). 
00:39:37 -!- lithpbot has joined. 
00:40:06 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:40:33 -!- lithpbot has quit (Remote closed the connection). 
00:48:00 <ehird`> I think the gc should work 
00:48:04 -!- lithpbot has joined. 
00:48:26 <ehird`> > (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 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:49:06 <ehird`> > (def k (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:49:12 <ehird`> > (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 <ehird`> > (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 <ehird`> > (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 <ehird`> > (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 <ehird`> > (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 <ehird`> > (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:38 -!- lithpbot has quit (Remote closed the connection). 
00:49:55 -!- lithpbot has joined. 
00:49:58 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:50:28 -!- lithpbot has quit (Remote closed the connection). 
00:50:55 -!- lithpbot has joined. 
00:50:56 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:51:01 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:51:05 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:51:06 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:51:09 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:51:12 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:51:14 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
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:28 -!- lithpbot has joined. 
00:53:30 <ehird`> i'm putting the finishing touches on lithpbot's gc 
00:53:34 <ehird`> yes -- a gc written in python 
00:54:12 <ehird`> i do, because i append every object to a list 
00:54:18 <ehird`> for the sole purpose of keeping them alive 
00:54:36 <ehird`> i wonder, how many objects should i let  be allocated before i gc()? 
00:55:03 <ehird`> give me a number :P i can't decide how many objects it can allocate before i run the gc 
00:56:01 <ehird`> with the fast turnover of irc it's about right 
00:57:51 -!- lithpbot has quit (Remote closed the connection). 
00:58:01 <ehird`> made it save symbols and numbers 
00:58:02 -!- lithpbot has joined. 
00:58:02 <oerjan> it should probably depend on how many objects remained after the last gc 
00:58:12 <ehird`> > > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:58:15 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:58:20 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
00:58:36 <jix> any reason to use hex numbers? 
00:58:46 <ehird`> because it's a faux-memory location 
00:58:53 <oerjan> 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. 
01:00:28 -!- lithpbot has quit (Remote closed the connection). 
01:00:39 -!- lithpbot has joined. 
01:01:24 -!- lithpbot has quit (Remote closed the connection). 
01:01:32 <ehird`> I didn't actually fill the dict =) 
01:01:35 -!- lithpbot has joined. 
01:01:41 -!- RedDak has quit (Remote closed the connection). 
01:02:12 -!- lithpbot has quit (Remote closed the connection). 
01:03:17 -!- lithpbot has joined. 
01:03:56 <ehird`> Ok, something ELSE is making it grow. 
01:04:35 <oerjan> a monster hiding in your code, growing.. 
01:04:37 <ehird`> it retains quote and a 
01:04:41 <ehird`> and quote just returns its first arg 
01:05:06 -!- lithpbot has quit (Remote closed the connection). 
01:05:10 <ehird`> more debug output time. 
01:05:17 -!- lithpbot has joined. 
01:06:01 -!- lithpbot has quit (Remote closed the connection). 
01:06:03 <oerjan> the cons cells in (quote a) themselves? 
01:06:11 -!- lithpbot has joined. 
01:06:25 -!- lithpbot has quit (Remote closed the connection). 
01:06:36 -!- lithpbot has joined. 
01:06:38 <ehird`> It should take up memory, right? 
01:06:46 <ehird`> I shouldn't cache cons cells should I? 
01:06:50 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
01:06:51 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) 
01:07:08 <oerjan> unless you are using hash consing, that would be hard 
01:07:28 <ehird`> ok, so the functions right now are 
01:07:33 <ehird`> lambda, quote, set, def, if 
01:07:38 <jix> in which language is it written? 
01:07:40 <ehird`> I wonder what comes next, logically, for 'essentialness'? 
01:07:43 <ehird`> I'd guess cons, car, cdr 
01:07:50 <oklopol> everything is so similar and anything. 
01:07:52 <ehird`> jix: Python. with a gc implemented in Python! 
01:07:56 <ehird`> oklopol: hey! welcome back from sleep :P 
01:08:02 <ehird`> oklopol: I got your example working 
01:08:05 <jix> that has style 
01:08:06 <ehird`> oklopol: and I wrote a goddamn gc 
01:08:25 <jix> writing a realtime gc is harder 
01:08:36 <ehird`> jix: yeah it does a Big Global Stop 
01:08:38 <oklopol> i'm a bit too tired to get excited right now 
01:08:57 <jix> 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 <jix> that sucks... 
01:09:28 <jix> you do care if you need speed 
01:09:49 <jix> so if you need speed and realtime ... :/ 
01:10:18 <jix> and you don't need realtime 
01:10:22 <oklopol> ehird` must be after speed, that's why he's simulating a gc. 
01:10:24 <jix> but i was talking about writing a gc in general 
01:10:53 <oklopol> two gc's on top of each other must naturally be twice as fast. 
01:10:55 <jix> 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 <jix> oklopol: as bf interpreted in bf is twice as fast as uh wait... 
01:11:14 <oklopol> i'll try sleeping again, see ya :| 
01:11:27 <ehird`> can't you test my lexical scoping :P 
01:11:38 <oklopol> i saw your tests already :)' 
01:11:53 <ehird`> but that's not lexical scoping 
01:12:15 -!- lithpbot has quit (Remote closed the connection). 
01:12:23 <jix> 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:35 <jix> even worse than it was in real 
01:12:36 <ehird`> i'll stop that crapping out, wait 
01:13:11 -!- lithpbot has joined. 
01:13:23 <ehird`> now there's cons and car/cdr 
01:13:59 -!- lithpbot has quit (Remote closed the connection). 
01:14:09 <ehird`> you can do (def f () a) 
01:14:46 -!- lithpbot has joined. 
01:15:05 <oklopol> did.i.do.something.wrong.or.was.the.bot.the.one.doing.the.non.working? 
01:15:37 <ehird`> that isn't all of it :< 
01:15:48 <oklopol> hah, you have the same thing i have 
01:16:08 <oerjan> the same thing i berated oklopol for 
01:16:32 <oklopol> oerjan: you are all red and gooey 
01:16:41 <ehird`>         self.closure = table.copy() 
01:16:43 <oklopol> perhaps it's the highlight. 
01:16:44 <ehird`> THAT might be the problem 
01:17:07 <ehird`> so, i don't see how else i could make a closure 
01:17:12 <ehird`> oerjan: how could I? :P 
01:17:18 <oerjan> indeed you want tables by reference in scheme 
01:17:29 <ehird`> right, but how would i do that here 
01:17:52 <oerjan> scopes are essentially mutable objects 
01:18:00 <ehird`> but, unlike some implementations 
01:18:07 <ehird`> i don't have [{},{}...{}] as a scope 
01:18:12 <ehird`> and copy it to get a function's closure 
01:18:28 <jix> ehird`: you have to keep a list of tables i think 
01:18:29 <oerjan> an alternative is to have an indirection 
01:18:42 <oerjan> storing a variable as a mutable cell 
01:18:42 <jix> and first look in the first table then in the next one 
01:18:56 <ehird`> jix: yeah, but how do i make a closure then? when i've done that all hell breaks loos 
01:19:00 <oerjan> and storing a reference to that cell in the scope table 
01:19:15 <oerjan> then you can do tables by copy 
01:19:22 <ehird`> but oerjan's is probably better 
01:19:27 <ehird`> i'll have a class "var" 
01:19:34 <ehird`> which has a property "dest", which is an object 
01:19:40 <oerjan> mine is used much in languages where most variables _aren't_ mutable 
01:19:41 <ehird`> and store {name: var-object} in the table 
01:19:54 <ehird`> although with that way 
01:20:06 <ehird`> without x being defined before 
01:20:11 <ehird`> but that's a problem now anyway 
01:20:12 -!- pikhq has quit (Connection timed out). 
01:20:44 <oerjan> ah yes that's a problem in scheme, you have all those forward references 
01:20:59 <ehird`> should i kill myself or is there a way out? :P 
01:21:00 -!- Sgeo has joined. 
01:21:02 <jix> 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 <oerjan> i think a list of scopes fits scheme better 
01:22:39 <oerjan> 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:12 <oerjan> (well haskell even allows mutually recursive modules, but support is a bit sketchy) 
01:23:19 <ehird`> so how would i grab a closure? 
01:24:17 <oerjan> let each scope contain a reference to its parent 
01:24:27 <oerjan> and just use references to them 
01:24:34 <ehird`> [{_p: None, ...}, ..., {_p: prev, ...}] 
01:24:42 <ehird`> but how exactly do i get a closure 
01:25:09 <oerjan> you store the surrounding scope with the function 
01:25:28 <ehird`> so... just copy the list of scopes, really 
01:25:35 <ehird`> self.closure = scopes[:] 
01:26:12 <oerjan> you don't need copy, just reference 
01:26:30 <ehird`> that won't copy the scope mappings 
01:26:32 <ehird`> just the list of scopes 
01:26:45 <oerjan> um, the scopes are the scope mapping 
01:26:56 <oerjan> as far as i consider it 
01:27:14 <ehird`> [{k:v},{k:v},...{k:v}] 
01:27:18 <ehird`> [...] is the list of scopes 
01:27:22 <ehird`> each individual one is a scope 
01:27:29 <oerjan> note that scope are mutable and you want changes to them to be shared 
01:27:42 -!- GreaseMonkey has joined. 
01:27:44 <ehird`> coping the list of scopes 
01:27:48 <ehird`> does not copy the individual scopes 
01:28:28 <oerjan> however, you don't need a list, if each scope contains a reference to its parent 
01:29:17 <ehird`> right, but they're basically equiv. 
01:29:25 <ehird`> it's stack-as-linked-list vs stack-as-array 
01:29:31 <jix> ehird`: no 
01:29:38 <oklopol> you all have a point. hang on to it, i'll try sleeping -> 
01:29:41 <jix> because you will get a tree 
01:30:02 <jix> hmm but yeah array would work too but you'd keep more copys... 
01:30:03 <ehird`> table = {_p: {...}, blah} 
01:30:12 <ehird`> but that won't work!!! 
01:30:17 <ehird`> because, if a value is updated in table 
01:31:00 <ehird`> i only need new scopes for functions, right? 
01:31:05 <ehird`> i.e. push a scope for funcall 
01:32:39 <oerjan> more or less, everything desugars to lambdas 
01:34:19 <oerjan> 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 <ehird`> let's see if this works. 
01:35:46 -!- lithpbot has joined. 
01:36:04 -!- lithpbot has quit (Remote closed the connection). 
01:36:34 -!- lithpbot has joined. 
01:36:47 <oerjan> when you call a function you don't just push a new scope 
01:36:58 <ehird`> you save the old scope-list 
01:37:03 <ehird`> make the new one your closure 
01:37:03 <oerjan> you also replace the entire stack with the one in the closure 
01:37:09 <ehird`> then restore it at the end 
01:37:27 <ehird`> > (def g () (set x 7) (f)) 
01:37:40 <ehird`> oerjan: this is dynamic scoping 
01:37:46 <ehird`> this is fucked up scoping 
01:37:59 <ehird`> > (def g () (set x 7) (f)) 
01:38:01 <oerjan> because you never defined x, so it's at top level 
01:38:20 <ehird`> set x 7 should have set it in g's scope 
01:38:22 <ehird`> then f should have ignored it 
01:38:25 <ehird`> my lisp does not work that way 
01:39:05 <ehird`> you agree that that is wrong? 
01:39:07 -!- lithpbot has quit (Remote closed the connection). 
01:39:11 <oerjan> that is a bit impractical if you _do_ want to set a variable which exists in an outer scope 
01:39:18 -!- lithpbot has joined. 
01:39:36 <jix> !bf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++.+++++++. 
01:39:45 <ehird`> > (def g () (set x 7) (f)) 
01:39:47 <jix> not optimal yet ^^ 
01:39:51 -!- lithpbot has quit (Remote closed the connection). 
01:39:55 <ehird`> I was trying to read my debug output 
01:40:02 -!- lithpbot has joined. 
01:40:46 <ehird`> oerjan: i need to push a new stack AFTER replacing the closure 
01:41:11 -!- lithpbot has quit (Remote closed the connection). 
01:41:22 -!- lithpbot has joined. 
01:41:39 <ehird`> > (def g () (set x 7) (f)) 
01:43:04 <oerjan> now let me try something more complicated 
01:43:26 <ehird`> i'll implement arithmetic while yo udo 
01:44:20 <ehird`> oerjan: i'm excited what is it 
01:45:56 <ehird`> what arithmetic do you need 
01:46:00 <ehird`> i'll implement those first 
01:46:23 <ehird`> i just finished doing + 
01:46:25 -!- lithpbot has quit (Remote closed the connection). 
01:46:36 -!- lithpbot has joined. 
01:46:38 <oerjan> anyway i'm not sure it will work because of your strange set 
01:47:31 <oerjan> > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x) ) 
01:47:37 <ehird`> spaces freak it out oerjan 
01:47:41 <ehird`> remove that one at the tend 
01:47:47 <oerjan> > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x)) 
01:47:50 <ehird`> it's paul graham's thing :) 
01:48:06 <oerjan> > (set f (counter 42)) 
01:48:37 -!- lithpbot has quit (Remote closed the connection). 
01:48:44 <ehird`> i didn't eval the arguments to + 
01:48:48 -!- lithpbot has joined. 
01:48:49 <ehird`> > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x)) 
01:48:53 <ehird`> > (set f (counter 42)) 
01:49:06 <ehird`> why does that not work? 
01:49:18 <ehird`> should changes like that persist? 
01:49:21 <oerjan> there are two different x'es 
01:49:28 <ehird`> that would mean, all variables change 
01:49:38 <ehird`> oerjan: ok, how should i do it to make that work 
01:50:06 <oerjan> you need to make set not introduce a new variable if there is one in an outer scope 
01:50:35 <oerjan> also you need a way to introduce one anyhow. def is fine for that. 
01:50:44 <ehird`> set will introduce if it doesn't find on 
01:51:23 -!- lithpbot has quit (Remote closed the connection). 
01:51:34 -!- lithpbot has joined. 
01:52:05 <ehird`> i changed set to do that 
01:52:11 <oerjan> > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x)) 
01:52:18 <oerjan> > (set f (counter 42)) 
01:52:19 <ehird`> it searches down until it finds a var, if it doesn't find one, it creates one in the current scope 
01:52:28 <ehird`> i can't think when you'd need to just define a var, so :) 
01:53:02 -!- lithpbot has quit (Remote closed the connection). 
01:53:14 -!- lithpbot has joined. 
01:53:24 <ehird`> oerjan: so when would you want to define a var but not set it? 
01:53:29 <ehird`> > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x)) 
01:53:32 <ehird`> > (set f (counter 42)) 
01:53:37 <oerjan> it's just a matter of hygiene 
01:53:56 <ehird`> oerjan: ok, well "def" defines functions 
01:54:02 <ehird`> oerjan: give me a name for 'make var, but don't set it' 
01:54:29 <ehird`> but, yeah, give me a name 
01:54:34 <oerjan> > (set g (counter 50)) 
01:54:36 <ehird`> also, it has to set the var somehow 
01:54:56 <ehird`> but, what should it set it to? 
01:55:03 <ehird`> it has to set it for it to get in the table 
01:55:31 <oerjan> it's not about not setting 
01:55:39 <ehird`> what does defvar do then 
01:56:42 <oerjan> it's about not confusing local and global variables by accident 
01:57:25 <jix> !bf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++.+++++++..+++.-------------------------------------------------------------------.------------.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.--------.+++.------.--------.-------------------------------------------------------------------. 
01:57:34 <ehird`> oerjan: so tell me what it should do! 
01:57:39 <ehird`> what does defvar do, exactly 
01:57:41 <jix> !bf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.<++++++++++++++++++++++++++++++++++++.>+++++++.<+++.>----------------------------------------------------------------.------------.<++++++++.>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++.------.<-------------------.>- 
01:57:42 <jix> --------------------------------------------------------------------------. 
01:57:49 <oerjan> 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:58:02 <ehird`> so what should def set the var to? 
01:58:27 <oerjan> (def x 1) would set it to 1 
01:59:05 <oerjan> in scheme, define is for both 
01:59:47 <oerjan> although think about it, you can get around the need for defvar with some lambda trickery 
02:01:08 <ehird`> tell me what def should do in pseudocode 
02:01:10 <oerjan> > (def counter2 (a) (lambda (x) ((lambda () (set x (+ x 1)) x) x))) 
02:01:36 <oerjan> > (set h (counter2 3)) 
02:02:13 <ehird`> counter2 returns a lambda 
02:02:19 <ehird`> lambda need to be given arguments 
02:02:35 <ehird`> so, can you tell me what def does 
02:02:55 <oerjan> > (def counter2 (a) ((lambda (x) ((lambda () (set x (+ x 1)) x)) x)) 
02:03:18 <ehird`> what does def do?????? 
02:03:27 <oerjan> > (def counter2 (a) ((lambda (x) (lambda () (set x (+ x 1)) x)) x)) 
02:03:28 -!- lithpbot has quit (Remote closed the connection). 
02:03:59 <oerjan> def introduces a new variable unless there is one in exactly the same scope 
02:04:41 <ehird`> and if there is one in the same scope what does it do? 
02:04:46 <ehird`> if i know these two things, i can do it 
02:04:51 <oerjan> then it just sets that instead 
02:04:59 <jix> !bf +++++++[>+>+++<<-]>>+++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++.+++++++..+++.<+++++++++++++++++++++++++++++++++++++.------------.>++++++++.--------.+++.------.--------.<+.>>++++++++++. 
02:05:22 <jix> ok the A* - closed list part works :) 
02:05:32 <jix> (where - is without) 
02:05:46 <jix> that part of the A* algorithm introduces more overhead than it does good in this case 
02:07:15 <jix> and it's like 1000 times faster than my old lisp implementation 
02:07:18 <ehird`> and also added -, *, / 
02:07:21 -!- lithpbot has joined. 
02:07:33 -!- lithpbot has quit (Remote closed the connection). 
02:08:20 -!- lithpbot has joined. 
02:08:29 <lithpbot> (err) need at least 3 args, got 2 
02:09:31 -!- lithpbot has quit (Remote closed the connection). 
02:09:42 -!- lithpbot has joined. 
02:09:48 -!- lithpbot has quit (Remote closed the connection). 
02:10:03 * oerjan calls the acronym police 
02:10:13 -!- lithpbot has joined. 
02:10:51 <ehird`> > (def counter (a) (def x a) (lambda () (set x (+ x 1)) x)) 
02:10:51 <lithpbot> (err) def takes 2 arguments if not defining func 
02:11:04 -!- lithpbot has quit (Remote closed the connection). 
02:11:42 -!- lithpbot has joined. 
02:11:43 <ehird`> > (def counter (a) (def x a) (lambda () (set x (+ x 1)) x)) 
02:12:04 -!- lithpbot has quit (Remote closed the connection). 
02:12:34 <oerjan> btw didn't you have to go? 
02:12:37 -!- lithpbot has joined. 
02:13:17 <ehird`> tomorrow: persistance of memor 
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 <jix> !bf ++++++++++[->>+>++>+++>++++>+++++>++++++[<]<]>>>>>>>++++++++++++.+++++++++++++++++++++++++++++.+++++++..+++.<<++++.<++.>>>++++++++.--------.+++.------.--------.<<<+.<<. 
02:27:57 <jix> the first part is a stupid hardcoded value 
02:28:10 <jix> "++++++++++[->>+>++>+++>++++>+++++>++++++[<]<]" that part 
02:28:33 <jix> but when you start with that part you shouldn't be able to get below 168 bytes 
02:28:39 <bsmntbombdood> that's pretty much what my greedy algorithm is like 
02:28:49 <jix> mine isn't greedy 
02:29:16 <jix> i use a modified A* so it is optimal 
02:29:42 <jix> http://en.wikipedia.org/wiki/A*_search_algorithm 
02:30:13 <jix> but my heuristic is pretty bad atm so it isn't as fast as it could be 
02:31:12 <jix> all posibilities to print the string using ><+-. given a initial pointer position and memory state represent a graph 
02:31:28 <jix> where each edge represents the printing of one character 
02:32:24 <jix> you can assign weights to the edges... the number of chars it takes to output that character 
02:32:48 <jix> 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:44 <jix> that tree is pretty large 
02:35:10 <jix> 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 <jix> it only makes it slower 
02:35:26 <jix> and it's fast enough right now 
02:36:05 <bsmntbombdood> i wonder what the best way to choose the initial state is 
02:36:42 <bsmntbombdood> i was think try all possibilities of evenly distributed ints in largestchar-smallestchar of the input string 
02:37:32 <jix> smaller than smallest char might even be better 
02:37:47 <jix> try to output 13 
02:38:09 <jix> i hope that number was the right one 
02:38:32 <jix> +++[->++++<]>+. is shorter than +++++++[->++<]>-. 
02:38:44 <jix> the first one generates 12  (which is below the char 13) 
02:39:11 <jix> 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 <bsmntbombdood> well, what i was doing tried up to 8 factors of [2, 256] 
02:40:56 <bsmntbombdood> if you had a small way to generate them you could do the most common letters in the string 
02:42:40 <oerjan> you might go backwards - find the initial state that makes the rest shortest 
02:44:39 -!- Sgeo has quit (Read error: 110 (Connection timed out)). 
02:47:31 <jix> !bf +++++++++[->++++++++>+++++<<]>.+++++++++++++++++++++++++++++.+++++++..+++.>-.------------.<++++++++.--------.+++.------.--------.>+.>++++++++++. 
02:47:51 <jix> !bf +++++++++[->++++++++>+++++>+<<<]>.+++++++++++++++++++++++++++++.+++++++..+++.>-.------------.<++++++++.--------.+++.------.--------.>+.>+. 
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 <jix> !bf +++++++++[->+++++++++++>++++++++>+++++>+<<<<]>>.<++.+++++++..+++.>>-.------------.<<++++++++.--------.+++.------.--------.>>+.>+. 
12:23:41 <dbc> ++++++++[>++++[>++>+++>+++>+<<<<-]>+>->+>>+[<]<-]>>.>>---.+++++++..+++.>.<<-.>.+++.------.--------.>+.>++. 
12:24:02 <dbc> !bf ++++++++[>++++[>++>+++>+++>+<<<<-]>+>->+>>+[<]<-]>>.>>---.+++++++..+++.>.<<-.>.+++.------.--------.>+.>++. 
12:24:28 <jix> i know my textgen isn't perfect yet ;) 
12:24:37 <dbc> Neither am I :) 
12:25:44 <jix> but i haven't implemented nested loops for the first part yet 
12:35:43 <dbc> !bf ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<+++++++++.<] 
12:35:45 <EgoBot> ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<++ 
12:36:10 <dbc> !bf ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<+++++++++.<] 
12:36:14 <EgoBot> ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<++ 
12:36:22 <dbc> Hm, that's odd. 
12:38:46 <jix> !bf 124 (140): ++++++++++[->+++++++>++++>++++++++++>+++>+<<<<<]>++.>>+.+++++++..+++.<++++.>>++.<++++++++.--------.+++.------.--------.>+.>. 
12:39:10 <dbc> !bf ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<+++++++++.<]++++++++++. 
12:39:13 <EgoBot> ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<++ 
12:39:28 <dbc> ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<+++++++++.<]++++++++++. 
12:39:40 <dbc> !bf ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<+++++++++.<]++++++++++. 
12:39:44 <EgoBot> ->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>++>+++>>>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++>>>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>++[[>>+[>]++>++[<]<-]>+[>]<+<+++[<]<+]>+[>]++++>++[[<++++++++++++++++>-]<++ 
12:42:07 <jix> maybe egobot has a line length limit? 
12:43:56 <dbc> !bf >>>++++++++++++++++++++++++++++++++++++++++<<<++++[>++++++++++[>++++++++++[>.<-]<-]<-] 
12:44:00 <EgoBot> ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 
12:44:01 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 
12:44:20 -!- oklopol has joined. 
12:44:36 <dbc> Yup. 381 characters. 
12:44:50 <dbc> That quine is 392. 
12:44:52 <jix> make it shorter then ;) 
12:47:24 <dbc> Hm, that doesn't work. 
12:48:54 <dbc> !bf ++++++++++++++++++++++++++++++++++++++++++++++++. 
12:49:14 <jix> !bf_textgen Hello, world! 
12:49:23 <jix> !bf_txtgen Hello, world! 
12:49:44 <EgoBot> help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 
12:49:45 <EgoBot> 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 <EgoBot> 121 +++++++++[>++++++++>+++++++++++>+++++><<<<-]>.>++.+++++++..+++.>-.------------.<++++++++.--------.+++.------.--------.>+. [205] 
12:50:28 <jix> uh that one is stupid >< 
12:51:46 <jix> 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 <jix> !bf +++++++++++++++[->+++++>+++++++>++++++++>++>+++<<<<<]>---.>----.+++++++..+++.>>>-.<++.<-.<.>-----.<---.--------.>>+. 
13:34:01 <jix> my best one without \n so far 
13:34:53 <jix> !bf +++[->+++++<]>[->+++++>+++++++>++++++++>++>+++<<<<<]>---.>----.+++++++..+++.>>>-.<++.<-.<.>-----.<---.--------.>>+. 
13:35:04 <jix> 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 <jix> !bf +++++++[->++++++[->++>++>+<<<]>-->+++>-[<]<]>>++.>.>--. 
14:40:37 <jix> !bf ++++++++++[->+++++[->+>++>++>++>+<<<<<]>++>>+>++>->+++[<]<]>>++.>+.>--..+++.>>++++.>++.<<-.<.>-----.<---.<-.>>>>+. 
14:40:45 <jix> but without newline 
14:43:50 <jix> !bf 113 (134): ++++++++[->+++++[->++>++>+++>+>+<<<<<]>->+++>>-[<]<]>>.>---.+++++++..+++.>>>++++.<.<-.<.>-----.<---.--------.>>+. 
14:51:01 <jix> !bf ++++++[->++++++[->++>+++>+++>+++>+>+<<<<<<]>>->>++>+[<]<]>>.>-.>..+++.>>++.>----.<<-.<.>-----.<---.<-.>>>>+. 
14:54:02 -!- pikhq has joined. 
14:57:53 <jix> with newline: 
14:57:55 <jix> !bf 119 (136): ++++++[->+++++[->++>+++>+++>+<<<<]>>->>+>++[<]<]>>.>-.>..+++.>++.------------.<++++++++.--------.+++.------.<-.>>+.>--. 
14:58:30 <jix> that's not hello world 
14:58:47 <jix> !bf ++++++[->+++++[->++>+++>+++>+<<<<]>>->>+>++[<]<]>>.>-.>..+++.>++.------------.<++++++++.--------.+++.------.<-.>>+.>--. 
14:59:31 <jix> ah found the bug i think 
14:59:54 <jix> !bf +++++++++[->++++[->++>+++>+++>+<<<<]>>->>+>+[<]<]>>.>++.>..+++.>-.------------.<++++++++.--------.+++.------.<-.>>+.>+. 
15:02:28 <jix> not shorter than dbc's but it takes only 15 secs to generate that 
15:05:48 <jix> wait dbc's generates a different output 
15:06:24 <jix> yeah i'm getting that down to 106 bytes too ^^ 
15:08:11 <jix> but that seems to be some magicall limit 
15:08:40 <jix> it reaches 106 pretty fast and then stalls 
15:10:53 <jix> !bf +++++++++[->++++[->++>+++>+++>+<<<<]>>>->>+[<]<]>>.>>++.<..+++.>>----.+++.<.<++++.----.+++++.>.<--.>++++.------.>--.>+. 
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 <jix> !bf +++++[->+++++[->++>++<<]>->>++[<]<]>>>+.<+.+++.>+.<.>+.++++.<+.++++.-.--.++.+++.>.<-.>.>. 
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 <dbc> I borrowed the exact output text from Urban Müller's hello world. 
16:57:36 -!- oklopol has joined. 
16:58:22 <dbc> (capital W and no comma, that is) 
17:01:46 <jix> dbc: i'm able to get down to 106 bytes with that too... but not smaller 
17:02:01 <ehird`> dbc: true hello world is: Hello, world! 
17:03:01 <jix> !bf 106 (127): ++++++++[->++++[->++>+++>+++>+<<<<]>+>->+>>+[<]<]>>.>>---.+++++++..+++.>.<<-.>.+++.------.--------.>+.>++. 
17:03:06 <jix> that's my version 
17:03:20 <ehird`> !bf_txtgen Hello, world! 
17:03:34 <EgoBot> help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 
17:03:36 <EgoBot> 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:42 <jix> ehird`: it takes some time 
17:03:52 <jix> and it doesn't include the final newline 
17:04:22 <EgoBot> 35 ++++++++++++[>++++++++++>>><<<<-]>. [43] 
17:04:26 <EgoBot> 117 ++++++++++++++[>+++++>+++++++>++>+++<<<<-]>++.>+++.+++++++..+++.>>++.<++++.<++++++++.--------.+++.------.--------.>+. [691] 
17:04:34 <ehird`> ... the second one is x 
17:04:40 <ehird`> hello world is tiny and "x" is huge XD 
17:06:00 <jix> !bf 118 (140): +++++++++[->++++[->++>+++>+++>+>+<<<<<]>>->>+>>+[<]<]>>.>++.>..+++.>-.>----.<<++++++++.--------.+++.------.<-.>>>+.>+. 
17:06:06 <jix> with final newline 
17:07:12 <jix> !bf 116 (160): +++++++++[->++++[->++>+++>+++>+++>+<<<<<]>>->>+>+>+[<]<]>>.>++.>..+++.>>-.------------.<++.<.>-----.<---.<-.>>>+.>+. 
17:08:19 -!- RodgerTheGreat has joined. 
17:12:38 <jix> !bf ++++++++[->+++++[->>++>+++>+++>+>+>++<<<<<<<]>+>->->-->+>-[<]<]>>>.>>+.>----.>.>++.<<<<-.>-----.+++.--.<+++.>>>>++.<<<+++.---.<<-.>.>.----.<++.<<++. 
17:13:34 <jix> wahoo got a new shorter hello world!!! 
17:13:49 <jix> 106 was the old record right? 
17:14:07 <jix> !bf 104 (109): ++++++[->++++++[->++>+++>+++>+>++<<<<<]>>->>->++>++[<]<]>>.>-.>..+++.>++.>+++.<<.+++.------.<-.>>+.>>--. 
17:14:30 <RodgerTheGreat> don't most of them generate the string "Hello, World!" ? 
17:14:51 <jix> RodgerTheGreat: the 106 byte version generates "Hello World!" same for the original bf hello world (according to dbc) 
17:15:12 <jix> and most generate "Hello, world!\n" this one generates "Hello World!\n" 
17:15:57 <ehird`> "Hello, world!\n" is grammatically and unixly correct 
17:16:16 <jix> but i was trying to get shorter than dbc's so i have to use the same output 
17:16:21 <ehird`> unless Hello World is a name or title 
17:17:05 * ehird` wonders what to name the equality predicate in his lisp 
17:18:19 <ehird`> (eq 1 2) (equals 1 2) (= 1 2) 
17:18:36 <ehird`> (eq '(1 2) '(3 4)) (equals '(1 2) '(3 4)) (= '(1 2) '(3 4)) 
17:19:07 <ehird`> RodgerTheGreat: it's a rather 'unique' lisp in that it's implemented in Python but I wrote my own GC ;D 
17:19:53 <ehird`> it's a rather dumb stop-the-world mark and sweep gc 
17:20:05 <ehird`> it runs every 200 object allocations. 
17:22:30 <RodgerTheGreat> it'd be interesting if you exposed some of the GC's parameters to programs 
17:23:27 <ehird`> IMO the gc is an implementation detial 
17:23:38 <ehird`> (so is memory allocation) 
17:23:54 <RodgerTheGreat> I suppose, but you could allow for greater performance tweaking 
17:25:04 -!- lithpbot has joined. 
17:25:05 <ehird`> the gc cant even free because you can't free in python 
17:25:09 <ehird`> it just removes it from the big list 
17:25:14 <ehird`> which python's gc eventually collects 
17:26:44 <ehird`> > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1))))) 
17:26:53 -!- lithpbot has quit (Remote closed the connection). 
17:27:08 <ehird`> it caused the gc to die 
17:27:12 <ehird`> i have a bug in the gc 
17:27:46 -!- lithpbot has joined. 
17:27:47 <ehird`> > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1))))) 
17:27:52 -!- lithpbot has quit (Remote closed the connection). 
17:30:03 <ehird`> let's try taht again :) 
17:30:06 -!- lithpbot has joined. 
17:30:08 <ehird`> > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1))))) 
17:30:17 -!- lithpbot has quit (Remote closed the connection). 
17:30:23 <ehird`> maximum recursion depth 
17:31:07 -!- lithpbot has joined. 
17:31:08 <ehird`> > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1))))) 
17:31:22 -!- lithpbot has quit (Remote closed the connection). 
17:31:52 <ehird`> Call #function:41 with [-29] 
17:31:54 <ehird`> hmmmmmmmmmmmmmmmmmmmmmmmmmm :P 
17:32:10 -!- lithpbot has joined. 
17:32:18 <ehird`> > (def isone (n) (eq n 1) 
17:32:22 <ehird`> > (def isone (n) (eq n 1)) 
17:32:30 <ehird`> loooooooooooooooooooooooooooooool? 
17:33:15 -!- lithpbot has quit (Remote closed the connection). 
17:33:26 -!- lithpbot has joined. 
17:33:27 <ehird`> > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1))))) 
17:33:57 <ehird`> wow, that's pretty fast 
17:34:11 <lithpbot> 265252859812191058636308480000000L 
17:41:26 <ehird`> > (eval (quote (eval 2))) 
17:43:46 -!- lithpbot has quit (Remote closed the connection). 
17:44:07 -!- lithpbot has joined. 
17:44:09 <ehird`> > (eval (quote (eval 2))) 
17:46:56 -!- lithpbot has quit (Remote closed the connection). 
17:47:18 -!- lithpbot has joined. 
17:47:33 <ehird`> > (define a 2) (set a 5) a 
17:49:13 -!- lithpbot has quit (Remote closed the connection). 
17:49:24 -!- lithpbot has joined. 
17:50:20 -!- lithpbot has quit (Remote closed the connection). 
17:50:31 -!- lithpbot has joined. 
17:57:45 <jix> > (and 0 2) 
17:57:51 <jix> > (and 0 (/ 1 0)) 
17:57:58 <ehird`> that should give an error 
17:58:12 <ehird`> the error should bubble up 
17:58:13 <jix> (at least i expect and to short cut) 
18:00:05 <ehird`> i'm naming my auto-saving-to-disk InterpreterState replacement AutoPickleIntepreterState3000 :) 
18:08:28 -!- lithpbot has quit (Remote closed the connection). 
18:33:10 -!- jix has quit (Nick collision from services.). 
18:33:20 -!- jix has joined. 
18:45:46 <ehird`> lisp object = symbol | cons pair | string | number, right? 
18:47:38 <ehird`> i think i can pass on vectors :| 
18:47:43 <ehird`> ports, maybe, but probably not needed 
18:48:40 <ehird`> though i may change that 
18:48:53 <ehird`> lists = well formed cons pairs + nil 
18:49:11 <ehird`> although, i may represent them as python lists [1,2,3] 
18:49:17 <ehird`> cheaper than linked list operations 
18:49:24 <ehird`> (Though the slicing for cdr would be slow. 
18:49:54 <bsmntbombdood> boolean, symbol, char, vector, procedure, pair, number, string, port 
18:51:11 <ehird`> it's a superset and a subset 
18:51:19 <ehird`> scheme \wonky-thing lisp 
18:52:40 <ehird`> but anyway, i'm not sure i need booleans 
18:52:47 <ehird`> if NIL is false and everything else is true 
18:52:55 <ehird`> (i guess T will be a self-evaluating symbol too) 
18:53:15 <ehird`> I find nil/t kind of ugly 
18:53:20 <ehird`> #t and #f is much nicer 
18:53:31 <ehird`> how does scheme do characters? the syntax 
18:53:56 <ehird`> is that related to #t and #f in any way? 
18:55:30 <ehird`> i've never got why scheme needed vectors 
18:55:52 <ehird`> they don't seem important enough to become a  core type 
18:56:04 <bsmntbombdood> because there's no way to implement any O(1) access time collections without them 
18:56:28 <ehird`> so basically vectors are an implementation detail kind of thing 
18:56:39 <ehird`> 'our lists aren't arrays of memory, but we have a vector that is!' 
19:01:09 <ehird`> i think i need ports, so 
19:01:29 <ehird`> SYMBOL, CONS, STRING, NUMBER, PORT, NIL 
19:01:37 <ehird`> bsmntbombdood: do you really think anything else is useful? 
19:02:16 <ehird`> but i really don't know why i would want vectors? 
19:02:24 <ehird`> can you tell me a situation where they are really infinitely useful? 
19:02:34 <bsmntbombdood> but really all you need to implement at first is pairs, symbols and fucntions 
19:02:53 <bsmntbombdood> you can't implement hash tables, arrays without vectors 
19:03:11 <bsmntbombdood> no collection can have better than linear time indexing 
19:03:19 <ehird`> a vector is just a list that is an array of memory, right? nothing extra? 
19:04:33 <ehird`> 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 <ehird`> what are the standard functions and their names? 
19:05:45 <bsmntbombdood> call-with-input-port, call-with-output-port for opening files 
19:06:03 <ehird`> wait, is that for vectors? 
19:06:16 <ehird`> i think I will start with these: 
19:06:24 <ehird`> SYMBOL, CONS, STRING, CHAR, NUMBER, BOOLEAN, FUNCTION, NIL 
19:06:29 <ehird`> i'll leave out ports and vectors until later 
19:08:26 -!- sebbu2 has joined. 
19:12:11 <ehird`> bsmntbombdood: do you think my errors should be first-class? 
19:12:19 <ehird`> i could do things like implement try-catch then 
19:13:23 -!- oklopol has left (?). 
19:13:23 -!- oklopol has joined. 
19:13:51 <ehird`> oklopol: i'm rewriting my lisp, again 
19:14:06 <ehird`> i ditched multiple classes, now I just have a LispObject class 
19:17:22 <ehird`> bsmntbombdood: any opinions? 
19:25:34 <oklopol> i guess i should start skipping the debugging parts of logs :) 
19:26:59 -!- sebbu has quit (Connection timed out). 
19:27:52 <ehird`> oklopol: should i make lisp errors first-class lisp objects? 
19:28:43 <ehird`> oklopol: or... nothing 
19:28:47 <ehird`> i.e. just python exceptions 
19:28:51 <ehird`> lisp objects would be cooler :P 
19:30:47 <oklopol> i like having errors first class 
19:30:55 <oklopol> in numbda, some syntax errors are first class. 
19:32:13 <ehird`> it still throws by default 
19:32:20 <ehird`> and manipulate it in lisp 
19:33:58 <ehird`> does your lisp have floats or whatever? 
19:35:01 <oklopol> hmm, i'm pretty sure it doesn't have floats if it doesn't have strings 
19:35:52 <ehird`> oklopol: should i have error types and descriptions or just errors 
19:36:08 <ehird`> "type=int-error, message=divide by zero" 
19:36:18 <ehird`> instead of just "message=divide by zero" 
19:36:42 <oklopol> just make one error type unless you have a more flexible type system overall 
19:37:13 <oklopol> i don't see any point making error types really 
19:37:21 <oklopol> unless you can define your own 
19:37:32 <oklopol> since you can't pattern match on them or anything 
19:37:36 <oklopol> also asdfasdfasdfasdfasdfasdfasd 
19:37:58 <oklopol> tomorrow, test @ university, and i still gotta return my demos tonight. 
19:38:13 <oklopol> i'm so tired i can barely keep my eyes opn 
19:41:48 <oklopol> also, for some reason i'm going to watch a few episodes of south park first. 
19:55:21 <ehird`> bsmntbombdood: are characters automatically casted to strings in scheme? 
20:21:54 <ehird`> oklopol: otools, what is it 
20:33:31 <oklopol> otools is something i use for parsing 
20:33:56 <oklopol> it basically does tokenization, and there may be an infix parser, don't remember 
20:35:13 <oklopol> made my own, stringio lacked something, don't remember what 
20:35:24 <ehird`> anyway, i'm writing a "tokentools" right now :) 
20:35:29 <ehird`> it does tokenization and also some parsing helpers 
20:35:43 <ehird`> e.g. an accept([tok,tok,tok...]) method 
20:36:01 <oklopol> what i'd actually like is something like StringTokenizer in java 
20:36:23 <oklopol> although you could improve it a lot. 
20:36:34 <ehird`> mine is kind of like that 
20:36:50 <ehird`> it's very flexible as far as where it splits actually 
20:37:06 <ehird`> you give it a function to tell it whether a character is a splitter or not 
20:37:14 <ehird`> and also ignores multiple splitters in a row 
20:37:33 <ehird`> basically it tokenizes and helps a lot with parsing 
20:37:43 <oklopol> why not give it a regexp representing a token? 
20:38:09 <ehird`> because you can pass it str.isspaec 
20:38:59 <ehird`> lambda x: x.isspace() or x == "+" 
20:39:29 <oklopol> so... 4+5 would be ["4", "5"] and ignore the addition symbol? 
20:40:03 <oklopol> or alternatively you'd have "4 5" be tokenized into ["4", " ", "5"], in case you save the separators as well 
20:40:06 <ehird`> splittokens and ignoretokens 
20:40:21 <oklopol> i think you need to think this through a bit ;) 
20:40:22 <ehird`> Tokenizer(blah, x.isspace, lambda x: x == "+") 
20:40:29 <oklopol> of course depends what you wanna use it for. 
20:40:33 <ehird`> + is a splitter and gets added on 
20:41:37 <oklopol> seems a bit hacky to me, but it seems to work for most grammars 
20:42:10 <oklopol> i'm not sure if that's the right word 
20:42:33 <ehird`> how should i do it then 
20:42:59 <oklopol> yours will actually tokenize most things correct. 
20:43:33 <ehird`> how should i do it though in your opinion 
20:43:40 <oklopol> 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 <oklopol> but you rarely have those next to each other without a space in between 
20:44:14 <oklopol> the only stuff not always separated by ws are operators and parens, i think 
20:44:33 <oklopol> and what you thought of making actually parses that quite nicely 
20:44:59 <ehird`> how about i just return delimiters 
20:45:04 <oklopol> i'm not telling you what to do, just analyzing that for fun; also, demos 
20:45:26 <ehird`> new StringTokenizer(blah, "abc", true) 
20:45:32 <ehird`> third optional parameter is returnDelims 
20:45:37 <ehird`> that's how you would e.g. parse sexprs 
20:45:50 <ehird`> if tok.isspace(): continue 
20:46:57 <ehird`> oklopol: seems flexible enough, no? 
20:47:23 -!- RedDak has joined. 
20:48:08 <oklopol> these exercises we gotta do at home and demonstrate for the whole calssa 
20:48:50 <ehird`> oklopol: your lisp doesn't do tail recursion 
20:49:04 <oklopol> i couldn't think of a trivial way to do that 
20:49:31 <oklopol> i can now, i prolly could then too, but was too lazy even for that 
20:49:38 <ehird`> while last_caller == self: ... 
20:50:00 <ehird`> all wrapped in a while True: 
20:50:07 <oklopol> hmm, you do know when tail recursion applies? 
20:50:20 <oklopol> or was that just a simplification 
20:50:24 <ehird`> when you're at the end and there's a list with eval(car) == sel 
20:50:32 <ehird`> end = end of execution, not function 
20:51:44 <oklopol> you can just as well have circular recursion, and still have tail recursion 
20:52:00 <oklopol> in fact, in some languages, you don't even need to recurse and still have tail recursion. 
20:52:19 <oklopol> if you can do code generation @ runtime 
20:55:13 <oklopol> 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 <ehird`> oklopol: i thought you were starting them 
21:00:21 <oklopol> that what the karnaugh map is for 
21:03:13 <oklopol> i don't understand why we have to do this stuff, base-10 addition is harder than boolean algebra 
21:03:45 <ehird`> well i find base-10 addition really hard! i have 8 fingers! 
21:05:35 -!- RedDak has quit (No route to host). 
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:52:43 * pikhq cleans up 10,000 blue voting credits 
22:55:40 <Sgeo> I suppose no one's going to work on PSOX for me? lol 
22:55:57 <ehird`> 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:23:02 <oklopol> is it possible to do a crossing in wireworld? 
23:23:34 <oklopol> i remember trying to do it some time ago, but forgot to ask here where someone might actually know 
23:27:06 <ehird`> oklopol: my lisp is going to have loads more things in this incarnation 
23:27:26 <ehird`> currently i have symbol, cons, string, character, number, boolean, procedure, primitive, error, nil 
23:27:31 <ehird`> and i plan to add port and vector 
23:28:33 -!- sebbu2 has quit ("@+"). 
23:30:22 <ehird`> bindings[LispObject(SYMBOL, "prim_name")]  = LispObject(PRIMITIVE, prim_func, (min, max)) # is a bit ugly though 
23:36:05 <oklopol> i actually don't know what that is in lisp at all, perhaps i should check instead of guessing. 
23:36:07 <ehird`> stdin, stdout, files, streams, ... 
23:36:13 <ehird`> basically it's a stream 
23:36:18 <ehird`> a socket would also be a port, for example 
23:36:40 <oklopol> anyways, what are you using them for? 
23:37:00 <oklopol> i just realized your lisp isn't made just for an irc bot, i just wanted you to put it on one. 
23:37:25 <ehird`> this time i'm going to create a seperate program for the bot 
23:37:28 <oklopol> i couldn't make one of the assignments :<< 
23:37:30 <ehird`> and make it call out to the lisp one 
23:37:45 <ehird`> so i don't add irc-specific stuff to the interp 
23:37:49 <ehird`> and also if it crashes 
23:44:31 <oerjan> ehird`: you could create an irc module or something to load