<    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 _2_4 25  
26 27 28 29 30 31
00:01 justicefries joined
00:06 andrei_chiffa__ joined
00:12 jmnk joined
00:29 contiver_ joined
00:31 NoCreativity joined
00:35 Rizy joined
00:35 Pupnik joined
00:43 ljc joined
00:47 louispan joined
00:55 jmnk joined
01:16 hexagoxel joined
01:18 mjs2600 joined
01:22 jmnk joined
01:26 mac10688 joined
01:30 wedens joined
01:37 conal joined
01:38 andrei_chiffa_ joined
01:40 mengu joined
01:48 contiver_ joined
01:49 suls joined
01:51 Rizy joined
01:54 contiver_ joined
01:54 mjs2600 joined
02:05 pie_ joined
02:06 vadimich joined
02:07 rkrishnan joined
02:12 kadoban joined
02:14 GlobalAtom left
02:16 parsnip0 joined
02:17 parsnip joined
02:17 parsnip joined
02:20 Rizy joined
02:22 cschneid_ joined
02:30 MotherFlojo joined
02:32 \Mike joined
02:33 l_coal joined
02:33 l_coal joined
02:41 mengu joined
02:46 Rizy joined
02:50 flounders joined
02:58 conal joined
03:01 Foras joined
03:01 hexagoxel joined
03:04 mengu joined
03:08 andyhoang joined
03:08 greenbird joined
03:12 jmnk joined
03:14 mjs2600 joined
03:20 systemfault joined
03:27 argent0 joined
03:28 argent0 left
03:31 MotherFlojo joined
03:32 vadimich joined
03:44 Rizy joined
03:46 aarvar joined
03:46 MotherFlojo joined
03:50 ljc joined
03:55 uglyfigurine joined
04:02 exferenceBot joined
04:02 MotherFlojo joined
04:05 lspitzner joined
04:06 mengu joined
04:06 hexagoxel joined
04:08 netheranthem joined
04:14 unmanbearpig joined
04:16 eacameron joined
04:19 mjs2600 joined
04:29 systemfault joined
04:29 eacameron joined
04:54 louispan joined
05:02 conal joined
05:14 unmanbearpig joined
05:15 mengu joined
05:20 jmorris joined
05:26 wedens joined
05:27 freechips joined
05:28 hexagoxel joined
05:39 systemfault joined
05:43 jmorris joined
05:44 jsoo joined
05:52 michbad joined
05:55 wedens joined
06:00 NoCreativity joined
06:02 hexagoxel joined
06:02 Rizy joined
06:09 blissdev joined
06:12 moei joined
06:16 unmanbearpig joined
06:18 MotherFlojo joined
06:27 geekosaur joined
06:30 hphuoc25 joined
06:32 MotherFlojo joined
06:33 diamat joined
06:41 hexagoxel joined
06:45 eacameron joined
06:48 MotherFlojo joined
06:53 wedens joined
06:58 cschneid_ joined
07:03 nil_ joined
07:06 zero_byte joined
07:10 Rizy joined
07:17 unmanbearpig joined
07:19 uglyfigurine joined
07:26 <nil_> People keep defining types like newtype Jambalaya m a b = Jambalaya { runJambalaya :: a -> m b }. Is the reason for using "newtype" instead of "type" the fact that the latter doesn't allow you to define custom typeclass instances (unless TypeSynonymInstances??)?
07:31 eacameron joined
07:31 <glguy> newtype makes a distinct type, hiding the underlying implementation
07:32 <glguy> that's good if you don't want the implementation leaking into other code
07:32 nomotif joined
07:32 <glguy> turning on TypeSynonymInstances doesn't make the instances it allows good ideas
07:33 <nil_> Example?
07:34 begriffs joined
07:35 wedens joined
07:38 louispan joined
07:47 MotherFlojo joined
08:18 unmanbearpig joined
08:21 sigmundv joined
08:24 hexagoxel joined
08:31 hphuoc25 joined
08:36 rkrishna` joined
08:36 louispan joined
08:37 Rizy joined
08:45 malaclyps joined
08:46 begriffs joined
08:47 hexagoxel joined
08:51 zero_byte joined
08:59 owiecc joined
09:11 contiver_ joined
09:15 hexagoxel joined
09:18 unmanbearpig joined
09:23 delexi joined
09:23 unmanbearpig joined
09:26 louispan joined
09:33 binaryplease joined
09:37 unmanbearpig joined
09:48 kritzcreek_ joined
09:48 pie_ joined
09:54 louispan joined
10:00 Gurkenglas joined
10:04 hexagoxel joined
10:09 zipper joined
10:33 hphuoc25 joined
10:43 thc202 joined
10:54 geekosaur joined
10:59 cschneid_ joined
11:03 hoffmeyer joined
11:10 louispan joined
11:16 MotherFlojo joined
11:27 albertus1 joined
11:34 hphuoc25 joined
11:40 hoffmeyer joined
11:43 louispan_ joined
12:06 MarcelineVQ joined
12:17 dni- joined
12:17 zero_byte joined
12:19 jrm joined
12:30 hphuoc25 joined
12:33 stef204 joined
12:40 mjs2600 joined
12:41 tsmish joined
12:44 boris_rh joined
12:44 sarkin joined
12:48 owiecc joined
12:56 boris_rh joined
13:03 nirvinm joined
13:06 Foras joined
13:14 louispan joined
13:17 MotherFlojo joined
13:17 nirvinm left
13:22 Deide joined
13:30 hphuoc25 joined
13:34 vadimich joined
13:35 vadimich joined
13:40 shayan_ joined
13:41 netheranthem joined
13:41 zero_byte joined
13:43 andrei_chiffa__ joined
13:46 nadirs joined
13:59 andrei_chiffa_ joined
14:02 zero_byte joined
14:11 fading joined
14:13 muesliLoops joined
14:18 wildlander joined
14:23 <muesliLoops> How can I run a function 'f' of type IO () n times, I came up with 'fmap (replicate n) f' but it seems to run it only once, can I get some help please
14:23 <sbrg> :t replicateM
14:24 <lambdabot> Applicative m => Int -> m a -> m [a]
14:24 <sbrg> :t replicateM_
14:24 <lambdabot> Applicative m => Int -> m a -> m ()
14:27 <muesliLoops> Thanks, this seems to do exactly that.
14:32 Rizy joined
15:13 tom7942 joined
15:18 MotherFlojo joined
15:34 pilne joined
15:47 ilja_kuklic joined
15:48 vctrh joined
15:48 carlomagno joined
15:49 <* vctrh> re-reading applicative chapter of haskellbook ...
15:52 lithie joined
16:02 owiecc joined
16:05 kritzcreek_ joined
16:14 tom7942 joined
16:19 Rizy joined
16:26 deank joined
16:35 NoCreativity joined
16:45 gabluc_ joined
16:45 zero_byte joined
16:54 freechips joined
17:13 nyuszika7h joined
17:14 nyuszika7h joined
17:19 MotherFlojo joined
17:22 zero_byte joined
17:26 owiecc joined
17:42 andrei_chiffa__ joined
17:54 contiver joined
18:09 hoffmeyer joined
18:11 Miroboru joined
18:15 tsmish joined
18:23 tom7942 joined
18:27 NemesisD joined
18:29 lspitzner joined
18:37 conal joined
18:54 lspitzner joined
18:58 MotherFlojo joined
18:58 flounders joined
19:00 mthek joined
19:00 systemfault joined
19:25 dni-_ joined
19:31 nacon joined
19:31 nacon joined
19:35 louispan joined
19:39 lspitzner joined
19:39 sigmundv joined
19:40 Deide joined
19:41 wildlander joined
19:48 carlomagno joined
20:01 sigmundv_ joined
20:03 dni- joined
20:10 dni-_ joined
20:10 conal joined
20:12 <jrm> Hi. What's the meaning behind the names x and xs? Sometimes xs refers to tail, like (x:xs) and other times it refers to the whole list like xs@(x:y:ys). I understand it's just a convention. I'm just curious.
20:13 <geekosaur> "xs" as "plural of x"
20:14 <jrm> Oh, of course. Thanks.
20:14 <geekosaur> but you can think of it as "a list of x"
20:23 tom7942 joined
20:25 michbad joined
20:34 Kuros joined
20:36 hphuoc25 joined
20:41 dni- joined
20:43 <qu1j0t3> @karma+ geekosaur
20:43 <lambdabot> geekosaur's karma raised to 43.
20:54 hphuoc25 joined
20:57 smichel17 joined
21:02 myrkraverk joined
21:03 taksuyu joined
21:04 jarshwah_ joined
21:04 takle_ joined
21:04 jud^ joined
21:05 Kuros` joined
21:05 emmanuel` joined
21:06 metalbot joined
21:06 Deaddy_ joined
21:07 aminb joined
21:08 damason joined
21:12 Ak2i joined
21:13 pdgwien joined
21:17 aarvar joined
21:18 bluepixel joined
21:18 nomotif joined
21:18 andrei_chiffa_ joined
21:18 delexi joined
21:18 jmnk joined
21:18 nille joined
21:18 abcxyz123robert joined
21:18 Tene joined
21:18 brennie joined
21:18 condy joined
21:18 surtn joined
21:18 <jrm> Here is a modification of an example from the 'Learn You a Haskell' book. http://ftfl.ca/paste/bmiTell.html Why does .. ++ show bmi ++ .. cause an error?
21:19 zipper joined
21:20 jimcroft joined
21:21 <geekosaur> jrm, because that's when typechecking realizes that no type has both a RealFloat and an Integral constraint
21:21 <geekosaur> :t (^)
21:21 <lambdabot> (Num a, Integral b) => a -> b -> a
21:21 <geekosaur> wait, no
21:21 <geekosaur> that one should be fine, it;s got Num
21:22 <geekosaur> (I tend to avoid (^) when any non-Integral is involved, but it;s really thepowers that hav e that constraint)
21:23 Bane^ joined
21:23 <geekosaur> oh, right, ghc's dialect of Haskell lost the Show constraint on Num
21:24 <geekosaur> so general Haskell learning resources --- and LYAH, which predates that change --- won't tell you that you need a Show constraint in the type of bmiTell along with the RealFloat constraint
21:25 <geekosaur> just change the constraint to be: (RealFloat a, Show a) => ...
21:25 <jrm> Thanks again geekosaur. :)
21:25 <geekosaur> we have been trying to reach the author of LYAH for several years about that and other changes...
21:26 <jrm> His example didn't include the show part. That was part of the modification I mentioned above.
21:26 Levex joined
21:26 <geekosaur> yes, because it wasn;t needed then
21:27 <geekosaur> Num and all "subclasses" (like RealFloat) already had the Show constrant
21:27 <geekosaur> (they also had an Eq constraint, so you wll occasionally run into the same issue but with Eq instead of Show)
21:27 <jrm> Understood. I'm just saying that his bmiTell example would still work now.
21:27 <jrm> Good to know.
21:28 <jrm> The error ghci reports makes sense to me now too.
21:30 <jrm> @karma+ geekosaur
21:30 <lambdabot> geekosaur's karma raised to 44.
21:31 <geekosaur> btw we don;t actually use karma much
21:31 <geekosaur> I think most of those are from 2006-2007 which is the last time anyone bothered
21:31 <jrm> Ah.. I'm new here. :)
21:32 senorchang joined
21:34 boris_rh joined
21:37 patbecich joined
21:41 NoCreativity joined
21:44 ali_bush joined
21:44 mizu_no_oto_work joined
21:49 wildlander joined
21:51 contiver joined
21:52 bluepixel joined
21:53 hiratara joined
22:01 contiver_ joined
22:02 Sose_ joined
22:02 earldouglas joined
22:02 micro_ joined
22:02 bydo joined
22:02 Hotkeys joined
22:02 rlr joined
22:02 mounty joined
22:03 jimcroft joined
22:03 boris_rh joined
22:04 louispan joined
22:15 smichel17 joined
22:18 <jrm> Another example (this time verbatim) from LYAH seems to have a problem. http://ftfl.ca/paste/lyh_e2.html
22:19 <jrm> Er, the verbatim example has a different type signature, but the error is the same with the one above.
22:19 <geekosaur> that will likely be what I was talking about
22:19 <geekosaur> hm, no
22:20 <geekosaur> compiles as is here?
22:20 <geekosaur> but if you call it at a place that requires Show, and nothing else requires Show, you could still get it
22:21 <geekosaur> so, just to explain what is going on here: typeclasses are not classes like you'd have in OO languages
22:21 <jrm> Yeah, my fault. I was calling it wrong.
22:22 <geekosaur> under the covers, they turn into a record of functions. so RealFloat a => ... tells the compiler that all callers must pass a record containing the type a's functions that implement the RealFloat "methods"
22:22 ebsen joined
22:23 <geekosaur> so you always need to specify the typeclass functions you use in the type (althoygh you can skip it if another constraint provides it already; as I said, ghc did when LYAH was written, but nowadays you must specify Eq and/or Show explicitly)
22:23 <geekosaur> there's nothing like virtual functions in C++ that carry them around in an instance/value
22:23 tom7942 joined
22:24 <geekosaur> virtual methods, sorry
22:26 sigmundv joined
22:27 <jrm> It's starting to make sense. intero-mode's `Insert a type signature for the thing at point` is handy for a beginner like me.
22:28 binaryplease joined
22:31 hiratara joined
22:35 shayan_ joined
22:35 binaryplease1 joined
22:37 MotherFlojo joined
22:41 Nomenclatura joined
22:43 Nomenclatura_ joined
22:48 geraldodev joined
22:54 louispan joined
22:56 patbecich joined
23:08 contiver_ joined
23:15 Nik05 joined
23:15 Pupnik joined
23:24 hphuoc25 joined
23:39 zgrepc joined
23:53 eacameron joined
23:54 mengu joined
23:59 Chobbes joined