<    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:06 patbecich joined
00:06 louispan joined
00:14 splanch joined
00:24 eacamero_ joined
00:24 vicfred joined
00:25 eacameron joined
00:25 eacamero_ joined
00:31 sypwex joined
00:41 sypwex joined
00:45 MotherFlojo joined
00:55 sypwex joined
00:55 eacameron joined
01:05 sypwex joined
01:09 Rodya_ joined
01:10 eacameron joined
01:14 eacameron joined
01:18 eacamero_ joined
01:19 sypwex joined
01:21 Rodya__ joined
01:48 irclogger_com joined
01:48 Topic for
01:49 splanch joined
01:53 <boxscape> oooh, pattern matching in let gets translated into a case expression, doesn't it?
01:53 <boxscape> oh wait
01:53 <boxscape> I wanted to write this in #haskell
01:53 <boxscape> but it doesn't really make a difference
01:55 <boxscape> think I finally found out why it makes sense that guards in let expressions are treated differently from guards in case expressions
01:55 Youmu joined
01:59 <boxscape> no, nevermind, figuring out that pattern matching gets translated into case doesn't actually help with that
02:00 <boxscape> (talking about the difference between `case 4 of a | even a -> a` and `let a | even a = 4 in a`)
02:04 <benzrf> boxscape: let is lazier than case
02:06 <benzrf> > case undefined of 0 -> "zero!"; _ -> "something else!"
02:06 <lambdabot> "*Exception: Prelude.undefined
02:06 <benzrf> er, actually, better example -
02:06 <boxscape> benzrf: this doesn't seem, to me, like a case of strict vs lazy - after all, we need the a in either case. Koterpillar in #haskell explained it as a difference between `let a = if even a then 3 else error "partial" in a` and `(\a -> if even a then a else error "partial") 4`, which makes sense to me, but it still seems that guards are treated specially in let expressions
02:06 <benzrf> > case undefined of (a, b) -> 3
02:06 <lambdabot> *Exception: Prelude.undefined
02:06 <benzrf> > let (a, b) = undefined in 3
02:06 <lambdabot> 3
02:06 <benzrf> boxscape: oh, no yeah, this particular thing isn't a laziness issue
02:06 <benzrf> i was just mentioning that there's another difference :)
02:06 <boxscape> ah, fair enough :)
02:07 <benzrf> fyi, you get the let-style behavior in case using a tilde:
02:07 <benzrf> > case undefined of ~(a, b) -> 3
02:07 <lambdabot> 3
02:07 <boxscape> right, we talked about that a few hours ago in #haskell, actually
02:07 <benzrf> oh, heh
02:09 sypwex joined
02:12 MarcelineVQ joined
02:17 nomotif joined
02:18 sypwex joined
02:23 exferenceBot joined
02:26 shayan_ joined
02:28 hexagoxel joined
02:33 sypwex joined
02:42 sypwex joined
02:44 animated joined
02:46 MotherFlojo joined
02:52 Gurkenglas_ joined
02:56 conal joined
02:57 sypwex joined
02:59 uglyfigurine joined
03:16 hphuoc25 joined
03:18 takle joined
03:21 sypwex joined
03:23 conal joined
03:26 sypwex joined
03:29 dni- joined
03:30 sypwex joined
03:32 MotherFlojo joined
03:38 Atrumx joined
03:45 sypwex joined
03:45 takle joined
03:47 systemfault joined
03:47 splanch joined
03:50 sypwex joined
03:51 myrkraverk joined
03:52 sypwex1 joined
03:52 Lazersmoke joined
03:56 killtheliterate joined
04:04 conal joined
04:05 ebsen joined
04:05 splanch joined
04:07 takle joined
04:10 hphuoc25 joined
04:11 hphuoc25 joined
04:11 Rodya_ joined
04:15 chrissl joined
04:16 sypwex joined
04:22 kritzcreek_ joined
04:30 splanch joined
04:32 takle joined
04:34 sypwex joined
04:36 splanch joined
04:43 boxscape joined
05:00 conal joined
05:01 animated joined
05:03 conal joined
05:11 Rodya_ joined
05:18 yellowj joined
05:18 dni- joined
05:22 animated joined
05:27 meandi_2 joined
05:28 eacameron joined
05:36 Axman6 joined
05:38 splanch joined
05:41 eacameron joined
05:44 eacameron joined
05:48 eacamero_ joined
05:53 ThomasLocke joined
05:53 ThomasLocke joined
05:56 eacameron joined
05:58 systemfault joined
05:59 eacamero_ joined
06:01 ali_bush joined
06:03 splanch joined
06:10 t0by joined
06:13 Rodya_ joined
06:23 hdeshev joined
06:24 nomotif joined
06:31 takle joined
06:36 uglyfigurine joined
06:38 thc202 joined
06:39 malaclyps joined
06:39 takle joined
06:43 Pupnik joined
06:47 dni- joined
07:06 pbrant joined
07:07 suls joined
07:13 Rodya_ joined
07:19 hphuoc25 joined
07:21 takle joined
07:22 nacon joined
07:22 nacon joined
07:25 mattyw joined
07:31 sypwex joined
07:42 louispan joined
07:47 jud^ joined
07:50 Pupnik_ joined
07:50 gregman_ joined
07:52 geekosaur joined
08:01 binaryplease joined
08:03 Glooomy joined
08:12 peterbecich joined
08:15 grdryn joined
08:16 Rodya_ joined
08:17 smkz joined
08:17 Durz0 joined
08:30 binaryplease joined
08:32 nokomo joined
08:34 azahi joined
08:35 eacameron joined
08:48 louispan joined
08:50 sypwex joined
08:52 binaryplease1 joined
08:56 louispan joined
08:58 patbecich joined
09:02 zero_byte joined
09:07 hphuoc25 joined
09:08 patbecich joined
09:14 peterbecich joined
09:16 Rodya_ joined
09:17 kritzcreek_ joined
09:23 sypwex joined
09:24 Glooomy joined
09:33 louispan joined
09:41 takle joined
09:48 louispan joined
09:48 takle joined
09:53 salva0 joined
09:54 tuturto joined
10:00 jarshwah joined
10:07 splanch joined
10:09 corintho[m] joined
10:09 patbecich joined
10:12 pie_ joined
10:13 uglyfigurine joined
10:14 geekosaur joined
10:15 peterbecich joined
10:16 Gurkenglas_ joined
10:17 Rodya_ joined
10:18 binaryplease joined
10:29 sudoreboot[m] joined
10:29 dyce[m] joined
10:29 prose[m] joined
10:29 agates joined
10:29 unclechu joined
10:29 curry[m] joined
10:29 M-Sonata1 joined
10:31 hphuoc25 joined
10:40 Pupnik joined
10:40 uglyfigurine joined
10:49 <Geekingfrog> While reading https://samtay.github.io/posts/comonadic-game-of-life.html I got a class declaration with type and data keywords instead of the usual functions signatures. What are these?
10:50 <Geekingfrog> well, type, data, and then a bunch of function signatures actually.
10:52 <geekosaur> associated type and data families https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#type-families
10:53 <geekosaur> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#associated-data-and-type-families more direct
10:53 <Akii> nitrix: made Projection a contravariant functor for state, http://lpaste.net/354005
10:55 <Geekingfrog> geekosaur: what is a type index? Is there a simple way to sum up this concept without having to read the type families paper?
10:56 yellowj joined
10:56 splanch joined
10:57 <MarcelineVQ> start with the ghc manual if you have't, it should cover the idea fairly well, at least it tends to :>
10:57 <geekosaur> no, it hauled up "index" there without saying that the indexes are the parameters to the associated type/data family
10:57 <geekosaur> this is basically assuming you know some type theory
10:58 <MarcelineVQ> it does say that though
11:00 Glooomy joined
11:02 <* Geekingfrog> doesn't know any type theory
11:02 <Geekingfrog> Ok, I'll keep that for later then.
11:02 <* geekosaur> figured it pout from context, but.
11:07 binaryplease joined
11:10 patbecich joined
11:16 obh15 joined
11:16 peterbecich joined
11:18 Rodya_ joined
11:19 <obh15> guys if I have a function such that A -> IO (Maybe B) how would I operate it on [A] so the output would be IO (Maybe [B])
11:22 mengu joined
11:24 JoaoPortela joined
11:25 <ski> obh15 : `runMaybeT (mapM (MaybeT . my_function) my_list)', assuming you want to abort as soon as the action on any individual element aborts
11:26 JoaoPortela joined
11:26 <obh15> thanks!
11:27 sypwex joined
11:27 eacameron joined
11:27 afsasfasfsafd joined
11:28 <ski> `fmap ((\bs -> if null bs then Nothing else Just bs) . catMaybes) (mapM my_function my_list)' in case you only want a `Nothing' in case you get a `Nothing' for all (possibly zero) list elements, otherwise skipping the `Nothing's
11:28 <ski> obh15 ^
11:29 <ski> @type (\bs -> if null bs then Nothing else Just bs) . catMaybes
11:29 <lambdabot> [Maybe a] -> Maybe [a]
11:29 <ski> > ((\bs -> if null bs then Nothing else Just bs) . catMaybes) [Just False,Just True]
11:29 <lambdabot> Just [False,True]
11:29 <ski> > ((\bs -> if null bs then Nothing else Just bs) . catMaybes) [Just False,Nothing,Just True]
11:29 <lambdabot> Just [False,True]
11:29 <ski> > ((\bs -> if null bs then Nothing else Just bs) . catMaybes) [Nothing,Nothing]
11:29 <lambdabot> Nothing
11:29 <ski> > ((\bs -> if null bs then Nothing else Just bs) . catMaybes) []
11:29 <lambdabot> Nothing
11:30 <obh15> the first is one is fail fast right
11:30 <ski> right
11:30 <obh15> `runMaybeT (mapM (MaybeT . my_function) my_list)'
11:30 <obh15> thanks man
11:31 <ski> the first version is probably the most common to want, given your specified types
11:31 tangled_z joined
11:31 <ski> learning what `MaybeT' and `ExceptT' is useful for is good
11:41 Durbley joined
11:43 sypwex joined
11:59 contiver joined
12:09 xuxu joined
12:12 patbecich joined
12:15 moei joined
12:16 ederign joined
12:17 chlong joined
12:17 peterbecich joined
12:21 hphuoc25 joined
12:29 teppic joined
12:29 Gloomy joined
12:39 vaibhavsagar joined
12:40 boxscape joined
13:01 netheranthem joined
13:02 mojjo joined
13:03 sypwex joined
13:04 splanch joined
13:04 galderz joined
13:11 galderz joined
13:14 patbecich joined
13:18 peterbecich joined
13:19 splanch joined
13:19 Rodya_ joined
13:25 eacameron joined
13:26 galderz joined
13:29 ekinmur joined
13:32 hphuoc25 joined
13:44 takle joined
13:46 pbrant joined
13:49 Cale joined
13:53 Big_G joined
13:56 marvin2 joined
13:58 eacameron joined
13:59 eacameron joined
13:59 [k- joined
14:04 uglyfigurine joined
14:04 mengu_ joined
14:06 mengu_ joined
14:07 Rodya_ joined
14:08 howdoi joined
14:15 patbecich joined
14:16 sypwex joined
14:18 mengu joined
14:19 peterbecich joined
14:23 jmiven joined
14:27 ekinmur_ joined
14:32 jmiven joined
14:32 jathan joined
14:39 galderz joined
14:39 carlomagno1 joined
14:41 guampa joined
14:48 galderz joined
14:54 thallada joined
15:02 Gurkenglas_ joined
15:02 ekinmur joined
15:05 mizu_no_oto_work joined
15:16 patbecich joined
15:16 tjt joined
15:17 gabluc joined
15:20 peterbecich joined
15:27 <nitrix> Akii: You clever monkey.
15:28 <Akii> :D
15:28 <Akii> actually ended up removing the config
15:30 <nitrix> You made me work again on my relational library, which I know will lead to me working on my game again.
15:30 Glooomy joined
15:30 <Akii> win win :D
15:43 NoCreativity joined
15:46 MitchellSalad joined
15:58 splanch joined
16:02 conal joined
16:03 takle joined
16:11 dpren joined
16:14 mattyw joined
16:17 patbecich joined
16:17 hphuoc25 joined
16:21 peterbecich joined
16:21 rembo10 joined
16:28 Rodya_ joined
16:28 splanch joined
16:28 Rodya__ joined
16:30 sypwex joined
16:36 Denthir joined
16:36 simendsjo joined
16:36 mizu_no_oto_work joined
16:47 pie__ joined
16:49 chlong joined
16:51 M-Sonata1 left
16:52 sypwex joined
16:55 splanch joined
16:59 Denthir joined
17:01 t0by joined
17:09 peterbecich joined
17:16 yellowj joined
17:16 customminer joined
17:18 thallada joined
17:19 sypwex1 joined
17:21 xuxu left
17:21 patbecich joined
17:27 colt44 joined
17:28 exferenceBot joined
17:29 peterbecich joined
17:31 delexi joined
17:39 eacamero_ joined
17:48 pie__ joined
17:48 sypwex joined
17:49 tangled_z joined
17:51 peterbecich joined
17:53 tangled_z joined
17:53 Rodya_ joined
17:55 tangled_z joined
17:57 simendsj` joined
17:58 aarvar joined
18:00 m1dnight_ joined
18:15 tangled_z joined
18:15 <Gurkenglas_> <ski> obh15 : `runMaybeT (mapM (MaybeT . my_function) my_list)' <- you mean alaf MaybeT traverse :D
18:18 tangled_z joined
18:22 <nitrix> :t alaf
18:23 <lambdabot> (Rewrapped t s, Rewrapped s t, Functor g, Functor f) => (Unwrapped s -> s) -> (f t -> g s) -> f (Unwrapped t) -> g (Unwrapped s)
18:23 patbecich joined
18:23 <* nitrix> laughs nervously.
18:24 <boxscape> @index alaf
18:24 <lambdabot> bzzt
18:24 <nitrix> (Unwrapped s -> s) -- That looks funky to me.
18:25 <boxscape> bzzt doesn't seem to be a package. Where's that from?
18:26 <nitrix> Is it some form of lifting? How does it performs `t -> Unwrapped t` or `s -> Unwrapped s`
18:27 peterbecich joined
18:28 <nitrix> When the only other argument is of the form `Unwrapped s -> s` ?
18:29 <nitrix> Is it contravariant o.<
18:29 <nitrix> What about `t` ?
18:32 Denthir joined
18:32 <MarcelineVQ> idk https://hackage.haskell.org/package/lens-4.15.1/docs/src/Control.Lens.Wrapped.html#Wrapped
18:33 peterbec` joined
18:35 <MarcelineVQ> lots to learn there though, associated types and pattern synonyms and kind signatures and Iso and all sorts of jazz
18:37 <MarcelineVQ> *associate type synonyms
18:38 <MarcelineVQ> https://hackage.haskell.org/package/newtype-0.2/docs/Control-Newtype.html is probably more digestable
18:38 <MarcelineVQ> But maybe not by much, idk
18:39 hoffmeyer joined
18:40 moei joined
18:57 peterbec` joined
18:57 <glguy> It'll be more useful to learn about au and auf
18:58 <glguy> ala and alaf are just convienent wrappers for those
18:58 patbecich joined
18:58 <glguy> au :: Functor f => AnIso s t a b -> ((b -> t) -> f s) -> f a
19:01 sypwex joined
19:10 ExpHP joined
19:11 mengu joined
19:12 supersimmetria joined
19:12 <supersimmetria> hi
19:12 splanch joined
19:12 <supersimmetria> is there a more relevant contemporary equivalent to 'gentle introduction'?
19:15 peterbec` joined
19:21 detrumi joined
19:22 <nitrix> supersimmetria: If you can spare the money, http://haskellbook.com is my goto recommendation.
19:23 <nitrix> supersimmetria: Otherwise, these free courses online: https://github.com/bitemyapp/learnhaskell#how-should-i-learn-haskell
19:23 <supersimmetria> nitrix, thanks
19:24 sypwex joined
19:24 albertus1 joined
19:30 detrumi left
19:33 takle joined
19:35 teppic joined
19:38 uglyfigurine joined
19:39 <bitemyapp> supersimmetria: if you can't spare the money, email us.
19:40 splanch_ joined
19:40 Rodya_ joined
19:40 <supersimmetria> bitemyapp, ok
19:42 splanch joined
19:42 douglascorrea joined
19:43 splanch__ joined
19:46 splanch joined
19:54 splanch joined
19:56 animated joined
19:57 malaclyps joined
20:00 zero_byte joined
20:02 conal joined
20:09 nil_ joined
20:10 NoCreativity joined
20:11 sypwex joined
20:13 ExpHP joined
20:16 sypwex joined
20:21 animated joined
20:21 sypwex joined
20:22 splanch joined
20:24 peterbec` joined
20:33 nick_h joined
20:33 Denthir joined
20:34 peterbec` joined
20:39 jship joined
20:41 sypwex joined
20:44 peterbec` joined
20:46 Rodya_ joined
20:46 Rodya__ joined
20:48 ExpHP_ joined
20:50 sypwex joined
20:57 peterbec` joined
20:57 hoffmeyer joined
20:59 pie_ joined
21:04 sypwex joined
21:06 vitalij joined
21:06 splanch joined
21:07 <vitalij> How can I disable migrations in Yesod? I can't find the setting.
21:07 mojjo joined
21:09 sypwex joined
21:14 peterbec` joined
21:14 sypwex joined
21:16 <benzrf> vitalij: you might have more luck in #haskell
21:16 conal joined
21:16 <vitalij> benzrf, I found the answer myself at the end :-) Thanks!
21:22 azahi joined
21:22 <benzrf> oh :)
21:23 <bitemyapp> vitalij: it's in the main function probably
21:24 <bitemyapp> vitalij: there's one for running the app, one for the dev mode helpers (that you invoke from GHCi or Yesod Devel)
21:24 sypwex joined
21:27 <vitalij> bitemyapp, thank you! I see.
21:44 Denthir joined
21:44 yellowj joined
21:47 Rodya_ joined
21:52 hiratara joined
21:53 malaclyps joined
21:53 malaclyps joined
21:54 ExpHP_ joined
21:58 hoffmeyer joined
21:58 eacamero_ joined
22:01 shayan_ joined
22:26 conal joined
22:31 hiratara joined
22:34 uglyfigurine joined
22:34 splanch joined
22:41 peterbec` joined
22:41 louispan joined
22:51 peterbec` joined
22:52 eacameron joined
22:53 suls joined
22:57 louispan joined
22:58 hoffmeyer joined
23:00 sigmundv_ joined
23:01 peterbec` joined
23:01 NoCreativity joined
23:11 eacameron joined
23:13 conal joined
23:18 pie_ joined
23:19 Ferdirand joined
23:21 peterbec` joined
23:22 zero_byte joined
23:22 vaibhavsagar joined
23:26 louispan joined
23:34 Axman6 joined
23:44 dni- joined
23:55 rembo10 joined
23:59 hoffmeyer joined