←2007-11-03 2007-11-04 2007-11-05→ ↑2007 ↑all
00:00:08 <ehird`> hm, ok, that isn't being printed on my console
00:00:10 <ehird`> so hm
00:00:17 -!- lithpbot has quit (Remote closed the connection).
00:00:32 -!- lithpbot has joined.
00:00:33 <jix> > (a d)
00:00:33 <lithpbot> (err) unmatched (
00:00:46 <ehird`> ahh, i seeeeee
00:00:53 <ehird`> me am stoopid
00:01:18 -!- lithpbot has quit (Remote closed the connection).
00:01:22 <ehird`> let's try now
00:01:29 -!- lithpbot has joined.
00:01:29 <ehird`> > (a d)
00:01:30 <lithpbot> (err) unbound: a
00:01:32 <ehird`> woot
00:01:45 <ehird`> oklopol: there you go
00:01:56 <ehird`> > (a(b(c)d)e)
00:01:56 <lithpbot> (err) unbound: a(b(c
00:01:59 <ehird`> hm
00:02:09 <ehird`> oh
00:02:10 -!- lithpbot has quit (Remote closed the connection).
00:02:12 <ehird`> silly me
00:02:16 <ehird`> bah
00:02:19 <ehird`> i'll implement some primitives first
00:05:27 <ehird`> ok
00:05:36 -!- lithpbot has joined.
00:05:37 <ehird`> now it has lambda, quote, set , def, if
00:05:40 <ehird`> oklopol: ping
00:05:43 <ehird`> > (set a 4)
00:05:44 <lithpbot> 4
00:05:46 <ehird`> > a
00:05:46 <lithpbot> 4
00:05:51 <ehird`> > (set a 5)
00:05:51 <lithpbot> 5
00:05:52 <ehird`> > a
00:05:52 <lithpbot> 5
00:05:58 <ehird`> > (quote a)
00:05:58 <lithpbot> a
00:06:13 <ehird`> > (if 0 (quote yes) (quote no))
00:06:13 <lithpbot> yes
00:06:23 <ehird`> > (if () (quote yes) (quote no))
00:06:24 <lithpbot> yes
00:06:26 <ehird`> hm
00:06:26 <ehird`> :P
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:46 <lithpbot> yes
00:07:49 <ehird`> > (if 1 (quote yes) (quote no))
00:07:49 <lithpbot> yes
00:07:53 <ehird`> Retarded.
00:07:56 <bsmntbombdood> no
00:08:03 <bsmntbombdood> 0 is true in all lisps i know of
00:08:07 <ehird`> not in this one
00:08:09 <ehird`> for example
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:20 <bsmntbombdood> lame
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:08:59 <lithpbot> yes
00:09:17 <oklopol> bsmntbom1dood: if C does it, it must be right.
00:09:43 <bsmntbombdood> of course
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:15 <lithpbot> no
00:10:17 <ehird`> woot
00:10:19 <ehird`> > (if 1 (quote yes) (quote no))
00:10:19 <lithpbot> yes
00:10:22 <ehird`> > (if () (quote yes) (quote no))
00:10:23 <lithpbot> no
00:10:24 <ehird`> > (if (1) (quote yes) (quote no))
00:10:25 -!- lithpbot has quit (Remote closed the connection).
00:10:27 <ehird`> hahahugjgf
00:10:32 <bsmntbombdood> wtf, two false values?
00:10:36 <ehird`> yes
00:10:38 <ehird`> 0 and () are false
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:05 <bsmntbombdood> it makes no sense to have 0 fale
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:36 <bsmntbombdood> (1) is an error...
00:12:49 <ehird`> yes, i know that
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:53 <lithpbot> (err) not callable: 1
00:13:56 <ehird`> > (if () (quote yes) (quote no))
00:13:56 -!- lithpbot has quit (Remote closed the connection).
00:14:19 <ehird`> all right
00:14:19 <ehird`> finally
00:14:21 <ehird`> i've got it
00:14:24 <bsmntbombdood> grrr
00:14:31 <ehird`> bsmntbombdood: what
00:14:34 <bsmntbombdood> it's been an hour and it's still not 1/255 done
00:14:41 <ehird`> bookkeeping time
00:14:57 <oklopol> :D
00:15:01 <ehird`> oklopol: ok
00:15:03 <ehird`> oklopol: it's all there
00:15:04 <ehird`> everything
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:09 <lithpbot> no
00:15:11 <oklopol> ehird`: you sure :D
00:15:16 <ehird`> > (if (quote (1)) (quote yes) (quote no))
00:15:16 <lithpbot> yes
00:15:20 <ehird`> pretty sure!!
00:15:22 <ehird`> > if
00:15:23 <lithpbot> #native-function:9
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:24 <lithpbot> (err) unbound: c
00:15:24 <ehird`> > cond
00:15:25 <lithpbot> (err) unbound: cond
00:15:33 <ehird`> uhh
00:15:36 <ehird`> should c be unbound
00:15:41 <oklopol> c can't be unbound there.
00:15:52 <oklopol> (lambda (c) ((a c) (b c)))
00:15:55 <oklopol> no way.
00:15:57 <ehird`> > (def test (x) ((lambda (y) y) x))
00:15:58 <lithpbot> #function:86
00:15:59 <ehird`> > test
00:15:59 <lithpbot> #function:86
00:16:05 <ehird`> > (test 2)
00:16:05 <lithpbot> 2
00:16:19 <ehird`> anyway
00:16:21 <ehird`> def works now, oklopol
00:16:23 <ehird`> do it in chunks
00:16:52 <oklopol> kay
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:05 <lithpbot> #function:ab
00:17:07 <oklopol> > (def k (a) (lambda (b) a))
00:17:07 <lithpbot> #function:bb
00:17:09 <oklopol> > (((s k) k) 3)
00:17:10 <lithpbot> (err) unbound: c
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:17:59 <lithpbot> #function:e8
00:18:04 <ehird`> > (s k)
00:18:04 <lithpbot> (err) unbound: k
00:18:12 <ehird`> fuck the what
00:18:16 <ehird`> > k
00:18:16 <lithpbot> (err) unbound: k
00:18:21 <ehird`> but...
00:18:35 <oklopol> :DSDSDSD
00:19:18 <ehird`> http://rafb.net/p/Q6qc8624.html
00:19:21 <ehird`> i have no idea what went wrong
00:19:24 <ehird`> tell me my bug :D
00:19:46 <oklopol> i can tell you on monday when i have time :<<<
00:19:50 <ehird`> :<
00:19:51 <oklopol> gotta go sleep now
00:19:55 <ehird`> alright
00:19:57 <ehird`> bye!
00:19:58 <ehird`> :)
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:33 <lithpbot> #function:39
00:20:35 <ehird`> > s
00:20:35 <lithpbot> #function:29
00:20:36 <ehird`> > k
00:20:37 <lithpbot> #function:39
00:20:37 <bsmntbombdood> godaamn so slow
00:20:46 <ehird`> > (((s k) k) 3)
00:20:46 <lithpbot> (err) unbound: c
00:20:54 <ehird`> > s
00:20:54 <lithpbot> #function:29
00:20:56 <ehird`> > k
00:20:56 <lithpbot> (err) unbound: k
00:20:59 <oklopol> bsmntbom1dood: you sure it isn't just in an infinite loop or smth?
00:21:02 <bsmntbombdood> i'm sure
00:21:11 <ehird`> bsmntbombdood: make it print out EVERY iteration
00:21:12 <ehird`> just to be sure
00:21:22 <bsmntbombdood> i've used it on shorter strings
00:21:23 <oklopol> kay, reallity sleepity ->
00:21:25 <bsmntbombdood> 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 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c))))) (def k (a) (lambda (b) a)) (((s k) k) 3)
00:23:03 <lithpbot> (err) unbound: c
00:23:05 <ehird`> > s
00:23:05 <lithpbot> #function:29
00:23:06 <ehird`> > k
00:23:06 <lithpbot> #function:39
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:24:45 <lithpbot> (err) unbound: c
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:05 <lithpbot> (err) unbound: c
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:27:17 <lithpbot> (err) unbound: c
00:31:22 -!- ecl has joined.
00:31:32 -!- ecl has left (?).
00:32:00 <bsmntbombdood> aah, shit
00:32:09 <ehird`> tihs ,haa
00:32:23 <bsmntbombdood> my algorithm, running on my computer, would take 460 years to compute hello world
00:32:24 <bsmntbombdood> :(
00:33:25 <ehird`> AHAHAHAHAHAHAHAHAHAAHAAHAHAHAHAHAHAHAHAHAHHSAADJOASDLSKHDLKF
00:36:19 -!- lithpbot has quit (Remote closed the connection).
00:36:41 -!- lithpbot has joined.
00:36:48 <ehird`> > (set a 2)
00:36:48 <lithpbot> 2
00:36:49 <ehird`> > a
00:36:49 <lithpbot> 2
00:36:56 <ehird`> > (def id (x) x)
00:36:56 <lithpbot> #function:1b
00:36:58 <ehird`> > (id 2)
00:36:58 <lithpbot> 2
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:21 <lithpbot> #function:3e
00:37:26 <ehird`> > (def k (a) (lambda (b) a))
00:37:26 <lithpbot> #function:4e
00:37:30 <ehird`> > (((s k) k) 3)
00:37:30 <lithpbot> 3
00:37:35 <ehird`> oklopol: WOOT!!
00:37:38 <ehird`> oklopol: IT WORKS!!!
00:38:05 <ehird`> ooh, i can reduce it a bit
00:38:50 -!- lithpbot has quit (Remote closed the connection).
00:38:52 <ehird`> there
00:38:53 <ehird`> it's ready
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:28 <ehird`> Um.
00:39:37 -!- lithpbot has joined.
00:40:06 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:40:06 <lithpbot> #function:29
00:40:11 <ehird`> > (s s)
00:40:11 <lithpbot> #function:2e
00:40:13 <ehird`> > ((s s) s)
00:40:14 <lithpbot> #function:37
00:40:18 <ehird`> > (((s s) s) s)
00:40:18 <lithpbot> #function:46
00:40:24 <ehird`> > ((((s s) s) s) s)
00:40:24 <lithpbot> #function:5b
00:40:29 <ehird`> Okay.
00:40:31 <ehird`> Time for gc.
00:40:33 -!- lithpbot has quit (Remote closed the connection).
00:47:56 <ehird`> PL
00:47:58 <ehird`> OK
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:48:59 <lithpbot> #function:29
00:49:06 <ehird`> > (def k (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:49:06 <lithpbot> #function:48
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:12 <lithpbot> #function:c4
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:16 <lithpbot> #function:140
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:23 <lithpbot> #function:1bc
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:24 <lithpbot> #function:238
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:26 <lithpbot> #function:2b4
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:27 <lithpbot> #function:330
00:49:30 <ehird`> hm.
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:49:58 <lithpbot> #function:29
00:50:28 -!- lithpbot has quit (Remote closed the connection).
00:50:32 <ehird`> that was stupid
00:50:32 <ehird`> XD
00:50:55 -!- lithpbot has joined.
00:50:56 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:50:56 <lithpbot> #function:29
00:51:01 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:51:01 <lithpbot> #function:48
00:51:05 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:51:05 <lithpbot> #function:67
00:51:06 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:51:06 <lithpbot> #function:86
00:51:09 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:51:09 <lithpbot> #function:a5
00:51:12 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:51:13 <lithpbot> #function:c4
00:51:14 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:51:14 <lithpbot> #function:e3
00:51:21 <ehird`> > if
00:51:21 <lithpbot> #native-function:9
00:51:30 <ehird`> 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 <ehird`> oh hello oerjan
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:53:55 <bsmntbombdood> but...python is garbage collected
00:54:00 <bsmntbombdood> ...so you don't need one
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:20 <ehird`> so my gc can run
00:54:20 <ehird`> :D
00:54:26 <ehird`> hmm
00:54:36 <ehird`> i wonder, how many objects should i let be allocated before i gc()?
00:54:44 <bsmntbombdood> well that's stupid
00:54:50 <ehird`> hehe yeah
00:54:52 <ehird`> but fun
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:55:09 <ehird`> right now it's at 200
00:55:28 <oerjan> 424242
00:55:37 <ehird`> far too high
00:55:37 <ehird`> :P
00:55:46 <oerjan> 4242 then
00:55:53 <ehird`> probably too high :P
00:55:54 <ehird`> meh
00:55:56 <ehird`> i'll leave it at 200
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:07 <ehird`> i guess
00:58:12 <ehird`> > > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:58:12 <lithpbot> (err) unbound: >
00:58:15 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:58:16 <lithpbot> #function:2b
00:58:20 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
00:58:20 <lithpbot> #function:4a
00:58:23 <ehird`> hmm
00:58:29 <ehird`> > (quote a)
00:58:29 <lithpbot> a
00:58:36 <jix> any reason to use hex numbers?
00:58:42 <ehird`> jix: in the printout?
00:58:45 <jix> yeah
00:58:46 <ehird`> because it's a faux-memory location
00:58:46 <ehird`> :)
00:58:51 <jix> ah
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.
00:59:39 <ehird`> > (quote a)
00:59:40 <lithpbot> a
00:59:42 <ehird`> > (quote a)
00:59:43 <lithpbot> a
00:59:51 <ehird`> > (quote a)
00:59:52 <lithpbot> a
00:59:59 <ehird`> hm
01:00:28 -!- lithpbot has quit (Remote closed the connection).
01:00:39 -!- lithpbot has joined.
01:00:46 <ehird`> > (quote a)
01:00:46 <lithpbot> a
01:00:50 <ehird`> oh
01:00:50 <ehird`> duh
01:00:51 <ehird`> hahaha
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:40 <ehird`> > (quote a)
01:01:40 <lithpbot> a
01:01:41 -!- RedDak has quit (Remote closed the connection).
01:01:42 <ehird`> > (quote a)
01:01:43 <lithpbot> a
01:01:45 <ehird`> > (quote a)
01:01:45 <lithpbot> a
01:01:48 <ehird`> Hm.
01:01:51 <ehird`> It's still growing.,
01:02:12 -!- lithpbot has quit (Remote closed the connection).
01:02:38 <ehird`> s debug code
01:02:40 * ehird` adds debug code
01:03:17 -!- lithpbot has joined.
01:03:42 <ehird`> > (quote a)
01:03:43 <lithpbot> a
01:03:49 <ehird`> > (quote a)
01:03:49 <lithpbot> a
01:03:56 <ehird`> Ok, something ELSE is making it grow.
01:04:24 <oerjan> Ayee!
01:04:32 <ehird`> but why would it?
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:05:21 <ehird`> > (quote a)
01:05:22 <lithpbot> a
01:06:01 -!- lithpbot has quit (Remote closed the connection).
01:06:03 <oerjan> the cons cells in (quote a) themselves?
01:06:07 <ehird`> ..
01:06:09 <ehird`> duh
01:06:11 -!- lithpbot has joined.
01:06:11 <ehird`> i am so stupid
01:06:18 * ehird` removes debug
01:06:25 -!- lithpbot has quit (Remote closed the connection).
01:06:35 <ehird`> Um
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:50 <lithpbot> #function:29
01:06:51 <ehird`> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
01:06:52 <lithpbot> #function:48
01:07:08 <oerjan> unless you are using hash consing, that would be hard
01:07:18 <ehird`> indeed
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:01 <jix> haha
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:06 <oklopol> heh, hi
01:08:10 <ehird`> A GODDAMN GC
01:08:22 <ehird`> :D
01:08:22 <oklopol> cl
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:43 <oklopol> but yay
01:08:46 <oklopol> .
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:20 <ehird`> yeah well
01:09:20 <ehird`> who cares
01:09:21 <ehird`> :)
01:09:28 <jix> you do care if you need speed
01:09:49 <jix> so if you need speed and realtime ... :/
01:10:09 <ehird`> i don't need speed
01:10:10 <ehird`> this is a toy
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:27 <ehird`> oklopol: ;)
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:19 <oklopol> jix: exactly!
01:11:21 <ehird`> aww, bye oklopol :(
01:11:27 <ehird`> can't you test my lexical scoping :P
01:11:27 <oklopol> bye, nights ->
01:11:31 <oklopol> hehe
01:11:38 <oklopol> i saw your tests already :)'
01:11:48 * oklopol is a fanatic logreader
01:11:49 <ehird`> yeah
01:11:53 <ehird`> but that's not lexical scoping
01:11:56 <ehird`> that's not your test
01:11:57 <ehird`> :P
01:11:58 <ehird`> that you used
01:11:59 <ehird`> on ololobot
01:12:06 <oklopol> oksy
01:12:08 <oklopol> i'll
01:12:09 <oklopol> test
01:12:15 <oklopol> > (def a 5)
01:12:15 -!- lithpbot has quit (Remote closed the connection).
01:12:19 <ehird`> LOL
01:12:21 <oklopol> whooooops :))
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:27 <oklopol> def is *not* for funxx
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:24 <oklopol> > (set a 5 )
01:13:24 <lithpbot> (err) unmatched )
01:13:27 <oklopol> > (set a 5)
01:13:28 <ehird`> lol?
01:13:28 <lithpbot> 5
01:13:33 <ehird`> > (cons 1 2)
01:13:34 <lithpbot> (1 . 2)
01:13:38 <ehird`> anyway
01:13:40 <ehird`> you continue
01:13:55 <oklopol> > (set f (lambda () a))
01:13:55 <lithpbot> #function:2c
01:13:58 <oklopol> > (f)
01:13:59 -!- lithpbot has quit (Remote closed the connection).
01:14:05 <ehird`> looooooool?
01:14:06 <ehird`> also
01:14:09 <ehird`> you can do (def f () a)
01:14:10 <oklopol> grass can be green
01:14:16 <oklopol> yeah i know
01:14:17 <oklopol> !!
01:14:21 <EgoBot> Huh?
01:14:36 <ehird`> anyway
01:14:40 <ehird`> reloading bot
01:14:43 <ehird`> with fix
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:08 <ehird`> bot
01:15:11 <oklopol> > (set f (lambda () a))
01:15:11 <lithpbot> #function:1b
01:15:16 <oklopol> > (set a 5)
01:15:16 <lithpbot> 5
01:15:19 <oklopol> > (set f (lambda () a))
01:15:19 <lithpbot> #function:2c
01:15:26 <oklopol> > (f)
01:15:26 <lithpbot> 5
01:15:31 <oklopol> cl
01:15:36 <oklopol> > (set a 7)
01:15:36 <lithpbot> 7
01:15:37 <ehird`> that isn't all of it :<
01:15:38 <ehird`> ah
01:15:39 <ehird`> :P
01:15:40 <oklopol> > (f)
01:15:41 <lithpbot> 5
01:15:43 <ehird`> ...
01:15:44 <ehird`> wait, what.
01:15:48 <oklopol> hah, you have the same thing i have
01:15:49 <ehird`> that's not right
01:16:00 <ehird`> i'll fix thanks :P
01:16:08 <oerjan> the same thing i berated oklopol for
01:16:09 <oklopol> fixity faxity
01:16:32 <oklopol> oerjan: you are all red and gooey
01:16:33 <ehird`> oerjan: looool
01:16:41 <ehird`> self.closure = table.copy()
01:16:43 <oklopol> perhaps it's the highlight.
01:16:43 <oerjan> gooey?
01:16:44 <ehird`> THAT might be the problem
01:16:46 <ehird`> do you think?
01:16:47 <ehird`> ;)
01:16:49 <oerjan> ah
01:16:54 <oklopol> gooey was just for fun.
01:16:55 <ehird`> but
01:16:58 <ehird`> i only have one table
01:17:01 <ehird`> table = {}
01:17:03 <ehird`> with the bindings
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:44 <oklopol> i'm gonna say magic.
01:17:52 <oerjan> scopes are essentially mutable objects
01:17:56 <ehird`> correct
01:18:00 <ehird`> but, unlike some implementations
01:18:07 <ehird`> i don't have [{},{}...{}] as a scope
01:18:09 <ehird`> i just have one
01:18:12 <ehird`> and copy it to get a function's closure
01:18:16 <ehird`> how do i, um, fix :P
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:18:57 <ehird`> e
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:17 <ehird`> jix's sounds simpler
01:19:19 <ehird`> :|
01:19:22 <ehird`> but oerjan's is probably better
01:19:24 <ehird`> so, oerjan
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:42 <ehird`> right?
01:19:50 <ehird`> hmm
01:19:54 <ehird`> although with that way
01:19:56 <ehird`> if you do
01:19:59 <oerjan> ML, haskell etc.
01:20:05 <ehird`> (def f () x)
01:20:06 <ehird`> (set x 2)
01:20:06 <ehird`> without x being defined before
01:20:07 <ehird`> you can't get to it
01:20:11 <ehird`> but that's a problem now anyway
01:20:12 -!- pikhq has quit (Connection timed out).
01:20:14 <ehird`> how would i fix that?
01:20:44 <oerjan> ah yes that's a problem in scheme, you have all those forward references
01:20:51 <ehird`> yeah
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:09 <ehird`> ok
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:22 <ehird`> ok
01:24:24 <ehird`> so
01:24:27 <oerjan> and just use references to them
01:24:34 <ehird`> [{_p: None, ...}, ..., {_p: prev, ...}]
01:24:36 <ehird`> right
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:25:46 <ehird`> right?
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:47 <oerjan> *s
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:33 <oerjan> *scopes
01:27:41 <ehird`> yes
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:29:58 <ehird`> ok
01:29:58 <ehird`> so
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:08 <ehird`> then copy table?
01:30:12 <ehird`> but that won't work!!!
01:30:17 <ehird`> because, if a value is updated in table
01:30:20 <ehird`> then it won't be seen
01:30:21 <ehird`> so..
01:30:28 <oerjan> _no_ copying
01:30:37 <ehird`> ok
01:30:40 <ehird`> i think i get it now
01:30:41 <ehird`> let me try that
01:31:00 <ehird`> i only need new scopes for functions, right?
01:31:05 <ehird`> i.e. push a scope for funcall
01:31:07 <ehird`> pop after
01:32:29 <ehird`> oerjan: right?
01:32:33 <ehird`> and right before
01:32:39 <oerjan> more or less, everything desugars to lambdas
01:33:44 <oerjan> i think that works
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:35:53 <ehird`> > (set x 2)
01:35:53 <lithpbot> 2
01:35:54 <ehird`> > x
01:35:54 <lithpbot> 2
01:35:56 <ehird`> > set
01:35:56 <lithpbot> #native-function:5
01:36:01 <ehird`> > (def f () x)
01:36:01 <lithpbot> #function:22
01:36:04 <ehird`> > (f)
01:36:04 -!- lithpbot has quit (Remote closed the connection).
01:36:09 <ehird`> apparently not
01:36:33 <oerjan> oh wait
01:36:34 -!- lithpbot has joined.
01:36:36 <ehird`> > (set x 2)
01:36:37 <lithpbot> 2
01:36:42 <ehird`> oh what now oerjan.
01:36:45 <ehird`> > (def f () x)
01:36:45 <lithpbot> #function:20
01:36:46 <ehird`> > (f)
01:36:47 <lithpbot> 2
01:36:47 <oerjan> when you call a function you don't just push a new scope
01:36:53 <ehird`> yeah i realised that
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:06 <ehird`> yeah
01:37:09 <ehird`> then restore it at the end
01:37:10 <ehird`> i do that
01:37:13 <ehird`> > (set x 5)
01:37:14 <lithpbot> 5
01:37:15 <ehird`> > (f)
01:37:15 <lithpbot> 5
01:37:16 <ehird`> woot
01:37:27 <ehird`> > (def g () (set x 7) (f))
01:37:28 <lithpbot> #function:3a
01:37:29 <ehird`> > (g)
01:37:29 <lithpbot> 7
01:37:32 <ehird`> damnit!!!
01:37:40 <ehird`> oerjan: this is dynamic scoping
01:37:41 <ehird`> > x
01:37:42 <lithpbot> 7
01:37:43 <ehird`> ...
01:37:44 <ehird`> wait, no
01:37:46 <ehird`> this is fucked up scoping
01:37:49 <oerjan> no it's correct
01:37:56 <ehird`> no
01:37:59 <ehird`> > (def g () (set x 7) (f))
01:37:59 <lithpbot> #function:4d
01:38:01 <oerjan> because you never defined x, so it's at top level
01:38:04 <ehird`> uhh
01:38:06 <ehird`> i did define x
01:38:08 <ehird`> as top level
01:38:12 <ehird`> set is define too
01:38:19 <oerjan> so it is shared
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:23 <ehird`> and no
01:38:24 <oerjan> oh
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:12 <ehird`> it's dynamic scoping
01:39:18 -!- lithpbot has joined.
01:39:19 <ehird`> and yeah whatever
01:39:23 <ehird`> > (set x 5)
01:39:23 <lithpbot> 5
01:39:30 <ehird`> > (def f () x)
01:39:31 <lithpbot> #function:20
01:39:32 <ehird`> > (f)
01:39:32 <lithpbot> 5
01:39:36 <jix> !bf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++.+++++++.
01:39:39 <EgoBot> Hel
01:39:43 <oerjan> > (set x 6)
01:39:43 <lithpbot> 6
01:39:45 <ehird`> > (def g () (set x 7) (f))
01:39:46 <lithpbot> #function:38
01:39:46 <oerjan> > (f)
01:39:46 <lithpbot> 6
01:39:47 <jix> not optimal yet ^^
01:39:47 <ehird`> oerjan, damnit
01:39:48 <ehird`> stop that
01:39:51 -!- lithpbot has quit (Remote closed the connection).
01:39:55 <ehird`> I was trying to read my debug output
01:40:01 <oerjan> oh :)
01:40:02 -!- lithpbot has joined.
01:40:11 <ehird`> > (set x 5)
01:40:12 <lithpbot> 5
01:40:25 <ehird`> > (def f () x)
01:40:26 <lithpbot> #function:20
01:40:30 <ehird`> > (f)
01:40:30 <lithpbot> 5
01:40:37 <ehird`> oh
01:40:46 <ehird`> oerjan: i need to push a new stack AFTER replacing the closure
01:40:49 <ehird`> not just replace it
01:41:11 -!- lithpbot has quit (Remote closed the connection).
01:41:15 <ehird`> oerjan: :)
01:41:22 -!- lithpbot has joined.
01:41:23 <ehird`> > (set x 5)
01:41:24 <lithpbot> 5
01:41:27 <ehird`> > (def f () x)
01:41:27 <lithpbot> #function:20
01:41:28 <ehird`> > (f)
01:41:28 <lithpbot> 5
01:41:39 <ehird`> > (def g () (set x 7) (f))
01:41:39 <lithpbot> #function:32
01:41:41 <ehird`> > (g)
01:41:42 <lithpbot> 5
01:41:45 <ehird`> hurrah
01:41:48 <ehird`> > (set x 7)
01:41:48 <lithpbot> 7
01:41:49 <ehird`> > (f)
01:41:49 <lithpbot> 7
01:41:50 <ehird`> > (g)
01:41:50 <lithpbot> 7
01:41:54 <ehird`> > (set x 50)
01:41:54 <lithpbot> 50
01:41:56 <ehird`> > (f)
01:41:57 <lithpbot> 50
01:41:57 <ehird`> > (g)
01:41:58 <lithpbot> 50
01:42:01 <ehird`> oerjan: IT WORKS :D
01:43:04 <oerjan> now let me try something more complicated
01:43:20 <ehird`> okay
01:43:26 <ehird`> i'll implement arithmetic while yo udo
01:43:37 <ehird`> oh and eval
01:44:20 <ehird`> oerjan: i'm excited what is it
01:44:21 <ehird`> :P
01:45:30 <oerjan> hm wait
01:45:47 <oerjan> no arithmetic
01:45:52 <ehird`> oh
01:45:56 <ehird`> what arithmetic do you need
01:46:00 <ehird`> i'll implement those first
01:46:16 <oerjan> just +
01:46:23 <ehird`> i just finished doing +
01:46:25 -!- lithpbot has quit (Remote closed the connection).
01:46:28 <ehird`> it's loading now
01:46:36 -!- lithpbot has joined.
01:46:38 <oerjan> anyway i'm not sure it will work because of your strange set
01:46:40 <ehird`> oerjan: there you go
01:46:43 <ehird`> hm
01:46:44 <ehird`> my strange set?
01:47:26 <ehird`> better test +
01:47:26 <ehird`> > +
01:47:27 <lithpbot> #native-function:15
01:47:30 <ehird`> > (+)
01:47:30 <lithpbot> 0
01:47:31 <oerjan> > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x) )
01:47:31 <lithpbot> (err) unmatched )
01:47:37 <ehird`> spaces freak it out oerjan
01:47:41 <ehird`> remove that one at the tend
01:47:44 <ehird`> > (+ 5 2)
01:47:44 <lithpbot> 7
01:47:46 <ehird`> oh
01:47:47 <oerjan> > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x))
01:47:47 <lithpbot> #function:5e
01:47:50 <ehird`> it's paul graham's thing :)
01:48:03 <oerjan> (set f (counter 42))
01:48:06 <oerjan> > (set f (counter 42))
01:48:06 <lithpbot> #function:68
01:48:10 <ehird`> > (f)
01:48:10 <lithpbot> (err) tried to add non-number
01:48:14 <ehird`> oh
01:48:15 <ehird`> duh
01:48:16 <ehird`> let me fix that
01:48:37 -!- lithpbot has quit (Remote closed the connection).
01:48:44 <ehird`> i didn't eval the arguments to +
01:48:45 <ehird`> :)
01:48:48 -!- lithpbot has joined.
01:48:49 <ehird`> > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x))
01:48:49 <lithpbot> #function:37
01:48:53 <ehird`> > (set f (counter 42))
01:48:53 <lithpbot> #function:41
01:48:54 <ehird`> > (f)
01:48:54 <lithpbot> 43
01:48:56 <ehird`> > (f)
01:48:57 <lithpbot> 43
01:48:58 <ehird`> > (f)
01:48:58 <lithpbot> 43
01:49:00 <ehird`> :|
01:49:01 <oerjan> alas
01:49:06 <ehird`> why does that not work?
01:49:07 <ehird`> oh, i see
01:49:13 <ehird`> ok
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:29 <ehird`> err
01:49:31 <ehird`> persist
01:49:32 <ehird`> which would be odd
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:17 <ehird`> okay
01:50:18 <ehird`> can do
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:50:45 <ehird`> e
01:51:23 -!- lithpbot has quit (Remote closed the connection).
01:51:24 <ehird`> ok
01:51:25 <ehird`> testing it
01:51:34 -!- lithpbot has joined.
01:51:48 <ehird`> oerjan: there you go
01:51:57 <oerjan> hm?
01:52:05 <ehird`> i changed set to do that
01:52:06 <ehird`> :)
01:52:11 <oerjan> > (def counter (a) (set x a) (lambda () (set x (+ x 1)) x))
01:52:12 <lithpbot> #function:37
01:52:18 <oerjan> > (set f (counter 42))
01:52:18 <lithpbot> #function:41
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:52:31 <oerjan> (f)
01:52:35 <ehird`> > (f)
01:52:35 <lithpbot> 43
01:52:36 <oerjan> > (f)
01:52:36 <lithpbot> 43
01:52:40 <ehird`> wtf :|
01:52:48 <ehird`> oh
01:52:48 <ehird`> duh
01:53:02 -!- lithpbot has quit (Remote closed the connection).
01:53:05 <ehird`> fixed.
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:29 <lithpbot> #function:37
01:53:32 <ehird`> > (set f (counter 42))
01:53:33 <lithpbot> #function:41
01:53:34 <ehird`> > (f)
01:53:34 <lithpbot> 43
01:53:36 <ehird`> > (f)
01:53:36 <lithpbot> 44
01:53:37 <oerjan> it's just a matter of hygiene
01:53:38 <ehird`> yay!!
01:53:39 <ehird`> > x
01:53:40 <lithpbot> (err) unbound: x
01:53:42 <ehird`> > a
01:53:42 <lithpbot> (err) unbound: a
01:53:56 <ehird`> oerjan: ok, well "def" defines functions
01:54:01 <oerjan> > (set f (counter 9))
01:54:01 <lithpbot> #function:55
01:54:02 <ehird`> oerjan: give me a name for 'make var, but don't set it'
01:54:08 <ehird`> > (f)
01:54:08 <lithpbot> 10
01:54:13 <oerjan> argh!
01:54:17 <ehird`> oh
01:54:18 <ehird`> sorry
01:54:18 <ehird`> ?
01:54:21 <oerjan> i messed up
01:54:26 <ehird`> heh ok
01:54:29 <ehird`> but, yeah, give me a name
01:54:32 <ehird`> and i'll make it
01:54:34 <oerjan> > (set g (counter 50))
01:54:35 <lithpbot> #function:62
01:54:36 <ehird`> also, it has to set the var somehow
01:54:39 <ehird`> so it's in its table
01:54:41 <ehird`> > (g)
01:54:42 <lithpbot> 51
01:54:43 <ehird`> > (f)
01:54:43 <oerjan> > (f)
01:54:43 <lithpbot> 11
01:54:44 <lithpbot> 12
01:54:48 <ehird`> > (g)
01:54:48 <lithpbot> 52
01:54:49 <oerjan> > (g)
01:54:50 <lithpbot> 53
01:54:51 <ehird`> so yeah that works
01:54:52 <oerjan> yay
01:54:56 <ehird`> but, what should it set it to?
01:54:57 <ehird`> 0?
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:28 <EgoBot> Hello, world!
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:44 <jix> fuck
01:57:45 <EgoBot> Hello, world
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:57:58 <ehird`> okay
01:58:02 <ehird`> so what should def set the var to?
01:58:27 <jix> ah
01:58:27 <oerjan> (def x 1) would set it to 1
01:58:34 <ehird`> *defvar
01:58:36 <ehird`> def is for functions
01:59:05 <oerjan> in scheme, define is for both
01:59:10 <ehird`> this isn't scheme
01:59:47 <oerjan> although think about it, you can get around the need for defvar with some lambda trickery
02:01:01 <ehird`> so
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:10 <lithpbot> #function:94
02:01:32 <oerjan> (set h (counter2 3))
02:01:36 <oerjan> > (set h (counter2 3))
02:01:36 <lithpbot> #function:9e
02:01:43 <oerjan> > (h)
02:01:43 <lithpbot> (err) need 1 args, got 0
02:01:58 <oerjan> huh?
02:02:13 <ehird`> counter2 returns a lambda
02:02:19 <ehird`> lambda need to be given arguments
02:02:29 <oerjan> oh wait
02:02:35 <ehird`> so, can you tell me what def does
02:02:36 <ehird`> thank you
02:02:38 <ehird`> i need to go like no
02:02:39 <ehird`> w
02:02:55 <oerjan> > (def counter2 (a) ((lambda (x) ((lambda () (set x (+ x 1)) x)) x))
02:02:56 <lithpbot> (err) unmatched (
02:03:14 <ehird`> oerjan!!!
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:32 <oerjan> damn
02:03:43 <ehird`> you made it gc
02:03:44 <ehird`> :P
02:03:59 <oerjan> def introduces a new variable unless there is one in exactly the same scope
02:04:29 <ehird`> introduce
02:04:30 <ehird`> define introduce
02:04:33 <ehird`> set to something?
02:04:41 <ehird`> and if there is one in the same scope what does it do?
02:04:42 <oerjan> yes
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:01 <EgoBot> Hello, world!
02:05:05 <ehird`> okay, oerjan
02:05:06 <ehird`> I will do that
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:14 <ehird`> ok, oerjan
02:07:14 <ehird`> done
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:29 <jix> (/ 1 0)
02:07:33 <jix> > (/ 1 0)
02:07:33 -!- lithpbot has quit (Remote closed the connection).
02:07:36 <ehird`> hahaharigjdiogj
02:07:42 <jix> ;)
02:08:12 <ehird`> fixed
02:08:20 -!- lithpbot has joined.
02:08:21 <ehird`> > (set a 2)
02:08:22 <lithpbot> (err) unbound: a
02:08:29 <ehird`> > (def a 2)
02:08:29 <lithpbot> (err) need at least 3 args, got 2
02:08:31 <ehird`> oh
02:09:31 -!- lithpbot has quit (Remote closed the connection).
02:09:36 <ehird`> ok oerjan, here we go
02:09:42 -!- lithpbot has joined.
02:09:43 <ehird`> > (set var 2)
02:09:44 <lithpbot> (err) unbound: var
02:09:47 <ehird`> > (def var 2)
02:09:48 -!- lithpbot has quit (Remote closed the connection).
02:09:50 <ehird`> AUWRHUIASDHSAD
02:10:03 * oerjan calls the acronym police
02:10:05 <ehird`> i did eval
02:10:07 <ehird`> instead of leval
02:10:13 -!- lithpbot has joined.
02:10:13 <ehird`> > (set var 2)
02:10:14 <lithpbot> (err) unbound: var
02:10:16 <ehird`> > (def var 2)
02:10:17 <lithpbot> 2
02:10:22 <ehird`> > (set var 3)
02:10:22 <lithpbot> 3
02:10:26 <ehird`> > (def var 2)
02:10:26 <lithpbot> 2
02:10:38 <ehird`> wait
02:10:41 <ehird`> i'll rewrite counter
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:10:56 <ehird`> oh damnit
02:11:04 -!- lithpbot has quit (Remote closed the connection).
02:11:27 <oerjan> almost there now :)
02:11:42 -!- lithpbot has joined.
02:11:43 <ehird`> > (def counter (a) (def x a) (lambda () (set x (+ x 1)) x))
02:11:43 <lithpbot> #function:3d
02:11:50 <ehird`> > (set f (counter 3))
02:11:50 <lithpbot> (err) unbound: f
02:11:55 <ehird`> > (def f (counter 3))
02:11:55 <lithpbot> #function:52
02:11:57 <ehird`> > (f)
02:11:57 <lithpbot> 4
02:11:58 <ehird`> > (f)
02:11:58 <lithpbot> 5
02:12:00 <ehird`> > (f)
02:12:00 <lithpbot> 6
02:12:04 <ehird`> > (/ 1 0)
02:12:04 -!- lithpbot has quit (Remote closed the connection).
02:12:09 <ehird`> What.
02:12:26 <ehird`> Fixing
02:12:27 <oerjan> yay
02:12:34 <oerjan> btw didn't you have to go?
02:12:37 -!- lithpbot has joined.
02:12:38 <ehird`> yes i do :|
02:12:39 <ehird`> > (/ 1 0)
02:12:44 <ehird`> > (/ 1 0)
02:12:44 <lithpbot> (err) divide by zero
02:12:47 <ehird`> > (/ 0 1)
02:12:47 <lithpbot> 0
02:12:53 <ehird`> > (* 5 2)
02:12:55 <lithpbot> 10
02:12:59 <ehird`> > (+ 1 2 3)
02:13:00 <lithpbot> 6
02:13:04 <ehird`> OKAY
02:13:05 <ehird`> finally
02:13:08 <ehird`> i'm going
02:13:16 <oerjan> bye
02:13:17 <ehird`> tomorrow: persistance of memor
02:13:17 <ehird`> 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 <jix> !bf ++++++++++[->>+>++>+++>++++>+++++>++++++[<]<]>>>>>>>++++++++++++.+++++++++++++++++++++++++++++.+++++++..+++.<<++++.<++.>>>++++++++.--------.+++.------.--------.<<<+.<<.
02:27:21 <EgoBot> Hello, world!
02:27:35 <oerjan> Hello, EgoBot!
02:27:44 <bsmntbombdood> that's a rather long hello world
02:27:57 <jix> the first part is a stupid hardcoded value
02:28:10 <jix> "++++++++++[->>+>++>+++>++++>+++++>++++++[<]<]" that part
02:28:15 <bsmntbombdood> yeah
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:28:53 <bsmntbombdood> except it tries more possibilities for the factor
02:29:03 <bsmntbombdood> orly?
02:29:16 <jix> i use a modified A* so it is optimal
02:29:22 <bsmntbombdood> A*?
02:29:24 <bsmntbombdood> code plz
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:30:21 <bsmntbombdood> hmm
02:30:32 <bsmntbombdood> i don't feel like understanding that now
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:41 <bsmntbombdood> ostensibly it looks like A* is what i needed
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:09 <bsmntbombdood> i searched that tree by brute force
02:33:33 <jix> ouch
02:33:44 <bsmntbombdood> yeah
02:33:44 <jix> that tree is pretty large
02:34:00 <bsmntbombdood> hence the 460 year hello world
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:38 <bsmntbombdood> why?
02:37:47 <jix> try to output 13
02:37:59 <bsmntbombdood> huh?
02:38:09 <jix> i hope that number was the right one
02:38:32 <jix> +++[->++++<]>+. is shorter than +++++++[->++<]>-.
02:38:43 <bsmntbombdood> hmm
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:39:52 <bsmntbombdood> and picked the shortest
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:42:52 <oerjan> (of some length)
02:44:39 -!- Sgeo has quit (Read error: 110 (Connection timed out)).
02:47:31 <jix> !bf +++++++++[->++++++++>+++++<<]>.+++++++++++++++++++++++++++++.+++++++..+++.>-.------------.<++++++++.--------.+++.------.--------.>+.>++++++++++.
02:47:35 <EgoBot> Hello, world!
02:47:51 <jix> !bf +++++++++[->++++++++>+++++>+<<<]>.+++++++++++++++++++++++++++++.+++++++..+++.>-.------------.<++++++++.--------.+++.------.--------.>+.>+.
02:47:55 <EgoBot> 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 <jix> !bf +++++++++[->+++++++++++>++++++++>+++++>+<<<<]>>.<++.+++++++..+++.>>-.------------.<<++++++++.--------.+++.------.--------.>>+.>+.
12:22:01 <EgoBot> Hello, world!
12:23:41 <dbc> !bf
12:23:41 <dbc> ++++++++[>++++[>++>+++>+++>+<<<<-]>+>->+>>+[<]<-]>>.>>---.+++++++..+++.>.<<-.>.+++.------.--------.>+.>++.
12:24:02 <dbc> !bf ++++++++[>++++[>++>+++>+++>+<<<<-]>+>->+>>+[<]<-]>>.>>---.+++++++..+++.>.<<-.>.+++.------.--------.>+.>++.
12:24:06 <EgoBot> Hello World!
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:38:49 <EgoBot> Hello, world!
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:44:58 <dbc> :|
12:45:04 <dbc> You.
12:45:07 <dbc> :)
12:47:05 <dbc> !bf
12:47:20 <dbc> !bf
12:47:24 <dbc> Hm, that doesn't work.
12:48:34 <dbc> !bf [
12:48:54 <dbc> !bf ++++++++++++++++++++++++++++++++++++++++++++++++.
12:48:58 <EgoBot> 0
12:49:08 <dbc> !bf ]
12:49:14 <jix> !bf_textgen Hello, world!
12:49:17 <EgoBot> Huh?
12:49:23 <jix> !bf_txtgen Hello, world!
12:49:39 <jix> !help
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:33:49 <EgoBot> Hello, world!
13:34:01 <jix> my best one without \n so far
13:34:53 <jix> !bf +++[->+++++<]>[->+++++>+++++++>++++++++>++>+++<<<<<]>---.>----.+++++++..+++.>>>-.<++.<-.<.>-----.<---.--------.>>+.
13:34:57 <EgoBot> Hello, world!
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:18:34 <EgoBot> Hi!
14:40:37 <jix> !bf ++++++++++[->+++++[->+>++>++>++>+<<<<<]>++>>+>++>->+++[<]<]>>++.>+.>--..+++.>>++++.>++.<<-.<.>-----.<---.<-.>>>>+.
14:40:42 <EgoBot> Hello, world!
14:40:45 <jix> but without newline
14:43:50 <jix> !bf 113 (134): ++++++++[->+++++[->++>++>+++>+>+<<<<<]>->+++>>-[<]<]>>.>---.+++++++..+++.>>>++++.<.<-.<.>-----.<---.--------.>>+.
14:43:54 <EgoBot> Hello, world!
14:51:01 <jix> !bf ++++++[->++++++[->++>+++>+++>+++>+>+<<<<<<]>>->>++>+[<]<]>>.>-.>..+++.>>++.>----.<<-.<.>-----.<---.<-.>>>>+.
14:51:04 <EgoBot> Hello, world!
14:54:02 -!- pikhq has joined.
14:57:53 <jix> with newline:
14:57:55 <jix> !bf 119 (136): ++++++[->+++++[->++>+++>+++>+<<<<]>>->>+>++[<]<]>>.>-.>..+++.>++.------------.<++++++++.--------.+++.------.<-.>>+.>--.
14:57:58 <EgoBot> <SZZ]&e]`ZR
14:58:06 <jix> ouch
14:58:30 <jix> that's not hello world
14:58:47 <jix> !bf ++++++[->+++++[->++>+++>+++>+<<<<]>>->>+>++[<]<]>>.>-.>..+++.>++.------------.<++++++++.--------.+++.------.<-.>>+.>--.
14:58:50 <EgoBot> <SZZ]&e]`ZR
14:58:52 <jix> hum
14:59:31 <jix> ah found the bug i think
14:59:54 <jix> !bf +++++++++[->++++[->++>+++>+++>+<<<<]>>->>+>+[<]<]>>.>++.>..+++.>-.------------.<++++++++.--------.+++.------.<-.>>+.>+.
14:59:58 <EgoBot> Hello, world!
15:00:01 <jix> better :)
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:10:58 <EgoBot> 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 <jix> !bf +++++[->+++++[->++>++<<]>->>++[<]<]>>>+.<+.+++.>+.<.>+.++++.<+.++++.-.--.++.+++.>.<-.>.>.
15:59:22 <EgoBot> 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 <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)
16:59:46 <ehird`> oklopol: hello
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:02:02 <ehird`> ;)
17:03:01 <jix> !bf 106 (127): ++++++++[->++++[->++>+++>+++>+<<<<]>+>->+>>+[<]<]>>.>>---.+++++++..+++.>.<<-.>.+++.------.--------.>+.>++.
17:03:04 <EgoBot> Hello World!
17:03:06 <jix> that's my version
17:03:20 <ehird`> !bf_txtgen Hello, world!
17:03:30 <ehird`> !help
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:38 <ehird`> !bf_txtgen x
17:03:42 <jix> ehird`: it takes some time
17:03:52 <jix> and it doesn't include the final newline
17:03:56 <ehird`> does it not?
17:03:57 <ehird`> damn
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:04:52 <ehird`> wiat
17:04:52 <ehird`> no
17:04:55 <ehird`> the former is x
17:06:00 <jix> !bf 118 (140): +++++++++[->++++[->++>+++>+++>+>+<<<<<]>>->>+>>+[<]<]>>.>++.>..+++.>-.>----.<<++++++++.--------.+++.------.<-.>>>+.>+.
17:06:04 <EgoBot> Hello, world!
17:06:06 <jix> with final newline
17:07:12 <jix> !bf 116 (160): +++++++++[->++++[->++>+++>+++>+++>+<<<<<]>>->>+>+>+[<]<]>>.>++.>..+++.>>-.------------.<++.<.>-----.<---.<-.>>>+.>+.
17:07:16 <EgoBot> Hello, world!
17:08:19 -!- RodgerTheGreat has joined.
17:09:29 <RodgerTheGreat> hi, everyone!
17:12:38 <jix> !bf ++++++++[->+++++[->>++>+++>+++>+>+>++<<<<<<<]>+>->->-->+>-[<]<]>>>.>>+.>----.>.>++.<<<<-.>-----.+++.--.<+++.>>>>++.<<<+++.---.<<-.>.>.----.<++.<<++.
17:12:42 <EgoBot> Hi, RodgerTheGreat
17:12:47 <RodgerTheGreat> :)
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:11 <EgoBot> Hello World!
17:14:18 <RodgerTheGreat> I dunno
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:16:22 <RodgerTheGreat> ehird`: agreed
17:17:05 * ehird` wonders what to name the equality predicate in his lisp
17:17:09 <ehird`> eq, equals, =?
17:17:43 <RodgerTheGreat> equ?
17:18:05 <ehird`> sounds foreign
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:23 <RodgerTheGreat> equ is what I use in several of my languages
17:19:32 <RodgerTheGreat> interesting
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:22:38 <ehird`> like what
17:23:02 <RodgerTheGreat> like the number of object allocations it waits for
17:23:15 <ehird`> ah
17:23:27 <ehird`> IMO the gc is an implementation detial
17:23:29 <ehird`> *detail
17:23:29 <ehird`> :-)
17:23:38 <ehird`> (so is memory allocation)
17:23:54 <RodgerTheGreat> I suppose, but you could allow for greater performance tweaking
17:24:56 <ehird`> dude
17:24:58 <ehird`> it runs on python
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:25:18 <ehird`> it's sloooooow
17:25:19 <ehird`> :)
17:25:21 <ehird`> > 2
17:25:21 <lithpbot> 2
17:25:27 <ehird`> > (+ 5 4 1)
17:25:29 <lithpbot> 10
17:25:34 <ehird`> > (/ 1 0)
17:25:35 <lithpbot> (err) divide by zero
17:25:37 <ehird`> > (/ 0 1)
17:25:37 <lithpbot> 0
17:25:55 <ehird`> > (eq 1 1)
17:25:55 <lithpbot> 1
17:25:57 <ehird`> > (eq 1 0)
17:25:57 <lithpbot> 0
17:26:00 <ehird`> > (eq 1 1 1 1)
17:26:00 <lithpbot> 1
17:26:01 <ehird`> > (eq 1 1 1 1 0)
17:26:02 <lithpbot> 0
17:26:44 <ehird`> > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1)))))
17:26:45 <lithpbot> #function:83
17:26:52 <ehird`> > (fact 1)
17:26:53 -!- lithpbot has quit (Remote closed the connection).
17:26:56 <ehird`> hah
17:27:04 <ehird`> hmm
17:27:08 <ehird`> it caused the gc to die
17:27:09 <ehird`> ah, i see
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:47 <lithpbot> #function:41
17:27:50 <ehird`> > (fact 1)
17:27:52 -!- lithpbot has quit (Remote closed the connection).
17:27:56 <ehird`> ... wow
17:28:00 <ehird`> it went on a gc spree
17:28:10 <ehird`> doing god knows what
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:08 <lithpbot> #function:41
17:30:11 <ehird`> > (fact 1)
17:30:17 -!- lithpbot has quit (Remote closed the connection).
17:30:23 <ehird`> maximum recursion depth
17:30:23 <ehird`> :|
17:30:59 <ehird`> debug time
17:31:07 -!- lithpbot has joined.
17:31:08 <ehird`> > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1)))))
17:31:08 <lithpbot> #function:41
17:31:17 <ehird`> > (fact 1)
17:31:22 -!- lithpbot has quit (Remote closed the connection).
17:31:52 <ehird`> ...
17:31:52 <ehird`> Call #function:41 with [-29]
17:31:52 <ehird`> ...
17:31:54 <ehird`> hmmmmmmmmmmmmmmmmmmmmmmmmmm :P
17:32:10 -!- lithpbot has joined.
17:32:18 <ehird`> > (def isone (n) (eq n 1)
17:32:19 <lithpbot> (err) unmatched (
17:32:22 <ehird`> > (def isone (n) (eq n 1))
17:32:22 <lithpbot> #function:38
17:32:25 <ehird`> > (isone 1)
17:32:25 <lithpbot> 0
17:32:30 <ehird`> loooooooooooooooooooooooooooooool?
17:32:42 <ehird`> > (eq 1 1)
17:32:42 <lithpbot> 1
17:32:47 <ehird`> Nonsensical
17:33:13 <ehird`> aha
17:33:15 -!- lithpbot has quit (Remote closed the connection).
17:33:18 <ehird`> silly me
17:33:26 -!- lithpbot has joined.
17:33:27 <ehird`> > (def fact (n) (if (eq n 1) 1 (* n (fact (- n 1)))))
17:33:27 <lithpbot> #function:41
17:33:30 <ehird`> > (fact 1)
17:33:30 <lithpbot> 1
17:33:37 <ehird`> > (fact 2)
17:33:38 <lithpbot> 2
17:33:39 <ehird`> > (fact 4)
17:33:40 <lithpbot> 24
17:33:51 <ehird`> > (fact 10)
17:33:52 <lithpbot> 3628800
17:33:57 <ehird`> wow, that's pretty fast
17:34:10 <ehird`> > (fact 30)
17:34:11 <lithpbot> 265252859812191058636308480000000L
17:41:13 <ehird`> > evak
17:41:13 <lithpbot> (err) unbound: evak
17:41:15 <ehird`> > eval
17:41:15 <lithpbot> #native-function:13
17:41:17 <ehird`> > (eval 2)
17:41:17 <lithpbot> 2
17:41:18 <ehird`> > (eval '2)
17:41:19 <lithpbot> (err) unbound: '2
17:41:26 <ehird`> > (eval (quote (eval 2)))
17:41:26 <lithpbot> (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:44:09 <lithpbot> 2
17:46:56 -!- lithpbot has quit (Remote closed the connection).
17:47:18 -!- lithpbot has joined.
17:47:23 <ehird`> > (set a 2)
17:47:23 <lithpbot> (err) unbound: a
17:47:33 <ehird`> > (define a 2) (set a 5) a
17:47:34 <lithpbot> 5
17:48:43 <ehird`> > (or 0 0 0 2)
17:48:43 <lithpbot> 0
17:48:46 <ehird`> wtf
17:48:56 <ehird`> oh
17:49:13 -!- lithpbot has quit (Remote closed the connection).
17:49:24 -!- lithpbot has joined.
17:49:42 <ehird`> > (or 0 0 0 2)
17:49:42 <lithpbot> 2
17:49:47 <ehird`> > (or 2 0)
17:49:47 <lithpbot> 2
17:49:50 <ehird`> > 02
17:49:51 <lithpbot> 2
17:49:55 <ehird`> > (and 0 0)
17:49:56 <lithpbot> 0
17:49:58 <ehird`> > (and 1 0)
17:49:58 <lithpbot> 1
17:50:00 <ehird`> oh.
17:50:20 -!- lithpbot has quit (Remote closed the connection).
17:50:31 -!- lithpbot has joined.
17:51:18 <ehird`> > (and 1 0)
17:51:18 <lithpbot> 0
17:51:20 <ehird`> > (and 1 1)
17:51:21 <lithpbot> 1
17:51:25 <ehird`> > (and 1 2)
17:51:25 <lithpbot> 2
17:57:45 <jix> > (and 0 2)
17:57:46 <lithpbot> 0
17:57:51 <jix> > (and 0 (/ 1 0))
17:57:51 <lithpbot> 0
17:57:55 <ehird`> hmm
17:57:58 <ehird`> that should give an error
17:58:02 <jix> shouldn't
17:58:02 <ehird`> > (/ 1 0)
17:58:02 <lithpbot> (err) divide by zero
17:58:07 <ehird`> > (and 0 (/ 1 0))
17:58:08 <lithpbot> 0
17:58:09 <ehird`> yeah
17:58:12 <ehird`> the error should bubble up
17:58:13 <jix> (at least i expect and to short cut)
17:58:18 <ehird`> oh
17:58:18 <ehird`> right
17:58:19 <ehird`> yes
17:58:24 <ehird`> you're right
17:58:25 <ehird`> :P
17:59:54 <ehird`> i'm silly
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:19:46 <bsmntbombdood> 72/XEKOIE9yBDG3+6m8G8UrDt0Tm9iNTWg
18:33:10 -!- jix has quit (Nick collision from services.).
18:33:20 -!- jix has joined.
18:42:16 <ehird`> back
18:42:25 <ehird`> bsmntbombdood: whut
18:45:46 <ehird`> lisp object = symbol | cons pair | string | number, right?
18:47:02 <bsmntbombdood> function
18:47:08 <bsmntbombdood> vector
18:47:10 <bsmntbombdood> port
18:47:28 <ehird`> ah yes, lambda
18:47:38 <ehird`> i think i can pass on vectors :|
18:47:43 <ehird`> ports, maybe, but probably not needed
18:47:47 <bsmntbombdood> null
18:47:55 <ehird`> nil is the empty list
18:47:58 <ehird`> But yeah
18:48:08 <bsmntbombdood> and you didn't have lists
18:48:35 <ehird`> yeah well
18:48:38 <ehird`> lists = cons pairs
18:48:40 <ehird`> though i may change that
18:48:44 <bsmntbombdood> wrong
18:48:48 <bsmntbombdood> null isn't a pair
18:48:53 <ehird`> lists = well formed cons pairs + nil
18:49:05 <bsmntbombdood> yes
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:50:02 <bsmntbombdood> are scheme's types
18:50:13 <bsmntbombdood> + null
18:50:47 <ehird`> scheme != list
18:50:48 <ehird`> :P
18:50:50 <ehird`> er
18:50:51 <bsmntbombdood> ?
18:50:52 <ehird`> lisp
18:50:55 <ehird`> scheme != lisp
18:51:00 <ehird`> it is a lisp dialect
18:51:02 <bsmntbombdood> right, scheme \subset lisp
18:51:07 <ehird`> not really
18:51:11 <ehird`> it's a superset and a subset
18:51:19 <ehird`> scheme \wonky-thing lisp
18:51:29 <bsmntbombdood> "lisp" is nothing but dialects
18:51:36 <ehird`> :)
18:51:44 <ehird`> not in the 70s!
18:52:05 <bsmntbombdood> yes...
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:07 <bsmntbombdood> yeah, cl doesn't have booleans
18:53:12 <ehird`> then again
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:45 <bsmntbombdood> #\<name>
18:53:56 <ehird`> is that related to #t and #f in any way?
18:54:03 <bsmntbombdood> ?
18:54:27 <ehird`> the syntax
18:54:41 <bsmntbombdood> sure, the both start with #
18:54:50 <ehird`> i mean conceptually
18:54:50 <ehird`> :P
18:54:57 <bsmntbombdood> no
18:55:22 <bsmntbombdood> vectors start with # too
18:55:30 <ehird`> i've never got why scheme needed vectors
18:55:40 <bsmntbombdood> uhhhhhhh
18:55:45 <ehird`> i mean natively
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:10 <bsmntbombdood> duh
18:56:28 <ehird`> so basically vectors are an implementation detail kind of thing
18:56:37 <bsmntbombdood> no...
18:56:39 <ehird`> 'our lists aren't arrays of memory, but we have a vector that is!'
19:01:02 <ehird`> anyway, let's see
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:01:56 <bsmntbombdood> chars, vectors
19:02:07 <ehird`> oh, booleans too
19:02:09 <ehird`> ok, and chars
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:00 <ehird`> ok, i guess
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:03:36 <bsmntbombdood> a vector is a C array
19:03:45 <ehird`> right
19:03:46 <bsmntbombdood> a list with linear time indexing
19:03:52 <bsmntbombdood> *constant
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:04:58 <bsmntbombdood> write-char, read-char
19:05:26 <ehird`> yeah
19:05:30 <ehird`> what about vectors?
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:04 <bsmntbombdood> vector-ref, vector, make-vector, vector-set!
19:06:08 <ehird`> ah
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:11 <oklopol> o
19:13:23 -!- oklopol has left (?).
19:13:23 -!- oklopol has joined.
19:13:33 * oklopol needs logs...
19:13:44 <ehird`> oklopol: hello
19:13:51 <ehird`> oklopol: i'm rewriting my lisp, again
19:13:52 <ehird`> but cleanl
19:13:53 <ehird`> y
19:14:06 <ehird`> i ditched multiple classes, now I just have a LispObject class
19:14:53 <oklopol> hehe, i see
19:15:00 <oklopol> but now logs.
19:15:30 <ehird`> :P
19:17:22 <ehird`> bsmntbombdood: any opinions?
19:21:58 <ehird`> bsmntbombdood: :S
19:25:13 <oklopol> finally
19:25:34 <oklopol> i guess i should start skipping the debugging parts of logs :)
19:26:31 <ehird`> oklopol: haha
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:31:18 <oklopol> you can do (8 8) + 4
19:31:22 <oklopol> 8 8 is a syntax error
19:31:36 <oklopol> error evaluates to 0
19:32:03 <ehird`> lmao
19:32:08 <ehird`> no i mean
19:32:13 <oklopol> i know what you mean
19:32:13 <ehird`> it still throws by default
19:32:18 <ehird`> but you can catch it
19:32:20 <ehird`> and manipulate it in lisp
19:32:24 <oklopol> yeah
19:33:58 <ehird`> does your lisp have floats or whatever?
19:33:59 <ehird`> or just ints
19:35:01 <oklopol> hmm, i'm pretty sure it doesn't have floats if it doesn't have strings
19:35:04 <oklopol> but not sure
19:35:52 <ehird`> oklopol: should i have error types and descriptions or just errors
19:35:55 <ehird`> something like
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:36:48 <oklopol> err i mean extendable
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:38:21 <oklopol> *nop
19:38:24 <ehird`> x
19:38:25 <ehird`> D
19:38:27 <ehird`> *xD
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:34:24 <oklopol> oh
20:34:30 <oklopol> it provides my Itr class
20:34:38 <oklopol> that's basically StringIO
20:35:13 <oklopol> made my own, stringio lacked something, don't remember what
20:35:19 <ehird`> .curr()
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:22 <oklopol> err kay...
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:37:48 <oklopol> and split by that.
20:38:09 <ehird`> because you can pass it str.isspaec
20:38:12 <ehird`> *isspace
20:38:13 <ehird`> :-)
20:38:22 <oklopol> k
20:38:31 <oklopol> so you can't do like 4+5
20:38:40 <oklopol> or even (4 + 5)
20:38:49 <ehird`> yeah you can
20:38:53 <oklopol> oh
20:38:54 <oklopol> i see.
20:38:59 <oklopol> well not relaly
20:38:59 <ehird`> lambda x: x.isspace() or x == "+"
20:39:02 <oklopol> *really
20:39:12 <oklopol> :O
20:39:29 <oklopol> so... 4+5 would be ["4", "5"] and ignore the addition symbol?
20:39:54 <ehird`> oh
20:39:57 <ehird`> hmm
20:40:02 <ehird`> ok, it'll hvae
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:22 <oklopol> well
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:40:34 <ehird`> isspace isn't
20:41:37 <oklopol> seems a bit hacky to me, but it seems to work for most grammars
20:41:42 <oklopol> hmm hmm
20:42:01 <oklopol> oh, yeah, the demos
20:42:10 <oklopol> i'm not sure if that's the right word
20:42:30 <ehird`> ok
20:42:33 <ehird`> how should i do it then
20:42:38 <ehird`> to make 5+4 work
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:33 <ehird`> ;)
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:35 <oklopol> *tokenizes
20:44:59 <ehird`> how about i just return delimiters
20:45:03 <ehird`> seems ok, no?
20:45:04 <oklopol> i'm not telling you what to do, just analyzing that for fun; also, demos
20:45:07 <oklopol> hmm
20:45:15 <ehird`> java lets you do that
20:45:18 <oklopol> just return delimiters?
20:45:24 <oklopol> hmmm
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:37 <ehird`> so
20:45:42 <ehird`> i'll just return 'em
20:45:45 <ehird`> it's not hard to do
20:45:50 <ehird`> if tok.isspace(): continue
20:46:57 <ehird`> oklopol: seems flexible enough, no?
20:47:23 -!- RedDak has joined.
20:47:24 <oklopol> very seems.
20:47:30 <oklopol> wanna do my demos for me?
20:47:42 <ehird`> demos?
20:48:08 <oklopol> these exercises we gotta do at home and demonstrate for the whole calssa
20:48:11 <oklopol> ...class
20:48:22 <ehird`> ah
20:48:50 <ehird`> oklopol: your lisp doesn't do tail recursion
20:48:54 <oklopol> no.
20:49:04 <oklopol> i couldn't think of a trivial way to do that
20:49:17 <oklopol> well...
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:49:42 <ehird`> or rather
20:49:44 <ehird`> at the end
20:49:49 <oklopol> err
20:49:50 <ehird`> if eval(car) == self
20:49:55 <ehird`> then do nothing
20:49:57 <ehird`> else break
20:50:00 <ehird`> all wrapped in a while True:
20:50:07 <oklopol> hmm, you do know when tail recursion applies?
20:50:16 <ehird`> yeah
20:50:20 <oklopol> or was that just a simplification
20:50:21 <oklopol> prolly.
20:50:24 <ehird`> when you're at the end and there's a list with eval(car) == sel
20:50:24 <ehird`> f
20:50:32 <ehird`> end = end of execution, not function
20:50:33 <oklopol> almost.
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:53:14 <oklopol> i'm gonna start soon.
20:53:30 <oklopol> why not now...
20:53:51 <ehird`> because you're bored
20:53:54 <ehird`> and lazy
20:54:10 <oklopol> i'm not bored
20:54:23 <ehird`> lazy then
20:54:29 <oklopol> that goes without saying
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:14 <oklopol> i did
21:00:21 <oklopol> that what the karnaugh map is for
21:00:28 <ehird`> ah
21:00:29 <ehird`> :P
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).
21:05:56 <oklopol> cl
22:10:10 <ehird`> 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 <Sgeo> Hi oerjan
22:52:43 * pikhq cleans up 10,000 blue voting credits
22:53:44 <oerjan> hello
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:20:28 <ehird`> Shoobadafa.
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:35:47 <oklopol> and you use port for..?
23:36:01 <ehird`> umm
23:36:02 <ehird`> scheme ports
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:12 <oklopol> okay, i did know
23:36:13 <ehird`> basically it's a stream
23:36:18 <ehird`> a socket would also be a port, for example
23:36:26 <oklopol> yeah i guessed then
23:36:40 <oklopol> anyways, what are you using them for?
23:36:41 <oklopol> hey
23:37:00 <ehird`> um
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:01 <ehird`> ports
23:37:01 <ehird`> :P
23:37:07 <ehird`> and yeah
23:37:08 <ehird`> :P
23:37:15 <oklopol> i'm a slow realizer.
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:32 <oklopol> exercises
23:37:33 <oklopol> whatever
23:37:44 <oklopol> yeah, that's bettah
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:37:50 <ehird`> the bot doesn't
23:44:31 <oerjan> ehird`: you could create an irc module or something to load
23:45:29 <ehird`> oerjan: possibly
23:45:33 <ehird`> but, meh
←2007-11-03 2007-11-04 2007-11-05→ ↑2007 ↑all