<    March 2017    >
Su Mo Tu We Th Fr Sa  
          1  2  3  4  
 5  6  7  8  9 10 11  
12 13 14 15 16 17 18  
19 20 21 22 23 24 25  
26 27 28 29 30 31
00:00 bydo joined
00:04 acarrico joined
00:10 ali_bush joined
00:10 ali_bush joined
00:10 cschneid_ joined
00:11 <parsnip> maybe i should just use Parsec on the file?
00:14 ali_bush joined
00:14 ali_bush joined
00:14 louispan joined
00:15 aarvar joined
00:15 systemfault joined
00:21 shayan_ joined
00:25 louispan joined
00:37 drew__ joined
01:00 cschneid_ joined
01:01 jmiven joined
01:02 cschneid_ joined
01:04 louispan joined
01:05 michaelt joined
01:09 louispan joined
01:14 danny_ joined
01:19 eacameron joined
01:27 Apocalisp joined
01:31 mac10688 joined
01:35 Apocalisp joined
01:38 eacameron joined
01:50 louispan joined
01:51 MotherFlojo joined
01:57 louispan joined
01:59 cschneid_ joined
02:03 danny_ joined
02:08 Apocalisp joined
02:12 louispan joined
02:18 Gurkenglas joined
02:18 louispan joined
02:20 uglyfigurine joined
02:26 louispan joined
02:32 louispan joined
02:33 conal joined
02:34 eacameron joined
02:43 obh15 joined
02:45 acarrico joined
02:47 louispan joined
02:48 <obh15> what is this 'as' keyword used in 'Path' data construct in this http://hackage.haskell.org/package/reroute-0.4.1.0/docs/Web-Routing-Combinators.html#t:Path
02:48 <kadoban> obh15: It's not a keyword, just a name
02:50 <obh15> in a sense I can just read it as: data Path where?
02:51 <geekosaur> that is "as" as in "plural of a" (a type level list)l see the VarCons constructor
02:52 <obh15> thanks!
02:55 cschneid_ joined
03:19 mounty joined
03:24 nomotif joined
03:25 eacameron joined
03:25 hphuoc25 joined
03:27 louispan joined
03:37 howdoi joined
03:38 MotherFlojo joined
03:43 exferenceBot joined
03:45 Blacink joined
03:47 hexagoxel joined
03:52 conal joined
04:01 uglyfigurine joined
04:09 <parsnip> for a JSON-like file, is it reasonable to use parsec?
04:17 <geekosaur> if it's sufficiently JSON-like, I wouldn't want to have to reinvent e.g. aeson
04:17 <geekosaur> if it's not, though, you may have no choice. (remembering having to parse something that was not *quite* SGML once...)
04:19 conal joined
04:25 <parsnip> it's very flat and simple, so, on the one hand, it'd be like three simply regexes to make it json, or, i imagine the parsec would not be overly complicated. i kind of like the parsec idea, cuz i've read aeson to a beneficial level, and now if i read enough parsec for this, it would be beneficial.
04:33 lithie joined
04:33 hexagoxel joined
04:45 mac10688 joined
04:46 eacameron joined
04:54 arkeet joined
04:54 arkeet joined
04:56 cschneid_ joined
05:00 nepiktaz joined
05:01 louispan joined
05:03 nepiktaz joined
05:14 hphuoc25 joined
05:33 MotherFlojo joined
05:45 Apocalisp joined
05:52 eacameron joined
05:58 eacameron joined
06:12 yellowj joined
06:14 galderz joined
06:16 DataComputist joined
06:19 hexagoxel joined
06:21 Sose joined
06:28 chadrs joined
06:29 galderz joined
06:30 galderz joined
06:34 sawada5 joined
06:34 ali_bush joined
06:34 ali_bush joined
06:44 hphuoc25 joined
06:49 meandi_2 joined
06:51 Ayey_ joined
06:51 hphuoc25 joined
06:54 hexagoxel joined
06:57 ThomasLocke joined
07:01 Pupnik joined
07:03 DataComputist joined
07:03 louispan joined
07:10 owiecc joined
07:10 kritzcreek_ joined
07:28 Ayey_ joined
07:29 hexagoxel joined
07:29 dni- joined
07:36 louispan joined
07:37 ali_bush joined
07:39 t0by joined
07:40 cschneid_ joined
07:40 vaibhavsagar joined
07:49 ali_bush joined
07:49 ali_bush joined
07:50 hexagoxel joined
07:51 yaewa joined
07:56 lithie joined
08:00 fbergmann joined
08:09 ali_bush joined
08:09 ali_bush joined
08:11 mattyw joined
08:17 dennisvennink joined
08:29 wedens joined
08:38 dennisvennink joined
08:38 mojjo joined
08:43 vito_swiss joined
08:44 thc202 joined
08:58 MotherFlojo joined
09:05 NeverDie joined
09:05 zero_byte joined
09:06 hdeshev joined
09:08 merijn joined
09:10 Durz0 joined
09:34 louispan joined
09:36 qu1j0t3 joined
09:40 hexagoxel joined
09:45 takle joined
09:46 grdryn joined
09:48 AndreasK joined
09:51 Sose joined
09:51 gregman_ joined
10:02 hphuoc25 joined
10:03 arquebus joined
10:22 Glooomy joined
10:37 harfangk joined
10:45 ederign joined
10:52 pie_ joined
10:54 hphuoc25 joined
10:55 madjestic joined
10:59 MotherFlojo joined
11:00 madjestic joined
11:03 shayan_ joined
11:10 skapazzo joined
11:10 galderz joined
11:16 netheranthem joined
11:17 louispan joined
11:25 buoto joined
11:26 yellowj joined
11:28 buoto joined
11:41 buoto joined
11:42 eacameron joined
11:47 buoto joined
11:49 buoto joined
11:50 buoto joined
11:54 buoto joined
11:55 hphuoc25 joined
12:05 fhoffmeyer1 joined
12:12 madjestic joined
12:30 acarrico joined
12:37 yellowj joined
12:39 Sose joined
12:59 tipu joined
13:00 MotherFlojo joined
13:01 tipu left
13:05 TTeur joined
13:11 pie_ joined
13:17 pbrant joined
13:40 driusan joined
13:49 mizu_no_oto_work joined
13:57 uglyfigurine joined
13:59 Gurkenglas joined
14:01 vmeson joined
14:01 <driusan> is there a good place to find more informative descriptions of error messages than ghci gives you?
14:02 <merijn> driusan: Here? ;)
14:02 boxscape joined
14:04 <driusan> I'm just trying to write a FizzBuzz program to test my understanding of the syntax and I'm getting: Couldn't match expected type ‘FizzBuzzType’ with actual type ‘Int’ In the expression: x In an equation for ‘fizzbuzz’: fizzbuzz x | x `mod` 15 == 0 = FizzBuzz | x `mod` 5 == 0 = Fizz | x `mod` 3 == 0 = Buzz | otherwise = x
14:04 moei joined
14:04 <driusan> where my type is defined as data FizzBuzzType = FizzBuzz | Fizz | Buzz | Integral deriving Show
14:04 <Geekingfrog> driusan: you should use http://lpaste.net/ (or another similar solution) to conveniently share your code
14:04 <boxscape> You're returning a FizzBuzzType if it's divisible by 3 or 5, but you're returning x if it isn't
14:05 <boxscape> and x is not of type FizzBuzzType, it's of type int
14:05 <boxscape> or rather, Int
14:05 <driusan> but FizzBuzzType is a sum type that can be an Int
14:05 <geekosaur> and even if that syntax worked, "Integral" is not a type
14:05 <merijn> driusan: No
14:06 <merijn> driusan: FizzBuzzType is a sum type with 3 constructors, none of which have an argument
14:06 <merijn> Presumably you meant "data FizzBuzzType = ... | Integral Int"?
14:06 <driusan> maybe? Let me see if that works
14:07 <merijn> Then you have to change it to return "Integral x" still
14:10 <driusan> still no love: http://lpaste.net/353741
14:11 <sbrg> driusan: this may be because Integral is a typeclass.
14:11 <sbrg> You're already using it.
14:11 <boxscape> for starters, just so we don't confuse 2 concepts, I recommend changing the constructor name "Integral" in your FizzBuzzType to simply I or something, and then write "I x" as well, instead of "Integral x"
14:12 <boxscape> If you want a simple fix, you can change the type of fizzbuzz to "Int -> FizzBuzzType". If you want to keep generic, it's probably slightly more complex
14:13 <driusan> I think I started with Int -> FizzBuzzType and got a similar error
14:13 <boxscape> If you have the same code as in your lpaste and just change the type, it should work, I think
14:14 eacameron joined
14:14 <driusan> what would the otherwise block be?
14:15 <boxscape> If the name of the constructor in FizzBuzzType is still Integral, it would still be Integral x
14:16 <boxscape> Note that the "Integral" in your FizzBuzzType is different from the "Integral" in your fizzbuzz type by the way: the first one is a data constructor you made, the second one is a typeclass that already exists
14:17 <driusan> okay, I think that's where I've confused myself.. so how would I make my type be one of the Fizz/Buzz/etc types or any whole number in the type declaration??
14:17 <merijn> No, the problem is that the function takes an Integral 'a' as argument, but FizzBuzzType wants Int
14:18 <lpaste_> merijn revised “No title”: “Fixed” at http://lpaste.net/353741
14:18 <merijn> That should work
14:19 <driusan> It does
14:19 <merijn> driusan: In your code the function takes *any* type that is an instance of Integral, but to do that your FizzBuzzType has to also work with any type that's an instance of Integral (it doesn't)
14:20 <merijn> So either you fix the type of the function (like in my paste) or you change FizzBuzzType to be, e.g. "data FizzBuzzType a = FizzBuzz | Fizz | Buzz | Constant a" and make the function "fizzbuzz :: Integral a => a -> FizzBuzzType a"
14:21 <driusan> is there something special about the "Constant" keyword?
14:21 <boxscape> no
14:21 <boxscape> it can be any word
14:22 <merijn> driusan: Well, "Integral" seemed like a badname since now it can be anything, not just numbers
14:22 <merijn> i.e. "FizzBuzzType Bool" is legal
14:23 <merijn> Constant isn't a keyword
14:23 <merijn> It's just a name for a constructor
14:24 <driusan> okay, I think I'm slowly understanding
14:24 <boxscape> driusan: Have you seen constructors that take arguments before?
14:26 <driusan> I've basically read through Learn You A Haskell on my phone with no access to a haskell interpretter to work through things as I was going, and now I'm trying to see how much of it stuck
14:26 <boxscape> I see
14:27 <driusan> I figured FizzBuzz would be a good exercise that as a bonus would let me troll interviewers who expect it to be answered in a C-like language
14:28 <boxscape> :D if they allow you to use a language of your choice, yes
14:30 <nitrix> @let fizz n = if n `mod` 3 == 0 then "Fizz" else ""; buzz x = if x `mod` 5 == 0 then "Buzz" else ""
14:30 <lambdabot> Defined.
14:30 <boxscape> > fizz 4
14:30 <lambdabot> ""
14:30 <boxscape> shouldn't that be "4"?
14:31 <nitrix> @let fizzbuzz x = let result = fizz x ++ buzz x in if result == "" then show x else result
14:31 <lambdabot> Defined.
14:31 <nitrix> Very naive defintion, but it's probably better than all the `mod` 15 and shenanigans people do.
14:31 <nitrix> Just because these questions usually come with follow up questions on how to modify your implementation for X our Y cases.
14:32 <boxscape> Oh, I misread your first definition
14:33 <nitrix> Then you can cleanup a lot. e.g `null result` instead of `== ""`, pure, mempty, so forth.
14:33 <nitrix> Just to mess with them.
14:33 <nitrix> >:)
14:33 <Geekingfrog> slightly relevant: https://aphyr.com/posts/340-acing-the-technical-interview
14:33 <boxscape> @pl fizz x ++ buzz x
14:33 <lambdabot> fizz x ++ buzz x
14:33 <boxscape> @pl \x -> fizz x ++ buzz x
14:33 <lambdabot> liftM2 (++) fizz buzz
14:33 <Geekingfrog> It's clojure but it's totally in the spirit of trolling the coding interview with some less known language
14:33 <nitrix> boxscape: [fizzbuzz n | n <- [1..100]]
14:34 <nitrix> mapM_ putStrLn [fizzbuzz n | n <- [1..100]]
14:34 <boxscape> @pl fizzbuzz x = let result = fizz x ++ buzz x in if result == "" then show x else result
14:34 <lambdabot> fizzbuzz = ap (join . flip (if' . ([] ==)) . show) (liftM2 (++) fizz buzz)
14:34 <nitrix> There we go :D
14:34 <nitrix> You're hired!
14:35 <boxscape> almost self-commenting code, really
14:35 <Geekingfrog> What does @pl do ?
14:35 <driusan> @nitrix: What do the @ and semicolons in your example do?
14:35 <lambdabot> Unknown command, try @list
14:35 <boxscape> Geekingfrog: it finds a version of the code you provide it without variables
14:35 <boxscape> it stands for "pointless"
14:35 <nitrix> driusan: @let is a lambdabot directive to declare code. And the ; is to seperate multiple definitions.
14:35 <boxscape> where a "point" is a "variable" because of some mathematical field
14:35 <driusan> ah
14:36 <Geekingfrog> :t if'
14:36 <lambdabot> error:
14:36 <lambdabot> • Variable not in scope: if'
14:36 <lambdabot> • Perhaps you meant ‘f'’ (imported from Debug.SimpleReflect)
14:36 <geekosaur> lambdabot is not ghci. "> " only does expressions; you have to use "@let" to make definitions
14:37 <geekosaur> and if' is an @pl hack, because there was no pointfree way to do conditional expressions when @pl was implemented
14:37 <geekosaur> (there is `bool` these days but the parameters are permuted a bit to match `maybe` and `either`)
14:40 ThomasLocke joined
14:40 ysgard joined
14:42 <merijn> Is there a prefix version of <|> ?
14:52 <merijn> Generalised fizzbuzz in like 12 lines
14:52 <lpaste_> merijn pasted “Generalized FizzBuzz” at http://lpaste.net/353745
14:52 <merijn> I haven't figured out a nice way to replace the if/then/else yet
14:53 <merijn> Maybe something using guard or something
14:53 Apocalisp joined
14:58 aarvar joined
14:59 madjestic joined
15:00 MotherFlojo joined
15:02 <nitrix> merijn: alt = (<|>) :)
15:03 Denthir joined
15:03 Blacink joined
15:03 <nitrix> Isn't it awkward to use prefix style?
15:04 <merijn> nitrix: Not if you want to lift the 'n' out, but I realised <|> for list does the wrong thing anyway :)
15:05 shayan_ joined
15:07 skapazzo joined
15:09 Sose joined
15:13 Rizy joined
15:33 chlong joined
15:49 Rizy joined
16:01 DataComputist joined
16:04 skeet70 joined
16:11 yellowj joined
16:18 pie_ joined
16:27 initiumdoeslinux joined
16:28 initiumdoeslinux joined
16:30 chadrs joined
16:32 stryx joined
16:40 conal joined
16:43 dn1987p joined
16:44 Denthir joined
16:54 expo873 joined
16:54 emmanuel_erc joined
16:57 cur8or joined
16:58 malaclyps joined
17:02 MotherFlojo joined
17:11 tsmish joined
17:12 Deide joined
17:31 MotherFlojo joined
17:31 sns joined
17:32 takle joined
17:36 malaclyps joined
17:40 <Gurkenglas> nitrix, <|> is ++ on lists
17:44 grayjoc joined
17:47 MotherFlojo joined
17:47 vaibhavsagar joined
18:00 acarrico joined
18:02 abh joined
18:02 <nitrix> Gurkenglas: Yeah I mentioned mappend earlier :)
18:03 <nitrix> Oh no I didn't. I kept it for myself.
18:04 malaclyps joined
18:04 <nitrix> :<
18:04 <nitrix> Here's your prime example of context switching at work :P
18:12 <Gurkenglas> mappend also is ++ on lists :D but now I notice the already noted "but I realised <|> for list does the wrong thing anyway"
18:13 stef204 joined
18:20 Uniaika joined
18:26 markh joined
18:43 pie_ joined
18:44 uglyfigurine joined
18:48 mojjo joined
18:48 NoCreativity joined
18:48 hoffmeyer joined
18:59 MotherFlojo joined
19:05 takle joined
19:12 malaclyps joined
19:12 tsmish joined
19:15 Blacink joined
19:15 taksuyu joined
19:16 averagehat joined
19:21 nomotif joined
19:25 albertus1 joined
19:27 takle joined
19:29 markh left
19:29 peterbecich joined
19:33 nil_ joined
19:41 e14 joined
19:41 NoCreativity joined
19:42 takle_ joined
19:49 zereraz joined
19:51 <lpaste_> nil_ pasted “I'm Thinking Of A Typeclass” at http://lpaste.net/353752
19:51 <nil_> Who's up for some "I'm Thinking of a Typeclass"?
19:58 conal joined
19:59 curious_corn joined
20:02 bydo joined
20:04 madjestic joined
20:35 irclogger_com joined
20:35 Topic for
20:35 <nitrix> nil_: The wording could be made less heavy, but I think you meant it such that I ask general enough, yet specific enough questions to obtain a "Yes", and from there, can keep refining.
20:36 <nitrix> nil_: Which pratices narrowing the domain by asking useful questions, otherwise someone else takes your turn trying to find out what the TC is :P
20:36 <nitrix> The more I read it, the more the rules make sense :D
20:36 <nitrix> I like it :)
20:38 <nitrix> nil_: I'm thinking of a type class !
20:44 albertus1 joined
20:47 <nil_> nitrix: back from dinner, good to see you started. :)
20:48 <nil_> Okay, is it part of the Functor-Applicative-Monad hierarchy?
20:50 merijn joined
20:50 l_coal joined
20:50 l_coal joined
20:51 <nitrix> No :D
20:52 <nitrix> Next questioneer... nil_ :D
20:52 <hexagoxel> 10 questions, and you can ask about subsets? so with bisection and less than 1024 classes in base..
20:52 <nil_> hexagoxel: good point! Let's ban subsets then.
20:52 <nil_> You go next.
20:53 <nitrix> I'm going with extremes to test your game :)
20:53 <nitrix> nil_: Limitating it to base is a good call though.
20:54 <nitrix> Limiting*
20:54 <nil_> nitrix: thanks. :)
20:54 <nil_> hexagoxel, do you want to give it a go or should I go again?
20:55 <hexagoxel> does it have kind * -> Constraint?
20:55 <nil_> Good one.
20:55 <hexagoxel> i will test extremes too :p
20:57 <hexagoxel> nitrix: ^
20:58 <nitrix> hexagoxel: It does :)
20:58 <hexagoxel> nil_: your turn
20:58 <nil_> Hmmm...
20:58 <nitrix> hexagoxel: I thin you're supposed to keep going on a Yes?
20:59 <nil_> nitrix: the Rules don't specify an order among the questioners. We can add one if you guys feel like it.
20:59 <nitrix> Ah I see.
21:00 <nil_> Can the natural numbers be made an instance?
21:00 <nitrix> Yup.
21:01 <nil_> Can the natural numbers be made an instance in more than one way?
21:01 <nitrix> No
21:01 <nil_> Okay, we've got six questions to go. hexagoxel, you wanna take it from here?
21:01 <nitrix> I should've said "be more precise"
21:01 <nil_> nitrix: the last time?
21:02 <nitrix> Does your `more than one way` refers to different minimal complete definition?
21:03 <nitrix> Or if more than one implementation would "make sense" for natural nummbers? :P
21:03 <nil_> I'm not sure I understand that question.
21:04 <* nitrix> coughs.
21:04 <nitrix> Be more specific.
21:04 <nil_> nitrix: are you changing your answer to the last question or the penultimate question?
21:04 Rodya_ joined
21:05 <nitrix> Oh. To the last question.
21:05 pbrant joined
21:05 <nitrix> Natural numbers can be made an instance. In "more than one way" though needs to be more specific to be answered.
21:06 <nitrix> I can see wording becoming an issue quickly with this game :P
21:06 louispan joined
21:06 <nil_> Okay. Can I define more than one newtype wrapper for Nat such that their instances are not isomorphic to each other?
21:06 <nitrix> Then no.
21:07 <nil_> nitrix: oh, sure, precise wording is part of what I intend to *practice* in this game. :)
21:07 <hexagoxel> is lawfull, non-bottom implied here?
21:07 <nil_> hexagoxel: you're up.
21:08 malaclyps joined
21:08 <hexagoxel> i wonder if just defining every method to = undefined count as lawful, even..
21:10 <nil_> I meant lawful and I guess I never even considered bottom.
21:10 conal joined
21:10 <nil_> Probably not a great question to ask after all... :)
21:11 <nitrix> Moar questions :< !!
21:11 <nil_> It's hexagoxel's turn.
21:11 <hexagoxel> thinking..
21:11 <hexagoxel> nitrix: does it have a superclass?
21:12 <nitrix> Yes!
21:12 <nil_> Halfway mark! :)
21:12 <nitrix> Careful.
21:12 <nitrix> I might have my superclass terminology backwards.
21:12 <nil_> ...what?
21:12 <nitrix> hexagoxel: class A => B {}
21:12 <nitrix> hexagoxel: Is A or B the superclass of A/B ?
21:12 <merijn> A is the superclass of B
21:13 <hexagoxel> merijn's turn!
21:13 <nitrix> Then it's a no!
21:13 <nitrix> And I learned something :D
21:13 <merijn> I don't even know what we're playing :p
21:13 <nitrix> merijn: http://lpaste.net/353752
21:13 <nil_> It's "I'm Thinking of A Typeclass", the brand new megagame taking #haskell-beginners by storm!
21:14 <* nitrix> bangs on a metal sheet for extra sound effects.
21:14 <nil_> (btw I'm adding a Rule to ban subsets as we speak.)
21:14 <merijn> ee, if you're playing to win, you're going on all wrong about this :p
21:15 <merijn> Is there a list of classes in base somewhere?
21:16 <nitrix> https://hackage.haskell.org/package/base-4.9.1.0/docs/doc-index-All.html
21:16 <merijn> My approach would be far simpler, but probably too many questions asked already for it to work :p
21:16 <nitrix> merijn: You'd have to filter the (Type/Class) ones.
21:16 <nil_> merijn: maybe next round!
21:16 <monochrom> Yikes, are you just going to "is the name lexicographically before M?"
21:16 <merijn> "Does it start with letter A-M?" :p
21:17 <merijn> monochrom: :D
21:17 <hexagoxel> merijn: i think any kind of trivial bisecting strategy should be forbidden
21:17 <monochrom> Yikes, yes you are.
21:17 <nil_> Haha
21:17 <merijn> monochrom: Simple solutions are best solutions!
21:17 <nitrix> merijn: Yes >_>
21:17 <nil_> hexagoxel: exactly, let's draw up a Rule for that.
21:17 <glguy> Does the type class's type parameter only appear in negative positions in the class methods?
21:18 <nil_> ._.
21:18 <nitrix> That doesn't help you much though, I'm sure base have some regions of the alphabet overly biased.
21:18 <nitrix> glguy: checking
21:18 <nil_> glguy: bonus points for advanced question.
21:18 <merijn> nitrix: Probably, but it'll still work since there's not so many classes :p
21:20 <nitrix> glguy: As far as I know, No.
21:20 <nil_> 3 more questions to go.
21:21 <nitrix> glguy: But my negative/positive understanding is limited :S
21:21 <glguy> OK: negative only example: a -> a -> Bool
21:21 <nitrix> glguy: That's negative?!
21:22 <glguy> Positive only example: Int -> a
21:22 <nitrix> glguy: a -> (a -> Bool)
21:22 <nitrix> glguy: Isn't the variable both in the domain and codomain here?
21:22 <glguy> nitrix: right, the trick is when you go on the LEFT side of an arrow
21:22 <glguy> so the first 'a' is on the left side of the left arrow
21:22 <glguy> the second 'a' is on the left side of the second arrow
21:22 <nil_> You see? We're learning, so it's working!
21:23 <glguy> being on the right side of the left arrow doesn't change polarity
21:23 <glguy> so they're both negative
21:23 <glguy> negative positions are things you give the function
21:23 <glguy> positive ones are things it gives you
21:24 <nitrix> I can see `a -> Int` being nehative and `Int -> a` being positive.
21:24 <nitrix> `a -> (a -> Bool)` still is blurry.
21:24 <hexagoxel> .oO the `negate` method has the type parameter in both a negative and a positive position. which makes sense.. hehe
21:24 <nitrix> :T negate
21:24 <nitrix> :t negate
21:24 <lambdabot> Num a => a -> a
21:25 <nitrix> Oh that's just evil.
21:25 <glguy> nitrix: If `a1 -> (a2 -> Bool)` is positive, then `a1` is negative and ` (a2 -> Bool)` is positive
21:25 <nil_> nitrix: what you "give" is negative, what you "get" is positive.
21:25 <glguy> if `a2 -> Bool` is positive, then `a2` is negative and `Bool` is positive
21:25 <nitrix> glguy: Right.
21:25 <glguy> (Just trying to help with the blur)
21:25 <nitrix> glguy: Oh I see!
21:26 <nitrix> glguy: What if `a2 -> Bool` was negative?
21:26 <glguy> then a2 would be positive and Bool negative
21:26 <nitrix> `a2` would be positive and `Bool` negative?
21:26 <glguy> yeah
21:26 <nitrix> That's cool.
21:26 <nitrix> glguy: This can only happen if you have a higher-order function, doesn't it?
21:28 <nil_> Okay guys, how does this sound? "The questioners may not ask about sets of typeclasses defined by their names."
21:28 <glguy> nitrix: Yeah, sort of by the definition of higher-order function being one where the argument or result types are themselves functions combined with it being functions arguments that get their polarity switched
21:28 <nitrix> nil_: Or something like no type classes can be named unless an attempt at guessing the answer is made?
21:29 <nil_> nitrix: good idea.
21:29 <nitrix> glguy: Gotcha. So, with my new knowledge, the type variable is always in a negative position, yes.
21:29 <merijn> Is the class in the Haskell Report?
21:30 <nitrix> merijn: Yus.
21:30 <glguy> can I successfully define the class with only a single method definition?
21:30 <glguy> successfully/lawfully
21:31 <merijn> What was the answer to superclasses?
21:31 <nitrix> merijn: No.
21:31 <nitrix> glguy: Yes.
21:31 <merijn> No it's not a superclass, or not it has no superclasses?
21:31 <nil_> merijn: it has no superclasses.
21:31 <nil_> (Last question!!)
21:32 <nitrix> merijn: It has no superclasses.
21:32 <merijn> That leaves only 4 options
21:32 <nil_> And we still get one bit of info. Easy, right?
21:32 <merijn> 3 of which require only 1 function
21:32 <nitrix> With the questions earlier, you can actually narrow it down.
21:33 <merijn> I don't think I have all questions
21:33 <merijn> What was the negative/positive question?
21:33 <glguy> only negative positions
21:33 <nitrix> 17:06:55 nil_ | Okay. Can I define more than one newtype wrapper for Nat such that their instances are | not isomorphic to each other?
21:33 <nitrix> merijn: The answer was no for that one.
21:33 <* glguy> submitted his answer to nitrix already
21:34 <merijn> nitrix: That doesn't help, I think, because two of the 3 candidates have no real laws :)
21:34 <nitrix> glguy: Proceed again. I have +g :S
21:34 <nitrix> glguy found it.
21:34 <nitrix> Eq.
21:35 <nil_> Nice!
21:35 <nitrix> Told you I chose extremes D:
21:35 <glguy> merijn: What were your 3 finalists?
21:35 <nil_> glguy: you pick next!
21:35 <merijn> Eq was the one I was thinking off since it has laws-ish
21:35 <nitrix> My other one is much much harder.
21:35 <merijn> glguy: Eq, Show and Read
21:35 <glguy> Read isn't all negative
21:35 <merijn> glguy: I was still figuring out what negative meant
21:35 <glguy> Ah!
21:36 <merijn> glguy: Together with Bounded those are the only classes of kind * with no superclass in the report
21:36 <glguy> I knew it was Eq and not Show because Show wouldn't have tripped nitrix up on the negative question ;-)
21:36 <nitrix> merijn: Show wouldn't be necessarily isomorphic for different newtypes of Nat afaik.
21:36 <merijn> But Bounded requires two functions
21:36 <merijn> nitrix: Well, that's hard to say since it has no real laws
21:36 <nitrix> glguy: I normally wouldn't have, but it's been so long since I looked at Contravariant Functors and negative positions :S
21:37 <nitrix> glguy: Very nice to bring it up though <3
21:37 <glguy> No criticism, it just was an extra clue
21:37 eacameron joined
21:37 <nitrix> merijn: I see.
21:38 <nitrix> For the other one, I wanted to go in the TypeInType / PolyKinds stuff :P
21:38 <nitrix> We'll see x3 glguy's turn !
21:38 <nil_> nitrix: you might still get to.
21:38 <glguy> OK, I've got a class in mind if you want.
21:38 <glguy> ==
21:38 <glguy> ==
21:38 <nil_> Can I "lift" pure functions into it?
21:39 <nitrix> glguy: Does it has kind * -> Constraint?
21:40 <glguy> nil_: Yes; nitrix: no.
21:40 <glguy> nil_: but that's a bit subjective to what I'm thinking you mean
21:40 <nil_> glguy: "be more specific"?
21:40 <nitrix> glguy: http://lpaste.net/353752
21:41 <glguy> Yeah, probably a be more specific. I forgot that rule
21:41 <nitrix> glguy: There's a "be more specific I believe"
21:41 <* nitrix> moves that ending quote after `specific`.
21:41 <glguy> nil_: because I can think of interpretations where the answer is yes and no
21:42 <nitrix> Mhm I've had that same problem with one question of his earlier.
21:42 <nitrix> When both interpretations are Yes or No, it's avoid asking to be more specific altogether :P
21:44 <hexagoxel> one more question regarding positive/negative: in `foo :: f a`, what is `a`?
21:44 <glguy> hexagoxel: depends on f
21:44 <hexagoxel> makes sense, thanks
21:44 michbad joined
21:45 <nil_> Okay, does it have a function that sends (a -> b) to either of: (f a -> f b) or (a -> f b) where f is your typeclass?
21:45 <nil_> (Couldn't figure out a better way to put it.)
21:46 <glguy> nil_: Yeah, it's one of those :-p
21:46 <glguy> See if you can narrow it down I guess :) (maybe the next person will be more creative)
21:46 <nitrix> That gives a good guess.
21:46 <glguy> more creative than I was, to be specific
21:46 <nitrix> Is it used to model effects?
21:47 <nil_> nitrix: I think at this point we know it is?
21:47 <nitrix> Sound like a waste, you're right.
21:47 <nil_> Anyway, the question's been asked.
21:48 <nitrix> nil_: Don't hate me D:
21:48 <nil_> :) Never!
21:48 <nitrix> I thought glguy would come up with some twisted thing x]
21:48 <glguy> I did at first fwiw
21:48 <glguy> Um, I don't think the class is specifically about effects
21:49 <nitrix> Which pretty much leaves us at the same point where we were.
21:49 <nitrix> Terrible question from me.
21:49 <nil_> Huh. Fuzzy question again, I guess? I'm pretty sure the solution /does/ model effects even if it's not specifically designed for it.
21:50 <nitrix> nil_: How would you draw the line between applicative and monad? `join`?
21:50 <glguy> There aren't many things it can be, but there's still a good opportunity to think of questions to cleave the options nicely
21:50 <nil_> nitrix: yeah, something like "can I flatten multiple layers of context"?
21:50 <nil_> nitrix: remember, you can't ask for "join" using its name!
21:51 <glguy> If this is a game about careful language "context" is out
21:51 <nitrix> glguy: Can we merge multiple similar context of the same type class, such as `w (w a) -> w a` ?
21:51 <nil_> glguy: excellent point. :>
21:51 <nitrix> Aww :(
21:51 <nitrix> I'll rephrase then.
21:52 <nitrix> glguy: Can we flatten the same nested type instanciating your type class, such as `w (w a) -> w a` ?
21:52 hiratara joined
21:52 <nitrix> `Can` is dangerous here.
21:53 <nil_> EVERY SINGLE WORD IS DANGEROUS! :D
21:53 <glguy> So the question is "Using only the methods of my class parameterized by 'w', can I implement a function with type : w (w a) -> w a
21:53 <glguy> no
21:53 <* nitrix> takes notes on the wording c:
21:53 <nitrix> Interesting.
21:54 uglyfigurine joined
21:54 <nitrix> I have my answer then, because haskell doesn't have uniqueness types.
21:55 <nil_> Go right ahead. :)
21:56 <* hexagoxel> counts only 57 classes in base-4.8, and that includes some GHC-specific stuff that probably does not count.
21:56 <nitrix> Ah, my guess might've been too early :P
21:56 <nitrix> hexagoxel: I was tempted to ask about GHC and Foreign early on.
21:56 <glguy> nitrix's answer isn't what I had in mind
21:56 <nitrix> I'm eliminated :P
21:56 <* nitrix> falls on the floor and bleeds~
21:56 <nil_> :D
21:57 <nil_> hexagoxel: yeah, 10 questions is a bit generous.
21:57 <geekosaur> "Your graph has been reduced!"
21:57 <nitrix> Killed by greed.
21:57 <nil_> glguy: does it have a superclass?
21:57 <monochrom> "not * -> Constraint" is very narrowing down already.
21:57 <glguy> nil_: No
21:58 <nitrix> Oh god.
21:58 <nil_> Is it Functor?
21:58 <nitrix> That leaves one more x]
21:58 <glguy> yes
21:58 <monochrom> Still, there are a few candidates you seldom think of.
21:58 <nil_> :)
21:58 fhoffmeyer1 joined
21:58 <glguy> nitrix: I did have a twisted one in mind off the bat
21:58 <nil_> The grandmother of all typeclasses.
21:58 <glguy> but I bet a bunch of people don't know it's in base
21:58 <nil_> glguy, save it for next round!
21:58 takle joined
21:58 <nil_> Alright, I've got one.
21:58 <nitrix> So, what's the consenssus for Foreign and GHC ?
21:59 <monochrom> Foreign should be in.
21:59 <monochrom> Foreign is not only in base but also in Haskell 2010.
21:59 <nitrix> Good point.
21:59 <nitrix> GHC might be going a little far though.
21:59 <monochrom> Yeah.
22:00 <nitrix> There are fun ones though. Datatype from GHC.Generics and stuff.
22:00 <hexagoxel> but GHCiSandboxIO, BufferedIO, RawIO, IODevice ?
22:00 <MarcelineVQ> Data.Functor.* is all pretty fun stuff
22:00 <nitrix> See, I was expecting glguy to pick at least Contravariant :P
22:01 <nil_> (Is Yoneda in there?)
22:01 <glguy> nitrix: Not in base!
22:01 louispan joined
22:01 <nitrix> Is it not D: ?
22:01 <nitrix> Oh my, I know what my next is. And it's in base :D
22:01 <nitrix> nil_: Go ahead, your turn :P
22:01 <glguy> (afk)
22:01 <nil_> nitrix: I've got one already. :)
22:02 <nitrix> Should I play this one or head home first...
22:02 <nitrix> Actually, I'll head home :)
22:02 <MarcelineVQ> this game has too many rules ^^;
22:02 <nitrix> I'll be back soon after (:
22:02 ysgard_ joined
22:02 <nil_> MarcelineVQ: any suggestions as to what to throw out? :)
22:03 <nitrix> 'is kinda the point of us trying it :P
22:03 <hexagoxel> base-4.9 has 72 oO
22:03 <* nitrix> afk
22:05 ysgard_ joined
22:05 <lpaste_> hexagoxel pasted “find base-4.9.1.0 -name "*.hs" | xargs grep "^class.*" -h” at http://lpaste.net/353758
22:05 louispan joined
22:05 <nil_> hexagoxel: nice!
22:07 <MarcelineVQ> is the game specifically about things that start with 'class ...'
22:07 <nil_> MarcelineVQ: yes.
22:07 <nil_> Nine questions to go... :p
22:08 <MarcelineVQ> Did I just do something bad? I'm not sure who's in control of the question and answers atm
22:08 <nil_> You didn't, I was joking. :) I'm the answerer for this round.
22:09 <nil_> Anyone can ask questions, just make sure you don't run out of them.
22:10 AndreasK joined
22:15 <nil_> Come on, people, this typeclass isn't gonna guess itself!
22:17 <Akii> ppl always say to avoid type classes
22:17 <Akii> just make a data type out of it
22:17 <nil_> ...Is there a question coming?
22:17 <Akii> nope!
22:18 louispan joined
22:18 <Akii> okay yes there is
22:18 <Akii> what happens if I stick `Proxy` in it
22:19 <Akii> is that even a valid question
22:19 <nil_> Akii: not really. I'm deliberating whether to answer "be more specific" or just go with "no". :D
22:19 <Akii> haha
22:20 <Akii> "What happens if I stick a `Proxy` in it" - "No."
22:20 <Akii> that's perfect
22:20 <Akii> that could indicate `class Foo (Proxy a) where; answer = "No"`
22:21 <Akii> answer _ = "No" of course
22:21 <nil_> Haha :D
22:22 <MarcelineVQ> nil_: this is probably the best question to start with so I'll ask it "<hexagoxel> nitrix: does it have a superclass?"
22:23 <nil_> MarcelineVQ: yes.
22:23 <Akii> the identity question
22:24 <Akii> sounds like a category xD
22:24 <Akii> does the superclass of the typeclass have a superclass?
22:24 <nil_> Akii: yes.
22:25 <Akii> so it's a monad, done
22:25 <MarcelineVQ> that question seems to elimate nearly 50% of classes
22:25 <nil_> Way to ask good questions imo. :)
22:26 ysgard joined
22:26 <Akii> do I have to know it to write real life Haskell code?
22:26 <MarcelineVQ> you can elimate the next 1/4 by asking whether the class has only one explicit superclass, I'm not asking that yet though
22:27 <nil_> Hmm, be more specific.
22:27 <Akii> dang :D
22:27 <Akii> well gtg
22:27 <Akii> but fun game
22:27 <nil_> :) I know, right
22:28 <merijn> Akii: wut? there's lots of classes that have a superclass with a superclass
22:28 <merijn> i.e. half the Numeric classes
22:29 hphuoc25 joined
22:31 hiratara joined
22:31 louispan joined
22:33 <MarcelineVQ> is "does the class declaration contain a capital a or f" two questions?
22:34 <nil_> MarcelineVQ: asking questions about the names of classes is forbidden. :(
22:34 <MarcelineVQ> What constitutes the name?
22:35 <nil_> The word that uniquely identifies the typeclass, e.g. the string "Monoid".
22:35 <MarcelineVQ> also your rule is about class functions so you'll want to broaden that :>
22:35 <nil_> Oh no, we added another one after that.
22:36 <nil_> "The questioners may not use the name of any typeclass in their questions."
22:36 <MarcelineVQ> alright
22:40 takle joined
22:41 <MarcelineVQ> trying to come up with questions that respect the spirit of the challenge is hard
22:47 <hexagoxel> "each round has three components: 1) question is proposed 2) semantics and validity of question are discussed as a group 3) (if accepted) question is answered" :)
22:47 <MarcelineVQ> "<nitrix> So, what's the consenssus for Foreign and GHC ?" you can't really avoid ghc, technically most of the things you'd think of first are defined in GHC/Base.hs
22:48 <nil_> hexagoxel: exactly! Shall we make a Rule out of that? :)
22:49 <hexagoxel> "classes in GHC are ruled out unless they are exposed via some non-GHC module"
22:51 ysgard_ joined
22:53 malaclyps joined
22:59 fhoffmeyer1 joined
23:00 l_coal joined
23:01 dni- joined
23:07 aarvar joined
23:09 <ederign> /quit
23:21 Rizy joined
23:23 takle joined
23:32 uglyfigurine joined
23:38 eacameron joined
23:39 uglyfigurine joined
23:39 takle joined
23:43 NeverDie joined
23:46 tsmish joined
23:52 suls joined
23:58 fhoffmeyer1 joined