<     May 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:01 Cale joined
00:04 Durbley joined
00:04 danny_ joined
00:10 qu1j0t3 joined
00:25 myrkraverk_ joined
00:31 justinfokes joined
00:31 malaclyps joined
00:32 juanpaucar joined
00:33 juanpaucar joined
00:34 juanpaucar joined
00:34 eacameron joined
00:42 juanpaucar joined
00:44 juanpauc_ joined
00:49 justinfokes joined
00:50 eminhi joined
00:54 juanpaucar joined
00:55 NeverDie joined
00:56 vaibhavsagar joined
01:03 juanpaucar joined
01:07 justinfokes joined
01:09 swelliot joined
01:12 <swelliot> Hi, I am trying to compile part of the simplest possible example from the Yesod book chapter on Persistent ( http://www.yesodweb.com/book/persistent ). Here's what I've written: http://lpaste.net/355564
01:12 <swelliot> However, I'm getting a compiler error I don't understand. I think it's telling me things about the generated templatized code
01:13 juanpaucar joined
01:13 <swelliot> The error looks like this: http://lpaste.net/355565
01:14 louispan joined
01:14 <swelliot> Can anyone help me understand what this means? Will bribe with cat pictures
01:15 moei joined
01:15 <qu1j0t3> I don't want to make the market drop, but https://twitter.com/bortofdarkness/status/864235893514584064
01:16 <qu1j0t3> don't look unless you've helped swelliot
01:16 <swelliot> nooooo, now my bribes are worthless!
01:17 justinfokes joined
01:20 <mengu> are there new haskell screencasts?
01:21 <qu1j0t3> swelliot: I said they have to help THEN consume
01:22 <qu1j0t3> swelliot: surely this will work among such an honest crowd
01:22 <swelliot> fingers crossed
01:22 juanpaucar joined
01:23 <mengu> swelliot: does it work if you add {-# LANGUAGE TypeSynonymInstances #-}
01:23 mac10688 joined
01:24 <swelliot> mengu: The error is the same, but now with less qualified names for the classes.
01:26 <mengu> swelliot: what about {-# LANGUAGE MultiParamTypeClasses #-}
01:26 <swelliot> should I replace the typeSynonymInstances with that?
01:26 <eminhi> swelliot: it works with MulitParamTypeClasses
01:26 <geekosaur> yes
01:27 <mengu> i'd just add this, see if it works
01:27 <geekosaur> and I expect thats the only issue
01:27 <swelliot> oh wow. Yeah, that worked. What was going on there?
01:28 <geekosaur> exactly what the error told you
01:28 <mengu> swelliot: https://wiki.haskell.org/Multi-parameter_type_class
01:28 <geekosaur> basically, there are some arbitrary restrictions in the Haskell standard. that's one of them, and the MPTC extension removes it
01:28 uglyfigurine joined
01:29 <swelliot> So do you think the omission of that extension is an error in the Yesod book?
01:29 <geekosaur> it;s not *entirely* arbitrary as, once you have it, you need either functional dependencies or type families to use it without having to add types manually everywhere... but that's persistent's problem to solve if it's using MPTCs at all
01:29 <geekosaur> likely yes. or, more precisely, persistent was likely reworked in such a way as to require it
01:30 <geekosaur> this happens a lot in the haskell world; things can move quickly, books don;t generally change as quickly as code
01:30 <mengu> i need to learn about functional dependencies
01:31 <mengu> swelliot: i don't like cats, you can bribe me with wolf pictures
01:31 juanpaucar joined
01:32 <swelliot> oh damn, I had *just* finished preparing the cat pictures. I leave them here as a bonus while I procure a wolf picutre: http://imgur.com/a/aXB1Q
01:32 <mengu> swelliot: thanks <3
01:33 <swelliot> mengu: As you can see, they are practicing to become very fierce: http://imgur.com/a/IQIit
01:33 <mengu> look how lovely they are
01:41 juanpaucar joined
01:43 louispan joined
01:46 Durbley joined
01:46 takle joined
01:50 juanpaucar joined
01:56 eacameron joined
01:59 juanpaucar joined
02:04 takle joined
02:08 juanpaucar joined
02:14 takle joined
02:17 juanpauc_ joined
02:20 justinfokes joined
02:23 takle joined
02:25 exferenceBot joined
02:27 juanpaucar joined
02:30 hexagoxel joined
02:32 pie_ joined
02:36 juanpaucar joined
02:36 takle joined
02:38 justinfokes joined
02:43 louispan joined
02:45 juanpaucar joined
02:47 Computist joined
02:48 justinfokes joined
02:50 argent0 joined
02:54 juanpaucar joined
03:01 peterbecich joined
03:03 juanpauc_ joined
03:05 justinfokes joined
03:13 juanpaucar joined
03:16 eminhi joined
03:18 Lokathor_ joined
03:19 eacameron joined
03:22 juanpaucar joined
03:24 justinfokes joined
03:31 juanpaucar joined
03:32 uglyfigurine joined
03:33 carlomagno joined
03:36 condy joined
03:40 juanpaucar joined
03:42 justinfokes joined
03:50 juanpaucar joined
03:51 justinfokes joined
03:57 takle joined
03:59 juanpaucar joined
04:03 juanpaucar joined
04:08 juanpaucar joined
04:09 justinfokes joined
04:15 systemfault joined
04:16 takle joined
04:16 systemfault joined
04:25 ericw joined
04:26 juanpaucar joined
04:27 justinfokes joined
04:29 ericw joined
04:36 juanpaucar joined
04:37 takle joined
04:43 eacameron joined
04:45 juanpauc_ joined
04:45 justinfokes joined
04:47 eacamero_ joined
04:49 ericw joined
04:50 ericw joined
04:54 juanpaucar joined
04:55 ploop joined
04:55 justinfokes joined
04:56 theencoded joined
04:58 eacameron joined
05:03 juanpaucar joined
05:04 geekosaur joined
05:05 eacameron joined
05:05 takle joined
05:08 eacamero_ joined
05:10 theencoded joined
05:12 cschneid_ joined
05:12 juanpaucar joined
05:12 cschneid_ joined
05:13 takle joined
05:13 justinfokes joined
05:17 juanpaucar joined
05:20 eacameron joined
05:22 juanpauc_ joined
05:24 eacamero_ joined
05:24 kritzcreek joined
05:26 meandi_2 joined
05:26 takle joined
05:27 juanpaucar joined
05:28 eacameron joined
05:31 juanpaucar joined
05:31 justinfokes joined
05:34 takle joined
05:36 conal joined
05:40 juanpauc_ joined
05:49 justinfokes joined
05:49 juanpaucar joined
05:52 takle joined
05:52 ThomasLocke joined
05:52 ThomasLocke joined
05:56 smwangi joined
05:58 juanpaucar joined
05:59 justinfokes joined
06:08 juanpaucar joined
06:08 hulufei_ joined
06:08 takle joined
06:09 smkz_ joined
06:17 justinfokes joined
06:17 juanpaucar joined
06:22 juanpaucar joined
06:26 juanpaucar joined
06:29 Gurkenglas joined
06:35 justinfokes joined
06:35 juanpaucar joined
06:39 takle joined
06:45 juanpaucar joined
06:48 fotonzade joined
06:51 takle joined
06:53 justinfokes joined
06:54 juanpauc_ joined
07:01 smwangi joined
07:02 takle joined
07:02 justinfokes joined
07:03 juanpaucar joined
07:08 mattyw joined
07:09 Pupnik joined
07:11 bvad joined
07:12 juanpaucar joined
07:20 justinfokes joined
07:21 cschneid_ joined
07:21 juanpaucar joined
07:23 madjestic joined
07:27 takle joined
07:30 juanpaucar joined
07:32 juanpaucar joined
07:33 merijn joined
07:35 takle joined
07:37 haskelleksah joined
07:38 justinfokes joined
07:40 ^jud joined
07:42 juanpaucar joined
07:45 aphorisme joined
07:46 thc202 joined
07:48 justinfokes joined
07:48 grdryn joined
07:48 takle joined
07:49 eacameron joined
07:51 juanpaucar joined
07:51 wedens joined
07:54 colt44 joined
07:56 eacameron joined
07:56 im0nde joined
07:56 Gloomy joined
08:00 juanpaucar joined
08:05 juanpaucar joined
08:05 galderz joined
08:06 takle joined
08:06 justinfokes joined
08:09 juanpauc_ joined
08:10 zero_byte joined
08:13 takle joined
08:14 aphorisme joined
08:16 Iceland_jack joined
08:17 <Iceland_jack> Good morning
08:18 <Akii> hi!
08:19 juanpaucar joined
08:23 nickolay_ joined
08:24 takle joined
08:24 justinfokes joined
08:24 juanpaucar joined
08:26 madjestic joined
08:27 <Iceland_jack> for_ users greet
08:27 <Akii> :D
08:31 nacon joined
08:31 nacon joined
08:32 conal joined
08:33 takle joined
08:33 justinfokes joined
08:35 juanpauc_ joined
08:40 eacameron joined
08:44 juanpaucar joined
08:44 colt44 joined
08:50 takle joined
08:50 takle joined
08:51 justinfokes joined
08:53 juanpaucar joined
08:56 romank joined
08:57 slomo joined
08:57 slomo joined
09:02 juanpaucar joined
09:09 justinfokes joined
09:11 Gloomy joined
09:12 juanpaucar joined
09:15 eacameron joined
09:19 justinfokes joined
09:21 juanpaucar joined
09:24 kritzcreek joined
09:30 juanpaucar joined
09:37 justinfokes joined
09:39 juanpaucar joined
09:44 jarshwah joined
09:48 juanpaucar joined
09:55 justinfokes joined
09:58 juanpaucar joined
10:07 juanpaucar joined
10:09 juanpaucar joined
10:13 justinfokes joined
10:18 juanpaucar joined
10:23 justinfokes joined
10:27 juanpaucar joined
10:35 netheranthem joined
10:36 <* Iceland_jack> wonders interesting ways to extend newtype deriving
10:36 juanpaucar joined
10:38 fotonzade joined
10:41 justinfokes joined
10:46 juanpaucar joined
10:46 louispan joined
10:47 yellowj joined
10:55 juanpaucar joined
10:58 justinfokes joined
10:59 eacameron joined
11:02 guampa joined
11:04 merijn joined
11:04 juanpauc_ joined
11:08 justinfokes joined
11:11 pie_ joined
11:13 juanpaucar joined
11:15 nil_ joined
11:22 guampa joined
11:22 louispan joined
11:22 juanpauc_ joined
11:26 justinfokes joined
11:29 merijn joined
11:32 juanpaucar joined
11:41 juanpaucar joined
11:42 nickager joined
11:44 justinfokes joined
11:49 <lpaste> nickager pasted “avoiding nested if..then..else” at http://lpaste.net/355570
11:50 juanpaucar joined
11:51 <nickager> `fizzBuzzState6` uses horrible nested if..then..else. `fizzBuzz7State` is my attempt to refactor without nested if..then..else; however the evaluation isn’t equivalent 261 vs 300 calls to `rem`
11:51 jathan joined
11:53 <nickager> it feels like there should be a neater solution, but I’m not sure how to call something like `first` inside the Writer Monad
11:55 merijn joined
11:56 <nickager> something like: `rslts = [(n `remCount` 15, "FizzBuzz"), (n `remCount` 3, "Fizz"), (n `remCount` 5, "Buzz"), (pure 0, show n)]`
11:56 <nickager> but not sure how to form: `return $ snd $ fromJust $ find ((==0).fst) rslts`
11:58 <nickager> which naturally complains that I can’t (==0) on something inside a Writer
11:59 juanpauc_ joined
12:00 galderz joined
12:02 justinfokes joined
12:05 takle joined
12:05 louispan joined
12:05 <lpaste> hexagoxel annotated “avoiding nested if..then..else” with “avoiding nested if..then..else via EitherT (annotation)” at http://lpaste.net/355570#a355571
12:06 <hexagoxel> nickager: hope you don't mind seeing another transformer.. EitherT allows you to "abort", which that code uses to prevent executing the remaining "remCount" uses.
12:07 <lpaste> hexagoxel revised “avoiding nested if..then..else via EitherT (annotation)”: “avoiding nested if..then..else via EitherT (annotation)” at http://lpaste.net/355571
12:08 <nickager> thanks
12:08 <nickager> I’m studying it at the moment
12:09 juanpaucar joined
12:11 TCZ joined
12:13 yellowj joined
12:18 juanpaucar joined
12:19 takle_ joined
12:19 <hexagoxel> nickager: have you seen other transformers yet? i might have jumped ahead a bit.
12:20 <nickager> sorry got side-tracked on a call, back again
12:20 justinfokes joined
12:21 cschneid_ joined
12:21 <nickager> I haven’t worked through transformer exercises but I’m aware of making a Monad “stack”
12:21 colt44 joined
12:21 <nickager> with transformers
12:21 <hexagoxel> EitherT e m a ~ m (Either e a)
12:22 <hexagoxel> where the monad instance is defined in such a way that once a Left is encountered, it "stops".
12:22 <nickager> OK
12:22 <hexagoxel> see https://hackage.haskell.org/package/either-
12:23 <hexagoxel> note how in the Left case, the `k` is ignored.
12:23 <nickager> yes
12:25 <hexagoxel> and we want to abort executing "remCount" actions conditionally.
12:25 <hexagoxel> in that case, we make it so we have (Either String String), and obtain a simple String via that `either id id` trick.
12:25 merijn joined
12:26 <hexagoxel> :t either id id
12:26 <lambdabot> Either c c -> c
12:27 juanpaucar joined
12:27 <nickager> :t either
12:27 <lambdabot> (a -> c) -> (b -> c) -> Either a b -> c
12:28 <nickager> so ``either id id` pull the String from either the `Left` or `Right` depending on which is defined
12:28 <nickager> ?
12:29 takle joined
12:29 <hexagoxel> yes
12:29 juanpauc_ joined
12:30 justinfokes joined
12:31 <hexagoxel> in general, EitherT allows to abort with some error type (the Left) or succeed with some proper result type (the Right).
12:31 <nickager> so we early abort for (==0) with `Left` defined and `return $ show n` puts the result in `Riight`
12:32 <nickager> :t when
12:32 <lambdabot> Applicative f => Bool -> f () -> f ()
12:32 <hexagoxel> here we just use `left` to manipulate control-flow, and let both types align.
12:32 <nickager> :t guard
12:32 <lambdabot> Alternative f => Bool -> f ()
12:32 <hexagoxel> in general you can have it that you distinguish the abort/success cases, by looking at the Either.
12:32 noumenon joined
12:33 ephemeral joined
12:33 <nickager> it looks like a useful pattern to know - thanks
12:33 <hexagoxel> and yes, `return` behaves like `right`
12:33 takle joined
12:34 <nickager> who needs `if..then..else` built into the language :-) ?
12:34 <hexagoxel> it gives you effectively "early return" power, with the caveats and counter-arguments known from imperative programming.
12:34 <nickager> when you can define your one control flow
12:35 <nickager> one == own
12:36 <hexagoxel> i.e. if-then-else is more explicit, and early-return can be surprising / easy to miss and mess up if you modify the code later.
12:36 <nickager> indeed
12:37 <nickager> is this a pattern you see often in code, or did you create it especially for this example?
12:37 <nickager> where code == Haskell code
12:38 juanpaucar joined
12:39 <hexagoxel> i do use it in code, but not often.
12:41 <Akii> hm early return can prevent nested if statements though
12:41 <hexagoxel> mostly locally only, i.e. where you runEitherT in the function and all aborts happen in that function.
12:42 takle joined
12:42 <nickager> just it feels like there are patterns like this that would be good to learn about; I think it will take me quite a lot of time before I can formulate code such as that directly
12:42 <nickager> (or perhaps all will become clear when I study transformers(
12:43 takle joined
12:45 wei2912 joined
12:46 dni- joined
12:46 takle joined
12:46 <Akii> I mostly do boring domainy stuff, checking invariants
12:47 <Akii> having when/unless is pretty neat
12:47 <Akii> check bunch of stuff, error out if fails and just do the thing if succeeds
12:47 Gloomy joined
12:47 <hexagoxel> haskell has infinite amounts of patterns, it is just too easy to define new abstractions :p
12:47 juanpaucar joined
12:48 <Iceland_jack> hah
12:48 <Iceland_jack> Akii: And their definitions are so simple
12:48 <Akii> ye :D
12:48 justinfokes joined
12:48 <Akii> although I'm not satisfied
12:49 <Akii> doesn't feel functional
12:49 Gurkenglas joined
12:49 <Akii> but it was good enough
12:51 <Akii> and until the category theory god blesses me with the ultimate power of abstraction, I'll write little do blocks of fluffy procedural code
12:52 takle_ joined
12:52 <Iceland_jack> They do not bless . . .
12:52 <Akii> :(
12:52 galderz joined
12:54 madjestic joined
12:54 <LiaoTao> lpaste having problems? :D
12:55 <lpaste> LiaoTao pasted “FizzBuzz” at http://lpaste.net/355579
12:55 <LiaoTao> @nickager
12:55 <lambdabot> Unknown command, try @list
12:56 <LiaoTao> :D
12:56 juanpaucar joined
12:59 <nickager> LiaoTao: thanks, so you build a map of Fizz and ‘Buzz’ and FizzBuzz
12:59 <nickager> neat
13:00 <LiaoTao> This way you get FizzBuzz for free by just appending Buzz
13:01 <nickager> indeed
13:02 <nickager> I’m excited that I understood your code (more or less)
13:03 <LiaoTao> It's not a very optimal solution, of course
13:03 <LiaoTao> But it's novel!
13:04 takle joined
13:05 justinfokes joined
13:05 takle joined
13:06 juanpaucar joined
13:07 <LiaoTao> There's also the "whiteboard factor" to consider
13:11 condy joined
13:12 xificurC joined
13:14 e2 joined
13:15 justinfokes joined
13:15 juanpaucar joined
13:18 TCZ joined
13:19 aarvar joined
13:20 juanpaucar joined
13:20 mengu joined
13:24 juanpauc_ joined
13:24 romank joined
13:25 <Akii> http://lpaste.net/355580
13:25 <Akii> hm
13:26 <TCZ> is it virus
13:26 <TCZ> i dont click
13:26 <Akii> don't worry, it's a pure virus
13:26 <Akii> doesn't do anything
13:26 <TCZ> ....
13:28 <qu1j0t3> :-)
13:29 eacameron joined
13:29 <Akii> I'm now ready for job interviews \o/
13:33 juanpaucar joined
13:34 pbrant joined
13:35 eacameron joined
13:35 Levex joined
13:42 juanpaucar joined
13:45 galderz joined
13:52 juanpaucar joined
14:01 juanpaucar joined
14:08 eacameron joined
14:09 Levex joined
14:09 romank joined
14:10 juanpaucar joined
14:13 takle joined
14:16 juanpaucar joined
14:20 takle joined
14:22 uglyfigurine joined
14:25 uglyfigu_ joined
14:27 NeverDie joined
14:31 takle joined
14:39 juanpauc_ joined
14:47 xificurC joined
14:55 rold joined
14:58 Computist joined
14:58 mattyw joined
15:01 roldx joined
15:04 pie_ joined
15:07 Gloomy joined
15:12 netheranthem joined
15:14 cschneid_ joined
15:17 takle joined
15:23 Gurkenglas joined
15:28 jespada joined
15:33 takle joined
15:33 erisco joined
15:36 RouxTheDay joined
15:38 RouxTheDay joined
15:42 zero_byte joined
15:47 jathan joined
15:52 argent0 joined
16:09 juanpaucar joined
16:12 juanpaucar joined
16:22 im0nde joined
16:28 pie_ joined
16:32 juanpaucar joined
16:32 fotonzade joined
16:36 abhiroop joined
16:38 aarvar left
16:44 RouxTheDay joined
16:46 mengu joined
16:50 <reptar_> where is "fields" used in this code http://lpaste.net/9089254347233034240
16:50 <glguy> reptar_: It's not
16:51 jathan joined
16:55 <reptar_> glguy: then why is it even there?
16:55 <glguy> reptar_: I should ask you, it's your paste?
16:55 <reptar_> no
16:55 <reptar_> i'm trying to decipher a language someone made
16:56 <glguy> OK, then it's just some unused code
17:01 <reptar_> i don't think so
17:02 uglyfigurine joined
17:09 uglyfigu_ joined
17:11 bvad joined
17:11 nickager joined
17:13 yellowj joined
17:14 galderz joined
17:17 madjestic joined
17:18 pie__ joined
17:19 mstruebing joined
17:21 haskelleksah joined
17:25 bvad joined
17:28 pilne joined
17:32 juanpaucar joined
17:47 takle joined
17:50 pie__ joined
17:54 <geekosaur> someone used a dumb code generator that didn't detect when some piece of generated code wasn't needed? >.>
17:56 zacts joined
17:58 im0nde joined
18:01 dni- joined
18:11 dmi3y joined
18:18 uglyfigurine joined
18:20 uglyfigu_ joined
18:22 mac10688 joined
18:26 malaclyps joined
18:36 vmeson joined
18:36 juanpaucar joined
18:40 alqatari joined
18:41 nickager joined
18:46 pie__ joined
18:49 stef204 joined
18:49 im0nde_ joined
18:50 dn1987p joined
18:51 stef204 joined
19:06 pie_ joined
19:18 crave joined
19:18 malaclyps joined
19:21 pie_ joined
19:25 romank joined
19:33 crave_ joined
19:35 juanpaucar joined
19:35 Levex joined
19:38 bkboggy joined
19:51 dmi3y joined
19:58 shayan_ joined
20:04 madjestic joined
20:05 pie_ joined
20:12 bvad joined
20:13 conal joined
20:31 jathan joined
20:35 juanpaucar joined
20:37 uglyfigurine joined
20:38 juanpauc_ joined
20:41 pie_ joined
20:42 malaclyps joined
20:46 uglyfigurine joined
20:48 conal joined
20:51 juanpaucar joined
20:52 Uniaika joined
21:05 pie_ joined
21:07 pie_ joined
21:11 fotonzade joined
21:19 romank joined
21:22 romank joined
21:23 taksuyu joined
21:25 asante joined
21:25 asante joined
21:26 TheHoff joined
21:26 <TheHoff> hey guys, i need some help with quickCheck please
21:30 juanpaucar joined
21:34 juanpauc_ joined
21:34 <Akii> TheHoff: just ask your question ^^
21:40 <TheHoff> I need help with Arbitrary Char's to generate random finite strings
21:41 <TheHoff> i have added Char to instance of Arbitrary, with arbitrary = choose ('a','z') but if i call quickCheck on my function, it seems to never return
21:41 <TheHoff> my guess is that the generated random strings are maybe too long, or even not finite?
21:42 uglyfigurine joined
21:43 <TheHoff> so my question is, what's the correct way to tell quickCheck to use finite strings, or maybe limit the length of the strings
21:47 <acarrico> Is there something wrong with this: (generate arbitrary) :: IO String
21:47 <acarrico> That gives me a random finite string.
21:49 <TheHoff> i don't know, this is for a course, we didn't learn about IO String yet
21:49 <TheHoff> so i guess it should be possible without it
21:51 <acarrico> (generate arbitrary) is polymorphic. I gave it the type (IO String) to specify what you asked for.
21:51 <acarrico> In ghci, use :t generate, and :t arbitrary
21:51 <acarrico> To see their types.
21:52 <acarrico> (generate arbitrary) :: IO Int will give you an arbitrary Int.
21:52 hiratara joined
21:53 <TheHoff> ohh sorry, i was confused because of that IO.. i have seen it a few times, but still don't know what it means, since we never had to use it in our course
21:53 <acarrico> Or try: sample (arbitrary :: Gen String)
21:53 <acarrico> To see a few random strings.
21:54 <acarrico> In this case, IO gives arbitrary a source of randomness.
21:55 juanpaucar joined
21:55 <TheHoff> i feel stupid, but i don't know where and how to try sample (arbitrary :: Gen String)
21:55 <TheHoff> we have to use hugs... maybe sample isn't included in this runtime (it's from 2006)
21:55 <acarrico> Do you have the ghci interpreterL
21:56 <TheHoff> no, hugs, unfortunately our teacher wants us to use hugs instead of ghci
21:56 <acarrico> I haven't tried hugs, but it probably has an interpreter where you can mess around with expressions. You'll never get a feel for what is going on without playing around.
21:57 <acarrico> Especially with quickcheck, which is a little strange when you are new to typeclasses. I'm a beginner too, so I feel your pain.
21:57 <acarrico> Things will start falling into place if you keep trying, keep a clear head.
21:57 <TheHoff> yeah, i always play around with the hugs interpreter ^^
21:58 <acarrico> Hopefully it has a command to show you the type of things like arbitrary, generate, and sample.
21:59 <TheHoff> yes, it's like you said :t
21:59 <acarrico> The type of arbitrary is Arbitrary a => Gen a, remember that means it has type Gen for any a with an Arbitrary instance.
22:00 <acarrico> Good luck :).
22:00 <TheHoff> thx :)
22:00 <Akii> @karma+ acarrico
22:00 <lambdabot> acarrico's karma raised to 1.
22:01 <acarrico> The reason you can't just "get your hands" on stuff in QuickCheck is that it always needs to run in context with randomness. Hence IO.
22:03 <TheHoff> @karam+ acarrico
22:03 <lambdabot> Maybe you meant: karma+ karma
22:03 <Cale> TheHoff: Who is your teacher? I'm curious who is still using hugs...
22:03 <TheHoff> @karma+ acarrico
22:03 <lambdabot> acarrico's karma raised to 2.
22:03 <Cale> Hugs stopped being maintained over a decade ago now
22:04 <Cale> Last version was 2006
22:04 <TheHoff> Cale: Well.. the course is held in a technical university of some european country :D i don't want to blackmail some professor, because i think he is a nice person etc.
22:04 <Cale> haha
22:04 <TheHoff> i know Cale
22:04 <Cale> fair enough
22:04 <TheHoff> the reason we use it is
22:04 <Akii> @karma+ TheHoff
22:04 <lambdabot> TheHoff's karma raised to 1.
22:04 <TheHoff> because we don't have to set any parameters etc. so it wil run on our home machine exactly like on their machines
22:04 <Akii> :D
22:04 <glguy> The professor asked you not to reveal that he's having you use Hugs?
22:05 <Cale> That's interesting. I wonder what is meant by that :)
22:05 <TheHoff> Cale.. yea me too, it's not like we could use a makefile for that
22:05 <TheHoff> i have never tried ghci, so i don't know if there are so many parameters to set
22:05 <Cale> Well, also, GHC is typically pretty consistent about how it builds things, even across different platforms
22:06 <Cale> The frontend of the compiler will be the same no matter where you're building the code
22:06 <TheHoff> i thought so
22:06 <TheHoff> but no one except the professor can change the environment used in the course
22:07 <Akii> that all sounds a bit weird
22:07 <Cale> Heh, he should use nix
22:08 <TheHoff> well i guess it's not that important for him to use the newest compiler, since it wont affect much of the things we learn
22:08 <glguy> Someone mandating Hugs probably doesn't know about Nix
22:08 <Cale> hahaha
22:08 <Akii> what's this Nix thing anyway
22:08 <Akii> reading NixOS a lot
22:09 <kadoban> nix is nixOS's package manager, from what I understand. It can be used on other OSes (note: it's possible I'm wrong on much of that, haven't used it myself)
22:09 <Cale> TheHoff: That's probably true, but still, there are a lot of quality of life features that GHC has over Hugs, and it's rather nice to actually teach people how to set up an environment that *would* be usable for real world projects. :P
22:09 <Cale> kadoban: yes
22:09 <Cale> (you're correct, rather)
22:09 <TheHoff> yes, that's exactly what i was thinking
22:10 <Akii> so like stack/cabal?
22:10 <Cale> Akii: Nix is a package / build manager which hashes everything, and lets you obtain compiled packages by their hash.
22:10 <Akii> ah
22:10 <Cale> So it's like stack, but for your entire system
22:10 <Akii> fast stack/cabal :D
22:10 <Cale> It makes deployment really fun
22:11 juanpaucar joined
22:11 <Akii> never ran into real issues there, timewise but I see where this is going
22:12 <Cale> We just requisition an AWS machine running NixOS, and use nix-copy-closure to set up a complete image of our project which works in a reproducible and consistent fashion.
22:12 <Cale> Even if we return to a project years later, we'll have some guarantee that everything will work the same way
22:12 <Cale> because all the lower level dependencies are controlled
22:12 <Akii> every npms guys dream I guess
22:13 <Cale> It's also really nice to know that we're testing the same thing on our development machines as what really gets deployed
22:14 <Cale> Even though I'm running Linux Mint and other people on the team are using NixOS or whatever, I can drop into a shell in which basically everything but my kernel is identical to production.
22:14 <dmj`> Cale: Does nix-copy-closure copy over the configuration.nix as well?
22:15 <dmj`> I assume there are nixos modules and things that need to be present in /etc/nixos/configuration.nix
22:15 <acarrico> Cale: I'm using nix for my Haskell env. I agree that it's the way to go.
22:17 louispan joined
22:18 <acarrico> Unfortunately you need to learn both cabal and nix, and it could be easier, but at least it works reliably, and you can check your env into version control in case you switch machines.
22:24 fotonzade joined
22:24 <Cale> dmj`: I believe it copies essentially the entire image -- it's actually a little weird that you need to be running nix on the machine beforehand.
22:27 <Cale> http://lpaste.net/2503349498386841600 -- how we deploy
22:28 <dmj`> Cale: yea, that is interesting. I assume moving the package from machine A’s /nix/store into B’s /nix/store would still require the same nixpkgs (and even that pkgs expressions) to be present on B (so it would know how to evaluate the package). I know with NixOS modules I still need to point my package on the local filesystem.
22:28 <dmj`> point to*
22:30 <dmj`> Cale: Ah! so you put it in the profile, very cool.
22:31 hiratara joined
22:33 <dmj`> Cale: Once I have a nixos machine, I just create a module and then call sudo nixos rebuild switch. This still necessitates specifying 2 versions of nixpkgs, one that NixOS uses (16.09 usually), and another for the nixpkgs the project uses :/
22:36 <dmj`> I’ve heard good things about nixos-rebuild —target-host
22:44 noumenon joined
22:56 reptar_ joined
22:58 malaclyps joined
23:10 stef204 joined
23:10 systemfault joined
23:19 Levex joined
23:23 sigmundv__ joined
23:33 cschneid_ joined
23:37 stef204 joined
23:46 NeverDie_ joined
23:47 Levex joined
23:51 NeverDie joined
23:51 stef204 joined
23:54 juanpaucar joined
23:57 vaibhavsagar joined