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