←2007-01-29 2007-01-30 2007-01-31→ ↑2007 ↑all
00:00:00 <oerjan> I think you can do (define (curry f . x) (lambda rest (apply f
00:00:08 <oerjan> (append x rest))))
00:00:48 <bsmntbombdood> looks like you can
00:03:06 <bsmntbombdood> hmm
00:03:18 <bsmntbombdood> now that i think about it, that's more usefull than I though
00:03:37 <bsmntbombdood> you can do (curry + 1) instead of (lambda (x) (+ x 1))
00:04:31 <oerjan> like Haskell sections
00:05:00 <oerjan> If you switch x and rest you get the other one
00:06:20 <bsmntbombdood> ...i don't know what those are
00:06:50 <oerjan> (+ x) 1 == 1+x and (x +) 1 == x+1
00:07:25 <bsmntbombdood> hmmm
00:08:23 <oerjan> Note: (- x) does not work because that is unary minus
00:09:29 <oerjan> All other operators can be used, as well as function names in ``
00:09:44 <bsmntbombdood> hmm, interesting
00:09:49 <bsmntbombdood> http://www.engr.uconn.edu/~jeffm/Papers/curry.html
00:09:51 <bsmntbombdood> see section 4
00:19:38 <ihope> SevenInchBread: delaying a function's execution is what "lambda:" is for.
00:19:56 <SevenInchBread> hmmm... then maybe I don't get currying.
00:20:19 <SevenInchBread> the function returns a function that expects the next argument, right?
00:20:33 <bsmntbombdood> yeah
00:23:06 <bsmntbombdood> the equivilant of that scheme in python:
00:23:12 <bsmntbombdood> def curry(fn, *args):
00:23:12 <bsmntbombdood> return lambda *x: apply(fn, args+x)
00:24:22 <bsmntbombdood> SevenInchBread: ^
00:38:21 <SevenInchBread> apply is deprecated :D
00:38:50 <SevenInchBread> return lambda *x: fn(*args + x)
00:39:26 <SevenInchBread> oh... I do that all the time.
00:39:30 <SevenInchBread> I thought currying was some big deal.
00:44:26 <bsmntbombdood> apply is depreciated??
00:44:57 <bsmntbombdood> that's pretty stupid
00:48:19 <SevenInchBread> same thing... it's just got its own syntax.
00:48:26 <SevenInchBread> I like it better myself.
00:48:45 <ihope> So what's this talk of removing lambda?
00:48:56 <SevenInchBread> Now you just append a * to a tuple place in the function call... and it basically does that.
00:49:11 <SevenInchBread> well... in Python lambdas aren't near as useful... and some people think it's hard to read.
00:49:19 <ihope> I see.
00:49:24 <SevenInchBread> I think they have their purpose, and shouldn't simply be removed because some people never use it.
00:49:43 <ihope> Aye.
00:49:53 <ihope> bsmnt_bot makes them useful. :-P
00:49:56 <bsmntbombdood> What would be the replacement
00:49:59 <bsmntbombdood> ihope: indeed
00:50:03 <SevenInchBread> Nothing
00:50:21 <ihope> S and K combinators.
00:50:35 <ihope> And uncurryment functions.
00:50:40 <bsmntbombdood> ihope: I can understand lambda. not S and K
00:50:45 <SevenInchBread> folks are under the impression that you should use def... which I don't believe to be entirely true.
00:50:57 <bsmntbombdood> :/
00:51:01 <SevenInchBread> you don't assign every value you evaluate to a variable... why should you assign every function to one?
00:51:40 * bsmntbombdood reads the wikipedia article on monads, and fails at understanding
00:51:54 <SevenInchBread> from one I understand... it's just a list of computations.
00:52:14 <ihope> bsmntbombdood: they say Wikipedia is not a tutorial.
00:52:58 <SevenInchBread> Whats information worth if you can't understand it without having previous knowledge of it?
00:53:27 <ihope> A monad is a type constructor. return puts something into a monad, >>= lets you use something that's already in a monad.
00:53:47 <bsmntbombdood> lol @ call-with-http-connection
00:54:01 <bsmntbombdood> call-with-decode-quoted-printable-output-port
00:54:01 <ihope> call-with-previous-continuation!
00:54:12 <bsmntbombdood> that's sooooo long
00:54:16 <SevenInchBread> ....Common Lisp has huge function names.
00:54:18 <ihope> Or even better, call-with-future-continuation
00:54:22 <ihope> ...Wait, are those real names?
00:55:43 <SevenInchBread> I've got a nifty idea for a smalltalk like language.
00:55:50 <SevenInchBread> with one-argument functions.
00:57:28 <bsmntbombdood> ihope: yep
00:57:34 <ihope> Implement a programming language based on first-order logic with dependent typing.
00:57:51 <ihope> And make it a good one, too.
00:57:53 <SevenInchBread> hmm... it basically extends the message-passing idea of objects to methods...
00:57:59 <SevenInchBread> what's dependent typing.
00:58:05 <ihope> Might as well have classes, too. Typeclasses, valueclasses...
00:58:10 <SevenInchBread> nope
00:58:12 <SevenInchBread> no classes.
00:58:21 <SevenInchBread> I like the whole prototype design. :D
00:58:24 <bsmntbombdood> (apropos "call")
00:58:24 <ihope> SevenInchBread: that's when the type of value a function returns depends on the value it takes.
00:58:27 <SevenInchBread> you just copy existing objects.
00:58:37 <ihope> Requires first-class types, naturally.
00:58:43 <SevenInchBread> oh...hmmm
00:58:44 <ihope> And base it all off Damas-Milner.
00:58:57 <ihope> Or Hindley-Milner, if you like that name better.
00:59:13 <SevenInchBread> heh, dynamic typing does that... not nicely, but it does it. :D
00:59:27 <SevenInchBread> you could just put it in the definition...
00:59:32 <SevenInchBread> Integer -> Blah
00:59:41 <SevenInchBread> Spaghetii -> String
01:00:10 <SevenInchBread> return values would just be converted to the type..
01:00:21 <SevenInchBread> and... have some consistent way to do type conversions.
01:00:44 <bsmntbombdood> S and K
01:00:50 <bsmntbombdood> I do not understand
01:02:11 <SevenInchBread> hmm... I've been reading up on so-called "role-oriented programming" sounds neat...
01:02:11 <SevenInchBread> I don't know anything specific, but I like the idea.
01:02:11 <bsmntbombdood> no makey sensy
01:02:30 <bsmntbombdood> SevenInchBread: bUZZUZZZWORD
01:02:47 <SevenInchBread> PROGRAMMING IS FILLED WITH BUZZWORDS FOOOL
01:03:12 <bsmntbombdood> "a version of the lambda calculus that omits the lambda operator."
01:03:23 <bsmntbombdood> that doesn't make any sense
01:04:24 <GregorR> The NULL language? :P
01:04:44 <bsmntbombdood> no, unlambda
01:05:03 <SevenInchBread> business-world programming makes me nauseas.
01:05:13 <bsmntbombdood> meet oo
01:05:20 <SevenInchBread> yup
01:05:28 <SevenInchBread> I like oo... in moderation.
01:06:24 <SevenInchBread> it's a good idea when you have like... actual objects.
01:07:03 * bsmntbombdood just wrote a rational class for python
01:07:32 <SevenInchBread> "pure oo" seems removed from the whole business lingo though... like Smalltal and Self.
01:07:38 <SevenInchBread> Smalltalk
01:10:07 <bsmntbombdood> ~exec self.__class__.register = lambda self, m, c: self.register_raw(r"\S+ PRIMVSG (P<chan>\S+) :~%s (P<msg>.*)" % m, c)
01:10:29 <ihope> bsmntbombdood: s = \xyz.xz(yz) and k = \xy.x
01:10:36 <ihope> All the lambda you'll ever need.
01:10:42 <bsmntbombdood> ihope: I know
01:10:58 <ihope> So what of it doesn't make sense?
01:11:09 <bsmntbombdood> how you can do stuff with that
01:11:43 <bsmntbombdood> ~exec self.register("cat", lambda x,y: bot.raw("PRIVMSG %s :%s" % (y.group("chan"), y.group("msg")))
01:11:55 <bsmntbombdood> ~exec self.register("cat", lambda x,y: bot.raw("PRIVMSG %s :%s" % (y.group("chan"), y.group("msg"))))
01:11:55 <ihope> bsmntbombdood: abstraction elimination.
01:11:59 <bsmntbombdood> ...
01:12:02 <bsmntbombdood> ~cat foo
01:12:10 <ihope> The Unlambda page says how it works.
01:12:15 <bsmntbombdood> ~exec self.print_callbacks()
01:12:31 <bsmntbombdood> hmmm
01:14:32 <bsmntbombdood> why didn't that work
01:14:38 <bsmntbombdood> ~cat
01:14:41 <bsmntbombdood> ~cat asdf
01:14:45 <bsmntbombdood> ~catasdf
01:15:10 <bsmntbombdood> ...
01:19:22 -!- ihope_ has joined.
01:19:48 -!- oerjan has quit (zelazny.freenode.net irc.freenode.net).
01:20:14 -!- oerjan has joined.
01:20:32 -!- oklofok has joined.
01:21:29 -!- oklopol has quit (Read error: 104 (Connection reset by peer)).
01:27:28 <oerjan> Basically you remove x from \xwhatever by prepending every application with S, every variable other than x by K, and replace each x by I=SKK.
01:28:40 <ihope_> Something like that, yeah.
01:28:58 <ihope_> SK = KI is surely the simplest identity in SKI calculus, besides the trivial ones, of course.
01:30:45 <oerjan> SK = KI is not quite true in Unlambda because of side effects. SK x y = K y (x y) = y except for side effects of (x y).
01:31:49 <oerjan> (and y is only evaluted once.)
01:32:28 <ihope_> Ugh, side effects.
01:32:32 <oerjan> However, K y never has a side effect, so SKK=KI works.
01:32:36 <ihope_> Give me my IO monad back.
01:32:40 <oerjan> *=I
01:32:48 <ihope_> I see.
01:33:10 <ihope_> Still, ugh, side effects.
01:34:04 <oerjan> But Unlambda's choice of side effects is so weird that it's part of its charm...
01:35:18 -!- ihope has quit (Read error: 110 (Connection timed out)).
01:36:09 <ihope_> I guess I could implement IO monads and make it a little less ugh.
01:36:16 <ihope_> Thunk monad, anyone?
01:38:21 <oerjan> My never-expanded Limonade idea was to add monads and type classes to make it _more_ ugh.
01:39:23 <oerjan> Basically so overloaded that it was hard to know what an expression meant, requiring careful consideration of what monad it was in.
01:40:18 <ihope_> Wonderful!
01:40:49 <oerjan> *Lemonade
01:43:30 -!- calamari has joined.
02:08:06 <bsmnt_bot> foo
02:08:12 <oerjan> those darn swedes
02:08:20 <oerjan> http://news.bbc.co.uk/2/hi/europe/6310915.stm
02:12:09 -!- ihope_ has quit (Read error: 60 (Operation timed out)).
02:32:47 -!- GregorR has quit (Read error: 110 (Connection timed out)).
02:35:37 -!- EgoBot has quit (Read error: 110 (Connection timed out)).
03:17:01 -!- puzzlet has joined.
03:47:28 -!- GregorR has joined.
04:50:59 -!- calamari has quit ("Leaving").
04:55:38 <bsmntbombdood> oh noes, no one is in my channel!
04:55:45 <bsmntbombdood> ##functional
05:11:33 -!- Sgeo has quit (Remote closed the connection).
05:36:13 -!- Arrogant has joined.
05:58:07 <lament> bsmntbombdood: that's HORRIBLE!
06:44:24 -!- oerjan has quit ("leaving").
07:58:14 -!- anonfunc has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:11:12 -!- anonfunc has quit.
10:11:12 -!- Arrogant has quit ("Leaving").
10:39:57 -!- MM2 has quit (Read error: 110 (Connection timed out)).
10:44:49 -!- SevenInchBread has quit (Read error: 145 (Connection timed out)).
10:54:56 -!- MM2 has joined.
12:21:13 -!- nazgjunk has joined.
12:40:55 -!- nazgjunk has quit (Read error: 104 (Connection reset by peer)).
12:41:26 -!- nazgjunk has joined.
12:53:55 -!- ais523 has joined.
12:54:04 <ais523> !help
12:55:46 <SimonRC> ?
12:55:49 * ais523 checks what happened to EgoBot
12:56:21 <ais523> It seems it quit at 02:31:18 (110:Connection timed out) and didn't join again
12:56:54 <SimonRC> I have noiced that #haskell-blah have a picture of their bot: http://trappist.elis.ugent.be/~kehoste/haskell-blah_lambdabotContest_results.html
12:57:02 <ais523> That's a shame, I was wondering about a BF problem that's been bothering me
12:57:04 <SimonRC> Just how I imagine it/her.
12:57:27 <SimonRC> Maybe we should have a picture of egobot...
12:57:51 <ais523> I'm not sure what it would look like. Maybe a Turing Machine?
12:58:32 <ais523> Anyway, the problem was to write an 8-bit BF program which outputted another BF program that was an infinite loop
12:58:50 <ais523> that's easy, but I was wondering how short you could get the first program
12:59:08 <ais523> You could write something that just output +[], but there's probably a shorter way that produces more output
13:03:24 <SimonRC> hmm
13:03:42 <SimonRC> Well the infinite-loop program must have a [ and a ] in it...
13:03:54 <SimonRC> and it must have a + or - in it
13:04:06 <SimonRC> so I don't see how you could change it much
13:04:18 <ais523> but making it longer might make it easier to generate
13:04:31 * ais523 gets out an ASCII code table
13:06:26 <ais523> -/13579;=?ACEGIKMOQSUWY[] is an infinite loop
13:06:40 <ais523> and probably easier to generate
13:10:09 <ais523> but assuming we don't want infinitely-long output, there has to be some way to stop it continuing along the same pattern
13:13:08 <SimonRC> how about: .+[+.+]?
13:13:10 <ais523> if we store 44 in a cell somehow, then the rest of the code can just be [+.+] (because -'s ASCII code is 45), and it will continue into the high reaches of ASCII before wrapping round to 0
13:13:54 <SimonRC> I don't think a load of control-codes at the beginning of a program usually hurt a bf interpreter.
13:14:18 <SimonRC> actually, make that: ++[+.+]
13:14:44 <ais523> but + has an ASCII code of 43, so if you do that you get +-[] with comments removed, which is a NOP
13:14:52 <SimonRC> feck
13:15:05 <SimonRC> what a PITA
13:15:09 * ais523 looks up 44 on the wiki's BF constant table
13:15:25 <ais523> My first attempt is ++[>+<------]>+[+.+]
13:15:30 <SimonRC> hmm
13:15:35 <ais523> 20 characters
13:16:07 <SimonRC> BTW ASCII is a 7-bit code. there are several 8-bit codes called "extended ascii", of which ISO-8859-1 is probably most commpn online.
13:16:11 * SimonRC goes to lunch
13:26:53 <ais523> +[+.+.++++.+] works (13 characters)
13:58:16 -!- ais523 has quit.
14:51:27 -!- nazgjunk has quit (Read error: 104 (Connection reset by peer)).
14:51:44 -!- nazgjunk has joined.
15:04:31 <bsmntbombdood> lament: horrible indeed
15:12:59 * SimonRC tries a quiz and gets most right: http://alvar.a-blast.org/plat_forms/
15:13:08 <SimonRC> Guess the language from the programming team!
15:15:09 <SimonRC> Gee I wonder what language team F are using? They are all "nice young men" in shirts, with well-cut hair and HP laptops.
15:15:56 * bsmntbombdood spanks java
15:16:09 <bsmntbombdood> How can people use that crap
15:43:23 * SimonRC is suprised at the word "negligible". Sure it should be "neglegible", from negle-ct
15:43:57 <bsmntbombdood> ...it's egnlish. what do you expect?
15:44:07 <bsmntbombdood> s/egnlish/english/
15:53:58 * SimonRC pr'p'uziz ' nyu speliq sist'm.
16:04:46 <oklofok> prpuziz
16:12:23 <bsmntbombdood> fo shizzle
16:18:51 * SimonRC sees a connection between China and Wales: dragons.
16:18:54 <SimonRC> hmm
17:34:06 <lament> dragons and dog-eating
17:37:54 <SimonRC> eh?
17:38:00 <SimonRC> thew Welsh eat dogs?
17:39:08 <lament> all the time
17:55:30 <SimonRC> :-S
17:55:37 <lament> they just can't stop
18:03:48 -!- sebbu has joined.
18:07:32 <SimonRC> say, guys, does this go "beep": 
18:07:38 <SimonRC> BB
18:07:40 <SimonRC> oops
18:07:42 <SimonRC>
18:07:45 <SimonRC> well?
18:07:50 <bsmntbombdood> no
18:07:54 <SimonRC> oh
18:12:37 <lament> no, it goes boop
19:24:01 -!- wooby has joined.
20:04:47 -!- sebbu2 has joined.
20:11:51 -!- sebbu has quit (Read error: 145 (Connection timed out)).
20:16:15 -!- sebbu2 has changed nick to sebbu.
20:29:55 -!- Arrogant has joined.
21:05:21 -!- Arrogant has quit ("Leaving").
21:25:43 <GregorR> Why geology is better than chemistry: In our rock identification lab, there's a column for "taste."
21:28:56 <GregorR> Some jerk voted down my wonderful Windows 1.0 slideshow :(
21:51:28 <SimonRC> ???
22:10:20 <lament> GregorR: biology is even better
22:27:07 -!- ihope has joined.
22:33:26 -!- sebbu2 has joined.
22:52:35 -!- sebbu has quit (Connection timed out).
23:13:19 <bsmntbombdood> zomg he said side effects
23:15:15 <ihope> Lol, side effects.
23:15:17 <ihope> Wait, what?
23:34:49 -!- sebbu2 has quit ("@+").
23:45:53 -!- nazgjunk has quit ("rawr. And, also: Bi-la Kaifa").
←2007-01-29 2007-01-30 2007-01-31→ ↑2007 ↑all