←2011-06-12 2011-06-13 2011-06-14→ ↑2011 ↑all
00:00:05 <oerjan> elliott: use a rather than f if you want an Expr
00:00:08 <elliott> Sgeo: thats a question ive asked too
00:00:19 <elliott> oerjan: no, f has to be a function
00:00:23 <elliott> cant do a . a .
00:00:34 <elliott> CakeProphet: the mandelbrot set is defiend in terms of an infinite sequence, dude
00:00:41 <CakeProphet> yes I know.
00:00:55 <elliott> CakeProphet: indexed by complexes, which means we have _reals_ here
00:01:07 <elliott> the majority of which are uncomputable
00:01:24 <CakeProphet> oh?
00:01:24 <Sgeo> I wasn't even thinking in terms of that >.>
00:01:25 <elliott> so yes, Sgeo, there is no algorithmic way to determine all the points of the mandelbrot set
00:01:26 <CakeProphet> didn't know.
00:01:33 <elliott> given a specific pair of rationals, though, there may be an algorithm
00:01:37 <elliott> or even computable reals
00:01:40 <elliott> but it's not obvious
00:01:43 <Sgeo> Oh
00:01:45 <elliott> CakeProphet: um it's trivial to show
00:01:50 <CakeProphet> elliott: I'm sure it is.
00:01:53 <elliott> CakeProphet: there are a countable number of strings -> countable number of computer programs
00:01:57 <Sgeo> I was thinking for a specific pair
00:01:59 <elliott> all computable reals have a corresponding program, obviously
00:02:00 <Sgeo> >.>
00:02:03 <elliott> but the reals are uncountable
00:02:10 <elliott> uncountable > countable
00:02:16 <elliott> therefore Almost All(tm) reals are uncomputable
00:02:22 <elliott> in fact, Almost All reals are /undescribable/
00:02:31 <elliott> erm
00:02:33 <elliott> in fact, Almost All reals are /undefinable/
00:02:40 * CakeProphet doesn't spend his waking hours thinking about the Mandelbrot set and its obvious implications.
00:02:49 <elliott> um, this is totally unrelated to the mandelbrot set
00:02:53 <CakeProphet> ...it is now
00:02:54 <CakeProphet> but you type
00:02:55 <CakeProphet> about things
00:02:56 <CakeProphet> quickly.
00:03:00 <CakeProphet> and change subject.
00:03:04 <CakeProphet> and I am talking about something you said before.
00:03:05 <CakeProphet> which was.
00:03:14 <elliott> i note that Turing's paper introducing turing machines was about computable vs. non-computable numbers.
00:04:55 <oerjan> > compn (foldr1 (.) (repeat (1+)) 0 :: Expr) f a :: Expr
00:04:58 <lambdabot> *Exception: stack overflow
00:05:00 -!- fizzie has joined.
00:05:05 <oerjan> well it typed :P
00:05:15 <oerjan> > fix ((1+).) a
00:05:17 <lambdabot> *Exception: stack overflow
00:05:24 <oerjan> hm...
00:05:28 <CakeProphet> I wonder what would be required of strings to produce an uncountable number of them.
00:05:46 <oerjan> :t fix ((1+).) a
00:05:47 <lambdabot> forall t. (Num t) => t
00:05:49 <oerjan> aha
00:05:53 <oerjan> :t fix ((1+).) a :: Expr
00:05:54 <lambdabot> Expr
00:05:57 <oerjan> er
00:06:00 <oerjan> > fix ((1+).) a :: Expr
00:06:02 <lambdabot> 1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (...
00:06:07 <oerjan> ok _that_ worked
00:06:13 <CakeProphet> woooo
00:06:39 <elliott> oerjan: YAAAAAAAAAAAAAAAAAAAAAAAAAAAY
00:06:47 <elliott> > fix succ :: Expr
00:06:48 <lambdabot> succ (succ (succ (succ (succ (succ (succ (succ (succ (succ (succ (succ (suc...
00:06:55 <elliott> > fix (1+) :: Expr
00:06:56 <lambdabot> 1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (...
00:07:01 <elliott> SUPER KAWAII
00:07:15 <elliott> > fix (1/) :: Expr
00:07:15 <lambdabot> 1 / (1 / (1 / (1 / (1 / (1 / (1 / (1 / (1 / (1 / (1 / (1 / (1 / (1 / (1 / (...
00:07:28 <elliott> > fix ((1+) . (1-)) :: Expr
00:07:28 <oerjan> CakeProphet: infinite (but still countable) length noncomputable strings are uncountable
00:07:30 <lambdabot> 1 + (1 - (1 + (1 - (1 + (1 - (1 + (1 - (1 + (1 - (1 + (1 - (1 + (1 - (1 + (...
00:07:33 <elliott> oerjan: BOY HOWDY
00:07:36 <elliott> LOOK AT DAT INFINITE SUM
00:07:51 <CakeProphet> elliott: ostensible oscillations on that (1/), bro.
00:08:01 <oklofok> no offense but that sum doensn't converge
00:08:04 <elliott> CakeProphet: duh, thus the latter one
00:08:12 <elliott> oklofok: duh
00:08:18 <elliott> oklofok: wrong btw its = 1/2
00:08:30 <oklofok> yeah but that's only w.r.t. the weak topology
00:08:46 * elliott torlling mathematicians with zeta summes since 999
00:09:20 <oerjan> > foldr1 ($) (repeat (1+)) :: Expr
00:09:21 <lambdabot> Occurs check: cannot construct the infinite type: a = a -> b
00:09:25 <oerjan> eek
00:09:30 <elliott> > foldr1 (.) (map (*) [1..]) a :: Expr
00:09:32 <lambdabot> 1 * (2 * (3 * (4 * (5 * (6 * (7 * (8 * (9 * (10 * (11 * (12 * (13 * (14 * (...
00:09:39 <elliott> why didn't it simplify it to sqrt(2*pi)
00:09:40 <CakeProphet> you sly dog.
00:09:41 <oerjan> oh hm
00:09:43 <elliott> stupid lambdabot
00:10:11 <elliott> sad that oerjan isn't taking my trollbait
00:10:12 <CakeProphet> > foldr1 (.) (repeat (0*)) 4
00:10:13 <lambdabot> *Exception: stack overflow
00:10:17 <oerjan> > foldr ($) undefined (repeat (1+)) :: Expr
00:10:17 <lambdabot> 1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (...
00:10:28 <elliott> its very sad oerjan very sad
00:10:38 <CakeProphet> I really think multiplying infinite zeroes should magically halt
00:10:43 <oerjan> > foldr (.) undefined (repeat (1+)) undefined :: Expr
00:10:45 <lambdabot> 1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (...
00:10:48 <oerjan> uh
00:10:52 <oerjan> *huh
00:10:52 <elliott> oerjan> > foldr ($) undefined (repeat (1+)) :: Expr
00:10:52 <elliott> <lambdabot> 1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (...
00:10:55 <elliott> HUH DIDN'T SIMPLIFY TO -1/2
00:10:56 <Gregor> WOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
00:10:59 <elliott> I WONDER WHY?????????? LAMBDABOT IS DUM
00:11:00 <elliott> Gregor: beat java?
00:11:16 <Gregor> No, just got home from an amusement park :P
00:11:24 <elliott> EVEN BETTER
00:11:29 <elliott> I SAID IMPORTANT THINGS IN LOG
00:11:32 <elliott> OF PLOF
00:11:37 <CakeProphet> Gregor: Java doesn't just sit around while you play games.
00:11:41 <CakeProphet> it is growing more powerful.
00:11:56 <Gregor> elliott: E_DONTCARE
00:12:03 <elliott> Gregor: Um it involves your GC segfaulting.
00:12:08 <elliott> Gregor: or not even segfaulting
00:12:11 <elliott> Broken longjmp stuff
00:12:13 <elliott> on your very own testcase
00:12:18 <elliott> also builds of the testcases are broken on lps branch
00:12:22 <elliott> In conclusion looooooooooooooooooooooooooool@u
00:13:23 <oerjan> > foldr1 (.) (repeat (1+)) a
00:13:24 <lambdabot> 1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (...
00:13:43 <oerjan> CakeProphet: would you know, that mueval timeout before was just an accident
00:13:55 <CakeProphet> oerjan: somewhere at the end of that sequence is an a.... right?
00:13:57 <elliott> how low _is_ it, that's pretty trivial computation
00:14:02 <elliott> CakeProphet: O_O
00:14:11 <elliott> yes and at the end of 0.9 recurring theres an 0
00:14:19 <oerjan> CakeProphet: conversing with angels on the head of a pin
00:14:19 <CakeProphet> good
00:14:29 <CakeProphet> just making sure I understand these things.
00:14:34 <CakeProphet> about things at the end of infinite things.
00:15:09 <CakeProphet> elliott: so do you pronounce 0 as "oh"? That would explain the "an"
00:15:20 <CakeProphet> but I read it as "an zero", which was very awkward sounding.
00:15:47 <oerjan> an trax
00:15:52 <oerjan> *thrax
00:15:56 <elliott> yeah i say oh when its a digit
00:16:01 <elliott> except when typing it out
00:16:01 <elliott> huh
00:16:03 <elliott> or saying it
00:16:10 <elliott> so um i dunno
00:16:16 <elliott> "zero point nine recurring theres an oh"
00:16:17 <elliott> how i say that
00:16:39 <CakeProphet> your nomenclature is typechecking, I guess.
00:16:46 <elliott> what
00:17:02 <CakeProphet> 0.9 is a number, thus zero, but 0 is being referred to as a digit, thus oh
00:17:30 <elliott> hey ehird name the digits
00:17:33 <elliott> zero one two three ...
00:17:34 <elliott> nope
00:17:46 <CakeProphet> then you're just A FEEBLE INCONSISTENT HUMAN
00:17:54 <CakeProphet> puny mortal.
00:18:33 <elliott> 15:56:28: <Deewiant> (If you define the ordering relation on correctness correctly.)
00:18:48 <elliott> 15:57:38: <Deewiant> AMD64 I can understand, x86_64 I can't.
00:18:49 <elliott> 15:57:56: <Deewiant> Nor the banal x64.
00:18:53 <elliott> Deewiant: especially not in a dobela interp amirite
00:20:08 <Gregor> <elliott> also builds of the testcases are broken on lps branch // dude, there is only one test that's supposed to work AT ALL, and that one is ultra-beta-y, PLUS you're using it with a retardedly huge input value that's causing huge stacks.
00:20:13 <Gregor> So in short: Fuck you.
00:21:11 <elliott> Congratulations, that's the most hostile reaction to a "I ran this testcase which just hangs with a large value in the default branch but causes a massive libc error in the lps branch" bug report I've ever seen.
00:21:23 <elliott> BTW, it freezes even with half that value.
00:21:27 <elliott> Erm, crashes, I mean.
00:21:36 <elliott> Whereas I suspect it would run to completion slowly in the default branch.
00:22:06 <CakeProphet> so I was thinking an interesting non-deterministic could consist of two parts. One is a string of characters, and the other is a logical assertion. Certain facts are taken from the string (the number of a's, the number of b's, etc) and used to compile a list of instructions. When the program runs, these instructions are computed in a non-deterministic order, until the result satisfied the logical assertion (which will li
00:22:12 <CakeProphet> *non-deterministic language
00:25:41 <CakeProphet> the second part of the language may operate differently that what I just said, but the basic idea is that you have a series of instructions that are computed non-deterministically, with the end result having to satisfy a logical statement.
00:26:01 <CakeProphet> s/second/first/ seriously need to do some more self-editing. :P
00:33:43 <oerjan> :t runWriter
00:33:44 <lambdabot> forall w a. Writer w a -> (a, w)
00:34:31 <oerjan> > let loop = do {tell "whee! "; loop; return "ah!"} in runWriter loop
00:34:32 <lambdabot> ("ah!","whee! whee! whee! whee! whee! whee! whee! whee! whee! whee! whee! w...
00:34:40 * oerjan cackles evilly
00:34:53 <CakeProphet> hmmm, I wonder if the instruction set could be completely optional. So basically you just specify the conditions of your program and it non-deterministically runs programs until one matches.
00:35:25 <CakeProphet> that would take much longer, because of the infinite programs and all...
00:37:39 <oerjan> CakeProphet: "logical assertion (which will li"
00:37:50 <CakeProphet> (which will likely also have its own batshit language)
00:38:04 <oklofok> i saw a bat the other day
00:38:07 <CakeProphet> a very important part of the sentence.
00:38:29 <oerjan> all's well that ends well
00:39:47 <oerjan> <Sgeo> @tell oerjan Do you logread?
00:39:57 <oerjan> mind you sometimes it takes a while to get around to it
00:39:59 -!- elliott has quit (Read error: Connection reset by peer).
00:41:27 * oerjan is disappointed by the lack of reaction to the runWriter code
00:41:50 -!- elliott has joined.
00:42:42 <CakeProphet> yes I think instead of using some weird string statistics I will instead just make an esoteric machine-code language, that gets randomly shuffled until it runs and satisfied the given condition. Ah, but that means that either the program must always halt, or the logical assertion language cannot test the state of registers after execution.
00:42:58 <CakeProphet> the logical assertions can only be about the layout and nature of the program itself...
00:43:32 <oerjan> rice's theorem strikes again
00:43:35 <oklofok> "[03:41:20] * oerjan is disappointed by the lack of reaction to the runWriter code" <<< idgi
00:43:50 <oklofok> looks like it should be an infinite loppy
00:44:40 <oerjan> it's infinite in the middle, and yet _both_ ends produce part of the result
00:44:48 <elliott> hot
00:45:32 <oklofok> well sure, but.... does it really work like that :P
00:45:32 <oerjan> proving that the >>= of the Writer monad is in a sense strict in _neither_ its first nor its last argument
00:45:37 <oklofok> haskell i mean
00:45:41 <oklofok> that's just magic
00:45:55 <Gregor> http://www.facebook.com/photo.php?pid=32117951&l=953460d5fd&id=1055580469 <-- my day today
00:46:29 <oklofok> ah hmm
00:48:11 -!- foocraft has quit (Quit: if you're going....to san. fran. cisco!!!).
00:48:28 <oerjan> > runWriter $ do {tell "whee! "; undefined; return "ah!"} -- maybe this makes things clearer
00:48:29 <lambdabot> ("ah!","whee! *Exception: Prelude.undefined
00:49:07 <oklofok> can you implement those semantics for writer from within haskell?
00:49:24 <oerjan> yes, Writer is entirely written in haskell
00:49:27 <oklofok> hmm.
00:49:41 <oerjan> it's just about being lazy in the right spots
00:49:56 -!- elliott has quit (Remote host closed the connection).
00:50:00 -!- elliott_ has joined.
00:50:30 <oklofok> :t tell
00:50:31 <lambdabot> forall w (m :: * -> *). (MonadWriter w m) => w -> m ()
00:50:44 <oerjan> @src Writer tell
00:50:44 <lambdabot> Source not found. You speak an infinite deal of nothing
00:50:46 <elliott_> oerjan: whats the best monad
00:50:49 <oerjan> @src tell Writer
00:50:49 <lambdabot> Source not found. Just try something else.
00:50:55 <oerjan> bah
00:51:14 <oerjan> elliott_: reverse state? >:D
00:51:19 <elliott_> hey oerjan i wrote cofunctor
00:51:20 <elliott_> class Fuctor f where fap :: (f a -> f b) -> a -> b
00:51:33 <oklofok> fuctor hahaahasd
00:52:51 <elliott_> oh its actually cofmap :: (a -> b) -> acc b -> acc a :P
00:52:59 <elliott_> which is a really cool type.
00:53:00 <oklofok> Gregor: how do you differ from normal humans there? you seem to be the average of the two niggas
00:53:29 <elliott_> whats f upside town
00:53:32 <elliott_> t?
00:53:46 <oklofok> not really
00:53:50 <elliott_> ?src Functor (,)
00:53:50 <lambdabot> Source not found. I feel much better now.
00:54:09 <elliott_> hmm
00:54:12 <elliott_> is there really no instance??
00:54:19 <elliott_> > fmap succ (9,9)
00:54:20 <oklofok> the katakana for na in japanese maybe
00:54:20 <lambdabot> (9,10)
00:54:23 <elliott_> right
00:54:49 <oerjan> i think someone has gutted @src, and it always had holes
00:55:57 <oerjan> oklofok: tell for writer should just be tell msg = Writer ((), msg) i think
00:55:58 <elliott_> well tuples aren't cofunctors then
00:56:39 <oerjan> the adjoint functor to tuples is (e ->) iirc
00:57:01 <elliott_> oerjan: that would produce (a -> b) -> (c -> b) -> (c -> a)...
00:57:02 <elliott_> with cofunctors
00:57:35 <elliott_> ?hoogle [a] -> [a] -> [a]
00:57:35 <lambdabot> Prelude (++) :: [a] -> [a] -> [a]
00:57:35 <lambdabot> Data.List (++) :: [a] -> [a] -> [a]
00:57:36 <lambdabot> Data.List deleteFirstsBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
00:57:37 <oerjan> adjoints are still of the same variance though
00:57:37 <elliott_> grr
00:57:44 <elliott_> :t concat . zipWith (\a b -> [a,b])
00:57:45 <lambdabot> Couldn't match expected type `[[a]]'
00:57:45 <lambdabot> against inferred type `[b] -> [[b]]'
00:57:45 <lambdabot> Probable cause: `zipWith' is applied to too few arguments
00:57:49 <elliott_> so gross :(
00:57:50 <elliott_> ugh what
00:57:53 <elliott_> oh
00:58:51 <oerjan> elliott_: um what are you looking for
00:59:19 <oerjan> interleaving two lists?
00:59:42 <elliott_> yeah
01:00:28 <oerjan> :t curry $ sequence [fst, snd]
01:00:29 <lambdabot> forall b. b -> b -> [b]
01:01:08 <elliott_> http://sprunge.us/cSbW help this doesn't work :(
01:01:39 <oerjan> :t (concatMap (sequence [fst, snd]).) . zip
01:01:40 <lambdabot> forall b. [b] -> [b] -> [b]
01:02:21 <elliott_> :((((
01:04:35 <elliott_> newtype a :<- b = Flip (b -> a)
01:04:35 <elliott_> class Cofunctor cof where
01:04:35 <elliott_> cofmap :: (a -> b) -> cof b -> cof a
01:04:37 <elliott_> instance Cofunctor ((:<-) a) where
01:04:39 <elliott_> cofmap f (Flip g) = Flip (g . f)
01:04:41 <elliott_> there's an instance :P
01:04:43 <elliott_> TOO BE DETERMINED: USEFUL INSTACNE???
01:04:44 <oerjan> > scanl (flip (-)) 0 (repeat 1)
01:04:46 <elliott_> instant acne
01:04:46 <lambdabot> [0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,...
01:04:49 <oerjan> erp
01:05:09 <oerjan> > scanl (flip (-)) 0 [1..]
01:05:11 <lambdabot> [0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,...
01:05:23 <oerjan> what was it again...
01:06:00 <oerjan> or wait
01:06:51 <oerjan> > 0 : [1..] <**> [id, negate]
01:06:52 <lambdabot> [0,0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6,7,-7,8,-8,9,-9,10,-10,11,-11,12,-12,13,-...
01:07:06 <oerjan> > 0 : ([1..] <**> [id, negate])
01:07:07 <lambdabot> [0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6,7,-7,8,-8,9,-9,10,-10,11,-11,12,-12,13,-13...
01:07:48 <elliott_> Sgeo: btw hs upd
01:10:03 <oerjan> > scanl (flip (-)) 0 [-1..]
01:10:05 <lambdabot> [0,-1,1,0,2,1,3,2,4,3,5,4,6,5,7,6,8,7,9,8,10,9,11,10,12,11,13,12,14,13,15,1...
01:10:15 <oerjan> not quite
01:10:59 <elliott_> ?src Monoid
01:11:00 <lambdabot> class Monoid a where
01:11:00 <lambdabot> mempty :: a
01:11:00 <lambdabot> mappend :: a -> a -> a
01:11:00 <lambdabot> mconcat :: [a] -> a
01:11:01 <oerjan> > scanl (flip (-)) 0 [-1,-2..]
01:11:02 <lambdabot> [0,-1,-1,-2,-2,-3,-3,-4,-4,-5,-5,-6,-6,-7,-7,-8,-8,-9,-9,-10,-10,-11,-11,-1...
01:11:03 <elliott_> oerjan what's a comonoid
01:11:10 <oerjan> huh
01:11:23 <oerjan> must be something categorical
01:11:50 <elliott_> is that a pun oerjan
01:11:52 <oerjan> maybe a monoid in the opposite category
01:11:58 <elliott_> is that a pun oerjan
01:12:10 <elliott_> "Dually, a comonoid in a monoidal category C is a monoid in the dual category C[caret]op."
01:12:14 <oerjan> no, that is probably actually meaningful
01:12:19 <elliott_> oerjan what's a comonoid as a haskell typeclass
01:12:32 <elliott_> you got it right though :P
01:12:37 <elliott_> hm wait
01:12:40 <elliott_> doesn;t that involve the dual of Hask
01:12:43 <oerjan> i don't know about monoids in categories, other than monads
01:12:49 <elliott_> which is... not very expressable in haskell
01:12:52 <elliott_> erm
01:12:53 <elliott_> the opposite of Hask
01:13:00 <elliott_> you know, Hask[caret]op
01:13:30 <oerjan> no that's easy. a dual category has the same objects and arrows, just reverses which it considers domain and codomain
01:13:32 * pikhq_ has become convinced that build systems are not declarative enough.
01:14:12 <oerjan> so newtype (<~) a b = (<~) (b -> a)
01:14:22 <oerjan> er
01:14:29 <oerjan> i guess you need it to start with :
01:15:53 <oerjan> (-> e) is a functor from Hask to dual of Hask, i think
01:16:24 <oerjan> aka cofunctor from Hask to Hask
01:17:48 <elliott_> <oerjan> so newtype (<~) a b = (<~) (b -> a)
01:17:50 <elliott_> already wrote that
01:17:54 <elliott_> but note that <~ is not a valid type-operator.
01:17:59 <elliott_> afaik.
01:18:07 <oerjan> already wrote that :P
01:18:24 <elliott_> oerjan: ok well that is a shame since I already used that structure as a cofunctor
01:18:27 <elliott_> and the instance was predictably boring
01:18:35 <elliott_> oerjan: but i don't see how you can make that a monoid
01:18:40 <elliott_> erm, comonoid
01:18:42 <elliott_> unless functions are monoids, hmm
01:18:49 <elliott_> well (a -> a) is I guess
01:18:58 <elliott_> so (a -> a) is a comonoid too, lol
01:19:04 <elliott_> or wait what
01:19:10 <oerjan> well a monoid in a category is not the same as a monoid algebra, aka haskell Monoid
01:19:11 <elliott_> i still don't know what comonoids would look like
01:19:16 <elliott_> using <~ instead of -> in their signatures??
01:19:20 <elliott_> oerjan: right
01:19:27 <elliott_> does haskell even have the former?
01:19:48 <oerjan> and all i know is that Monads are supposedly monoids in categories
01:20:01 <oerjan> or wait
01:20:07 <oerjan> i'm not even sure of that
01:20:12 -!- Sgeo has quit (Ping timeout: 240 seconds).
01:20:24 <oerjan> there may be several different concepts there
01:21:27 <elliott_> hm I wonder what the <~ comonad looks like?
01:21:51 <elliott_> well hmm
01:22:19 <elliott_> duplicate :: (a <~ b) -> (a <~ (a <~ b))
01:22:28 <elliott_> duplicate :: (b -> a) -> ((b -> a) -> a)
01:22:33 <elliott_> heh
01:22:38 <elliott_> well that's not right.
01:23:00 <elliott_> extend :: ((c <~ b) -> b) -> (c <~ a) -> (c <~ b)
01:23:10 <elliott_> extend :: ((b -> c) -> b) -> (a -> c) -> (c -> b)
01:23:24 <elliott_> ok that is definitely _not_ an instance :D
01:23:26 <oerjan> i believe the Cont monad comes out of treating (-> e) as its own adjoint functor
01:23:29 <elliott_> wait
01:23:34 <elliott_> that's actually extendable functors
01:23:40 <elliott_> argh, edward kmett
01:23:44 <elliott_> put the comonad class first :(
01:23:52 <elliott_> ugh it's split in two
01:24:29 <CakeProphet> elliott_: yeah see I had no idea that spades slick was exiled from the dark kingdom of the trolls' instance of the game.
01:24:43 <CakeProphet> along with the rest of the midnight crew.
01:24:51 <elliott_> CakeProphet: that's actually _revealed_ in the recap, IIRC
01:25:11 <elliott_> CakeProphet: protip: if you see something you have _absolutely_ no recollection of in a recap
01:25:13 <elliott_> it's probably revealed there
01:25:16 <elliott_> hussie = total asshole
01:25:17 <elliott_> :D
01:26:05 <elliott_> oh wait
01:26:13 <elliott_> CakeProphet: it actually is, in the /intermission/: http://www.mspaintadventures.com/?s=6&p=003174
01:26:23 <elliott_> but it's not clear that that planet is the trolls' there, of course
01:26:36 -!- BeholdMyGlory has quit (Remote host closed the connection).
01:27:21 <elliott_> CakeProphet: so yeah, if that's the only thing that you didn't realise was happening in the recap, you're an A+ reader :P
01:27:55 <elliott_> although not understanding [S] Jack: Ascend. until it's elaborated upon is perfectly understandable. them flashes be dense.
01:31:46 <pikhq_> elliott_: Could I get your opinion on a hypothetical not-fucking-terrible way of specifying a build system?
01:32:04 <elliott_> pikhq_: define specifying
01:32:28 <pikhq_> elliott_: ... Here, I'll just link.
01:32:30 <pikhq_> http://sprunge.us/OcFX
01:33:13 <elliott_> pikhq_: needs more ai-make
01:33:34 <elliott_> srsly, this is a perfectly fine file format, but it should be generated :P
01:33:51 <pikhq_> True, rather a lot of it could be generated.
01:33:51 <elliott_> also is this tcl, the $:: kind of gives it away
01:34:15 <pikhq_> When I think "domain-specific language" my mind jumps to Tcl.
01:34:17 <elliott_> pikhq_: but yeah i mean its perfectly "fine" except for the specification of c++-sources which needs automating, its just that id rather write almost none of it
01:34:25 <elliott_> if ai-make spit this out id be perfectly happy
01:34:31 <elliott_> use-tools {c++ c++0x} {c c99}
01:34:35 <elliott_> pikhq_: unnecessary, it can infer this from the rules
01:34:38 <elliott_> (make them declarative)
01:34:46 <elliott_> s/c++-sources/c++ sources/
01:34:49 <elliott_> so you can also say e.g.
01:34:52 <elliott_> c++ flags ... or whatever
01:34:59 <elliott_> or even
01:35:04 <elliott_> c++ needs some-gcc-extension
01:35:21 <elliott_> pikhq_: link-with <-- do you need this? it seems like you could make an obvious default
01:35:34 <pikhq_> Probably not *need*, no.
01:35:43 <elliott_> s/use-tools windres \n windres-sources resource.rc/windres sources resource.rc/
01:35:46 <elliott_> like I said :P
01:35:56 <elliott_> cd ui-gameboy <-- gross, makes me think imperative
01:35:59 <elliott_> try in-directory or similar
01:36:12 <elliott_> pikhq_: i'll just do a partial rewrite :P
01:36:34 <elliott_> pikhq_: how does Tcl alias a function?
01:37:00 <pikhq_> elliott_: In what sense? As in, "create an alias for some other function"?
01:37:05 <elliott_> yeah
01:37:25 <elliott_> pikhq_: or actually
01:37:28 <elliott_> pikhq_: how do you override a function?
01:37:29 <elliott_> that is
01:37:31 <elliott_> define a new function with the same name
01:37:34 <elliott_> but keeping a ref to the old one
01:37:35 <elliott_> so you can call it
01:37:56 <pikhq_> rename foo bar
01:38:07 <pikhq_> This changes the name of proc "foo" to "bar".
01:38:15 <elliott_> so just rename it to something obscure? :p
01:38:27 <pikhq_> Or rename it to something in your own namespace.
01:39:03 <pikhq_> rename proc ::ohHolyGodIt'sReplacingProc::_proc
01:39:35 <elliott_> what does the install-extra block do?
01:39:41 <elliott_> specify that it should only be installed with some configurations?
01:40:10 <pikhq_> Just files that should be installed, but aren't obvious from the declaration of the program.
01:40:49 <elliott_> what is the abi-evrsion part of libsnes for?
01:40:51 <elliott_> version
01:40:58 <elliott_> shared library field of somekind?
01:41:00 <elliott_> some kind
01:41:19 <pikhq_> Shared library versioning.
01:41:39 <pikhq_> So, the name of the actual library, soname, etc.
01:41:57 <elliott_> if {$::uiplatform == windows} {
01:41:57 <elliott_> export define PHOENIX_WINDOWS
01:42:02 <elliott_> what does export mean
01:42:07 <elliott_> define it in everything using this module?
01:42:11 <pikhq_> Yeah.
01:43:12 <elliott_> what does convenience-module do?
01:43:24 <pikhq_> Uh, nix that.
01:43:25 <elliott_> and how does "depends modules" act differently to "use-modules"?
01:43:40 <pikhq_> And that should be use-modules.
01:45:14 <elliott_> with-args is very low-level...
01:45:28 <elliott_> what's the one/zero thing
01:45:29 <elliott_> second element
01:45:45 <elliott_> also you have "useplatform" where you mean "uiplatform"
01:45:45 <pikhq_> Default.
01:46:40 <pikhq_> So, the default arguments would be the same as "--with-bsnes --without-bgameboy --without-libsnes", and I didn't end up defining defaults on uiplatform or profile.
01:47:20 <elliott_> http://sprunge.us/Afjb
01:47:21 <elliott_> i made it suck less
01:47:35 <elliott_> # oh and you can also say "c++ needs some-library-name", or something like that
01:47:36 <elliott_> disregard this
01:47:40 <elliott_> i made it more concrete and used it later
01:48:31 <pikhq_> Nice work.
01:49:30 <pikhq_> Though the implementation might end up having to be more complex, what with that conflating both "-lfoo" and "pkg-config --libs foo".
01:49:34 <pikhq_> Feh, could be done, though.
01:49:52 <pikhq_> Check if there's a pkg-config file for "foo" and use that if so, otherwise use -lfoo.
01:49:56 <elliott_> pikhq_: Those should be conflated.
01:49:59 <elliott_> And it should be more than that.
01:50:03 <elliott_> Consider programs which have their own -configs.
01:50:06 <elliott_> Erm
01:50:07 <elliott_> Libraries
01:50:13 <elliott_> And those which are composed of multiple libraries, etc.
01:52:42 <pikhq_> So now it needs a heck of a lot of logic for handling libraries. Bleck.
01:53:05 <elliott_> so what
01:54:29 <pikhq_> Hmm. Trying to think of a sane bit of implementation logic. (that is, doing something *other* than having literally a seperate definition for every single library)
01:55:49 <pikhq_> Probably something like "If there's a file defining how to use library 'foo', use that, otherwise if there's a pkg-config file for 'foo', use that, otherwise use '-lfoo' and hope it works."?
01:56:20 <elliott_> it should be haskell not tcl imho hand
01:59:12 <pikhq_> Already, though, this looks a few multiples better than other build systems.
01:59:58 <elliott_> imo the file format can literally just be a show'd haskell data structure though because it's only useful with ai-make ;)
02:00:19 <pikhq_> You and your ai-make. :P
02:00:42 <elliott_> ya
02:18:08 -!- ralc has quit (Quit: Leaving).
02:33:21 <elliott_> hmm, one and a half hours to go
02:36:29 <oerjan> and then... BOOM
02:37:34 <monqy> boom
02:38:24 <elliott_> pretty much yes
02:53:50 -!- Sgeo has joined.
02:56:23 <elliott_> oh god ray24 came back
02:56:32 <elliott_> why didn't we re-scare them off
02:56:43 <elliott_> 03:53:18: <Gregor> And you decided to resolve this dilemma by asking for the appropriate reaction on a channel you've never been to? :P
02:56:49 <elliott_> oh they've been here
02:56:55 <elliott_> 03:56:32: <ray24> of my 18 years of life.. i've not once heard/seen/smell the fart of a girl
02:56:55 <elliott_> uh
02:57:01 <elliott_> wow this guy is incoherent
02:57:55 <elliott_> 04:33:00: <ray24> Program isn't a challenge. the only challenge is my motivation!
02:57:55 <elliott_> 04:33:18: <ray24> yo..
02:57:55 <elliott_> 04:33:26: <ray24> I came here I thought esoteric was hip hop
02:57:55 <elliott_> 04:33:30: <ray24> honestly.
02:58:00 <elliott_> this is the best
02:59:10 <elliott_> 04:59:12: <ray24> I cannot believe how much filler words they have in that book
02:59:10 <elliott_> 05:00:14: <ray24> maybe I just got a high IQ or something iono!
02:59:13 <elliott_> this is the literal best
02:59:15 <elliott_> Sgeo: btw hamsteak updated
02:59:31 <CakeProphet> elliott_: I lol'd furiously.
02:59:32 <Sgeo> ty
02:59:40 <elliott_> 05:10:05: <ray24> So a lisp represents inputs that you feed it
02:59:40 <elliott_> 05:10:22: <ray24> maybe a lisp could also interpret my algorithm
02:59:40 <elliott_> 05:10:27: <ray24> interesting
02:59:40 <elliott_> 05:11:01: <ray24> I wasn't a programmer 1 hour ago.. but I might be a programmer in the next 24 hours
02:59:43 <elliott_> anything is possible if you're an idiot
02:59:46 <elliott_> that's my life motto
03:00:01 <elliott_> 05:17:55: <ray24> I'll become a good programmer within a month
03:00:01 <elliott_> 05:17:57: <ray24> no problem,
03:00:01 <elliott_> 05:18:02: <ray24> Not even a challenge
03:00:01 <elliott_> 05:18:20: <ray24> Seems pretty easy so far
03:00:01 <elliott_> 05:19:45: <ray24> Brb I'm gonna hop the hence behind my yard and jump the cows
03:00:02 <elliott_> what
03:00:09 <elliott_> what is this even
03:00:15 <elliott_> is this guy high
03:00:36 <elliott_> 06:06:02: <ray24> are you a hacker?
03:00:36 <elliott_> 06:06:26: <ray24> break codes.. conduct illegal stuff
03:00:37 <elliott_> 06:06:36: <ray24> adding virus to mp3 files
03:00:39 <elliott_> 06:06:41: <ray24> corrupting sys files
03:00:42 <elliott_> ADDING VIRUS TO MP3 FILES
03:00:49 <CakeProphet> elliott_: see my comments below...
03:00:54 <elliott_> this is just amazing om
03:00:54 <elliott_> g
03:00:57 * oerjan is slightly annoyed by people using "isomorphism" to prove TC-ness of languages when the correspondence is not actually invertible
03:01:10 <elliott_> oerjan: it's one of them one-way ismorphisms
03:01:14 <elliott_> oerjan: change them all to "injection" :-P
03:02:14 <elliott_> 07:10:42: <Patashu> Is it possible to determine at compile time where overflows could potentially happen
03:02:15 <elliott_> 07:10:55: <Patashu> I know there's a C extension, Cyclone or something, that does it
03:02:15 <elliott_> 07:11:18: <pikhq_> Patashu: Halting problem.
03:02:17 <elliott_> pikhq_: _sigh_
03:02:20 <oerjan> ...it's not even that, necessarily
03:02:28 <CakeProphet> <ray24> So a lisp represents inputs that you feed it
03:02:34 <elliott_> oerjan: can u ban ppl who say halting problem in response to any static analysis task thx
03:02:38 <CakeProphet> elliott_: what does that even mean? can you tell me?
03:02:52 <elliott_> CakeProphet: i don't even know
03:03:01 <elliott_> 07:48:23: <Albibeno> smoke ganja?
03:03:01 <elliott_> totes
03:03:03 <oerjan> *what is this i don't even
03:03:15 <elliott_> brb, gotta compose a song it's urgent
03:04:50 <oerjan> arborealis reminds me a little of V
03:04:50 -!- elliott_ has quit (Read error: Connection reset by peer).
03:28:49 -!- myndzi has quit (Remote host closed the connection).
03:35:19 <CakeProphet> oh god act 5...
03:35:26 <CakeProphet> I DON'T WANT TO READ ABOUT TROLLS.
03:35:49 <CakeProphet> I was already tired of reading their chat logs.
03:36:33 <Sgeo> It might be easier once you start to get to know them?
03:42:27 <CakeProphet> all.. twelve?
03:42:27 -!- elliott has joined.
03:42:41 -!- myndzi has joined.
03:49:55 <Sgeo> Yes, there are 12
03:51:31 <elliott> song composed, universal balance restored
03:52:35 <monqy> wooho
03:52:36 <monqy> o
03:52:44 <monqy> is it a good song
03:52:56 <monqy> also wow ray24 is amazing
03:55:27 <elliott> monqy: its the best thing anyone has ever written
03:55:32 <elliott> also yeah, he's zepto
04:00:13 <Deewiant> 2011-03-01 04:53:07( elliott) 07:57:56 <Deewiant> Nor the banal x64.
04:00:13 <Deewiant> 2011-03-01 04:53:08( elliott) dobel
04:00:25 <CakeProphet> elliott: though, as pikhq_ and I discussed afterwards, placing a virus inside of an mp3 file is not out of the question.
04:00:34 <elliott> CakeProphet: Of course, but lol.
04:00:39 <CakeProphet> yes I know. :P
04:00:46 <elliott> Deewiant: dobanalx64
04:01:43 <elliott> Deewiant sure is writing a lot in response
04:02:05 <Deewiant> 8.3
04:02:21 <elliott> Deewiant: how long did it take you to type that
04:02:27 <Deewiant> ~1
04:02:43 <elliott> also, what sixty-four bit OSes are there with a 8.3 limitation?
04:02:51 <Deewiant> Beats me
04:02:53 <elliott> second question: that dobelx64 runs on?
04:03:00 <CakeProphet> elliott: http://en.wikipedia.org/wiki/File:Internet_superheroes.jpg the most important people on the internet.
04:03:19 <elliott> CakeProphet: nonsense, none of those look like famous bisexuals
04:04:03 -!- myndzi\ has joined.
04:04:48 -!- myndzi has quit (Ping timeout: 240 seconds).
04:04:50 <CakeProphet> elliott: also why doesn't Andrew Hussie have a Wikipedia article, but MSPA and Whistles do.
04:05:04 <CakeProphet> and all of the other self-sustained webcomic artists on this article do.
04:05:22 <elliott> because of racism
04:05:35 <CakeProphet> except Dave Stanworth from Snafu Comics, whatever the fuck that is.
04:43:07 -!- augur has quit (Remote host closed the connection).
04:45:20 -!- augur has joined.
05:19:53 -!- Lymee has quit (Ping timeout: 258 seconds).
05:30:28 -!- yiyus has quit (Ping timeout: 240 seconds).
05:31:53 -!- sebbu has quit (Read error: Connection reset by peer).
05:32:20 -!- sebbu has joined.
05:49:37 <CakeProphet> Hello?
05:50:30 <elliott> Goodbye?
05:50:30 -!- augur has quit (Remote host closed the connection).
05:50:46 <CakeProphet> I need to procrastinate writing something. Say something.
05:50:59 <elliott> sjdsd
05:57:36 * pikhq_ can has hacked together piece of shit build system, that definitely needs to be much smarter. Much much smarter.
05:57:42 <pikhq_> elliott: So, tell me. ai-make.
05:58:23 <elliott> pikhq_: does it use tup?
05:58:27 <elliott> your build system
05:58:46 <pikhq_> elliott: No, but only because what I have is more of a prototype than anything else.
05:58:55 <elliott> make it spit out tup :P
05:59:17 <pikhq_> I feel the only options are to make it output tup or to do my own beta build system.
05:59:40 <pikhq_> And tup has the advantage of it already working very well.
06:00:50 <pikhq_> tup has the disadvantage of triggering a bug in Debian's fuse, though.
06:00:59 <elliott> report it?
06:01:15 <pikhq_> I found out that it was a bug by finding the Debian bug report.
06:01:26 <elliott> I mean report it to tup
06:01:28 <elliott> for a workaround
06:01:30 <pikhq_> Aaah.
06:01:55 <pikhq_> It's breaking pretty much every unmount of a fuse filesystem, so...
06:03:21 <pikhq_> *facepalm*
06:03:38 <pikhq_> "use umount --fake to update /etc/mtab"
06:03:48 -!- Lymee has joined.
06:03:58 <pikhq_> Debian's umount doesn't do --fake.
06:05:13 <pikhq_> *Aaaah*.
06:05:41 <pikhq_> fuse should have a dependency on mount >= 2.19, but it doesn't.
06:05:45 <elliott> is that simon's yogscast noise
06:05:50 <elliott> AAAAH A UMOUNT KITTEN
06:06:12 <pikhq_> And guess what's not in Wheezy?
06:07:08 <CakeProphet> young wheezy as in like... lil' wayne?
06:07:08 <pikhq_> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628735
06:07:27 <CakeProphet> *weezy actually
06:07:33 <CakeProphet> and lil wayne, even.
06:07:41 <elliott> It's a Toy Story character, you uncultured fuck.
06:07:43 <pikhq_> CakeProphet: No, as in the character in Toy Story.
06:07:51 <elliott> `addquote <elliott> It's a Toy Story character, you uncultured fuck.
06:07:54 <elliott> yeah I just added my own line
06:07:55 <HackEgo> 455) <elliott> It's a Toy Story character, you uncultured fuck.
06:07:56 <elliott> deal w/ it
06:08:03 <pikhq_> Sorry, Toy Story *2*.
06:08:09 <CakeProphet> oh that's why I don't it.
06:08:16 <CakeProphet> because anything > 1 is SHIT.
06:08:26 <pikhq_> CakeProphet: Pixar defeats your notions of "bad sequels".
06:08:27 -!- Lymee has quit (Ping timeout: 276 seconds).
06:08:28 <elliott> what
06:08:33 <elliott> have you even seen the toy story sequels
06:08:36 <CakeProphet> nope.
06:08:36 <elliott> they are the best
06:08:38 <CakeProphet> this is how I know.
06:08:41 -!- aloril has quit (Ping timeout: 250 seconds).
06:08:59 <pikhq_> 2 is better than 1, and 3 is better than 2. Any further questions?
06:09:07 <CakeProphet> I know because I haven't seen them. You can attempt a rebuttal but it will swiftly smitten by my immaculate logic.
06:09:13 <CakeProphet> *be swiftly
06:09:22 <pikhq_> That's theist logic right there.
06:09:36 <elliott> pikhq_: I was really pleasantly surprised by 3, I was afraid it was going to be a "LOL IT IS BACK AND THE INTERNET IS A THING NOW: LOOK AT THESE INTERNET REFERENCES: THE MOVIE"
06:09:37 <CakeProphet> I am such a good writer. I should start on this writing thing, that I am good at.
06:10:12 <CakeProphet> There will be no typos. Nope. I won't even bother proofreading it three times like I normally one. It's a waste of time because I never make mistakes when I type.
06:10:19 <CakeProphet> s/one/would/
06:10:44 <elliott> publish a book with s///s in
06:11:01 <pikhq_> elliott: Yeah, pretty surprising that they made it not merely good, but great. A freaking sequel to a sequel.
06:11:10 <pikhq_> Aaah, the power of giving a damn.
06:11:50 -!- Lymee has joined.
06:13:03 <CakeProphet> This unabashed Toy Story idolatry is deeply disturbing to me.
06:13:19 <CakeProphet> (as you can see, I am preparing myself for writing mode)
06:13:24 <elliott> Dammit you discovered my secret fake Toy Story fetish.
06:13:29 <pikhq_> CakeProphet: It's Pixar idolatry, actually.
06:13:43 <pikhq_> PIXAR HATH DONE NO WRONG
06:13:49 <elliott> pikhq_: excuse me they made cars
06:13:51 <elliott> and are making a sequel to cars
06:14:18 <pikhq_> elliott: Oh, right, Cars was pretty solidly meh.
06:14:31 <CakeProphet> oh they also got owned by Disney, which is wrong.
06:14:48 <elliott> What does that mean
06:14:55 <pikhq_> elliott: Disney bought them out.
06:15:02 <elliott> I mean what does "which is wrong" mean
06:15:13 <monqy> morally
06:15:14 <CakeProphet> elliott: it is a normative qualifier applied to the previous action.
06:15:21 <elliott> monqy: yes but how
06:15:28 <CakeProphet> in response to pikhq_ saying that PIXAR HATH DONE NO WRONG.
06:15:32 <pikhq_> CakeProphet: Disney has ceased their crimes against art.
06:15:39 <pikhq_> CakeProphet: Because Pixar hath taken over.
06:15:53 <monqy> elliott: crimes against art, apparently
06:15:58 <elliott> monqy: zepto
06:16:20 <CakeProphet> No, I refuse to defend my normative assertions with petty logic defenses. It is a waste of time
06:16:33 -!- Lymee has changed nick to Lymia.
06:16:34 -!- Lymia has quit (Changing host).
06:16:34 -!- Lymia has joined.
06:16:39 <CakeProphet> Disney is evil, which is self-evident.
06:16:40 -!- Lymia has changed nick to Lymee.
06:16:41 <elliott> ur a normative aspen
06:16:48 -!- Lymee has changed nick to Lymia.
06:17:17 <pikhq_> CakeProphet: Disney is primarily guilty of crimes against art. The artists have conquered Disney. Any further questions?
06:17:18 <elliott> I should sleep soon. I blame CakeProphet for keeping me awake.
06:17:56 <elliott> apex
06:17:58 <elliott> aplomb
06:18:00 <elliott> archaeostry
06:18:04 <elliott> vicious
06:18:05 <elliott> cobbley
06:18:12 <elliott> tartan
06:18:19 <Deewiant> aaavct
06:18:23 <elliott> Deewiant: vector
06:18:34 <elliott> amiably
06:18:39 <elliott> incandescent
06:18:48 <elliott> nock
06:18:54 <elliott> petulant
06:18:57 -!- FireFly has joined.
06:18:58 <elliott> orgiastic
06:19:02 <elliott> oppenheimer
06:19:04 <elliott> pastures
06:20:16 <CakeProphet> cockalorum
06:20:24 -!- aloril has joined.
06:20:31 <elliott> affluent
06:20:33 <elliott> acrid
06:20:35 <elliott> arsenic
06:20:39 <elliott> apiculture
06:20:41 <elliott> apeirj
06:20:44 -!- pikhq has joined.
06:22:03 <CakeProphet> legerdemain
06:22:05 <CakeProphet> lifeblood
06:22:17 <CakeProphet> ruse
06:22:23 <elliott> ferrofluid
06:22:23 <CakeProphet> chicanery
06:22:23 <elliott> vast
06:22:26 <elliott> cardigan
06:22:31 <CakeProphet> lol...
06:22:33 <elliott> syzygy
06:22:37 <elliott> darkening
06:22:53 <elliott> gantry
06:22:54 -!- pikhq_ has quit (Ping timeout: 246 seconds).
06:22:59 <elliott> quintuple
06:23:04 <elliott> archaeologist
06:23:07 <elliott> CakeProphet: words channel
06:23:19 <CakeProphet> lexicon
06:23:22 <CakeProphet> lackluser
06:23:32 <CakeProphet> ....GOD DAMNIT
06:23:35 <elliott> what
06:23:36 <CakeProphet> there is a word I am looking for
06:23:38 <CakeProphet> and I cannot think of it.
06:23:39 <elliott> heh
06:23:42 <elliott> what does it mean
06:23:46 <CakeProphet> uh... shit I don't even remember.
06:23:51 <elliott> lol
06:23:53 <CakeProphet> ah
06:23:54 <CakeProphet> vainglorious
06:23:57 <CakeProphet> there it is.
06:24:06 <CakeProphet> meaning is quite clear.
06:24:08 <Lymia> In Python, can you make a tuple containing itself?
06:24:11 <CakeProphet> yes.
06:24:18 <elliott> no
06:24:20 <elliott> tuples are immutable
06:24:22 <CakeProphet> Python is dynamically typed, values can go anywhere values can go.
06:24:25 <elliott> no
06:24:26 <CakeProphet> oh wait
06:24:26 <elliott> tuples are immutable
06:24:28 <CakeProphet> containing itself.
06:24:31 <elliott> hmm
06:24:31 <CakeProphet> nevermind...
06:24:33 <elliott> it might be possible
06:24:38 <CakeProphet> no it's not...
06:24:41 <Lymia> C modules?
06:25:03 <Deewiant> x = (x,) ?
06:25:08 <elliott> >>> x = [(),()]
06:25:08 <elliott> >>> x[0] = x
06:25:08 <elliott> >>> x.__class__ = tuple
06:25:09 <elliott> Traceback (most recent call last):
06:25:11 <elliott> File "<stdin>", line 1, in <module>
06:25:13 <elliott> TypeError: __class__ assignment: only for heap types
06:25:15 <elliott> so close :D
06:25:16 <Deewiant> Oh, this machine is just being slow
06:25:17 <elliott> Deewiant: nope
06:25:19 <elliott> Deewiant: x is unbound
06:25:21 <Deewiant> I thought it inflooped
06:25:25 <Deewiant> But it just took 5 seconds to error
06:25:44 <elliott> hmm
06:25:49 <elliott> you can always use ctypes to bind to the python api
06:26:23 <CakeProphet> >>> x = [1,2,3]
06:26:30 <CakeProphet> >>> x.append(x)
06:26:33 <elliott> int PyTuple_SetItem(PyObject *p, Py_ssize_t pos, PyObject *o)¶
06:26:33 <elliott> Insert a reference to object o at position pos of the tuple pointed to by p. Return 0 on success.
06:26:35 <CakeProphet> >>> x = tuple(x)
06:26:38 <CakeProphet> >>> print x
06:26:42 <CakeProphet> ...
06:26:49 <CakeProphet> yeah that won't work
06:26:56 <elliott> >>> tuple([(),[9]])
06:26:56 <elliott> ((), [9])
06:26:59 <elliott> it would just contain a reference to the x list
06:27:03 <CakeProphet> right
06:27:11 <elliott> OK so I need to bind to PyTuple_SetItem.
06:27:13 <CakeProphet> you'd have to like, map tuple recursively.
06:27:23 <CakeProphet> which wouldn't halt unless you make it a generator.
06:27:39 <pikhq> See, this is why Haskell > Python.
06:27:49 <CakeProphet> well duh.
06:28:38 <elliott> >>> py.PyTuple_SetItem(id(x), 0, id(x))
06:28:38 <elliott> Segmentation fault
06:28:58 <CakeProphet> Python is designed for programmers whose feeble minds are destroyed by any type of "unreadable" code or "difficult to follow" semantics.
06:29:19 <elliott> oh wait
06:29:22 <elliott> i'm fucking up the call somehow
06:29:46 <CakeProphet> >>> help(py.PyTuple_SetItem)
06:30:11 <CakeProphet> elliott: try that with a print
06:30:32 <elliott> aha i've got it
06:30:35 <elliott> CakeProphet: that wont work its a bound c api
06:30:36 <elliott> but ive got it
06:30:36 <pikhq> Strange, Python, like all imperative languages, has semantics that only make sense with years of immersion.
06:30:47 <CakeProphet> >>> print py.PyTuple_SetItem.__doc__
06:30:55 <elliott> IT'S AB OUND C API
06:30:57 <elliott> IT HAS NO DOCUMENTATION
06:31:05 <CakeProphet> elliott: THERE ARE LOTS OF THOSE THAT HAVE DOCUMENTATION FOOL.
06:31:08 -!- zzo38 has joined.
06:31:13 <elliott> CakeProphet: I LITERALLY LOADED IT WITH CTYPES
06:31:17 <elliott> it reads from the shared object
06:31:20 <elliott> which contains no documentation
06:31:22 <elliott> because it is a binary
06:31:25 <CakeProphet> oh, well, okay then.
06:31:58 <elliott> AttributeError: dlsym(0x7fff5fc43cc0, PyTuple_SET_ITEM): symbol not found
06:31:59 <elliott> gah
06:32:14 <CakeProphet> it would be crazy to give Perl currying
06:32:15 <elliott> ./tupleobject.h:#define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
06:32:16 <elliott> lovely
06:32:35 <CakeProphet> so basically accessing an element of @_ that wasn't provided causes the subroutine to return a curried form.
06:33:10 <lifthrasiir> so, what is the entire point of making a tuple an element of itself?
06:33:14 <CakeProphet> it would fuck up Perl's ability to omit parentheses on a lot of function calls.
06:33:18 <CakeProphet> lifthrasiir: absolutely none, really.
06:33:28 <Lymia> elliott, can you write that in Python with ctypes
06:33:38 <elliott> Lymia: what do you think im trying to do :p
06:33:44 <CakeProphet> pikhq: actually, now that I think about it, you can't do this in Haskell either can you?
06:33:52 <Lymia> So, wait.
06:34:04 <Lymia> In theory you can write something as powerful as a C module in Python, right?
06:34:09 <CakeProphet> (Int, (Int, (Int, ...)))
06:34:27 <CakeProphet> explain powerful.
06:34:38 <Patashu> is infinite memory python turing complete?
06:34:39 <pikhq> CakeProphet: Yeah, it fails in the type system, sure enough.
06:34:42 <lifthrasiir> CakeProphet, then why does pikhq think Haskell > Python for this thing? :p
06:35:18 <CakeProphet> dunno, ask him. :)
06:35:38 <CakeProphet> I think he was making that assertion in general though.
06:36:12 <pikhq> It was a general statement.
06:36:14 <elliott> Patashu: yes.
06:36:16 <elliott> it has bignums so yes.
06:36:19 <lifthrasiir> i think he got the wrong example. (obviously i don't challenge that Haskell > Python...)
06:37:11 <CakeProphet> >>> x = [1];x.extend(x);print x; #chaos ensues
06:37:54 <lifthrasiir> CakeProphet, that's [1, [...]]. Python's repr correctly handles recursive list.
06:38:03 <CakeProphet> and by chaos ensues I actually mean nothing interesting happens
06:38:04 <lifthrasiir> (but for recursive *objects*, no.)
06:38:06 <CakeProphet> because that's just [1,1]
06:38:21 <lifthrasiir> --wait, i read it append...
06:38:46 <elliott> aha, wait
06:39:21 <CakeProphet> I was trying to use my Haskll-writing brain in my Python-writing reality, thinking that x.extend(x) would attempt to construct an infinite list.
06:39:25 <CakeProphet> looool.
06:39:25 <CakeProphet> not how it works.
06:39:47 <elliott> argh god dammit
06:40:05 <CakeProphet> elliott: the problem here is that you're trying to use Python to do something silly.
06:40:08 <Patashu> python doesn't have laziness does it
06:40:13 <elliott> fuk u
06:40:17 <CakeProphet> it does, but not all the time no.
06:40:35 <CakeProphet> generators/iterators are lazy.
06:40:47 <CakeProphet> itertools.cycle([1,2,3]) works like cycle in Haskell.
06:41:02 <Patashu> I guess generators kind of count yeah
06:42:00 <CakeProphet> yes, that's definitely a form of laziness compared to most languages capacities for such things.
06:42:40 <elliott> gah this sucks
06:42:41 <elliott> oh well
06:42:58 <CakeProphet> elliott: yeah don't use Python, dude.
06:43:04 <elliott> good advice
06:43:09 <elliott> bet i couldn't do it in perl either
06:43:22 <CakeProphet> Perl doesn't even have that shit what are you talking about.
06:43:30 <CakeProphet> that's an undefined task in Perl.
06:43:38 <elliott> precisely
06:43:41 <elliott> couldn't even do it
06:43:49 <CakeProphet> doesn't need to because it's so awesome.
06:46:05 -!- Vorpal has joined.
06:46:41 <CakeProphet> sub list { [1,[2,[3,list]]] }
06:46:49 <CakeProphet> bam. something you would never ever want to use.
06:48:43 <CakeProphet> sub list { my $x=[1,[2,[3]]]; push @{$x->[1]->[1]}, $x; $x }
06:48:52 <CakeProphet> infinite linked list in Perl, but you would never ever want to use such a thing.
06:52:02 <pikhq> struct list {int car;struct list *cdr;} list = {0, &list};
06:52:18 <zzo38> I was once asked to correct a hard drive testing and wiping program to do a asynchronous SMART test on the drive. It was written in Python. There was some list of functions that returned process objects and then the main loop was checking which are done, checking success/failure, and yield.
06:52:29 <Vorpal> CakeProphet, isn't that just a circular linked list?
06:52:32 <Vorpal> which can be useful
06:52:35 <elliott> zzo38: cool story bro
06:53:08 <pikhq> Vorpal: True. It's a lot harder to pull off many of Haskell's more interesting linked lists.
06:53:12 <zzo38> This new one worked in a different way but I just made the new function "class" instead of "def". I don't know if this is the proper way that proper Python programmers would do it, but it worked.
06:53:16 <pikhq> Such as the entire Fibonacci sequence.
06:53:27 <Vorpal> pikhq, how does that one work
06:53:27 <zzo38> pikhq: O, now you can make it in C as well.
06:53:50 <pikhq> zzo38: It's *doable*, sure, just not easy.
06:53:52 <zzo38> I also would like to learn about it, how to make the Fibonacci sequence with that way.
06:54:23 <pikhq> !haskell let fibs = 0:1:zipWith(+)fibs(tail fibs) in fibs
06:54:36 <pikhq> IIRC
06:54:37 <Vorpal> hm...
06:54:53 <Vorpal> > let fibs = 0:1:zipWith(+)fibs(tail fibs) in fibs
06:54:54 <lambdabot> [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946...
06:54:58 <Deewiant> > fix ((0:) . scanl (+) 1)
06:55:00 <lambdabot> [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946...
06:55:08 <Vorpal> :t scanl
06:55:09 <lambdabot> forall a b. (a -> b -> a) -> a -> [b] -> [a]
06:55:16 <pikhq> Ah, right, lambdabot.
06:55:17 <Vorpal> what does scanl do?
06:55:27 <oerjan> > scanl (*) 1 [1..]
06:55:28 <lambdabot> [1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800...
06:55:39 <Vorpal> uh
06:55:42 <Vorpal> what
06:55:59 <oerjan> you don't recognize the sequence?
06:56:28 <Vorpal> 1*1 = 1, 1*2 = 2, 2*3 = 6? 6*4 = 24
06:56:29 <Vorpal> aha
06:56:38 <Deewiant> > map (foldl (*) 1 . enumFromTo 1) [1..]
06:56:39 <lambdabot> [1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,8...
06:57:23 <oerjan> Deewiant: that's going to be a bit slower
06:57:29 <Vorpal> oerjan, so scanl is something in between foldl and map?
06:57:35 <Deewiant> oerjan: Just demoing
06:57:44 <Deewiant> Vorpal: It's foldl but keeping intermediate results
06:57:44 <Vorpal> :t enumFromTo
06:57:45 <lambdabot> forall a. (Enum a) => a -> a -> [a]
06:57:49 <Deewiant> enumFromTo a b = [a..b]
06:57:50 <Vorpal> Deewiant, righ
06:57:52 <Vorpal> right*
06:57:57 <CakeProphet> zzo38: using a class as a fancy kind of function is done by "real Python programmers", for what it's worth
06:59:06 <Vorpal> "real Python programmers" <-- lol
06:59:41 <CakeProphet> a dashing bunch they are.
06:59:48 <pikhq> Funny, the only "real Python programmer" I know uses Python as an imperative functional language.
06:59:52 <pikhq> (he, ah, frightens me)
07:00:27 <oerjan> > nubBy(((>1).).mod)[2..]
07:00:31 <lambdabot> mueval-core: Time limit exceeded
07:00:42 <oerjan> > nubBy(((>1).).mod)[2..]
07:00:45 <lambdabot> mueval-core: Time limit exceeded
07:00:49 <CakeProphet> yes, if anything can be said about Python, it's gotten the whole "multi-paradigm" thing well done.
07:00:50 <oerjan> erm
07:00:59 <Deewiant> oerjan: You can't nub an infinite list
07:01:05 <oerjan> yes you can
07:01:08 <Vorpal> :t nubBy
07:01:08 <lambdabot> forall a. (a -> a -> Bool) -> [a] -> [a]
07:01:11 <Vorpal> whaaat?
07:01:20 <Deewiant> Oh, right, of course you can
07:01:22 <oerjan> > nubBy(((>1).).mod)[2..]
07:01:23 -!- augur has joined.
07:01:24 <zzo38> CakeProphet: OK. I was just wondering. As it happened, it did work. (The thing was that the program to start the test terminates immediately, and the drive itself performs the test. Later on you need to run it again to get the results (the man page says what the result codes mean). So I just made it "class" that keeps its own timing and then checks the result and tries to act like a process object)
07:01:25 <lambdabot> mueval-core: Time limit exceeded
07:01:31 <Vorpal> what does nubBy do?
07:01:35 <oerjan> :t nubBy(((>1).).mod)[2..]
07:01:35 <Vorpal> :t filter
07:01:36 <lambdabot> forall a. (Integral a) => [a]
07:01:36 <lambdabot> forall a. (a -> Bool) -> [a] -> [a]
07:01:38 <Vorpal> well
07:01:39 <Deewiant> > nub [2..]
07:01:40 <lambdabot> [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,2...
07:01:50 <Deewiant> > nubBy (==) [2..]
07:01:51 <lambdabot> [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,2...
07:01:54 <zzo38> pikhq: What is the programmer you know uses Python as imperative functional language?
07:02:01 <Vorpal> :t nub
07:02:02 <lambdabot> forall a. (Eq a) => [a] -> [a]
07:02:08 <oerjan> maybe i'm misrembering the code
07:02:14 <oerjan> oh duh
07:02:15 <Vorpal> Deewiant, I don't see any difference to just [2..] there
07:02:16 <pikhq> zzo38: Friend of mine who's not generally on #esoteric.
07:02:21 <oerjan> :t nubBy(((>1).).gcd)[2..]
07:02:22 <lambdabot> forall a. (Integral a) => [a]
07:02:23 <Vorpal> > [2..]
07:02:24 <lambdabot> [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,2...
07:02:24 <oerjan> > nubBy(((>1).).gcd)[2..]
07:02:26 <lambdabot> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101...
07:02:34 <Vorpal> > nub [1..]
07:02:35 <lambdabot> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28...
07:02:43 <Vorpal> yay it's the id function!
07:02:48 <oerjan> heh
07:02:54 <elliott> no
07:02:55 <zzo38> Does he frightens you?
07:02:58 <pikhq> oerjan: I think it's just not liking your list of prime numbers.
07:03:02 <Deewiant> > nubBy (((0==).) . mod) [2..]
07:03:03 <Vorpal> so what does nub do
07:03:04 <lambdabot> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101...
07:03:09 <pikhq> zzo38: His skill does.
07:03:19 <oerjan> > nub "no nub is not identity"
07:03:20 <lambdabot> "no ubistdey"
07:03:21 <zzo38> pikhq: In what way?
07:03:45 <Vorpal> oerjan, heh... Doesn't quite answer what it does still
07:03:55 <pikhq> zzo38: I'd say he has Gregor-like skillz.
07:04:02 <Vorpal> oerjan, oh unique elements?
07:04:06 <Deewiant> > nub (replicate 100 'x')
07:04:07 <Vorpal> > nub [1,2,1,3]
07:04:07 <lambdabot> "x"
07:04:08 <lambdabot> [1,2,3]
07:04:12 <Vorpal> > nub [1,1,1,1]
07:04:13 <lambdabot> [1]
07:04:23 <pikhq> So, yeah. Just very, very good at programming.
07:04:24 <Vorpal> looks like it discards dupes
07:04:35 <Vorpal> bbl
07:06:17 <CakeProphet> I need to work on being very, very good at programming.
07:06:20 <Patashu> yup that's what nub does
07:07:05 <Patashu> aah, and nubby uses a comparison other than identity
07:07:06 <Patashu> clever
07:07:19 <zzo38> CakeProphet: Yes probably you should. And I should learn too. And also everyone else that is programming.
07:07:55 <CakeProphet> I am taking steps by learning more languages. Perl is the most recent one. Very soon I will be fleshing out my regular expression language in Haskell.
07:08:00 <CakeProphet> which should give me more Haskell experience.
07:08:12 <Patashu> > nubBy (0== . mod .) [2..]
07:08:13 <oerjan> Patashu: it's a little abuse to use it with a non-equivalence relation
07:08:13 <lambdabot> <no location info>: parse error on input `.'
07:08:18 -!- Slereah has joined.
07:08:22 -!- monqy has quit (Quit: hello).
07:08:25 <Patashu> > nubBy (0== . . mod ) [2..]
07:08:25 <lambdabot> <no location info>: parse error on input `.'
07:08:26 <Deewiant> > nubBy (((0==).) . mod) [2..]
07:08:28 <lambdabot> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101...
07:08:36 <Patashu> yeah, I was trying to reconstruct it by hand
07:08:41 <Patashu> the .s and ()s are kind of hmmmm
07:08:53 <Deewiant> You need to bracket operator sections
07:09:01 <CakeProphet> multiple nearby .'s kind of scare me in Haskell
07:09:06 <CakeProphet> I have a hard time figuring out what is happening.
07:09:07 <Patashu> it slides it into the opening I guess?
07:09:16 <oerjan> > nubBy (\x y -> x `mod` y == 0) [2..]
07:09:17 <lambdabot> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101...
07:09:23 <Deewiant> ?unpl ((0==).).mod
07:09:23 <lambdabot> (\ e h -> 0 == (mod e h))
07:09:40 <Patashu> > nubBy (0== .( . (mod)) ) [2..]
07:09:41 <lambdabot> <no location info>: parse error on input `.'
07:09:53 <Patashu> opposite doesn't work?
07:09:59 <Deewiant> == and . are operators, you can't have them next to each other
07:10:05 <Patashu> > nubBy ((0==) .( . mod) ) [2..]
07:10:06 <lambdabot> Couldn't match expected type `a -> GHC.Bool.Bool'
07:10:06 <lambdabot> against inferred ...
07:10:12 <Deewiant> ?unpl (0==) . (.mod)
07:10:12 <lambdabot> (\ e -> 0 == \ h -> e (mod h))
07:10:18 <CakeProphet> Patashu: operator sections always need parens. 0== . is always a parse error.
07:10:19 <zzo38> It seems that Haskell can make a lot of functional list processing to make infinite lists with numbers and this stuff, from these examples. There seems many ways to make it.
07:10:19 -!- Slereah_ has quit (Ping timeout: 240 seconds).
07:10:55 <CakeProphet> yes Haskell is very good at infinite lists.
07:11:16 <Patashu> > nubBy (\x y -> x `gcd` y == 0) [2..]
07:11:17 <lambdabot> [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,2...
07:11:23 <Patashu> > nubBy (\x y -> x `gcd` y == 1) [2..]
07:11:24 <lambdabot> [2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,...
07:11:25 <CakeProphet> my Haskell bf interpreter uses an actual infinite tape.
07:11:31 <Lymia> Can you poke arbitrary values into memory and execute arbitrary addresses with Python's ctypes?
07:11:32 <pikhq> zzo38: Yeah, it comes pretty naturally with laziness.
07:11:33 <CakeProphet> as I'm sure most do.
07:11:39 <Patashu> > nubBy (\x y -> x `gcd` y == 2) [2..]
07:11:39 <lambdabot> [2,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,5...
07:11:43 <CakeProphet> Lymia: I doubt it.
07:12:10 <oerjan> Patashu: you want > 1 for gcd
07:12:27 -!- elliott has quit (Remote host closed the connection).
07:12:30 <Patashu> yeah
07:12:33 <Patashu> just mucking with it
07:12:38 <pikhq> zzo38: For another example, see Lazy K. Which represents input in a pure functional language using an infinite list.
07:13:06 <pikhq> You just pass it an infinite list, and output the resulting list.
07:13:30 <CakeProphet> Patashu: http://docs.python.org/release/2.5.2/lib/ctypes-pointers.html
07:14:14 <zzo38> Have you any worked with API of LLVM? In which programming languages? I would like to learn some things about it, and how to make something with it.
07:14:19 <oerjan> > iterate((<**>[show.length,take 1]).group.show)1
07:14:20 <lambdabot> No instance for (GHC.Num.Num [GHC.Base.String])
07:14:20 <lambdabot> arising from the literal...
07:14:33 <oerjan> > iterate(read.(<**>[show.length,take 1]).group.show)1
07:14:33 <lambdabot> Couldn't match expected type `GHC.Types.Char'
07:14:34 <lambdabot> against inferred type...
07:14:36 <oerjan> bah
07:14:55 <Patashu> > fix (\x:y:xs -> x+y) ([1]:1)
07:14:56 <lambdabot> <no location info>: parse error on input `:'
07:15:28 -!- Vorpal has quit (Ping timeout: 260 seconds).
07:15:36 <Patashu> > fix (\x:y:xs -> x+y) ([1]++1)
07:15:37 <lambdabot> <no location info>: parse error on input `:'
07:15:40 <Patashu> okay, other : then
07:15:50 * Patashu looks up lambdas
07:16:10 <Deewiant> > fix (\(x:y:xs) -> x+y) [1,1]
07:16:11 <lambdabot> Occurs check: cannot construct the infinite type: t = [t]
07:16:19 <CakeProphet> Patashu: need parens again
07:16:25 <CakeProphet> (x:y:xs)
07:16:27 <Patashu> aaah
07:16:34 <Patashu> ok I get why
07:16:48 <CakeProphet> > filter even [1..]
07:16:49 <lambdabot> [2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,...
07:16:49 <Patashu> > fix (\(x:y:xs) -> x+y) ([1..])
07:16:50 <lambdabot> Occurs check: cannot construct the infinite type: t = [t]
07:16:57 <Patashu> hmm
07:17:05 <Deewiant> ?ty fix
07:17:06 <lambdabot> forall a. (a -> a) -> a
07:17:09 <Deewiant> ?ty \(x:y:xs) -> x+y
07:17:10 <lambdabot> forall t. (Num t) => [t] -> t
07:17:26 <CakeProphet> > fix f ::Expr
07:17:26 <lambdabot> f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (...
07:17:31 <CakeProphet> Patashu: ^
07:17:40 <pikhq> *Aaaah*, fix.
07:17:46 <Patashu> okay
07:18:03 <pikhq> Everyone's favorite combinator.
07:18:49 <CakeProphet> > fix (1:)
07:18:49 <lambdabot> [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,...
07:19:27 <CakeProphet> > fix (a+) ::Expr
07:19:28 <lambdabot> a + (a + (a + (a + (a + (a + (a + (a + (a + (a + (a + (a + (a + (a + (a + (...
07:19:39 <Patashu> (\(x:y:xs) -> x+y:x:y:xs) maybe
07:19:48 <Patashu> > fix (\(x:y:xs) -> x+y:x:y:xs) ([1..])
07:19:49 <lambdabot> Couldn't match expected type `[t1] -> t'
07:19:49 <lambdabot> against inferred type `[t2]'
07:20:08 <Patashu> > fix (\(x:y:xs) -> x+y:x:y:xs) ([1]:1)
07:20:09 <lambdabot> Couldn't match expected type `[[t1]] -> t'
07:20:09 <lambdabot> against inferred type `[...
07:20:16 <Patashu> lol
07:20:22 <Lymia> Haskell really likes infinite lists...
07:20:30 <Patashu> yup
07:20:34 <Lymia> Haskell really likes infinite lists...*
07:20:41 <CakeProphet> No, just Haskell programmers...
07:20:46 <Lymia> I should go implement one in Python
07:20:49 -!- yiyus has joined.
07:21:21 <Deewiant> Patashu: fix takes one argument, not two
07:21:23 <oerjan> > map (sum . take 2) . iterate (drop 2) $ [1..]
07:21:25 <lambdabot> [3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,1...
07:21:35 <Patashu> so how do I give it a starting condition?
07:21:39 <CakeProphet> you don't.
07:21:42 <Deewiant> There is no starting condition
07:21:49 <Deewiant> > fix f :: Expr -- again
07:21:50 <lambdabot> f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (...
07:21:57 <CakeProphet> it recursively calls f
07:22:16 <CakeProphet> on, recursive calls of f
07:22:24 <Patashu> > [1]:1
07:22:24 <lambdabot> No instance for (GHC.Num.Num [[t]])
07:22:25 <lambdabot> arising from a use of `e_111' at <in...
07:22:29 <CakeProphet> wrong way
07:22:32 <Patashu> oh
07:22:34 <Patashu> > 1:[1]
07:22:35 <lambdabot> [1,1]
07:22:53 <Lymia> Haskell causes my brain to hurt.
07:22:56 <CakeProphet> > fix
07:22:57 <lambdabot> Overlapping instances for GHC.Show.Show ((a -> a) -> a)
07:22:57 <lambdabot> arising from a u...
07:22:58 <CakeProphet> er
07:22:58 <Lymia> I should use it more until it stops causing that.
07:23:05 <CakeProphet> > fix ("sup dawg" ++)
07:23:06 <lambdabot> "sup dawgsup dawgsup dawgsup dawgsup dawgsup dawgsup dawgsup dawgsup dawgsu...
07:23:29 <CakeProphet> with operator sections you can literally just imagine it as chaining together that bit of text infinitely.
07:23:32 <Deewiant> > fix (\ ~(x:y:xs) -> 1:1:x+y:x:y:xs)
07:23:33 <lambdabot> [1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,...
07:23:39 <Patashu> ~ ?
07:23:42 <pikhq> Lymia: It's kinda like lifting weights. It's going to make your brain sore, but that's just your brain getting better.
07:23:51 <Deewiant> Patashu: Lazy match, basically
07:23:58 <Lymia> > fix ("LOOK BEHIND YOU " ++)
07:24:00 <lambdabot> "LOOK BEHIND YOU LOOK BEHIND YOU LOOK BEHIND YOU LOOK BEHIND YOU LOOK BEHIN...
07:24:11 <Deewiant> > (\ ~(x:xs) -> 0) []
07:24:12 <lambdabot> 0
07:24:15 <Deewiant> > (\(x:xs) -> 0) []
07:24:16 <lambdabot> *Exception: <interactive>:3:1-12: Non-exhaustive patterns in lambda
07:24:25 <CakeProphet> > fix (s ++) :: Expr
07:24:26 <lambdabot> No instance for (Data.Monoid.Monoid SimpleReflect.Expr)
07:24:26 <lambdabot> arising from a u...
07:24:26 <Deewiant> > (\ ~(x:xs) -> x) []
07:24:27 <lambdabot> *Exception: <interactive>:3:1-14: Irrefutable pattern failed for pattern (x...
07:24:28 <CakeProphet> ....awww
07:25:02 <oerjan> > fix ([s] ++)
07:25:03 <lambdabot> [s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,...
07:25:20 <CakeProphet> Patashu: ~ is a lazy pattern. Meaning the pattern is not checked if it's not needing.
07:25:24 <CakeProphet> otherwise pattern matching is strict.
07:25:53 <pikhq> Patashu: Unlike a usual pattern match, it assumes the pattern match went through. So, it's perfectly lazy. However, if the pattern doesn't actually hold and you evaluate it, then you get _|_.
07:25:57 <CakeProphet> Patashu: in Deewiant's example the one without a lazy pattern errored because there was no pattern for [], even though the argument is never used.
07:26:08 <Patashu> what's like fix but lets you use an initial state/
07:26:16 <CakeProphet> iterate I think.
07:26:18 <CakeProphet> :t iterate
07:26:19 <lambdabot> forall a. (a -> a) -> a -> [a]
07:26:28 <Deewiant> > iterate (+1) 1
07:26:29 <lambdabot> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28...
07:26:33 <Patashu> > iterate (\(x:y:xs) -> x+y:x:y:xs) (1:1)
07:26:34 <lambdabot> No instance for (GHC.Num.Num [t])
07:26:34 <lambdabot> arising from a use of `e_111' at <inte...
07:26:40 <Lymia> Python lets you subclass array, right?
07:26:44 <CakeProphet> Patashu: right-hand argument of : is a list
07:26:46 <Patashu> > iterate (\(x:y:xs) -> x+y:x:y:xs) (1:[1])
07:26:47 <lambdabot> [[1,1],[2,1,1],[3,2,1,1],[5,3,2,1,1],[8,5,3,2,1,1],[13,8,5,3,2,1,1],[21,13,...
07:26:47 <Patashu> right
07:26:48 <Lymia> !python print "test"
07:26:50 <EgoBot> test
07:26:50 <Patashu> woah lol
07:26:52 <Patashu> that sort of worked
07:26:54 <Patashu> XD
07:26:55 <CakeProphet> Lymia: list? yes.
07:27:08 <Deewiant> > map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1])
07:27:10 <lambdabot> [1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,177...
07:27:12 <Patashu> > iterate (\(xs:x:y) -> xs:x:y:x+y) (1:[1])
07:27:12 <lambdabot> Occurs check: cannot construct the infinite type: t = [t]
07:27:27 <Patashu> > map head . iterate (\(x:y:xs) -> x+y:x:y:xs) (1:[1])
07:27:28 <lambdabot> No instance for (GHC.Num.Num [a])
07:27:28 <lambdabot> arising from a use of `e_111' at <inte...
07:27:30 <Patashu> oh
07:27:32 -!- zzo38 has quit (Quit: #esoteric).
07:27:35 <Patashu> > map head ( iterate (\(x:y:xs) -> x+y:x:y:xs) (1:[1]) )
07:27:36 <lambdabot> [1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,177...
07:27:37 <Patashu> or
07:27:43 <Patashu> > map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1])
07:27:45 <lambdabot> [1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,177...
07:27:49 <CakeProphet> Lymia: usually it makes things difficult though. you're better off using an internal list as an aggregate (if you will allow me to use Java speak...) and then simply define the methods you need yourself.
07:28:19 <CakeProphet> Lymia: but either way is fine.
07:29:14 <Patashu> > map head . iterate (\(x:y:xs) -> x*y:x:y:xs) $ 2:[1]
07:29:16 <lambdabot> [2,2,4,8,32,256,8192,2097152,17179869184,36028797018963968,6189700196426901...
07:29:25 <Patashu> multiplication fibonacci!
07:30:21 <Patashu> fold zip map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1])
07:30:23 <oerjan> > intercalate ", " $ iterate (sequence[show.length, take 1]<=<group) "1"
07:30:24 <lambdabot> Couldn't match expected type `GHC.Types.Char'
07:30:24 <lambdabot> against inferred type...
07:30:24 <Lymia> !python exec """class InfList(list):\n\tdef __init__(self,fun):\n\t\tself.fun=fun\n\t\tself.buffer={}\n\tdef __getitem__(self, index):\n\t\tif index in self.buffer:\n\t\t\treturn buffer[index]\n\t\ttemp=self.fun(index)\n\t\tself.buffer[index]=temp\n\t\treturn temp\nprint InfList(lambda x:x)"""
07:30:24 <EgoBot> ​[]
07:30:39 <Patashu> oops
07:30:41 <CakeProphet> Patashu: most likely need more parens.
07:30:42 <oerjan> sheesh
07:30:42 <Patashu> > fold zip map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1])
07:30:42 <lambdabot> Not in scope: `fold'
07:30:48 <Patashu> > foldl zip map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1])
07:30:49 <lambdabot> Occurs check: cannot construct the infinite type: a = (a, b)
07:30:53 <Patashu> hah
07:31:07 <Patashu> > foldl . zip . map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1])
07:31:08 <lambdabot> Couldn't match expected type `b -> [b1]'
07:31:08 <lambdabot> against inferred type `[(a...
07:31:13 <CakeProphet> Patashu: Haskll can't magically discern when you're supplying arguments to a function and when you're passing functions to other functions.
07:31:22 <Patashu> I can't either
07:31:23 <CakeProphet> without parens.
07:31:24 <Patashu> @_@
07:31:37 <CakeProphet> Patashu: if you would like a language that can do that, see Perl. :P
07:31:42 <Patashu> > foldl zip . map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1])
07:31:43 <lambdabot> Occurs check: cannot construct the infinite type: a = (a, b)
07:31:45 <CakeProphet> granted Perl has the advantage of having proper first-class functions.
07:31:49 <CakeProphet> *not having
07:31:52 <Deewiant> ?ty foldl zip
07:31:53 <lambdabot> Occurs check: cannot construct the infinite type: a = (a, b)
07:31:53 <lambdabot> Expected type: [a]
07:31:53 <lambdabot> Inferred type: [(a, b)]
07:32:02 <Patashu> okay, so that's no good then
07:32:15 <CakeProphet> :t zip
07:32:16 <lambdabot> forall a b. [a] -> [b] -> [(a, b)]
07:32:19 <CakeProphet> :t foldl
07:32:20 <lambdabot> forall a b. (a -> b -> a) -> a -> [b] -> a
07:32:26 <CakeProphet> nope.
07:32:55 <CakeProphet> unless [a] = [(a,b)]
07:32:57 <CakeProphet> but it doesn't...
07:33:49 <Patashu> maybe some kind of monadic version of zip...
07:33:54 <CakeProphet> what on earth are you trying to do.
07:34:01 <Patashu> not sure
07:34:09 <CakeProphet> oh, well that might be your problem.
07:34:16 <Patashu> wait I remember now
07:34:29 <Patashu> for a list [a,b,c,d,e] I want to make [(a,b),(b,c),(c,d)] etc
07:34:48 <Deewiant> > (zip`ap`tail) [a,b,c,d,e]
07:34:48 <CakeProphet> hmmm
07:34:49 <lambdabot> [(a,b),(b,c),(c,d),(d,e)]
07:35:03 <CakeProphet> there you go. instant black magic from Haskell wizards.
07:35:07 <Patashu> wtf
07:35:11 <Patashu> jesus christ what is that
07:35:12 <Patashu> hahaha
07:35:19 <CakeProphet> :t ap
07:35:20 <lambdabot> forall (m :: * -> *) a b. (Monad m) => m (a -> b) -> m a -> m b
07:35:41 <CakeProphet> I'm guessing it relies on the monad instances for functions.
07:35:42 <oerjan> that, Patashu, is the -> Monad.
07:35:48 <CakeProphet> which I still don't really know about.
07:36:01 <CakeProphet> *instance
07:36:02 <oerjan> :t ap.($)
07:36:03 <lambdabot> forall a b a1. (a1 -> a -> b) -> (a1 -> a) -> a1 -> b
07:36:15 <Patashu> :t zip`ap`tail
07:36:16 <lambdabot> forall b. [b] -> [(b, b)]
07:36:22 <Patashu> huh
07:36:26 <Deewiant> ?pl \x -> f x (g x)
07:36:27 <lambdabot> ap f g
07:36:30 <Patashu> > (zip`ap`head) [a,b,c,d,e]
07:36:30 <lambdabot> Couldn't match expected type `[b]'
07:36:31 <lambdabot> against inferred type `SimpleRef...
07:36:36 <Patashu> huh
07:36:45 <Deewiant> > (\x -> zip x (tail x)) [a,b,c,d,e]
07:36:46 <lambdabot> [(a,b),(b,c),(c,d),(d,e)]
07:36:49 <CakeProphet> Patashu: yes if you plug in a function with a completely different type you will get a type error. :D
07:36:56 <pikhq> Patashu: Here's a hint:
07:37:00 <Patashu> they have different types?
07:37:01 <Patashu> :t head
07:37:02 <Patashu> :t tail
07:37:02 <lambdabot> forall a. [a] -> a
07:37:03 <pikhq> :t (zip`ap`)
07:37:03 <lambdabot> forall a. [a] -> [a]
07:37:03 <lambdabot> forall a b. ([a] -> [b]) -> [a] -> [(a, b)]
07:37:06 <Patashu> wow, they do
07:37:07 <Patashu> oh wait
07:37:09 <Patashu> I want uhhh
07:37:12 <Patashu> :t init
07:37:12 <lambdabot> forall a. [a] -> [a]
07:37:15 <Patashu> no not that one
07:37:18 <Patashu> oh wait yes that one
07:37:19 <Patashu> lol
07:37:25 <Patashu> > (zip`ap`init) [a,b,c,d,e]
07:37:26 <lambdabot> [(a,a),(b,b),(c,c),(d,d)]
07:37:50 <CakeProphet> Deewiant: aah I see.
07:38:19 <oerjan> > join(zip.tail) [a,b,c,d,e]
07:38:21 <lambdabot> [(b,a),(c,b),(d,c),(e,d)]
07:38:29 <Patashu> :t join
07:38:30 <lambdabot> forall (m :: * -> *) a. (Monad m) => m (m a) -> m a
07:38:51 <CakeProphet> > join [[1,2,3],[4,5,6]]
07:38:52 <lambdabot> [1,2,3,4,5,6]
07:39:06 <CakeProphet> monadic FLATTEN.
07:39:09 <CakeProphet> bam.
07:39:10 <oerjan> CakeProphet: different Monad
07:39:35 <CakeProphet> > join (Just (Just 5))
07:39:36 <lambdabot> Just 5
07:39:45 <Lymia> > \x -> x
07:39:46 <lambdabot> Overlapping instances for GHC.Show.Show (t -> t)
07:39:46 <lambdabot> arising from a use of `...
07:39:47 <CakeProphet> > join (Just Nothing)
07:39:48 <lambdabot> Nothing
07:40:03 <Lymia> > (\x -> x) (1)
07:40:03 <lambdabot> 1
07:40:04 <CakeProphet> oerjan: better? :D
07:40:19 <Lymia> > (\ -> x) (1)
07:40:20 <lambdabot> <no location info>: parse error on input `->'
07:40:24 <Lymia> > (\ふぉお -> ふぉお) (1)
07:40:25 <lambdabot> 1
07:40:26 <oerjan> CakeProphet: still not the same monad as in join(zip.tail) :)
07:40:41 <CakeProphet> oerjan: oh, right... I was just showing what join does.
07:40:47 <CakeProphet> I /still/ don't know how function works as a monad.
07:40:51 <Patashu> (zip`ap`init) map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1])
07:40:58 <Patashu> oops
07:40:59 <Patashu> > (zip`ap`init) map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1])
07:41:00 <lambdabot> Couldn't match expected type `t -> a -> b'
07:41:01 <lambdabot> against inferred type `[...
07:41:09 <Patashu> > (zip`ap`init) ( map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1]) )
07:41:11 <lambdabot> [(1,1),(2,2),(3,3),(5,5),(8,8),(13,13),(21,21),(34,34),(55,55),(89,89),(144...
07:41:17 <oerjan> CakeProphet: it really just gives everything an extra argument, it's isomorphic to Reader
07:41:18 <Patashu> > (zip`ap`head) ( map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1]) )
07:41:19 <lambdabot> No instance for (GHC.Num.Num [b])
07:41:19 <lambdabot> arising from a use of `e_111' at <inte...
07:41:29 <Patashu> > (zip`ap`tail) ( map head . iterate (\(x:y:xs) -> x+y:x:y:xs) $ (1:[1]) )
07:41:30 <lambdabot> [(1,2),(2,3),(3,5),(5,8),(8,13),(13,21),(21,34),(34,55),(55,89),(89,144),(1...
07:41:44 <CakeProphet> oerjan: it gives everything an extra argument that has no effect?
07:42:45 <CakeProphet> :t (tail) >>=
07:42:46 <lambdabot> parse error (possibly incorrect indentation)
07:42:51 <CakeProphet> :t ((tail) >>=)
07:42:51 <oerjan> @src >>= ->
07:42:52 <lambdabot> Source not found.
07:42:52 <lambdabot> forall a b. ([a] -> [a] -> b) -> [a] -> b
07:42:58 <oerjan> @src -> >>=
07:42:58 <lambdabot> Source not found.
07:43:03 <oerjan> @src (->) >>=
07:43:03 <lambdabot> Source not found. Take a stress pill and think things over.
07:43:08 <oerjan> @src (->) (>>=)
07:43:08 <lambdabot> f >>= k = \ r -> k (f r) r
07:43:32 <CakeProphet> :t ((tail) >>=) (++) [1..]
07:43:33 <oerjan> bloody @src with its impossible to remember fickle syntax _and_ missing functions
07:43:33 <lambdabot> forall a. (Num a, Enum a) => [a]
07:43:40 <CakeProphet> > ((tail) >>=) (++) [1..]
07:43:42 <lambdabot> [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,2...
07:44:19 <CakeProphet> oerjan: ah, that's... difficult to think about. ::
07:44:50 <CakeProphet> but I see how the zip`ap`tail works
07:45:30 <Patashu> :t ap
07:45:31 <lambdabot> forall (m :: * -> *) a b. (Monad m) => m (a -> b) -> m a -> m b
07:45:43 <CakeProphet> :t (+1) >>=
07:45:44 <lambdabot> parse error (possibly incorrect indentation)
07:45:48 <CakeProphet> :t ((+1) >>=)
07:45:49 <lambdabot> forall a b. (Num a) => (a -> a -> b) -> a -> b
07:45:55 <Patashu> :t ap zip
07:45:56 <lambdabot> forall a b. ([a] -> [b]) -> [a] -> [(a, b)]
07:45:57 <oerjan> CakeProphet: if you understand how ski abstract elimination works, you can see that many of the monadic functions become versions of that for ->
07:46:05 <Patashu> :t zip
07:46:06 <lambdabot> forall a b. [a] -> [b] -> [(a, b)]
07:46:10 <oerjan> e.g. ap is S, return is K
07:46:22 <CakeProphet> :t (+1) >>= (-) a :: Expr
07:46:23 <lambdabot> Couldn't match expected type `Expr -> b'
07:46:23 <lambdabot> against inferred type `Expr'
07:46:23 <lambdabot> In the second argument of `(>>=)', namely `(-) a'
07:46:27 <Patashu> hmmmmmm
07:46:27 <CakeProphet> > (+1) >>= (-) a :: Expr
07:46:28 <lambdabot> Couldn't match expected type `SimpleReflect.Expr -> b'
07:46:28 <lambdabot> against infe...
07:46:34 <Patashu> :t ap zip tail
07:46:35 <lambdabot> forall b. [b] -> [(b, b)]
07:46:46 <pikhq> >>= is a more complex combinator, but still just a combinator.
07:46:46 <CakeProphet> > (+b) >>= (-) a :: Expr
07:46:47 <lambdabot> Couldn't match expected type `SimpleReflect.Expr -> b'
07:46:47 <lambdabot> against infe...
07:46:50 <Patashu> :t (ap). (. tail)
07:46:51 <lambdabot> forall a b a1. ([a1] -> a -> b) -> ([a1] -> a) -> [a1] -> b
07:47:00 <Patashu> :t ((ap). (. tail)) zip
07:47:00 <lambdabot> forall a b. ([a] -> [b]) -> [a] -> [(a, b)]
07:47:08 <Patashu> woah, that makes something different
07:47:32 <oerjan> Patashu: zip`ap`tail is just a fancy syntactic sugar for writing ap zip tail
07:47:44 <Patashu> yes
07:47:48 <Deewiant> ?quote aztec
07:47:48 <lambdabot> quicksilver says: zip`ap`tail - the Aztec god of consecutive numbers
07:48:41 <CakeProphet> > (zipWith (+))`ap`tail [1..]
07:48:42 <lambdabot> Couldn't match expected type `[a] -> [a]'
07:48:42 <lambdabot> against inferred type `[t]'
07:48:52 <Patashu> ap flip( tail zip )
07:48:59 <Patashu> oops
07:49:01 <Patashu> :t ap flip( tail zip )
07:49:02 <lambdabot> Couldn't match expected type `[a]'
07:49:02 <lambdabot> against inferred type `[a1] -> [b] -> [(a1, b)]'
07:49:02 <lambdabot> In the first argument of `tail', namely `zip'
07:49:09 <CakeProphet> :t (zipWith (+))`ap`tail
07:49:10 <lambdabot> forall a. (Num a) => [a] -> [a]
07:49:15 <Patashu> :t flip
07:49:16 <lambdabot> forall (f :: * -> *) a b. (Functor f) => f (a -> b) -> a -> f b
07:49:36 <CakeProphet> > (zipWith (+))`ap`tail $ [1..]
07:49:37 <lambdabot> [3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,...
07:49:40 <Patashu> > flip 3 / 2
07:49:40 -!- Lymia has quit (Excess Flood).
07:49:41 <lambdabot> Overlapping instances for GHC.Show.Show (a -> f b)
07:49:41 <lambdabot> arising from a use of...
07:49:46 <Patashu> > flip 3 - 2
07:49:46 <lambdabot> Overlapping instances for GHC.Show.Show (a -> f b)
07:49:47 <lambdabot> arising from a use of...
07:49:56 <Patashu> > flip minus (3 2)
07:49:56 <CakeProphet> > (zipWith (+))`ap`tail $ [0..]
07:49:57 <lambdabot> Not in scope: `minus'
07:49:57 <lambdabot> [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,5...
07:50:02 <Patashu> > flip subtract (3 2)
07:50:03 <lambdabot> Overlapping instances for GHC.Show.Show (a -> a)
07:50:03 <lambdabot> arising from a use of `...
07:50:09 <Patashu> > 3 - 2
07:50:10 <lambdabot> 1
07:50:15 <Deewiant> > flip subtract 3 2
07:50:16 <lambdabot> 1
07:50:18 -!- Lymia has joined.
07:50:42 <Patashu> flip subtract 2 3
07:50:47 <Patashu> > flip subtract 2 3
07:50:49 <lambdabot> -1
07:50:50 <CakeProphet> the addition of two consecutive integers is always odd. :)
07:50:53 <Patashu> how come it isn't flipping them
07:51:04 <Deewiant> > subtract 2 3
07:51:05 <lambdabot> 1
07:51:11 <Patashu> woah
07:51:14 <Deewiant> > (-) 2 3
07:51:15 <lambdabot> -1
07:51:18 <CakeProphet> Patashu: "subtract 2 from 3"
07:51:21 <Patashu> > flip (-) 2 3
07:51:22 <lambdabot> 1
07:51:26 <Patashu> > flip (/) 2 3
07:51:27 <lambdabot> 1.5
07:51:33 <Patashu> > flip div 2 3
07:51:34 <lambdabot> 1
07:51:42 <Patashu> div does what?
07:51:46 <Patashu> maybe it's integer division
07:51:48 <Patashu> > flip div 2 4
07:51:49 <lambdabot> 2
07:51:52 <Patashu> yeah ok
07:52:03 <Patashu> > ap flip tail zip
07:52:04 <lambdabot> Occurs check: cannot construct the infinite type: a = [a -> b]
07:52:13 <CakeProphet> > (zipWith (-))`ap`tail $ [0..]
07:52:14 <lambdabot> [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1...
07:52:16 <Patashu> > ap flip tail zip [1..]
07:52:17 <lambdabot> Couldn't match expected type `t -> a -> b'
07:52:17 <lambdabot> against inferred type `[...
07:52:21 <Patashu> > ap tail zip [1..]
07:52:22 <lambdabot> Couldn't match expected type `a -> b' against inferred type `[a1]'
07:52:26 <Patashu> > ap zip tail [1..]
07:52:27 <lambdabot> [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11),(11,12),(12...
07:52:31 <CakeProphet> the subtraction of two consecutive integers is always -1. :)
07:52:38 <CakeProphet> or 1
07:52:40 <Patashu> > ap (flip tail zip) $ [1..]
07:52:41 <lambdabot> Couldn't match expected type `a1 -> a -> b'
07:52:41 <lambdabot> against inferred type `...
07:52:49 <Patashu> is there a flip for functions?
07:52:55 <CakeProphet> yes, it's called flip.
07:53:10 <CakeProphet> ...
07:53:29 <Patashu> > ap zip tail [1..]
07:53:29 <lambdabot> [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11),(11,12),(12...
07:53:53 <Patashu> > ap flip (tail [1..]) zip
07:53:53 <lambdabot> Couldn't match expected type `f (a -> b) -> a'
07:53:54 <lambdabot> against inferred typ...
07:53:55 <CakeProphet> :t flip tail
07:53:55 <lambdabot> Couldn't match expected type `a -> b' against inferred type `[a1]'
07:53:56 <lambdabot> Probable cause: `tail' is applied to too many arguments
07:53:56 <oerjan> > flip ap tail zip [1..]
07:53:56 <lambdabot> In the first argument of `flip', namely `tail'
07:53:57 <lambdabot> [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11),(11,12),(12...
07:54:04 <CakeProphet> Patashu: yeah you can't flip a one-argument function.
07:54:07 <CakeProphet> doesn't make sense.
07:54:29 <Patashu> so, wait
07:54:32 <Patashu> > ap zip tail [1..]
07:54:33 <lambdabot> [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11),(11,12),(12...
07:54:38 <Patashu> > flip ap tail zip [1..]
07:54:41 <lambdabot> [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11),(11,12),(12...
07:54:42 <Patashu> right?
07:54:49 <Patashu> why do I put the flip over THERE when the stuff it's flipping is over THERE
07:54:58 <CakeProphet> ...because flip flips the function arguments...
07:55:03 <Patashu> yep
07:55:04 <CakeProphet> you need to give it a function to flip.
07:55:08 <Patashu> ah
07:55:11 <CakeProphet> it's not magic
07:55:23 <CakeProphet> it can't know what to flip otherwise.
07:55:29 <CakeProphet> @src flip
07:55:29 <lambdabot> flip f x y = f y x
07:55:37 <Patashu> @src ap
07:55:37 <lambdabot> ap = liftM2 id
07:55:42 <Patashu> @src liftM2
07:55:43 <lambdabot> liftM2 f m1 m2 = do { x1 <- m1; x2 <- m2; return (f x1 x2) }
07:55:59 <CakeProphet> Patashu: that's a rather bad definition for ap, as far as understanding it.
07:56:00 <Deewiant> > ((ap `flip` tail) zip) [1..] -- I sometimes like this style since then the `flip` is where the next argument goes
07:56:01 <lambdabot> [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11),(11,12),(12...
07:56:03 * oerjan watches Patashu digging himself deeper
07:56:45 <Patashu> so liftM2 lifts two values out of their context and applies them to a function
07:56:50 <Patashu> ap is the same but with no function
07:57:03 <CakeProphet> right, so the left-hand argument has to be a function in that case.
07:57:28 <Patashu> > tail [1..]
07:57:29 <lambdabot> [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,2...
07:57:37 <CakeProphet> it applies a function wrapped in a monad to the other monad.
07:57:37 <Patashu> right
07:57:48 <Patashu> @src liftM
07:57:48 <lambdabot> liftM f m1 = do { x1 <- m1; return (f x1) }
07:57:52 <Patashu> liftM tail [1..]
07:57:59 <Patashu> > liftM tail [1..]
07:57:59 <lambdabot> No instances for (GHC.Num.Num [a], GHC.Enum.Enum [a])
07:58:00 <lambdabot> arising from a use...
07:58:01 <CakeProphet> uh, no.
07:58:03 <Patashu> nope!!!
07:58:22 <CakeProphet> > liftM (+1) [1..]
07:58:23 <lambdabot> [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,2...
07:58:44 <Patashu> :t (+1)
07:58:45 <lambdabot> forall a. (Num a) => a -> a
07:58:46 <Patashu> :t tail
07:58:47 <lambdabot> forall a. [a] -> [a]
07:58:51 <CakeProphet> > liftM show [1..]
07:58:51 <lambdabot> ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17...
07:59:07 <CakeProphet> :t liftM
07:59:08 <lambdabot> forall a1 r (m :: * -> *). (Monad m) => (a1 -> r) -> m a1 -> m r
07:59:17 <CakeProphet> notice the type of the argument function.
07:59:24 <CakeProphet> and the monad types.
07:59:39 <CakeProphet> m a1 = [a1] in the case of the list monad.
07:59:54 <oerjan> liftM = map for lists
07:59:56 <Patashu> what about the function?
08:00:07 <Patashu> map tail [1..]
08:00:09 <Patashu> > map tail [1..]
08:00:09 <lambdabot> No instances for (GHC.Num.Num [a], GHC.Enum.Enum [a])
08:00:10 <lambdabot> arising from a use...
08:00:16 <Patashu> > map head [1..]
08:00:16 <CakeProphet> it operates on the "inner type", not the monad itself.
08:00:17 <lambdabot> No instances for (GHC.Num.Num [a], GHC.Enum.Enum [a])
08:00:17 <lambdabot> arising from a use...
08:00:28 <CakeProphet> Patashu: you're asking it to apply head to each number in that list
08:00:30 <CakeProphet> doesn't make sense.
08:00:31 <Patashu> oh yeah
08:00:31 <Patashu> ok
08:00:47 <Gregor> COMPUTER
08:00:49 <Patashu> @src zip
08:00:49 <lambdabot> zip (a:as) (b:bs) = (a,b) : zip as bs
08:00:49 <lambdabot> zip _ _ = []
08:00:50 <Gregor> COM-PU-TER
08:00:52 <Gregor> COMPUTER SCIENCE
08:00:53 <CakeProphet> you can't give numbers head.
08:01:04 <CakeProphet> (ZING!)
08:01:19 <Gregor> CakeProphet: CHURCH DISAGREES!
08:01:26 <Gregor> (ZONG!)
08:01:46 <oerjan> yeah the church is all about giving head to cardinals
08:02:02 <Deewiant> Patashu: liftM = (.) for functions
08:02:05 <CakeProphet> ..oh god
08:02:11 <CakeProphet> what have I done.
08:02:20 <Gregor> Anybody who didn't get my joke needs to leave :P
08:02:35 <oerjan> Gregor: wait what
08:03:01 <Gregor> oerjan: LAMBDA CALCULUS
08:03:19 <oerjan> ...what does that have to do with head
08:03:32 <CakeProphet> I know I'm pretty confused as well.
08:03:46 <Gregor> Church, numbers, lambda calculus, RECURSIVE DATA/CODE STRUCTURES
08:03:59 <Gregor> It was a Church numerals joke and you guys SUCK
08:04:36 <CakeProphet> > map head $ tails [1..]
08:04:37 <lambdabot> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28...
08:04:41 <CakeProphet> :3
08:05:26 <CakeProphet> the elusive "heads" function.
08:05:43 <Patashu> lol
08:05:47 <Patashu> > [1..]
08:05:48 <lambdabot> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28...
08:06:13 <CakeProphet> Patashu: what? you found it too!
08:06:20 <CakeProphet> argh!
08:06:27 <Deewiant> No, that's different
08:06:32 <Deewiant> > map head $ tails []
08:06:33 <lambdabot> [*Exception: Prelude.head: empty list
08:06:36 <Patashu> > tails [1..]
08:06:36 <lambdabot> [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2...
08:06:39 <Patashu> LOL
08:06:41 <Patashu> go fig
08:06:59 <CakeProphet> > map tail [1..]
08:06:59 <lambdabot> No instances for (GHC.Num.Num [a], GHC.Enum.Enum [a])
08:07:00 <lambdabot> arising from a use...
08:07:06 <Patashu> vegeta, what does the scouter say about the cardinality of that set?
08:07:07 <CakeProphet> oh right lol
08:07:08 <Patashu> PROBABLY STILL COUNTABLE
08:07:26 * oerjan confirms countability
08:07:30 <CakeProphet> WHAT!? PROBABLY STILL COUNTABLE!!!!?
08:07:38 <CakeProphet> +ITS
08:07:47 <Patashu> nope, no +ITS
08:07:49 <Patashu> it's WHAT NINE THOUSAND
08:07:57 <Patashu> also
08:08:00 <Patashu> what's the opposite of init
08:08:06 <Deewiant> last?
08:08:11 <Patashu> > last [1..]
08:08:14 <Deewiant> ...
08:08:14 <lambdabot> mueval-core: Time limit exceeded
08:08:16 <Patashu> lol
08:08:18 <Patashu> :D
08:08:31 <Patashu> :t lasts
08:08:32 <lambdabot> Not in scope: `lasts'
08:08:34 <Patashu> darn
08:08:36 <Patashu> :t inits
08:08:37 <lambdabot> forall a. [a] -> [[a]]
08:08:39 <CakeProphet> I think you want "reverse"
08:08:43 <Patashu> haha
08:08:48 <Patashu> > sort [1..]
08:09:06 <oerjan> > inits [1..5]
08:09:10 <oerjan> oops
08:09:26 <lambdabot> thread killed
08:09:27 <Patashu> hey, it didn't time out
08:09:27 <CakeProphet> Patashu: might want to try some finite lists.
08:09:30 <Patashu> nice
08:09:35 <Patashu> I broke lambdabot
08:09:41 <oerjan> Patashu: that's a different timeout
08:09:43 <oerjan> > inits [1..5]
08:09:47 <lambdabot> thread killed
08:09:51 <lambdabot> mueval-core: Time limit exceeded
08:09:53 <Patashu> lol
08:09:55 <Patashu> > 1
08:09:56 <lambdabot> 1
08:10:02 <oerjan> > inits [1..5]
08:10:03 <lambdabot> [[],[1],[1,2],[1,2,3],[1,2,3,4],[1,2,3,4,5]]
08:10:26 <CakeProphet> > iterate succ 1 --wooo, so many ways to write [1..]
08:10:27 <lambdabot> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28...
08:10:46 <Patashu> > fix (1++)
08:10:48 <lambdabot> Ambiguous type variable `a' in the constraints:
08:10:48 <lambdabot> `Data.Monoid.Monoid a'
08:10:48 <lambdabot> ...
08:10:50 <Patashu> > fix (1:)
08:10:52 <lambdabot> [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,...
08:10:53 <CakeProphet> Patashu: whatis wrong with you.
08:11:24 <oerjan> > scanl1 (+) $ fix (1:)
08:11:25 <lambdabot> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28...
08:11:48 <CakeProphet> > map last $ inits [1..]
08:11:49 <lambdabot> [*Exception: Prelude.last: empty list
08:11:52 <Patashu> ooo, scan
08:11:57 <Patashu> I think that's something I wanted a while ago
08:12:02 <Patashu> > scanl1 (,) $ fix (1:)
08:12:03 <lambdabot> Occurs check: cannot construct the infinite type: a = (a, a)
08:12:08 <Patashu> noo!
08:12:31 <CakeProphet> scan works like an accumulator of sorts.
08:12:35 <Patashu> aah
08:12:41 <Patashu> I was picturing a nondestructive fold
08:13:06 <Patashu> > scanl1 (*) $ scanl1 (+) $ fix (1:)
08:13:07 <lambdabot> [1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,8...
08:13:20 <Patashu> is there such a thing?
08:13:45 <oerjan> what's destructive about folds
08:13:59 <Patashu> a fold gets rid of the value it uses
08:14:00 <Patashu> so it ends up with just one
08:14:28 <oerjan> scanl1 may be right, then
08:14:42 <CakeProphet> > foldl1 ($) (map (,) [1,3..]) [2,4..]
08:14:43 <lambdabot> Occurs check: cannot construct the infinite type: a = a -> b
08:14:58 <CakeProphet> > zipWith ($) (map (,) [1,3..]) [2,4..]
08:14:59 <lambdabot> [(1,2),(3,4),(5,6),(7,8),(9,10),(11,12),(13,14),(15,16),(17,18),(19,20),(21...
08:15:07 <Patashu> I'm picturing myfunc that goes myfunc f [a,b,c,d,e] -> [f a b, f b c, f c d, f d e]
08:15:17 <Patashu> maybe zipwith
08:15:18 <Patashu> hmmm
08:15:28 <CakeProphet> no zipWith takes two lists
08:15:33 <Patashu> but I can use that ap trick
08:15:37 <oerjan> > zipWith f`ap`tail $ [a,b,c,d,e] :: [Expr]
08:15:37 <Patashu> and make it take itself offset
08:15:39 <lambdabot> [f a b,f b c,f c d,f d e]
08:15:42 <Patashu> yep
08:15:44 <Patashu> that's it ty
08:15:54 <CakeProphet> oh... I did that a while ago actually.
08:15:58 <Patashu> > zipWith ap (*) tail [1..]
08:15:58 <lambdabot> Couldn't match expected type `[m (a -> b)]'
08:15:59 <lambdabot> against inferred type `...
08:16:17 <Patashu> > zipWith (*)`ap`tail $ [1..]
08:16:17 <lambdabot> [2,6,12,20,30,42,56,72,90,110,132,156,182,210,240,272,306,342,380,420,462,5...
08:16:22 <Patashu> > zipWith ap (*) tail $ [1..]
08:16:23 <lambdabot> Couldn't match expected type `[m (a -> b)]'
08:16:23 <lambdabot> against inferred type `...
08:16:25 <Patashu> huh
08:16:27 <CakeProphet> Patashu: are you just stringing together function names...?
08:16:37 <Patashu> f`ap`tail is equivalent to ap f tail right
08:16:43 <oerjan> > ap (zipWith (*)) tail [1..]
08:16:44 <lambdabot> [2,6,12,20,30,42,56,72,90,110,132,156,182,210,240,272,306,342,380,420,462,5...
08:16:48 <CakeProphet> yes
08:17:14 <Patashu> so why does one work and one not
08:17:23 <CakeProphet> Patashu: but Haskell is not magical and can't discern what is applying to what.
08:17:28 <CakeProphet> hint: need moar parens
08:17:32 <oerjan> because zipWith (*) is f, not just (*)
08:17:39 <Patashu> > zipWith . ap (*) tail $ [1..]
08:17:40 <lambdabot> Couldn't match expected type `a -> b -> c'
08:17:40 <lambdabot> against inferred type `[...
08:17:50 <Patashu> > zipWith .( ap (*) tail $ [1..])
08:17:51 <lambdabot> No instances for (GHC.Num.Num [a -> b -> c],
08:17:51 <lambdabot> GHC.Enum.En...
08:17:54 <oerjan> Patashu: erm i showed you above
08:17:55 <Patashu> > zipWith .( ap (*) tail) $ [1..]
08:17:55 <lambdabot> Couldn't match expected type `a -> b -> c'
08:17:56 <lambdabot> against inferred type `[...
08:17:57 <Patashu> I know
08:18:01 <Patashu> I want to do it without ` though
08:18:07 <oerjan> Patashu: i did that
08:18:08 <CakeProphet> he showed you that...
08:18:12 <Patashu> oh
08:18:24 <Patashu> aaah
08:18:24 <Patashu> ok
08:18:42 <Patashu> ap . zipWith (*) . tail $ [1..]
08:18:48 <Patashu> > ap . zipWith (*) . tail $ [1..]
08:18:49 <lambdabot> Couldn't match expected type `a -> b' against inferred type `[a1]'
08:18:51 <CakeProphet> when you say stuff like zipWith ap (*) tail... it reads it like this (((zipWith ap) (*)) tail)
08:18:52 <Patashu> lol
08:19:01 <Patashu> > ap (zipWith (*)) tail $ [1..]
08:19:01 <lambdabot> [2,6,12,20,30,42,56,72,90,110,132,156,182,210,240,272,306,342,380,420,462,5...
08:19:08 <Deewiant> ?unpl app . zipWith (*) . tail
08:19:08 <lambdabot> (\ c -> app (zipWith (*) (tail c)))
08:19:29 <Deewiant> ?unpl app (zipWith (*)) . tail
08:19:30 <lambdabot> (\ c -> app (zipWith (*)) (tail c))
08:20:03 <CakeProphet> !perl print map {chop;$_} keys qw(abc def ghi jkl mno pqr)
08:20:03 <EgoBot> Type of arg 1 to keys must be hash (not list) at /tmp/input.22685 line 1, at EOF
08:20:18 <CakeProphet> ...wat, lists are hashes fool.
08:20:36 <CakeProphet> !perl print map {chop;$_} keys %{{qw(abc def ghi jkl mno pqr)}}
08:20:37 <EgoBot> mnabgh
08:20:54 <Lymia> > ap (zipWith (\x,y => (x,y)) tail $ [1..]
08:20:55 <lambdabot> <no location info>: parse error on input `,'
08:20:59 <Lymia> > ap (zipWith (\(x,y) => (x,y)) tail $ [1..]
08:21:00 <lambdabot> <no location info>: parse error on input `=>'
08:21:04 <Lymia> > ap (zipWith (\(x,y) -> (x,y)) tail $ [1..]
08:21:05 <lambdabot> <no location info>: parse error (possibly incorrect indentation)
08:21:07 <Lymia> :<
08:21:15 <Lymia> What was the syntax again?
08:21:16 <oerjan> Lymia: one more )
08:21:28 <Lymia> > ap (zipWith (\(x,y) -> (x,y))) tail $ [1..]
08:21:29 <lambdabot> Couldn't match expected type `b -> c'
08:21:29 <lambdabot> against inferred type `(t, t1)'
08:21:38 <Lymia> > ap (zipWith (\x -> X)) tail $ [1..]
08:21:38 <lambdabot> Not in scope: data constructor `X'
08:21:40 <Lymia> > ap (zipWith (\x -> x)) tail $ [1..]
08:21:40 <CakeProphet> Lymia: you could rewrite (\(x,y) -> (x,y)) as id
08:21:41 <lambdabot> Occurs check: cannot construct the infinite type: b = b -> c
08:21:43 <Lymia> :c
08:21:54 <Lymia> I need to go back to that Haskell tutorial
08:22:01 <CakeProphet> Lymia: I think you want
08:22:04 <CakeProphet> (\x y
08:22:05 <Patashu> > ap (zipWith id) tail $ [1..]
08:22:06 <lambdabot> Occurs check: cannot construct the infinite type: b = b -> c
08:22:23 <CakeProphet> Patashu: yeah that won't work. Sorry for misleading you. :P
08:22:25 <Patashu> lol
08:22:26 <Patashu> it's ok
08:22:48 <CakeProphet> Lymia: to specify multiple arguments you say (\a b c -> ...)
08:23:00 <Patashu> > ap (zipWith (\x,y -> (x,y))) tail $ [1..]
08:23:00 <CakeProphet> \(x,y) is one argument that is a tuple containing x and y
08:23:00 <lambdabot> <no location info>: parse error on input `,'
08:23:04 <Patashu> NOPE.
08:23:09 <CakeProphet> no comma
08:23:12 <Lymia> > ap (zipWith (\x y -> (x,y))) tail $ [1..]
08:23:13 <lambdabot> [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11),(11,12),(12...
08:23:15 <Patashu> > ap (zipWith (\x y -> (x,y))) tail $ [1..]
08:23:16 <Lymia> There we go.
08:23:16 <lambdabot> [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11),(11,12),(12...
08:23:17 <Patashu> damn
08:23:19 <Patashu> lymia got it before me
08:23:29 <CakeProphet> see also: (,)
08:23:44 <Lymia> > ap (zipWith (\x y -> (x,y))) (\x -> tail $ tail $ tail $ x) $ [1..]
08:23:45 <lambdabot> [(1,4),(2,5),(3,6),(4,7),(5,8),(6,9),(7,10),(8,11),(9,12),(10,13),(11,14),(...
08:23:45 <CakeProphet> @src zip
08:23:45 <lambdabot> zip (a:as) (b:bs) = (a,b) : zip as bs
08:23:45 <lambdabot> zip _ _ = []
08:23:57 <Lymia> > ap (zipWith (\x y -> (x,y))) head $ [1..]
08:23:58 <lambdabot> No instances for (GHC.Num.Num [b], GHC.Enum.Enum [b])
08:23:58 <lambdabot> arising from a use...
08:24:05 <CakeProphet> zip = zipWith (,)
08:24:05 <Patashu> > ap (zipWith (,)) tail $ [1..]
08:24:06 <lambdabot> [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11),(11,12),(12...
08:24:18 -!- wareya has quit (Ping timeout: 260 seconds).
08:24:45 <CakeProphet> :t unzip
08:24:46 <lambdabot> forall a b. [(a, b)] -> ([a], [b])
08:25:09 <Patashu> how do you get stuff out of a tuple?
08:25:12 <Patashu> monads?
08:25:17 <CakeProphet> pattern matching.
08:25:26 <CakeProphet> for a 2-tuple you can use fst and snd
08:25:27 <Deewiant> fst/snd
08:25:34 <Patashu> how about larger
08:25:35 <Patashu> !! ?
08:25:40 <Deewiant> Pattern matching
08:25:40 <CakeProphet> pattern matching.
08:25:45 <CakeProphet> Patashu: no. This isn't Python. :P
08:25:53 <CakeProphet> !! is a function on lists
08:26:07 <Patashu> m-my overloading
08:26:50 <CakeProphet> I am honestly not quite sure why Python differentiates lists from tuples when they are pretty much the same that tuples are immutable.
08:26:59 <CakeProphet> *except that
08:27:30 <oerjan> tuple overloaded functions aren't in the standard. there's probably a package on hackage for it
08:28:02 <oerjan> but usually if you think you want large tuples, you usually really need a datatype
08:28:20 <CakeProphet> anything over a 3-tuple or maybe a 4-tuple is probably in that realm.
08:28:23 <CakeProphet> even those, really.
08:28:58 <CakeProphet> > case (1,2,3) of (a,_,_) -> a
08:28:59 <lambdabot> 1
08:29:26 <Deewiant> Preferably use ~ there
08:29:34 <CakeProphet> ...why?
08:29:41 -!- wareya has joined.
08:29:48 <CakeProphet> it's a 3-tuple... always.
08:30:06 <oerjan> precisely _why_ you should use ~
08:30:25 <Lymia> > ap (zipWith (*)) (\x -> tail $ tail $ tail $ x) $ [1..]
08:30:26 <oerjan> to avoid unnecessary strictness
08:30:26 <lambdabot> [4,10,18,28,40,54,70,88,108,130,154,180,208,238,270,304,340,378,418,460,504...
08:30:33 <Lymia> > ap (zipWith (*)) (\x -> tail $ tail $ tail $ tail $ tail $ tail $ tail $ tail $ tail $ tail $ tail $ tail $ tail $ tail $ x) $ [1..]
08:30:34 <lambdabot> [15,32,51,72,95,120,147,176,207,240,275,312,351,392,435,480,527,576,627,680...
08:30:37 <Lymia> :C
08:30:41 <CakeProphet> > let thrd ~(_,_,a) = a in thrd (1,2,3)
08:30:42 <lambdabot> 3
08:30:42 <oerjan> :t drop
08:30:43 <lambdabot> forall a. Int -> [a] -> [a]
08:30:47 <oerjan> *COUGH*
08:30:55 <Lymia> >drop 5 [1..]
08:31:00 <Lymia> > drop 5 [1..]
08:31:01 <lambdabot> [6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,...
08:31:03 <Lymia> ehehehe
08:31:16 <Patashu> > take 5 drop 5 [1..]
08:31:17 <lambdabot> Couldn't match expected type `[a]'
08:31:17 <lambdabot> against inferred type `GHC.Types...
08:31:20 <Patashu> > take 5 . drop 5 [1..]
08:31:21 <lambdabot> No instances for (GHC.Num.Num [a], GHC.Enum.Enum [a])
08:31:21 <lambdabot> arising from a use...
08:31:28 <CakeProphet> > dropWhile (<10) [1..]
08:31:29 <lambdabot> [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34...
08:31:29 <Patashu> CURRYING IS HARD
08:31:39 <Patashu> > take 5 $ drop 5 [1..]
08:31:39 <lambdabot> [6,7,8,9,10]
08:31:41 <CakeProphet> Patashu: need. moar. parens.
08:31:42 <Patashu> there
08:31:43 <Lymia> Being curry is suffering
08:31:51 <Patashu> > drop 5 $ take 5 [1..]
08:31:52 <lambdabot> []
08:31:59 <Lymia> > dropWhile (!=-1) [1..]
08:32:00 <lambdabot> Not in scope: `!=-'
08:32:05 <Deewiant> /=
08:32:07 <Lymia> > dropWhile (>0) [1..]
08:32:10 <lambdabot> mueval-core: Time limit exceeded
08:32:25 <Patashu> lol
08:32:32 <CakeProphet> Lymia: there is also takeWhile, which is to take as dropWhile is to drop.
08:32:43 <Patashu> why can't haskell optimize mathematical theorems and realize it won't return anything???
08:32:44 <Patashu> gosh
08:32:53 <Patashu> > takeWhile (>0) [1..]
08:32:54 <lambdabot> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28...
08:33:13 <oerjan> > fix id
08:33:17 <lambdabot> mueval-core: Time limit exceeded
08:33:33 <oerjan> lambdabot doesn't use blackholes, even
08:33:49 <CakeProphet> oerjan: shocking.
08:34:19 <Patashu> black holes?
08:34:41 <CakeProphet> :t randomRIO
08:34:41 <lambdabot> forall a. (Random a) => (a, a) -> IO a
08:34:58 <oerjan> Patashu: with some flag settings, ghc can actually detect that fix id is a loop, by putting a "black hole" tag on it when it starts evaluating
08:35:11 <Patashu> I assume it can also detect other things
08:35:31 <oerjan> but i think that's incompatible with the multiple core setting or something
08:35:50 <oerjan> (i.e. works badly with parallelism)
08:36:03 <CakeProphet> > takeWhile (/=6) <$> (forever $ randomRIO (1,6))
08:36:04 <lambdabot> <IO [Integer]>
08:36:22 <CakeProphet> > unsafePerformIO $ takeWhile (/=6) <$> (forever $ randomRIO (1,6))
08:36:23 <lambdabot> Not in scope: `unsafePerformIO'
08:36:24 <oerjan> CakeProphet: that won't halt in any case
08:36:36 <CakeProphet> oerjan: oh really?
08:37:06 <CakeProphet> is the 6 not included?
08:37:11 <oerjan> for IO, the part to the left of <$> won't be applied until the part to the right finishes
08:37:18 <CakeProphet> ah.
08:37:50 <CakeProphet> oh, and it's not even a list. :P
08:37:51 -!- pingveno has quit (Ping timeout: 244 seconds).
08:37:59 <CakeProphet> :t forever
08:38:00 <lambdabot> forall (m :: * -> *) a b. (Monad m) => m a -> m b
08:38:51 <oerjan> Patashu: ghc can detect many things, it has a strictness analyzer to find out if there are any arguments it can be sure whether will be used or not
08:39:07 <CakeProphet> > (takeWhile (/=6) <$> (repeatM $ randomRIO (1,6))) >>= print
08:39:08 <lambdabot> Not in scope: `repeatM'
08:39:53 <oerjan> CakeProphet: sequence . repeat, but it won't work for IO
08:39:55 -!- pingveno has joined.
08:40:29 <CakeProphet> oerjan: would liftM be any better or is it effectively the same thing.
08:41:05 -!- Vorpal has joined.
08:41:14 <oerjan> same thing.
08:41:55 <oerjan> what you need if you _really_ want to do that is to recurse with unsafeInterleaveIO
08:42:05 <CakeProphet> sounds fun.
08:42:24 <oerjan> however, Random has a pure interface, in case you didn't know
08:42:48 <CakeProphet> I did but it's somewhat tedious.
08:42:50 <oerjan> > takeWhile (/=6) . randoms $ makeStdGen 42
08:42:50 <lambdabot> Not in scope: `makeStdGen'
08:42:53 <oerjan> er
08:42:59 <oerjan> > takeWhile (/=6) . randoms $ mkStdGen 42
08:43:01 <lambdabot> [-3907187990116499535,-2519438828217931933,-8264534369199619667,86887135830...
08:43:10 <oerjan> oh hm
08:43:17 <oerjan> > takeWhile (/=6) . randomRs (1,6) $ mkStdGen 42
08:43:18 <lambdabot> []
08:43:32 <oerjan> well didn't that work splendidly :P
08:43:36 <CakeProphet> yep.
08:43:46 <oerjan> > takeWhile (/=6) . randomRs (1,6) $ mkStdGen 666
08:43:48 <lambdabot> []
08:43:49 <CakeProphet> you can tell because you'll get the same result every time.
08:43:53 <oerjan> wat
08:43:58 <CakeProphet> even with different inputs! wow!
08:44:04 <oerjan> > takeWhile (/=6) . randomRs (1,6) $ mkStdGen 4
08:44:05 <lambdabot> []
08:44:06 <Patashu> > randomRs (1,6) $ mkStdGen 666
08:44:07 <lambdabot> [6,1,6,3,6,2,1,5,6,3,3,1,2,6,5,2,5,4,3,5,5,3,5,3,5,4,3,6,1,2,2,3,3,2,5,4,2,...
08:44:17 <CakeProphet> this random generator sure is consistent.
08:44:22 <oerjan> you'd think
08:44:28 <Patashu> > randomRs (1,6) $ mkStdGen 4
08:44:29 <lambdabot> [6,3,3,2,4,2,6,1,2,6,4,5,1,5,4,6,2,6,1,5,6,1,3,1,5,4,6,2,6,2,6,1,6,6,5,1,6,...
08:44:33 <Patashu> they all begin with 6
08:44:35 <Patashu> trollolol
08:44:36 <CakeProphet> hahaha.
08:44:42 <oerjan> > randomRs (1,6) $ mkStdGen 5
08:44:43 <lambdabot> [6,2,2,1,3,2,5,1,5,4,2,2,1,2,6,4,2,4,2,3,2,4,5,4,2,1,5,1,6,4,3,2,4,5,5,3,3,...
08:44:47 <oerjan> wtf
08:44:47 <Patashu> wtf
08:44:51 <Patashu> that's four in a row now.
08:44:59 <Patashu> :trollface:
08:45:05 <Patashu> > randomRs (1,6) $ mkStdGen 987
08:45:06 <lambdabot> [6,2,6,6,5,5,2,1,4,4,3,2,4,5,4,6,5,6,6,6,5,6,4,4,4,5,3,2,2,5,3,6,5,2,1,4,3,...
08:45:09 <Patashu> > randomRs (1,6) $ mkStdGen 986
08:45:10 <lambdabot> [6,3,2,1,5,5,2,1,1,6,5,5,3,2,2,2,5,1,5,2,3,3,2,1,1,1,4,3,2,3,6,6,2,3,6,2,5,...
08:45:15 <Patashu> weird
08:45:17 <Patashu> > randomRs (1,6) $ mkStdGen 985
08:45:18 <lambdabot> [6,3,3,3,5,5,3,2,4,2,1,2,3,5,6,4,5,2,4,4,1,1,6,4,4,3,4,4,2,1,3,5,5,3,6,6,2,...
08:45:18 <oerjan> > (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:45:20 <lambdabot> [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,...
08:45:24 <Patashu> they all start pretty much the same way
08:45:31 <oerjan> hm oh hm
08:45:45 <CakeProphet> dropWhile (==6) $ (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:45:49 <CakeProphet> > dropWhile (==6) $ (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:45:50 <lambdabot> [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,...
08:46:02 <CakeProphet> then they start all being 5s.
08:46:23 <Patashu> lol
08:46:27 <Patashu> why does it do that
08:46:29 <Patashu> what is randomRs
08:46:41 <oerjan> i think it may only use the high bits for the first value
08:46:46 <Vorpal> :t randomRs
08:46:47 <lambdabot> forall a g. (Random a, RandomGen g) => (a, a) -> g -> [a]
08:46:51 <CakeProphet> randomRs takes a range and a stdGen thingy and makes random values. stdgen is basically the seed value
08:46:54 <oerjan> > (head . randomRs (1,6) . mkStdGen) <$> iterate (*2) 1
08:46:56 <Vorpal> :t mkStdGen
08:46:56 <lambdabot> Int -> StdGen
08:46:57 <lambdabot> mueval-core: Time limit exceeded
08:47:09 <Patashu> http://learnyouahaskell.com/input-and-output#randomness
08:47:14 <oerjan> > (head . randomRs (1,6) . mkStdGen) <$> take 10 (iterate (*2) 1)
08:47:16 <lambdabot> [6,6,6,6,6,6,6,6,6,6]
08:47:19 <oerjan> oops
08:47:27 <oerjan> > (head . randomRs (1,6) . mkStdGen) <$> take 10 (iterate (*3) 1)
08:47:28 <lambdabot> [6,6,6,6,6,6,6,6,6,6]
08:47:32 <oerjan> wtf
08:47:39 <oerjan> > (head . randomRs (1,6) . mkStdGen) <$> take 20 (iterate (*3) 1)
08:47:40 <lambdabot> [6,6,6,6,6,6,6,6,6,6,5,3,3,1,1,3,2,6,6,4]
08:47:49 <CakeProphet> > length $ takeWhile (==6) $ (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:47:51 <lambdabot> 53667
08:47:52 <Patashu> > randomR (1,6) (mkStdGen 359353)
08:47:53 <lambdabot> (6,1494289578 40692)
08:47:55 <CakeProphet> that is when it stops being 6
08:47:56 <Patashu> > randomR (1,6) (mkStdGen 35935335)
08:47:57 <lambdabot> (3,1250031057 40692)
08:47:59 <Patashu> tada
08:47:59 <Patashu> 3
08:48:11 <CakeProphet> > length $ takeWhile (==5) $ takeWhile (==6) $ (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:48:13 <lambdabot> 0
08:48:22 <CakeProphet> oh right
08:48:27 <CakeProphet> > length $ takeWhile (==5) $ dropWhile (==6) $ (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:48:28 <lambdabot> 53668
08:48:40 <CakeProphet> and that's how many generators starting with 5 there are after 6
08:48:57 <Patashu> that's odd
08:48:57 <CakeProphet> > length $ takeWhile (==4) $ dropWhile (==5) $ dropWhile (==6) $ (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:48:59 <lambdabot> 53668
08:49:03 <CakeProphet> oh look.
08:49:14 -!- guy_ has joined.
08:49:18 <CakeProphet> I guess it's just how the generator works from the seed number.
08:49:21 <Patashu> > randomR (1,6) (getStdGen)
08:49:22 <lambdabot> No instance for (System.Random.RandomGen
08:49:22 <lambdabot> (GHC.Types.IO ...
08:49:26 <Patashu> hmmm
08:49:36 <CakeProphet> :t mkStdGen
08:49:37 <lambdabot> Int -> StdGen
08:49:45 <Patashu> :t getStdGen
08:49:45 <lambdabot> IO StdGen
08:49:55 <Patashu> so I need to unwrap it
08:50:00 <Patashu> :t pure getStdGen
08:50:01 <lambdabot> forall (f :: * -> *). (Applicative f) => f (IO StdGen)
08:50:01 <CakeProphet> good luck with that.
08:50:03 <Patashu> lol
08:50:32 <CakeProphet> > length $ takeWhile (==3) $ dropWhile (==4) $ dropWhile (==5) $ dropWhile (==6) $ (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:50:34 <lambdabot> 53669
08:50:44 <oerjan> > mkStdGen 42
08:50:45 <lambdabot> 43 1
08:50:56 <CakeProphet> 5366[89] always
08:51:19 -!- guy_ has quit (Changing host).
08:51:19 -!- guy_ has joined.
08:51:24 <oerjan> Patashu: you cannot use getStdGen in lambdabot, it doesn't allow IO actions
08:51:32 <Patashu> ah, ok
08:51:48 <CakeProphet> you might be able to use !haskell for that hough
08:51:53 <oerjan> yes
08:52:14 <CakeProphet> > length $ takeWhile (==2) $ dropWhile (==3) $ dropWhile (==4) $ dropWhile (==5) $ dropWhile (==6) $ (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:52:15 <lambdabot> 53668
08:52:30 <CakeProphet> oerjan: do all of these $'s hurt your mathematician eyes?
08:52:39 <oerjan> AYEEE
08:52:43 <CakeProphet> I can change it to . if you like.
08:52:45 <Patashu> get dolla dolla bill
08:53:42 <CakeProphet> > length takeWhile (==1) . dropWhile (==2) . dropWhile (==3) . dropWhile (==4) . dropWhile (==5) . dropWhile (==6) . (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:53:43 <lambdabot> Couldn't match expected type `[a]'
08:53:44 <lambdabot> against inferred type `(a1 -> GH...
08:53:49 <CakeProphet> > length . takeWhile (==1) . dropWhile (==2) . dropWhile (==3) . dropWhile (==4) . dropWhile (==5) . dropWhile (==6) . (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:53:50 <lambdabot> No instance for (GHC.Num.Num [a])
08:53:50 <lambdabot> arising from the literal `1' at <inter...
08:53:54 <CakeProphet> ....or maybe I can't.
08:54:18 <CakeProphet> > length . takeWhile (==1) . dropWhile (==2) . dropWhile (==3) . dropWhile (==4) . dropWhile (==5) . dropWhile (==6) $ (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:54:20 <lambdabot> 53668
08:54:32 <CakeProphet> > dropWhile (==1) . dropWhile (==2) . dropWhile (==3) . dropWhile (==4) . dropWhile (==5) . dropWhile (==6) $ (head . randomRs (1,6) . mkStdGen) <$> [1..]
08:54:34 <lambdabot> [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,...
08:54:39 <CakeProphet> so yeah, then it starts over.
08:55:44 <oerjan> CakeProphet: one usually needs to keep one $ :D
08:55:57 <oerjan> > 53668*6
08:55:58 <lambdabot> 322008
08:56:13 <oerjan> > 53667*6
08:56:14 <lambdabot> 322002
08:56:27 <CakeProphet> > dropWhile (==1) . dropWhile (==2) . dropWhile (==3) . dropWhile (==4) . dropWhile (==5) . dropWhile (==6) . dropWhile (==7) $ (head . randomRs (1,7) . mkStdGen) <$> [1..]
08:56:28 <lambdabot> [5,7,2,4,6,1,3,5,7,2,4,6,1,3,5,7,2,4,6,1,3,5,7,2,4,6,1,3,5,7,2,4,6,1,3,5,7,...
08:56:47 <CakeProphet> > dropWhile (==7) $ (head . randomRs (1,7) . mkStdGen) <$> [1..]
08:56:49 <lambdabot> [3,5,7,2,4,6,1,3,5,7,2,4,6,1,3,5,7,2,4,6,1,3,5,7,2,4,6,1,3,5,7,2,4,6,1,3,5,...
08:56:51 -!- MigoMipo has joined.
08:56:55 <oerjan> > 53669*6
08:56:56 <lambdabot> 322014
08:57:03 <CakeProphet> so... it's apparently unique to (1,6)?
08:57:09 <CakeProphet> (1,7) doesn't do it.
08:57:39 <oerjan> > 2^18
08:57:40 <lambdabot> 262144
08:58:02 <CakeProphet> > map (2^) [18..]
08:58:02 <lambdabot> [262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,1...
08:58:12 <oerjan> @src randomR Integer
08:58:12 <lambdabot> Source not found.
08:58:23 <oerjan> @source System.Random
08:58:23 <lambdabot> http://darcs.haskell.org/packages/base/System/Random.hs
08:58:28 <CakeProphet> so something about 6 makes it do that.
08:58:44 <CakeProphet> > (head . randomRs (1,2) . mkStdGen) <$> [1..]
08:58:45 <lambdabot> [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,...
08:58:49 <CakeProphet> and 2 as well
08:58:56 <CakeProphet> > (head . randomRs (1,4) . mkStdGen) <$> [1..]
08:58:57 <lambdabot> [2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,...
08:58:58 <oerjan> now that's an outdated command :(
08:58:59 <Patashu> not the best rng I've ever seen
08:59:12 <CakeProphet> 4 is interesting. :)
08:59:18 <CakeProphet> > (head . randomRs (1,8) . mkStdGen) <$> [1..]
08:59:19 <lambdabot> [2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,...
08:59:31 <CakeProphet> another repeating sequence as well.
09:00:28 <CakeProphet> > take 53669 $ (head . randomRs (1,8) . mkStdGen) <$> [1..]
09:00:29 <lambdabot> [2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,...
09:00:40 <CakeProphet> > drop 53669 $ (head . randomRs (1,8) . mkStdGen) <$> [1..]
09:00:42 <lambdabot> [5,3,1,7,5,3,1,7,5,3,1,7,5,3,1,7,5,3,1,7,5,3,1,7,5,3,1,7,5,3,1,7,5,3,1,7,5,...
09:01:19 <oerjan> wtf doesn't http://hackage.haskell.org/package/base list System.Random
09:01:19 <CakeProphet> > drop (53668/2) $ (head . randomRs (1,8) . mkStdGen) <$> [1..]
09:01:20 <lambdabot> No instance for (GHC.Real.Fractional GHC.Types.Int)
09:01:20 <lambdabot> arising from a use o...
09:01:35 <Vorpal> CakeProphet, that is one hell of a short period for repetition on that prng!
09:01:35 <CakeProphet> > drop (53669`div`2) $ (head . randomRs (1,8) . mkStdGen) <$> [1..]
09:01:37 <lambdabot> [6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,4,2,8,6,...
09:01:41 <Patashu> lol
09:01:55 <Patashu> it'd be better to use a hash
09:01:55 <CakeProphet> > drop (53669-4) $ (head . randomRs (1,8) . mkStdGen) <$> [1..]
09:01:57 <lambdabot> [8,6,3,7,5,3,1,7,5,3,1,7,5,3,1,7,5,3,1,7,5,3,1,7,5,3,1,7,5,3,1,7,5,3,1,7,5,...
09:02:10 <CakeProphet> ....yep, the period is always 536699
09:02:25 <Vorpal> CakeProphet, that is rather short
09:02:46 <oerjan> Vorpal: it's not the repetition of the prng for _one_ seed, but it's beginning value across several
09:02:55 <oerjan> *its
09:03:02 <Vorpal> oerjan, uh... slow startup time?
09:03:09 <Vorpal> or what do you mean
09:03:47 <CakeProphet> Vorpal: we are taking the first value produced for each seed [1,inf]
09:03:55 <Vorpal> ah
09:04:16 <Vorpal> CakeProphet, well... that is strange still. Always giving you similar values
09:04:25 <CakeProphet> yes, for the first one.
09:04:44 <CakeProphet> > drop (53669-4) $ (head . tail . randomRs (1,8) . mkStdGen) <$> [1..]
09:04:45 <lambdabot> [1,3,6,7,8,4,5,6,8,3,4,5,7,2,3,4,6,1,2,3,5,8,1,2,4,7,8,1,3,6,7,8,2,5,6,7,1,...
09:04:53 <Vorpal> CakeProphet, what is the period of the prng though?
09:04:58 <CakeProphet> no clue.
09:05:12 <CakeProphet> so yeah it's not so repetitive on the second value.
09:05:15 <CakeProphet> > drop (53669-4) $ (head . tail . randomRs (1,6) . mkStdGen) <$> [1..]
09:05:17 <lambdabot> [1,1,6,5,4,4,3,2,2,1,6,5,5,4,3,2,2,1,6,5,5,4,3,2,2,1,6,5,5,4,3,2,2,1,6,5,5,...
09:05:32 <CakeProphet> the oscillation is larger
09:05:34 <oerjan> http://hackage.haskell.org/packages/archive/random/latest/doc/html/src/System-Random.html#randomRs
09:05:43 <Vorpal> CakeProphet, I presume slow startup time
09:06:04 <CakeProphet> before it had a period of 4, now it's.... 8
09:06:15 <CakeProphet> > drop (53669-4) $ (head . tail . tail . randomRs (1,6) . mkStdGen) <$> [1..]
09:06:17 <lambdabot> [3,2,6,5,3,1,6,4,2,1,5,4,2,6,5,3,1,6,4,2,1,5,4,2,6,5,3,1,6,4,3,1,5,4,2,6,5,...
09:06:55 <CakeProphet> this one is 10 I believe.
09:07:01 <Vorpal> CakeProphet, wait what. Period of 8? Come on... something like 2^31-1 is the least I would expect for period from a decent PRNG
09:07:19 <CakeProphet> period for this pattern that we've noticed in the nth value from a given seed.
09:07:22 <Vorpal> ah
09:07:44 <CakeProphet> > randomRs (1,6) $ mkStdGen 42
09:07:45 <lambdabot> [6,4,2,5,3,2,1,6,1,4,4,4,1,3,3,2,6,2,4,1,3,1,1,5,5,5,1,3,6,1,5,6,1,3,5,4,1,...
09:07:46 <Vorpal> still this is really *really* bad
09:09:06 <oerjan> Vorpal: it's not a problem if you get the seed from the system clock or something
09:09:49 <CakeProphet> but then you're in IO, yes?
09:09:56 <CakeProphet> but... I guess that's not a problem either.
09:10:23 <Vorpal> oerjan, well... I would say it still is a problem then that this PRNGs has such a large setup time
09:10:26 <CakeProphet> because the functions that are computing pseudo-random numbers are still pure.
09:10:35 <oerjan> | otherwise = case (f n 1 rng) of (v, rng') -> (fromInteger (l + v `mod` k), rng')
09:10:42 <Vorpal> one way to combat this would be to step it forward a few steps in mkStdGen
09:10:46 <Vorpal> before returning it
09:11:15 <CakeProphet> say, by 1000?
09:11:21 <oerjan> i really don't like that mod there, isn't that a flawed way of getting a ranged value from an rng :(
09:11:39 <Vorpal> CakeProphet, possibly. Would have to investigate it to find out what a good value for the stepping would be.
09:11:46 <oerjan> (in randomIvalInteger)
09:12:21 <Vorpal> oerjan, what is the range of the integers before the mod?
09:14:22 <oerjan> > range (mkStdGen undefined)
09:14:23 <lambdabot> Couldn't match expected type `(a, a)'
09:14:23 <lambdabot> against inferred type `System...
09:14:26 <oerjan> erm
09:14:28 <Vorpal> oerjan, I don't like the magic constants in stdNext and stdSplit
09:14:30 <oerjan> :t range
09:14:30 <lambdabot> forall a. (Ix a) => (a, a) -> [a]
09:14:35 <oerjan> wrong range
09:15:12 <oerjan> -- This implementation uses the Portable Combined Generator of L'Ecuyer
09:15:12 <oerjan> -- ["System.Random\#LEcuyer"] for 32-bit computers, transliterated by
09:15:12 <oerjan> -- Lennart Augustsson. It has a period of roughly 2.30584e18.
09:15:37 <Vorpal> hm
09:15:50 <Vorpal> not familiar with that prng
09:16:01 <oerjan> > genRange (mkStdGen undefined)
09:16:01 <lambdabot> (0,2147483562)
09:16:09 <CakeProphet> You are apeshit bananas at computers, and you know ALL THE CODES. All of them. You are the unchallenged authority on APICULTURE NETWORKING. And though all your friends recognize your unparalleled achievements as a TOTALLY SICK HACKER, you feel like you could be better. It's one of a number of things you SORT OF BEAT YOURSELF UP ABOUT for NO VERY GOOD REASON during sporadic and debilitating BIPOLAR MOOD SWINGS. You have a
09:16:11 <Vorpal> :t undefined
09:16:12 <lambdabot> forall a. a
09:16:15 <Vorpal> :t mkStdGen
09:16:16 <lambdabot> Int -> StdGen
09:16:21 <Vorpal> hrrm
09:16:29 <Vorpal> :t genRange
09:16:29 <lambdabot> forall g. (RandomGen g) => g -> (Int, Int)
09:16:50 <oerjan> ok that's the same number as in randomIvalInteger, i think
09:16:54 <oerjan> wait wtf
09:16:59 <Vorpal> CakeProphet, err?
09:17:11 <Vorpal> CakeProphet, is this homestuck or something?
09:17:33 <oerjan> that means ghc's randomR _only_ works for random number generators with the same range as StdGen!
09:17:52 <Vorpal> oerjan, if that is true, file a bug
09:18:01 <CakeProphet> Vorpal: yes.
09:18:14 <Vorpal> CakeProphet, ah
09:18:20 <Vorpal> CakeProphet, haven't been keeping up lately
09:26:27 -!- augur has quit (Read error: Connection reset by peer).
09:26:48 -!- augur has joined.
09:33:05 -!- oerjan has quit (Quit: Panic attack).
09:57:36 <CakeProphet> what the hell Perl.
09:57:50 <CakeProphet> $#array returns the last index of the array
09:58:05 <CakeProphet> as opposed to every other language ever, which returns the actual size.
09:58:37 <CakeProphet> I suppose in most cases you want the last index, but still. Not knowing that was the source of a bug.
09:59:09 <quintopia> isn't there another thing that you can use to get the size?
09:59:21 <CakeProphet> not that I'm aware of.
10:01:55 <CakeProphet> yeah I don't see a built-in function to get the length of a list
10:02:02 <CakeProphet> only the $# form for arrays.
10:02:33 <quintopia> huh
10:05:18 <CakeProphet> list != array, here.
10:05:24 <CakeProphet> though they are very very similar.
10:05:35 -!- wareya has quit (Read error: Connection reset by peer).
10:06:00 <CakeProphet> an array is basically a list stored in a variable. @array produces a list from the "array", which is the variable or whatever.
10:06:11 <CakeProphet> lists are what Perl then operates on when it does stuff.
10:06:22 <CakeProphet> and can look (1,2,3,4,5,6) as well.
10:06:27 <CakeProphet> or function 1,2,3,4,5
10:06:36 -!- wareya has joined.
10:06:41 <CakeProphet> or my ($x, $y) = (1,2)
10:08:02 <CakeProphet> (don't ask me why I decided to explain all of that. You might have even knew beforehand)
10:08:24 <quintopia> nah, i'm lousy at perl
10:09:21 <Vorpal> <CakeProphet> an array is basically a list stored in a variable. @array produces a list from the "array", which is the variable or whatever.
10:09:26 <Vorpal> then shouldn't something like...
10:09:33 <Vorpal> $#@array
10:09:35 <Vorpal> work?
10:09:37 <CakeProphet> ....no
10:09:41 <CakeProphet> it's $#array
10:09:44 <CakeProphet> which is probably what you mean.
10:09:53 <Vorpal> CakeProphet, I meant for getting the length
10:09:55 <CakeProphet> $# is a special sigil thing.
10:09:57 <CakeProphet> right.
10:10:03 <Vorpal> CakeProphet, as opposed to last index
10:10:08 <CakeProphet> oh... no.
10:10:21 <CakeProphet> $#@ is a syntax error I think.
10:10:36 <Vorpal> CakeProphet, what about $#(@array) then?
10:10:40 <CakeProphet> nope.
10:10:52 <Vorpal> uh okay
10:10:55 <CakeProphet> $#array is exactly what you want. if I want the size I just add one
10:11:04 <CakeProphet> I was just noting that it's inconsistent with most languages I've seen.
10:11:07 <Vorpal> CakeProphet, what if it is a sparse array?
10:11:13 <Vorpal> if perl does that
10:11:17 <CakeProphet> I don't think that exists in Perl.
10:11:19 <Vorpal> ah
10:11:23 <Vorpal> well okay then that works
10:12:07 <CakeProphet> there's likely a CPAN module for a sparse array, which would use some kind of OO interface to get size and last index
10:12:18 <CakeProphet> and have an overload on the subscript [] operation
10:12:31 <Vorpal> heh
10:12:48 <Vorpal> CakeProphet, why exactly are you learning perl?
10:12:55 <Vorpal> morbid curiosity?
10:12:59 <CakeProphet> hmmm, well.
10:13:26 <Vorpal> CakeProphet, can it be anything except morbid curiosity? :P
10:13:58 <Vorpal> well I sadly don't have time to wait for your answer, have to make food now unless I want to wait for about 5 hours
10:13:58 <CakeProphet> I feel it will be useful later in the event that I become a sysadmin or something along those lines. Also, I decided to learn it simply for the knowledge, because I am trying to become experienced with as many languages possible, but now I've found that Perl is actually very good at some of the small programming tasks I end up doing often.
10:14:18 <Vorpal> ah
10:14:48 <CakeProphet> better than Python, which is what I was using towards that end previously.
10:18:12 -!- zzo38 has joined.
10:35:06 <zzo38> " !!!"
10:37:13 -!- zzo38 has quit (Read error: Connection reset by peer).
10:38:17 -!- zzo38 has joined.
10:38:49 -!- BeholdMyGlory has joined.
10:40:53 <Vorpal> <zzo38> " !!!" <-- can you please expand on this?
10:41:17 <zzo38> No.
10:41:40 <Vorpal> oh come on that is easy, just add more spaces or exclamation marks!
10:41:57 <zzo38> You can do that yourself if you want to.
10:43:31 <Lymia> !python import __builtin__;__builtin__.len=lambda x:-1:print []
10:43:31 <EgoBot> File "<stdin>", line 1
10:43:39 <Lymia> !python import __builtin__;__builtin__.len=lambda x:-1;print []
10:43:41 <EgoBot> ​[]
10:43:45 <zzo38> I keep getting a request for /wiki/index.php?title=User:NO_Body&action=edit on my HTTP server occasionally. I never had a file called that on my server (I do know what server does contain that file).
10:43:46 <Lymia> !python import __builtin__;__builtin__.len=lambda x:-1;print [1,2,3,4,5,6]
10:43:47 <EgoBot> ​[1, 2, 3, 4, 5, 6]
10:43:51 <Lymia> !python import __builtin__;__builtin__.len=lambda x:100;print [1,2,3,4,5,6]
10:43:51 <EgoBot> ​[1, 2, 3, 4, 5, 6]
10:43:59 <Lymia> !python import __builtin__;__builtin__.len=lambda x:100;len([1,2,3,4,5,6]_;print [1,2,3,4,5,6]
10:44:00 <EgoBot> File "<stdin>", line 1
10:44:06 <Lymia> !python import __builtin__;__builtin__.len=lambda x:100;len([1,2,3,4,5,6]);print [1,2,3,4,5,6]
10:44:08 <EgoBot> ​[1, 2, 3, 4, 5, 6]
10:44:11 <Lymia> !python import __builtin__;__builtin__.len=lambda x:100;len([1,2,3,4,5,6]);print repr([1,2,3,4,5,6])
10:44:12 <EgoBot> ​[1, 2, 3, 4, 5, 6]
10:44:13 <CakeProphet> ...there is absolutely no reason to import __builtin__
10:44:14 <Lymia> :<
10:44:21 <Vorpal> __builtin__.len ??
10:44:32 <Lymia> !python import __builtin__;__builtin__.len=lambda x:100;print len([1,2,3,4,5,6]);print repr([1,2,3,4,5,6])
10:44:32 <EgoBot> 100
10:44:42 <Vorpal> Lymia, why do you import __builtin__.len?
10:44:47 <Vorpal> isn't that the same as the normal len
10:44:50 <CakeProphet> to do evil things.
10:44:52 <CakeProphet> well no
10:44:59 <CakeProphet> not if you want to redefine it.
10:45:08 <Vorpal> CakeProphet, what is the difference then?
10:45:13 <zzo38> What is *this* request for: "POST http://203.55.174.173:6667/ HTTP/1.0"
10:45:15 <CakeProphet> re-defining len will just make a local copy
10:45:22 <Vorpal> aha
10:45:25 <CakeProphet> if you want to change len for everything everywhere... then you would resort to that hackish nonsense.
10:45:33 <Vorpal> CakeProphet, why on earth not just override __len__ in your class?
10:45:42 <CakeProphet> Vorpal: because that's not hackish enough.
10:45:45 <Vorpal> hah
10:46:17 <Lymia> Buh.
10:46:17 <Lymia> No idea why this doesn't work as I expect.
10:46:27 <Vorpal> zzo38, someone trying to connect to irc by assuming your site is a proxy of some sort maybe?
10:46:30 <CakeProphet> Lymia: how is it not working as you expect?
10:47:06 <zzo38> Maybe, but it is a POST request. I also got one which is the same but with 127.0.0.1 instead of 203.55.174.173
10:47:57 <zzo38> I also got some proxy request on port 7181 to some other computer using GET
10:48:01 <Vorpal> zzo38, well
10:48:03 <Vorpal> $ host 203.55.174.173
10:48:03 <Vorpal> 173.174.55.203.in-addr.arpa domain name pointer alicorn.furnet.info.
10:48:03 <Vorpal> 173.174.55.203.in-addr.arpa domain name pointer alicorn.furnet.org.
10:48:13 <Vorpal> sounds like an irc network to me
10:48:47 <CakeProphet> Lymia: repr() and len() have nothing to do with each other. They're both __len__ and __repr__ on the list class, and likely use C internals to calculate their values. Thus changing __builtin__.len will not have any effect on repr for lists, because len will never be called.
10:49:19 <zzo38> Yes it does sound like an IRC network. But the request still doesn't make sense?
10:49:48 <CakeProphet> list.__repr__ probably uses list.__iter__, or the C-equivalent API for iterating on lists.
10:49:48 <Vorpal> bbl
10:50:43 <zzo38> I also got "CONNECT 127.0.0.1:6667 HTTP/1.0"
10:51:16 <Lymia> !py str.__len__=lambda self:-1;print len("a")
10:51:29 <Lymia> !addinterp py python
10:51:29 <EgoBot> ​Interpreter py installed.
10:51:30 <Lymia> !py str.__len__=lambda self:-1;print len("a")
10:51:31 <zzo38> More than once.
10:51:46 <CakeProphet> !languages
10:51:52 <CakeProphet> !help languages
10:51:52 <EgoBot> ​languages: Esoteric: 1l 2l adjust asm axo bch befunge befunge98 bf bf8 bf16 bf32 boolfuck cintercal clcintercal dimensifuck glass glypho haskell kipple lambda lazyk linguine malbolge pbrain perl qbf rail rhotor sadol sceql trigger udage01 underload unlambda whirl. Competitive: bfjoust fyb. Other: asm c cxx forth sh.
10:52:01 <CakeProphet> There is no python interpreter on egobot.
10:52:09 <Lymia> !py print "o rly"
10:52:18 <CakeProphet> oh wait, yes there is
10:52:20 <Lymia> !python print "ahem"
10:52:21 <EgoBot> ahem
10:52:21 <CakeProphet> because you just used it.
10:52:31 <Lymia> !python print version
10:52:32 <EgoBot> Traceback (most recent call last):
10:52:41 <CakeProphet> !delinterp py
10:52:41 <EgoBot> ​Interpreter py deleted.
10:52:49 <zzo38> The same thing with the User:NO_Body request I get more than once. But that one is not even a proxy request, it is a request for the file on my server, which I do not even have (I know which server it is on, or at least was many years ago).
10:53:17 <CakeProphet> !python str.__len__=lambda self: -1; print len("A")
10:53:18 <EgoBot> Traceback (most recent call last):
10:53:37 <zzo38> I seem to get requests for "proxyheader.php" on different servers
10:54:06 <CakeProphet> <EgoBot> TypeError: can't set attributes of built-in/extension type 'str'
10:54:12 <CakeProphet> Lymia: foiled
10:54:19 <Sgeo> http://answers.yahoo.com/question/index?qid=20090611071837AAGVVCX someone actually felt the need to ask in Yahoo! Answers
10:54:33 <Sgeo> I mean, I Googled it, but only to use the calculator because I'm lazy
10:55:24 <Sgeo> Lazyness something something virtue
10:56:00 <CakeProphet> I actually use sh as my calculator
10:56:04 <zzo38> I also get request for /wiki/index.php?title=Special:Userlogin&returnto=Image:NB_Art_REF.png (on the same server as the other file)
10:56:22 <CakeProphet> ghci if I'm trying to do something complicated involving sequences.
10:56:40 <Lymia> > 1 + 1
10:56:40 <lambdabot> 2
10:56:51 <Lymia> Bask in Haskell's glory
10:57:00 <CakeProphet> > e
10:57:01 <lambdabot> e
10:57:05 <Patashu> > aeiou
10:57:06 <lambdabot> Not in scope: `aeiou'
10:57:10 <CakeProphet> hmmm, where can I find e in Haskell?
10:57:13 <Sgeo> [S] All: Behold Glory of Haskell
10:57:13 <Patashu> :t e
10:57:14 <lambdabot> Expr
10:57:16 <CakeProphet> > log 1
10:57:17 <lambdabot> 0.0
10:57:19 <Lymia> > e + e
10:57:20 <lambdabot> e + e
10:57:26 <Lymia> > t
10:57:27 <lambdabot> t
10:57:28 <Lymia> > g
10:57:29 <lambdabot> Ambiguous type variable `a' in the constraints:
10:57:29 <lambdabot> `SimpleReflect.FromExpr ...
10:57:32 <Lymia> :c
10:57:33 <Lymia> wat
10:57:33 <zzo38> I already told MFGG that I do not have their wiki on my server!!
10:57:37 <Lymia> > e 2
10:57:38 <lambdabot> Couldn't match expected type `t1 -> t'
10:57:38 <lambdabot> against inferred type `Simpl...
10:58:01 <CakeProphet> Lymia: f and g are function Expr things
10:58:07 <CakeProphet> > f 2
10:58:08 <lambdabot> Ambiguous type variable `a' in the constraints:
10:58:08 <lambdabot> `SimpleReflect.FromExpr ...
10:58:10 <CakeProphet> > f a
10:58:11 <lambdabot> Ambiguous type variable `a' in the constraints:
10:58:11 <lambdabot> `GHC.Show.Show a'
10:58:12 <lambdabot> a...
10:58:15 <CakeProphet> ...er
10:58:16 <CakeProphet> yeah.
10:58:19 <CakeProphet> > fix f
10:58:20 <lambdabot> Ambiguous type variable `a' in the constraints:
10:58:20 <lambdabot> `GHC.Show.Show a'
10:58:20 <lambdabot> a...
10:58:24 <CakeProphet> > fix f :: Expr
10:58:25 <lambdabot> f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (...
10:58:30 <Patashu> > 'aeiou'
10:58:31 <lambdabot> <no location info>:
10:58:31 <lambdabot> lexical error in string/character literal at chara...
10:58:35 <CakeProphet> > f a :: Expr
10:58:35 <lambdabot> f a
10:58:37 <Patashu> > Show "Aeiou"
10:58:38 <lambdabot> Not in scope: data constructor `Show'
10:58:42 <Patashu> > Show 'Aeiou'
10:58:43 <lambdabot> <no location info>:
10:58:43 <lambdabot> lexical error in string/character literal at chara...
10:58:45 <CakeProphet> Patashu: double quotes.
10:58:45 <Patashu> lol
10:58:49 <Patashu> > "Aeiou"
10:58:50 <lambdabot> "Aeiou"
10:58:51 <Patashu> ah ok
10:58:55 <Patashu> > 'a'
10:58:56 <lambdabot> 'a'
10:58:57 <Patashu> mmk
10:59:12 <CakeProphet> > succ 'a'
10:59:13 <lambdabot> 'b'
10:59:16 <CakeProphet> > succ "a"
10:59:17 <lambdabot> No instance for (GHC.Enum.Enum [GHC.Types.Char])
10:59:17 <lambdabot> arising from a use of `...
10:59:40 <Patashu> map succ "a"
10:59:45 <Patashu> oops
10:59:48 <Patashu> > map succ "A"
10:59:48 <lambdabot> "B"
10:59:51 <Patashu> yesss
10:59:56 <CakeProphet> > succ <$> "A"
10:59:57 <lambdabot> "B"
11:00:09 <zzo38> I get spambots filling in a search page.
11:00:11 <Patashu> repeat 13 $ map succ "A"
11:00:18 <Patashu> > repeat 13 $ map succ "A"
11:00:19 <lambdabot> Couldn't match expected type `a -> b' against inferred type `[t]'
11:00:22 <Patashu> hmmm
11:00:22 <CakeProphet> not what you want.
11:00:24 <Patashu> :t repeat
11:00:25 <lambdabot> forall a. a -> [a]
11:00:27 <CakeProphet> > repeat 13
11:00:28 <Patashu> oh
11:00:28 <lambdabot> [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13...
11:00:30 <Patashu> yeah
11:00:33 <CakeProphet> you want replicate
11:00:35 <Patashu> what's the one that only does it 13 times
11:00:36 <Patashu> aah
11:00:44 <Patashu> > replicate 13 $ map succ "A"
11:00:44 <lambdabot> ["B","B","B","B","B","B","B","B","B","B","B","B","B"]
11:00:46 <Patashu> ah, no
11:00:51 <zzo38> I get requests consisting of (apparently) completely random bytes, not even with a proper HTTP request method.
11:00:56 <Patashu> I want 'do this 13 times'
11:01:06 <CakeProphet> Patashu: take 13 . iterate
11:01:16 <Patashu> take 13 . iterate . map succ "A"
11:01:20 <Patashu> > take 13 . iterate . map succ "A"
11:01:21 <lambdabot> Couldn't match expected type `[a]'
11:01:22 <lambdabot> against inferred type `a1 -> [a1]'
11:01:28 <CakeProphet> ... use $ instead of dot between iterate and map
11:01:35 <Patashu> > take 13 . iterate $ map succ "A"
11:01:35 <lambdabot> Couldn't match expected type `[a]'
11:01:35 <lambdabot> against inferred type `a1 -> [a1]'
11:01:42 <CakeProphet> er wait nevermind
11:01:44 <Patashu> > take 13 $ iterate $ map succ "A"
11:01:45 <lambdabot> Couldn't match expected type `a -> a'
11:01:45 <lambdabot> against inferred type `[GHC.T...
11:01:46 <CakeProphet> you want this
11:01:47 <Patashu> lol
11:02:00 <CakeProphet> > take 13 . iterate succ 'a'
11:02:01 <lambdabot> Couldn't match expected type `[a]'
11:02:01 <lambdabot> against inferred type `GHC.Types...
11:02:07 <CakeProphet> > take 13 . iterate $ succ 'a'
11:02:07 <lambdabot> Couldn't match expected type `[a]'
11:02:08 <lambdabot> against inferred type `a1 -> [a1]'
11:02:10 <CakeProphet> ...
11:02:13 <CakeProphet> :t iterate
11:02:13 <lambdabot> forall a. (a -> a) -> a -> [a]
11:02:30 <Patashu> iterate succ 'a'
11:02:33 <Patashu> > iterate succ 'a'
11:02:34 <lambdabot> "abcdefghijklmnopqrstuvwxyz{|}~\DEL\128\129\130\131\132\133\134\135\136\137...
11:02:39 <Patashu> okay
11:02:45 <CakeProphet> :t take 13 . iterate
11:02:46 <lambdabot> Couldn't match expected type `[a]'
11:02:46 <lambdabot> against inferred type `a1 -> [a1]'
11:02:46 <lambdabot> Probable cause: `iterate' is applied to too few arguments
11:02:49 <CakeProphet> :t take
11:02:50 <lambdabot> forall a. Int -> [a] -> [a]
11:02:51 <Patashu> > (iterate succ 'a') !! 13
11:02:52 <lambdabot> 'n'
11:03:01 <Patashu> can I do...
11:03:12 <Patashu> > (13 !!) $ iterate succ 'a'
11:03:12 <lambdabot> Couldn't match expected type `GHC.Types.Int'
11:03:13 <lambdabot> against inferred type ...
11:03:14 <Patashu> nope
11:03:17 <Patashu> :t !!
11:03:18 <lambdabot> parse error on input `!!'
11:03:30 <CakeProphet> > take 13 . iterate succ $ 'a'
11:03:32 <lambdabot> "abcdefghijklm"
11:03:52 <CakeProphet> Patashu: if you want only the 13th one, sure.
11:03:55 <Patashu> > tail . take 13 . iterate succ $ 'a'
11:03:57 <lambdabot> "bcdefghijklm"
11:03:59 <Patashu> oh
11:04:02 <Patashu> > last . take 13 . iterate succ $ 'a'
11:04:03 <lambdabot> 'm'
11:04:16 <Patashu> > map . last . take 13 . iterate succ $ "aeiou"
11:04:17 <lambdabot> Couldn't match expected type `a -> b'
11:04:17 <lambdabot> against inferred type `[GHC.T...
11:04:34 <Patashu> > map $ last . take 13 . iterate succ $ "aeiou"
11:04:35 <lambdabot> Couldn't match expected type `a -> b'
11:04:35 <lambdabot> against inferred type `[GHC.T...
11:04:36 <CakeProphet> Patashu: I don't know where you get this idea you can tact on an arbitrary function and expect something to happen....
11:04:42 <Patashu> > map (last . take 13 . iterate succ) $ "aeiou"
11:04:44 <lambdabot> "mqu{\129"
11:04:48 <Patashu> there we go
11:05:20 <Patashu> > map last . take 13 . iterate . succ $ "aeiou"
11:05:21 <lambdabot> Couldn't match expected type `[[a]]'
11:05:22 <lambdabot> against inferred type `a1 -> [...
11:05:24 <Patashu> hmm
11:05:49 <CakeProphet> > (!!13) . iterate succ $ 'a'
11:05:51 <lambdabot> 'n'
11:06:01 <CakeProphet> Patashu: think about how last works
11:06:03 <CakeProphet> and how map works.
11:06:06 <Patashu> > map (!!13 . iterate succ) $ "I'm laughing for real right now guys"
11:06:06 <CakeProphet> :t last
11:06:06 <lambdabot> Couldn't match expected type `GHC.Types.Int'
11:06:07 <lambdabot> against inferred type ...
11:06:07 <lambdabot> forall a. [a] -> a
11:06:07 <CakeProphet> :t map
11:06:08 <lambdabot> forall a b. (a -> b) -> [a] -> [b]
11:06:09 <Patashu> blar
11:06:11 <Patashu> oh wait
11:06:14 <Patashu> > map ((!!13) . iterate succ) $ "I'm laughing for real right now guys"
11:06:15 <lambdabot> "V4z-yn\130tuv{t-s|\DEL-\DELrny-\DELvtu\129-{|\132-t\130\134\128"
11:06:18 <Patashu> there we go lol
11:06:41 <CakeProphet> oh rot13? kind of.
11:07:43 <CakeProphet> > map ((!!13).(
11:07:44 <lambdabot> <no location info>: parse error (possibly incorrect indentation)
11:07:49 <zzo38> Why do I get so many CONNECT 127.0.0.1:6667 requests? They seem to be once each day, always from the same client requesting it. Each time it also comes with a POST request to the same address.
11:08:45 <zzo38> Actually at irregular intervals.
11:10:57 <CakeProphet> > map ((!!13).(\c -> iterate (if c > 'm' || c > 'M' then pred else succ) c)) "Hello World"
11:10:58 <lambdabot> "UX__b-Jbe_W"
11:11:11 <CakeProphet> I don't think I did that correctly.
11:11:26 <CakeProphet> !rot13 Hello, World!
11:11:26 <EgoBot> Uryyb, Jbeyq!
11:11:40 <CakeProphet> ah... of course not.
11:12:36 <CakeProphet> > map ((!!13).(\c -> iterate (if toLower c > 'm' then pred else succ) c)) "Hello World"
11:12:38 <lambdabot> "Uryyb-Jbeyq"
11:12:46 <CakeProphet> crude. :P
11:13:25 <CakeProphet> Haskell's not really the best language for this application, without the use of some library I know nothing about.
11:15:39 <CakeProphet> !perl $_='Hello World'; tr/a-zA-Z/n-za-mN-ZA-M/; print
11:15:39 <EgoBot> Uryyb Jbeyq
11:17:15 <CakeProphet> !perl $_='This is by far the most complex cypher in the world'; tr/a-zA-Z/z-aZ-A/; print
11:17:15 <EgoBot> Invalid range "z-a" in transliteration operator at /tmp/input.3064 line 1.
11:17:28 <CakeProphet> what? how silly.
11:17:32 <Sgeo> Why does Perl being demonstratably useful for something make me sad?
11:17:41 <CakeProphet> Sgeo: dunno. it shouldn't.
11:18:44 <CakeProphet> Perl is demonstratably useful for several things. I honestly think most of you guys just look at the syntax and decide to hate it.
11:18:57 <CakeProphet> well, maybe not most.
11:19:03 <Sgeo> Please don't generalize me as being representative of #esoteric
11:19:07 <CakeProphet> some. yes, that's more acceptable, and equally vague.
11:20:06 <CakeProphet> I know elliott probably has some reason for why he dislikes Perl that he'll probably explain when he's online next. And I know pikhq dislikes it from experience.
11:22:06 <CakeProphet> but I suspect a large part of it is the syntax.
11:22:44 <CakeProphet> the vast amounts of it, the "ugliness", and so on.
11:23:12 <Lymia> !tr ja-en This is by far the most complex cypher in the world
11:23:21 <Lymia> :<
11:23:42 <CakeProphet> and then there's stuff like being difficult to debug. Which is true for most dynamically typed interpreted languages, but especially true for Perl, where almost every operation will spit out something (usually undef) in the event that it fails.
11:24:11 <Lymia> Instead of an exception?
11:24:31 <CakeProphet> which leads to poor error handling. Which is to say, there isn't really any of that. No exception handling mechanism. You just add an "or die 'error message'" to the end of a line that you want to halt the program if it fails.
11:25:15 <Lymia> !python raise Exception()
11:25:15 <EgoBot> Traceback (most recent call last):
11:25:16 <CakeProphet> basically you ignore errors in Perl. which is convenient for small scripts, but again, makes things difficult to debug.
11:25:26 <Lymia> !python raise Exception()
11:25:26 <EgoBot> Traceback (most recent call last):
11:25:30 <zzo38> Does Perl6 have possibility to use exceptions then?
11:25:43 <CakeProphet> uh, I honestly don't know much about Perl 6.
11:25:58 <CakeProphet> other than I probably won't like it as much.
11:26:20 <CakeProphet> but yes they're generally improving everything, so I wouldn't be surprised if they added proper exception handling.
11:26:53 <CakeProphet> (I know that sounds pretty inconsistent of me.. but whatever)
11:27:30 <CakeProphet> another problem is the OO semantics are complete crap.
11:27:48 <CakeProphet> but I don't really use Perl as an object-oriented language, so... don't care.
11:30:42 <CakeProphet> what I like about Perl is: a) massive online repository. Probably the largest for any language because it's been around forever. You can find a module to do just about anything and install it quickly (unless it has dependencies that are no longer maintaind or fail for whatever reason) b) massive amounts of syntax, which means that there are shorthands to do just about everything. This is very nice when you're trying to
11:31:25 <Sgeo> Can you make your own syntax adjustments?
11:31:31 <Sgeo> That is, define your own syntax for stuff?
11:31:36 <CakeProphet> and that is my massively sleep deprived rant on the benefits and drawbacks of Perl that I've discovered so far in my few months of learning it. I am now going to sleep. You can pester me about how wrong I am tomorrow. Good night (morning, really)
11:31:41 <CakeProphet> Sgeo: yes.
11:31:44 <Sgeo> oooo
11:32:16 <Sgeo> Night
11:32:47 <Vorpal> CakeProphet, isn't CTAN older than CPAN?
11:33:19 <Vorpal> CakeProphet, also your line got cut off
11:33:24 <Vorpal> "This is very nice when you're trying to "
11:34:05 <CakeProphet> program something quickly. c) excellent string handling capabilities. This goes without saying.
11:34:12 <CakeProphet> http://www.perlmonks.org/?node_id=742468 <--see this
11:34:24 <Vorpal> CakeProphet, anyway I'm pretty sure CTAN is older than CPAN
11:34:32 <Vorpal> of course TeX is not general purpose
11:34:41 <CakeProphet> and: http://search.cpan.org/~pmqs/Filter-1.37/Call/Call.pm
11:34:59 <CakeProphet> Vorpal: oh, well yes. I didn't say it was /the oldest ever/.
11:35:19 <Vorpal> hm true
11:35:49 <CakeProphet> Sgeo: so I'm not sure if it's built directly into the language, but this module lets you modify the source code at compile time.
11:35:53 <Vorpal> CakeProphet, anyway the command line tool for cpan is a pain
11:35:57 <CakeProphet> with all of the hackish regex you could ever want.
11:36:00 <zzo38> TeX is for typesetting stuff but it can be made to do a lot of things.
11:36:04 <CakeProphet> Vorpal: yeah it can be.
11:36:11 <Vorpal> CakeProphet, for a start it tends to conflict with distro package manager, and even when it doesn't, it works badly
11:36:51 <CakeProphet> I haven't that happen. But I have had it fail often due to broken dependencies. I think this just happens on a per-package basis though, when old modules stop being maintained or whatever.
11:37:06 <CakeProphet> and sometimes I'll be missing some kind of C library and it'll take me a while to figure out what it is.
11:37:30 <Vorpal> CakeProphet, doesn't perl have a FFI?
11:37:38 <Vorpal> oh you mean the module depends on a C library
11:37:41 <CakeProphet> right.
11:37:49 <CakeProphet> and, I have no idea, actually.
11:37:51 <Vorpal> surely you get some error like "foo.h not found" or such then
11:37:57 <CakeProphet> ...nope.
11:38:00 <Vorpal> CakeProphet, what?
11:38:05 <Vorpal> what is the error you get then
11:38:08 <CakeProphet> I have to go up to the linker option line that it spits out
11:38:19 <CakeProphet> and see which libraries I have and don't have.
11:38:27 <Vorpal> CakeProphet, okay so foo.a or foo.so or foo.la not found
11:38:32 <Vorpal> surely -_-
11:38:35 <CakeProphet> ...no, nothing that nicely written.
11:38:39 <Vorpal> ugh
11:38:47 <Vorpal> CakeProphet, shouldn't the config process check it anyway
11:39:04 <CakeProphet> but that's okay because Perl is for L33T H4XX0RS LOLOLOLO we can figure this stuff out.
11:39:09 <Vorpal> basically, unless it is libc or libm, configure should check it exists
11:39:14 <CakeProphet> uh.... maybe? I don't really know how cpan works, okay.
11:39:19 <Vorpal> IMO
11:39:37 <Vorpal> CakeProphet, yes but why make it hard for the users
11:39:42 <Vorpal> even if they are programmers
11:40:56 <CakeProphet> ...that is a somewhat loaded question, so I will not answer it. :P
11:41:13 <Vorpal> CakeProphet, how do you mean it is loaded?
11:41:22 <CakeProphet> "Oh, well yes, it's good to make it hard for users because that provides them with a challenge!"
11:41:40 <Vorpal> interesting point of view, did you actually mean it?
11:41:45 <CakeProphet> or, my actual response would be like:
11:41:50 <CakeProphet> uh, I don't know. That's probably a bad idea.
11:42:00 <Vorpal> well okay
11:42:03 <Vorpal> maybe a bit loaded
11:42:06 <CakeProphet> in any case I don't think they /try/ to accomplish that.
11:42:15 <Vorpal> CakeProphet, anyway, cpan is a pain to use.
11:42:26 <CakeProphet> yes when it doesn't work. which is often enough.
11:42:38 <Vorpal> CakeProphet, are you sure they aren't trying to create the IWBTG of package managers?
11:42:41 <Vorpal> ;P
11:43:00 <CakeProphet> ...no. I mean
11:43:10 <CakeProphet> there is a /ridiculous amount/ of output when you install stuff
11:43:15 <CakeProphet> so, there /might/ be something useful in it
11:43:26 <CakeProphet> but it takes a while to sift through.
11:43:33 <Vorpal> CakeProphet, if it uses gnu ld to link I'm pretty sure you should get a easily visible linker warning
11:43:54 <CakeProphet> yeah it does.
11:44:26 <CakeProphet> but I usually don't pipe the output into grep or anything on the first run, so I miss all of that pretty easily.
11:44:38 <Vorpal> $ ld -o test build/main.o -lnosuchlib
11:44:38 <Vorpal> ld: cannot find -lnosuchlib
11:44:40 <Vorpal> for example ^
11:44:52 <Vorpal> CakeProphet, wouldn't it error out on the first error?
11:45:20 <CakeProphet> well... see
11:45:30 <Vorpal> yes?
11:45:32 <CakeProphet> this has been a month ago, and I have a terrible memory. So...
11:45:36 <Vorpal> hm okay
11:45:38 <CakeProphet> maybe?
11:46:16 <CakeProphet> it wasn't a big deal I found out what was missing. But I don't remember an obvious "can't find this lib" thing.
11:46:21 <Vorpal> linker errors tend to be rather straight-forward. Unlike C++ or haskell errors. Heck even C errors are complex compared to linker ones usually.
11:46:34 <CakeProphet> the more frustrating problem is when other Perl modules fail to instal for whatever reason. A test fails or something.
11:46:44 <Vorpal> I only hit confusing linker errors when cross compiling basically.
11:46:58 <Vorpal> CakeProphet, heh
11:47:50 <CakeProphet> but, occasionally problems aside, the sheer amount of modules on CPAN is quite nice.
11:48:28 <CakeProphet> but I agree the cpan program could be a little better.
11:49:14 <CakeProphet> OKAY GOOD NIGHT.
11:49:20 <CakeProphet> !kill everything
11:50:14 <CakeProphet> !rot47 ii could pull 2o much triippy 2hiit out of my 2piinal creviice, iit would make your head 2piin liike dervii2h iin a fuckiing blender.
11:50:15 <EgoBot> ​:: 4@F=5 AF== a@ >F49 EC::AAJ a9::E @FE @7 >J aA::?2= 4C6G::46[ ::E H@F=5 >2<6 J@FC 9625 aA::? =::<6 56CG::a9 ::? 2 7F4<::?8 3=6?56C]
11:52:37 <CakeProphet> > fix (const 5) "I CAN DO WHATEVER I WANT"
11:52:38 <lambdabot> 5
11:52:47 <Vorpal> CakeProphet, weren't you going to sleep
11:52:55 <Vorpal> or was that a statement about the quality of the night?
11:52:59 <CakeProphet> !perl sleep
11:53:17 <Vorpal> CakeProphet, how long does that sleep for?
11:53:35 <CakeProphet> forever.
11:53:40 -!- guy_ has quit (Ping timeout: 244 seconds).
11:53:40 <Vorpal> will time out soon then
11:53:49 <Vorpal> I forgot if it prints anything on timeout
12:24:27 -!- Vorpal has quit (Ping timeout: 246 seconds).
12:46:40 -!- Sgeo_ has joined.
12:47:07 -!- Sgeo__ has joined.
12:47:37 -!- Sgeo_ has quit (Client Quit).
12:47:45 -!- Sgeo__ has quit (Client Quit).
12:58:55 <zzo38> Can you make a C program in 4K that takes the longest time to compile?
12:59:30 <Patashu> That's an interesting contest
12:59:45 <Patashu> I don't know anything about what makes compiling faster/slower though. Maybe shitloads of templates?
13:01:36 <zzo38> Templates? That is C++? Maybe you can try one with C++ as well, then. And one with C.
13:01:42 <Sgeo> C doesn't have te... what zzo38said
13:01:44 <Patashu> Ah, yeah
13:03:01 <Patashu> Is there a specific compiler you have in mind?
13:03:07 <Patashu> And command line options
13:03:40 <zzo38> gcc, although there might be other ideas
13:04:14 <Patashu> Is there a c compiler that figures out and replaces expensive constant divisions with 'magic number' operations?
13:04:16 <Patashu> Or whatever they're called
13:21:04 -!- Sgeo_ has joined.
13:22:01 -!- Sgeo has quit (Ping timeout: 244 seconds).
13:32:32 -!- foocraft has joined.
13:45:44 <Sgeo_> I am embarrassed by some of the atheists on /r/DebateAnAtheist and /r/DebateAChristian. Doesn't mean I won't hang out there, but still
13:54:02 -!- guy_ has joined.
13:54:09 -!- guy_ has quit (Changing host).
13:54:09 -!- guy_ has joined.
13:55:09 <Sgeo_> Hi guy_
14:29:00 <guy_> hi Sgeo_
14:30:13 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 .).
14:43:09 -!- foocraft has quit (Ping timeout: 240 seconds).
14:54:29 -!- Phantom_Hoover has joined.
14:54:50 <Phantom_Hoover> Well lambdabot I wonder if there are any messages today.
14:54:50 <lambdabot> Phantom_Hoover: You have 6 new messages. '/msg lambdabot @messages' to read them.
14:55:29 -!- foocraft has joined.
15:47:59 -!- Wamanuz has quit (Read error: Connection reset by peer).
15:48:20 -!- Wamanuz has joined.
15:57:27 -!- copumpkin has joined.
16:04:43 -!- Wamanuz has quit (Remote host closed the connection).
16:05:11 -!- Wamanuz has joined.
16:09:17 -!- aloril has quit (Ping timeout: 250 seconds).
16:17:36 -!- Vorpal has joined.
16:18:03 <Vorpal> [50265.669097] PM: Device 00:0a failed to restore: error -19 <-- huh?
16:18:14 <Vorpal> oh hm
16:18:19 <Vorpal> lrwxrwxrwx 1 root root 0 2011-06-13 18:17 /sys/devices/pnp0/00:0a/driver -> ../../../bus/pnp/drivers/tpm_tis
16:19:04 <pikhq> zzo38: #include "this.c" in this.c
16:20:34 <Vorpal> btw, I successfully completed the theory part of the exam for getting driving license!
16:21:26 -!- aloril has joined.
16:21:31 <pikhq> Vorpal: That would be much less noteworthy in the US.
16:21:59 <pikhq> "Yay, I can complete 10 questions multiple choice!"
16:22:06 <Sgeo_> Even I did that!
16:22:43 <Vorpal> <pikhq> Vorpal: That would be much less noteworthy in the US. <-- I know.
16:22:52 <Vorpal> but. You have to get 60 out of 65 tricky questions right here. You have 45 minutes for it.
16:23:18 <Vorpal> oh and it is actually 70 questions but 5 of those are test ones for future exams
16:23:28 <Vorpal> you don't know which ones are test ones
16:23:36 <Phantom_Hoover> Sgeo_, yes, but then you had to overcome the insurmountable wall that was your idiot father.
16:24:07 <pikhq> Vorpal: I bet you're frightened by US roads now. ;)
16:24:35 <Sgeo_> I've heard of people cheating...
16:27:02 <pikhq> And I happen to know you can take the test arbitrary times.
16:28:01 -!- Vorpal has quit (Ping timeout: 250 seconds).
16:28:04 <pikhq> You could, in theory, brute force the driving exam.
16:28:05 -!- Vorpal_ has joined.
16:28:08 <pikhq> *shudder*
16:28:25 <Sgeo_> Vorpal_, were you hit by a US driver?
16:29:31 <Vorpal_> <Sgeo_> Vorpal_, were you hit by a US driver? <-- ?
16:29:38 -!- Vorpal_ has changed nick to Vorpal.
16:29:47 * Vorpal reads scrollback after "<Phantom_Hoover> Sgeo_, yes, but then you had to overcome the insurmountable wall that was your idiot father."
16:29:53 <Vorpal> logs*
16:30:31 <Vorpal> pikhq, wrt US roads: YES
16:30:40 <Vorpal> "I've heard of people cheating..." <-- how?
16:30:55 <pikhq> I DON'T WANT TO KNOW HOW
16:31:10 <Vorpal> You could, in theory, brute force the driving exam. <-- surely it would change over time. I mean... I don't think they give the same set of questions to everyone
16:31:23 <pikhq> You'd like to think that wouldn't you.
16:31:47 <Sgeo_> How do people cheat on most multiple-choice exams where there are other people?
16:32:16 <pikhq> I dunno. I have never felt the urge to try.
16:32:37 <pikhq> Though, being me, I would probably be an expert on it in a few days.
16:32:41 <pikhq> If I cared.
16:33:18 <Phantom_Hoover> No pikhq that is not arrogant at all.
16:33:37 <Vorpal> <Sgeo_> How do people cheat on most multiple-choice exams where there are other people? <-- well I did see in the corner of the eye that another guy had something completely different up on his monitor, that I never got
16:33:46 <Vorpal> so I'm 99% sure that they use different randomised sets of questions
16:34:00 <Sgeo_> Hmm, I wasn't thinking computerized
16:34:04 <Sgeo_> When I took it, it was on paper
16:40:23 <Vorpal> right, mine was computerised
16:43:03 <pikhq> So. I wanna have this be able to output tup, shell, or make... Problem with that plan is that generating dependencies for make is Hell.
16:43:09 <pikhq> Not just hell, but Hell.
16:43:20 <pikhq> That level of torture has earned the upper case.
16:43:48 -!- azaq23 has joined.
16:49:04 -!- foocraft_ has joined.
16:51:53 -!- foocraft has quit (Ping timeout: 240 seconds).
17:08:53 -!- monqy has joined.
17:22:51 -!- Kustas has joined.
17:24:29 -!- TOGoS has joined.
17:24:39 -!- TOGoS has left.
17:36:59 -!- Gregor has quit (Quit: Coyote finally caught me).
22:08:24 -!- esowiki has joined.
22:08:25 -!- glogbot has joined.
22:08:29 <Gregor> ^^^ less amazing >_>
22:09:00 <Gregor> I want to know why I got a message to my phone when Codu went down (step one of the DMS), but glogbackup didn't join >_<
22:09:33 <Sgeo_> <slava> Sgeo_: continuations are dumb
22:09:58 <Gregor> Are you asking us to comment on the validity of that statement? :P
22:10:06 <elliott> no he just needs a place to cry
22:10:08 <elliott> and this is that place
22:10:09 <pikhq> So, here's my no-op C99 "check" as a solver: solution c99 {solved c99 {set [uplevel namespace current]::cc "gcc -std=c99"}}
22:10:20 <elliott> pikhq: gross
22:10:26 <elliott> it should check gcc actually works
22:10:32 <elliott> and claims to support c99
22:10:42 <Gregor> pikhq: -pedantic
22:10:59 <pikhq> elliott: Yeah, I was just giving that as an example of how to actually write a stupidly simple solution.
22:11:13 <elliott> Gregor: thats not a c99 compiler
22:11:18 <elliott> thats a c99 compiler that complains a lot
22:11:24 <elliott> see gcc does actually emit all the diagnostics c99 asks it to
22:11:27 <elliott> it just emits them to /dev/null
22:12:48 <pikhq> Also, I should add an "args" to that, since, uh, generic checks will probably want to see those. :P
22:16:23 -!- zzo38 has quit (Remote host closed the connection).
22:17:26 <elliott> its hilarious how rand claim copyright on A Million Random Digits with 100,000 Normal Deviates
22:21:23 <Gregor> http://www.amazon.com/Million-Random-Digits-Normal-Deviates/dp/0833030477 <-- customers who viewed this item also viewed "Male Testicular Exam Model Anatomy"
22:21:52 <Gregor> "Turn your head and cough ..." (flips to a page and chooses a number) "four times."
22:22:46 * elliott notes that http://hcoop.net/~ntk/random/ is a copyright-free derivative
22:25:26 <elliott> "NOTHING WILL BE SHIPPED. PURELY MEANT TO BE BOUGHT AS HUMOROUS IN YOUR "ORDERS" PAGE." --amazon seller
22:26:18 <Gregor> elliott: lolwuzzat?
22:26:38 <elliott> Gregor: It's the sole seller for the modern literary masterpiece Hgiyiyi (hgjhjh, hjhk). http://www.amazon.com/Hgiyiyi-hgjhjh-hjhk-jjjj/dp/0649875427/ref=cm_cr_pr_product_top
22:27:22 <olsner> einstein pondering the planck mass: http://i.imgur.com/4qkrT.jpg
22:27:31 <oerjan> Hgiyiyi slowly turned his head, as the beast crept towards him
22:28:09 <elliott> oerjan: ugh, you're reading the translation?
22:28:21 <elliott> I realise it was done by the author themselves, but it's just so more exquisite in the original yuajik:
22:28:38 <elliott> Akj hgiyiyi hgjska ojtofngkjdl klsf, asjkhglfda ksjahglsjkh dkjah ighaiygagya gayigii.
22:28:54 <elliott> olsner: this channel is pg thirteenXXNXJOIXkp
22:29:29 <oerjan> einstein was always pg13. except when cheating on his wife.
22:30:51 -!- CakeProphet has quit (Ping timeout: 246 seconds).
22:31:52 -!- MigoMipo has quit (Read error: Connection reset by peer).
22:33:08 -!- Gregor has set topic: This channel rated M for strong language, sexual overtones and gore (Vidal). Parental discretion is advised. | Logs: http://codu.org/logs/_esoteric/ and http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
22:34:11 -!- elliott has set topic: this channel rated m ... for MURDER | logs: codu.org slash logs slash _ esoteric.
22:34:57 -!- Gregor has set topic: This channel rated for "You are Only Allowed to Use is Channel if you Have a Legitimate Keyboard" | Logs: http://codu.org/logs/_esoteric/ and http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
22:37:33 -!- elliott_ has joined.
22:37:34 -!- elliott has quit (Read error: Connection reset by peer).
22:37:47 <olsner> þ! yay, my keyboard is legitimate!
22:39:17 <oerjan> þ! my cut-and-paste is legitimate!
22:40:01 <olsner> no, that's just an illegitimate cut-and-paste bastard of a þ
22:40:18 <oerjan> :´(
22:40:51 <olsner> you should know better than making þs out of wedlock
22:41:51 <oerjan> > ord 'þ'
22:41:52 <lambdabot> 254
22:44:10 <elliott_> `addquote <olsner> you should know better than making þs out of wedlock
22:44:11 <HackEgo> 455) <olsner> you should know better than making þs out of wedlock
22:51:18 <olsner> :)
22:51:41 <olsner> `quote olsner
22:51:42 <HackEgo> 173) <nooga> i think of languages as tools, there is no holy grail of languages <olsner> even if there's no holy grail, that doesn't mean cups of crap is ok \ 220) <olsner> DAMN YOU, I'm leaving <Vorpal> olsner, FINALLY NOTHING BETWEEN ME AND WORLD DOMINATION! \ 236) <tswett> elliott: just to bring you up to speed, you are
22:52:07 <tswett> `quote 236
22:52:08 <HackEgo> 236) <tswett> elliott: just to bring you up to speed, you are now my baby nephew. <olsner> wtf, elliott is a nephew and his uncle is here? <nooga> what <tswett> Heck yes I'm elliott's uncle.
22:52:47 <olsner> `quote 237
22:52:48 <HackEgo> 237) <Anti-X> i didn't like jquery, until i decided to use it because it made development faster. now i can't go back to women...
22:54:35 <elliott_> `quote tun
22:54:36 <HackEgo> No output.
22:54:41 <elliott_> `quote hlt
22:54:42 <HackEgo> No output.
22:54:44 <elliott_> `quote hok
22:54:46 <HackEgo> No output.
22:54:46 <elliott_> `quote hop
22:54:47 <olsner> `quote hcf
22:54:47 <HackEgo> 4) <AnMaster> that's where I got it <AnMaster> rocket launch facility gift shop \ 258) <Sgeo> Is there a name for something where I'm more attracted to someone if I know they've had a rough past? <variable> Sgeo, "Little Shop of Horrors" \ 314) <nddrylliog> back to legal tender, that expression really makes me daydream. Like,
22:54:48 <HackEgo> No output.
22:54:59 <elliott_> `quote 314
22:55:00 <HackEgo> 314) <nddrylliog> back to legal tender, that expression really makes me daydream. Like, there'd be black-market tender. Out-of-town hug shops where people exchange tenderness you've NEVER SEEN BEFORE.
22:55:31 <olsner> that is an idea
22:55:58 <olsner> but I think it's based on the wrong meaning of tender
22:56:17 <Sgeo_> Yeah, money is basically a legal means of bruising people
22:56:39 <elliott_> `quote
22:56:40 <HackEgo> 54) <GregorR-L> If I ever made a game where you jabbed bears ... <GregorR-L> I'd call it jabbear.
22:56:48 <elliott_> `quote 413
22:56:49 <HackEgo> 413) <ZOMGMODULES> Vorpal: it's actually called Happy <ZOMGMODULES> Vorpal: Do not use it. Use Parsec. This is the wisdom of ZOMGMODULES.
22:57:09 <olsner> who was using the zomgmodules nick again?
22:57:19 <oerjan> cpressey
22:57:28 <olsner> neat
22:57:37 <elliott_> http://catseye.tc/projects/apple-befunge/
22:57:39 <elliott_> what an fun thing
22:57:47 <elliott_> (zomgmodules inspired me to check catseye)
22:57:47 <olsner> hmm, I've been slightly overusing the word "neat", I think
22:57:52 <elliott_> olsner: your parents are dead
22:57:53 <elliott_> <olsner> neat
22:57:57 -!- Wamanuz has quit (Remote host closed the connection).
22:58:07 <elliott_> ] RUN
22:58:07 <elliott_> ?BULLSH*T ERROR IN 20
22:58:07 <elliott_> ] LIST 20
22:58:07 <lambdabot> Unknown command, try @list
22:58:34 <elliott_> ugh
22:58:36 <elliott_> stupid throttling
22:58:38 <elliott_> ] RUN
22:58:40 <elliott_> ?BULLSH*T ERROR IN 20
22:58:40 <lambdabot> Unknown command, try @list
22:58:42 <elliott_> ] LIST 20
22:58:43 <oerjan> lambdabot severely lacks a @bullshit commend
22:58:44 <elliott_> 20 2 + 2 = 5
22:58:45 <oerjan> *a
22:58:46 <elliott_> quality humour from cats eye technologies
22:58:51 -!- Sgeo_ has changed nick to Sgeo.
22:59:11 <oerjan> > let 2+2 = 5 in 2+2 == 5
22:59:12 <lambdabot> True
22:59:32 <oerjan> > 2+2 == (4::Expr)
22:59:34 <lambdabot> True
22:59:39 <oerjan> huh
22:59:44 <oerjan> > 2+2 :: Expr
22:59:45 <lambdabot> 2 + 2
22:59:54 <elliott_> > 2+2 == (9::Expr)
22:59:55 <lambdabot> False
22:59:59 <elliott_> huh it actually evaluates it
23:00:03 <elliott_> ?hoogle Expr -> Integer
23:00:03 <lambdabot> Warning: Unknown type Expr
23:00:03 <lambdabot> Unsafe.Coerce unsafeCoerce :: a -> b
23:00:03 <lambdabot> Prelude floatRadix :: RealFloat a => a -> Integer
23:00:12 <oerjan> > a+2 == 4
23:00:13 <lambdabot> False
23:00:16 <oerjan> > a+2 == 2+a
23:00:17 <lambdabot> False
23:00:20 <olsner> > 2 + 2 :: Expr
23:00:21 <lambdabot> 2 + 2
23:00:28 <oerjan> > a+2 == a+2
23:00:29 <lambdabot> True
23:00:31 <elliott_> > 2 + 2 == (a :: Expr)
23:00:32 <lambdabot> False
23:00:32 <oerjan> > a+2 == a+1+1
23:00:33 <lambdabot> False
23:00:36 <elliott_> > a + 0 == (a :: Expr)
23:00:37 <lambdabot> False
23:00:39 <elliott_> ugh
23:01:06 <oerjan> > a^(5::Expr)
23:01:07 <lambdabot> a * a * (a * a) * a
23:01:15 -!- Wamanuz has joined.
23:01:53 <elliott_> lol what
23:02:21 <oerjan> > 1 < (2::Expr)
23:02:22 <lambdabot> True
23:02:39 <oerjan> > 1 > (2::Expr)
23:02:40 <lambdabot> False
23:02:56 <oerjan> it may have just enough evaluation that code using just numerals works
23:04:12 <oerjan> > a^10
23:04:13 <lambdabot> a * a * (a * a) * (a * a * (a * a)) * (a * a)
23:05:31 <oerjan> > gcd a b
23:05:35 <lambdabot> mueval-core: Time limit exceeded
23:05:45 <oerjan> > gcd (a+a) a
23:05:49 <lambdabot> mueval-core: Time limit exceeded
23:07:03 <elliott_> Expr is shitty :(
23:15:08 -!- Patashu has joined.
23:18:23 <olsner> "I come from a long line of people who were able to get laid at least once." :D
23:18:56 <Sgeo> What about sperm donation?
23:19:26 <olsner> that is not accounted for in the quote
23:19:35 <elliott_> imagine if your ancestors were like
23:19:37 <elliott_> sperm donated
23:19:40 <elliott_> ten generations up
23:19:48 <elliott_> the grand family of virgin
23:32:05 -!- pikhq has quit (Ping timeout: 252 seconds).
23:32:08 -!- pikhq_ has joined.
23:40:05 -!- DocHerrings has joined.
23:41:06 <elliott_> finally our herrings are saved
23:41:21 <olsner> the doctor! he's arrived!
23:41:27 <DocHerrings> No more shall they fear the dangers of disease!
23:41:44 <elliott_> or wait, are you a group of herrings with a phd
23:41:52 <elliott_> anything's possible
23:41:59 <olsner> save our soles! (wait, do you do soles too? or only herrings?)
23:42:39 <DocHerrings> Herrings only. They are the most sickly fish.
23:44:05 <elliott_> :(
23:44:12 <elliott_> herrings: god's least favourite fish
23:44:43 <elliott_> well, now you've experienced the highest-quality conversation this channel can sustain, it's all downhill from here
23:45:03 <DocHerrings> Then I can expect great things.
23:45:19 <olsner> the bottom of that hill is where you find the finest beasts
23:45:20 <elliott_> always nice when the newbies are optimistic
23:46:07 <olsner> "Hi, this is Freddie's dyslexia helpline. Please leave a massage."
←2011-06-12 2011-06-13 2011-06-14→ ↑2011 ↑all