00:04:39 -!- RodgerTheGreat has quit.
01:04:38 -!- crathman has joined.
01:12:14 <oerjan> if implicit currying means what i think it means
01:14:02 <oerjan> yep, haskell does that
01:15:44 <oerjan> as well as the reverse: (\x -> \y -> E) = \x y -> E
01:19:36 <oerjan> i thought you were reading up on haskell, or maybe that was the flour-product oriented guy
01:31:44 <oerjan> null and map can be redefined
01:32:01 <oerjan> import Prelude hiding (null, map)
01:32:16 <oerjan> if is a keyword however.
01:33:20 <oerjan> it's so that you can have then and else written out
01:35:01 <oerjan> but in principle it is just syntactic sugar for case a of True -> b; False -> c
01:37:00 <oerjan> A function cannot return a function of the same type
01:37:08 <oerjan> that would trigger such a thing
01:37:29 <oerjan> are you trying to do combinators?
01:38:06 <bsmntbombdood> i did map f l = (null l) nil (cons (f (car l)) (map f (cdr l)))
01:41:48 <oerjan> well if that should work then you would have to use combinatory booleans for (null l)
01:43:41 <oerjan> perhaps the list is the problem.
01:43:50 <oerjan> what is cons defined as?
01:44:40 <oerjan> thought so. cons x y cannot then have the same type as y.
01:45:12 <oerjan> without such an occurs check error, because the type becomes recursive
01:45:39 <oerjan> you can do it with ocaml if you use the -t command line option
01:45:52 <oerjan> i did it for an Unlambda "compiler" once
01:46:23 <oerjan> not without an option to turn of the occurs check
01:46:43 <oerjan> i don't remember if there is such an option
01:46:54 <oerjan> are you using ghc or hugs?
01:47:05 -!- flapjack has joined.
01:47:36 <oerjan> of course for portability you can wrap it in a datatype Fun = Fun -> Fun
01:47:57 <oerjan> data Fun = Fun (Fun -> Fun)
01:48:52 <oerjan> the occurs check only triggers if the type recursion is not inside a datatype definition
01:48:53 -!- calamari has joined.
01:49:55 <oerjan> but of course if your point is to use a language where there is no syntactic noise with combinators, that doesn't work
01:50:15 -!- ShadowHntr has quit (Client Quit).
01:50:34 <oerjan> let me check the ghc webpage
01:54:36 -!- voodooattack has joined.
01:55:45 -!- flapjack has left (?).
01:57:22 <oerjan> alas, i cannot find a ghc option to turn it off
01:59:41 <oerjan> and ocaml won't work if you depend on lazyness
02:03:57 -!- crathman has quit ("Chatzilla 0.9.77 [Firefox 2.0.0.1/2006120418]").
02:04:19 -!- anonfunc has quit.
02:06:23 <oerjan> the best i can think of with haskell is to start with data Fun = Fun { fun :: Fun -> Fun } and define an application operator from that
02:07:31 <oerjan> darn, that would certainly ruin the implicit currying
02:34:30 <oerjan> i should say that someone somewhere must have written a minimal lambda calculus evaluator in the haskell style already. hm...
02:34:41 <oerjan> perhaps there is one in LambdaBot.
02:43:06 -!- Sgeo has joined.
02:51:28 <oerjan> Sheesh. It says on the webpage that Lambdabot has a lambda calculus but I cannot find the command...
02:55:22 <oerjan> hey, try this page: http://www.dina.dk/~sestoft/lamreduce/index.html
03:07:52 -!- anonfunc has joined.
03:12:31 <oerjan> you don't have to use it you know :)
03:27:22 -!- crathman has joined.
03:37:31 -!- bsmntbombdood has changed nick to irt3h1337.
03:38:10 -!- irt3h1337 has changed nick to bsmntbombdood.
03:40:23 <oerjan> it's really quite absurd that i understand what 1337 means :)
03:42:44 <oerjan> of course it pales compared with the fact that i am on this channel :)
03:43:38 <oerjan> and that i am trying to write a malbolge dialect.
03:44:15 <bsmntbombdood> not a whole lot of esotericallity goes on in this channel
03:46:25 <oerjan> you mean we need to find a medium and have a sance?
03:47:15 <oerjan> or study old alchemist books
03:47:58 <oerjan> to be esoteric of course
03:48:15 <bsmntbombdood> ponder weak and weary over many a quaint and curious volume of forgotten lore
04:07:37 -!- anonfunc_ has joined.
04:07:41 -!- Sgeo has quit (Remote closed the connection).
04:07:41 -!- crathman has quit ("Chatzilla 0.9.77 [Firefox 2.0.0.1/2006120418]").
04:20:34 -!- anonfunc has quit (Read error: 110 (Connection timed out)).
04:25:33 <bsmntbombdood> silly rabbit, numbers in hardware are for C programmers!
04:41:27 -!- oerjan has quit ("Good night").
04:41:37 -!- anonfunc_ has changed nick to anonfunc.
05:08:10 -!- calamari has quit ("Leaving").
05:36:51 -!- flagitious has quit ("Leaving").
06:06:39 -!- ShadowHntr has joined.
06:35:17 <lament> this channel is not esoteric enough.
06:35:34 <lament> to fix that, from now on, English is officially forbidden.
06:36:03 <lament> You have five minutes for any last thoughts (in English).
06:36:07 <GregorR> channel.language = pseudocode?
06:36:27 <lament> anybody caught using English after that will be publicly humiliated.
06:37:34 <GregorR> humiliation.language = pseudocode; humiliation.effectiveness < EFFCTVNS_LOW
06:40:06 <lament> humiliation.tool = whip;
06:41:20 <lament> humiliate (x) = begin; x.remove(pants); humiliation.tool.apply(x.behind); end
06:45:42 <lament> nu, teper' nash kanal gorazdo bolee ezoterichen.
06:46:32 <lament> ni siquiera nosotros entendemos a nosotros mismos
06:47:51 <lament> nao, so pode falar os outros idiomas
07:13:49 -!- ShadowHntr has quit (Client Quit).
07:16:34 -!- helios24 has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:10:55 -!- Arrogant has joined.
08:32:49 -!- Arrogant has quit ("Leaving").
09:34:57 -!- voodooattack has quit.
12:32:13 -!- jix has joined.
14:06:05 -!- nazgjunk has joined.
14:33:53 -!- sekhmet has quit ("away").
14:37:50 <bsmntbombdood> (map (compose repair cut-with-knives) (channel-users))
14:41:15 -!- nazgjunk has quit ("Bi-la Kaifa").
14:54:31 -!- sekhmet has joined.
15:23:08 -!- sekhmet has quit ("meh").
15:23:35 -!- crathman has joined.
15:36:50 -!- sekhmet has joined.
15:48:52 -!- RodgerTheGreat has joined.
17:33:55 -!- anonfunc has quit.
17:45:27 -!- tgwizard has joined.
18:12:56 -!- puzzlet has quit (Read error: 110 (Connection timed out)).
18:21:31 -!- sebbu has joined.
18:23:43 -!- kxspxr has joined.
18:37:05 -!- oerjan has joined.
18:37:43 -!- digital_me has joined.
18:44:42 <oerjan> Language.English.status == Forbidden
18:45:12 <GregorR> oerjan.languages["pseudocode"].quality < LQUAL_MEDIUM
18:45:51 <oerjan> Language.Pseudocode.Base == "Haskell"
18:46:21 <GregorR> oerjan.ooTree.reasonable = false;
18:46:45 <GregorR> typeof(languages) == TYPE_AARRAY
18:46:51 <oerjan> unlambdaify(\x y.y) == K I == K (S K K)
18:48:07 <oerjan> Language.Haskell.ModuleTree /= ObjectOriented
18:49:50 <oerjan> Che cosa il sua problemo?
18:51:23 <oerjan> \x y.y == \x. \y.y == \x. I == K I
18:51:43 <GregorR> O, lenguas natural estan OK?
18:52:20 <oerjan> Natrlich, nur Englisch ist verboten.
18:52:52 <oerjan> Men ikke la det utarte, OK?
18:53:21 <GregorR> Pero, no hablo lenguas con exceptin del ingls :(
18:53:50 <EgoBot> help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon
18:53:52 <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
18:54:31 -!- crathman has quit ("Chatzilla 0.9.77 [Firefox 2.0.0.1/2006120418]").
18:54:32 <oerjan> Pseudocode perfettamente buono.
18:55:53 <oerjan> "perfettamente" == Italian.AdverbialFormOf("perfetto")
18:56:31 <GregorR> italian["perfetto"].toEnglish();
18:56:45 <oerjan> "perfetto" = Oerjan.GuessItalianEquivalence("perfect")
18:57:23 <GregorR> Esto conversacin es muy largo X-P
18:58:16 <oerjan> [spanish[x].toEnglish()| x <- ["largo","lento"]
18:58:46 <GregorR> spanish["lento"].toEnglish() == "slow"
18:59:29 <oerjan> Protest.basedOn(existenceOf("Key Largo"))
19:05:38 <oerjan> \x y.x y == \x.\y.x y == \x.(S (K x)) I == S (S (K S) (S (K K) I)) (K I)
19:06:47 <oerjan> http://oerjan.nvg.org/esoteric/ulify2.scm
19:11:10 <oerjan> It's for unlambda, not pure combinator calculus however.
19:11:57 -!- kxspxr has quit.
19:15:52 -!- helios24 has quit (Read error: 60 (Operation timed out)).
19:16:28 <oerjan> because it is a system for calculating functions
19:28:46 <oerjan> ah yes, the KI = SK equation
19:31:01 <oerjan> it's not valid for unlambda though - it breaks with side effects
19:48:15 <oerjan> hm... SKSK = KK(SK) = K
19:49:06 <oerjan> and the expression given for K is more complicated
19:51:19 <oerjan> in fact all the others use the first one, so they are wrong too
19:57:05 <oerjan> however, *ii = K and *i*ii = S, so it can be easily fixed
20:01:14 <oerjan> i'll make a note about it on our wiki
20:10:34 <oerjan> because in (^x.xSK)SK, only the S should be beta substituted
20:35:12 <oklopol> can i see a brainfuck implementation with haskell?
20:35:36 <oerjan> there is one on Lambdabot
20:35:37 <oklopol> i just can't figure out how imperativeness is done effectively with a purely funxxxxional lang
20:35:48 <oklopol> but then again, it's proly easy
20:35:55 -!- helios24 has joined.
20:35:58 <oerjan> don't you know about monads?
20:36:12 <oklopol> i thought they might be the answer
20:36:29 <oerjan> although it's only I/O that really needs it for brainfuck
20:36:31 <oklopol> i'm one of the idiot who can't figure monads out
20:37:07 <oklopol> but, does the massive array have to be cloned on every step?
20:37:21 <oklopol> or do monads somehow handle it haxxorly?
20:37:52 <oklopol> i get leet-wannabe when i'm tired, sorry :)
20:37:58 <oerjan> no. you can use two linked lists, one for everything left of the current position and one for everything to the right.
20:38:35 <oerjan> because brainfuck is not really random access.
20:39:03 <oerjan> the brainfuck state can easily be done purely functionally.
20:39:57 <oklopol> that's exactly what i can't figure out, is there an implementation :P
20:40:32 <oklopol> you can make one in 5 min i'm sure
20:41:46 <oerjan> also haskell has a module called Data.Array.Diff that cheats in such a way that arrays can be changed efficiently without anyone noticing that it's not functional.
20:42:11 -!- helios24 has quit ("Leaving").
20:42:46 <oerjan> "When the // operator is applied to a diff array, its contents are physically updated in place. The old array silently changes its representation without changing the visible behavior: it stores a link to the new current array along with the difference to be applied to get the old contents."
20:42:56 <oklopol> also, brainfuck is what i always do when i begin learning a language, since it isn't as easy (or i can't do it in the usual way), i'd like to see it :D
20:47:49 <oerjan> good grief. the Lambdabot version is excessively complicated.
20:48:17 -!- helios24 has joined.
20:48:46 <oerjan> and mercilessly non-pure
20:49:10 <oklopol> would it take you long to make one? :P
20:49:24 <oklopol> (i'm not sure what you were talking about, though)
20:49:52 <oerjan> I'm talking about http://www.cse.unsw.edu.au/~dons/lambdabot/scripts/BF.hs
20:50:17 <oerjan> it shouldn't take too long since i already started writing one a while ago
20:51:25 <oerjan> but i'll try and see if there isn't a finished one somewhere
20:52:05 <oklopol> i wrote one in php in 15 min when i finally read the spec.... then debugged for 2 hours to find out my code was right but i had confused output and return values when writing test cases :P
20:54:05 <oklopol> i could become a professional brainfuck interpreter coder or something
20:54:14 <oklopol> i've written maybe 50 or smth :D
20:59:13 <oerjan> found one, it uses a real functional tape but mysteriously uses a tape for the program as well
20:59:39 <oerjan> http://www.joachim-breitner.de/blog/archives/161-Brainfuck-interpreter-in-Haskell.html
21:00:26 <oklopol> thanks, i'll try to read that
21:03:09 <oerjan> my own interpreter got buried under all the configuration options i wanted to include
21:03:10 -!- sebbu2 has joined.
21:04:40 <oerjan> although it does a more proper parsing of the brainfuck, so it doesn't have to search through the program for matching loops
21:05:15 <oklopol> i have one in c++ that does nice circular tree structures
21:05:35 <oklopol> like... a list and [] are in a sublist
21:07:15 <oklopol> i had this brainfuck quine, ran for 6 days on my old brainfuck interpreter, so i made a new one that used hashmaps or smth for the loops, ran for 8 hours i think, then made a good one, with as much non-algorithmic optimization i can think of, 6 hours
21:07:19 <oerjan> not circular, that would be if some of the sublists are equal to the list itself
21:07:33 <oklopol> then realized the quine did a [+]... and i was using ints :)
21:07:47 <oklopol> took it of and it ran in a microsecond or smth xD
21:08:20 <oerjan> yeah, even poorly implemented brainfuck is not _that_ inefficient :)
21:09:05 <oklopol> well, i though it migh've been an only mathematically proven quine or smth, didn't even look at it until caught a glimpse of [+] and burst into laughter :P
21:09:41 <oerjan> just be glad you didn't use bignums :)
21:10:23 <oklopol> well, i think i'd've closed the prog after a week :D
21:10:39 <oklopol> hmm... i think it didn't get till the end now that i come to think of it
21:11:14 <oklopol> sometimes i wonder how unpractical i can get, 30 hours of work over a brainfuck code i don't even look at :D
21:11:22 <oerjan> a bignum brainfuck implementation should be easy in Haskell though
21:11:42 <oklopol> yeah, well, in anything else than c++ actually
21:12:03 <oklopol> c++ doesn't have bignums in the standard package
21:12:42 <oklopol> java does, python does, vb does, that's pretty much all langs i know thoroughly :<
21:12:49 -!- helios24 has quit ("Leaving").
21:14:02 <oklopol> in c++ you'd have to dl boost, but i think it's easier to write something yourself than dl it :D
21:15:05 <oerjan> well, a good bignum implementation is not that trivial, especially huge multiplies
21:15:25 <oklopol> that's why i've never gotten one to work for all operators
21:15:36 <oklopol> or, never implemented all of them rather
21:15:51 <oklopol> i've done a few bignum classes in c++
21:16:28 <oklopol> i think i did multiplication with addition in the first one :P
21:17:02 -!- GregorR has changed nick to Gonee.
21:17:05 <oerjan> _just_ addition? not even shifts?
21:18:44 <oklopol> ^ with *, * with +, + with inc, inc with binary logic and you get the winning combination
21:19:03 <oklopol> i don't remember, i was a noob :P
21:19:28 -!- Gonee has changed nick to _D6Gregor1RFeZi.
21:20:14 <oerjan> gregor now consumes reality again.
21:21:03 <oerjan> and produces ... what? int-elligence, perhaps.
21:21:25 -!- sebbu has quit (Connection timed out).
21:21:26 -!- sebbu2 has changed nick to sebbu.
21:21:54 <oerjan> or was that the other way around.
21:23:17 -!- Sgeo has joined.
21:57:59 -!- jix has quit ("Bitte waehlen Sie eine Beerdigungnachricht").
22:19:38 <oklopol> what does const do in haskellllll
22:20:10 <oklopol> i COULD ask on #haskell of course...
22:21:30 <oerjan> not useless, it is quite useful in higher-order programs
22:22:08 <oklopol> isn't it rather a function that returns x with any arg?
22:22:41 <oerjan> const x is such a function yes.
22:24:36 <oerjan> i don't know if the S combinator has a name in haskell though.
22:25:12 <oklopol> i have never played with lambda calculus
22:25:43 <oerjan> i was just reading this page: http://www.haskell.org/haskellwiki/Pointfree
22:26:12 <oerjan> some really weird examples there
22:27:15 <oklopol> point-free map fusion... :?
22:28:33 <oerjan> i suppose map fusion is an automatic optimization technique
22:28:46 <oklopol> mem' = any . (==) <<< i find even this pretty sick :\
22:28:52 <oerjan> to avoid making intermediate lists
22:29:39 <oerjan> well i wouldn't go that far either.
22:30:36 <oklopol> i've read a lot about functional langs but never written more than one liners on them... i should try doing something, everything might get clearer :O
22:31:14 <oerjan> it gets strange with pointless style when you use it to hide more than one argument, like with any.
22:32:05 <oklopol> yeah, pretty neat though :P
22:32:25 <oerjan> but as long as it chains just one argument through, it can in fact be clearer.
22:34:44 <oklopol> yeah, they are more abstract, the small ones are easier, the big ones pretty undecipherable :P
22:34:55 -!- nazgjunk has joined.
22:35:10 <oklopol> i can actually read the bf interpreter
22:36:28 <oklopol> set :: Tape a -> a -> Tape a
22:36:28 <oklopol> set t v = doOn t (const v)
22:37:35 <oklopol> it's quite simple now that i think about it
22:37:43 <oerjan> that is an example of the usefulness of const.
22:39:08 -!- _D6Gregor1RFeZi has changed nick to GregorR.
22:39:51 <oklopol> okay, i can't follow anymore xD
22:39:56 <oklopol> gotta continue my tutorial...
22:51:10 -!- nazgjunk has quit ("Bi-la Kaifa").
22:54:02 <oerjan> although we might check what happens with KS as well.
22:54:37 <oerjan> indeed those are equivalent.
22:55:54 <oerjan> because application is left associative
22:56:16 <bsmntbombdood> well, then \x.x(SK) would make for shorter programs then
22:57:18 <oerjan> no, because then the previous steps will break.
22:58:11 <oerjan> \x.(xS)K = S(SI(KS))(KK)
22:59:08 <oerjan> you just need three rules:
22:59:29 <oerjan> \x A B = S (\x A) (\x B)
22:59:56 <oerjan> \x C = K C when C does not contain x
23:02:26 <bsmntbombdood> so you get \x.xSK == (S (\x.x) (\x.S))(KK) == (SI(KS))(KK)
23:03:19 <oerjan> eh no. because \x.xSK is really \x.(xS)K
23:03:53 <oerjan> or, you are missing an S in there.
23:05:14 <oerjan> this is actually easier in unlambda notation.
23:06:26 <oerjan> just substitute ``s for each `, change the variable to i and put `k before everything else.
23:07:11 <oerjan> and remove the initial \x. (^x in the unlambdaify notation)
23:09:14 <oerjan> those rules are really what explains why combinatory logic uses S K I, also. :)
23:12:22 -!- sebbu has quit ("@+").
23:16:49 <oklopol> i was skiing the other day
23:19:12 <oerjan> that _could_ be hazardous in steep hills
23:19:48 <oklopol> yes, unless you are very good at either of them
23:23:29 <oerjan> actually my experience is that the better you get at math the more hazardous it becomes to do other things simultaneously.
23:25:13 <oerjan> because you get to the point where you are completely immersed in it.
23:25:15 <oklopol> i often have a hard time listening to ppl since i only hear the first few words and then whatever i was thinking about blocks all hearing again
23:26:14 <oklopol> same thing with reading a book, i get an idea, 20 minutes pass and someone asks me why i've been looking at the same page for 20 min
23:27:10 <oerjan> you should be prime professor material :)
23:27:46 <oklopol> often when someone asks me if i want to go somewhere sometime i have to answer i can't come because i wouln't remember to
23:27:59 <bsmntbombdood> academia is the only place for computer science :/
23:28:21 <oklopol> today i asked a teacher in advance what to do in case i forget a test... and forgot it as i'd predicted :)
23:29:01 <oklopol> bsmntbombdood what do you mean by that?
23:29:55 <oerjan> see, he already forgot ;-)
23:31:03 <oerjan> but seriously, don't you have something with an alarm/calendar system?
23:31:52 <oklopol> in high school teachers don't mind things happening half a year late
23:32:03 <oklopol> so i don't have a real urge :)
23:34:05 * oerjan does remember the last year norwegian projects in high school, when all the pupils in my class were so late the teacher just replaced it with a test instead.
23:35:29 <oerjan> there may have been a couple exceptions but i was not one of them.
23:36:45 <oklopol> i'm not the sort of guy who likes to hear about derivatives for 30 lessons and do 150 assignments when i've known them for 5 years
23:37:30 <oklopol> if there was just a test, i'd get the best grade prolly, with this system i have to beg for the worst grade to avoid the assignments
23:41:15 <bsmntbombdood> cept my math class now doesn't have required homework :)
23:42:00 <oklopol> well, i wouldn't mind assignments should they be challenging
23:42:40 <oklopol> i just can't do a lot of routineous assignments
23:51:49 <oklopol> well, a problem on the last page was to find the sides for a triangle for which it's area is the greatest possible
23:53:08 <oklopol> last page of the 300 page book
23:53:30 <oklopol> and they were in order of difficulty