←2007-02-13 2007-02-14 2007-02-15→ ↑2007 ↑all
00:04:39 -!- RodgerTheGreat has quit.
01:04:38 -!- crathman has joined.
01:07:33 <bsmntbombdood> I need a language that does implicit currying
01:11:03 * oerjan points at Haskell
01:11:09 * oerjan ducks
01:11:44 <oerjan> also Ocaml
01:11:44 <bsmntbombdood> haskell does?
01:12:14 <oerjan> if implicit currying means what i think it means
01:13:01 <bsmntbombdood> (xy.E)z ==> \y.E[x := z]
01:13:11 <bsmntbombdood> is what i mean by implicit currying
01:13:24 <bsmntbombdood> er
01:13:40 <bsmntbombdood> (\x y.E)z ==> \y.E[x := z]
01:14:02 <oerjan> yep, haskell does that
01:14:25 <bsmntbombdood> cool
01:15:44 <oerjan> as well as the reverse: (\x -> \y -> E) = \x y -> E
01:17:42 <bsmntbombdood> in x y z, is it (x y) z?
01:17:49 <oerjan> yep
01:18:04 <bsmntbombdood> k
01:19:36 <oerjan> i thought you were reading up on haskell, or maybe that was the flour-product oriented guy
01:20:48 <bsmntbombdood> I was
01:28:31 <bsmntbombdood> bah, haskell won't let me redefine if
01:31:22 <bsmntbombdood> or null, or map
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:02 <bsmntbombdood> shouldn't need to be in a lazy language
01:33:20 <oerjan> it's so that you can have then and else written out
01:34:20 <bsmntbombdood> hah, great error message
01:35:01 <oerjan> but in principle it is just syntactic sugar for case a of True -> b; False -> c
01:35:11 <oerjan> what message?
01:35:17 <bsmntbombdood> http://pastebin.ca/354583
01:36:15 <oerjan> Did you get that?
01:36:25 <bsmntbombdood> yeah
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:37:44 <bsmntbombdood> no
01:38:06 <bsmntbombdood> i did map f l = (null l) nil (cons (f (car l)) (map f (cdr l)))
01:38:58 <bsmntbombdood> In the first argument of `cdr', namely `l'
01:38:59 <bsmntbombdood> In the second argument of `map', namely `(cdr l)'
01:41:48 <oerjan> well if that should work then you would have to use combinatory booleans for (null l)
01:42:27 <bsmntbombdood> (null l) ==> \x y -> x or \x y -> y
01:42:40 <oerjan> exactly
01:43:33 <bsmntbombdood> So, how do i fix it?
01:43:41 <oerjan> perhaps the list is the problem.
01:43:50 <oerjan> what is cons defined as?
01:44:08 <bsmntbombdood> cons x y = \f -> f x y
01:44:40 <oerjan> thought so. cons x y cannot then have the same type as y.
01:45:02 <bsmntbombdood> bah
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:08 <bsmntbombdood> so there's no way to do this in haskell?
01:46:23 <oerjan> not without an option to turn of the occurs check
01:46:28 <oerjan> *off
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:12 <bsmntbombdood> ghc
01:47:36 <oerjan> of course for portability you can wrap it in a datatype Fun = Fun -> Fun
01:47:47 <oerjan> i mean:
01:47:57 <oerjan> data Fun = Fun (Fun -> Fun)
01:48:07 <bsmntbombdood> huh?
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:54:44 <bsmntbombdood> I should just write my own beta reducer
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:01:01 <bsmntbombdood> lame
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:20:32 <voodooattack> print "hi"
02:31:53 <bsmntbombdood> i kicked my power cable out :(
02:32:18 <oerjan> whoops
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:51:52 * bsmntbombdood goes back to beta reduction with pencil and paper
02:55:22 <oerjan> hey, try this page: http://www.dina.dk/~sestoft/lamreduce/index.html
03:03:04 <bsmntbombdood> oh nice
03:04:37 <bsmntbombdood> bah
03:04:44 <bsmntbombdood> they have stuff already bound :/
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:38:45 <oerjan> irt3h?
03:38:55 <bsmntbombdood> i r t3h 1337
03:39:01 <oerjan> ah.
03:39:05 <bsmntbombdood> joke in another channel
03:40:23 <oerjan> it's really quite absurd that i understand what 1337 means :)
03:41:17 <bsmntbombdood> that's absurd?
03:41:39 <bsmntbombdood> Sir, please recalibrate your absurd-o-meter
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:44:19 <bsmntbombdood> more just CS
03:46:25 <oerjan> you mean we need to find a medium and have a sance?
03:46:37 <bsmntbombdood> uh...what?
03:47:11 <bsmntbombdood> why would we want to communicate with the dead?
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:12 <lament> i agree
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:36:46 <lament> (in pseudocode)
06:37:34 <GregorR> humiliation.language = pseudocode; humiliation.effectiveness < EFFCTVNS_LOW
06:39:59 <lament> false
06:40:06 <lament> humiliation.tool = whip;
06:40:45 <voodooattack> libToilet->Flush()
06:41:20 <lament> humiliate (x) = begin; x.remove(pants); humiliation.tool.apply(x.behind); end
06:43:50 <voodooattack> lament.doLament(100);
06:44:34 <lament> attack(voodoo)
06:44:58 <voodooattack> ceaseAttack(voodoo);
06:45:23 <voodooattack> attack(lament, &wpnNuclearBomb);
06:45:42 <lament> nu, teper' nash kanal gorazdo bolee ezoterichen.
06:46:32 <lament> ni siquiera nosotros entendemos a nosotros mismos
06:46:49 <voodooattack> speakko englaisso? :P
06:47:51 <lament> nao, so pode falar os outros idiomas
06:50:06 <voodooattack> xD
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:13 <bsmntbombdood> gwaq trono el trope y loq
14:33:53 -!- sekhmet has quit ("away").
14:34:03 <bsmntbombdood> wern et we poneq ba nog
14:35:20 <bsmntbombdood> (map cut-with-knives (channel-users))
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:04:21 <oklopol> vi kane sake a zx3
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:43:49 <bsmntbombdood> what's \x y.y with S and K?
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:45:58 <bsmntbombdood> channel.send(oerjan.compute(T[\x y.y]))
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:47:17 <bsmntbombdood> oooo
18:48:07 <oerjan> Language.Haskell.ModuleTree /= ObjectOriented
18:49:03 <bsmntbombdood> no me understando
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:47 <bsmntbombdood> !help
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:07 <GregorR> EgoBot es exento :P
18:54:31 -!- crathman has quit ("Chatzilla 0.9.77 [Firefox 2.0.0.1/2006120418]").
18:54:32 <oerjan> Pseudocode perfettamente buono.
18:54:51 <bsmntbombdood> unlambdaify(\x y.x y)
18:54:52 <GregorR> Qu es "perfettamente"?
18:55:53 <oerjan> "perfettamente" == Italian.AdverbialFormOf("perfetto")
18:56:12 <GregorR> Y perfetto es?
18:56:31 <GregorR> italian["perfetto"].toEnglish();
18:56:45 <oerjan> "perfetto" = Oerjan.GuessItalianEquivalence("perfect")
18:56:59 <GregorR> Ah, s s.
18:57:23 <GregorR> Esto conversacin es muy largo X-P
18:57:45 <GregorR> Err, lento
18:58:16 <oerjan> [spanish[x].toEnglish()| x <- ["largo","lento"]
18:58:21 <oerjan> *]]
18:58:46 <GregorR> spanish["lento"].toEnglish() == "slow"
18:58:55 <GregorR> spanish["largo"] == NULL
18:59:04 <GregorR> (Maybe :P)
18:59:29 <oerjan> Protest.basedOn(existenceOf("Key Largo"))
19:05:37 <bsmntbombdood> channel.language = English
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:05:39 <bsmntbombdood> Ha!
19:06:47 <oerjan> http://oerjan.nvg.org/esoteric/ulify2.scm
19:07:19 <bsmntbombdood> fun
19:11:10 <oerjan> It's for unlambda, not pure combinator calculus however.
19:11:57 -!- kxspxr has quit.
19:15:36 <bsmntbombdood> why is it called calculus?
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:13 <bsmntbombdood> \x y.y == SK
19:28:24 <bsmntbombdood> ha! shorter
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:32:01 <bsmntbombdood> ha! side effects
19:32:10 <bsmntbombdood> oh come on
19:32:12 <bsmntbombdood> http://ling.ucsd.edu/~barker/Iota/
19:35:08 <oerjan> what about it?
19:37:58 <bsmntbombdood> crazy
19:39:54 <oerjan> ok
19:43:32 <bsmntbombdood> ummm
19:43:33 <bsmntbombdood> == (^x.xSK)(^x.xSK)
19:43:33 <bsmntbombdood> == (^x.xSK)SK
19:43:34 <bsmntbombdood> == SSKK
19:43:53 <bsmntbombdood> is that wrong or am i missing something?
19:45:12 <oerjan> i think you mean SKSK
19:45:54 <bsmntbombdood> that's what i thought
19:46:05 <bsmntbombdood> that's not what it says on that page
19:48:15 <oerjan> hm... SKSK = KK(SK) = K
19:48:19 <bsmntbombdood> right
19:48:31 <bsmntbombdood> so *ii isn't I
19:49:06 <oerjan> and the expression given for K is more complicated
19:50:15 <bsmntbombdood> weird
19:51:19 <oerjan> in fact all the others use the first one, so they are wrong too
19:53:13 <bsmntbombdood> yeah
19:57:05 <oerjan> however, *ii = K and *i*ii = S, so it can be easily fixed
19:57:43 <bsmntbombdood> heh, his are way too complicated
20:01:14 <oerjan> i'll make a note about it on our wiki
20:02:09 <bsmntbombdood> back to class
20:07:19 <oerjan> eh, wait
20:07:25 <oerjan> we are wrong
20:07:57 <oerjan> and the page is right
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:27 <oerjan> hm...
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:36:37 <oklopol> *idiots
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:40:33 <oklopol> :D
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:41:54 <oerjan> *purely 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:43:00 <oklopol> okay
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:21 <oklopol> (i don't know the term)
21:05:35 <oklopol> like... a list and [] are in a sublist
21:05:45 <oklopol> nesting
21:05:46 <oklopol> maybe
21:05:47 <oklopol> :D
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:41 <oerjan> heh :)
21:07:47 <oklopol> took it of and it ran in a microsecond or smth xD
21:07:49 <oklopol> *off
21:07:54 <oklopol> i mean, put chars there
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:07 <oerjan> i suppose
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:14:13 <oerjan> heh
21:14:27 <oklopol> at least more fun
21:15:05 <oerjan> well, a good bignum implementation is not that trivial, especially huge multiplies
21:15:11 <oklopol> true
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:18:51 <oklopol> :)
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:20:31 <_D6Gregor1RFeZi> It's what I do.
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:19:39 <oklopol> ?
22:20:10 <oklopol> i COULD ask on #haskell of course...
22:20:20 <oerjan> const = K
22:20:34 <oklopol> identity?
22:20:50 <oklopol> so... useless? :P
22:20:57 <oerjan> const x y = x
22:21:19 <oklopol> ohhhh
22:21:30 <oerjan> not useless, it is quite useful in higher-order programs
22:21:37 <oklopol> yeah, prolly
22:21:40 <oerjan> btw, id x = x
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:23:22 <oklopol> aaaaa so NOT id
22:23:35 <oklopol> const /= id
22:23:41 <oerjan> no, id is id. :)
22:23:49 <oerjan> identically :D
22:23:56 <oklopol> oh, so it seems :P
22:24:36 <oerjan> i don't know if the S combinator has a name in haskell though.
22:24:56 <oklopol> S did what now? :P
22:25:12 <oerjan> S x y z = x z (y z)
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:10 <oklopol> ah okay
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:30:37 <oklopol> :P
22:30:46 <oklopol> one-liners
22:31:14 <oerjan> it gets strange with pointless style when you use it to hide more than one argument, like with any.
22:31:37 <oerjan> in that mem'
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:32:31 <oerjan> in my opinion.
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:35:28 <oerjan> that's good. :)
22:35:37 <oklopol> slowly though
22:36:28 <oklopol> -- Sets the current value
22:36:28 <oklopol> set :: Tape a -> a -> Tape a
22:36:28 <oklopol> set t v = doOn t (const v)
22:36:35 <oklopol> this took me a while :D
22:37:08 <oerjan> aha.
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:37:58 <oklopol> indeed
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:51:21 <bsmntbombdood> oerjan: no
22:51:33 <bsmntbombdood> (\x.xKS)(\x.xKS)
22:51:51 <bsmntbombdood> hmm
22:51:52 <bsmntbombdood> maybe
22:53:07 <bsmntbombdood> (\x.((xK)S))(\x.((xK)S))
22:53:15 <oerjan> eh, the page has SK
22:53:22 <bsmntbombdood> er
22:53:24 <bsmntbombdood> right
22:54:00 <bsmntbombdood> \x.((xS)K)
22:54:02 <oerjan> although we might check what happens with KS as well.
22:54:37 <oerjan> indeed those are equivalent.
22:54:47 <bsmntbombdood> (((\x.xSK)S)K)
22:55:15 <bsmntbombdood> so it's SSKK?
22:55:24 <oerjan> yes, as the page says
22:55:26 <bsmntbombdood> so the page is right
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:14 <bsmntbombdood> And how to you unlamdify \x.xSK ?
22:57:18 <oerjan> no, because then the previous steps will break.
22:57:44 <bsmntbombdood> hmm
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:38 <oerjan> \x x = I
22:59:56 <oerjan> \x C = K C when C does not contain x
23:00:24 <oerjan> *\x = \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:04:20 <oerjan> the outermost one.
23:04:51 <bsmntbombdood> oh
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:06:59 <bsmntbombdood> hmmm
23:07:11 <oerjan> and remove the initial \x. (^x in the unlambdaify notation)
23:08:12 <bsmntbombdood> How did I not understand those rules before
23:08:16 * bsmntbombdood smacks head
23:09:14 <oerjan> those rules are really what explains why combinatory logic uses S K I, also. :)
23:10:09 <bsmntbombdood> wikipedia is no good for learning
23:12:22 -!- sebbu has quit ("@+").
23:14:58 <bsmntbombdood> yeah, S K I make a lot more sense now
23:16:49 <oklopol> i was skiing the other day
23:17:30 <bsmntbombdood> where you thinking about combinatory logic?
23:18:55 <oklopol> sure
23:19:00 <oklopol> always
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:20:16 <bsmntbombdood> I tried all math class to get (SI(KS))(KK)
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:23:56 <oklopol> well, true :P
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:25:34 <oerjan> heh
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:16 <oklopol> hehe prolly :P
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:49 <oklopol> *wouldn't
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:17 <bsmntbombdood> what's another job you can get doing cs
23:29:31 <oklopol> what's cs?
23:29:36 <bsmntbombdood> computer science
23:29:40 <oklopol> :P
23:29:55 <oerjan> see, he already forgot ;-)
23:30:02 <oklopol> i feel so clever xD
23:31:03 <oerjan> but seriously, don't you have something with an alarm/calendar system?
23:31:13 <oklopol> i should get one
23:31:24 <oklopol> maybe some day
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:34:23 <oerjan> essentially.
23:35:29 <oerjan> there may have been a couple exceptions but i was not one of them.
23:35:44 <oklopol> yeah, that would be ideal
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:38:27 <bsmntbombdood> yeah
23:40:24 <bsmntbombdood> i hate school
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:42:50 <oklopol> i just explode
23:49:07 <bsmntbombdood> it's like 20 problems the same
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
23:53:37 <oklopol> somewhat at least
←2007-02-13 2007-02-14 2007-02-15→ ↑2007 ↑all