00:05:11 -!- elliott has quit (Remote host closed the connection). 00:06:52 -!- kwertii has quit (Quit: kwertii). 00:13:55 -!- copumpkin has joined. 00:20:37 -!- Jafet has quit (Quit: Leaving.). 00:23:45 -!- elliott_ has joined. 00:24:57 -!- Sgeo|web has joined. 00:25:09 I hate the List monad 00:25:32 Can't deal with infinite lists sensibly, bluh 00:25:51 I mentioned it in #haskell, apparently there's no way to write the instance properly? 00:26:04 a tree monad might be better for such a thing 00:27:03 also, there's that MonadLogic >>- thing which breaks the ordering but otherwise does something like what you'd want, iiuc 00:27:51 > [1..] >>- map (,) x [1..] 00:27:52 Couldn't match expected type `[a]' 00:27:52 against inferred type `SimpleRef... 00:27:54 oops 00:28:02 > [1..] >>- \x -> map (,) x [1..] 00:28:02 Couldn't match expected type `[t] -> [b]' 00:28:03 against inferred type `[b... 00:28:07 now what 00:28:09 :t (>>-) 00:28:10 forall (m :: * -> *) a b. (MonadLogic m) => m a -> (a -> m b) -> m b 00:28:21 oh hm 00:28:28 > [1..] >>- \x -> map ((,) x) [1..] 00:28:29 [(1,1),(2,1),(1,2),(3,1),(1,3),(2,2),(1,4),(4,1),(1,5),(2,3),(1,6),(3,2),(1... 00:28:33 there you go 00:30:38 it's not very balanced in how often elements are taken from the first list though: 1 is picked 1/2 of the time, 2 1/4 of the time, 3 1/8, etc. 00:31:44 -!- pikhq_ has quit (Remote host closed the connection). 00:32:23 :t Node 00:32:24 forall a. a -> Forest a -> Tree a 00:33:30 that's the wrong kind of tree to be a monad, iirc 00:34:30 What kind of tree is that? 00:34:59 Forest a = [Tree a], iirc 00:35:08 Node is the constructor 00:35:49 so each node has an a label, and a list of children 00:37:44 > (Node 1 []) >>= \x -> (Node x []) -- let's check if it is a Monad anyway 00:37:44 Node {rootLabel = 1, subForest = []} 00:37:49 ooh it is 00:38:55 > return 1 >>= \x -> (Node x []) 00:38:56 Node {rootLabel = 1, subForest = []} 00:39:12 > return 1 :: Tree Int 00:39:13 Node {rootLabel = 1, subForest = []} 00:39:35 but... 00:40:44 > Node 1 [Node 2 [], Node 3 []] >>= \x -> Node x [Node (x+10), Node (x+10)] 00:40:45 Couldn't match expected type `Data.Tree.Tree t' 00:40:45 against inferred ty... 00:41:07 > Node 1 [Node 2 [], Node 3 []] >>= \x -> Node x [Node (x+10) [], Node (x+10) []] 00:41:08 Node {rootLabel = 1, subForest = [Node {rootLabel = 11, subForest = []},Nod... 00:41:27 gah 00:41:31 so verbose 00:44:20 :t showAsList 00:44:21 Not in scope: `showAsList' 00:44:27 @hoogle showAsList 00:44:28 No results found 00:45:09 :t showListWith 00:45:10 Not in scope: `showListWith' 00:45:22 :t Text.Show.showListWith 00:45:23 forall a. (a -> ShowS) -> [a] -> String -> String 00:45:42 -!- ive has quit (Read error: Operation timed out). 00:47:54 @let showsT s (Node x l) = ("Node (" ++) . s x . (") "++) . Text.Show.showListWith (showsT s) l; sT t = showsT show t 00:47:54 :5:55: Not in scope: `Text.Show.showListWith' 00:48:00 dammit 00:51:25 > levels $ Node 1 [Node 2 [], Node 3 []] >>= \x -> Node x [Node (x+10) [], Node (x+10) []] 00:51:26 [[1],[11,11,2,3],[12,12,13,13]] 00:51:54 hm that doesn't really give all information 00:52:35 too much work. 00:53:09 :t levels 00:53:09 forall a. Tree a -> [[a]] 00:53:30 :t Node 00:53:31 forall a. a -> Forest a -> Tree a 00:53:36 ... 00:53:38 Forest a!? 00:53:47 = [Tree a] 00:54:07 Ah. 00:55:49 the module in question contains several methods for building trees, and some instances, but nothing that can be used to easily give it in a compact format :( 00:55:55 http://www.haskell.org/ghc/docs/latest/html/libraries/containers-0.4.1.0/Data-Tree.html 00:56:11 the default Show instance includes all field names 00:56:36 basically, there is nothing there to take _apart_ trees recursively. 00:58:30 > drawTree $ Node 1 [Node 2 [], Node 3 []] >>= \x -> show <$> Node x [Node (x+10) [], Node (x+10) []] 00:58:31 "1\n|\n+- 11\n|\n+- 11\n|\n+- 2\n| |\n| +- 12\n| |\n| `- 12\n|\n`- 3\n ... 00:59:09 @show "test" 00:59:09 "\"test\"" 00:59:15 @read "test" 00:59:15 test 00:59:46 @msg lambdabot @run text . drawTree $ Node 1 [Node 2 [], Node 3 []] >>= \x -> show <$> Node x [Node (x+10) [], Node (x+10) []] 00:59:46 Not enough privileges 00:59:50 gah 01:00:52 well that worked, sort of, although i had to give @more twice 01:03:06 ok it appears that >>= simply concatenates the list part from the 1 with the list of results from 2 and 3 01:04:23 Node x ts >>= f = Node x' (ts' ++ map (>>= f) ts) where Node x' ts' = f x 01:05:09 hi oerjan 01:05:19 01:24 I hate the List monad 01:05:20 does that fulfil the monad laws i wonder 01:05:27 I like the part where you criticise things before fully understanding them 01:05:32 (this is what you always do) 01:05:35 -!- Vorpal has quit (Ping timeout: 248 seconds). 01:05:45 01:34 Forest a = [Tree a], iirc 01:05:49 elliott_: well he did have a valid point 01:05:52 oerjan: no, it's -- oh, Forest 01:06:06 01:55 the module in question contains several methods for building trees, and some instances, but nothing that can be used to easily give it in a compact format :( 01:06:11 um that is what the draw functions are for 01:06:21 elliott_: those are not compact. 01:06:25 fine :P 01:06:30 how could they be more compact 01:06:35 especially not compact enough to demonstrate with lambdabot 01:07:16 something like the Show, except leaving out all the field fluff 01:07:54 i tried to define it above but i gave up when showListWith was unavailable 01:08:13 > showListWith 01:08:14 Not in scope: `showListWith' 01:08:39 there _might_ be some obscure module prefix, of course 01:08:55 (Text.Show already tested) 01:10:40 ok >>= does fulfil 1st and 2nd monad laws, i think 01:10:56 -!- kwertii has joined. 01:11:36 oerjan: well it's Text.Show.showListWith 01:11:41 > Text.Show.showListWith 01:11:42 Not in scope: `Text.Show.showListWith' 01:11:51 > TS.showListWith 01:11:52 Not in scope: `TS.showListWith' 01:11:54 > Show.showListWith 01:11:54 Not in scope: `Show.showListWith' 01:11:56 (Text.Show already tested) 01:11:56 > q 01:11:57 q 01:11:59 oerjan: ah 01:12:29 lambdabot's little inconsistencies... 01:13:29 there should be some form which we didn't have to guess, which would have to be the fully qualified one with the actual module name. 01:18:59 Is there a way to see which modules are loaded? 01:21:51 Sgeo|web: yes, read L.hs 01:21:54 ?list 01:21:54 http://code.haskell.org/lambdabot/COMMANDS 01:22:24 cool, ty 01:22:40 @help vixen 01:22:41 help . Ask for help for . Try 'list' for all commands 01:22:51 Helpful 01:22:57 @help @vixen 01:22:57 help . Ask for help for . Try 'list' for all commands 01:23:11 @help version 01:23:11 version/source. Report the version and darcs repo of this bot 01:23:49 Sgeo|web: they tell me @vixen was removed 01:23:53 @list vixen 01:23:53 No module "vixen" loaded 01:24:00 @list nixon 01:24:00 quote provides: quote remember forget ghc fortune yow arr yarr keal b52s brain palomer girl19 v yhjulwwiefzojcbxybbruweejw protontorpedo nixon farber 01:24:23 and nixon added in its place 01:24:25 @nixon 01:24:25 You know, it's a funny thing, every one of the bastards that are out for legalizing marijuana is Jewish. What the Christ is the matter with the Jews, Bob? What is the matter with them? I suppose it 01:24:26 is because most of them are psychiatrists. 01:24:48 @help nixon 01:24:48 Richad Nixon's finest. 01:25:46 i have this vague hunch @nixon is meant to insult precisely the kind of people who complained to get @vixen removed :P 01:26:02 What was @vixen? 01:26:13 also, lambdabot's spelling correction means @vixen -> @nixon automatically now 01:26:50 it was a chatbot which behaved like a somewhat promiscuous girl 01:27:19 and apparently you could get it to do some explicit sex talk if you knew how 01:28:00 so obviously offensive to conservatives 01:28:14 @vixen 01:28:14 Once you get into this great stream of history, you can't get out. 01:30:36 @nixon so what about african-americans? 01:30:36 You won't have Nixon to kick around anymore, because, gentlemen, this is my last press conference. 01:30:55 i guess it's not context-sensitive like @vixen was 01:31:26 @ghc 01:31:26 ghc says: Illegal unlifted type argument 01:35:24 ?ghc 01:35:25 ghc says: There must be at least one non-type-variable in the instance head 01:35:26 ?nixon 01:35:26 You have to face the fact that whole problem is really the blacks. The key is to divise a system that reconizes this while not appearing to... 01:35:36 @help ghc 01:35:36 -!- ive has joined. 01:35:36 ghc. Choice quotes from GHC. 01:35:47 Oh 01:39:55 ?nixon 01:39:55 People react to fear, not love; they don't teach that in Sunday School, but it's true. 01:40:11 ?ghc 01:40:12 ghc says: Type signature given for an expression 01:41:08 -!- pikhq has joined. 01:41:32 > let a b * c :: Int in "test" 01:41:33 : Invalid type signature 01:41:53 i wonder what would give that error message 01:42:06 it might not any longer, though 01:42:23 http://www.haskell.org/pipermail/haskell/2002-November/010660.html 01:42:32 foo bar :: t 01:42:34 at top level 01:43:07 you and your superhuman googling skills 01:43:22 hm 01:43:34 > let foo bar :: t in "test again" 01:43:35 : Invalid type signature 01:43:42 bah 01:44:06 @let foo bar :: t 01:44:07 Left-hand side of type signature is not a variable: foo bar 01:44:09 oerjan: that's from two thousand and two, dude 01:44:26 yeah 01:44:45 well i think i found the modern equivalent there, anyway 01:55:04 @src True 01:55:04 Source not found. My brain just exploded 01:55:11 MUAHAHA 01:55:41 @help yhjulwwiefzojcbxybbruweejw 01:55:41 V RETURNS! 01:55:45 @yhjulwwiefzojcbxybbruweejw 01:55:45 "\"" 01:55:48 @yhjulwwiefzojcbxybbruweejw 01:55:49 Exception: <> 01:55:58 @yhjulwwiefzojcbxybbruweejw 01:55:58 Exception: <> 01:55:59 Sgeo|web: @src has got much worse lately, i think 01:56:05 why would src find True 01:56:23 well _ideally_ it should give the definition of Bool there... 01:56:27 Well, showing the data or newtype line would be a sensible thing to do 01:56:56 @src Bool 01:56:57 data Bool = False | True deriving (Eq, Ord) 01:57:03 -!- CakeProphet has joined. 01:57:17 @src (==) 01:57:17 x == y = not (x /= y) 01:57:27 @src (>>=) 01:57:27 Source not found. Just what do you think you're doing Dave? 01:57:44 that's a method default, and >>= has none 01:57:49 Hmm, so, for class functions (is that the right term?), it will show the default it aavlable 01:57:51 available 01:58:03 "method"? 01:58:04 and if someone remembered to put it in 01:58:12 yes, method 01:58:26 i think that's the term? 01:59:01 I should rewrite the Prototype MultiDispatch example in Haskell 01:59:12 oh god Prototype MultiDispatch what 01:59:33 "Prototypes with Multiple Dispatch" 01:59:51 I mean why in Haskell.. 01:59:53 method is used in the haskell report, yes 02:00:17 Because I feel like that's just showing off Haskell's awesomeness 02:01:07 Actually, meh 02:02:27 how come i haven't seen this before http://blog.plover.com/prog/burritos.html 02:03:58 Monads are thingies that you can combine with a function that takes some plain old thing and gives a thing and, in combining the thingy and the function to a thingy, you get another thingy 02:05:18 And when I said gives a thing, I meant gives a thingy 02:05:38 ENERGY FETUS http://imgur.com/a/dBz45 02:05:51 `run echo "Monads are thingies that you can combine with a function that takes some plain old thing and gives a thing and, in combining the thingy and the function to a thingy, you get another thingy" | sed 's/thing(ie|y)?/smurf/g' 02:05:53 Monads are thingies that you can combine with a function that takes some plain old thing and gives a thing and, in combining the thingy and the function to a thingy, you get another thingy 02:05:57 darn 02:06:41 -!- tiffany has quit (Quit: Leaving). 02:06:57 `run echo "Monads are thingies that you can combine with a function that takes some plain old thing and gives a thing and, in combining the thingy and the function to a thingy, you get another thingy" | sed '%s/thing(ie|y)?/smurf/g' 02:06:58 sed: -e expression #1, char 1: unknown command: `%' 02:07:13 wtf is wrong with my sed :( 02:07:20 I don't say thingie oh wait yes I did 02:08:51 needs more perl. 02:09:40 oh hm 02:09:59 `run echo "Monads are thingies that you can combine with a function that takes some plain old thing and gives a thing and, in combining the thingy and the function to a thingy, you get another thingy" | sed 's/thing\(ie\|y\)\?/smurf/g' 02:10:01 Monads are smurfs that you can combine with a function that takes some plain old smurf and gives a smurf and, in combining the smurf and the function to a smurf, you get another smurf 02:10:04 yay 02:11:52 Patashu: something tells me DC doesn't do drug testing of employees 02:16:55 oerjan: um wat are you doing :P 02:17:04 03:02 how come i haven't seen this before http://blog.plover.com/prog/burritos.html 02:17:12 oerjan: because i only relinked it from the past in hash-haskell a few days ago 02:17:21 it's my favourite monad tutorial 02:17:33 03:00 Because I feel like that's just showing off Haskell's awesomeness 02:17:36 you don't even _know_ what that is yet 02:17:48 elliott_: i think every time i've seen the link i've assumed it was something i'd already seen 02:18:14 oerjan: I was shocked to learn that the wikibooks actually uses a spacesuit/nuclear waste analogy 02:18:17 I assumed it was parody 02:18:21 s/wikibooks/wikibook/ 02:19:23 oerjan: where did you see it this time? 02:19:44 data BlackHole = BlackHole; instance Monad BlackHole where return _ = BlackHole; _ >>= _ = BlackHole 02:19:50 elliott_: in a reddit comment thread 02:19:51 -!- ive has quit (Ping timeout: 255 seconds). 02:20:21 (inspired by the spacesuit) 02:20:41 oerjan: violates the laws, I think 02:20:47 how so? 02:20:48 undefined >>= return === BlackHole 02:21:01 that's an oft-violated one, though :) 02:21:04 grmbl i was wondering about undefined 02:21:08 oerjan: see above 02:21:11 I think even IO violates that 02:21:13 ok then 02:21:16 maybe even more normal monads in the transformers library, too 02:21:21 oerjan: btw, MaybeT _IS STANDARD_ 02:21:23 it's in transformers 02:21:37 data BlackHole; instance Monad BlackHole where return _ = undefined; _ >>= _ = undefined 02:21:44 even better 02:21:53 oerjan: perfect 02:22:14 oerjan: I think that fulfils all of the laws :P 02:22:46 a bit hard for that _not_ to fulfil an equality 02:23:10 -!- pikhq_ has joined. 02:23:21 oerjan: data BlackHole a b; IS IT AN ARROW??? 02:23:34 ooh 02:23:44 -!- pikhq has quit (Ping timeout: 276 seconds). 02:24:19 the arrow of very short time left 02:24:23 :D 02:24:38 well the definitions of the methods are obvious 02:24:42 I note that Control.Arrow fails to list the laws 02:25:25 hm... 02:26:50 data BlackHole = BlackHole; instance Monad BlackHole where return _ = BlackHole; x >>= _ = x -- would that work? 02:27:26 WHY'D YOU CALL IT A /BLACK/ HOLE? RACIST. 02:27:43 oh hm 02:28:03 return x >>= f has some trouble there 02:29:28 Gregor: well it was not american, so i couldn't call it african-american could i? 02:30:42 The RACIST part is that you're implying that people (and/or holes) of African descent steal things. 02:30:54 > (undefined >>= putStr) `seq` "test" 02:30:55 "test" 02:31:18 @nixon 02:31:18 A public man must never forget that he loses his usefulness when he as an individual, rather than his policy, becomes the issue. 02:31:24 03:26 data BlackHole = BlackHole; instance Monad BlackHole where return _ = BlackHole; x >>= _ = x -- would that work? 02:31:26 oerjan: looks right to me 02:31:38 oerjan: except (BlackHole >>= fmap (const undefined)) 02:31:42 dunno if that's a law though 02:31:43 I guess not 02:31:47 since Nothing >>= fmap (const undefined) == Nothing 02:32:30 -!- elliott_ has set topic: Esolangers, get a life and shut up. Stop cluttering the IRC with your inane prattle. Go aestivate under a rock somewhere. ... In short, feep off and die. | 12345678^&!* | http://codu.org/logs/_esoteric/. 02:32:32 elliott_: i think it breaks return x >>= f = f x 02:32:47 oerjan: hm right 02:33:01 > map undefined Nothing 02:33:01 Couldn't match expected type `[a]' 02:33:02 against inferred type `Data.Mayb... 02:33:07 > fmap undefined Nothing 02:33:08 Nothing 02:36:00 elliott_: who said that in the topic? 02:38:07 > fmap undefined $ Some 0 02:38:08 Not in scope: data constructor `Some' 02:38:11 > fmap undefined $ Just 0 02:38:12 Just *Exception: Prelude.undefined 02:38:13 -!- MDude has changed nick to MSleep. 02:38:25 > fmap (const undefined) $ Just 0 02:38:25 oerjan: Yittra, in NomicWorld, ninety-three (or ninety-two, I don't know) 02:38:25 Just *Exception: Prelude.undefined 02:38:31 ** 02:38:32 Get a life, lindrum (Yittra, Sep 28 05:59) 02:38:32 LIndrum, get a life and shut up. Stop cluttering the noticeboard with 02:38:33 your inane prattle. Go aestivate under a rock somewhere. 02:38:35 You see, your judgement is not in the spirit of the game, hence 02:38:37 is illegal. Therefore, while you may think you have cleverly found 02:38:39 a loophole you are just making an annoyance of yourself. To be fair, I 02:38:41 suppose I must admit the possibility that you were just tring to 02:38:43 get the game going before renouncing your 'powers' , but 02:38:45 1015 and 1016 will do that anyway. In short, feep off and die. 02:38:47 oerjan: after the Lindrum scam 02:39:00 Lindrum scam? 02:39:03 that Yittra guy did quite the colourful insults: Kindly defenestrate yourself, idiot (Yittra, Sep 28 06:13) 02:39:28 Madoka-Kaname: the first major scam in NomicWorld, the first online nomic 02:39:44 oerjan: holy shit, lindrum played agora? 02:39:52 briefly 02:40:22 * oerjan cannot recall 02:41:21 CFJ 1319: Called by neil (12 Sep); Judged TRUE by Lindrum (19 Sep) 02:41:35 The listed Trading Accounts on the AgorEx web page are sufficient 02:41:35 evidence of an Agreement between each listed Player and Lindrum in 02:41:35 which the Player may demand that Lindrum pay em the specified 02:41:37 amounts at any time. 02:41:40 I don't even... 02:43:07 I like how Goethe hasn't changed in almost twenty years 02:43:14 probably because he's ead 02:43:14 dead 02:43:17 -!- evincar has joined. 02:43:49 Thanks for your help last night, those folk who were involved. 02:44:06 Changing my types as mentioned worked out great. 02:46:15 You change your types as often as a girl changes her clothes 02:46:51 That's because programming languages are for thinking up programs as much as they are for writing them. 02:47:49 Patashu, hey! 02:48:27 * Patashu holds his arms out, twirls around 02:48:47 Also, most of the girls I know don't change their clothes excessively. 02:49:21 They do, however, wash them quite a lot more than the males do... 02:51:26 the Patashu greeting method 02:51:54 { 02:51:57 return 0; 02:51:57 } 02:53:43 Anyway, I'm off. The wireless sucks where I am anyhow. 02:53:49 -!- evincar has quit (Quit: G'night.). 02:54:14 oh 02:59:27 -!- ive has joined. 02:59:33 -!- Sgeo|web has left. 02:59:40 -!- Sgeo|web has joined. 03:01:06 -!- elliott_ has quit (Remote host closed the connection). 03:01:20 -!- elliott_ has joined. 03:01:27 -!- elliott_ has quit (Remote host closed the connection). 03:01:40 -!- elliott_ has joined. 03:03:28 -!- tswett has quit (Remote host closed the connection). 03:06:15 forever $ part elliott_ >> join elliott_ 03:07:05 Wait, join is defined elsewhere 03:08:22 ?hoogle part 03:08:22 Data.ByteString partition :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString) 03:08:22 Data.IntMap partition :: (a -> Bool) -> IntMap a -> (IntMap a, IntMap a) 03:08:23 Data.IntSet partition :: (Int -> Bool) -> IntSet -> (IntSet, IntSet) 03:12:06 Is it just my imagination, or does Learn Haskell in 10 Minutes suck? 03:12:22 http://norvig.com/21-days.html 03:13:17 Hmm, why did I think that it sucked? 03:13:25 http://norvig.com/21-days.html 03:13:37 elliott_: I want something I can show professors and other students >.> 03:13:49 you mean the incompetent idiots? 03:13:57 i am sure they will be inspired 03:14:07 also you read that page in the time it took to respond? 03:14:40 No, I didn't :/ 03:14:58 indeed. 03:23:57 hi guys im back did i miss the fun 03:24:27 unfortunately. 03:24:47 > fix ("Yes " ++) 03:24:48 "Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Ye... 03:26:23 > fix brokenThing 03:26:24 Fixed. 03:30:33 > brokenThing 03:30:34 Overlapping instances for GHC.Show.Show 03:30:34 (t -> ... 03:30:38 > brokenThing "" 03:30:39 Fixed. 03:30:44 > brokenThing (text "") 03:30:46 Fixed. 03:30:54 ?check \x -> brokenThing x == text "Fixed." 03:30:55 Not in scope: `brokenThing' 03:30:58 bah 03:31:02 > brokenThing undefined 03:31:03 Fixed. 03:31:35 :t brokenThing 03:31:35 forall t. t -> Doc 03:31:42 pretty obvious 03:32:39 @src brokenThing 03:32:39 Source not found. The more you drive -- the dumber you get. 03:33:28 :t text 03:33:29 String -> Doc 03:33:47 > text "Hello arbitrary statements from lambdabot" 03:33:48 Hello arbitrary statements from lambdabot 03:33:55 @src Doc 03:33:56 Source not found. That's something I cannot allow to happen. 03:34:23 Is it just a wrapper around a String that lambdabot directly displays, or what? 03:35:12 @hoogle Doc 03:35:12 Text.PrettyPrint.HughesPJ data Doc 03:35:12 Language.Haskell.TH.PprLib type Doc = PprM Doc 03:35:12 System.Directory getUserDocumentsDirectory :: IO FilePath 03:35:30 Doc can do a lot more, i think 03:35:59 Doc is a pretty-printing library 03:36:19 http://www.haskell.org/ghc/docs/latest/html/libraries/pretty-1.1.0.0/Text-PrettyPrint-HughesPJ.html 03:39:48 -!- PatashuXantheres has joined. 03:40:59 > zeroWidthText "Bluh?" 03:41:00 Bluh? 03:42:01 -!- Patashu has quit (Ping timeout: 258 seconds). 03:42:39 > doubleQuotes $ text "And It Don't Stop" 03:42:40 "And It Don't Stop" 03:45:51 > text "1\n2" 03:45:52 1 03:45:52 2 03:46:04 ... 03:46:22 > text $ fix ("Hello\n" ++) 03:46:37 thread killed 03:47:19 > text $ concat $ take 2 $ repeat "Hello\n" 03:47:20 Hello 03:47:20 Hello 03:47:26 > text $ concat $ take 5 $ repeat "Hello\n" 03:47:27 Hello 03:47:27 Hello 03:47:27 Hello 03:47:27 Hello 03:47:27 Hello 03:47:35 > text $ concat $ repeat "Hello\n" 03:47:43 *Exception: mueval-core: signal: 15 03:47:52 > text $ concat $ take 20 $ repeat "Hello\n" 03:47:56 mueval-core: Time limit exceeded 03:48:06 > text $ concat $ take 12 $ repeat "Hello\n" 03:48:07 Hello 03:48:07 Hello 03:48:07 Hello 03:48:07 Hello 03:48:07 Hello 03:48:09 [6 @more lines] 03:48:14 Boo 03:53:05 > var $ cycle "Hello\n" 03:53:06 Hello 03:53:06 Hello 03:53:06 Hello 03:53:06 Hello 03:53:06 Hello 03:53:08 [6 @more lines] 03:53:23 @more 03:53:23 Hello 03:53:24 Hello 03:53:24 Hello 03:53:24 Hello 03:53:24 Hello 03:53:25 Hello... 03:56:12 :t var 03:56:14 forall a. String -> Sym a 03:56:23 @url var 03:56:23 I know nothing about var. 03:56:34 How do I get from a @hoogle result to a link? 03:57:22 a link to what 03:57:53 The library page where the result was found 03:58:00 *documentation for 03:58:37 GOOGLE 03:59:49 @hoogle (a -> b) -> [a] -> [b] 03:59:50 Prelude map :: (a -> b) -> [a] -> [b] 03:59:50 Data.List map :: (a -> b) -> [a] -> [b] 03:59:50 Control.Parallel.Strategies parMap :: Strategy b -> (a -> b) -> [a] -> [b] 03:59:54 oops 03:59:55 @google Prelude map 03:59:56 http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html 03:59:57 Title: Prelude 03:59:57 i did not mean to caps google 04:00:58 What's the difference between Hoogle and Hayoo? I don't think Hayoo does types, does it? But does it search all of Hackage or something? 04:01:16 hayoo does less advanced things with types. 04:01:34 How do I get from a @hoogle result to a link? <-- use the hoogle website 04:03:24 -!- elliott__ has joined. 04:04:50 -!- atehwa_ has joined. 04:05:20 oerjan: what happens when you stop having qualia, help? 04:05:35 -!- glogbackup has quit (Ping timeout: 252 seconds). 04:05:35 -!- atehwa has quit (Read error: Operation timed out). 04:05:35 -!- elliott_ has quit (Read error: Connection reset by peer). 04:05:35 -!- PatashuXantheres has quit (Ping timeout: 252 seconds). 04:10:32 @hayoo (a -> b) -> a -> b 04:10:32 Unknown command, try @list 04:10:36 @hoogle (a -> b) -> a -> b 04:10:36 Prelude ($) :: (a -> b) -> a -> b 04:10:36 Prelude ($!) :: (a -> b) -> a -> b 04:10:36 Data.Function ($) :: (a -> b) -> a -> b 04:10:41 qualms about qualia 04:10:45 oerjan: help 04:10:49 @hoogle [a -> b] -> a -> [b] 04:10:49 am i even typing into irc 04:10:49 Control.Applicative (<*>) :: Applicative f => f (a -> b) -> f a -> f b 04:10:49 Control.Monad ap :: Monad m => m (a -> b) -> m a -> m b 04:10:49 Control.Applicative (<**>) :: Applicative f => f a -> f (a -> b) -> f b 04:10:51 i do not know 04:10:56 i am not sure i am even typing 04:11:03 @hoogle (a -> b) -> [a] -> b 04:11:03 Prelude map :: (a -> b) -> [a] -> [b] 04:11:04 Data.List map :: (a -> b) -> [a] -> [b] 04:11:04 Prelude ($) :: (a -> b) -> a -> b 04:11:22 @djinn ((a -> b) -> [a] -> b) -> [a -> b] -> a -> [b] 04:11:23 Error: Undefined type [] 04:12:31 Madoka-Kaname: sequence in the (->) monad. also the strange thing lambdabot does for flip. 04:12:41 > flip [sin, cos] 1 04:12:45 mueval-core: Time limit exceeded 04:12:47 > flip [sin, cos] 1 04:12:50 [0.8414709848078965,0.5403023058681398] 04:13:48 :t (\f vf v -> f ($v) vf) 04:13:49 forall t a b t1. (((a -> b) -> b) -> t -> t1) -> t -> a -> t1 04:14:11 @pl (\f vf v -> f ($v) vf) 04:14:11 flip . (. flip id) 04:15:12 @djinn (((a -> b) -> b) -> t -> t1) -> t -> a -> t1 04:15:12 f a b c = a (\ d -> d c) b 04:15:23 @djinn ((a -> b) -> b) -> t -> t1 04:15:23 -- f cannot be realized. 04:15:30 -!- oerjan has quit (Quit: Good night). 04:16:39 -!- Patashu has joined. 04:48:44 -!- elliott_ has joined. 04:51:43 -!- elliott__ has quit (Ping timeout: 248 seconds). 04:54:58 A habitual esolanger's (likely) advantage in Haskell: pointless stuff comes naturally. 05:01:23 -!- Zwaarddijk has quit (Ping timeout: 258 seconds). 05:01:27 -!- Zwaarddijk has joined. 05:06:05 fizzie: More importantly, something being odd is *not* considered an insurmountable barrier. 05:07:20 Am I considered a habitual esolanger? 05:07:30 Or just an inhabitant of esolang...er 05:07:34 esolangland 05:11:55 -!- elliott_ has quit (Remote host closed the connection). 05:14:09 -!- elliott_ has joined. 05:56:34 -!- elliott_ has quit (Remote host closed the connection). 05:58:04 -!- elliott_ has joined. 06:02:42 -!- elliott_ has quit (Ping timeout: 260 seconds). 06:13:50 -!- ive has quit (Ping timeout: 276 seconds). 06:49:01 :t map 06:49:01 forall a b. (a -> b) -> [a] -> [b] 06:59:20 -!- pikhq has joined. 07:02:19 -!- pikhq_ has quit (Ping timeout: 258 seconds). 07:02:48 -!- nooga has joined. 07:11:16 -!- monqy has quit (Quit: hello). 07:15:33 -!- ive has joined. 07:23:53 -!- BAPU has joined. 07:24:03 -!- BAPU has quit (Client Quit). 07:50:01 aha 07:50:05 thought so 08:43:16 -!- copumpkin has quit (Ping timeout: 244 seconds). 08:43:42 -!- copumpkin has joined. 08:48:13 -!- ive has quit (Quit: leaving). 08:49:26 -!- Vorpal has joined. 09:17:08 -!- pikhq_ has joined. 09:17:27 -!- pikhq has quit (Ping timeout: 258 seconds). 09:30:22 -!- ais523 has joined. 09:43:14 -!- ais523 has quit (Read error: Connection reset by peer). 09:45:16 -!- ais523 has joined. 09:54:37 -!- CakeProphet has quit (Ping timeout: 260 seconds). 09:59:59 -!- ais523 has quit (Read error: Operation timed out). 10:03:12 -!- jonmacuse has joined. 10:04:11 -!- jonmacuse has quit (Quit: Leaving). 10:08:30 -!- cheater_ has quit (Excess Flood). 10:08:59 -!- cheater_ has joined. 10:12:17 -!- ais523 has joined. 10:13:19 gah, Compiz has stopped working for no apparent reason 10:13:29 it can't find the graphics card; not even rebooting helps 10:13:45 let me try another program that uses the graphics card 10:14:40 X Error of failed request: BadLength (poly request too large or internal Xlib length error) 10:14:49 I wonder what's up with my graphics card? 10:15:55 Vorpal: any ideas? 10:16:18 hi 10:16:59 ais523, Does plain 2D graphics work? 10:17:13 yes; Metacity works 10:17:22 but doing anything that should involve a 3D graphics card fails 10:17:35 any recent upgrade? 10:17:45 nothing but security updates 10:17:45 like to kernel or X11 or whatever 10:17:52 I can check if any affected packages likely to be involved 10:18:00 probably a good idea 10:18:44 xserver-common (2:1.7.6-2ubuntu7.6) to 2:1.7.6-2ubuntu7.8 10:18:54 looks very much like it might be at fault 10:19:21 let me install the older version 10:19:25 ais523, also if nothing else works you might want to try powering off and unplugging (plus removing battery if a laptop) then wait for half a minute or such. And then power it on again. Helped me with some weird GPU issues once. 10:19:52 ais523, good thing I didn't upgrade that on my laptop yet then 10:20:54 hmm, aptitude tried to interpret my request as uninstalling libvpx0 and upgrading X to the latest version, as it couldn't find the specific old version I mentioned 10:21:00 so I didn't let it 10:21:04 ouch 10:21:50 I tried apt-get instead, and it errored out on the specific version mentioned 10:21:56 which is a more sensible interpretation, I think 10:22:06 so, hmm, I'm stuck without the ability to undo the upgrade that broke things 10:22:57 ais523, check for bug reports? Or downgrade to an even older version 10:24:05 ais523, actually there seems to be an upgrade already 10:24:14 ais523, 2:1.7.6-2ubuntu7.9 might be it 10:24:19 that is on lucid 10:24:30 changelog says it reverted a security fix for now 10:24:51 The following packages will be REMOVED: libvpx0{u} The following packages will be upgraded: gnome-utils libgdict-1.0-6 xserver-common xserver-xorg-core 10:24:57 wut 10:25:00 yep, looks like they pushed a bad fix and only just noticed 10:25:22 looks like I have the "bad" version but I didn't notice any issues 10:25:47 oh wait, I haven't restarted X since the upgrade 10:26:31 -!- ais523 has quit (Quit: Restarting X). 10:27:39 -!- ais523 has joined. 10:28:04 yay, fixed, thanks 10:28:20 it still loaded Metacity by default, but changing the default to Compiz actually worked this time 10:28:50 first time I've had a really noticeable break as a result of an update 10:40:20 "chromium-browser will be upgraded from version 12.0.742.112~r90304-0ubuntu0.11.04.1 to version 14.0.835.202~r103287-0ubuntu0.11.04.1", quite a jump. (All this talk about upgrades made me go look.) 10:43:57 Does anyone even take notice of Chromium version numbers? 10:44:50 14 is at least two better than 12. 10:50:46 fizzie: well of course, how could Chrome's version number stay ahead of Firefox's otherwise? 10:51:43 if no one looked at chrome's version number, would it still be going up? 10:55:39 If a Chrome version number is incremented in the forest, and no-one is around to see it, does it still need an entry in the changelog? 11:16:54 -!- GreaseMonkey has quit (Quit: The Other Game). 12:01:37 -!- ais523 has quit (Remote host closed the connection). 12:02:17 -!- variable has quit (Excess Flood). 12:03:02 -!- variable has joined. 12:06:48 Chrome developers should write a program that checks firefox's version number and increments chromes' until it's 10%+/-rand() higher 12:12:52 -!- cheater_ has quit (Quit: Ex-Chat). 12:13:38 then firefox developers make one of their own 12:13:43 and the largest integer known to man is discovered 12:25:26 Did you see that thing about algorithmic book prices in Amazon? http://www.michaeleisen.org/blog/?p=358 12:25:32 "Amazon’s $23,698,655.93 book about flies" 12:25:41 It may in fact have been linked on this very channel. 12:26:59 how about http://www.telegraph.co.uk/news/uknews/8837736/Man-orders-size-14.5-slipper-and-gets-size-1450-after-mistranslation-in-China.html 12:27:36 oh, haha. that is cool 12:36:52 -!- Ngevd has joined. 12:36:59 Hello! 12:49:56 I liked today's IWC annotation 12:55:23 -!- Zetro has joined. 12:57:20 -!- ais523 has joined. 12:58:30 -!- MSleep has changed nick to MDude. 13:07:48 What's an interesting SKI program (combination?)? 13:09:23 -!- ais523 has quit (Remote host closed the connection). 13:11:05 what would qualify as interesting? 13:11:18 Really, something short that looks good 13:11:25 Doesn't help, does it? 13:12:21 -!- ais523 has joined. 13:23:29 -!- iamcal has quit (Remote host closed the connection). 13:26:25 -!- ais523 has quit. 13:26:38 -!- ais523 has joined. 13:33:49 -!- derdon has joined. 14:00:04 -!- iamcal has joined. 14:02:12 Does anyone here use etherpad? I signed up for it, but the email for it hasn't arrived. 14:02:22 I want a service like 'downforeveryoneorjustme.com' but for sites that send out emails when you register 14:05:15 Yeah, see 14:05:22 I register again with my gmail instead of my hotmail and it works instantly 14:05:38 I don't know if I typoed my email or if it didn't like it or if it was a fluke or... 14:05:52 -!- copumpkin has quit (Ping timeout: 260 seconds). 14:06:16 -!- copumpkin has joined. 14:23:31 -!- copumpkin has quit (Quit: Computer has gone to sleep.). 14:47:47 -!- copumpkin has joined. 14:50:19 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 , Skype: patashu0 .). 14:54:24 -!- hagb4rd has quit (Ping timeout: 248 seconds). 15:07:19 -!- pikhq has joined. 15:10:19 -!- pikhq_ has quit (Ping timeout: 258 seconds). 15:10:33 -!- ais523 has quit (Remote host closed the connection). 15:14:24 -!- augur has quit (Remote host closed the connection). 15:31:16 -!- Ngevd has quit (Ping timeout: 260 seconds). 15:46:27 -!- augur has joined. 15:54:46 -!- ais523 has joined. 16:05:23 -!- elliott has joined. 16:13:23 -!- sllide has joined. 16:24:05 -!- derrik has joined. 16:40:43 `quote 16:40:43 `quote 16:40:44 `quote 16:40:44 `quote 16:40:45 `quote 16:40:58 609) OK, making myself emergency doctor on the advice of IRC. 16:41:10 513) its UNEBARBEL 16:41:11 179) It's like mathematicians, where the next step up from "trivial" is "open research question". "Nope... No...This problem can't be done AT ALL. This one--maybe, but only with two yaks and a sherpa. ..." 16:41:11 423) so about jacuzzis, do they usually have a way to make it it not heat but freeze the water? 16:41:11 315) elliott, incidentally, I started my explorations again after getting bored of the Himalayas. 16:41:27 `delquote 513 16:41:30 ​*poof* 16:44:32 Booting from the grub-rescue prompt LIKE A BOSS. 16:45:23 `quote 16:45:24 `quote 16:45:24 `quote 16:45:25 `quote 16:45:25 `quote 16:45:27 276) !bfjoust test (-)*10000 Score for Vorpal_test: 12.9 yay 16:45:27 hi Gregor 16:45:29 9) Lil`Cube: you had cavity searches? not yet trying to thou, just so I can check it off on my list of things to expirence 16:45:31 19) oerjan: are you a man, if there weren't evil in this kingdom to you! you shall find bekkler! executing program. please let me go... put me out! he's really a tricycle! pass him! 16:45:40 226) Oh. Stuff that uses actual physical numbers stemming from science. Bleh *gets bored* 16:45:41 612) elliott: mr president, commissioner, i fully accept that description when it comes to human rights. yes, with an average fat content of chocolate, and we are using double standards! we all know that under present legislation and also in relation to standardization bodies. if i do not want. 16:45:59 hmm, 276 or 9 16:46:27 wow, I ended up reading "A Brief, Incomplete and Mostly Wrong History of Programming Languages" again 16:46:33 and am utterly shocked at how recent Java is 16:46:35 I love that 16:46:41 and, err, really? 16:46:42 so do I 16:46:48 1996? 16:46:52 one year prior, actually 16:46:53 I assumed it was older than I am 16:47:11 nah, it's very much a 90s internet boom thing 16:47:16 and I assumed it predated most currently-popular scripting languages, too 16:47:18 ais523: remember that it originated to program set top boxes 16:47:28 what, Java? 16:47:29 yep 16:47:30 seriously? 16:47:37 that's why it's so ~safe~ 16:47:38 for reliability 16:47:39 sorry, I'm in a mood where I vaguely expect to be trolled atm 16:47:40 -!- sllide has quit (Ping timeout: 260 seconds). 16:47:46 and then they realised nobody wanted to do that, and this Web thing is totally catching on 16:47:52 so they decided to retarget it 16:47:54 I wish I was kidding 16:48:10 -!- Ngevd has joined. 16:48:10 pointless trivia: it was called Oak while it was for set-top boxes 16:48:19 Wow, I'm here! 16:48:20 Hello! 16:48:22 ais523: I do find it kinda crazy that Python is older than Java, though 16:48:41 hmm, are virtual machines (in the JVM sense) similar in age to Java, or much older? 16:48:47 ais523: in fact, Ruby might even be older 16:48:51 also, much older 16:49:02 I can't think of an example but there were definitely VMs in the eighties 16:49:07 ais523: Smalltalk, f.e. 16:49:14 so at least seventies 16:49:19 ah, Smalltalk's VM-based? 16:49:27 yes 16:51:27 I wish Ilari was still around 16:51:30 I want to know what's up with IP 16:51:47 Instruction Pointer? 16:51:51 Internet Protocol? 16:51:56 Indian Police? 16:52:11 Independent Party 16:52:14 Dinnertime 16:52:15 -!- Ngevd has quit (Client Quit). 16:53:48 http://blog.wolfram.com/2010/12/17/the-mathematica-one-liner-competition/ 16:53:52 This looks like a golfing challenge. 16:54:53 hey ais523, Mathematica 16:55:05 man that Tubular Bells is about fifty times worse than the one-liner chiptunes :P 16:55:37 elliott: they do that competition every so often 16:55:49 ais523: "While this expression is a disaster practically, it has a certain conceptual appeal that made up for it hanging the judges’ machines." --Wolfram 16:55:51 all it really does is show off what the standard library is good at doing 16:55:54 (company, not person) 16:56:04 ais523: That's my one-liner explanation of Mathematica. 16:56:25 http://blog.wolfram.com/data/uploads/2010/12/OneLiner9.png for very large values of 137 16:58:02 How hard would it be to reimplement Mathematica's functionality as a Haskell library? 16:58:22 very 16:58:31 mathematica is a few gigabytes of library 16:58:53 Would the end result be better? =p 16:59:10 Ehh.... Does Mathematica lazy evaluate? 16:59:31 If it does, that dishonorable mention should actually some stuff, right? 17:03:04 it's strict, AFAIK 17:03:46 actually output* 17:04:18 Mathematica uses term rewriting, so it's hard to replicate its interface in something like Haskell 17:04:36 -!- monqy has joined. 17:05:03 Some things would also be a pain 17:05:19 Haskell is horrible at things like type-safe sized data structures 17:05:33 (e.g. matrices typed by size) 17:05:37 coppro: Mathematica doesn't have those 17:05:41 I know 17:05:42 so I don't know what you're going on about 17:05:44 but it should 17:05:46 it doesn't 17:05:49 it should 17:05:58 see Axiom 17:06:21 anyway, haskell isn't terrible at those, they're just a pain to write 17:06:25 we should just use coq 17:06:37 elliott: I consider a pain to write isomorphic to terrible 17:06:52 coppro: so anything hard to implement is terrible to use? 17:07:21 No, but such a matrix system would also be horrible to use 17:07:46 shrug; not if you were fine with predefined operations 17:07:54 manual loops would be a bit of a pain 17:08:51 Matrix (S (S (S (S Z)))) (S (S (S (S (S (S (S Z))))))) 17:09:12 seems terrible 17:09:28 anyway, bus time 17:12:40 Matrix (S (S (S (S Z)))) (S (S (S (S (S (S (S Z))))))) 17:13:05 coppro: Matrix N4 N7 17:13:08 omg so terrible 17:15:27 . 17:17:30 what 17:17:47 -!- derrik has quit (Ping timeout: 252 seconds). 17:19:50 elliott: I wanted to see if I was still connected 17:20:04 that won't help 17:20:06 messages are echoed locally 17:20:09 try /topic 17:20:57 Actually, when I get disconnected, webchat seems to stop echoing my messages. 17:21:00 I use /ctcp ping ais523 17:21:07 which gets abbreviated to /ping ais523 in practice 17:21:21 I tend to use /ping ais523 even when I'm not actually ais523; it still works, because the error message comes from the server 17:21:29 I use /whois fizzie. 17:21:38 might as well just /ping q :P 17:21:43 but yeah, I've got in the habit of doing /topic 17:22:14 /topic 17:22:27 say /topic complains about insufficient arguments 17:22:46 it doesn't 17:23:07 On this webchat it does for some reason 17:23:12 elliott: oh dear: today I was trying to explain {C-style functions|static methods} to my students 17:23:17 and used a hello world function as the example 17:23:23 which would write hello world to arbitrary streams 17:23:34 FILE streams? 17:23:51 oh, C++ streams? 17:24:12 it was Java 17:24:14 so PrintStreams 17:24:35 ah 17:24:35 go on 17:27:20 there's not much go on 17:27:26 I just realised afterwards that it was a ridiculous thing to do 17:27:30 especially when I wrote docs for it 17:27:54 heh 17:28:31 h but yeah, I've got in the habit of doing /topic <-- same as me then 17:28:35 s/^h// 17:29:28 I just realised afterwards that it was a ridiculous thing to do <-- I seen worse examples from teachers than that. 17:30:09 well, I improvise 17:30:16 so my examples are bound to be silly sometimes 17:30:56 ais523, not too bad then. I seen sillier planned examples and assignments. 17:31:01 have seen* 17:31:46 what was it on the exam for the database stuff now again... Oh yeah, superman bug swatting database. No it didn't make any sense. 17:32:14 Vorpal: Sorry but that sounds like the best? 17:32:47 elliott, best or worst or whatever. You can't deny it was silly :P 17:33:07 I wrote some actually difficult for me to write Haskell code 17:33:12 It looks horribleugly 17:33:16 Sgeo|web: was it hello world 17:33:21 No 17:33:33 are you sure 17:33:35 Sgeo|web, don't show it to elliott. He will just poke fun at you. 17:33:46 it's called constructive criticism 17:33:51 Better fun than holes. 17:33:58 elliott, FSVO constructive 17:34:34 Vorpal: should i deliberately withhold all the ways in which a given piece of code is broken and thus hold back its author???? 17:35:09 elliott: if you think that code is broken badly enough that you can produce a reasonably long list of ways in which it is broken 17:35:10 elliott, I didn't say that. 17:35:15 there are probably more ways that it's broken that you didn't catch 17:35:33 When I'm less tired, I might ask in #haskell 17:35:45 elliott, what I was complaining about was the way you *present* said criticism. 17:36:00 But it's not broken (except for requiring users to supply a type signature), as such. It works. It's just a godawful horror 17:36:09 "(except for requiring users to supply a type signature)" 17:36:15 Sgeo|web: I've found the problem already 17:36:23 you're trying to do something stupid with the type system; stop it 17:36:43 elliott, you do weird things to the type system quite often 17:36:55 I might be using the type system incorrectly, but I'm abusing monads, not the type system 17:37:05 abusing monads? 17:37:11 Vorpal: yes, because I'm a rather good Haskell programmer 17:37:19 Vorpal: and it is always strictly for fun 17:37:20 elliott: o rly 17:37:22 (Specifically, I'm doing convoluted stuff with a State monad when I feel I should probably be using a State and Writer monad stack) 17:37:26 copumpkin: compared to Sgeo|web 17:37:29 elliott, well yeah 17:37:43 you should combine lenses with your state 17:37:49 that makes state twice as awesome 17:37:50 And probably also separating long lines into parts or something 17:38:56 So, if my state was a tuple and I wanted to update the first one, lenses would make that convenient? 17:39:20 Wow, when I write it like that, I think I could have just done (firstpart, secondpart) <- get 17:39:30 And not fiddle with fst and snd 17:39:48 EVERYWEHRE IN THE CODE 17:39:52 data-lens even has special stuff for dealing with monadstate iirc 17:40:07 Sgeo|web: (<$>) :: (a -> b) -> (c,a) -> (c,b) 17:40:34 and also lenses for tuples 17:40:40 couples specifically 17:40:46 couples 17:40:53 2-topules 17:41:07 Of course there's a library for making what I did easier that I had no clue about, why wouldn't there be? 17:41:26 That will always be the case for any value of "what I did" 17:41:34 lenses are overkill for a tuple 17:41:55 http://pastie.org/private/1aazxbtt5gohfmmp4uudfa 17:42:09 Some of the comments are obsolete 17:42:17 arrow is good for tuple manipulation, bad for other things 17:43:30 -!- Ngevd has joined. 17:43:39 http://pastie.org/private/sqqcpinl5hke0fuawknpka example usage 17:44:29 your commenting style sucks, put them above the relevant lines 17:44:42 Sgeo|web: evalState/execState means you run the computation twice 17:44:46 :t runState 17:44:47 forall s a. State s a -> s -> (a, s) 17:57:04 -!- sllide has joined. 17:59:47 -!- Slereah_ has quit (Ping timeout: 260 seconds). 18:05:48 -!- Slereah_ has joined. 18:15:51 -!- Slereah_ has quit (Remote host closed the connection). 18:16:16 -!- Slereah_ has joined. 18:16:41 I knew about runState just thought that evalState and execState would be more convenient to use in my case 18:17:19 Sgeo|web: More convenient vs. computing everything twice. 18:17:27 Anyway, it's not inconvenient, just deconstruct it in a where clause. 18:17:49 I need to start using where clauses more 18:18:40 Sgeo|web, having discovered the wonder of the clause, changed his grammar techniques 18:42:58 -!- sebbu2 has joined. 18:42:58 -!- sebbu2 has quit (Changing host). 18:42:59 -!- sebbu2 has joined. 18:43:52 -!- sebbu has quit (Ping timeout: 240 seconds). 18:59:26 -!- pikhq_ has joined. 18:59:33 Turns out, I can't make an IRC bot 18:59:40 -!- pikhq has quit (Ping timeout: 244 seconds). 18:59:56 ais523, the spambots have started with gambling sites 19:00:07 fungot: Help Ngevd make an IRC bot, you're the expert. 19:00:07 fizzie: so, let's say i call them mindless games. if we hit every stupid person, any person going, tough one. if we solve it,... it's what that guy in medina, a village near the mystic mountain" 65,000,000 b. c.? yes, i'd have done something very brave! he's probably up north, to guardia!!! let's toast? or decide. fnord 22:11, 17, 18, 19, 20, 21, 22, 22, ...too much output! 19:00:12 Ngevd: they started that a bit earlier 19:00:14 (Almost typed "you're the export".) 19:00:46 I reckon, if I knew anything about the IRC protocol, I could probably make Pietbot 19:00:59 the IRC protocol is really pretty simple 19:01:14 I'll learn it at the weekend 19:01:21 you start off by writing USER username anything anything :realname 19:01:31 then PASS password (if you need a password to log on) 19:01:32 then NICK nickname 19:01:35 and that's enough to connect 19:01:42 (the username's the bit before the @ in your whois info) 19:01:50 then you join channels with JOIN #esoteric 19:01:59 and send messages with PRIVMSG #esoteric :this is a message 19:02:01 ais523: Can you join any channel with "JOIN #esoteric"? 19:02:06 (the colon means "quote to end of line") 19:02:12 fizzie: depends on the server, I guess 19:02:24 you can join #esoteric, at least 19:02:26 you start off by writing USER username anything anything :realname 19:02:27 that counts as "any channel" 19:02:28 ais523: no you don't 19:02:35 elliott: really? 19:02:43 NICK comes last, USER and PASS can be either way round 19:02:51 ais523: USER (RFC 2812) 19:02:55 and the second and third args are habitually ignored 19:02:58 nobody's used the 1459 USER since, um, ever 19:03:13 what's /meant/ to go in the field? 19:03:19 I've tried all sorts of random stuff htere 19:03:21 *there 19:03:23 ais523: mode bitmask 19:03:25 as decimal 19:03:26 and Freenode never seems to care 19:03:31 8 is the usual thing, I think 19:03:33 ah, I don't think I tried a number 19:03:35 ais523: it'll just use a default if you pass something invalid 19:04:07 like "localhost", that one's always fun 19:04:24 it's like using localhost in a HELO in SMTP (which actually works, and is often the best option) 19:04:26 "Hello, I'm me" 19:05:05 elliott I seem to remember you saying something to the effect of tzdata being overcomplicated for the job? 19:05:21 Vorpal: I don't think TZ variables are a pain to set; DST rarely changes 19:05:29 it's certainly convenient, but I don't think it's that important 19:05:41 elliott, well just looked at changelog of tzdata: "Palestine suspends DST during Ramadan in 2011" 19:05:43 elliott: what if you live in a country where it changes every few years? 19:05:52 Vorpal: and probably it should just be a filesystem hierarchy of TZ variable settings, rather than a complicated binary format 19:06:02 ais523: then your life is already hell :) 19:06:02 I suppose the UK's worse, it changes every six months or so here 19:06:11 or "West Bank changes date for DST end in 2011 to Sep 30th" 19:06:17 Vorpal: and probably it should just be a filesystem hierarchy of TZ variable settings, rather than a complicated binary format 19:06:21 I didn't say tzdata was useless in concept 19:06:27 I just think that it's overkill as it is 19:06:30 but most things are 19:06:36 ais523, it changes according to a sensible pattern iirc? 19:06:46 or at least predictable pattern 19:06:48 elliott: using Metacity a bit earlier reminded me of how much I prefer Compiz 19:06:51 Vorpal: yes, I was making a joke 19:06:56 ais523, oh okay 19:07:07 not a very good one, but I still expected most people to catch it 19:07:08 ais523, anyway Israel used to have DST different for every year 19:07:33 DST is hell on earth, anyway 19:07:41 yeah 19:08:07 Yeah, I just use Swatch Internet Time all the time. 19:08:21 hah 19:08:22 Biel Mean Time for the win, and so on. 19:08:53 holy shit, they removed the Eq/Show superclasses of Num??? 19:09:01 why is it called Biel btw? 19:09:05 (Swatch Internet Time is based on the UTC+1 observed at Swatch's headquarters in Switzerland.) 19:09:07 elliott, what? where? 19:09:13 Biel, Switzerland, to be more precise. 19:09:17 elliott, and when? 19:09:17 well going by http://hackage.haskell.org/trac/ghc/changeset/b59fe25a24c4b913a9935c71b1b42a060ab53dcc/utils and http://haskell.1045720.n5.nabble.com/Proposal-Remove-Show-and-Eq-superclasses-of-Num-td4808712.html 19:10:26 huh 19:10:45 Instead of the 1000-".beat" split of the @-time, I sort-of like the hexclock way of having a midnight of 0000, a noon of 8000, and one hex-second (about 1.32 regular seconds) before midnight as ffff. 19:11:36 elliott, I'm not sure how sensible removing Eq is? When would you want a Num without Eq? 19:11:49 Vorpal: computable reals 19:11:51 (->) 19:11:53 etc. 19:11:59 (->) is numeric? 19:11:59 hm 19:12:04 :t (->) 19:12:05 parse error on input `->' 19:12:06 ais523: yes, reader monad interpretation 19:12:11 (I'm not as sure I like the Hexclock way of splitting it as A_BC_D and to call the middle bit minutes.) 19:12:15 ais523: (f `op` g) x = f x `op` g x, etc. 19:12:20 ah 19:12:34 fizzie: "Furthermore, the essentially pointless and often confusing A.M. and P.M. suffixes have been eliminated. Anyone who has accidentally set his or her alarm clock for seven P.M. instead of seven A.M. can appreciate this." 19:12:35 elliott: I don't see offhand how that makes it numeric 19:12:57 ais523: well, it's Num b => Num (a -> b) 19:13:02 elliott, don't all alarm clocks use 24h anyway? 19:13:04 fizzie: I like decimal time 19:13:05 fromInteger = const . fromInteger, etc. 19:13:19 and normally split it as 3 millidays with 2 centimillidays (we need a better prefix for that) 19:13:34 it differs from swatch internet time in that it follows timezones rather than being fixed at UTC+1 19:13:43 decimal sux 19:13:52 elliott: but it produces really nicely-sized time units 19:13:55 ais523, why UTC+1 for swatch btw? Why not UTC 19:14:05 why ask me? 19:14:06 Vorpal: not only do you have no context 19:14:07 I didn't invent it 19:14:08 ais523: Hmm. What's 2 centimillidays in days, anyways? 19:14:08 but you have no memory? 19:14:11 (Swatch Internet Time is based on the UTC+1 observed at Swatch's headquarters in Switzerland.) 19:14:13 Biel, Switzerland, to be more precise. 19:14:21 elliott, I missed that line 19:14:33 pikhq_: one of them is a little smaller than a second 19:14:38 I never read it, thus it is unrelated to my memory 19:14:39 elliott: IT'S COMMITTED, IN 7.4 THEY WON'T BE 19:14:40 YESSSSSSSSSSSS 19:14:46 an 86400/100000th of a second, to be precise 19:14:51 ais523: Well, I'm wondering if I can come up with a better prefix is why I ask. 19:14:57 > 86400/100000 19:14:58 0.864 19:15:02 2 centimillidays = x days. Solve for x por favor. 19:15:06 err, I could have guessed that… 19:15:29 * pikhq_ seriously has no idea how concatenating metric prefixes should work. 19:15:31 pikhq_: oh, that's not what I meant 19:15:38 I mean 3 digits go to millidays, and another 2 to centimillidays 19:15:50 Yes, but what the eff is a centimilliday? 19:15:51 "milliday" is a nice enough name, anyway 19:15:58 but I'm not sure what to call the subdivision 19:16:05 pikhq_: like dollars and cents, except millidays and centimillidays 19:16:13 0.0001 days, then? 19:16:21 0.00001 19:16:30 it's a hundredth of a thousandth 19:16:54 ais523: Well, hextime has "naturally" three levels of units; 1.32s, 5m37.5s and 1h30m. 19:17:06 5m37.5s. So natural. 19:17:09 ouch 19:17:15 So, 10^-5. 19:17:24 The prefix shall hereby be kotsu-. 19:17:26 decimal time has centidays which are around 15 minutes, which is a great division 19:17:39 and kotsudays which are a bit less than a second 19:17:48 ais523, why is that a great division? 19:18:02 Vorpal: 15-minute chunks are the chunks human schedules nearly always operate on 19:18:13 (etymology: 10^-5 unit prefix for traditional Japanese units) 19:18:29 ais523, only because our system is currently based on seconds and minutes 19:18:43 Vorpal: that, and the fact that it's a conveniently-sized unit 19:18:53 why don't we use, say, 10-minute chunks? or 12-minute chunks? 19:18:56 or 20-minute chunks? 19:19:35 ais523, well yes, but I suspect that anything between say 13 minutes and 20 minutes would be acceptable as a standard schedule unit, had those fit better with our time units. 19:19:53 there are other great divisions, ergo that one isn't 19:20:07 ais523: Sorry, 4 levels of units, of course: 1.32s, 21.09s, 5m37.5s and 1h30m. Anyway, the 1.32s hexsec is a reasonable "short time", and the 1h30m hexhour is a reasonable "longer time"; it's just the 21.09s hexminute that's a bit silly-short. 19:20:07 elliott, strawman 19:20:20 well, a centiday isn't exactly 15 minutes 19:20:23 it's slightly less 19:20:26 Man. Metrication in Japan must have been really easy. Their traditional units are metric. 19:20:27 elliott, what I was saying: why should we stick to the current division if we design a new unit system anyway 19:20:28 but only slightly 19:20:44 Vorpal: You didn't actually say that. 19:20:53 elliott, nor did I say what you claimed 19:20:56 Yawn. 19:21:10 Anyway, fifteen minutes are a good unit, so if it falls naturally out of a system, that is a point in favour of that system. 19:21:11 Simple as that. 19:21:55 well yes, but anything near that sort of size is just as good. What I'm claiming here is that 15 minutes isn't the optimum. In fact I think slightly longer would be better. 19:23:02 fungot: does it defurbulate VCL's crudgenickle sklep? 19:23:03 olsner:, so i'd have to consider that although the reduction in actual transportation section from former friend lives, their door had my computer with full u+ support" then they both bowed low. just keep the safe or tub and emptied it 19:23:16 Also you get a reasonable approximation of current units by doing a:bb:cc where a = 0..f, bb = 00..3f, cc = 00..3f, which gives 0:00:01 as 1.32s (a second-analogue), 0:01:00 as 84.374s (a minute-analogue) and 1:00:00 as 1h30m (an hour-analogue), but that's no longer as clean as just the four hexdigits. 19:24:46 fizzie: And you can truncate-round it using big endian fixed-point, right? 19:26:33 Yes, you get the time in coarser units (truncated) by just reading a shorter number if you are big-endian. 19:27:24 fizzie: Another victory of big-endian. 19:28:34 same with little-endian, you just read from the other end 19:28:48 ais523: Yes, but you need an address adjustment. 19:29:22 ais523: (There was a discussion (if you can call it that) on this other channel on the little-endian property of being able to convert to narrower integers without adjusting the address.) 19:29:30 on the other hand you need no address adjustment in little endian if you just want the seconds, or the seconds and the minutes 19:29:32 fizzie: I know, I was in it 19:29:43 in fact, I even believe I pointed out that it was the main advantage of little-endian 19:29:45 fizzie: It was -minecraft. 19:29:51 Though we've talked about it previously here. 19:29:54 yeah 19:29:57 (it's also the reason gcc-bf is little-endian, incidnetally) 19:29:57 Oh, "this other channel". 19:30:36 is -minecraft still in use? 19:30:46 O'course. 19:31:14 -!- tiffany has joined. 19:31:33 fizzie: Can you believe I'm still working on them n-grams? 19:46:25 -!- CakeProphet has joined. 19:46:26 -!- CakeProphet has quit (Changing host). 19:46:26 -!- CakeProphet has joined. 19:47:56 Oh, it's the Pake Crophet. 19:49:20 -!- pikhq_ has quit (Read error: Operation timed out). 19:49:36 -!- pikhq has joined. 19:56:13 the poke craphet 19:56:39 The Peko Crephat 19:58:58 im peko crephat 20:00:45 :t repeat 20:00:46 forall a. a -> [a] 20:01:42 -!- Vorpal has quit (Ping timeout: 260 seconds). 20:04:14 Is cycle equivalent to (concat . repeat)? 20:04:32 yes 20:11:39 Oh, cool 20:11:58 poke crêpe hat 20:13:03 *peko 20:13:27 That's rapidly approaching Gregor 20:18:38 -!- sebbu2 has changed nick to sebbu. 20:20:08 -!- tswett has joined. 20:21:57 -!- oerjan has joined. 20:26:48 Cake "Ark-Tech-Pope" Prophet. 20:29:10 hi oerjan 20:30:58 hi elliott 20:31:16 hi tswett 20:31:26 * elliott wishes there was some standard (Map a Int, Int) structure 20:31:29 hi Ngevd 20:31:39 with "index :: a -> (Map a Int, Int) -> (Int, (Map a Int, Int)" 20:31:46 which inserts with highest value if it's not present 20:31:53 ...and presumably has some more compact in-memory representation... 20:32:19 elliott: so the Int on the end is the highest value already present? 20:32:34 yes, or the next value to assign, it doesn't matter much -- presumably the structure would be abstract 20:35:43 Goodnight 20:35:46 -!- Ngevd has quit (Quit: Leaving). 20:36:17 o 20:36:38 hi 20:36:51 who's that hi at? 20:37:01 elliott: If you DIY, are you going to call it Trogdor the Internator? 20:37:20 I've been here all along, but felt like spouting a meme somewhere 20:37:22 fizzie: If I DIY as opposed to what? 20:37:27 ais523: I say hi a lot 20:37:33 and then realised that there was one whose only purpose was to be mentioned randomly 20:37:36 so I used it 20:37:43 `log just oing 20:37:49 2008-03-20.txt:15:37:24: ais523: just oing 20:37:50 fizzie: Anyway, I suppose I could call it that. The programs right now are degrade, intern, and gentry. 20:38:00 elliott: As opposed to finding one, which, I admit, sounds kinda unlikely. 20:38:06 hmm, I'm not sure what date I would have guessed for that 20:38:15 fizzie: Well, it's already mostly-written. 20:38:36 fizzie: Do you know of a FUSE filesystem that presents a directory full of compressed files (e.g. .gz) as if they were uncompressed? :p 20:38:43 `logurl 2008-03-20.txt:15:37:24: 20:38:46 http://codu.org/logs/log/_esoteric/2008-03-20 20:39:07 oa hela natten 20:39:12 elliott: Ubuntu has "archive mounter", but that's not quite the same thing 20:39:51 elliott, you should code it 20:39:55 Data.Symbol has intern :: String -> Symbol, with Symbol !Int String, but it only has a single map, I suppose. (Just a quick googling.) 20:40:20 fizzie: Yees, but in this case it isn't the typical intern-table things; I mean, I'd probably use Kmett's package if I wanted that. 20:40:33 fizzie: I'm not trying to store symbols or the like efficiently, I need a first-class intern table. 20:41:08 elliott: There's all kinds of transparent-compression fuse things, but not sure about that. fuze-lzofs sounds like it'd do it, but that seems to be a dead project with the web-page gone. 20:41:18 Heh. 20:41:41 (It's just that, since intern has to process every file in one run, I'm going to have to build in the decompress/recompress stage into it.) 20:41:45 (Which just seems _gross_.) 20:41:47 And there's fuse-archivemount, but that's probably like Ubuntu's archive mounter, to mount a single archive somewhere. 20:41:56 I suppose it could do it in multiple runs by saving the intern table and reloading it, but that sounds pointlessly slow for no reason. 20:42:01 elliott: strangely, that log is the same day I first IRCed over telnet 20:42:07 ais523: haha 20:42:34 [CTCP] Received CTCP-PING reply from ais523: -76 seconds. 20:43:32 related, also the day I invented CTCP SWAPNICK 20:43:38 it has never yet been implemented, which makes me sad 20:43:51 What does CTCP SWAPNICK do? 20:43:59 PING 20:44:05 VERSION 20:44:10 -Zetro- VERSION ((\w+) (v?(\d+(?:[a-z]|(?:\.\d+[a-z]?)*(?:[_-](?:\d+[a-z]?|[a-z]?\d*))?)))(?: (.*))?) 20:44:12 um. 20:44:19 VERSION 20:44:23 Madoka-Kaname: it causes each client to send each other the messages it wants to post, and post as each other, from then on 20:44:23 elliott: I guess you could use any transparent-compressed file system by "uncompressing" the files into it beforehand, but that'd tie the data into the particular implementation what it uses. 20:44:41 some sort of daemon would be needed to handle quits correctly 20:44:45 unless you swapped back just before quitting 20:45:20 fizzie: Yeaah. I think I'd prefer to just add some unzip/zip runs into intern.hs. 20:45:21 elliott: Like my version? :) 20:45:22 Can you implement that on the ircd? 20:45:23 (in CLC-INTERCAL, it's possible to steal a filehandle from another program, which means that the INTERCAL impl has to keep running after it quits; as a corollary, a program that opens any file at all is making it visible to the entire world forever) 20:45:32 Zetro: It's... some version. 20:45:34 Madoka-Kaname: I suppose so, but it was meant to be client-level 20:46:06 It's every version! 20:46:18 Almost 20:46:27 Zetro: The best version. (What client do you actually use?) 20:47:25 atm I use XChat and AndChat 20:47:35 hmm, what could be awesome: upon someone CTCP VERSIONing you, you CTCP VERSION them then echo the reply 20:48:03 ais523: so if two people use it, they agree that they're both using the client _|_? :-) 20:48:24 elliott: eventually one of them gets bored 20:48:30 at which point the other's version doesn't really matter 20:48:32 heh 20:48:34 that is, quits or whatever 20:49:03 okofolor 20:49:06 Hey, a lot of people use _|_ now 20:49:36 (e.g. everyone whose client doesn't reply to CTCP VERSION) 20:50:03 Thanks to XChat and irssi having different CTCP PING payloads, I get silly-looking values in the other client when I ping from one. Stuff like "CTCP PING reply from fizziew: -1319088817776269.-17 seconds." Or "Ping reply from fizziew: 1319088736.35 second(s)." 20:50:15 heh 20:50:20 .-17? 20:50:31 it's an intercal version number :P 20:50:34 elliott: you can tell a lot about the rounding algo from that 20:50:51 it's clearly using rounds-towards-zero division in an attempt to calculate the remainder (or something similar involving the modulus function) 20:51:35 nothing! can't a guy o here anymore without being asked for a reason :O 20:51:39 I guess that was answered 20:52:21 XChat uses "PING v" where d is microseconds since the epoch as a single number; irssi puts in "PING s u" where s is seconds since epoch, u number of microseconds since the last full second. 20:52:27 s/d/v/ 20:52:46 so they differ by one space 90% of the time? 20:53:03 elliott: what's with the Nomic World misquote in the topic? 20:53:11 (I'm almost positive it's you, nobody else would do that) 20:53:31 ais523: comex linked to the lindrum log on blognomic, so I had the chance to enjoy reading that message again 20:53:43 ah, aha 20:53:44 I should read it at some point 20:53:46 now we all are so privileged, thanks to me 20:54:04 Sgeo|web: it's mostly a lot of people yelling at Lindrum and Goethe being all wispy about it 20:54:39 Lindrum was a successful scam, right? So why would people be ... I guess I'm used to people being at least somewhat ok with scams 20:55:16 the Lindrum scam almost certainly failed 20:55:24 but it ripped NomicWorld apart, so it doesn't matter much 20:55:30 hmm, or did NomicWorld reset and continue after that 20:55:34 I forget; probably ais523 or oerjan knows 20:56:02 Where did comex post the link? 20:56:03 I don't see it 20:56:19 ais523: comex linked to the lindrum log on blognomic, so I had the chance to enjoy reading that message again 20:56:20 blognomic 20:56:47 Where on blognomic? In a comment on a post? Because I don't see posts with links 20:57:03 http://blognomic.com/archive/more_discussion_about_ais523s_dov/ 20:57:59 Sgeo|web: anyway, people were annoyed at Lindrum because it was early on in the game, it granted a complete dictatorship which was going to be used to restructure the ruleset, and because people thought it was illegal but there was no formal judgement process on its legality that could be done 20:58:39 I guess with dictatorships in Agora, the dictators are usually polite 20:58:57 And don't restructure stuff 21:02:42 tl;wrliiar 21:03:05 too long; will read later if I am reminded 21:09:48 hmm, or did NomicWorld reset and continue after that <-- afaik the lindrum scam was before i even joined nomic world. iirc the final death was simply due to admins no longer having time to maintain it. 21:09:59 right 21:10:05 seems like it just ended game one 21:25:31 ais523: can you donate me a really big disk, please 21:25:39 I can't, I'm afraid 21:25:57 ais523: why :( 21:26:09 I don't have one to donate 21:26:15 and it'd take a while to carry it to Hexham even if I did 21:30:25 There are other places in the UK than Hexham? 21:30:38 just Finland 21:36:40 (Specifically, I'm doing convoluted stuff with a State monad when I feel I should probably be using a State and Writer monad stack) 21:36:46 btw RWS exists 21:42:08 ooh? 21:43:59 But I don't need Reader [yet] 21:45:21 i suppose. 21:45:57 i'm wondering if using RWS might be more efficient that combining two of the parts 21:46:02 I probably will end up using Reader, I think 21:46:13 RWS is the bomb diggity. 21:46:25 * CakeProphet seal of approval. 21:46:39 oerjan: I don't quite understand monad transformers yet as well as I understand how to use a single monad 21:46:54 -!- sllide has quit (Ping timeout: 245 seconds). 21:46:55 Sgeo|web: so now is your chance to learn, since you have a use-case. 21:47:08 it's the same thing, but one is transformy. 21:47:13 * CakeProphet is the best teacher. 21:47:35 I mean, I understand, say, the conceptual meaning of IO (Maybe a) 21:47:52 No idea how MaybeT IO a translates to something similar to that 21:47:58 -!- nooga has quit (Ping timeout: 256 seconds). 21:48:01 @src MaybeT 21:48:01 Source not found. You speak an infinite deal of nothing 21:48:11 @mtl MaybeT IO a 21:48:11 Maybe you meant: ft map msg pl unmtl url 21:48:15 @unmtl MaybeT IO a 21:48:15 IO (Maybe a) 21:48:30 they're precisely the same thing, apart from a newtype 21:48:43 Sgeo|web: there IO is filling the type parameter that specifies what the inner monad is. 21:49:00 I asked about that in #haskell , and mentioned StateT, and someone said something about some complication 21:50:03 Which makes more sense, or both? State (Maybe b) a or State b (Maybe a)? 21:50:14 they are unrelated 21:53:58 Which would using StateT give me? 21:54:15 @unmtl StateT Maybe a 21:54:15 err: `StateT Maybe a' is not applied to enough arguments, giving `/\A. Maybe -> a (A, Maybe)' 21:54:18 er 21:54:25 @unmtl StateT a Maybe b 21:54:25 a -> Maybe (b, a) 21:54:56 neither 21:55:25 it puts Maybe around both state and result part 21:55:36 which makes sense, of course 21:55:51 as you want a different state for each of the (1 or 0) computations you have 21:56:35 Would there be wrong with figuring out what stack I want using @mtl ? 21:56:58 @mlt IO([a]) 21:56:59 Maybe you meant: ft let map msg pl 21:57:06 @mtl IO([a]) 21:57:07 Maybe you meant: ft map msg pl unmtl url 21:57:23 Sgeo|web: note that if all of your monad transformers are instances of MonadIO then IO can always be at the bottom 21:57:23 if it actually existed... 21:57:32 Yes, there is: It doesn't exist. 21:58:01 :t liftIO 21:58:02 Ambiguous occurrence `liftIO' 21:58:02 It could refer to either `Control.Monad.Error.liftIO', imported from Control.Monad.Error 21:58:02 or `Control.Monad.Logic.liftIO', imported from Control.Monad.Logic 21:58:13 :t Control.Monad.Trans.liftIO 21:58:14 forall a (m :: * -> *). (Control.Monad.Error.MonadIO m) => IO a -> m a 21:58:53 I need a good monad transformer tutorial 21:58:58 so that mitigates life hell a bit. you can also write similar instances for other monads. 21:59:03 s/life/lift/ 21:59:15 nothing mitigates life hell. -_;; 21:59:39 Isn't writing functions for use within your monad stack, and those functions use lift, the way to mitigate lift hell? 21:59:39 for state, reader and writer lift hell is mitigated by everything being in automatically lifted classes 21:59:47 Sgeo|web: correct 22:00:27 Sgeo|web: no, you write functions using the MonadState, MonadReader and MonadWriter class methods (and possibly others) 22:00:58 which already has instances for transformers which do the lifting work for you 22:01:02 *have 22:01:18 Wait, so CakeProphet is wrong, or that's just... what? 22:01:24 CakeProphet is usually wrong. :-) 22:01:28 Sgeo|web: Usually you shouldn't use monad transformers at all. 22:01:31 They're only sometimes the answer. 22:01:34 When they are, it's internally. 22:01:42 CakeProphet would be right if you implement your monads from scratch. 22:01:44 i.e. you can implement your fancy monad with transformers, but probably that should not be exposed to users of it. 22:02:28 well yes, one customarily uses a newtype wrapper and generalized newtype deriving 22:03:02 newtype wrapper instead of just a type synonym? 22:03:10 Also, what's generalized newtype deriving? 22:03:46 newtype MyMonad = StateT Fnord (ContT Wibble (Reader Argle IO)) deriving (Monad, MonadState, MonadCont, MonadReader, MonadIO) 22:04:00 oerjan: argh 22:04:02 oerjan: you got that wrong 22:04:11 i did? 22:04:20 well maybe add Functor and Applicative 22:04:22 oerjan: look at token after = 22:04:27 oh hm 22:04:48 newtype MyMonad = MyMonad (StateT Fnord (ContT Wibble (Reader Argle IO))) deriving (Monad, MonadState, MonadCont, MonadReader, MonadIO) 22:04:53 I'm tempted to use ContT, but should probably stick with promises 22:05:13 Which are in IO I think 22:05:41 promises? 22:05:57 do you mean MVar 22:06:43 I think I saw them either under the name promises or futures 22:06:58 those are bad names 22:06:59 I think I saw you link to something like that on Reddit, or someone else in the same thread did 22:07:21 unsafeInterleaveIO >:) *runs away* 22:08:11 * Sgeo|web is tempted to use that 22:08:23 what have i done D: 22:09:03 I knew of unsafeInterleaveIO before, it's not your fault. 22:09:05 -!- nooga has joined. 22:09:28 good. elliott might get angry. 22:10:03 Ooh, I thought of a fun program I could write that relies on unsafeInterleaveIO 22:10:41 no 22:10:46 Well, of course not "relies" as such, I could probably write it without 22:10:59 Or, hmm, I can't figure out if I can or not 22:11:19 What happens with a sequence on an infinite list of [IO a]? 22:11:56 Hmm, mapping unsafeInterleaveIO to those is NOT what I want 22:12:05 I think 22:16:06 Wait, yes it is 22:17:09 Sgeo|web: it never halts. 22:17:32 oerjan: you mean without the unsafeInterleaveIO, or even with? 22:17:36 also, unsafeInterleaveIO won't fix it unless you apply it to something like each cons cell 22:18:39 I'm... not sure why you said that, I wasn't planning on applying it to the result of sequence 22:19:26 good. although it doesn't work to apply it to each element, either 22:20:26 :t foldr ((?unsafeInterleaveIO .) . liftM2 (:)) (return []) 22:20:27 forall (m :: * -> *) a. (?unsafeInterleaveIO::m [a] -> m [a], Monad m) => [m a] -> m [a] 22:20:44 oerjan: stopppe, 22:21:06 elliott: well it's what you'd want for a lazy sequence... 22:21:25 Wait, why doesn't applying to each element work? 22:22:01 Sgeo|web: because the outside IO part still iterates through each element to apply unsafeInterleaveIO to it 22:22:24 -!- Nisstyre has quit (Ping timeout: 248 seconds). 22:23:36 even sequence . repeat $ return () won't ever halt. i think. 22:24:04 (in the IO monad) 22:25:57 if you look at it from the RealWorld -> (a, RealWorld) implementation used in ghc, it's clear that the RealWorld token gets threaded through each of the infinitely many subactions, and you can never get a final one 22:26:07 *approximately used 22:27:12 :t runState 22:27:13 forall s a. State s a -> s -> (a, s) 22:28:05 > flip runState 0 . sequence . repeat $ do modify (+1); get 22:28:07 ([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... 22:28:13 oops :P 22:28:29 > first (take 10) . flip runState 0 . sequence . repeat $ do modify (+1); get 22:28:34 mueval-core: Time limit exceeded 22:28:34 mueval: ExitFailure 1 22:28:39 argh 22:29:07 -!- SgeoN1 has joined. 22:29:12 anyway the point with that one is that you can get results, but you can never get a final state 22:29:28 Why is ^C being ineffective in GHCi 22:30:04 SgeoN1: if you have a non-allocating infinite loop, i think it never gets to check ^C 22:30:27 OK, so how do I kill GHCi 22:30:41 killall ghci 22:30:59 Oh, something just happened. 22:31:04 murderdeathkill ghci 22:31:16 It must have finally noticed the Ctrl C 22:31:32 SgeoN1: it is possible that it _eventually_ gets caught nowadays by some preemptive check that is rarely done 22:31:52 i'm not sure, just a vague memory of something like that 22:34:38 * CakeProphet was totally not wrong/ 22:34:56 SgeoN1: if you have a non-allocating infinite loop Ctrl+C might not work 22:35:00 CakeProphet: oerjan said you would be right if you were writing stuff from scratch 22:35:05 async exceptions only happen on allocation 22:35:16 this is why killThread can fail, if you have such a tight loop 22:35:23 (note that allocation happens constantly in almost all code) 22:35:31 Sgeo|web: okay, so then I was wrong if I was saying something else than what I said. 22:35:44 good to know 22:35:46 * CakeProphet goes back to work. 22:36:00 * elliott thinks CakeProphet was wrong even then 22:36:04 because if you build it from scratch 22:36:07 there's no monad instances to lift to 22:37:01 hpaste is taking forever to load 22:37:28 did you read what I said? 22:37:39 I basically said "if you use IO then liftIO is a good idea" 22:37:46 http://hpaste.org/52892 22:38:01 Oh, I thought we were talking about something else 22:38:24 Isn't writing functions for use within your monad stack, and those functions use lift, the way to mitigate lift hell? 22:39:09 aka "not exposing the transformer to the user" 22:39:12 CakeProphet: somehow i read that as being said by you 22:39:16 oerjan: sorry if you get spammed 22:39:31 * oerjan prepares the quiet hammer 22:39:32 "We cut up thousands of fish and pressed their remains into squares and we will sell you that here at Burger King." -- Dinosaur Comics 22:39:54 oerjan: no, your email. 22:39:59 wat 22:40:05 oerjan: 22:40:06 [[ 22:40:06 Call for Judgment: pass me quick 22:40:06 Send spam emails to all email addresses listed on http://www.nomictools.com/agora/registrar/text. 22:40:06 Repeal ALL rules 22:40:06 POSTED BY SOVIET BRENDON AT 20 OCT 2011 22:29:39 UTC Comments (5) 22:40:09 ]] -- http://blognomic.com/blognomic/archive/pass_me_quick/ 22:40:20 that list includes the email address of every player ever :) 22:40:25 elliott: what are some alternatives to using transformers? 22:40:47 "Not using them, or sometimes using them." 22:40:50 CakeProphet: there aren't alternatives, you just... don't use transformers 22:40:51 elliott: oh well, i already received some mail to the backup list recently. 22:42:28 elliott: you mean to split the logic for each monad that you want to use into separate functions/data-structures? 22:42:31 http://hpaste.org/52892 <-- afaict that won't work for the reasons i described 22:43:05 And indeed it didn't 22:43:09 But is that allocating or not? 22:43:30 i'd think that would allocate... 22:43:33 that should allocate 22:43:54 anything that does anything allocates 22:44:03 you'd have to try really hard to get a non-nop loop that didn't allocate 22:44:09 it might even be impossible 22:44:59 elliott: maybe that sequence only allocates on the stack, or something? 22:45:08 oerjan: um GHC has no stack/heap distinction 22:45:19 every allocation is a heap allocation 22:45:23 (which is much cheaper than malloc) 22:45:39 ghc has a stack. 22:46:25 oerjan: i'm not sure what to tell you other than that ghc does _not_ have a stack/heap allocation distinction 22:46:37 so it's irrelevant whether ghc refers to some memory as stack or not 22:46:41 but it used to, right? 22:46:45 because it's about whether the allocation code path is crossed 22:46:51 elliott: what about unboxed values? 22:47:04 oerjan: what about them? 22:47:14 oh wait 22:47:18 ok i see what you mean 22:47:37 it won't matter for the question of whether it gets interrupts 22:47:55 right 22:51:41 ....my program could easily not work for a different reason... well, wait no 22:51:48 n/m 22:51:54 n/m every related thought 22:52:14 Sgeo|web: obviously you need GADTs 22:52:16 everything is GADTs 22:52:25 GADT is good for all porpoises 22:54:13 you need GADTs with a type family of phantom types 22:54:37 parametric phantom types. 22:55:15 also instead of Monads you should use arrows 22:56:07 arrow transformers 22:56:28 (is that even possible? I'm not very familiar with arrows) 22:57:41 -!- ais523 has quit (Remote host closed the connection). 22:58:36 Sgeo|web: also once you finish the program replace every function call with thread spawning and TVars 22:59:47 Does a State of a TVar make sense to do? 22:59:48 -!- Patashu has joined. 23:00:01 (Or State of several TVars 23:00:02 http://sprunge.us/PjaA 23:00:04 my code so gangsta 23:00:07 Sgeo|web: no, Reader does though 23:00:12 Sgeo|web: but you likely just don't want transformers at all 23:00:16 just pass around the relevant TVars 23:00:36 oh, and don't forget every serious Haskell program uses ImplicitParameters. 23:00:47 Oh, the TVar itself is a constant, and mutating the TVar is done in STM 23:00:49 fizzie: I wonder if I should just use a hash function for my interning. 23:00:51 SO that's why it's reader? 23:01:06 Sgeo|web: Yes. But like I said, start without using transformers. Pretend transformers don't exist because you probably don't want them. 23:01:07 BUt what exactly is it reading? Just a bunch of newly initialized TVarts? 23:01:29 tvarts 23:01:37 Sgeo|web: OK, that's not what Reader means. 23:01:43 But seriously, just pass around TVars. 23:01:48 I want to make a way to make getting a list of nearby avatars in AW easy even though there's no function for that, just callbacks for when avatars appear and disappear 23:02:04 Jesus christ everything is AW with you. 23:02:11 OK, let me say this one more time so it's clear: 23:02:12 Don't use transformers. 23:02:15 Just pass around TVars. 23:02:18 You probably do not want transformers. 23:02:38 But I want transformers! 23:02:52 help what's AW 23:02:55 I'm pretty sure I could use something pre-existing rather than ContT for dealing with flattening out the asynchronous stuff 23:03:05 flattening out? 23:03:07 ReaderT WriterT StateT ContT LogicT IdentityT MaybeT IdentityT Identity 23:03:18 Sgeo|web: You just want to write blocking calls. 23:03:21 Sgeo|web: GHC has an event manager. 23:03:39 event manager library, you mean, or what? 23:03:43 No, built-in. 23:03:46 It's how all IO is done. 23:03:53 All "blocking" IO is actually done with asynchronous calls. 23:04:05 And it will let me turn non-blocking calls to blocking calls? COOL 23:04:06 It's like node.js, except you don't have to fucking write CPS like a moron. 23:04:06 in STM you don't really need to worry about blocking very much do you? 23:04:12 elliott: Yes you do. 23:04:18 shachaf: You do? 23:04:21 elliott: You have write CPS for all IO in Haskell. 23:04:25 I suppose (>>=) is pretty CPSy. 23:04:26 That's what (>>=) is for. 23:04:27 But we have sugar for that. :p 23:04:32 >>= *is* CPS. 23:04:36 It gets a thing and a continuation. 23:04:38 Yeah. 23:04:44 That's why Cont is the best monad. 23:04:46 (is that even possible? I'm not very familiar with arrows) <-- yes, the arrow package has them 23:05:08 The best monad is data Nomad a = Return a | forall b. Bind (Nomad b) (b -> Nomad a). 23:05:38 I thought that was the best Nomad 23:05:57 elliott: also that can break the laws easily. 23:06:01 but whatever 23:06:40 elliott: No, it's Cont. 23:06:50 No. It's clearly RWS. 23:06:54 RWST. 23:07:01 M = RWST M. 23:07:14 -!- augur has quit (Remote host closed the connection). 23:07:14 I think we can pretty agree that barrier monads are the best. 23:07:20 +much 23:07:25 shachaf: wait IdentityT exists? 23:07:28 CakeProphet: True. 23:07:32 oerjan: Sure, why not? 23:07:35 oerjan: Identity = IdentityT Identity. 23:07:39 Mu RWST 23:07:39 Standard definition. 23:07:46 @slap elliott 23:07:47 * lambdabot puts on her slapping gloves, and slaps elliott 23:07:49 (I wonder if you can make that work.) 23:07:50 (Somehow.) 23:08:02 elliott: No. 23:08:03 Don't wonder. 23:08:15 Sorry but I must. 23:09:14 * CakeProphet is the best monad. 23:09:27 Recursive type definitions 23:09:41 Wait, those are an everyday occurance... I think 23:09:41 what about them? 23:09:43 hi 23:09:43 fizzie: Wow, I even have degrade/intern. 23:09:49 fizzie: Like, fully written. 23:09:52 Except wait. 23:09:58 What's the maximum length of an argument list this decade? 23:10:13 big 23:10:15 Sgeo|web: depends on what you mean 23:10:15 @google cont sigfpe 23:10:16 http://blog.sigfpe.com/2008/12/mother-of-all-monads.html 23:10:16 Title: A Neighborhood of Infinity: The Mother of 23:10:19 elliott: See that. 23:10:22 Best monad. 23:10:24 shachaf: Yes, I've read it. 23:10:37 Sgeo|web: infinite types are not allowed, but recursive data (i.e. lists) are common 23:10:55 Wait, there's a maximum length? 23:11:09 printf can take an indefinite number of arguments, I think 23:11:21 ... 23:11:24 POSIX. 23:11:26 Or 23:11:27 Linux 23:11:28 really. 23:11:48 (Surely there should be a typesafe printf? Maybe something with TH?) 23:12:11 printf is type-safe. 23:12:40 -!- nooga has quit (Ping timeout: 255 seconds). 23:12:47 type-safe variadic functions are possible in haskell. I know because I read about it on wikipedia 23:12:47 What happens if you pass it too many arguments? 23:12:55 Sgeo|web: Runtime failure. 23:13:07 ...how are runtime failures type-safe? 23:13:23 main = error "foo" -- haskell isn't type-safe 23:13:28 how type safe is type safe 23:13:41 > main = unsafeCoerce "foo" -- haskell isn't type-safe 23:13:42 : parse error on input `=' 23:13:47 how tautological is tautology monqy 23:14:11 Could you make something that will accept oh/ 23:14:16 type safe and type safe meant different things there 23:14:21 elliott: Now you'll say that unsafeCoerce isn't even Haskell? 23:14:26 monqy: yes I know. 23:14:33 Sgeo|web: someAWCall a b = do { result <- newEmptyMVar; asyncAWCall a b (putMVar result); takeMVar result } -- this is blocking + efficient (last argument to asyncAWCall is callback) 23:14:33 I think you can implement it in Haskell 2010. 23:14:34 that will accept only the correct number of arguments, using TH? 23:14:46 "efficient" 23:14:50 shachaf: Sure, efficient. 23:14:55 Eh. 23:15:03 All efficient programs are written in C. 23:15:08 Or C++. We all know that. 23:15:11 Sgeo|web: wrapAsync f = do { result <- newEmptyMVar; f (putMVar result); takeMVar result } 23:15:13 Sgeo|web: Then the above can just be 23:15:23 Sgeo|web: someAWCall a b = wrapAsync (asyncAWCall a b) 23:15:24 shachaf: assembly programs obviously don't exist anymore. 23:15:24 Tada. 23:15:28 CakeProphet: Yep. 23:15:39 elliott: cool 23:15:41 shachaf: It should be the most efficient way to do it blockingly. 23:15:47 shachaf: I mean, takeMVar isn't exactly expensive. 23:15:48 elliott: Well, in Haskell. 23:15:51 ...AW isn't threadsafe 23:15:59 Sgeo|web: Define isn't threadsafe. 23:15:59 Not sure how that affects things 23:16:07 Sgeo|web: You can make sure all AW FFI calls happen on one thread. 23:16:11 With bound threads + a queue. 23:16:21 That might not be sufficient. 23:16:25 * shachaf doesn't even know what AW is. 23:16:29 Sgeo|web: (And still maintain the same interface.) 23:16:32 shachaf: Why mightn't it? 23:16:34 Some Minecraft thing, probably. 23:16:44 no it's worse/ 23:16:52 shachaf: I apologise for the fact that Sgeo|web is about to tell you what it is 23:16:57 even nerdier. 23:17:00 s/$/./ 23:17:04 Let's see. A lot of functions get their arguments from a changing global parameters thingy that you set with, say, aw_init(AW_SOME_ATTRIB, 346); before the call 23:17:18 Sgeo|web: Right. That's fine. 23:17:36 Sgeo|web: You have one Haskell thread, bound to an OS thread, that continually reads AW requests from a queue, mutates the global state, and makes the call. 23:17:40 Haskell only assimilates with pure code! 23:17:47 it's very snobby about it. 23:17:56 wait is aw 23:17:57 activeworlds 23:18:00 or whatever 23:18:05 DING DING DING 23:18:07 monqy: yes 23:18:11 creys 23:18:20 creys 23:18:26 creys 23:18:58 greys 23:19:25 so you guys Sybil was all lies. 23:19:33 -!- copumpkin has quit (Quit: Computer has gone to sleep.). 23:19:46 the real person that Sybil is based on never had disassociative identity disorder 23:19:59 she made it up. 23:20:02 be shocked. 23:23:52 well, those who remember who sybil is, anyhow 23:24:23 CakeProphet: Wikipedia seems rather less sure than you are. 23:25:03 well it's not exactly definitive 23:25:10 but she admitted to it via writing. 23:25:25 oh wait, i thought we were dissing CakeProphet's ex-girlfriends. never mind. 23:26:30 oerjan: You get to help me define my file format! 23:26:43 elliott: okay. it will use sequences of byte values. 23:26:49 that's a good start. 23:26:51 elliott: (a(b*)c*)* 23:27:15 good file format. 23:27:16 oerjan: No bad. 23:27:27 ok. 23:27:31 * CakeProphet is on the right track though. 23:29:07 elliott: file format for what? may I ask? 23:29:38 CakeProphet: Reverse-context tree. 23:29:50 oh okay. JSON. :) 23:30:00 :> :? :> 23:30:03 CakeProphet: Of about a terabyte. 23:30:10 er wait there's probably some duplication right? 23:30:16 23:30:27 oerjan: hate 23:31:09 oh, *+" 23:31:14 elliott: make a table of trees and assign a ID to each. the top of the file lists the unique tables, enumerated with IDs from 0 to n 23:31:29 then the second part of the file references these ids or something? 23:31:32 CakeProphet: I also have to be able to merge an arbitrary number of such files with constant space usage. 23:31:33 I dunno. 23:31:37 ...oh 23:31:54 * elliott thinks he'll opt to bother fizzie about it instead of CakeProphet. 23:32:36 my file format is basically how Python's pickle format works. :P 23:34:11 -!- Nisstyre has joined. 23:34:44 elliott: maybe if I knew more about what a reverse context tree is. 23:34:49 Yes, maybe. 23:35:59 I've read from very reliable sources that Huffman Coding is a good way to reduce the size of a file. 23:36:38 maybe sometimes it'll be constant even! 23:38:58 the world's first spinal transplant was done in 2007 23:39:32 -!- ive has joined. 23:40:29 this is spinal transplant 23:41:48 so yesterday in History class we watched scenes from 300 23:41:57 specifically the battle scenes because they somewhat accurate 23:42:12 +are 23:42:17 this. is. history. 23:42:55 elliott: does a reverse context tree maybe reduce to a n-order markov model? 23:43:13 so that you can construct the tree from a much smaller amount of data. 23:46:56 I'm sure it wouldn't be difficult to explain what the hell a reverse context tree is. 23:47:15 Yeah, but I already know what the basic structure has to look like. 23:47:31 ARE YOU SURE? 23:47:35 ????? 23:49:10 I suppose I should figure out this shit myself. 23:49:22 no dude I'm a wizard 23:49:25 I will guide you in the direction 23:50:16 once you have consulted me 23:50:24 you will figure everything out about the shit. 23:50:29 shit will not even be a confusing thing to you. 23:51:08 your tree, you want it to be of a reverse context, yes? 23:51:17 -!- copumpkin has joined. 23:51:18 just find the minimum possible amount of information you need to create one.