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