00:01:40 -!- Klisz has quit (Ping timeout: 240 seconds). 00:03:23 -!- Guest50440 has joined. 00:05:46 `pastelogs 00:05:49 `pastelog 00:06:08 `log >.*palindromes 00:06:17 http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.9465 00:06:42 No output. 00:06:57 `log \>.*palindromes.*iterate 00:07:19 http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.15923 00:07:26 2012-01-13.txt:00:06:57: `log \>.*palindromes.*iterate 00:08:56 http://en.wikipedia.org/wiki/Palindromic_number 00:09:01 every number is a palindromic number... 00:09:17 there exists at least one base in which that number is a palindrome. 00:09:48 actually, infinitely many 00:10:41 for any number n, all bases m > n? 00:10:57 e 00:11:00 yes 00:11:31 i mistyped the empty string and then fumbled a bit but now i'm ok 00:11:57 also m=n-1, it seems 00:12:05 -!- NihilistDandy has quit (Quit: Linkinus - http://linkinus.com). 00:12:10 http://en.wikipedia.org/wiki/Strictly_non-palindromic_number 00:13:38 a 00:13:43 oopses mistyped empty string 00:13:49 I meant to say: 00:21:07 oerjan: m = n-2 as well, for most bases I think 00:21:38 -!- myndzi has quit (Read error: Connection reset by peer). 00:21:39 um no, that's 12 00:21:50 oh rite 00:21:57 that's not a palindrome ha ha ha ha ha ha ha ha ha 00:21:58 ha 00:22:04 ^ha 00:22:04 ha. ha. ha ha. ha ha ha. ha ha ha ha ha. ha ha ha ha ha ha ha ha. ha ha ha ha ha ha ha ha ha ha ha ha ha. ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha. ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha. ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ...too much output! 00:22:08 -!- myndzi has joined. 00:22:28 in my opinion bash has the best support for infinite data structures. 00:22:42 i...c 00:23:13 hi 00:23:20 maybe the human mind is an infinite data structure. 00:23:25 hi 00:23:48 the human body is like a cellular automata of infinite structures. 00:24:06 an 00:24:09 infinite matrix of solidity 00:24:15 hi 00:25:15 if our minds are like operating systems, does that mean our operating system has a really shitty memory addressing scheme? 00:25:33 how many cores does it have? 00:25:41 :> 00:25:48 mysterys of life 00:32:45 a few billion cores 00:34:49 -!- Guest50440 has quit (Quit: SLEEP, GLORIOUS SLEEP). 00:57:26 -!- esowiki has joined. 00:57:31 -!- esowiki has joined. 00:57:31 -!- esowiki has joined. 00:58:30 -!- esowiki has joined. 00:58:35 -!- esowiki has joined. 00:58:35 -!- esowiki has joined. 00:59:11 -!- esowiki has joined. 00:59:16 -!- esowiki has joined. 00:59:16 -!- esowiki has joined. 00:59:42 -!- esowiki has joined. 00:59:47 -!- esowiki has joined. 00:59:47 -!- esowiki has joined. 01:00:26 -!- esowiki has joined. 01:00:30 -!- esowiki has joined. 01:00:31 -!- esowiki has joined. 01:01:06 -!- esowiki has joined. 01:01:10 -!- esowiki has joined. 01:01:11 -!- esowiki has joined. 01:01:43 -!- esowiki has joined. 01:01:48 -!- esowiki has joined. 01:01:48 -!- esowiki has joined. 01:02:29 -!- esowiki has joined. 01:02:34 -!- esowiki has joined. 01:02:34 -!- esowiki has joined. 01:03:09 -!- esowiki has joined. 01:03:14 -!- esowiki has joined. 01:03:14 -!- esowiki has joined. 01:03:44 -!- esowiki has joined. 01:03:49 -!- esowiki has joined. 01:03:49 -!- esowiki has joined. 01:04:28 -!- esowiki has joined. 01:04:28 -!- glogbot has joined. 01:04:28 [freenode-info] channel flooding and no channel staff around to help? Please check with freenode support: http://freenode.net/faq.shtml#gettinghelp 01:04:33 -!- esowiki has joined. 01:04:33 -!- esowiki has joined. 01:54:34 -!- azaq23 has joined. 01:54:48 -!- azaq23 has quit (Max SendQ exceeded). 01:55:16 -!- azaq23 has joined. 02:19:59 @src iterate 02:20:00 iterate f x = x : iterate f (f x) 02:22:28 -!- oerjan has set topic: I'm not a number, I'm a cheesy and grating topic | http://codu.org/logs/_esoteric/. 02:33:44 @src (.) 02:33:44 (f . g) x = f (g x) 02:33:44 NB: In lambdabot, (.) = fmap 02:35:13 @src (++) 02:35:14 [] ++ ys = ys 02:35:14 (x:xs) ++ ys = x : (xs ++ ys) 02:35:14 -- OR 02:35:14 xs ++ ys = foldr (:) ys xs 02:35:21 @src flip 02:35:21 flip f x y = f y x 02:35:31 some NB's lacking 02:36:39 :t flip 02:36:40 forall (f :: * -> *) a b. (Functor f) => f (a -> b) -> a -> f b 02:45:07 More like Nofunctor! 02:57:01 -!- cswords has joined. 03:18:48 kallisti, there was an update 03:18:55 I see. 03:19:15 -!- oerjan has set topic: I'm not a number, I'm a cheesy and grating update | http://codu.org/logs/_esoteric/. 03:49:07 @src (>=>) 03:49:07 Source not found. You speak an infinite deal of nothing 03:49:34 @src >=> 03:49:34 Source not found. BOB says: You seem to have forgotten your passwd, enter another! 03:49:58 it's probably (f >=> g) x = f x >>= g , anyway 03:59:04 BAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA 03:59:21 that fills up the entire width of my terminal 03:59:45 that leaves one char at the end of mine 04:00:00 ah so you too do not maximize 04:00:05 we are non-maximize buddies then 04:01:10 would it be accurate to say that... 04:01:24 =<< and <=< are analogous to $ and . ? 04:01:55 a bit. 04:02:15 although =<< needs to fight with <*> / ap for that. 04:02:23 indeed 04:02:31 <*> is a different kind of application. :P 04:02:54 . is generalized in Control.Category, and Kleisli is one based on <=< 04:02:54 it's like application lifted into another type. 04:03:20 $ should be generalized somehow. 04:03:25 ......er 04:03:30 I guess that's ap 04:04:07 fmap is another 04:04:24 which lambdabot uses for . 04:04:53 you're completely clusterfucking my analogy.. :P 04:04:57 and lambdabot's weird flip is yet one 04:04:59 :t flip 04:05:01 forall (f :: * -> *) a b. (Functor f) => f (a -> b) -> a -> f b 04:05:11 BIND FUNCTOR 04:05:25 except the f is on the outside 04:05:32 f (a ->b) instead of a -> f b 04:05:41 it's all about different ways to put in the f's 04:05:47 yes I've noticed. 04:06:20 flip is some kind of mixture of bind and ap isn't it? 04:06:52 flip f x = fmap ($ x) f 04:07:02 >_> oh 04:07:32 ah yes 04:07:39 I see how that generalizes the function case 04:07:53 and there's also comonad whateverit'scalled 04:08:03 yes of course... 04:08:10 (what?) 04:08:15 extend, iirc 04:08:18 :t extend 04:08:19 Not in scope: `extend' 04:08:27 ): 04:08:31 @src Comonad 04:08:31 Source not found. 04:08:43 i guess lambdabot may not have them at all 04:08:47 :k Comonad 04:08:48 Not in scope: type constructor or class `Comonad' 04:08:53 :k CoMonad 04:08:54 Not in scope: type constructor or class `CoMonad' 04:08:57 yes functions are not pokemon. 04:09:05 :k Monad 04:09:06 Class `Monad' used as a type 04:09:06 In the type `Monad' 04:09:11 sheesh 04:10:00 @hoogle extend 04:10:00 System.Posix.Terminal ExtendedFunctions :: TerminalMode 04:10:00 Text.Regex.Posix.Wrap compExtended :: CompOption 04:10:00 Text.Regex.Posix.String compExtended :: CompOption 04:10:06 didn't think so 04:10:53 ah yes the classic regex comonad 04:11:28 careful, it might exist 04:11:40 well Parsec is pretty close I guess. 04:11:49 ...is a Monad. 04:11:53 oh rite 04:12:04 see... 04:12:10 I shouldn't talk so much when I'm tired. 04:12:25 aslobutely 04:12:50 :t (=>>) 04:12:51 Not in scope: `=>>' 04:12:53 lambdabot................... 04:12:56 how could you 04:13:04 oh that maybe was it 04:13:12 (=>>) is flip extend 04:13:13 @hoogle (=>>) 04:13:13 No results found 04:13:21 at least I think it's flip extend?? 04:13:38 extend flip 04:13:53 extend tail 04:13:54 :t (>>= flip) 04:13:55 forall (f :: * -> *) a b. (Functor f) => (a -> f (a -> b)) -> a -> f b 04:14:04 extend is defined by the Extend typeclass in Data.Functor.Extend which is exported by Control.Comonad, I think????????? 04:14:18 and all Comonads are Extends 04:15:20 I thought lambdabot had this stuff though 04:17:07 oerjan: you should make sure that the f has been put in all the places and if not list out all of combinations you can put the f in and then write functions for them 04:19:56 O KAY 04:21:33 here's a good one 04:21:46 f a -> f b -> (f a -> f b) 04:22:19 const const? 04:22:28 yes yes 04:22:42 no? 04:22:43 maybe 04:22:49 :t const const 04:22:50 forall a b b1. b1 -> a -> b -> a 04:23:03 :t const const :: (Functor f) => f a -> f b -> (f a -> f b) 04:23:04 forall (f :: * -> *) a b. (Functor f) => f a -> f b -> f a -> f b 04:23:31 oh okay. 04:23:54 here's another good one: 04:24:10 (f a -> f b) -> (f a -> f b) 04:25:04 -!- qfr has left. 04:25:09 I will pay you $200 to figure this one out 04:25:33 unsolved porbelm fro matemathics 04:27:42 > id id id id id id id id 2 04:27:42 2 04:27:54 > fix id 2 04:27:58 mueval-core: Time limit exceeded 04:28:16 damn you consequences of halting problem. 04:29:57 hi 04:30:08 .hi 04:40:36 -!- MSleep has changed nick to MDude. 05:06:22 kallisti: "consequences of the halting problem" being "everything"? 05:06:29 (Everything provable, anyway.) 05:09:43 ... 05:09:46 I'm speechless. 05:09:58 I downloaded a Windows game, and tried to run it on WINE. It did not work. 05:10:08 :o 05:10:10 Since it included source, I tried typing in "make" 05:10:24 After adding a few imports, against all reason, it actually compiled... 05:10:41 Ya-- Segmentation Fault 05:10:45 ;.; 05:11:06 :o 05:11:13 but did you try running _that_ in wine? 05:11:16 * oerjan helpful 05:11:50 oerjan, I compiled it to a Linux native binary, dummy. 05:12:14 If you ran it under WINE you might get a General Protection Fault. 05:12:40 The Linux version, at least, manages to bring up a window before crashing. 05:17:52 -!- pikhq has joined. 05:18:27 -!- pikhq_ has quit (Ping timeout: 268 seconds). 05:20:10 -!- augur has quit (Read error: Connection reset by peer). 05:20:34 -!- augur has joined. 05:34:49 "Even in math there seems to be a general consensus about which problems are hard to solve, and what constitutes a good solution. But hacking is like writing. Who can say which of two novels is better? Certainly not the authors." 05:34:50 ... 05:37:30 -!- pikhq_ has joined. 05:37:38 -!- pikhq has quit (Ping timeout: 240 seconds). 05:50:26 I thought it was like painting. 05:56:49 all the best writers of history have been painters and vice versa 05:56:51 duh, everyone knows that 06:14:35 -!- azaq23 has quit (Quit: Leaving.). 06:27:36 -!- MDude has quit (Ping timeout: 240 seconds). 06:40:59 -!- oerjan has quit (Quit: Good night). 06:56:46 kmc: Doesn't look like your tolerance for doses of #-blah is increasing with practice. 06:57:34 no it's just wli 06:59:43 Determined to die, so why bother trying to find alternatives. That's him. 07:00:27 i mean he has got a really raw deal in life 07:00:35 his bitterness is totally justified 07:00:44 but that doesn't make it any more pleasant to be around 07:01:22 True, *but* nevertheless. He might actually be able to wrangle refugee status. Or leave the US somehow... 07:07:42 "Thinking in typeclasses is IMO the best thing to do: it's really the most Haskellish." 07:08:52 anyway I'm surprised people are apparently willing to pay $250/day to program in Haskell rather than another language 07:08:56 re http://www.reddit.com/r/haskell/comments/odv3t/welltyped_are_hiring_haskell_consultant/ 07:09:17 Are people actually willing to do that? 07:09:38 i was talking about this in #haskell-blah but wli took over with his AMERIKKKA rants so now y'all get to hear about it 07:09:40 It was copumpkin's assertion that if someone takes the job, then they're willing to do that. 07:10:01 shachaf, it's possible the number is too low and that well-typed won't get any applications 07:10:17 i mean, price discovery is hard, double so in labor markets 07:10:27 i'm taking one party's bid as a crude approximation of market price 07:11:09 i think one danger is that you get someone with intermediate Haskell skill who is super naive 07:12:22 someone who thinks Haskell magically eliminates all of the annoyances of programming in the real world 07:12:41 Alas, Haskell doesn't eliminate the real world. 07:12:44 That's what @'s for! 07:13:11 if the language really were as good as those people think, it would be worth the pay cut 07:13:15 but it's not, and no language ever will be 07:13:40 it's just a pretty good programming language 07:13:57 and there are many other companies that will pay you twice as much to use a different pretty good programming language 07:14:13 What are some other pretty good programming languages? 07:15:06 And I'm pretty sure $55k is more like (somewhat low) starting wages for a halfway competent programmer literally just out of college... 07:15:15 kmc: I think the consensus in that thread in general was that they're underpaying. 07:15:30 pikhq_, last I knew Google, Facebook, etc. would start around $80k, plus health insurance and other benefits 07:15:33 ... In the Midwest. 07:15:51 if you're working remotely from the USA, take like $500/mo off that Well-Typed money for health insurance 07:16:26 Sgeo, languages i like include Haskell, Python, OCaml, Clojure, Scheme, C (for certain things) 07:16:29 none of them is perfect 07:16:56 for many tasks none of the first five will dominate, assuming you have skill in all 07:17:11 kmc: Sorry, my scale of wages is somewhat set by the region I live in, which has significantly lower cost-of-living than the Valley. 07:17:20 fair enough 07:17:36 and that is one reason Well-Typed's offer might be more reasonable than it looks 07:17:38 you can live somewhere cheap 07:17:49 but cheap places suck 07:17:55 Yeah. 07:18:13 either you really need the money, in which case you can get more anyway, or you're young and healthy and single, in which case you probably don't want to live in the middle of nowhere 07:18:29 (i mean that's a false dichotomy but you get the point) 07:18:46 Well, you're presuming a fairly high level of skill. 07:18:53 Which makes the dichotomy pretty applicable. 07:19:27 well also you might be stuck in the middle of nowhere for other reasons 07:20:19 personally i think working from home is Not For Me 07:20:34 I've done that. I've learned the hard way that it's Not For Me. 07:20:47 why? 07:21:16 I've discovered I'm not very productive in a home environment at all. 07:21:19 one problem for me was the lack of separation between "work" and "not-work", meaning I'd spend all day not-working but also spend all day feeling guilty about the fact that I should be working 07:21:25 Like some mental switch in my head goes "home" = "fuck around" 07:21:51 with a physical office job I might enter that state too but only for 8-10 hours at a time :) 07:21:59 Nohjf 07:22:01 Niughji 07:22:02 Night 07:22:06 O_O 07:22:08 'night Sgeo 07:22:08 night sgeo 07:22:48 the other problem was lack of contact with my coworkers and employers 07:22:59 just seeing them around being productive makes me more productive 07:23:12 it's not about explicit communication 07:23:19 That, too, is a factor. 07:23:23 (though in my experience with WFH we were also bad about explicit communication) 07:23:55 some companies have employees who WFH most of the time and come in like one day a week 07:23:58 maybe i'd like that 07:26:49 I may have an ingrown fingernail. 07:26:59 sucks :( 07:27:14 Hopefully it'll pass on its own. Sometimes that happens. 07:27:21 really? 07:28:48 Well, sometimes I think "this might be an ingrown fingernail" and then the thing passes on its own. 07:28:52 heh 07:29:03 is this a subtle hint that the previous topic is less pleasant than an ingrown fingernail 07:29:29 I think the previous topic was *more* pleasant than an ingrown fingernail, come to think of it. 07:29:44 But if I'm going to suffer, why not share it with the rest of you? 07:29:51 why not share it with wli 07:31:18 What's a place where I can ask experts questions about category theory without bothering to figure out anything about category theory, including what my question means? 07:31:32 is the answer "#haskell"? 07:31:50 The answer is probably "don't". 07:32:59 i mean probably the best reason to take a pay cut for a job using Haskell specifically 07:33:08 is that it's a proxy for the kind of people you'll be working with 07:33:40 but i think the dollar value there is pretty low 07:34:44 i'm not sure how much it tells you versus being extra attentive during the process of interview etc. 07:35:04 (i think it's much more valuable in the other direction, for companies assessing candidates) 07:35:06 kmc: Also, much more relevant if you're working in the office. 07:35:07 Well, in this case it's not just "the kind of people" but a specific group of people in particular. 07:35:33 right 07:37:23 pikhq_, why more relevant if you're working in the office? 07:38:16 by "kind of people" i mean that they're probably pretty smart and have some respect for sophisticated and unconventional approaches, stuff like that 07:38:29 not really like the personality aspect 07:39:10 i'm thinking of stuff that is relevant if you're working together on some code, whether or not you're in the same physical location 07:40:20 Ah. 07:40:50 i doubt you can infer that much about personality from someone's choice of programming language 07:41:08 except for Lisp of course 07:41:25 :P 07:41:38 Lisp programmers are all geniuses from a higher plane of existence, tragically misunderstood in this brutal, unenlightened era 07:42:08 -!- cheater has quit (Ping timeout: 240 seconds). 07:42:34 destined to die young and crazy of syphilis, like the great painters and writers 07:42:46 Also doomed to die rich. 07:42:51 :P 07:42:58 no hackers are painters/writers 07:43:07 dying rich is super nega-cred for those folks 07:43:21 you're supposed to die poor and then have your art become ultra-valuable hundreds of years later 07:43:23 Then what about Paul Graham? 07:43:30 Oh, wait, right. Do as I say, not as I do. 07:43:41 :D 08:00:15 -!- cheater has joined. 08:41:16 -!- cheater has quit (Ping timeout: 240 seconds). 08:59:12 -!- GreaseMonkey has quit (Quit: The Other Game). 09:06:56 -!- cheater has joined. 09:12:24 -!- pikhq_ has quit (Ping timeout: 252 seconds). 09:12:25 -!- pikhq has joined. 09:34:11 -!- augur has quit (Read error: Connection reset by peer). 09:34:33 -!- augur has joined. 09:49:15 There's some sort of a thing that in some PDF files, evince has replaced capital-sigma sum signs with large dots. This is not the first such file I've seen. 10:08:43 -!- elliott has joined. 10:08:51 -NickServ- Last failed attempt from: elliott!~elliott@c-69-181-214-206.hsd1.ca.comcast.net on Jan 13 03:36:38 2012. 10:09:01 My nick, fucker. 10:09:32 -!- Vorpal has joined. 10:09:41 Oh my, is that my IP address? 10:09:43 (No.) 10:10:01 elliott: "My, nickfucker." 10:15:08 my oh my 10:15:13 nickfuckers can only mean trouble 10:16:11 07:09:38: i was talking about this in #haskell-blah but wli took over with his AMERIKKKA rants so now y'all get to hear about it 10:16:21 shachaf: I'm so glad I didn't listen to you when you told me to join -blah. 10:17:09 hi elliott 10:17:13 elliott: FASCIST 10:17:24 * shachaf expected to be asleep a couple of hours ago. 10:17:25 hi monqy 10:17:26 *kmc 10:17:38 And by "expected" I mean "planned but didn't really expect". 10:17:50 hi elliott 10:18:49 * Lymia flails 10:18:50 shachaf: You should pay someone to knock you unconscious at a prearranged time. 10:18:52 CRAP CRAP CRAP 10:18:57 Run under valgrind? No segfault 10:19:01 Run without valgrind? Segfault 10:19:02 elliott: I'll be happy to pay you to do that. 10:19:03 Heisingbug... :( 10:19:17 shachaf: Okay. My going rate is $2,000/knockout. 10:19:19 Lymia: Does valgrind report errors? 10:19:26 shachaf, I'm going to examine that 10:19:29 elliott: I have these wooden nickels... 10:19:56 shachaf: [Hilarious Monkey Island quote I'm too tired to think of.] 10:20:11 "In the Mayan calendar, 2012 is suppose to be a year of deep cleansing and rebirth for the world. In this spirit, I’ve been branching out into new fields and broadening my conceptual view of software development." 10:20:13 Thanks, Mayans. 10:20:16 Thayans. 10:21:22 i have these nickel woodens 10:21:25 absolutely useless 10:22:54 wickel noodens 10:22:56 elliott: Why am I not on that list? 10:23:12 "shachaf, IRC idling genius" 10:24:10 elliott, yeah i lolled at that post 10:24:13 shachaf: Wait, what list? 10:24:29 elliott: From the post you just quoted. 10:24:46 Oh. I didn't actually read beyond that. 10:25:05 Wait, it's literally just a list of people who use functional languages? 10:25:07 Well, thanks for nothing, elliott. Thfnelliott. 10:25:25 elliott: No, it also has Haskell B. Curry. 10:26:06 shachaf: He programmed in ML. 10:26:19 It's like how Jesus was Jewish. 10:26:32 07:21:59: Nohjf 10:26:32 07:22:01: Niughji 10:26:32 07:22:02: Night 10:26:35 godrijgromorngoirdg 10:26:38 mogirdg nogidr 10:26:39 good morning 10:26:49 hi ieelieiote 10:26:53 hoe eihgleiont 10:26:55 hi helioent 10:26:56 07:26:49: I may have an ingrown fingernail. 10:26:57 hi heliot 10:26:59 hi elliott 10:26:59 elliott: He programmed in ML like how Jesus was Jewish? 10:27:04 shachaf: I thought that wasn't possible. 10:27:08 At least ais said that wasn't possible. 10:27:16 hey guys i like haskell and fp, i have nothing to say about it, just wanted you all to know 10:27:18 Also, yes. 10:27:49 kmc: Here's my spj shrine *strokes framed photo lovingly* 10:28:00 Wait, why haven't I set up an SPJ shrine yet? 10:28:06 That's like #1 on my list of things to do. 10:28:51 07:43:21: you're supposed to die poor and then have your art become ultra-valuable hundreds of years later 10:29:02 kmc: which is why you should found a startup that everybody hates and is lost to the mists of time 10:29:09 make sure that the servers keep running when you die 10:29:14 -!- Lymia has changed nick to Madoka-Kaname. 10:29:22 and in a few hundreds of years everyone will rediscover it and it'll become the talk of the web2.0sphere 10:29:32 artist style(tm) 10:29:54 web2.0 in hundreds of years? 10:30:02 haven't they moved on to web a billion point oh by then 10:30:10 monqy: no its classique 10:30:16 "Father of Haskell foundations" hahaha i didn't even 10:30:18 see that part 10:30:19 oh a special sphere 10:30:25 for web2.0 archaeologists 10:31:20 everyone has their own sphere in the future 10:31:57 elliott: Oh, you got that post from /r/haskell. 10:32:00 I like how it has 4 points. 10:32:22 I should do some experiments on how bad I can make posts before they get downvoted on /r/haskell. 10:32:33 shachaf: I'm balancing the satisfaction of commenting with something like "You forgot to add the content." and the chance that it'll make people think I'm a jerk and not upvote me on SO. 10:32:53 elliott: That's why you make the second account. 10:33:01 http://stackoverflow.com/questions/8834582/is-haskell-a-lisp-dialect ;; this question got 3 upvotes 10:33:09 Anyway, people upvote jerks on SO. 10:33:22 http://stackoverflow.com/questions/8829194/why-are-types-with-no-data-constructors-valid ;; this one got 10 10:34:16 Did you know that typedefs can shadow variable names in C? 10:34:36 int foo; void v() { typedef int foo; ... } 10:34:47 shachaf: Isn't that what causes that context-sensitive bit? 10:35:00 "Waterstones, the bookshop, has dropped the apostrophe in its trading name and logo, sparking outrage among some of its customers. 10:35:00 "It's just plain wrong", said John Richards, chairman of the Apostrophe Protection Society" 10:35:23 "Its just plain wrong", wrote John Richard's, chairman of the Apostrophe Protection Society" 10:35:30 *'Society 10:35:39 "Its just plain wrong", wrote John Richard's, chairman of the Apostrophe Protection *'Society" 10:35:50 I was going to go with S'ociety, but that's all right too. 10:36:08 ch'man 10:36:14 o' th' 10:36:29 CAN YOU FIND ALL OCCURENCES OF THE LTTER S IN THIS SENTENCE? IF YOU FIND ALL SIX, YOUR IQ IS AT LEAST 400 10:36:37 'postraph' 'rotectin' 10:36:48 apo'strophe 10:36:58 "thanks for the trophe" --apo 10:37:41 The apostrophe, named after the apostles of Jesus Christ. 10:38:08 -!- pikhq_ has joined. 10:38:09 -!- pikhq has quit (Ping timeout: 252 seconds). 10:39:31 Since I don't know much C I shall upvote you, but from what I DO know; WHY not use C++ instead? You'll just have your instance of a pushbutton, and call functions from within it, Instead of having 430983852 different functions in a really messy API. Tidyness disappears. However, for those of you who are experienced in both C and C++, what is the benefits of programming like a nutcracker (in C) ? 10:39:31 elliott: "Of course, for the single-constructor, single-item cases, newtype is preferred over data." 10:39:50 what 10:39:53 shachaf: Don't. I already held back the tears. 10:39:55 nutcracker? 10:40:05 kmc: if i suddenly say something really weird it's a quote 10:40:11 unless it's me 10:40:12 i got that, but? 10:40:14 oh 10:40:21 http://www.reddit.com/r/programming/comments/oek2t/any_interest_in_a_c_binding_to_wxwidgets_from/c3gp4si 10:40:31 interpretation is left to the reader 10:42:00 elliott: I'm going to write a preprocessor for GHC that replaces all instances of "data" with "newtype" if the file remains valid. 10:43:03 shachaf: I bet the author of that comment thinks that "newtype" exists as a separate keyword for historical reasons. :( 10:44:21 From today, 430983852 will be known as "the C++ overhead constant". 11:05:35 -!- monqy has quit (Quit: hello). 11:10:11 hi 11:11:59 everyone has their own sphere in the future 11:12:02 this, a thousand times 11:13:22 kmc: deep 11:13:29 Wait, it's literally just a list of people who use functional languages? elliott: No, it also has Haskell B. Curry. shachaf: He programmed in ML. 11:13:36 irrelevant because Haskell was the first functional language 11:13:48 ML is "almost-functional" 11:13:59 source: _Gentle Introduction to Haskell 98_, chapter 1 11:16:59 CAN YOU FIND ALL OCCURENCES OF THE LTTER S IN THIS SENTENCE? IF YOU FIND ALL SIX, YOU HAVE LUPUS 11:20:32 kmc: Well, I wouldn't really call ML functional either. I guess I'm a zealot. 11:20:38 kmc, irc is hard real time 11:20:56 IRC is real, hard time 11:20:59 (for computer hacking) 11:21:16 elliott, a language can't be considered functional unless it uses {- -} for multi-line comments 11:21:23 as should be trivially obvious to the most casual observer 11:21:45 (in college we had a house office named Most Casual Observer) 11:21:54 (their job was to observe things casually and thus know all) 11:22:09 kmc: i wonder how the {--} syntax came abou 11:22:09 t 11:22:40 Well, it combines the worst bits of imperative programming languages, that we don't have a use for any more 11:22:43 {} and -- 11:22:50 :D 11:23:28 they represent a pair of dwarvish fire-daggers 11:23:36 as should be trivially obvious to the most casual observer 11:23:43 The most causal observer. 11:24:05 together they cast a powerful Spell of Warding +5 which prevents execution of the code by any compiler with armor class 12 or lower 11:26:43 fungot: All Witchaloks are hermaphroditic androgynites. 11:26:44 fizzie: oh, no, man... i forgot. i've got some mashed potatoes over here, it means you're a math teacher. 11:27:06 another benefit is that you can write {-∗-} should you need to represent Darth Vader's TIE Fighter Advanced x1 within Haskell source code 11:27:47 "the ideal comment syntax is smalltalks" 11:28:05 seriously, the Gentle Introduction does say that ML and Scheme are "almost-functional" 11:45:06 Alas, GHC 7.0 still cannot handle equality superclasses: 11:45:06 Rep t ~ rep 11:45:09 Not again! 11:45:56 alas and alack 11:46:32 -!- Phantom_Hoover has joined. 11:46:58 this is way too difficult 11:50:22 it works in newer GHC 11:50:44 blomg 11:51:00 elliott, please send me messages so I don't look like an idiot again. 11:51:38 @tell Phantom_Hoover Hi. 11:51:38 Consider it noted. 11:51:48 Better. 11:51:49 Phantom_Hoover: You have 1 new message. '/msg lambdabot @messages' to read it. 11:51:53 @messages 11:51:53 elliott said 15s ago: Hi. 11:55:42 @tell lambdabot u suck 11:55:43 Nice try ;) 11:56:22 @tell me something new 11:56:22 Consider it noted. 11:56:23 T PANTS THESE AREN'T THE BALLS YOU'RE LOOKING FOR 11:56:30 I wonder how many messages "me" has. 12:00:28 me's not an allowed nick, is it? 12:01:07 Information on me (account spb): blah blah blah. 12:01:10 It's someone else's. 12:08:13 Whoever it is, they have MemoServ set up to prevent them getting sent anything. 12:08:26 * me :Nick/channel is temporarily unavailable 12:08:36 And they haven't been seen for 40 weeks in any case. 12:08:39 -!- elliott has changed nick to elliott_. 12:08:41 @messages? 12:08:42 Sorry, no messages today. 12:08:46 -!- elliott_ has changed nick to ehird. 12:08:48 @messages? 12:08:48 Sorry, no messages today. 12:08:50 -!- ehird has changed nick to elliott. 12:09:03 -!- elliott has changed nick to Phantom__Hoover. 12:09:05 @messages? 12:09:05 Sorry, no messages today. 12:09:07 -!- Phantom__Hoover has changed nick to elliott. 12:09:24 How does lambdabot deal with ident stuff? 12:10:36 It doesn't. 12:11:47 They haven't used the "me" nick in 40 weeks, you mean; the account is online right now. 12:12:45 The owner of "you" similarly hasn't used you in 62 weeks. 12:12:57 I'm thinking nicknames for punnery or such. 12:15:46 -!- ais523 has joined. 12:16:05 @hoogle try 12:16:05 Control.OldException try :: IO a -> IO (Either Exception a) 12:16:06 System.IO.Error try :: IO a -> IO (Either IOError a) 12:16:06 Control.Exception.Base try :: Exception e => IO a -> IO (Either e a) 12:17:13 Trying times. 12:18:20 :t reads 12:18:21 forall a. (Read a) => String -> [(a, String)] 12:18:42 * Sgeo wants to see an example of there being more than one element in the list 12:22:12 me too 12:23:23 -!- cheater has quit (Ping timeout: 255 seconds). 12:23:24 Is try a typeclass thing then, or not? 12:23:36 what's "a typeclass thing" 12:23:41 mean 12:23:48 Is it a typeclass method, or based on them. 12:24:01 Erm, wait, no, not based on them. 12:24:18 Are those functions all independently defined, or are they parts of instances? 12:24:30 which functions? the three that hoogle mentioned? 12:24:34 Yes. 12:24:35 I was able to make an Exception instance without defining any methods, somehow 12:24:55 It occurs to me that that doesn't mean much 12:24:56 Phantom_Hoover: http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exception.html 12:25:01 Phantom_Hoover, those are independent functions. basically, three different generations of the exception system 12:25:04 Exception is just 12:25:09 toException :: e -> SomeException 12:25:09 fromException :: SomeException -> Maybe e 12:25:13 so no, try isn't a typeclass method. 12:25:15 Sgeo, that's expected, and documented 12:25:21 Yeah, I just checked that in ghci. 12:25:35 kmc, yes, but for some reason I thought that was relevant to Phantom_Hoover's question 12:25:39 When it really wasn't 12:25:40 oh 12:26:30 Eh, the things need to be Typeable? 12:26:42 Phantom_Hoover, so in standard Haskell you have try for IOError only, and then that was generalized to a larger fixed set of exceptions (in what's now Control.OldException), and then to the extensible system in Control.Exception 12:26:56 Sgeo, yes, the extensible exception system uses Typeable 12:29:04 basically exceptions are dynamically typed 12:29:10 and catching does a run-time type check 12:29:33 The use of the phrase "pozycjonowanie google cottages" can be considered a little bit misleading. 12:29:47 :D 12:29:53 is that polish or gibberish 12:30:06 ais523: I'm glad you have correctly left alone the asd pages 12:30:08 as they're claerly not spam 12:30:09 I think it's a foreign language from context, polish wouldn't surprise me 12:30:13 Eh, the things need to be Typeable? 12:30:17 seems to mean "positioning" in Polish 12:30:18 Sgeo: that's how the entire exception system works 12:30:19 elliott: I haven't reached them yet 12:30:41 but meh, I'll leave them 12:30:42 Sgeo: if you unlayer the abstractions far enough, the exception system is based on comparing two strings and using unsafeCoerce if they're equal 12:30:49 which is: gross 12:31:29 anything is gross if you unlayer the abstractions far enough 12:31:47 kmc: yeah but you can still define your own Typeable instances today :P 12:31:58 yeah that's unfortunate 12:32:36 data a :=: b where { Refl :: a :=: a}; class TypeEq a where { typeEq :: (TypeEq b) => Maybe (a :=: b) } 12:32:41 and a magic deriving (TypeEq) 12:32:54 that's what we need, it would be perfectly safe ... and also really confusing 12:33:14 you want things besides decidable equality 12:33:30 kmc: do you? I thought that's all Exception needed 12:33:31 cast 12:33:39 it's convenient if you can order and hash TypeReps 12:33:47 kmc: Typeable is useful, yeah 12:33:47 maybe Exception doesn't need that 12:33:49 but in general 12:33:49 but Exception doesn't need it 12:34:06 well i think it's kind of a misuse of Typeable, Exception wants dynamic typing and uses the reflection mechanism to accomplish it 12:34:53 Dynamic is also implemented with Typeable, is that an abuse? 12:35:26 kmc: well, yes :) 12:35:31 i mean it's not terrible or anything 12:35:40 but Typeable gives you a lot more than you need for that 12:35:44 Why is the more useful function's name longer? 12:35:48 and it definitely feels like conflating two things 12:35:54 Sgeo: ? 12:36:03 fromDynamic vs fromDyn 12:36:10 historical reasons? 12:36:10 yeah that's terrible 12:36:15 fromDyn could easily be expressed in terms of fromDynamic 12:37:06 elliott, I see your point 12:37:15 fromDyn dyn default = fromMaybe default (fromDynamic dyn) 12:37:37 from is now semantically saturated for me 12:37:38 yes yes 12:37:40 from from from 12:38:43 fromDynamic (Dynamic t v) = case unsafeCoerce v of r | t == typeOf r -> Just r | otherwise -> Nothing 12:38:57 that's a fun tangle 12:42:06 kmc: haha is that seriously the implementation? 12:42:09 yes 12:42:18 Funtangled particles. 12:42:20 that scares me, I wouldn't be able to bring myself to type unsafeCoerce until I'm safely in the right branch 12:42:43 yeah it's pretty sketchy 12:43:01 kmc: i wonder if Dynamic is actually more efficient than an existential these days 12:43:10 i guess (a -> TypeRep) is a bit heavier than TypeRep 12:43:29 you mean, an existential with a Typeable constraint? 12:43:43 *nod* 12:43:43 yeah 12:43:51 someone should write abenchmark 12:43:54 at least i was told it's a deliberate optimisation of that 12:44:03 interesting 12:44:12 benchmarks? meh, that's work, and I might be proven wrong 12:44:23 it's easier to sit here and make people think i'm smart for having seen the better way 12:44:30 bravo 12:44:57 better use some hash tables too, I hear they're O(1) 12:45:21 O(1) EVERYTHING 12:45:33 find :: (a -> Bool) -> HashTable k a -> Maybe a -- O(1) 12:45:53 * Sgeo pokes the argument order of that 12:46:28 Didn't I once yell at Factor for its sensitivity to argument order? And for the endless required imports? 12:46:32 Yet Haskell does both 12:46:35 haha 12:46:54 but Haskell is the best language 12:47:07 "sensitivity to argument order"? 12:47:08 so sensitivity to argument order and endless required imports must somehow be virtues 12:47:34 anyway that argument order is obviously correct 12:47:39 elliott, a decision about order of arguments can make a function easier or harder to use 12:47:41 i'm gonna say that sensitivity to argument order makes you pay attention to something important that the Java Monkeys ignore 12:47:44 doesn't really matter what 12:48:07 and required imports are great for all those static analysis and refactoring tools Haskell has 12:48:25 (by "has" I mean "someone would have to write from scratch", but that's a matter of trivial engineering) 12:50:21 Sgeo: Yeah, API design matters. That's a big language flaw. 12:51:05 It's maybe annoying in a language where curried functions (<-- I will kill anyone who objects to this terminology) aren't the standard, but when they are it's obviously a benefit, since partial application is so common. 12:51:08 The thing is argument order is a more significant part of the API in Haskell and Factor than it is in Python 12:51:48 Relatedly, I consider it a /good/ thing if functions with 5+ arguments are a pain to use; it's a sign you should be factoring out those arguments into data types, or taking a more combinator-based approach, etc. (Although the record hack is acceptable for interfacing with foreign libraries at a low level.) 12:52:09 kmc: You're really grumpy. 12:52:36 elliott, I love how the Haskell standard libraries got API design wrong so often 12:52:39 it's a good thing that because 12:52:44 :t Map.lookup 12:52:45 Couldn't find qualified module. 12:52:48 :t Data.Map.lookup 12:52:50 forall k a. (Ord k) => k -> M.Map k a -> Maybe a 12:52:55 Sgeo: They did? 12:53:05 :t head 12:53:05 That's the correct way around. 12:53:06 forall a. [a] -> a 12:53:14 elliott, I may be grumpy but I'm right, and that's all that counts on The Internet 12:53:27 kmc: I don't consider it a rationalisation of a language flaw; I have no real vested interest in making people think Haskell is good. 12:53:48 elliott, which "record hack"? the one where your function takes a big record, and you provide a default value for that record, and callers can use record-update syntax? 12:53:57 Sgeo: head is evil; what's that got to do with Map.lookup? 12:54:06 Wait, why's head evil. 12:54:08 Oh, wait. 12:54:11 > head [] 12:54:12 *Exception: Prelude.head: empty list 12:54:14 head is evil is a separate example of bad API design 12:54:20 :t lookup 12:54:20 forall a b. (Eq a) => a -> [(a, b)] -> Maybe b 12:54:22 so much bad API design in Prelude 12:54:33 kmc: Yes. It's a blatant hack, and it's awful, but if you want to interface with something that uses keyword arguments or whatever at a low level... 12:54:59 elliott, can you explain what makes it a "blatant hack" and "awful"? 12:55:01 kmc: I'd usually just bind N-parameter-for-huge-N functions directly, since they're almost always from languages without keyword arguments, anyway (since almost all languages don't have keyword arguments). 12:55:10 Isn't it preferred to make a function that takes the object immediately, so you could try different keys with the partially applied function, etc? 12:55:18 i like that trick and I don't see what it has to do with "interfacing with foreign libraries at a low level" 12:55:32 kmc: You're misinterpreting me. 12:55:40 it's common to have a procedure with a bunch of customizable behavior, for which most callers only want to change a few parts 12:55:45 I'm not saying that the trick exists to do such interfacing. 12:56:02 you're saying it's gross and has cooties and should only be used when touching the unclean terrible world of anything not Haskell 12:56:14 * elliott yawn 12:56:15 but why 12:56:21 why is it a hack and awful 12:56:24 I'm not going to bother if you're just going to twist everything I say into "HASKELL R AWSUM". 12:56:43 ok 12:57:01 well i'm going to continue to use this "blatant hack" in APIs i design 12:57:17 until I see a problem with it or someone points one out to me 12:57:21 if you're fine with that, so am i 12:57:34 I also don't see why you're blowing a parenthical remark in a completely different context out of proportion... 12:58:40 I do consider most uses of the record thing a hack, and I do think it's fairly awful, but I was talking about it in a completely different context to the use-case you suggested. 12:59:01 why is it a hack and awful 12:59:14 and which context? 12:59:33 you just keep saying it's bad without explaining why 13:00:15 kmc: The context I was talking about is the awkwardness of using functions with a large number of parameters (which a lot of people think explicitly named arguments like in Smalltalk (not overriding-defaults style like in Python or whatever) alleviates). 13:00:37 ok 13:01:38 i agree that functions with a large number of required parameters are bad 13:01:46 For representing something like a Smalltalk-named-argument call, a record with a default is supremely ugly because you have to use "undefined" or whatever as a default, and failing to specify an argument is just silently accepted. 13:02:16 What about using Nothings as a default? 13:02:21 I do think that a lot of the procedure-with-a-bunch-of-customisable-behaviour situations can be done more nicely combinator-style or similarly, but records-with-defaults are fine for such configuration. 13:02:25 Although admittedly it's ugly to call, but still 13:02:36 Sgeo: That doesn't solve anything, since the underlying function will have to fromJust them. 13:02:58 Oh, when all the things should be required? 13:03:03 Don't provide a default then 13:03:18 Oh, right, SomeRecord {} fills things in with undefined? 13:03:20 :/ 13:03:27 yeah, at least GHC will warn though 13:03:38 kmc: Anyway, my main point was that a lot of people point to e.g. an OpenGL or Win32 call with a billion parameters and say "look how much cleaner this would be if we you named arguments; therefore it's a language flaw not to have them", but in reality those functions have more like 3 parameters, it's just that those parameters are data-types left implicit because of limited abstraction facilities. 13:03:50 yeah 13:03:56 Or sometimes it's even that one function is doing the work of five because of limited composability, etc. 13:04:15 Not having named arguments simplifies the language and discourages such things. Of course you have to make up for it with sufficient abstractional facilities. 13:04:28 glLoadMatrix16(float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float) 13:04:49 i think the record trick is fine (not perfect) when you want to selectively override defaults 13:04:50 Is that a real example? :D 13:04:54 i don't think so 13:04:56 :( 13:05:24 for a while i worked on a C++ codebase where one of the most important classes had a constructor like this: 13:05:41 Thing::Thing(Foo, const Bar*, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool) 13:05:52 all of those bools had default values; some were true and some were false 13:06:18 also you had to be careful because the order would change between development and production branches, as new features were merged 13:06:22 Was the class called Thing too? 13:06:25 no 13:06:26 :( 13:06:27 I can't think of a situation where named parameters beats a properly designed abstraction. 13:06:36 kallisti: naming parameters 13:07:04 well, it's better at that I suppose. 13:07:04 kallisti, overriding default settings 13:07:14 meanwhile data structures are better at naming record fields. 13:07:15 for example how would you replace this with a "properly designed abstraction"? http://hackage.haskell.org/packages/archive/concorde/0.1/doc/html/Algorithms-Concorde-LinKern.html#t:Config 13:07:27 [[ 13:07:27 (I wonder: is this for beginn...@haskell.org ?) 13:07:27 toA_IO = openFile (dir "toA") WriteMode :: IO Handle 13:07:27 fromA_IO = openFile (dir "fromA") ReadMode 13:07:27 -- used as global values 13:07:27 toA = unsafePerformIO toA_IO -- 13:07:29 fromA = unsafePerformIO fromA_IO -- 13:07:31 ]] 13:07:33 thank god for beginners 13:07:40 s/\?\)/?)\n[...]\n/ 13:07:56 kallisti, maybe what you meant by "properly designed abstraction" is in fact a record like this 13:08:02 kmc: yes 13:08:02 but i don't think it's much of an abstraction 13:08:16 kmc: defConfig is your default parameter set 13:08:18 it's just a hodgepodge of all the ways you can change the behavior of 'tsp' 13:08:19 kmc: TBH I'd probably represent that like... 13:08:36 Well, similarly, I guess. But with a Monoid interface. 13:08:42 That doesn't really buy you all that much in this situation, though. 13:08:47 in a language with default keyword args I probably wouldn't define a separate type 13:08:53 Hmm, do I actually want a Monoid interface there. 13:08:53 for simplicity's sake 13:09:07 the Monoid instance is sometimes useful; I think it's dubious here 13:09:08 kmc: Anyway, I think that's actually preferable to named parameters. 13:09:11 Because you can pass around Configs. 13:09:20 elliott: gluProject(GLdouble, GLdouble, GLdouble, const GLdouble *, const GLdouble *, const GLint *, GLdouble*, GLdouble*, GLdouble*). (Okay, so last three are just output parameters; they pretty consistently take 4x4 matrices as pointers, and only go up to 4-vectors as separate parameters.) 13:09:32 fizzie: SO ELEGANT. 13:09:32 to the function user it's not a huge difference. To the implementor it's a bit more work to define a data type and a default constructor. 13:09:41 elliott, sure, you can, but you usually don't need to 13:09:47 kallisti: "default constructor"? you have to specify the defaults anyway :P 13:09:56 true. 13:10:01 an airplane is better than a car because it can also fly 13:10:03 it's just abit more typing is all. 13:10:12 fizzie, why 4-vectors? 13:10:13 kmc: If you used more-notation, I think you could specify the defaults inline with the fields. 13:10:14 however the airplane is harder to build and more expensive ;P 13:10:15 same amount of information though, I suppose. (except you also need types in a statically typed language of course) 13:10:24 M O R E N O T A T I O N 13:10:27 Has OpenGL cornered the 4D gaming market while I wasn't looking? 13:10:35 haha 13:10:38 elliott: GLint gluUnProject4(GLdouble, GLdouble, GLdouble, GLdouble, const GLdouble *, const GLdouble *, const GLint, GLdouble, GLdouble, GLdouble*, GLdouble*, GLdouble*, GLdouble*); /* real function */ 13:10:40 kmc: http://www.haskell.org/haskellwiki/User:Zzo38/Proposal_for_more-notation#Fields_in_record_syntax 13:10:40 /kick kmc 13:10:42 Phantom_Hoover: Homogenous coordinates. 13:10:47 fizzie: :D 13:10:53 Phantom_Hoover, perspective transformation is linear with homogeneous coordinates 13:11:10 meaning that (x, y, z, w) represents the 3D point (x/w, y/w, z/w) 13:11:23 and then for the cases in Python where a function basically treats its parameter set as a hash table you'd use some equivalent mapping structure. 13:11:25 elliott: Sorry, I droppeded one star. 13:12:05 you start with some vectors where w=1 and then get something else 13:12:12 and renormalize them before you draw them 13:12:44 also I can't, for the life of me, figure out how named parameters are supposed t work in conjunction with currying. 13:12:45 believe this corresponds to 3D projective space, where the extra "point at infinity" is (anything, anything, anything, 0) 13:14:50 some other minor issues that could be amended are that named parameters require you to know the names of parameters. In Haskell these are lovely things such as "m f g h x y z". Also, currently documentation doesn't list parameter names and doing so look pretty ugly in most cases. 13:14:52 kmc: It's a "sphere at infinity" with antipodal points made the same; there's a difference between (1, 0, 0, 0) and (0, 1, 0, 0) even though they're both "at infinity". 13:15:08 hmm 13:15:10 But (1, 0, 0, 0) and (-1, 0, 0, 0) are the same thing. 13:15:15 these are problems with introducing a language feature into an existing codebase rather than problems with the feature itself. 13:15:26 interesting 13:15:43 wait why the fuck am i amending my answer to help this guy, their accept rate is 33% 13:15:57 elliott: DO IT 13:15:59 kmc: I bet you didn't even LOOK at that more-notation link. 13:16:11 elliott, I've seen the more notation... 13:16:34 kmc: Yeah, but did you know it can simplify default parameter records?! 13:16:44 It's almost as if it's ten different notations in one! 13:16:50 * kallisti begins writing a proposal for "not enough" notation 13:16:52 it's too early to understand this 13:16:59 i was there in #haskell when zzo38 first arrived 13:17:16 You can thank me for that. 13:17:20 haha 13:17:34 now i have a better understanding of all the ways Haskell is unlike INFORM 7 and Magic: the Gathering 13:17:44 Too many ways, is the answer! 13:18:59 It's like the projective plane is the R^2 plus one "point at infinity" for each class of parallel lines, so that the added points form a single "line at infinity". The Riemann sphere is the version where there's a plane and a single point. 13:19:52 aha, that makes some sense 13:19:57 elliott: WHAT IF YOU COULD PUT THE DEFAULT VALUES IN THE RECORD SYNTAX 13:20:09 data REcord = { x :: Foo = YEAAAAh } 13:20:50 actually 13:20:51 hmm... GArrowSum is confusing, I don't think it lets you actually have a conditional 13:20:54 oh wait yes it does duh 13:20:54 you could have it this 13:21:03 data REcord = { x = YEAAAAh :: Foo } 13:21:05 Would be nice if you could say that the things in the record have no defaults 13:21:10 and the :: could be omitted because of type inference. 13:21:13 So Record {} is a compile-time error 13:21:24 Sgeo: that would be the default, sir. 13:21:34 the default is to have no defaults. :P 13:21:44 kallisti: you did not click the more notation link 13:21:51 I did not 13:21:54 does it involve the "more" keyword? 13:22:16 the main reason I didn't click is that gnome-terminal's link regex breaks on colons 13:22:34 so to click it I would have to actually DRAG AND DROP MY MOUSE CURSOR OVER IT AND COPY AND PASTE IT MANUALLY 13:22:37 yikes 13:23:20 * kmc sleep 13:24:19 Phantom_Hoover: Also the homogenous coordinates are nice because when all your vectors are normalized [x y z 1]^T vectors you can do translation (and any affine operations) by multiplying with a 4x4 matrix [x x x x; x x x x; x x x x; 0 0 0 1] to get another [x' y' z' 1]^T, so you can just concatenate sequences of translations and rotations and whatever by multiplying them all up. 13:28:58 I think once I have a working implementation of portal chess I'll start working on a generic interface to define chess games with arbitrary pieces, movement rules, starting positions, etc.. and have that available as a different module. 13:29:57 -!- sebbu2 has joined. 13:29:58 -!- sebbu2 has quit (Changing host). 13:29:58 -!- sebbu2 has joined. 13:30:24 I'm not sure but I /think/ type families would be useful for this. 13:30:27 -!- itidus20 has joined. 13:30:42 elliott: Can't seem to find anything that'd take >13 parameters, though gluLookAt takes 9 doubles in a row (three 3-vectors), which is at least nice and uniform. 13:33:04 -!- itidus21 has quit (Ping timeout: 240 seconds). 13:33:24 -!- sebbu has quit (Ping timeout: 240 seconds). 13:34:46 Bah. The "sum is denoted by ●" was one thing, but this thing-as-seen-by-evince also has limits as "N → °", and it's not talking about zero there. 13:34:57 -!- sebbu3 has joined. 13:34:58 -!- sebbu3 has quit (Changing host). 13:34:58 -!- sebbu3 has joined. 13:35:01 Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software 13:35:01 Producer: Acrobat Distiller Command 3.01 for Solaris 2.3 and later (SPARC) 13:35:07 Going to blame Adobe here. 13:37:35 fizzie: how do you render that white dot on white paper? 13:38:00 -!- sebbu2 has quit (Ping timeout: 240 seconds). 13:38:32 fizzie: in fact all of that text is white 13:38:35 isn't it jujst going to be invisible? 13:38:39 :) 13:39:43 Bah. The "sum is denoted by ●" was one thing, but this thing-as-seen-by-evince also has limits as "N → °", and it's not talking about zero there. 13:40:07 oooooooh 13:40:08 now I see. 13:40:11 pleasing to the eyes. 13:41:50 I think type-directed name resolution isn't too terrible of an idea 13:41:52 the only problem 13:41:56 is it needs a better name. 13:42:14 also it's playing "how many ways can we overload . ? " game 13:42:18 +the 13:42:28 (Maybe I should've s/(●|N → °)/$1/g instead.) 13:45:12 :D 13:45:41 if ' weren't already an identifier character, record'field would be a good alternative to using . 13:45:42 13:45:42 13:45:42 Ok I don't know how to use it for my problem : I want somthing like this: loadfunction = do { x <- string2int getLine if( failed parsing int ) call somefunction y <- string2int getLine if( failed parsing int ) call somefunction } – user606521 10 mins ago 13:45:42 13:45:44 13:45:46 Ok I don't know how to use it for my problem : I want somthing like this: loadfunction = do { x <- string2int getLine if( failed parsing int ) call somefunction y <- string2int getLine if( failed parsing int ) call somefunction otherfunction x y } I dont know how to do it using your anserws... – user606521 2 mins ago 13:45:50 *sigh* 13:45:53 shachaf: Should I bother? 13:46:21 elliott: sounds easy enough. just talk about read and catch. 13:46:45 :):):):):) 13:46:48 kallisti: http://stackoverflow.com/questions/8850299/catching-errors-during-string-parsing 13:47:03 -!- itidus20 has quit (Read error: Connection timed out). 13:47:11 oh... okay 13:47:23 what do you think about record'field for TDNR? 13:47:41 * elliott decides not to bother. 13:47:43 kallisti: ugly 13:48:03 unfortunately all the non-ugly symbols are taken. 13:48:58 (except for, you know, all of those unicode characters) 13:50:58 oh I know 13:51:04 a non-breaking space could indicate TDNR 13:51:06 :) 13:54:55 I think 13:55:01 ' is the best choice aside from . 13:55:19 because it doesn't really break anything (how many people put a ' in the middle of a variable name?) and doesn't look very bad. 13:57:17 it breaks don't 13:57:33 oh shit... 13:57:48 http://lal0nde.deviantart.com/art/problem-sleuth-279003657 13:57:50 this 13:57:54 this must be moddable 13:58:57 elliott: you're banned from ever naming another variable "eVal" 13:59:28 oh 13:59:30 that was the guy 13:59:31 oops 13:59:51 he's banned forever. 14:02:41 @C.A.McCann: How can you sleep when there's rep to be gained?! :) – ehird Jan 8 at 18:51 14:02:41 Unknown command, try @list 14:02:47 bahahahahahahahahahahahahahahahahahahahahahahahahahahahaha 14:02:50 ^ha 14:02:50 ha. ha. ha ha. ha ha ha. ha ha ha ha ha. ha ha ha ha ha ha ha ha. ha ha ha ha ha ha ha ha ha ha ha ha ha. ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha. ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha. ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ...too much output! 14:08:10 http://stackoverflow.com/questions/8793736/haskell-to-javascript-compilers/8793958#8793958 14:08:18 elliott: btw there's also Selenium bindings for Haskell. 14:08:29 -!- Gregor` has set topic: Update grating, and Cheesy A! I'm Number A, not IM. | http://codu.org/logs/_esoteric/. 14:08:33 Wha 14:08:35 -!- Gregor` has changed nick to Gregor. 14:08:50 -!- Gregor has set topic: Update grating, and Cheesy A! I'm Number A, not IM. | http://codu.org/logs/_esoteric/. 14:11:26 kallisti: i don't think selenium is relevant. 14:12:25 it's as relevant as Ji.. 14:13:00 Nope. 14:13:12 It might be if you make incorrect assumptions about what Ji does, though. 14:13:54 "it lets a Haskell server control a browser connected to it via AJAX." 14:14:27 I call you an idiot in T-10, T-9... 14:15:07 This happens because you deliberately ignore people rather than, say, doing something as simple as clicking a link to clarify your impression after someone points out that you're wrong. 14:17:26 oh right, that's why I was ignoring you. 14:18:25 Yes, because I call you an idiot after I point out you're wrong and you continue to insist you're not rather than doing the most cursory research. 14:18:38 elliott, selenium is always relevant. 14:18:59 elliott: I discovered how I was wrong. happy? 14:19:10 When people who aren't me say "no, that's not related", they usually mean "You clearly know more than me about what both of these things do. Please, quote something I said back at me." 14:19:29 kallisti: Sorry, I hate life and everyone and existence. 14:20:33 I don't really see how any of what I did implied that I think I "know more about something" 14:20:47 instead, I was just quoting you... to show you where I got that impression. 14:20:48 ???? 14:20:50 whatever 14:23:06 Blargh 14:23:16 Just got a terrible thought for API design 14:40:11 "it is always better to work continuously over the course of the term, rather than in discrete bursts around the time of examinations." 14:40:19 SILLY PROFESSOR AND YOUR MATH HUMOR 14:49:38 hmm, back 14:49:45 that was a fun seminar 14:49:52 we spent a whole hour talking about call-by-name 14:50:01 then another 40 minutes after the seminar talking about product types 14:50:19 ais523: see #nomic 14:54:24 -!- ais523 has quit (Ping timeout: 240 seconds). 14:57:08 @tell ais523 can you actually talk about product types alone for 40 minutes? 14:57:08 Consider it noted. 15:18:03 http://en.wikipedia.org/wiki/File:Carlos_segundo80.png 15:18:08 Ngevd's family tree. 15:21:27 http://en.wikipedia.org/wiki/File:Undirected_6_cycle.svg Phantom_Hoover's family tree 15:21:39 kallisti: especially as all discrete bursts have measure zero. 15:22:14 This is also known as the Hexagon of Hoover. 15:24:34 http://en.wikipedia.org/wiki/File:Carlos_segundo80.png 15:24:41 Phantom_Hoover: Every time I see this I just grin and gawp at it. 15:24:51 It's like they're optimising for inbreeding. 15:25:37 It's the way that the guy has exactly five ancestors who weren't inbred there. 15:26:10 Phantom_Hoover: (The comments on the SO question whose reddit thread I presume you found that in are really annoying.) 15:26:17 Yes, they are. 15:26:34 "This might be one of those cases where you need to ask yourself: Do I really want to make business with that guy?" INCEST IN FAMILY TREES HAS LITERALLY NEVER HAPPENED, JUST IGNORE IT 15:26:58 Well, in this case, the complainer /was/ a man who said he'd had two children with his daughter. 15:27:11 A man with money to spend on family tree software!!! 15:27:15 CAPITALISM: the movie 15:27:43 "What the guy should have asked is how to handle nodes that can be reached via two or more distinct paths. Every family tree has cases like this (no exceptions)." 15:27:52 http://en.wikipedia.org/wiki/File:Undirected_6_cycle.svg Phantom_Hoover's family tree 15:27:54 Um excuse me what do you say to Cain and Abel?? 15:28:05 All the vertices are Phantom_Hoover. 15:28:18 Yes. 15:28:31 http://en.wikipedia.org/wiki/File:Complete_graph_K7.svg 15:28:35 elliott's family tree. 15:28:53 Yes. 15:30:50 -!- ais523 has joined. 15:31:44 ais523: hi 15:31:48 hi 15:31:48 ais523: You have 1 new message. '/msg lambdabot @messages' to read it. 15:31:50 stupid connection 15:32:08 sure you can talk about product types for 40 minutes 15:32:32 note that it was in the context of impure languages 15:32:58 in particular, we were debating the expression that in ICA would be written as "print(1);(2,3)" 15:33:24 (you could write something similar in various other impure CBN languages, but there aren't a whole lot of those in existence) 15:33:45 both in call-by-name, and in call-by-value 15:38:52 what is ICA 15:39:36 Immaculate Conception Academy-Greenhills, an elite private all-girls Chinese school in Greenhills, San Juan, Metro Manila, Philippines. (Not to be confused with ICA Manila (ICAM) or ICA Dasmariñas) 15:40:18 International Council on Archives <--- aka elliott 15:41:55 http://en.wikipedia.org/wiki/File:EgyptianPtolemies2.jpg 15:42:02 Ngevd's other family tree. 15:42:37 Jesus Christ, the most recent new stock in that family tree is Antiochus III. 15:42:43 impressive pedigree 15:42:48 kallisti: idealized concurrent algol 15:42:55 Well, right up until Caesar and Antony. 15:43:02 also note how Antiochus III of Syria manages to birth Cleopatra I by himself 15:43:05 impressive. 15:43:36 Cleopatra VII's family were completely inbred for 5 generations. 15:44:06 I don't even know how to interpret these family relations.... 15:44:27 also what happened to Ptolomy, the son, the sequel. 15:45:10 for example what is the relationship between Ptolomey XIII and Cleopatra VII... they appear to be brother and sister twice. 15:45:36 They married, you dolt. 15:45:45 Phantom_Hoover: What is marriage but being brother and sister twice? 15:45:58 They just didn't have any children, which is not exactly surprising given the circumstances. 15:46:12 I'm sorry it looked strange. 15:46:23 Cleopatra wasn't lined up with all the others 15:46:32 and the elbow line didn't register as "marriage" at that point 15:46:52 Charles II clearly got the short end of the homozygous stick, seeing as Cleopatra isn't generally remembered as a twisted freak. 15:48:33 Phantom_Hoover: I was going to say "I wonder what the maximally inbred family would be like" and then I realised it's called LIFE. 15:48:35 http://bisserjeta.hsara.com/2012/01/100-year-old-prostitute-still-going-strong/?article 15:48:36 DEEP. 15:49:07 I wonder what her family tree looks like. 15:49:18 kallisti: "surrounded by prominent politicians, businessmen, lawyers and members of the clergy, all of whom were in costume to protect their identities. “I so enjoyed lapping up their warm greetings,” she beams." Somehow I doubt this is: legit. 15:50:19 really? 15:50:22 I don't see how 15:51:25 this looks like a completely legit site to me. 15:54:40 I wonder who the audience is for this material. 15:55:14 this creepily written probably fake story about a 100-year-old prostitute. 15:55:33 what is its purpose. 16:03:04 I still need to play Ally Cat 16:03:16 It's still on my Todo list 16:03:19 *Alley Cat 16:03:32 In Ally Cat, the cat is your ally. 16:04:21 I am glad people take my decrees so seriously. 16:04:29 Or at least I can't imagine anyone else having told Sgeo to play Alley Cat. 16:04:45 elliott, you may have been telling someone else to play Alley Cat 16:04:51 Did the PC version of that thing have rather horrible PC speaker beeping. 16:04:55 I think it did. 16:04:57 The 10/2/2011 logs 16:05:17 (As in October 2nd, not as in February 10th) 16:05:30 As in 2011-10-02. 16:05:50 04:54:08: Sgeo|web: Play alley cat. 16:05:50 04:54:14: FOREVERRR 16:05:50 04:54:17: elliott: on Thursday, I will 16:07:12 What is this alley cat 16:07:56 Some old game 16:08:05 :t runWriter 16:08:06 forall w a. Writer w a -> (a, w) 16:08:14 :t execWriter 16:08:15 forall w a. Writer w a -> w 16:08:52 fizzie: Yes, it did. 16:09:01 Phantom_Hoover: The BEST GAME. 16:10:38 The CGAest game. 16:10:52 :t msum 16:10:53 forall (m :: * -> *) a. (MonadPlus m) => [m a] -> m a 16:13:39 How many lives do I have? 16:13:56 I suck at games 16:14:46 I think I'm dead. I wasn't counting, but 9 would make sense 16:15:10 Oh 16:15:14 It says next to cat 16:15:30 Wait 'til Sgeo discovers you can JUMP IN THE WINDOWS. 16:15:38 The windows have minigames 16:15:40 I think 16:15:58 I've only been in 1 window 16:16:05 It's JUST like Mario Party. Almost. 16:16:55 :D 16:16:57 Without the party part. 16:16:58 Solo party. 16:17:00 There's a weird clicking coming from the speakers 16:17:05 Yes. 16:17:28 I mean, while it tries to play the music, I don't think it is the music 16:17:35 No, there's no "music". 16:17:45 That's patter sounds. 16:18:04 "patter sounds"? 16:18:08 Like, feet. 16:18:26 Feet that play a melody with different pitches? 16:18:53 Well. 16:19:07 Oh. 16:19:11 No, that's the music. 16:19:56 Hmm, no music during gameplay, I guess, just at game over/intro screen 16:22:25 Right. 16:27:49 -!- Ngevd has joined. 16:28:20 :t evalWriter 16:28:21 Not in scope: `evalWriter' 16:28:28 @hoogle evalWriter 16:28:28 No results found 16:29:36 Hello! 16:31:29 elliott: am I actually gaining anything by defining this Storable instance and converting square data to Word16. Wouldn't it already kind of work that way internally? 16:31:48 oh, no, it would be Word32 or Word64 or whatever. :P 16:31:50 nevermind. 16:34:11 it seems to me that it's optimizing for space over time. 16:44:24 better spatial locality of the vector seems to be cancelled out by using a map... 16:46:01 What? 16:48:49 :t succ . fromEnum $ maxBound 16:48:50 Ambiguous type variable `a' in the constraints: 16:48:50 `Enum a' arising from a use of `fromEnum' at :1:7-14 16:48:50 `Bounded a' 16:50:53 here's a line from my IOCCC submission: echo '(find-file "./prog.c" t) (indent-region (point-min) (point-max)) (write-file "./emacs.c" t)' > reindent-prog.el 16:51:26 :t fromEnum 16:51:26 my submission was specifically designed to confuse reindentors, so I decided to put a few reindentors in an optional part of the Makefile, so that it could easily be tested 16:51:26 forall a. (Enum a) => a -> Int 16:51:30 ah 16:51:34 and then left it in to show the judges that I wasn't afraid of them 16:52:56 ais523: hmm, this must be some other submission to the one i saw 16:53:38 which one did you see? 16:53:48 (that's part of the Makefile, not of the C code) 16:54:28 ais523: the one with a bunch of setjmps 16:54:33 or maybe it's the same one 16:54:34 same one 16:54:47 that one was pretty 16:54:48 i think 16:54:50 > maxBound :: Just Bool 16:54:50 Not in scope: type constructor or class `Just' 16:54:51 i don't remember what it looked like 16:54:53 I consider setjmp pretty much mandatory in obfuscated C 16:54:55 > maxBound :: Maybe Bool 16:54:55 No instance for (GHC.Enum.Bounded (Data.Maybe.Maybe GHC.Bool.Bool)) 16:54:55 aris... 16:55:01 elliott: each function consists of nothing but declarations 16:55:12 which are very complicated expressions, overparenthesized 16:55:23 and indented in columns, using Lisp-style indentation for each column 16:55:39 is there any reason why writing an instance for (Bounded a) => Maybe a is a bad idea? 16:55:40 ais523: can i see it :( i lost my copy :( 16:55:53 er 16:55:54 kallisti: is minBound (Just minBound) or Nothing 16:56:01 well, we're past the deadline now, so I can paste it somewhere and PM people the link 16:56:01 Nothing, I would say. 16:56:08 though I realize that's arbitrary. 16:56:10 well I guess that's consistent with Maybe's Ord instance 16:56:15 yes. 16:56:21 also Enum 16:56:23 ais523: you realise that there's no rule against sharing them in the first place, right? 16:56:26 I think it has an enum... 16:56:26 at least Gregor didn't find one 16:56:30 elliott: right, indeed 16:56:34 just it has to be your own work 16:56:35 > toEnum 0 :: Maybe True 16:56:35 Not in scope: type constructor or class `True' 16:56:39 > toEnum 0 :: Maybe Bool 16:56:40 lol 16:56:40 No instance for (GHC.Enum.Enum (Data.Maybe.Maybe GHC.Bool.Bool)) 16:56:40 arising... 16:56:42 oh neverminde 16:56:46 I'm just a little overprotective of it 16:56:48 They even allow team submissions. 16:56:57 Publicly sharing is probably not wise though. 16:57:01 Gregor: I think that's a change 16:57:32 int r,u,y, getchar(), putchar(), b(); 16:59:53 ais523: Now if only you could do int r, u, y, main() { ... }; 16:59:54 :) 17:00:17 is that legal? it'd be awesome if it were 17:00:23 'snot. 17:00:39 incidentally, the reason I did getchar and putchar like that rather than including stdio.h is so that I could give them the wrong number of arguments 17:01:06 Which is ... so useful ... for getchar and putchar ... ? 17:02:02 the extra arguments don't do anything but make the code look nicer 17:02:04 :t fromEnum 17:02:05 forall a. (Enum a) => a -> Int 17:02:08 and it's a free obfuscation 17:02:22 (a () out of context in the wrong column makes people realise the code isn't meant to be read in columns) 17:04:02 Gregor: where's your submission, btw? I'm interested in seeing it now the deadline's passed 17:04:02 @hoogle asTypeOf 17:04:02 Prelude asTypeOf :: a -> a -> a 17:04:18 ais523: I'll PM 17:06:39 what's an example of a type that is Bounded but not Enum. 17:07:11 kallisti, real numbers between -1 and 1? 17:07:23 oh, yes I suppose that counts. 17:07:36 but then what would that look like in Haskell 17:09:31 Float and Double are Enum but shouldn't be. 17:09:43 But they're bounded. 17:09:46 Since IEEE has -inf and +inf. 17:09:57 -!- sebbu3 has changed nick to sebbu. 17:10:05 ah yes 17:10:39 kallisti: More generally, you can make any type bounded like 17:10:52 data WithBounds a = MinBound | Middle a | MaxBound 17:10:57 but can't necessarily give it an Enum instance. 17:11:12 (You need `Ord a` for the Boudned instance to mean much, though.) 17:11:34 that's an interesting type. 17:11:52 It's the "free Bounded". :p 17:12:19 * kallisti isn't sure why he didn't generalize his gross Enum code earlier... 17:12:51 elliott, I was thinking, something like that makes more sense than your WithNegInfinity and WithPosInfinity, I think 17:13:14 It's not nonsensical for a lower bound to be positive infinity 17:13:29 Sgeo: My types were like that for a reason. 17:13:50 Namely, WithBounds didn't make sense for the usecase in question. 17:16:00 you know what? less needs syntax highlighting 17:16:09 I know you could just use an editor, but good editors aren't necessarily good viewers 17:17:30 http://stackoverflow.com/questions/8850299/catching-errors-during-string-parsing 17:17:32 http://stackoverflow.com/questions/8853896/throwing-exceptions-in-haskell-and-xderivedatatypeable 17:17:32 http://stackoverflow.com/questions/8854471/io-string-and-io-data-type 17:17:35 this guy 17:17:37 sigh 17:17:44 ais523: highlight foo | less -R 17:17:57 ooh, interesting 17:18:21 Where highlight = e.g. code2color 17:18:29 there's an actual command highlight, it seems 17:18:33 I'm not sure what engine it's based on 17:18:40 lesspipe also has some kind of support 17:18:41 Deewiant: I think there's a program that does that actually called "highlight", which is why I said "highlight". 17:18:51 elliott: right, and I found it in the repos 17:18:52 * ais523 installs it 17:18:53 elliott: It sounded generic so I wasn't sure. :-P 17:18:59 ais523: I think more also does syntax highlighting, but who the fuck uses more. 17:19:03 Er. 17:19:03 most. 17:19:05 Not more. 17:19:07 heh 17:19:22 I hope highlight's a no-op on stuff it doesn't understand 17:19:26 in that case, I could just add it into l 17:19:32 into l 17:19:39 l is my ls-or-less program 17:19:46 that runs ls or less depending on whether you give it a directory or a file 17:20:00 aww, highlight doesn't do INTERCAL 17:20:19 ais523: you realise less has preprocessor support built in, right? 17:20:27 yes 17:20:28 LESSOPEN 17:20:30 or w/e 17:20:42 it's more annoying than anything else, as it tries to interpret .doc as Word files rather than text files 17:20:42 ais523: be careful about -R, though; you won't want to do that on binary files 17:20:43 and errors out 17:20:47 also, err, what? 17:20:52 we're not talking about the same thing 17:20:56 elliott: less foo.doc 17:21:02 gives an error message "no catdoc available" 17:21:19 INPUT PREPROCESSOR 17:21:19 You may define an "input preprocessor" for less. Before less opens a file, it first gives your input preprocessor a chance to modify the way the contents 17:21:19 of the file are displayed. An input preprocessor is simply an executable program (or shell script), which writes the contents of the file to a different 17:21:19 file, called the replacement file. The contents of the replacement file are then displayed in place of the contents of the original file. However, it will 17:21:21 appear to the user as if the original file is opened; that is, less will display the original filename as the name of the current file. 17:21:24 An input preprocessor receives one command line argument, the original filename, as entered by the user. It should create the replacement file, and when 17:21:27 finished, print the name of the replacement file to its standard output. If the input preprocessor does not output a replacement filename, less uses the 17:21:30 original file, as normal. The input preprocessor is not called when viewing standard input. To set up an input preprocessor, set the LESSOPEN environment 17:21:33 variable to a command line which will invoke your input preprocessor. This command line should include one occurrence of the string "%s", which will be 17:21:36 replaced by the filename when the input preprocessor command is invoked. 17:21:38 etc. 17:21:44 elliott: yes, I believe it's lessopen that's responsible 17:21:54 I doubt it, since it just executes a script you pass it... 17:22:00 s/pass it/specify/ 17:22:05 $ echo $LESSOPEN 17:22:07 | /usr/bin/lesspipe %s 17:22:29 ais523: OK, so since lesspipe does something wrong, you're saying LESSOPEN is to blame? 17:22:40 and indeed, /bin/lesspipe (=/usr/bin/lesspipe) complains on 104 17:22:48 elliott: I'm saying the default value of $LESSOPEN is to blame 17:22:53 how is that relevant? 17:22:53 because it's set to lesspipe 17:23:03 I was telling you you didn't need a wrapper script to accomplish what you want 17:23:06 sheesh 17:23:13 LESSOPEN="|highlight -qOxterm256 --force %s" seems to work. elliott: Thanks for the pointer to highlight, it seems to be an improvement over code2color. 17:23:18 elliott: well, I either need to wrap less, or lesspipe 17:23:36 ais523: wtf? 17:23:40 ais523: just do what Deewiant said 17:23:48 nobody forces you to pue lesspipe in that variable 17:23:50 *put 17:23:55 Deewiant: np 17:23:59 elliott: well, it processes gzip files 17:24:04 which is a useful thing for it to do 17:24:25 LESSOPEN="| /usr/bin/lesspipe %s | highlight -qOxterm256 --force" 17:24:26 Deewiant: highlight (via the libhighlight-perl bindings) is what p.zem.fi uses. 17:24:32 hi 17:24:50 ais523: you're complaining "I don't want to use LESSOPEN to accomplish this because of " 17:25:16 fizzie: I don't recall seeing anything syntax highlighted on p.zem.fi. Which may just be due to the fact that I hardly ever see links to p.zem.fi, for obvious reasons. :-P 17:25:32 Deewiant: Is the obvious reason that Finns are blind to each other's words? 17:25:57 Deewiant: It's syntax-highlighted if you add a ".foo" to it, I've sometimes pasted a link to the highlighted version. 17:25:59 The reason is that fizzie is the only one I know of who has write access to it. 17:26:45 Deewiant: http://p.zem.fi/w3mimgdisplay.c 17:27:28 fizzie: You should use a content-disposition header on that .bin to set the filename correctly. 17:27:37 I note that http://p.zem.fi/w3mimgdisplay.x is ASCII but served as application/xhtml+xml 17:28:08 -!- itidus21 has joined. 17:28:21 http://p.zem.fi/w3mimgdisplay.sybase 17:28:26 Deewiant: Yes, I sort of forgot to handle errors there. 17:29:03 This committee is not addressing lazy programmers. 17:29:09 :D 17:29:23 fizzie: " 17:29:23 XXX = unsupported language: x" 17:29:26 Looks like error handling to me! 17:29:33 Well, for some values of "handling", maybe. 17:29:54 s/"\n/"/ 17:30:04 Oops, now fizzie's line is squashed into mine. :/ 17:33:00 > let _ = 2 in _ 17:33:01 Pattern syntax in expression context: _ 17:33:07 mmk 17:34:48 "Thinking in typeclasses is IMO the best thing to do: it's really the most Haskellish." 17:34:56 wat 17:34:56 Starting to become convinced that everyone but me is just crazy. 17:37:27 ais523: btw, shouldn't it run less or ls | less, for consistency? 17:46:11 Deewiant: 'highlight' doesn't seem to do "pass through unrecognized data" all that well. I gave it a four-megabyte binary file and it just outputs the bytes 00000000 1b 5b 33 38 3b 35 3b 30 6d 1b 5b 6d 0a |.[38;5;0m.[m.| with --force. 17:47:30 Meh, evidently so. 17:47:39 $ highlight -qOxterm256 --force /bin/ls 17:47:39 highlight: Undefined language definition. Use --syntax option. 17:47:39 zsh: segmentation fault highlight -qOxterm256 --force /bin/ls 17:48:04 Personally I think it should just exec cat or something when it doesn't have a clue based on the file extension. 17:48:13 That's what I thought --force would do. 17:48:32 (With -q.) 17:48:33 "less /bin/ls" outputs "^?ELF^B^A^A" in blue now. 17:49:54 yay! http://stackoverflow.com/users/1097181/ehird 17:50:12 Deewiant: Couldn't you just use || cat %s? 17:50:17 Assuming you can silence errors. 17:50:38 I told it to be quiet and it still said "Undefined language definition" (and segfaulted). 17:51:28 I'm assuming sharing applies to typeclass constants right? 17:51:30 Evidently it says that whenever the file has no extension. 17:51:36 it would be silly to calculate minBound for a type multiple times. 17:52:10 Deewiant: You might want to report a bug. :p 17:52:15 Anyway, 2>/dev/null and so on. 17:54:27 elliott: You're reputation is apostrophical. 17:54:32 http://sprunge.us/ELCM some code to generate Enum instances for 2-operand product types. feedback welcome. 17:54:41 Well, -q is just "supress progress info in batch mode" [sic], so maybe 2>/dev/null is the canonical solution. 17:55:28 http://en.wikipedia.org/wiki/Talk:Stack_Overflow#Partisanship_section_recuringly_censored_by_MICROSOFT_vendors 17:55:29 http://en.wikipedia.org/wiki/Talk:Stack_Overflow#Criticism_.28October_2011.29 17:55:36 TIL people on [[Talk:Stack Overflow]] are insane. 17:55:36 Deewiant: It does quiet the "unknown extension" message, though. 17:55:59 * elliott yells "MICROSOFT" every time it says "MICROSOFT". 17:56:15 "but that discussing a (much faster) Free Web server using full ANSI_C scripts is "obvious advertising" (citation missing after the user account and all its posts have been censored)." 17:56:19 this is amazing :D 17:56:30 fizzie: Yes, that it does. In fact it seems a bit random about what it quiets and what it doesn't, based on a cursory reading of https://syntaxhighlight.svn.sourceforge.net/svnroot/syntaxhighlight/highlight/src/cli/main.cpp 17:56:46 Hmm, it's by the vendors of this thing, which I have seen before: http://g-wan.com/ 17:57:12 the only thing I can't generalize very well is the enum instance for PieceInfo, because it's essentially all special cases... 17:57:27 elliott: You'd better be a bit careful in gaining reputation, because once you clear the 50k mark you turn into MICROSOFT C# developper [sic] and a C# book author. 17:57:34 "G-WAN (~100 KB) makes it a breeze by transparently parallelizing legacy procedural code." 17:57:36 I'm sure it does. 17:57:44 Also I like how you can't select text on that site. 17:57:49 fizzie: Does that mean I get money? 17:58:06 It doesn't say. 17:58:13 It sounds like money! 17:58:18 More money than Haskell, anyway. 17:58:38 "G-WAN makes C/C++ libraries fly: 17:58:38 Developping C# though... are you sure it's worth it? 17:58:41 #pragma link "sqlite3"" 17:58:48 FLIGHT. 17:58:59 fizzie: Well, I must be pretty good at it, if I've written books about it. 17:59:06 Actually I suppose that doesn't hold for an awful lot of tech books out there. 17:59:40 "so NO REFERENCE IS AVAILABLE BECAUSE OF STACKOVERFLOW CENSORSHIP." 17:59:43 That's remarkably convenient. 18:00:11 elliott: You'll also start to make blattant lies. 18:00:21 "who claimed during a conflict that he is a RUBY developer while in fact he works as a C# developer." 18:00:27 fizzie: I might even start programming in more than one language! 18:00:38 "The fact that you are FAKING to be willing to investigate this issue is raising the question of the neutrality of Wikipedia moderators.." 18:00:42 The conspiracy, it's spreading. 18:01:01 They're all MSFTies too. 18:01:07 Once you get past 50k edits... 18:01:27 "You are "only an Ordinary user" -of course. With a Wikipedia "User" page and the ability to lock-up (sorry, "Protect") a page against a properly documented MICROSOFT-BIAS" 18:01:27 :D 18:01:32 This just keeps getting better. 18:01:43 You "Ordinary users" with your Wikipedia "User" pages. 18:02:13 I think he's drinking the Microsoft Kool-Aid. (Is that what you say?) 18:02:24 I don't know about idioms. 18:02:37 And your bias in adding the notice is evident from the fact that you've added the "Criticism" the moment you were suspended from Super User. SathyaBhat (talk) 14:55, 24 October 2011 (UTC) 18:02:38 As you list yourself as a StackOverflow moderator on your profile, I hardly consider you an unbiased source. [...] 18:02:38 I'm not a Stack Overflow moderator. SathyaBhat (talk) 15:18, 24 October 2011 (UTC) 18:02:46 SECRET STACK OVERFLOW MODERATOR. 18:04:27 What's this "Super User" thing? 18:04:37 > toEnum 256 :: Word8 18:04:38 *Exception: Enum.toEnum{Word8}: tag (256) is outside of bounds (0,255) 18:04:38 fizzie: It's the Third Site in the Stack Overflow Trilogy. 18:04:45 What's the second? 18:04:46 fizzie: I swear this terminology is not made up. 18:04:50 Deewiant: Server Fault. 18:04:58 Server Fault is sysadmin stuff; Super User is general "computery" stuff. 18:05:13 Oh, I thought Super User was the sysadmin one. 18:05:20 Okay then. 18:05:51 I wonder if there's a way to automatically determine the minimal WordN type needed to represent maxBound of a type. 18:05:53 fizzie: Help! Microsoft just hired me! http://en.wikipedia.org/w/index.php?title=Stack_Overflow&diff=471179936&oldid=469906030 18:06:08 kallisti: Represent howso? 18:06:11 Bounded doesn't imply integral. 18:06:14 well yes. 18:06:42 kallisti: So I don't see how it makes sense. 18:06:48 hmmm... 18:06:56 for a Bounded Enum 18:07:00 how about that? 18:07:16 kallisti: Well, Enum only offers ->Int conversion. 18:07:21 So it fits into an Int. 18:07:25 Apart from wrong instances. 18:07:30 @src Integer fromEnum 18:07:31 Source not found. I can't hear you -- I'm using the scrambler. 18:07:34 Wrong instances like that. 18:07:40 (Fuck the Prelude.) 18:07:57 right but you could convert it to a smaller integer type right? 18:08:12 ais523: btw, shouldn't it run less or ls | less, for consistency? <-- it's not about consistency, it's about convenience 18:08:13 how would you determine the minimum at compile time. 18:08:45 or is that generally an impossible thing to do because it requires runtime information (namely fromEnum (maxBound)) 18:08:51 kallisti: At compile-time? You can't, maxBounded isn't accessible at compile time; types can't depend on values, because Haskell is not Agda. 18:08:52 elliott: Hackage/Prelude "fromEnum :: a -> Int: Convert to an Int. It is implementation-dependent what fromEnum returns when applied to a value that is too large to fit in an Int." See, it can be bigger too, it just doesn't work then. 18:09:00 fizzie: IT'S IMMORAL. 18:09:14 It's in YOUR oral. 18:09:27 I don't know what that meant. 18:09:36 This channel is rated PG, man. 18:10:11 hmm, what's responsible for printing "Segmentation fault" on a segfault? the kernel, sending to the process's stderr? to its controlling terminal? 18:11:16 bash 18:11:17 ais523: waitpid() and company return an exit status, from which the parent process (the shell) can determine that the child exited due to a segfault. Right? 18:11:17 i think 18:11:27 I'd strongly suspect the shell, but I've never thought about it. 18:11:31 It'd sound the logical place. 18:11:31 I feel as though this Enum generator thing is probably something that someone has already done somewhere. 18:11:47 :D there's a "bloomier filter" 18:12:06 Given that zsh says "zsh: segmentation fault" it'd be very unexpected if it weren't the shell. :-P 18:12:24 do modules implicitly export typeclass instances that they import? 18:12:36 oh wait irrelevant 18:13:22 kallisti: There is no control over importing/exporting instances. 18:13:26 Instances just permeate the natural vacuum. 18:13:30 ah good 18:13:32 If they can get to your code, they will. 18:13:36 that's what I thought 18:13:41 (That's required by the open world assumption.) 18:13:42 but wasn't sure. 18:14:08 (See my answer to http://stackoverflow.com/questions/8728596/explicitly-import-instances.) 18:14:45 maxBoundProd looks lonely without a minBoundProd. but in most cases it would just be toEnum 0 18:15:09 but it could NOT be that... I guess. 18:15:09 elliott: Please leave a space after URLs so that hyperlinkifiers get it right; thanks. 18:15:45 Deewiant: Your hyperlinkifier is seriously broken if it includes final dots. 18:15:57 Also, is incredibly ugly. :( 18:16:01 elliott: It includes the dot and the period. 18:16:09 And that's a completely valid resulting URL. 18:16:14 Deewiant: There's a difference between a dot and a period? 18:16:17 Erm. 18:16:21 The dot and the bracket. 18:16:42 And yes, it is, but hyperlinkifiers have to extract URLs from language; there's a trade-off to be made where you must reject some valid URLs to be useful in the majority case. 18:16:55 I suppose I could half-heartedly make an effort to enclose them in cases of ambiguity? 18:17:02 (See my answer to .) 18:17:04 does that work? 18:17:06 s/^d/D/ 18:17:10 Yeah, that seems to work. 18:17:54 I'd rather have an inclusive linkifier and tell people to be machine-helpful when they paste URLs; it's easier to backspace characters off the end than add missing stuff, too. :-P 18:18:12 Deewiant: Also: 18:18:14 [htkallas@pc112 ~]$ echo "./segfault" | bash 18:18:14 bash: line 1: 24141 Segmentation fault ./segfault 18:18:14 [htkallas@pc112 ~]$ echo "./segfault" | env LC_ALL=fi_FI.UTF-8 bash 18:18:14 bash: rivi 1: 24144 Muistialueen ylitys ./segfault 18:18:30 (For some reason it won't obey LC_ALL if I give it -c "./segfault" instead.) 18:18:47 Heh. 18:18:56 fizzie: Probably it bubbles the signal up. 18:19:04 Because -c is generally for non-interactive use. 18:20:52 ha ha ha monomorphism restriction you're funny. 18:21:34 elliott: It looks as if it execve's ./segfault without forking if I do a simple-command -c like that. 18:22:12 [htkallas@pc112 ~]$ LC_ALL=fi_FI.UTF-8 bash -c "./segfault" 18:22:12 Segmentation fault 18:22:12 [htkallas@pc112 ~]$ LC_ALL=fi_FI.UTF-8 bash -c "./segfault > /dev/null" 18:22:12 bash: rivi 1: 24200 Muistialueen ylitys ./segfault > /dev/null 18:22:21 I guess it makes sense, even if it's not quite what I'd expect. 18:22:24 File a bug report about that changing behaviour. 18:22:45 At least it won't leave all those useless 'bash' processes around when people do "sh -c ..." from wherever. 18:23:04 fizzie: Yes, file a bug. It will, at least, be amusing to see the laughter. 18:24:11 * kallisti notes that while the SO user from before was not allowed to use eVal as a variable name, it is perfectly acceptable for kallisti to do so. 18:24:18 I don't know, then I'd have to dig around the documentation first to see if it's mentioned somewhere. 18:24:30 fizzie: That's what maintainers are there for! 18:24:36 To do that for you and yell at you about it. 18:27:17 is eVal hungarian notation? 18:30:56 no... 18:31:00 well, maybe 18:31:02 it is a value 18:31:03 >_> 18:31:12 According to one list, "e" is a prefix for enums. 18:31:35 it stands for "enum value" which is a shitty way of saying "the integer returned by the value in this expression that had an Enum instance and not the one that had both Enum and Bounded" 18:31:43 I'll let you determine which is shittier. 18:32:58 foo 18:32:59 :: (GArrow g (**3) u, 18:32:59 GArrowDrop g (**2) b, 18:32:59 GArrowCopy g (**) u1, 18:32:59 GArrowCopy g (**2) b, 18:32:59 GArrowSum g (**1) ((**2) a1 (Mu (Foo a1))), 18:33:01 GArrowLoop g (**) u1) => 18:33:03 g a (Mu (Foo a1)) 18:33:05 Well this is going to be painful. 18:33:20 So much type! 18:33:29 Also so full of stars. 18:33:40 The best part is that those (**2) things aren't actually valid syntax. 18:33:47 It just appends numbers without thinking, to operators. 18:34:13 Is there some sort of GHC extension to make that work, or was this just written by a blithering idiot? 18:34:37 pikhq_: "This" was written by the blithering idiot known as GHCi. 18:35:46 Ah, classy. 18:38:28 *Main> putStrLn . runHask $ foo 18:38:28 \a -> let (b,c) = (((((\a -> (a,a)) . (Mu)) . (Foo)) . (\x -> case x of { Left y -> Left ((\_ -> ()) y); Right y -> Right y })) . (Right)) (a,c) in b 18:38:29 Yay! 18:39:09 :t toInteger 18:39:10 forall a. (Integral a) => a -> Integer 18:39:23 Phantom_Hoover: Behold. 18:39:52 > fromEnum . succ . toInteger $ (maxBound :: Int) 18:39:53 -9223372036854775808 18:39:55 lolwat 18:40:16 > succ (maxBound :: Int) 18:40:17 *Exception: Prelude.Enum.succ{Int}: tried to take `succ' of maxBound 18:40:21 > 1 + (maxBound :: Int) 18:40:22 -9223372036854775808 18:40:25 kallisti: I simplified it for you. 18:40:33 well... yes. 18:40:53 negative enum indexes seem... bad. 18:41:13 kallisti: Not really? 18:41:20 enum foo { MAGIC_BLAH = ~0 } 18:41:22 *}; 18:42:09 -!- Vorpal has quit (Ping timeout: 240 seconds). 18:42:16 Phantom_Hoover: I SAID BEHOLD. 18:42:20 well I guess now that I've rewritten numOf to not assume that minBound is 0, it's less of a problem. 18:42:46 still it makes the assumption that it's a contiguous interval (i.e. the enum doesn't only use even numbers or powers of two etc) 18:48:30 -!- pikhq has joined. 18:48:34 -!- pikhq_ has quit (Ping timeout: 252 seconds). 18:51:00 elliott: also are you sure that "they're used in C" is a good defense? 18:53:22 kallisti: That's what Enum is for. 18:53:24 An enumeration of values. 19:00:15 Hello! 19:01:15 hi 19:17:44 -!- ais523 has quit (Remote host closed the connection). 19:20:56 -!- MDude has joined. 19:49:59 -!- ais523 has joined. 20:03:05 -!- pikhq_ has joined. 20:03:23 -!- pikhq has quit (Ping timeout: 268 seconds). 20:04:15 what is the topological structure of the universe? 20:04:25 er rather 20:04:26 space 20:04:32 in the universe 20:05:00 I read it was some sort of mobiusy dodecahedron or something somewhere 20:05:03 Also... 20:05:06 -!- Ngevd has quit (Quit: ice cream). 20:05:23 dodecahedron wat 20:06:13 kallisti: http://en.wikipedia.org/wiki/Shape_of_the_Universe 20:06:23 kallisti: flat 20:06:45 No. 20:06:56 Phantom_Hoover: No? "The Wilkinson Microwave Anisotropy Probe (WMAP) has confirmed that the universe is flat with only a 0.5% margin of error.[1] Within the Friedmann-Lemaître-Robertson-Walker (FLRW) model, the presently most popular shape of the Universe found to fit observational data according to cosmologists is the infinite flat model,[2]" 20:07:51 a) flat isn't a topological thing, it's a differential geometric thing; b) the Poincaré dodecahedron is homeomorphic to the 3-sphere, which isn't flat. 20:08:51 a) is kind of splitting hairs, admittedly, and b) was due to a misunderstanding 20:09:09 Phantom_Hoover: (a) Well, I was being liberal with my interpretation of kallisti; he tends to yell at me when I'm not. (b) Yeah, but that's just one of the models. 20:10:38 elliott, no, I mean I assumed you were following on from Ngevd. 20:11:14 Ah. 20:11:49 -!- oerjan has joined. 20:11:49 so uh... which one is it? :P 20:12:23 kallisti: Which one of what? 20:12:27 It's flat. 20:12:44 "flat" isn't a topological structure is it? 20:13:00 Phantom_Hoover: Okay, I was too liberal. 20:13:04 Flat here means R^3. 20:13:14 oh. okay. 20:13:17 (With the usual topology, of course.) 20:13:52 I thought most scientists believe that the universe "wraps around" 20:13:55 Phantom_Hoover: http://upload.wikimedia.org/wikipedia/commons/1/16/World_line.svg I like how this is indistinguishable from pseudoscience. 20:14:01 kallisti: You thought wrong. 20:14:12 kallisti: Also, it's not like you could ever find out, to my understanding. 20:14:15 i.e. there is no way to reach the edge. 20:14:50 You could find out, at least through application of the Copernican principle and measurement of the large-scale curvature. 20:16:07 Well, OK, but I mean "you couldn't actually do it". 20:17:28 -!- Ngevd has joined. 20:17:31 Hello! 20:18:12 I suppose it's entirely possible for the universe to be expanding and also infinite, given that the "expanding universe" thing technically means something more like "the distance between two parts of the universe grows over time" and less "lol it's finite and expanding into nothingness" 20:18:41 -!- pikhq_ has quit (Ping timeout: 240 seconds). 20:18:41 -!- pikhq has joined. 20:21:53 hm. so enumerating an arbitrary product type is actually kind of like a mixed radix numeral system. 20:22:50 -!- zzo38 has joined. 20:23:24 if I were to extend my code to product types with 3 operands I would be adding a "digit" whose base is multiplied by a power of two. 20:27:00 kallisti: projectable product types, or patternmatchable product types? 20:27:11 I don't know the difference. "Haskell product types" :P 20:27:22 Haskell's pure, so it doesn't matter ther 20:27:22 so probably the latter/ 20:27:24 *there 20:27:26 oh. 20:28:09 http://sprunge.us/Gcbh this is the 2-operand case. you can see how it looks like a 2-digit numeral system. 20:28:14 with mixed radix. 20:28:18 I'm not going to spend 40 minutes discussing product types with someone and then not /use/ the resulting knowledge 20:28:31 lol 20:28:46 basically in fromEnumProd is where you can see the mixed radix. 20:29:38 numOf b returns the total number of elements of b's type. numOf True would return 2. 20:29:56 (it makes some assumptions about how the Enum instance is defined) 20:30:01 I suppose it's entirely possible for the universe to be expanding and also infinite, given that the "expanding universe" thing technically means something more like "the distance between two parts of the universe grows over time" and less "lol it's finite and expanding into nothingness" 20:30:16 This is precisely the current scientific consensus. 20:30:58 oh good. 20:31:00 Phantom_Hoover: Eventually we're going to need big magnets to keep everything close enough. 20:31:20 does this mean I'm actually increasing in volume? :P 20:31:48 I don't think so 20:31:49 I don't think it's possible to stop it; one of the scenarios for the end of the universe is the expansion overwhelming all binding forces and ripping every particle into its constituents. 20:31:51 kallisti, no. 20:32:13 The bonds holding you together are slightly strained by the expansion, but they aren't pulled apart. 20:32:31 that doesn't sound like an "end of the universe" but just "an end of matter as we know it" 20:33:22 * kallisti isn't sure how to write the inverse function for an n-operand product type... 20:33:31 I guess I could define an applicative? maybe 20:35:09 I need a way to take an integer and a constructor with any number of arguments and fill all of its fields with values. 20:35:41 every field needs to be Bounded and Enum, except for the last one, which can be just Enum. 20:36:21 oh wait no they all need to be Bounded I think. 20:36:37 I don't think it's possible to stop it; one of the scenarios for the end of the universe is the expansion overwhelming all binding forces and ripping every particle into its constituents. 20:36:43 Phantom_Hoover: Excuse me are you suggesting magnets will get less powerful. 20:36:48 (Also I know that you dolt.) 20:36:53 Yyyyes. 20:37:39 Phantom_Hoover: But what will ICP do? 20:40:04 Phantom_Hoover: Also couldn't you just use a really really dense powerful magnet. 20:40:11 We just need to keep creating larger magnet galaxies. 20:40:54 yes this is exactly like a mixed radix numeral system. shocking. 20:43:54 kallisti: see also instance Ix for tuples 20:47:29 it's pretty difficult to read.. 20:47:39 @src (,) index 20:47:40 Source not found. The more you drive -- the dumber you get. 20:47:41 @src (,) range 20:47:42 Source not found. There are some things that I just don't know. 20:47:42 hmph 20:47:53 wouldn't it be nice if @src actually worked. 20:47:55 http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/src/GHC-Arr.html#Ix 20:48:25 kallisti: "6.12.2" 20:48:33 whatever 20:48:57 it's not immensely likely to have changed 20:49:18 oerjan: considering that the latest docs do _not_ include ghc.arr... 20:49:28 O KAY 20:49:31 though http://www.haskell.org/ghc/docs/latest/html/libraries/base/src/GHC-Arr.html works 20:49:42 oerjan: if you keep replying to everything with O KAY it'll become annoying :P 20:49:51 O KAY 20:49:58 cough 20:50:07 oh no, not the coughing 20:53:14 I am GOING TO READ A BOOK. 20:53:16 MADE OF PAPER 20:53:23 LOOK AT ME BEING ALL LOW TECH 20:55:42 Phantom_Hoover: Have I told you about how we don't have electricity in Hexham? 20:55:48 Linear algebra is not as boring as I'd thought. 20:55:50 Ngevd: What's the book. 20:56:03 The Girl with the Dragon Tatyoo 20:56:06 Tatyoo. 20:56:13 That was a ytpo 20:56:25 oaky 20:58:01 I also read the books made of paper, when resting in bed 20:58:17 Phantom_Hoover: What are the books made out of in Edinburgh? 20:58:25 This book is set in Sweden. 20:58:36 Raw abstraction. 20:58:47 I understand there is at least one person who lives in Sweden who frequents this channel 20:58:58 Ngevd: Yes, and he's terrible. 20:59:11 Ooh, maybe he's the killer! 20:59:22 Ngevd: it's originally in swedish, yes 20:59:24 Dammit, elliott, you've ruined the ending for me! 20:59:43 oerjan: Just like you. 21:00:20 elliott: jag fattar inte vad du pratar om 21:00:29 zzo38: in that chess server program you were talking about a long time ago, does the server randomly select who's black and white? 21:01:08 oerjan: "You're fat, also bad; do you pratar om?" 21:01:24 kallisti: Free Internet Chess Server? I do not remember now, but I think there is an option to do that but it does not always do that 21:01:43 elliott: hey i cannot disagree with you making a translation that insults you 21:01:47 zzo38: the way I see it working is you choose a preference. 21:01:53 either white, black, or no preference 21:01:55 or 21:02:03 if there's a ranking system, then unfavored players are given white. 21:02:06 kallisti: That does make sense is one way 21:02:16 or some mix of the two. 21:02:20 I think, choose the preference. 21:02:37 -!- monqy has joined. 21:02:48 yes. a ranking gsystem implies a) an actual userbase b) a consistent set of rules 21:02:51 of which I have neither. 21:03:09 now if there were a tournament, with a consistent set of rules between each game, then a ranking system would be reasonable. 21:03:11 Possibly in case both player preference, players with lower ranking preference override, but in general you match up such that preferences agree instead of conflict so you do not have to use the rankings 21:03:32 yes that sounds good. 21:05:42 so the preference should be indicated as part of the standard "greeting" between a client and server. 21:06:27 Is 2.4 million kronor a lot? 21:07:01 Phantom_Hoover: So wait, is everything in Edinburgh made out of raw abstraction? 21:07:06 "Do you want to play [f]irst, [s]econd, or [n]o preference?" 21:07:15 elliott, yes. 21:07:23 Phantom_Hoover: What about the sandstone? 21:07:25 How else do you think a Phantom_Hoover such as myself could live there. 21:07:36 elliott, raw abstraction and sandstone. 21:07:54 Phantom_Hoover: Ah. 21:08:07 Phantom_Hoover: I forget, are you a hoover that hoovs phantoms or a hoover that is a phantom? 21:08:08 Sandstone is a very good abstract building material. 21:08:13 I always forget. 21:08:19 A hoover that is phantom. 21:08:27 zzo38: I don't really know if I intend to set it up that way. perhaps. 21:08:37 I'm a Taneb who is a Ngevd who is about to leave 21:08:38 -!- Ngevd has quit (Quit: Goodbye). 21:08:45 Phantom_Hoover: I really hope you one day use the name Phantom Hoover in an official capacity and get sued by the Hoover company. 21:08:49 kallisti, elliott Phantom_Hoover darnnit Ngevd left update 21:08:53 Who else? 21:08:55 Phantom_Hoover: Wait why don't you change your name to Phantom Hoover, it's way more pronouncable. 21:09:08 zzo38: I do want it to be text-based in a way that allows you to connect through telnet. or a simple text-based client that memorizes settings for you, so that you can automate any kind of client-server greeting 21:09:20 Sgeo: You LIED to me. 21:09:30 elliott, what? 21:09:50 monqy 21:10:01 zzo38: so there would be a prefer command. if you don't send a prefer command then it defaults to no preference. 21:10:06 -!- ais523 has quit (Write error: Connection reset by peer). 21:10:06 elliott, my name was Phantom_Hoover until IRC ruined it. 21:10:06 cf. the wiki. 21:10:13 hi 21:10:17 zzo38: other settings would work similarly. for example, there are a number of rule preferences you can make. 21:10:29 -!- ais523_ has joined. 21:10:33 -!- ais523 has joined. 21:10:33 -!- ais523 has quit (Write error: Broken pipe). 21:10:38 -!- ais523_ has changed nick to ais523. 21:11:16 Phantom_Hoover, I don't think monqy wants to be on my list? 21:11:18 I may be wrong 21:11:27 I should make a macro or something 21:11:41 Sgeo, i want him to suffer 21:11:50 elliott, my name was Phantom_Hoover until IRC ruined it. 21:11:53 Phantom_Hoover: I meant your IRL name? 21:12:06 Sgeo: There was no update. 21:12:15 Because everyone would give me funny looks. 21:12:17 elliott, there was. 21:12:28 elliott, yes there was, unless you checked like two seconds before I announced and read it already 21:12:36 Oh, there it is. 21:12:44 Phantom_Hoover: Dude, you're called Ahamhmahnahmnhahhnahanin McCuil. 21:12:50 Phantom_Hoover: Your funny lookage would *decrease*. 21:13:06 elliott, I don't actually recall saying you could disclose that in the channel. 21:13:38 Phantom_Hoover: (a) I spelled it terribly (b) Dude it was originally in the channel. 21:13:54 It's also been in the channel multiple times since originally being in the channel? 21:14:21 I still don't recall saying that. 21:14:43 2011-04-15.txt:08:55:14: -!- Phantom_Hoover is now known as A_McCuil. 21:14:56 Humm. 21:15:08 First occurrence of "McCuil" (case insensitive) 2010 onwards. 21:16:22 Phantom_Hoover: Other reasons to change your name to Phantom Hoover: You'll no longer be named after a crappy search engine. 21:16:36 Cuil was not crappy. 21:17:00 Phantom_Hoover: OK, *innovative search engine 21:17:10 elliott: I see that you bothered. 21:17:13 Innovative in areas such as, for example, not returning relevant results. 21:17:24 shachaf: I was running close to the cap and wanted accept rep. 21:17:33 shachaf: :( 21:17:34 elliott: the innovation has been around since long before. 21:17:35 It did, however, produce extremely entertaining results. 21:17:37 *that 21:17:39 -!- Ngevd has joined. 21:17:42 Hello! 21:18:01 It didn't get you where you meant to go, but where you secretly wanted to go, and is that not the greater journey. 21:18:06 * oerjan recalls cuils are very abstract 21:18:14 Phantom_Hoover: FWIW I'm happy not to mention the string that is approximately 100x too ridiculous to be your name in-channel if you don't want me to. 21:18:18 Ngevd: How quickly did you read. 21:18:21 Ngevd: 2.4 million Swedish kronor = 223 598.928 British pounds 21:18:26 Not quickly enough 21:18:29 Phantom_Hoover: Also, slapping B-coloured paint on A, etc. 21:18:36 oerjan, hmm... I could do with that amount of money 21:19:06 > let (a, a) = (2,2) in a 21:19:06 Conflicting definitions for `a' 21:19:06 Bound at: :1:5 21:19:07 this should be a thing. 21:19:27 * shachaf should create fake SO questions that steadily grow more and more annoying. 21:19:30 kallisti: gb2Prolog HTH HAND 21:19:37 gb2? 21:19:39 > let (a, _) = (2, 2) in _ 21:19:41 Pattern syntax in expression context: _ 21:19:41 get back to 21:19:41 Phantom_Hoover: Go back to. 21:19:50 shachaf: That would be indistinguishable from SO. 21:20:03 elliott: I think you underestimate me. 21:20:10 Ngevd, in a, not in _ 21:20:13 elliott: I'm trying to think of a situation where such a thing would be useful. 21:20:24 The goal would be to see how long you could last before going *actually* insane. 21:20:29 but I don't think it would be too difficult to implement would it? 21:20:36 kallisti: What do you want this to do, exactly? Compare with (==)? 21:20:48 whatever case does. 21:20:58 No, you don't want structural equality. 21:21:04 What if a is a function? 21:21:27 What if a is a Set, and you have two equivalent sets that are represented using different trees? 21:21:29 > let f id = 5 in f id 21:21:30 5 21:21:33 ! 21:21:36 I... don't know. 21:21:42 What if a is a data structure that has cycles in it? 21:21:44 How... what 21:21:48 I guess Eq would work, but maybe isn't the best way? 21:21:56 > let f q = 5 in f id 21:21:56 > let f id = 5 in f (id . id) 21:21:57 5 21:21:57 5 21:22:07 > let f id = 5 in f undefined 21:22:08 5 21:22:14 kallisti: The best way is probably not to do it. 21:22:14 Oh 21:22:33 ...oh 21:22:33 :t let f id = 5 in f 21:22:34 forall t t1. (Num t1) => t -> t1 21:22:41 * Sgeo suddenly sees the obvious 21:22:46 (Before the type) 21:23:02 Before the type, all IRC users are equal. 21:23:31 > let num = (1::Int) in let f num = num in f 2 21:23:32 I am great confused waht tpye 21:23:32 2 21:24:04 I guess there's no way to make the pattern thing see variables outside the pattern, nor any meaning towards trying to do so 21:24:29 correct 21:26:18 > let f id = 5 in f id 21:26:18 5 21:26:18 ! 21:26:18 How... what 21:26:34 On this day elliott died by putting his palm on his face so hard that it went straight through. 21:27:11 elliott: hi now is the time where you have an opportunity to talk me out of using a monad transformer. 21:27:15 elliott, I managed to trick myself into thinking it was magically pattern matching on the function known as id 21:27:32 -!- oerjan has set topic: Scottish clan invades Hexham, demands apology for calling their name "ridiculous" | http://codu.org/logs/_esoteric/. 21:27:43 kallisti: You're stupid and dumb and your code sucks and I hate you. 21:27:45 Oh, *monad* transformer. 21:27:51 Uh, shachaf doesn't like them. 21:28:05 shachaf, why do you not like monad transformers. 21:28:14 They're like burrito transformers! 21:28:19 oerjan: Unfortunately they're made out of pure abstraction and thus pass right through normal matter. 21:28:27 > let f (\x -> x) = 5 in f id 21:28:27 They turn burritos into spacesuits containing toxic waste. 21:28:27 : Parse error in pattern 21:28:28 Phantom_Hoover: I don't like them either, if that means anything to you. 21:29:11 Oh dear, the Scottish clan is invading Hexham again 21:29:19 Don't forget to burn the Abbey! 21:29:30 elliott: you shouldn't underestimate their sandstone ballistas 21:29:38 well I will make use of both IO and State. I will begin coding with both monads seperate and see if I ever need them at the same time. 21:29:52 or if I can avoid doing so altogether 21:30:00 Ngevd, we will abstract burn them. 21:30:01 Sgeo: do you not understand what was happening 21:30:16 Phantom_Hoover: Yes, so they'll be abstractly burned but not concretely. 21:30:20 elliott, I don't know much about them; I'm interested in what's wrong with them? 21:30:27 Monad transformers, that is. 21:30:29 monqy, I figured it out 21:30:39 * Sgeo suddenly sees the obvious 21:30:54 Phantom_Hoover: They don't compose well. 21:31:03 id in f id = was just a variable in the pattern to be assigned to whatever the argument was 21:31:37 Phantom_Hoover: The order you apply transformers in can have often confusing changes to the semantics; also, there's no real unified "theory" or definition of monad transformers. They're just things that turn Monad instances into other Monad instances where you can lift actions of the inner Monad in. 21:31:38 > let 2 + 2 = text "~the wonders of shadowing~" in 2 + 2 21:31:39 ~the wonders of shadowing~ 21:31:50 Phantom_Hoover: That sounsd specific, but in reality it means that monad transformers can pretty much do anything. 21:31:59 elliott, no, I get what you mean. 21:32:02 When turning a monad into its transformer, there's no mechanical rule for telling where you layer on the "m"s. 21:32:28 As far as operational concerns go, they can be pretty damn slow, because every single bind you perform has to go through N layers of wrapping. 21:32:41 I mean, there's a RWST that's just ReaderT, WriterT, and StateT bundled together for performance. 21:33:01 I'm not entirely sure I understand the purpose of RWS 21:33:04 (I guess "convenience" too, but it could just be a type synonym if that was the real reason.) 21:33:12 it seems that State works well for all three of these things. 21:33:23 kallisti: Yes, and you can write all your code in IO, too. 21:33:33 Using State for all of those is great, because you can write to your read-only state! 21:33:38 And reverse your monoidal accumulator. 21:33:40 MONAD TRANSFORMERS R DUM 21:33:42 That's why. 21:33:46 * shachaf QED 21:33:56 shachaf: I think Phantom_Hoover will find your criticism tau times as convincing as mine. 21:34:03 s/sounsd/sounds/ 21:34:06 So basically, needing to learn new semantics for each monad transformer independent of the semantics of the monad? 21:34:08 s/}/ }/ way up 21:34:24 Sgeo: Well, no, what they do is usually intuitively obvious. 21:34:27 That's not saying much, though. 21:34:34 Oh, yeah, and it's really hard to "combine" monad transformer stacks. 21:34:38 You pretty much have to define one stack and stick to it. 21:34:53 You can't say "this code needs , this other code needs , and this code uses both the previous codes". 21:34:57 elliott: So at least one of our criticisms was irrational. 21:35:04 At least not without a LOT of threading stuff manually to run it all. 21:35:09 -!- Ngevd has quit (Quit: Goodbye). 21:35:10 Oh, wait, you're giving actual justifications. 21:35:11 what we need is a monad transformer zipper! 21:35:52 Phantom_Hoover: FWIW my current favourite solution to the problem of composable effects is http://math.andrej.com/2010/09/27/programming-with-effects-ii-introducing-eff/, which I especially like because there's no leap of syntax from pure code to an effect. 21:36:00 With Haskell you need to, at the very least, interleave <$> and <*> everywhere. 21:36:04 elliott: hey that's what Monad* classes are for 21:36:14 * kallisti considers what he could possibly use RWS for in his portal chess implementation. 21:36:27 writer could be used for a log.... but, do I need one of those? 21:36:30 oerjan: Yeah, and you can't define context synonyms, so all your method signatures are 10x larger! \o/ 21:36:46 oerjan: Also, if the compiler doesn't inline it away, you get to pass around a hundred typeclass dictionaries everywhere! 21:36:53 s/method signatures/definition signatures/ 21:37:06 oerjan: Oh, and you can't have two pieces of state in the same stack. 21:37:15 That's just not allowed. Everyone only needs one piece of state. 21:37:44 elliott, hmm? Surely you can if you drop the convenience of MonadState? 21:37:55 Sgeo: 21:38:00 Oh, yeah, and it's really hard to "combine" monad transformer stacks. 21:38:00 You pretty much have to define one stack and stick to it. 21:38:00 You can't say "this code needs , this other code needs , and this code uses both the previous codes". 21:38:00 At least not without a LOT of threading stuff manually to run it all. 21:38:03 elliott: hey that's what Monad* classes are for 21:38:13 Phantom_Hoover: I BET YOU'RE NOT EVEN READING THAT 21:38:33 I was reading, does that count?? 21:38:34 elliott: Phantom_Hoover thinks this was far too concrete for an abstraction 21:38:35 shachaf: You should read it too, unless you did since I told you ages ago. 21:39:14 What's with the def and nonsense? 21:39:39 Tastes like... ML? 21:39:46 I wonder if Valve will hunt me down if I make advertisement money off of portal chess. :P 21:39:56 kallisti: just name it something other than portals 21:40:00 Sgeo: Well, it's not like you can do mutually-recursive definitions any other way at a REPL. 21:40:04 elliott: Read what? "introducting eff"? 21:40:05 But yes, the authors are ML people. 21:40:13 shachaf: Yes. I told you to the last time monad transformers came up. 21:40:19 It's in my list-of-things-that-I'll-ostensibly-read-someday! 21:40:25 Isn't that enough for you, elliott? 21:40:32 elliott: I had an INTERCAL REPL idea that each line you wrote would append to a program 21:40:36 shachaf: NO READ NOW. 21:40:37 There are only about a hundred other tabs in that list! 21:40:44 shachaf: It's like 3 pages long, dude 21:40:45 and it'd rerun the program from scratch each time, discarding any output that was the same as last time 21:40:46 DUDE. 21:40:48 ais523: heh 21:40:51 that way, even COME FROM would work properly 21:41:27 elliott: Fine, I'll move it to the end of that list. 21:41:32 I always start from the end. 21:41:47 shachaf: OK, and then start now. 21:41:55 * shachaf should probably wake up now. 21:42:13 alles hat ein ende nur die wurst hat zwei 21:42:53 ais523: In an emergency situation, could you crudely fashion an antistatic wristband by crouching on a computer case? 21:43:15 elliott: depends on if the case is earthed 21:43:25 which it probably will be if it's made of metal, not painted, and plugged in 21:43:29 1 and 3 are likely, 2 may not be 21:43:32 liftCatch :: (m (a, s, w) -> (e -> m (a, s, w)) -> m (a, s, w)) -> RWST l w s m a -> (e -> RWST l w s m a) -> RWST l w s m a 21:43:35 mmmmmm 21:43:39 (the paint would make the outside not earthed, although the inside would be) 21:44:04 ais523: thanks, I'll let my supernatural vacuum cleaner friend know 21:44:10 earth tone painting 21:44:33 elliott: this is a really bizarre question, anyway 21:44:42 a good emergency antistatic wristband is water pipes, anyway 21:44:44 wow, TPB are switching to magnet links exclusively 21:44:49 they're often unpainted, and quite commonly found around houses 21:45:15 'Often'? 21:45:23 I don't think I've ever seen painted water pipe— oh wait you don't mean taps. 21:45:32 (I used a tap to assuage my paranoia.) 21:45:33 and pretty much every house has their entire water supply system earthed because it saves on money for earth wires 21:45:45 Phantom_Hoover/tap otp 21:45:49 well, on the flip side, sometimes taps are made of plastic 21:46:18 elliott, no, I'd have to be one of those hoovers that works with water (these are a thing apparently, it said so on Postman Pat once). 21:46:32 Phantom_Hoover: I think we actually own one 21:46:41 haven't used it in years, though 21:46:44 Phantom_Hoover: Reference 1. Postman Pat 21:46:58 Phantom_Hoover: my aunt has one 21:47:07 used it occasionally to wash the carpet, rather than just vacuum-clean it 21:47:25 elliott: You're missing out on #haskell 21:47:41 okay.. i solved the problem.. but it really makes me think that haskell is dead slow. when it was taking more than 20 minutes.. i thought i made a mistake somwhere.. but that doesn't seem to be the case.. after 20 minutes my code gav me the right answer..which leads me to believe that my code was correct..but haskell was dead slow.. 21:47:47 20 minutes is simply inexcusable 21:48:19 is carpi for real 21:50:14 koeien: could you please tell me why do you recommend data.set? what aspect of the problem makes you think that using data.set would make it run faster? 21:50:15 so if I use Lazy RWS, this means I can call runRWS and get things like i.e. infinite lists of output to pass to channels/sockets/filehandles etc 21:50:24 right? 21:50:58 shachaf: Did you suggest -O2? 21:51:02 Did anyone suggest -O2? 21:51:02 if I used strict RWS I would want to add IO to the stack. 21:51:05 I bet carpi is running in GHCi. 21:51:29 elliott: yes oxygen is generally helpful when problem solving. 21:51:31 ghci -O2 is the obvious answer. 21:51:38 kallisti: Don't use lazy input. 21:51:51 shachaf: Come on, you have to suggest -O2, it hurts me inside. 21:52:10 elliott: okay, so then I don't want to use lazy RWS, because I'm pretty sure I'd want lazy input. 21:52:11 elliott: Why don't you suggest it? 21:52:47 02:36:01 carpi: think of 'main' as a function that produces a list of things the runtime has to do, like write a file, read stdin etc. 21:52:47 02:36:43 carpi: the things the runtime does for you is stuff that gets "executed" 21:52:47 02:38:40 and by runtime are you referring to the part where actions are performed by systems outside haskell on behalf of haskell? 21:52:47 02:39:47 carpi: the RTS 21:52:48 02:42:57 ah okay.. i googled RTS for haskell.. seems like its an option for ghc where i can tweak the environment in which the haskell code can run. This is exciting..so it means i can make code more faster this way 21:52:58 shachaf: Because I'd join and go "HI, SHACHAF PASTD ME LOGS TO MOCK YOU, USE -O2" and no. 21:53:03 elliott: or are you saying /in general/ not to use lazy input? 21:53:11 kallisti: In general. 21:53:16 elliott: Hey, I wasn't *mocking*! I was sharing. 21:53:40 elliott: ...really? 21:53:44 kallisti: Unless you want space leaks, resource allocation problems, unpredictable performance, ... 21:53:47 * shachaf imagines it: * elliott has join #haskell USE -O2! WHY ISN'T ANYONE TALKING ABOUT -O2??? SOMEONE MENTION -O2, YOU USELESS CHANNEL! * elliott has left #haskell [RAGE] 21:53:51 ... difficult-to-debug IO problems ... 21:54:11 elliott: so you mean lazy input is a bad idea for programs that are moderately complicated. 21:54:20 but okay for simple things. 21:54:35 kallisti: No. 21:54:45 Lazy IO is "good" for the following: trivial examples. 21:54:45 Lazy input is useful only for toy hacks. 21:54:59 i.e. programs you will run less than 5 times ever. 21:55:02 I see. 21:55:10 Or, I suppose, programs that are thiny-veiled wrappers over a trivial pure function. 21:55:15 elliott: Nonsense. 21:55:25 There's also the second thing you mentioned. 21:55:34 And probably there are other justified uses for lazy I/O. 21:55:34 elliott: and here I thought lazy input was something that made Haskell awesome to use. :P 21:55:54 shachaf: Well, "interactive multi-user network server" isn't one. 21:56:21 who cares about multiple users anyway 21:56:25 kallisti: You might like enumerators or conduits or whatever, since they were designed to offer the convenience of lazy IO without the problems. 21:56:41 They don't really succeed at the convenience part, but I hear the problems they have are new and specific to their solutions. 21:57:21 elliott: I'm guessing they generalize to many different sources of IO? i.e. sockets, filehandles, concurrent channels 21:57:28 shachaf: 13:10:18 koeien: yea in ghci 21:57:30 shachaf: Told you. 21:57:41 kallisti: Yes, although in GHC sockets are Handles. 21:57:48 (Yes, there's the lower-level interface, but you almost never need to use it.) 21:57:50 oh that's right. 21:58:15 kallisti: Conduits are the hip new thing, but I have a predisposed bias against them. On the other hand, enumerator is possibly even more overcomplicated, so... 21:58:16 elliott: I'm pretty sure Haskell is just dead slow. 21:58:27 elliott: What bias? 21:58:35 Conduits are better at the resource management thing, anyway. 21:58:36 elliott: what about things like.... a simple recursive loop. 21:58:47 Deewiant: Well, I don't like them. :p 21:58:52 elliott: Why not? :-P 21:59:03 Deewiant: They use mutable references to maintain basic internal state, for one. 21:59:25 Just because their interface is basically "stateless" but, hey, they run in ST or IO, so let's just use refs! 22:00:18 Also, they seem very much "engineer-designed", in that there's no coherent underlying semantics or theory at all, there's just a bunch of types that usually have too many members and appear to be essentially "ad-hoc" OOP-ish object records where more things were added on to accomplish additional needs like resource management. 22:00:39 Which works, sure, but is bad news for something so "basic" and underlying as stream processing. 22:00:48 Also, "quotes". 22:01:00 Alright. 22:01:51 Deewiant: Anyway, not necessarily that enumerator or anything seems any more coherently designed, but at least there's good signs like functions, simple ADTs, use of closures to maintain internal state, etc. 22:02:25 elliott: a simple glance at the top-level module for both enumerator and conduit suggests that enumerator is conceptually simpler. 22:02:39 Deewiant: Mostly I think that we're close enough to coming up with a consistent and simple underpinning for iteratees that throwing everything away to start afresh right before that happens is a waste. 22:02:49 kallisti: I suspect people will begin abandoning enumerator in droves. 22:02:55 kallisti: Anyway, enumerator is painful to use in practice. 22:03:07 Largely because there's about 10 composition operators and you usually just have to guess which one you need. 22:03:32 http://hackage.haskell.org/packages/archive/conduit/0.0.3/doc/html/Data-Conduit.html#g:5 -- at least conduit's are simple. 22:03:50 there's many more types though. I don't really know where to start. 22:04:48 SourceResult is simple enough. :P 22:04:51 kallisti: 22:04:55 http://www.yesodweb.com/blog/2011/12/resourcet 22:04:55 http://www.yesodweb.com/blog/2011/12/conduits 22:05:00 http://www.yesodweb.com/blog/2011/12/conduits-sink 22:05:05 http://www.yesodweb.com/blog/2012/01/conduits-conduits 22:05:07 http://www.yesodweb.com/blog/2012/01/conduits-buffering 22:05:13 is the blog post series they were introduced in that just concluded. 22:06:03 -!- NihilistDandy has joined. 22:06:41 elliott: I'm glad to hear that the conduit's are out of the bag. 22:07:16 shachaf: conduit's [composition operators]. 22:07:24 Oh. 22:07:30 That's what I get for not reading context. 22:07:42 * shachaf should probably just leave IRC. 22:07:46 At this rate. 22:12:11 yeah internet damages your brain, you hear. 22:23:53 elliott: I sure am learning a lot about how to abstract ResourceT to non-IO monads! 22:24:28 Sorry, next time I won't link you the material presented introducing an abstraction you find confusing. 22:25:12 elliott: oh no it's useful material I'm just drudging through it waiting for the punchline. 22:25:32 (the probably three or four functions I need) 22:25:49 kallisti: If you're writing a network server, you'll probably need more than that. 22:26:06 assuming I have an actual need to scale, yes. a good assumption to make. 22:28:24 psh, you mean resourceT can only have (maxBound :: Int) registered actions!? 22:29:05 kallisti: OK. Yes, it could just be a "prefer" command, so you can connect using telnet or MUD client or whatever, and if a graphical client is used it can be a menu. 22:29:13 zzo38: yep 22:29:27 the actual syntax I'll work out later. 22:29:38 as "prefer" could be many different kinds of preferences. 22:29:45 regarding player color and rule set. 22:29:52 and possibly other unforseen options. 22:30:48 aha, I figured out what my reader data is. :P 22:31:48 -!- _Slereah has quit (Ping timeout: 255 seconds). 22:35:42 -!- _Slereah has joined. 22:36:17 -!- MDude has quit (Ping timeout: 240 seconds). 22:38:33 kallisti: Yes, you can have those kind of option too, I suppose. And then "help prefer" lists the available preferences (a graphical client can simply list all of them on a menu). 22:39:09 Such as, "prefer color black" to set the preference for playing black, and "prefer -color" to unset that preference. 22:41:42 yes something along those lines. 22:43:19 elliott: okay now that I've stubmled through the ResourceT article the actual conduit article itself is significantly less painful. 22:43:35 While "prefer" by itself should probably display the current settings. 22:45:53 kallisti: *articles 22:52:29 it appears that $= =$= and =$ have considerable variation in the ways you can equivalently piece sources/conduits/sinks together. 22:53:13 It's just (a $= b =$= c =$= d =$ e), isn't it? 22:53:19 i.e. you only use ($=) and (=$) at the end-points. 22:53:50 elliott: well, if I'm understanding correctly you could could continue to use them until the midpoints 22:53:57 Phantom_Hoover: Is lambda l or h, I forget. 22:54:15 kallisti: That's just (f . g . h $ x) vs. (f $ g $ h $ x), isn't it? 22:54:18 elliott, l. 22:54:39 elliott: yes. 22:54:43 Phantom_Hoover: thx 22:55:22 elliott: it's just a question of how you want to use the abstraction. What you want to be considered a start point, mid point, and end point. 22:56:53 I haven't learned how enumerators work to compare, but the basics of conduits are pretty intuitive. 22:58:51 shachaf: 22:58:52 The type of function is off, but without seeing it we probably can't tell why. – Xodarap 10 mins ago 22:58:52 22:58:52 22:58:52 It doesn't need a type – GoodGuyGreg 4 mins ago 22:59:05 IT DOESN'T NEED A TYPE. 22:59:08 lol 22:59:47 "It doesn't need a type" are probably, out of context, words I would never associate with Haskell. 23:01:44 so for example, the function that transforms text input into sybolic "commands" I would probably make a source. 23:02:01 s/function/thing/ 23:02:04 (????) 23:02:11 conduit-thingy 23:04:09 kallisti: Presumably you'd write a parser first. 23:04:33 I was actually going to define what the commands are first.. 23:04:39 and then do the parser afterwards 23:04:42 or well 23:04:44 -!- Patashu has joined. 23:04:45 do both kind of at the same time. 23:04:50 I meant before writing a conduit thing. 23:04:53 oh yes. 23:05:20 the first thing is to implement the "pure" chess game, playable by absolutely no one. it just sits there and exists. 23:05:36 lots of things in haskell don't have types 23:05:38 like types 23:05:39 then I'm going to add all the things that are required for the interface. 23:06:22 well, someone could play it in GHCI by feeding it a list of commands (in the form of an ADT), actually. 23:08:48 -!- FireFly has quit (Excess Flood). 23:09:23 Omegle... now lets you log in through Facebook. 23:09:57 types have a type, kind of 23:10:09 Not in Haskell, surely. 23:10:35 the whoosh is strong in this one. 23:11:07 I'm Vorpalling. 23:11:25 * kallisti Vorpals the Ngevd. 23:12:17 sorry, *with 23:14:34 * oerjan notes that you can say "kind of" or "sort of", but not really "type of" 23:15:38 well not in that idiom. 23:16:36 kmc: They don't need types. 23:16:42 Only things that need types have them in Haskell. 23:16:45 :D 23:16:47 So, not functions. 23:19:24 is Data.Conduit correct? 23:19:32 I would think... Control.Conduit is a better name 23:19:37 perhaps. 23:19:50 There's no difference. 23:20:14 well, yes. that's the bottom line. 23:20:17 Data.List; shouldn't it be Control.List, because its Applicative and Monad instances model nondeterministic computation? 23:20:24 Data.Functor but Control.Applicative? 23:20:41 Why, shouldn't Control.Applicative be Data.Applicative, considering how many containers are instances of it? 23:20:44 such a stupid distinction 23:21:00 Why are monads in Control.Monad, but if you just chop off the type parameter it ends up in Data.Monoid? 23:21:31 oh wait I've got the best module name: 23:21:32 Conduit 23:21:43 Monad 23:21:46 Applicative 23:21:53 Conduit.Monad.Applicative 23:21:59 yes exactly 23:22:55 I guess it would make sense for Data to contain actual data structures 23:22:59 and related functions 23:23:06 kmc: Anyway, we need to sharply distinguish Data and Control to distance ourselves from the Lispers. 23:23:08 with Control containing abstractions over many structures. 23:23:09 The Data/Control module names are not really always sensible 23:23:14 Since in Haskell they are the same thing 23:23:25 kallisti: So is a total trie in Data or Control? 23:23:28 (I mean, data structures and control structures are the same thing) 23:23:30 After all, it represents a function. 23:23:42 But it's pure data, no function arrows or control structures in there. 23:24:02 elliott: I don't know enough about what that is to conclude anything about it. 23:24:55 I mean 23:24:57 I know what a trie is 23:24:59 but not a total trie 23:25:20 kallisti: http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries might help. 23:25:28 I simply mean a trie that has all its elements defined. 23:25:37 i.e. representing (a -> b) rather than (a -> Maybe b) or similar. 23:25:55 ah 23:26:13 well, can such a trie be used as a control structure? 23:26:41 (I'm not entirely sure what that means) 23:26:49 kallisti: Presumably functions call under control in your categorisation scheme, since they're not "actual concrete data structures"(tm). 23:26:51 *fall 23:27:01 Also lambda is the ultimate control flow and all that. 23:27:29 So, since you have ((a -> b) -> Trie a b) and (Trie a b -> (a -> b))... 23:27:32 hmmm, I'm not really sure honestly. Sure I understand the distinction is arbitrary, but also believe it can be made, though it may be an ill-defined distinction. 23:27:40 Yet they're pure data trees. 23:27:44 I would say "control structures" in a functional language would include higher-order functions. 23:27:44 Concrete and all that. 23:27:54 Is any of the changes made to Haskell to provide built-in natural number types having inhabited natural number types? 23:28:04 * Phantom_Hoover → sleep 23:28:04 -!- Phantom_Hoover has quit (Quit: Leaving). 23:28:23 kallisti: It really isn't a meaningful distinction. 23:28:51 * elliott would merge Data and Control and call the result Structure or something like that. 23:28:55 Oh, "Form", that's nicest. 23:29:02 I would just remove that level. 23:29:03 There is no difference between data structures and control structures in Haskell (unless they are made strict) 23:29:03 >_> 23:29:11 Then move Control.Exception into System.Exception. 23:29:18 As well as Control.Concurrent to System.Concurrent. 23:29:32 kallisti: That would cause massive top-level pollution. 23:29:45 what nasty things does that entail? 23:30:03 Data and Control are already pretty hugely populated. 23:30:43 kallisti: For a start, there's a Data.Data :P 23:30:48 I would put Functor and then Functor.Applicative, Functor.Monad, and Functor.Comonad. That might do. 23:31:00 Also Data.Dynamic would become Dynamic, and that's a very overloaded word to occupy. 23:31:06 But put list stuff in Data.List 23:31:15 And that's just in base. 23:31:42 s/^(Data|Control)/Stuff/g 23:31:55 s/^(Data|Control)/Computers/g 23:32:06 s/^(Data|Control)/Power!/g 23:32:12 Power.Monad 23:32:16 sounds more exciting doesn't it? 23:32:18 * elliott sincerely likes Form the best. 23:32:35 sounds like something from martial arts... 23:32:41 -!- Phantom_Hoover has joined. 23:32:42 Data structures are about form, control structures are about form, abstractions like Functors and Monads are about form. 23:32:46 * kallisti utilizes the monad form to deliver a crushing blow to elliott. 23:32:50 What are they called in mathematics? 23:32:54 Something like concurrency or exceptions or IO or whatever isn't really about form. 23:33:03 elliott: help what is "form" 23:33:18 kallisti: Buy a dictionary. 23:34:25 * Phantom_Hoover → sleep again 23:34:25 -!- Phantom_Hoover has quit (Client Quit). 23:34:43 http://www.reddit.com/r/haskell/comments/og3lr/don_stewart_spokesman_for_senate_minority_leader/ 23:34:46 GREAT HASKELL CONTENT 23:35:10 sigh 23:35:30 great comment too 23:36:09 : - ) 23:36:10 Do you think the try/evaluate stuff is not really ideal? I could try to make a library that makes macros using Template Haskell for catching these kind of pattern errors, which seem more ideal way to me since it does not require any values (including functions) to be not mathematically correct; macros are not values so it works OK 23:36:15 -!- MDude has joined. 23:36:30 -!- MDude has quit (Client Quit). 23:38:29 -!- cswords_ has joined. 23:38:32 :: -- )) 23:38:33 mathematically correct, n. something done the way zzo likes it 23:38:42 Ssoorrrryy,, dduupplleexx sswwiittcchh oonn.. 23:38:53 oops 23:38:57 elliott: That isn't the correct definition. 23:39:02 yyoouu aarree ffoorrggiivveenn 23:40:51 -!- augur_ has joined. 23:41:00 -!- sebbu2 has joined. 23:41:00 -!- sebbu2 has quit (Changing host). 23:41:00 -!- sebbu2 has joined. 23:41:36 correct definition would make it an adjective? 23:41:52 monqy: That would be part of it. 23:47:51 -!- tswett_ has changed nick to tswett. 23:48:29 -!- sebbu has quit (*.net *.split). 23:48:30 -!- augur has quit (*.net *.split). 23:48:30 -!- cswords has quit (*.net *.split). 23:49:53 i disagree with monqy's correct 23:50:46 kmc: oh god 23:50:58 kmc: i just answered two SO questions by the poster of that functional dreamers thing 23:51:04 fml 23:51:31 functional dreamers thing? 23:53:07 monqy: http://www.jadbox.com/2012/01/functional-dreamers/ 23:53:25 oh that 23:53:29 heheheh 23:53:51 * elliott enjoys the use of "conceptualised" re: Conal since it's the closest verb he can think of to "nothingised" 23:54:26 proactivized 23:55:01 link elliott? 23:55:46 How often do you find (zip [0..]) a useful function? 23:56:35 very 23:57:10 kmc: to the questions? 23:57:22 yeah 23:57:28 Is there a single name for (zip [0..]) function? 23:57:38 http://stackoverflow.com/questions/8858422/does-tryhaskell-org-support-definitions http://stackoverflow.com/questions/8858739/the-difference-between-and-expressions 23:57:39 zzo38: zip [0..] 23:58:04 zzo38: there are single-name functions with more characters than that :P 23:58:16 elliott: That is not what I meant, though. 23:58:28 i'm fine with calling it «zip [0..]» 23:58:29 oerjan: I just wanted to know if there is any; it is not required 23:58:34 one less arbitrary name to memorize 23:58:36 but no, I don't know of one 23:58:39 python calls that "enumerate" 23:58:43 haha"closed as exact duplicate by duri, ehird, Martin Geisler, Tikhon Jelvis, Daniel Pratt 4 secs ago" 23:59:19 hilarious 23:59:22 (?) 23:59:32 :t (?) 23:59:33 Not in scope: `?' 23:59:56 the ideal language is one where you don't need name bindings at all 23:59:59 because they'd all be longer than the definition