<    June 2018     >
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 _2_2 23  
24 25 26 27 28 29 30
00:00 emilypi joined
00:03 conal_ joined
00:16 Arcaelyx joined
00:16 TCZ joined
00:21 Linter joined
00:25 harfangk joined
00:33 louispan joined
00:34 progfun joined
00:42 Tauta0 joined
00:56 andreabedini joined
01:02 mounty joined
01:03 iAmerikan joined
01:16 mizu_no_oto_work joined
01:17 conal_ joined
01:29 conal_ joined
01:33 andreabedini joined
01:42 iAmerikan joined
01:52 louispan joined
02:02 iAmerikan joined
02:05 louispan joined
02:17 louispan joined
02:21 Linter joined
02:23 nacon joined
02:33 AetherWind joined
02:34 progfun joined
02:39 louispan joined
02:45 iAmerikan joined
02:46 hphuoc25 joined
02:56 hphuoc25 joined
03:09 louispan joined
03:19 patbecich joined
03:36 hphuoc25 joined
03:45 andreabedini joined
03:47 hphuoc25 joined
03:52 piti joined
03:57 patbecich joined
03:59 conal_ joined
04:01 Linter joined
04:07 conal_ joined
04:16 conal_ joined
04:21 malaclyps joined
04:26 hphuoc25 joined
04:31 conal_ joined
04:34 malaclyps joined
04:39 Cale joined
04:42 jud joined
04:52 obi_jan_kenobi_ joined
04:59 hphuoc25 joined
05:09 hphuoc25 joined
05:12 slomo joined
05:12 slomo joined
05:26 jccp joined
05:32 ToffeeYogurtPots joined
05:41 dxld joined
05:51 patbecich joined
05:55 progfun joined
06:04 patbecich joined
06:15 hamishmack joined
06:18 john joined
06:35 hphuoc25 joined
06:53 nickolay_ joined
07:02 sQVe joined
07:05 thc202 joined
07:07 louispan joined
07:09 fabsn joined
07:10 dejanr joined
07:24 lumm joined
07:28 zakora joined
07:32 Folkol joined
07:49 hphuoc25 joined
08:00 curious_corn joined
08:07 hphuoc25 joined
08:09 vurtz joined
08:11 taumuon joined
08:14 Pupnik joined
08:23 hphuoc25 joined
08:24 harfangk joined
08:25 curious_corn joined
08:31 zero_byte joined
08:36 bbrodriguez joined
08:47 hphuoc25 joined
08:48 Basu joined
08:48 progfun_ joined
08:48 <Basu> @dminuoso: I ended up mocking my input and output functions, I pass in functions that write to a file and read the commands from a file
08:48 <lambdabot> Unknown command, try @list
08:48 <Basu> dminuoso: I ended up mocking my input and output functions, I pass in functions that write to a file and read the commands from a file
08:49 Folkol joined
08:49 <dminuoso> Basu: Im curious to see how you did that.
08:49 <Basu> yep sharing the code now
08:49 <dminuoso> Basu: By the way, I still think testing runCommand would have been enough, since you can simply pass it `:q` and assert that it must produce some ReplQuit result.
08:50 <Basu> alright I will be back from the standup and share the code :D
08:51 curious_corn joined
08:54 kapil___ joined
08:57 fabsn_ joined
08:59 b-b joined
08:59 merijn joined
09:00 progfun joined
09:04 curious_corn_ joined
09:06 Folkol joined
09:06 harfangk joined
09:07 hphuoc25 joined
09:10 aijony joined
09:14 <Basu> dminuoso: https://lpaste.net/373412737411186688
09:14 <Basu> Let me know your thoughts
09:15 sns joined
09:20 <dminuoso> Basu: Use `when` instead of those `if ... then ... else return ()`
09:21 <Basu> dminuoso: Cool surely, I guess that was a noob Haskell mistake :facepalm: will change it
09:21 Jacoby6000 joined
09:22 nD5Xjz joined
09:22 <Basu> also do you think its idiomatic Haskell? I know its not completely point free, but thats what my next effort is going to be
09:27 dadabidet joined
09:27 sulan_ joined
09:32 Folkol joined
09:33 hphuoc25 joined
09:37 curious_corn joined
09:39 <dminuoso> Basu: Im not the best to judge the quality of your code. Beyond the lack of `when` I dont see anything glaringly wrong.
09:39 <dminuoso> The usage of `seq` is a bit weird. Dont use lazy IO if you dont want it?
09:40 <Basu> dminuoso: yeah thats a bit of a gray area for me, I wasn't sure how to do non lazy IO in Haskell
09:40 <Basu> I certainly don't need lazy IO
09:40 <merijn> Basu: It's really hard to lazy IO, tbh
09:40 <merijn> Basu: Despite people's ideas there's only like 3 or 4 lazy IO functions in base
09:41 <merijn> Basu: 95% of IO operations in base are not lazy
09:42 emilypi joined
09:42 <merijn> If you use strict ByteString/Text those have a readFile which is not lazy
09:50 curious_corn joined
09:58 curious_corn joined
10:01 mortum5 joined
10:03 Folkol joined
10:03 fabsn joined
10:08 rzp joined
10:12 hphuoc25 joined
10:34 matsurago joined
10:51 emilypi joined
10:56 louispan joined
11:01 vurtz joined
11:06 Basu joined
11:07 Basu_ joined
11:08 <Basu> dminuoso: I have trouble connecting to this irc, my webpage keeps disconnecting and I lose all the history :(
11:12 pie_ joined
11:14 pfurla joined
11:17 <merijn> Basu: Might wanna download a dedicated IRC client? :)
11:18 <Basu> merjin: I just downloaded Colloquy on Mac any other recommendations? Have been primarily using Slack at work
11:19 <Basu> merijn: Sorry mis-spelt your name there
11:20 <merijn> Personally I use irssi, but that's commandline and not very friendly for non-power users :)
11:20 hphuoc25 joined
11:26 curious_corn joined
11:31 <cppxor2arr> weechat?
11:34 kmelva joined
11:36 malaclyps joined
11:43 louispan joined
11:44 fueqw joined
11:47 kmel joined
11:58 lumm joined
11:59 kmelva joined
12:04 Basu joined
12:19 LKoen joined
12:26 szymon joined
12:28 progfun joined
12:36 machined1od joined
12:40 hphuoc25 joined
12:44 grdryn joined
12:45 kapil___ joined
12:54 lumm joined
12:56 abhiroop joined
13:09 lumm joined
13:13 will_ joined
13:15 carlomagno joined
13:19 jsondavis joined
13:22 iAmerikan joined
13:23 pbrant joined
13:23 mud joined
13:33 Folkol joined
13:36 lumm joined
13:40 curious_corn joined
13:44 curious_corn_ joined
13:48 pie_ joined
13:57 justaguest joined
13:59 progfun joined
14:02 drbrule joined
14:13 matsurago joined
14:15 skeet70 joined
14:23 Gurkenglas joined
14:28 iAmerikan joined
14:34 emilypi joined
14:40 pancets joined
14:41 curious_corn joined
14:45 iAmerikan joined
14:49 progfun joined
14:54 rbutler joined
14:54 progfun joined
14:55 Deide joined
14:56 Basu joined
14:59 hphuoc25 joined
14:59 Deide joined
15:03 abhiroop joined
15:03 chrisdotcode joined
15:13 jsondavis joined
15:14 TCZ joined
15:19 hsa joined
15:24 jsondavis joined
15:28 conal_ joined
15:29 jsondavis joined
15:32 fabsn joined
15:40 hphuoc25 joined
15:43 jsondavis joined
15:45 Akii joined
15:46 vurtz joined
15:49 obi_jan_kenobi_ joined
15:50 nacon joined
15:50 nacon joined
15:55 Akii joined
16:01 kapil___ joined
16:07 conal_ joined
16:09 conal_ joined
16:09 Jackneill joined
16:12 jkachmar joined
16:13 Akii joined
16:17 Gurkenglas joined
16:17 cschneid joined
16:29 Deide joined
16:33 abhir00p[m] joined
16:36 obi_jan_kenobi__ joined
16:42 aarvar joined
16:47 sudoreboot[m] joined
16:47 timdeh[m] joined
16:47 razvanc-r[m] joined
16:47 guifipedro[m] joined
16:47 spectrumgomas[m] joined
16:47 dyce[m] joined
16:47 onaka[m] joined
16:47 anaxios joined
16:47 thekyriarchy joined
16:47 jmorriss[m] joined
16:47 orbital__ joined
16:47 unclechu joined
16:47 equalunique[m] joined
16:47 tehnix[m] joined
16:47 dkellner[m] joined
16:47 M-wamaral joined
16:47 agates joined
16:49 emilypi joined
16:52 bbrodriguez joined
16:58 jsondavis joined
16:58 hphuoc25 joined
17:14 emilypi joined
17:21 lumm joined
17:27 LKoen joined
17:31 MomusInvictus joined
17:33 Ariakenom joined
17:45 johnnyv256 joined
17:47 blabber joined
17:48 Folkol joined
17:49 nickolay_ joined
17:49 gnusosa joined
17:49 gnusosa joined
17:49 habbah joined
17:57 obi_jan_kenobi__ joined
17:59 lumm joined
18:01 curious_corn joined
18:19 replay joined
18:19 Cale joined
18:21 sbrg joined
18:21 sbrg joined
18:22 ducky joined
18:23 Gurkenglas joined
18:28 zero_byte joined
18:30 TCZ joined
18:36 kmelva joined
18:38 <ducky> Hi all, I start with Haskell and I don't understand the method signature of length : "length :: Foldable t => t a -> Int" What the "a" means here?
18:39 conal_ joined
18:39 <ducky> Why the signature is not only "length :: Foldable t => t -> Int" ?
18:40 <glguy> 'a' and 't' are type variables. The Foldable typeclass is parameterized over a type with kind (* -> *)
18:40 <glguy> like [] and Maybe have
18:40 <glguy> To get a type that can have values you have to apply that 't' to another type with kind *
18:40 <glguy> any type will do in this case, so it's an unconstrained 'a'
18:46 <ducky> Ah ok, so "a" is the parameter and is typeclasse is Foldable ? I'm confuse because some signature look like : "max :: Ord a => a -> a -> a"
18:47 <ducky> But it's because Foldable is a typeclass and Ord is a type right?
18:47 <glguy> No, there are two different type variables in the type of 'length'
18:47 curious_corn joined
18:47 <glguy> Foldable and Ord are both typeclasses
18:47 <glguy> but Foldable is a typeclass for types with kind * -> *, while Ord is a typeclass for types with kind *
18:49 <glguy> So examples of types that are Foldable are: Either Int, Maybe, []. These all have kind * -> * and you can apply them to another type: Either Int Bool, Maybe Char, [Char]
18:49 <glguy> while Ord is a typeclass for types with kind *, Either Int Bool, Char, [Word], ()
18:50 <ducky> I don't get the part "kind ..."
18:51 <glguy> values have types that tell us how those values can be used together. Types have kinds that tell us how those types can be used together
18:52 <glguy> so a function: plusTwo :: Int -> Int , the value plusTwo has the type Int -> Int, which tells us that we can apply it to a value that has the Int type
18:52 <glguy> A type like Either Int :: * -> * has the kind * -> * which tells us we can apply it to another type with * kind
18:52 <glguy> so (Either Int) Bool is OK
18:54 <glguy> In standard haskell there are two basic kinds, * or if k1 and k2 are kinds, then k1 -> k2 is a kind
18:54 <glguy> * is the kind for types that have values
18:54 <glguy> the arrow kind is the kind for types that need to be applied to another type
18:56 <glguy> (arrow meaning the -> )
18:56 <ducky> I get this on functions, plusTwo :: Int -> Int is clear (I think) for me, that if I should pass an Int to plusTwo and I get an Int when the function return, but for types...
18:56 <glguy> its exactly the same
18:56 <glguy> with a type with kind * -> * you should pass in a type with kind * (the left side of the arrow) to get a type with kind * (the right side of the arrow)
18:58 patbecich joined
18:58 <ducky> ok, so what does that mean for a Foldable ?
19:07 <Cale> So if lists didn't have special notation for their type, perhaps we would write the specialised type of length as List a -> Int
19:08 <Cale> (and we could if we wanted define our own type of lists like that)
19:08 lumm joined
19:08 <Cale> data List a = Nil | Cons a (List a)
19:08 <Cale> So, then we could write an instance Foldable List where ...
19:09 <Cale> and length would work with our new List type
19:11 <ducky> I think I need to continue to read my book, maybe after learn how to create custom type it will be clear
19:12 <Cale> ducky: Yeah
19:12 <Cale> ducky: It used to be simpler, just length :: [a] -> Int
19:13 <Cale> ducky: But it was decided to make this generalisation of that the default a few versions back
19:14 <Cale> where we generalise the [] type constructor for lists to a more arbitrary thing
19:14 <ducky> Ok, thank you guys for your explanation, I'll be back :)
19:47 conal_ joined
19:51 patbecich joined
20:01 lumm joined
20:02 hyperisco joined
20:08 bbrodriguez joined
20:09 LKoen joined
20:16 lumm joined
20:27 Arcaelyx joined
20:35 patbecich joined
20:46 obi_jan_kenobi__ joined
20:54 ralu joined
21:01 patbecich joined
21:05 iAmerikan joined
21:07 abhir00p[m] joined
21:16 hamishmack joined
21:19 LKoen joined
21:23 guifipedro[m] joined
21:23 razvanc-r[m] joined
21:23 timdeh[m] joined
21:23 sudoreboot[m] joined
21:23 onaka[m] joined
21:23 dyce[m] joined
21:23 spectrumgomas[m] joined
21:23 anaxios joined
21:23 equalunique[m] joined
21:23 jmorriss[m] joined
21:23 orbital__ joined
21:23 thekyriarchy joined
21:23 unclechu joined
21:23 tehnix[m] joined
21:23 agates joined
21:23 dkellner[m] joined
21:23 M-wamaral joined
21:28 conal_ joined
21:37 lumm joined
21:37 replay joined
21:43 duncan_ joined
21:43 duncan_ joined
21:52 hiratara joined
21:56 conal_ joined
22:00 lumm_ joined
22:01 Gurkenglas joined
22:07 duncan^ joined
22:07 duncan_ joined
22:08 moei joined
22:12 vurtz joined
22:31 hiratara joined
22:35 xpycm joined
22:58 emilypi joined
23:14 _ikke_ joined
23:20 cschneid joined
23:28 conal_ joined
23:34 abhir00p[m] joined
23:41 _ikke_ joined
23:45 Linter joined
23:48 timdeh[m] joined
23:48 spectrumgomas[m] joined
23:48 guifipedro[m] joined
23:48 dyce[m] joined
23:48 sudoreboot[m] joined
23:48 onaka[m] joined
23:48 thekyriarchy joined
23:48 unclechu joined
23:48 razvanc-r[m] joined
23:48 equalunique[m] joined
23:48 jmorriss[m] joined
23:48 anaxios joined
23:48 orbital__ joined
23:48 tehnix[m] joined
23:48 M-wamaral joined
23:48 agates joined
23:48 dkellner[m] joined
23:55 acarrico joined