←2007-08-26 2007-08-27 2007-08-28→ ↑2007 ↑all
00:03:52 -!- Sgeo has joined.
00:05:14 -!- jcc has quit (Remote closed the connection).
01:33:03 -!- oerjan has quit ("Good night").
02:30:38 <Sgeo> Anyone here?
02:30:42 <Sgeo> pikhq? SimonRC?
02:30:52 <Sgeo> bsmntbombdood?
02:30:57 <bsmntbombdood> what?
02:31:01 <Sgeo> Hello
02:31:21 * Sgeo is thinking up how to handle unsafe functions in PSOX
02:31:33 <Sgeo> But it's a bit involved
02:31:38 * Sgeo goes to write up specs
02:33:09 <pikhq> Jes?
02:33:21 <Sgeo> ^^
02:37:35 * Sgeo silently changes a command around in the PSOX spec
02:44:47 -!- navaburo has quit (Success).
02:47:57 <Sgeo> Congrats to anyone who figures it out!
02:52:54 * bsmntbombdood hasn't been paying attention to this psox stuff
03:33:30 <Sgeo> hm, maybe I shouldn't have Unsafe functionality be as complicated as I'm imagining it...
03:54:55 <Sgeo> http://sgeo.diagonalfish.net/esoteric/psox-exit-demo.b
03:56:42 * pikhq approves
03:57:02 <pikhq> Looks like it ought to be easy to implement PEBBLE macros for it. :)
03:57:33 <pikhq> I may want to add the "if-provided" feature that I've been meaning to, though.
03:58:03 <Sgeo> if-provided?
03:58:32 <pikhq> To test to see if a compiler provides certain features. . .
03:58:51 <Sgeo> PSOX isn't part of the compiler..
03:58:58 <pikhq> if-provided PSOX {code}, for example, to test to see if PSOX is supported in the target language.
03:59:32 <pikhq> Some of the target languages mightn't allow for PSOX.
03:59:42 <Sgeo> pikhq, examples?
03:59:54 <pikhq> C. Interpreter backend.
04:00:11 <pikhq> Also useful if I want to do PSOX-specific versions of macros. . .
04:00:32 <Sgeo> PSOX has to be enabled at the beginning of the program..
04:00:50 <pikhq> Clearly, you don't get what I mean.
04:00:59 <Sgeo> I probably don't :(
04:01:25 <pikhq> Trying to allow for one bit of source-code to compile to something which uses PSOX and something which doesn't.
04:02:02 <Sgeo> oh
04:03:14 <Sgeo> Question: Is it ok if a program has to declare that it wants to use unsafe features at the beginning, before doing anything else?
04:04:53 <pikhq> As far as I'm concerned: yes.
04:06:24 <Sgeo> Did you catch what function I switched around?
04:07:39 <pikhq> No, I've not looked.
04:09:38 <Sgeo> check
04:10:47 <Sgeo> Give up?
04:11:04 <pikhq> Not even started to bother.
04:11:25 <Sgeo> Want to know?
04:11:27 <pikhq> Sure.
04:11:42 * Sgeo switched [0x00 0x01 0x00] 0x00 0x06 to [0x00 0x01 0x00] 0x00 0x07
04:12:01 <pikhq> Ah.
04:14:21 <Sgeo> It's so I can place the Request Unsafe Functionality there
04:14:35 * pikhq nods
04:14:45 <Sgeo> Since 6, with it's relation to 666, and the fact that it's unsafe..
04:14:50 <Sgeo> >.>
04:28:33 <Sgeo> Igh, too tired to work on this now..
04:28:35 <Sgeo> G'night
04:33:21 -!- Sgeo has quit ("Ex-Chat").
04:37:03 -!- calamari has joined.
04:43:07 -!- poiuy_qwert has joined.
05:33:27 -!- bsmntbombdood has quit (Read error: 110 (Connection timed out)).
05:33:50 -!- bsmntbombdood has joined.
05:36:18 -!- dibblego has joined.
05:59:55 -!- poiuy_qwert has quit.
06:14:30 -!- calamari_ has joined.
06:14:39 -!- calamari_ has quit (Read error: 104 (Connection reset by peer)).
06:15:27 -!- Sukoshi has quit ("Stuffs.").
07:38:32 -!- mtve has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:27:55 -!- calamari has quit ("Leaving").
08:54:44 -!- Tritonio has joined.
09:12:32 -!- SimonRC has quit (No route to host).
09:27:10 -!- Naranek has joined.
10:09:14 -!- tappi has joined.
10:15:47 -!- puzzlet_ has quit (Read error: 104 (Connection reset by peer)).
10:16:08 -!- puzzlet has joined.
11:02:12 -!- lakupuu has joined.
11:03:53 -!- jix_ has joined.
12:08:32 -!- oerjan has joined.
12:13:26 -!- c1|freaky has left (?).
12:13:51 -!- ehird` has joined.
12:14:11 -!- ehird` has quit (Client Quit).
12:27:55 -!- ehird` has joined.
13:06:21 -!- Karnaugh has joined.
13:07:15 <Karnaugh> Could somebody please open a socket to microsoft.com on port 80?
13:11:00 <oerjan> http://www.microsoft.com loads fine here
13:11:41 <Karnaugh> this language doesn't work very well
13:18:57 <oerjan> oh it was IRP?
13:19:17 <oerjan> i just translated your instruction to a higher level :)
13:21:38 <Karnaugh> then you are a bug
13:21:43 <Karnaugh> :P
13:22:02 * oerjan chirps like a cricket
13:22:12 <oerjan> or whatever it's called
13:27:23 -!- Tritonio has quit (Remote closed the connection).
13:33:24 -!- jix_ has quit (Read error: 104 (Connection reset by peer)).
13:39:55 -!- chton_ has joined.
13:39:55 -!- chton has quit (Read error: 104 (Connection reset by peer)).
13:41:57 -!- jix_ has joined.
13:57:36 -!- Tritonio has joined.
14:36:03 -!- oerjan has quit ("Dinner").
14:55:37 -!- RedDak has joined.
15:43:46 -!- RedDak has quit (Remote closed the connection).
16:04:23 -!- tappi has quit.
16:15:21 -!- sebbu has joined.
16:23:06 -!- SimonRC has joined.
18:22:27 -!- helios24 has quit (heinlein.freenode.net irc.freenode.net).
18:22:27 -!- bsmntbombdood has quit (heinlein.freenode.net irc.freenode.net).
18:22:28 -!- sp3tt has quit (heinlein.freenode.net irc.freenode.net).
18:23:10 -!- bsmntbombdood has joined.
18:23:10 -!- helios24 has joined.
18:23:10 -!- sp3tt has joined.
18:33:36 -!- bsmntbombdood has quit (Connection timed out).
18:34:30 -!- bsmntbombdood has joined.
18:41:39 -!- oklopol has joined.
18:43:07 -!- ololobot has joined.
18:43:20 <oklopol> mrning y'all
18:44:48 <oklopol> >>> sch (define (cons a b) (lambda (n) (cond ((= n 0) a) (1 b))))(define (car a) (a 0))(define (cdr a) (a 1))(cdr (car (cons (cons 1 2) (cons 3 4))))
18:44:48 <ololobot> num:2
18:45:51 <oklopol> hmm.. wonder if i should actually add those primitively... they might be a bit essential
18:48:12 <lament> writing a scheme?
19:04:53 <ehird`> oklopol: make NOTHING primitive that you can't
19:05:20 <ehird`> oklopol: I assume + is (- x (neg y))? ;)
19:08:17 <oklopol> lament: i wrote one on friday, yeah, just didn't make that much primitives, since i was lazy
19:09:07 <oklopol> hmm
19:09:17 <oklopol> it should now save stuff between runs
19:09:23 <oklopol> but prolly doesn't.
19:09:28 <oklopol> >>> sch (define oko 5)
19:09:32 <oklopol> >>> sch (* oko 8)
19:10:53 <oklopol> guess i should try and fix that
19:11:13 <oklopol> i need a better brain, always making mistakes in trivial code...
19:17:11 -!- ehird` has quit (Remote closed the connection).
19:17:52 <oklopol> eh
19:18:02 <oklopol> now it works... didn't change the code.
19:18:27 <oklopol> sch (define (cons a b) (lambda (n) (cond ((= n 0) a) (1 b))))(define (car a) (a 0))(define (cdr a) (a 1))
19:18:36 <oklopol> >>> sch (define (cons a b) (lambda (n) (cond ((= n 0) a) (1 b))))(define (car a) (a 0))(define (cdr a) (a 1))
19:18:37 <ololobot> None
19:18:41 <oklopol> hmm
19:18:51 <oklopol> >>> sch (car (cons 5 6))
19:18:55 <oklopol> ..
19:18:56 <ololobot> num:5
19:19:00 <oklopol> oh
19:19:01 <oklopol> cool
19:19:10 <oklopol> my scheme has lists \o/
19:19:13 <oklopol> well, somewhat
19:26:48 -!- ololobot has quit (Remote closed the connection).
19:27:06 <oklopol> haha, guess i should continue debugging offline :D
19:27:19 -!- importantshock has joined.
19:29:45 <bsmntbombdood> hehe
19:42:24 -!- importantshock has quit.
19:56:19 -!- oerjan has joined.
20:21:12 -!- oerjan has quit (Remote closed the connection).
20:21:16 -!- oerjan has joined.
20:22:08 -!- ololobot has joined.
20:23:15 <oklopol> insisted on using primitive lists and was lazy, so i don't have stuff like (2 3 4 . 5)
20:23:44 <oklopol> but it should work as long as you use cons just with a list as r-param...
20:24:06 <oklopol> >>> sch (cons 3 ())
20:24:06 <ololobot> (num:3)
20:26:20 <oklopol> >>> sch (define o 7)
20:26:20 <ololobot> ()
20:26:26 <oklopol> >>> sch o
20:26:26 <ololobot> num:7
20:27:56 <oerjan> >>> sch (cons 3 3)
20:27:56 <ololobot> err:cons-not-def-for:num:3
20:28:17 * oerjan had hoped for a spectacular crash
20:28:24 -!- bsmntbombdood has quit (Read error: 110 (Connection timed out)).
20:29:00 <oklopol> hehe
20:29:12 <oklopol> i don't think you can crash it
20:29:21 <oklopol> the bot that is
20:29:28 <oklopol> you can crash the interpreter though
20:30:23 <oklopol> >>> sch (undef o)
20:30:24 <ololobot> None
20:30:27 <oklopol> >>> sch o
20:30:28 <ololobot> None
20:30:41 <oklopol> is "undef" a scheme command?
20:30:47 <oklopol> i mean, does that exist in scheme
20:31:13 <oklopol> i'll gogulate? good idea
20:31:41 <oerjan> gogulare necesse est
20:32:21 <oklopol> i can't find such a command
20:32:51 <oklopol> >>> sch (define (k a) (lambda (b) a))
20:32:52 <ololobot> ()
20:32:57 <oklopol> >>> sch ((k 4) 5)
20:33:01 <oklopol> umm
20:33:30 <oklopol> >>> sch (define k (lambda (a) (lambda (b) a)))
20:33:31 <ololobot> ()
20:33:34 <oklopol> >>> sch ((k 4) 5)
20:33:38 <oklopol> >>> sch (k 4)
20:33:44 <oklopol> GLAH.
20:34:34 <oklopol> i guess i broke the whole thing when adding lists, had to make a gigantic refactoring
20:34:55 <oklopol> you'd think i'd've debugged after that, but noooo
20:42:25 <oklopol> >>> sch ((k 6) 7)
20:42:26 <ololobot> num:6
20:42:30 <oklopol> yay
20:42:41 <oklopol> >>> sch (define (i a) a)
20:42:42 <ololobot> ()
20:42:43 <oklopol> hm
20:42:48 <oklopol> >>> sch (i 5)
20:42:55 <oklopol> heh
20:43:10 <oklopol> >>> sch (define i (lambda (a) a))
20:43:11 <ololobot> ()
20:43:12 <oklopol> >>> sch (i 5)
20:43:12 <ololobot> num:5
20:43:18 <oklopol> wonder what that was about.
20:43:24 <oerjan> >>> sch (+ 5 5)
20:43:25 <ololobot> num:10
20:43:41 <oerjan> >>> sch (if (< 0 1) 1 2)
20:43:42 <ololobot> num:1
20:43:42 <oklopol> oh
20:43:45 <oklopol> s
20:44:18 <oklopol> >>> sch (define s (lambda (a) (lambda (b) (lambda (c) ((a c) (b c))))))
20:44:18 <ololobot> ()
20:44:21 <oklopol> is that correct?
20:44:36 <oklopol> hmm
20:44:41 <oklopol> >>> ul ```skk6
20:44:51 <oklopol> >>> ul ```skki
20:44:51 <ololobot> -> i
20:44:55 <oklopol> >>> ul ```skka
20:44:56 <ololobot> -> a
20:45:14 <oklopol> >>> sch (s (k (k 3)))
20:45:14 <ololobot> <lambda>
20:45:23 <oklopol> umm...
20:45:25 <oklopol> oh
20:45:35 <oklopol> >>> sch (((s k) k) 3)
20:45:49 <oerjan> sch (define fib (lambda (n) (if (< n 2) 1 (+ (fib (- n 1) (- n 2))))))
20:45:50 <oklopol> :<
20:45:54 <oerjan> >>> sch (define fib (lambda (n) (if (< n 2) 1 (+ (fib (- n 1) (- n 2))))))
20:45:55 <ololobot> ()
20:45:58 <oklopol> :\
20:46:02 <oklopol> that oughtta work...
20:46:08 <oerjan> >>> sch (fib 5)
20:46:09 <ololobot> num:1
20:46:14 <oklopol> eh
20:46:17 -!- bsmntbombdood has joined.
20:46:18 <oerjan> eek
20:46:24 <oklopol> (fib (- n 1) (- n 2)) <<< sure about this? :)
20:46:37 <oerjan> er, no
20:46:52 <oerjan> >>> sch (define fib (lambda (n) (if (< n 2) 1 (+ (fib (- n 1)) (fib (- n 2)))))))
20:46:53 <ololobot> ()
20:46:57 <oerjan> >>> sch (fib 5)
20:46:58 <oklopol> hmm
20:46:58 <ololobot> num:8
20:47:04 <oklopol> cewl
20:47:20 <oklopol> it doesn't optimize tail recursion, so be gentle :)
20:47:26 <oerjan> warning: big numbers not recommended
20:47:33 <oklopol> ?
20:47:41 <oklopol> >>> sch (fib 20)
20:47:41 <oerjan> this fib is not even tail recursive :)
20:47:42 <oklopol> ah
20:47:44 <oklopol> yeah :P
20:48:03 <ololobot> num:10946
20:48:21 <oklopol> but... my combinators :<
20:48:25 <oklopol> why didn't they work..
20:48:35 <oklopol> >>> sch (define s (lambda (a) (lambda (b) (lambda (c) ((a c) (b c))))))
20:48:35 <ololobot> ()
20:48:39 <oklopol> s
20:48:41 <oklopol> >>> sch s
20:48:42 <ololobot> <lambda>
20:48:47 <oklopol> >>> sch (s 1)
20:48:48 <ololobot> <lambda>
20:48:52 <oklopol> >>> sch ((s 1) 1)
20:48:53 <ololobot> <lambda>
20:48:58 <oklopol> >>> sch (((s 1) 1) 1)
20:49:36 <oklopol> i
20:49:37 <oklopol> don't
20:49:38 <oklopol> get
20:49:39 <oklopol> it
20:49:56 <oerjan> what should it give? 1 is not a function is it?
20:50:09 <oklopol> no
20:50:09 <oklopol> but
20:50:16 <oklopol> >>> sch (((s k) k) 3)
20:50:22 <oklopol> shouldn't that be i?
20:50:46 <oerjan> indeed
20:50:58 <oklopol> >>> sch (define s-guy (lambda (a) (lambda (b) 9)))
20:50:58 <ololobot> ()
20:51:13 <oklopol> >>> sch (define s-boy (lambda (a) 0))
20:51:14 <ololobot> ()
20:51:28 <oklopol> >>> (((s s-guy) s-boy) 6)
20:52:26 <oklopol> >>> sch (define a (k 5)) (define b (k 6)) (+ (a 7) (b 8))
20:52:27 <ololobot> num:11
20:52:34 <oklopol> static scoping should work fine
20:52:42 <oklopol> so... what's wrung :<
20:53:01 <oklopol> guess i'll debug... ASDF
20:56:04 <oerjan> >>> sch ((k 1) 2)
20:56:04 <ololobot> num:1
20:57:12 -!- bsmntbombdood_ has joined.
20:57:58 <oerjan> >>> sch (((s (lambda (x) (lambda (y) (+ x y)))) (lambda (y) (+ y 1))) 1)
20:57:59 <ololobot> err:not-callable(num:5)
20:58:21 <oerjan> 5?
20:58:29 <oklopol> >>> sch (((s k) k) 4)
20:58:30 <ololobot> err:not-callable(num:5)
20:58:31 <oklopol> oh
20:58:47 <oklopol> that must be broken in a very weird way.
20:59:33 <oklopol> hmm...
20:59:45 <oklopol> you could try first doing what s does manually
20:59:48 <oklopol> so...
21:00:14 <oklopol> >>> sch (((lambda (x) (lambda (y) (+ x y))) 1) ((lambda (y) (+ y 1)) 1))
21:00:20 <oklopol> eh
21:00:21 <oklopol> okay.
21:00:43 <oklopol> >>> sch((lambda (y) (+ y 1)) 1)
21:00:45 <oklopol> >>> sch ((lambda (y) (+ y 1)) 1)
21:00:46 <ololobot> num:2
21:01:03 <oklopol> >>> sch (((lambda (x) (lambda (y) (+ x y))) 1) 2)
21:02:05 <oklopol> okay, if that doesn't work, then the problem can't be that deep
21:02:15 <oklopol> i mean, it prolly isn't deep
21:02:23 <oklopol> wonder what could do that...
21:03:06 -!- bsmntbombdood has quit (Connection timed out).
21:05:00 <oklopol> the problem is i haven't done python list -> my own list wrap yet for all the lambda code... i think...
21:06:17 <oklopol> >>> sch (((lambda (x) (lambda (y) (+ x y))) 1) 2)
21:06:17 <ololobot> num:3
21:06:25 <oklopol> >>> sch (((lambda (x) (lambda (y) (+ x y))) 1) ((lambda (y) (+ y 1)) 1))
21:06:26 <ololobot> num:3
21:06:33 <oklopol> >>> sch (((s k) k) 4)
21:06:39 <oklopol> ..
21:06:46 <oklopol> >>> ((k 4) 6)
21:06:57 <oklopol> for a minute i thought it workde.
21:07:00 <oklopol> *worked
21:07:43 <oerjan> >>> sch (((s (lambda (x) (lambda (y) (+ x y)))) (lambda (y) (+ y 1))) 1)
21:08:59 <oklopol> eh
21:09:04 <oklopol> it's offline now
21:09:04 <oklopol> wait
21:09:12 <oklopol> online
21:09:16 <oklopol> >>> sch (((s (lambda (x) (lambda (y) (+ x y)))) (lambda (y) (+ y 1))) 1)
21:09:25 <oerjan> >>> sch s
21:09:26 <ololobot> None
21:09:32 <oklopol> but... it worked a second ago... it's just not working online :\
21:09:33 <oklopol> and oh
21:09:45 <oklopol> >>> sch (define s (lambda (a) (lambda (b) (lambda (c) ((a c) (b c))))))
21:09:46 <ololobot> ()
21:10:00 <oerjan> >>> sch (((s (lambda (x) (lambda (y) (+ x y)))) (lambda (y) (+ y 1))) 1)
21:10:01 <oklopol> >>> sch (define k (lambda (a) (lambda (b) (a))))
21:10:01 <ololobot> num:3
21:10:02 <ololobot> ()
21:10:04 <oklopol> >>> sch (define k (lambda (a) (lambda (b) a)))
21:10:04 <ololobot> ()
21:10:13 <oerjan> it worked
21:10:18 <oklopol> cewl
21:10:23 <oklopol> >>> sch (((s k) k) 4)
21:10:24 <ololobot> num:4
21:10:28 <oklopol> \o/
21:10:59 <oerjan> >>> sch (define i (lambda (a) a))
21:10:59 <ololobot> ()
21:11:15 <oklopol> the problem was in my function for checking what variable names a function uses for the purpose of clozeurs.
21:11:30 <oklopol> >>> sch (i 4)
21:11:30 <ololobot> num:4
21:11:51 <bsmntbombdood_> >>> sch ((lamdba (x) (list x (list (quote quote) x))) (quote (lamdba (x) (list x (list (quote quote) x)))))
21:12:14 <oklopol> hmm
21:12:17 <oklopol> list
21:12:19 <oerjan> spelling lambda correctly might help
21:12:19 <oklopol> i'll make that
21:12:36 <oklopol> i don't have list, didn't remember that existed
21:12:57 <oerjan> >>> sch (((s i) i) ((s i) i))
21:12:59 <bsmntbombdood_> bah
21:13:09 <bsmntbombdood_> >>> (define (list . x) x)
21:13:13 <bsmntbombdood_> >>> sch (define (list . x) x)
21:13:14 <ololobot> ()
21:13:21 <bsmntbombdood_> >>> sch ((lambda (x) (list x (list (quote quote) x))) (quote (lambda (x) (list x (list (quote quote) x)))))
21:13:21 <ololobot> None
21:13:29 <oklopol> bsmntbombdood_: also "." doesn't exist yet
21:13:32 <oklopol> it's a bit stub.
21:14:49 <oklopol> hmm
21:14:53 <oklopol> >>> sch (list 1 2 3)
21:14:53 * oerjan wonders if his infinite loop is still running
21:14:53 <ololobot> (num:1 num:2 num:3)
21:15:02 <oklopol> oerjan: stack overflow in a millisecond
21:15:15 <bsmntbombdood_> >> sch ((lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ())))) (quote (lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ()))))))
21:15:24 <oklopol> hmm
21:15:25 <bsmntbombdood_> >>> sch ((lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ())))) (quote (lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ()))))))
21:15:44 <oerjan> >>> sch (quote quote)
21:15:45 <ololobot> spc:quote
21:15:49 <oklopol> hmm
21:16:37 <oklopol> >>> sch (eval (+ `(quote) `(5))
21:16:38 <ololobot> num:5
21:16:48 <oklopol> those are first-class, methinks
21:16:56 <bsmntbombdood_> quasiquote!
21:17:15 <oklopol> >>> sch (define a (lambda (a) (a (5))))
21:17:16 <ololobot> ()
21:17:25 <oklopol> >>> sch (a quote)
21:17:26 <ololobot> err:not-callable(spc:quote)
21:17:29 <bsmntbombdood_> (5)?
21:17:32 <oklopol> darn.
21:17:39 <bsmntbombdood_> oh
21:17:40 <oklopol> well yeah, if quote is first-order...
21:17:51 <bsmntbombdood_> macros aren't first order in scheme
21:17:59 <bsmntbombdood_> they should be though
21:18:02 <oklopol> yeah
21:18:07 <oklopol> i haven't followed any spec
21:18:20 <oerjan> first-order and first-class aren't quite same, me thinks
21:18:24 <oklopol> i was just in my friends hallway waiting for him to come and programmed that...
21:18:27 <oerjan> *the
21:18:39 <oklopol> and i don't know much about scheme
21:18:53 <oklopol> but... i gotta fix that, i want them to be first order...
21:18:57 <oklopol> ah
21:18:58 <oklopol> eh
21:19:01 <oklopol> first-class
21:19:41 <oklopol> umm
21:19:45 <oklopol> >>> sch (quote (5))
21:19:46 <ololobot> (num:5)
21:19:49 <bsmntbombdood_> i wrote a scheme with first class macros
21:19:54 <oklopol> >>> sch (eval `(quote (5)))
21:19:54 <ololobot> (num:5)
21:20:49 <oklopol> hmm
21:20:57 <oklopol> >>> sch (a quote)
21:24:04 <Eidolos> >>> sch `(quote (+ 1 2))
21:24:26 <oklopol> it's offline, debugging
21:24:49 <oklopol> hmm... i should add an error message for bad requests...
21:25:09 <oklopol> !this does it, and ! is quite a lot more probable prefix for a random message than >>>
21:25:13 <EgoBot> Huh?
21:25:13 <oklopol> oh
21:25:16 <oklopol> yeha
21:25:19 <oklopol> eyahyae
21:27:15 <oklopol> oh... darn, (a (5)) isn't considered a special form since what is evaluated and what is not is decided at the beginning of the eval-function...
21:27:35 <oklopol> the pattern (id num) will lead to normal evaluation
21:27:51 <oerjan> for first class macros i assume you need to evaluate the first element first, before deciding on the rest
21:27:53 <oklopol> hmm... guess i could fix that... but that's another refactoring... GADS
21:27:56 <oklopol> yeah
21:28:03 <oklopol> and that's exactly what i don't do yet
21:29:08 <oerjan> > liftM2 (,) [1..5] [1..5]
21:29:50 <oerjan> Wong Chan-Nel, my old nemesis, so we meet again
21:31:26 <oklopol> :P
21:31:29 <oklopol> you never learn!
21:31:49 <oklopol> (define a (lambda (b) (b (5))))
21:31:49 <oklopol> (a quote)
21:31:52 <oklopol> eh
21:31:54 <oerjan> at least you get to learn - a little haskell
21:32:00 <oklopol> >>> sch (define a (lambda (b) (b (5))))
21:32:01 <ololobot> ()
21:32:06 <oklopol> >>> sch (a quote)
21:32:07 <ololobot> (num:5)
21:32:12 <oklopol> "a quote"
21:32:15 <oklopol> hahaha
21:32:34 <oklopol> anyway, i think it has first-class macros now
21:32:53 <oklopol> what's liftM2 then, oerjan
21:32:54 <oklopol> ?
21:33:13 <oklopol> i'll code it in scheme
21:34:15 <oklopol> lakupuu: great nick :D
21:34:54 <oklopol> i'm pretty sure that change broke everything else, though
21:35:01 <oklopol> i mean that first-class zippidy
21:35:25 <oklopol> >>> sch ((lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ())))) (quote (lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ()))))))
21:35:43 <oklopol> >>> sch (quote ())
21:35:44 <ololobot> ()
21:36:21 <bsmntbombdood_> >>> sch ((lambda (x) (x (a b))) quote)
21:36:22 <ololobot> (id:a id:b)
21:36:26 <oklopol> uh
21:36:28 <bsmntbombdood_> hey hey hey
21:36:29 <oklopol> oh
21:36:52 <oklopol> bsmntbombdood_: is that supposed to be a quine?
21:36:55 <oklopol> eh
21:37:04 <oklopol> why am i asking, i just checked with drscheme
21:37:06 <oklopol> :DD
21:37:41 <oklopol> >>> sch (cons (cons (quote quote) (cons x (quote ())))
21:37:50 <oklopol> >>> sch (quote quote)
21:37:51 <ololobot> spc:quote
21:38:04 <oklopol> >>> sch (cons x (quote ()))
21:38:05 <ololobot> (None)
21:38:06 <oklopol> >>> sch (cons x (quote ())
21:38:07 <ololobot> (None)
21:38:08 <oklopol> ...
21:38:15 <oklopol> oh
21:38:17 <oklopol> haha
21:39:55 <bsmntbombdood_> spc?
21:40:03 <bsmntbombdood_> and that type prefix is annoying
21:41:44 <oerjan> oklopol: liftM2 f cmd1 cmd2 = do x <- cmd1; y <- cmd2; return (f x y)
21:41:59 <oerjan> however, liftM2 (,) on lists is cartesian product
21:42:24 <oklopol> hmm
21:42:28 <oerjan> other monads will differ
21:42:44 <oklopol> bsmntbombdood_: i know, i'm gonna take it away soon, it was for debugging purposes
21:43:27 <oklopol> oerjan: i decided not to program it in scheme.
21:43:34 <oklopol> >>> sch ((lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ())))) (quote (lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ()))))))
21:43:57 <oklopol> umm... kay
21:43:57 <oerjan> i was sort of expecting that :D
21:43:59 <oklopol> >>> sch ()
21:44:00 <ololobot> ()
21:44:04 <oklopol> hmm
21:44:13 <oklopol> i guess it's just too long with the type prefixes
21:44:31 <oklopol> i'll remove
21:44:39 <oerjan> perhaps if i write a pure list version with functions:
21:44:53 <oklopol> >>> sch ()
21:44:54 <ololobot> ()
21:44:56 <oklopol> >>> sch 5
21:44:57 <ololobot> 5
21:45:00 <oklopol> >>> sch ((lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ())))) (quote (lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ()))))))
21:45:06 <oklopol> .
21:45:18 <oklopol> it just worked, i saw it with my own i's
21:46:10 <bsmntbombdood_> >>> sch (5)
21:46:11 <ololobot> not-callable(5)
21:46:21 <oklopol> >>> sch ((lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ())))) (quote (lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ()))))))
21:46:50 <oklopol> ((lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ())))) (quote (lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ())))))) <<< this is output if i run from command line
21:47:23 <oklopol> and the bot just effectively calls that same function and outputs what comes out...
21:48:03 <bsmntbombdood_> >>> sch (((lambda (x) (x x)) (lambda (self) (lambda (a b) (if (= b 0) a ((self self) (+ a 1) (- b 1)))))) 4 5)
21:48:03 <ololobot> 9
21:48:07 <oklopol> what's the max message lenght?
21:48:09 <bsmntbombdood_> yay
21:48:10 <oklopol> *length
21:48:24 <oklopol> 512?
21:48:27 <oklopol> 256?
21:48:30 <oklopol> 176?
21:49:23 <oklopol> bsmntbombdood_: what does x do there? :P
21:49:24 <oerjan> liftM2 f l1 l2 = concatMap (\x -> map (\y -> f x y) l1) l2
21:49:58 <Eidolos> that's the Y combinator
21:50:19 <oklopol> Eidolos: i know, that doesn't answer my question
21:50:49 <oklopol> also, message length? :)
21:51:09 <oklopol> that quine isn't working because max length for ololobot is 137 characters?
21:51:12 <oklopol> *-?
21:52:01 <oklopol> if you don't answer soon, i swear i'm gonna *google* :|
21:53:42 <lakupuu> oklopol: thx
21:53:47 <lakupuu> ^^
21:54:27 <oklopol> liquorice tree
21:54:44 <GregorR> LIQUOR TREE???
21:54:55 <oklopol> no
21:54:58 <oklopol> liquor ICE
21:55:03 <oklopol> like frozen booze
21:55:07 <oerjan> message length may vary between irc servers i think, although there is some minimum
21:55:07 <GregorR> LICK HER EYES?
21:55:42 <oklopol> GregorR: is there something wrong in doing that?
21:56:11 <GregorR> NO, I JUST WUV THE SHIFT KEY
21:56:18 <oerjan> i am sure a finnish guy would appreciate a liquor tree
21:56:36 -!- ololobot has quit (Read error: 104 (Connection reset by peer)).
21:56:55 -!- ololobot has joined.
21:56:59 <oerjan> and that the liquorice might only apply during harsh winters
21:57:05 <oklopol> >>> sch ((lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ())))) (quote (lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ())))
21:57:06 <ololobot> ((lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ())))) (quote (lambda (x) (cons x (cons (cons (quote quote) (cons x (quote ()))) (quote ()))))))
21:57:13 <bsmntbombdood_> bot loop time!!!!!!!!11
21:57:26 <oklopol> :D
21:58:19 <oklopol> oerjan: i don't do much alcohol nowadays
21:58:31 <oklopol> (just updating your statistics)
21:58:52 <oklopol> (i'm sure that changed the finnish average use)
21:59:14 <oerjan> i was just attempting a stereotypic joke, but i guess the finnish don't understand those
21:59:36 <oerjan> (the swedes certainly don't)
22:00:38 <oklopol> oerjan: i did understand it, mine was a follow-up joke though.
22:00:38 <bsmntbombdood_> that's all american jokes are
22:00:51 <bsmntbombdood_> "a rabii, and preist, and a blonde walk into a bar..."
22:00:53 <bsmntbombdood_> blech
22:01:54 <oklopol> wish i had food
22:02:57 <GregorR> SO, A JEWISH GUY, A CATHOLIC, A MORMON AND A CHRISTIAN WALK INTO A BAR. THE CHRISTIAN SAYS "I'M AMERICAN YOU ALL HATE JESUS LOLOLOLOLOLOLOL"
22:03:50 <oklopol> i don't believe in religions
22:04:15 <oklopol> gonna eat the most edible thing in the kitchen, unless poisonous ->
22:04:30 <oerjan> watch out, potted plants"
22:04:33 <oerjan> *!
22:04:50 <oerjan> although i guess those died long ago
22:05:15 <oerjan> oh right, food... afk
22:05:28 <oklopol> i don't have a pot jungle yet, since my parents live here too.
22:05:51 <bsmntbombdood_> i want some food
22:05:55 <oklopol> hmm... pot = amphetamine?
22:06:04 <bsmntbombdood_> uuuuuuuuuhhh no
22:06:07 -!- bsmntbombdood_ has changed nick to xor.
22:06:07 <oklopol> ur whut
22:07:13 <oklopol> i read a long list of drug slang terms, after that i only knew balling is inserting heroin vaginally.
22:07:25 <oklopol> well read.
22:07:50 <xor> aah yes
22:08:07 <xor> i read an acount of a bunch of dykes trying a bunch of drugs vaginally
22:08:33 <oklopol> i can imagine taht
22:08:34 <oklopol> *that
22:09:51 <oerjan> um, potted plant = plant living in a pot. i guess your parents living there increases the chances of them surviving.
22:10:21 <oklopol> yeah, they'd also bought me food.
22:11:03 <oklopol> so... plants are safe
22:22:57 <oklopol> oerjan: i also got that joke btw, i'll promise to laugh at your next joke so you don't have to explain it :)
22:23:05 <oklopol> i mean, got it when you said it
22:23:06 <oklopol> not now
22:23:10 <oklopol> that's be a bit slow
22:23:14 <oklopol> *that'd
22:25:34 <oklopol> does scheme have monads?
22:25:42 <oklopol> they say it has everything.
22:26:01 <xor> not built in
22:28:57 <oerjan> there have been made monad libraries for scheme, is my understanding
22:30:42 <oerjan> there is a theorem that says if you have continuations and mutable variables, then you can do everything monads can do in ordinary syntax
22:31:11 <oerjan> and scheme does have those
22:31:54 <oerjan> although you don't get the haskell type tricks that go with them, i guess
22:32:07 <xor> monads are ugly
22:34:11 <lament> oerjan: by "ordinary syntax" you mean, instead of bind you use actual semicolons?
22:34:46 <oerjan> and let
22:35:10 <oerjan> afaiu
22:35:36 <lament> xor: i agree they're ugly
22:35:53 <lament> the entire area is still being developed
22:36:12 <lament> the ugliness is probably temporary
22:36:51 <xor> the solution is mutable variables
22:37:41 <lament> is that what clean does?
22:37:47 <lament> oh
22:37:55 <lament> you mean what C does? :)
22:38:22 <xor> what scheme does
22:38:25 <oerjan> clean has uniqueness types
22:39:08 <oerjan> it does mutation when the types prove the original value is no longer used
22:39:36 <oerjan> (because the value had a unique reference, which was discarded)
22:40:38 <lament> oerjan: have you played with it? is it more convenient?
22:41:03 <lament> xor: then it's not a solution to the problem monads try to solve.
22:41:25 <xor> it was in the monad paper i read
22:43:13 <oerjan> nope, just read a bit
22:44:57 <lament> oerjan: i'm not at all convinced monads are the optimal... things get very hairy with transformers
23:31:44 -!- sebbu has quit ("@+").
23:45:25 <xor> >>> sch "foo"
23:45:26 <ololobot> None
23:45:42 <oklopol> hmm
23:45:49 <oklopol> i actually thought i had strings
23:45:53 <oklopol> guess i didn't.
23:46:59 <oklopol> hmm
23:47:04 <oerjan> there are no strings attached
23:47:10 <oklopol> >>> sch (define "o" 3) "o"
23:47:11 <ololobot> 3
23:47:19 <oklopol> oerjan: haha :P
23:47:26 <oklopol> (see? i get them)
23:47:31 <lament> >>> sch (define define define) define
23:47:32 <ololobot> define
23:47:41 <oklopol> heh
23:47:47 <oerjan> i was going to tell you if you didn't :)
23:47:49 <lament> >>> sch (define)
23:48:12 <oklopol> >>> (define define 5) define
23:48:23 <oklopol> oh
23:48:37 <lament> did i kill it
23:48:40 <oklopol> >>> sch 4
23:48:41 <ololobot> 4
23:48:43 <oklopol> no
23:49:13 <oklopol> but... hmm
23:49:21 <oklopol> why can't you redefine define...
23:50:01 <oklopol> hmm, macros are first class but the names aren't
23:50:02 <oklopol> err
23:50:05 <oklopol> or something like that
23:50:17 <oklopol> >>> sch define
23:50:18 <ololobot> define
23:50:46 <oklopol> you can't see the prefix now, but that's not a variable name with the primitive macro "define" in it, it's the actual macro
23:51:09 <oklopol> that's not good... guess i should do some massive refactoring
23:51:41 <oklopol> >>> sch (define + 5) +
23:51:42 <ololobot> 5
23:51:48 <oklopol> >>> sch (+ 6 7)
23:51:48 <ololobot> 13
23:52:31 <oklopol> i made it restore primitives eash run, because i like to ruin ppl's fun
23:56:03 <oklopol> >>> ((lambda (a) (eval (a b 6))) define) b
23:56:08 <oklopol> hmm
23:56:29 <oklopol> >>> ((lambda (a) (eval `(a b 6))) define) b
23:57:05 <oklopol> eh
23:58:05 <oklopol> darn, more stuff i gotta add to that
23:58:18 <oklopol> scheme has a lot more stuff than i imagined...
23:58:45 <oerjan> that minimalism thing is just a scam...
23:59:09 <oklopol> hmm... how do you use "define" inside a function?
23:59:21 <oklopol> i mean
23:59:29 <oklopol> do you have to use let... i don't remember
23:59:36 <oklopol> i don't have let either :<<<
23:59:46 <oklopol> soooooo many synonyms
←2007-08-26 2007-08-27 2007-08-28→ ↑2007 ↑all