<     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:14 halogenandtoast joined
00:16 Pupnik joined
00:16 saussure joined
00:24 im0nde joined
00:33 ianandrich joined
00:37 im0nde_ joined
00:39 malaclyps joined
00:43 acarrico joined
00:49 louispan joined
00:53 saussure joined
01:04 juanpaucar joined
01:11 saussure joined
01:16 <lpaste> saylu pasted “csv-conduit issue” at http://lpaste.net/355888
01:17 <saylu> Hey folks -- have a quick question around csv-conduit and decoding to Haskell types
01:28 hphuoc25 joined
01:29 saussure joined
01:35 acarrico joined
01:39 dni- joined
01:39 louispan joined
01:43 malaclyps joined
01:47 saussure joined
01:59 HallaSurvivor joined
01:59 saussure joined
02:00 saussure joined
02:02 <glguy> saylu: I don't know what's wrong with your paste, but it doesn't help when you truncate the error message
02:04 juanpaucar joined
02:05 daniel___ joined
02:13 <saylu> Sorry about that. The error message only goes on to say "in the use of readShareCSV, in the use of readCSVFile"
02:22 <glguy> saylu: It doesn't work because you dropped the "Named" component of the type
02:23 wei2912 joined
02:25 halogenandtoast joined
02:27 juanpaucar joined
02:30 Pupnik_ joined
02:44 exferenceBot joined
02:46 juanpaucar joined
02:48 hexagoxel joined
02:52 saussure joined
02:58 Pupnik joined
03:03 ianandrich joined
03:07 <saylu> sorry glguy -- had to step out
03:08 <saylu> for `ShareCSV` i'm decoding from a record, not a namedrecord
03:08 <saylu> so I can't use the "Named" type
03:09 <glguy> saylu: Which Csv instance do you think you're using?
03:09 <saylu> If I try to use Named, I get:
03:09 <saylu> "No instance for (FromNamedRecord ShareRow) arising from a use of 'readCSVFile'
03:09 <saylu> "In the expression: readCSVFile defCSVSettings fp"
03:09 <saylu> "In an equation for 'readShareCSV'
03:09 <glguy> Yeah, you'll need to add that instance
03:10 <glguy> Or to pick a difference CSV instance to use
03:10 <saylu> I was hoping this one haha
03:10 <saylu> CSV s (Row s) => CSV s (Vector s)
03:10 <saylu> My understanding was that I could only use `FromNamedRecord` if my csv has headers
03:10 <saylu> is that not right?
03:11 <glguy> Do you see how to use CSV s (Vector s), you require a CSV s (Row s)?
03:11 <glguy> Do you know how to see the available instances?
03:12 ekinmur joined
03:12 <saylu> Digging around in the docs right now
03:12 <saylu> I see this:
03:12 <saylu> type Row a = [a]
03:12 <saylu> (thanks for your help, by the way)
03:13 <saylu> Oh, I see
03:13 <saylu> Like this?
03:13 <saylu> https://hackage.haskell.org/package/csv-conduit-0.6.6/docs/src/Data-CSV-Conduit.html#line-159
03:13 <saylu> (v0.6.7 has a 404)
03:14 <glguy> I just refreshed the haddocks for csv-conduit
03:14 <glguy> You get stuff like per-instance source links now
03:15 zacts joined
03:15 <saylu> Oh! That's useful
03:17 hphuoc25 joined
03:20 <glguy> saylu: I don't know how you're supposed to use the FromRecord class
03:21 <saylu> Me neither!
03:21 <saylu> I'm assuming I've got to write an instance here:
03:21 <saylu> `instance CSV ByteString (Row ShareRow) where`
03:22 <saylu> but seems a bit heavy; all of the fields are easily decode-able
03:22 <saylu> just Text or Int
03:32 conal joined
03:37 <glguy> saylu: It looks like that module was just bolted onto the side of that package but might not integrate directly into it
03:37 <glguy> and you just use it as an attoparsec parser
03:39 diegs_ joined
03:41 diegs_ joined
03:42 diegs_ joined
03:46 halogenandtoast joined
03:50 alexelcu joined
03:50 juanpaucar joined
03:50 diegs_ joined
03:53 malaclyps joined
03:59 malaclyps joined
04:17 saussure joined
04:33 HallaSurvivor joined
04:41 HallaSurvivor joined
04:46 zacts joined
04:49 juanpaucar joined
05:10 aarvar joined
05:12 meandi_2 joined
05:15 Youmu joined
05:16 dni- joined
05:18 hphuoc25 joined
05:29 hiratara joined
05:53 juanpaucar joined
06:12 takle joined
06:31 takle joined
06:33 albertus1 joined
06:37 takle joined
06:37 louispan joined
06:37 halogenandtoast joined
06:47 govg joined
06:53 juanpaucar joined
06:54 vaibhavsagar joined
06:54 coredump joined
06:55 patbecich joined
06:58 grizwako joined
07:06 dni- joined
07:22 dni- joined
07:43 eHammarstrom joined
07:43 <eHammarstrom> If I have a list [('a', 0),
07:43 <eHammarstrom> ('x', 1), ...] can I filter it to [0, 1, ...] ?
07:45 <MarcelineVQ> sure, can you see how you might do that given this:
07:45 <MarcelineVQ> > snd ('a', 0)
07:45 <lambdabot> 0
07:45 <eHammarstrom> I might be able to map snd
07:46 <MarcelineVQ> nice, give it a try
07:52 slomo joined
07:52 slomo joined
07:57 juanpaucar joined
08:06 <eHammarstrom> What does 'Could not deduce (Enum [int]) arising from the arithmetic sequence `0..`' mean on my zip on the last line here http://lpaste.net/355896 ?
08:08 <eHammarstrom> an implementation of positions with a list comprehension was neat but an exercise asked me to do it with find, I am clueless
08:13 louispan joined
08:24 <LiaoTao> :t find
08:24 <lambdabot> Foldable t => (a -> Bool) -> t a -> Maybe a
08:25 <LiaoTao> eHammarstrom: How are you using unravel in the 'otherwise' clause?
08:29 Sose joined
08:45 thc202 joined
08:46 dennisvennink joined
08:53 haskelleksah joined
09:01 juanpaucar joined
09:03 halogenandtoast joined
09:13 merijn joined
09:14 louispan joined
09:27 dennisvennink joined
09:32 bvad joined
09:49 govg joined
09:52 halogena1dtoast joined
09:53 kritzcreek joined
10:05 juanpaucar joined
10:09 netheranthem joined
10:21 govg joined
10:21 grayjoc joined
10:22 <eHammarstrom> LiaoTao: I was thinking index returns Maybe (Char, Int) so I wanted to "unwrap it" to an Int and then do `otherwise = [unravel] ++ ...`
10:22 <eHammarstrom> So that I get a list of the indices where Char c appears
10:22 tsmish joined
10:34 louispan joined
10:42 fotonzade joined
10:44 hvr joined
10:44 hvr joined
10:46 yellowj joined
10:48 thedoomguy joined
10:57 halogenandtoast joined
11:00 halogenandtoast joined
11:05 juanpaucar joined
11:08 louispan joined
11:11 mstruebing joined
11:13 <LiaoTao> eHammarstrom: By the way, I don't think you can do it recursively like that wrt. the unindexed list
11:14 <LiaoTao> You're creating the index list starting from 0 every time positions is called
11:14 <LiaoTao> positions 5 [5,4,3,5,6,7,5] would output [5,2,2] if it worked that way
11:14 <LiaoTao> Uh
11:14 <LiaoTao> [0,2,2]
11:22 Gurkenglas joined
11:23 grayjoc joined
11:27 <eHammarstrom> oh, yeah
11:34 Denthir joined
11:41 govg joined
11:44 hphuoc25 joined
11:48 hphuoc25 joined
12:00 pbrant joined
12:02 dennisvennink joined
12:03 thaunatos joined
12:05 <thaunatos> In the haskell wiki IRC bot tutorial (https://wiki.haskell.org/Roll_your_own_IRC_bot), they import Network.
12:06 <thaunatos> On my machine, that gives the error, "Failed to load interface for `Network`", so I'm guessing it's a third party package. Should I be installing this somehow: https://hackage.haskell.org/package/network
12:09 juanpaucar joined
12:12 <LiaoTao> thaunatos: Take a look at stack/cabal for your dependency management
12:13 <glguy> thaunatos: yes, you need the network package
12:14 <thaunatos> Thank you. Why doesn't the wiki mention that?
12:17 yellowj joined
12:33 fotonzade joined
12:44 mengu joined
12:47 <hvr> thaunatos: either because until GHC 6.10, 'network' was actually bundled w/ GHC
12:47 <hvr> thaunatos: or because it assumes the Haskell Platform
12:48 <hvr> thaunatos: long story short, `cabal install network`, and you're good to go
12:50 govg joined
12:51 tsmish joined
12:58 bvad joined
13:08 contiver joined
13:13 juanpaucar joined
13:20 vaibhavsagar joined
13:23 Denthir joined
13:33 im0nde joined
13:35 nullcone joined
13:47 Progster joined
13:48 tsmish joined
14:04 thedoomguy joined
14:08 grizwako_ joined
14:12 diegs_ joined
14:14 mengu joined
14:16 simendsjo joined
14:17 <simendsjo> The Progress page for HPFFP has some parts redacted with the text CIA CENSORED. Is this some strange joke I don't understand? Ref http://haskellbook.com/progress.html
14:18 juanpaucar joined
14:18 halogenandtoast joined
14:27 Gurkenglas joined
14:42 pilne joined
14:43 yellowj joined
14:47 wildlander joined
14:57 Big_G joined
14:57 Rakkattakka joined
15:01 saussure joined
15:01 grayjoc joined
15:13 <eHammarstrom> LiaoTao, I have solved it with a list comprehension method and a map/filter version but and exercise specified to use find to solve it, but I was unable to.
15:13 HallaSurvivor joined
15:13 <eHammarstrom> an exercise*
15:19 mengu joined
15:22 juanpaucar joined
15:26 sherub joined
15:34 <Gurkenglas> listToMaybe (filter f x) == find f x
15:39 irco joined
15:41 <sherub> hi there I was trying to use parsec, to parse strings like "name:curry", "curry", "name:\"Haskell curry\"" to some ADT and was wondering about a good way to do this. Can anyone help me out?
15:43 <sherub> I wan to use these with `and` `or` keywords
15:44 <sherub> but unsure how not to make `string` parser combinator that will parse any string but will not pick up `and` `or`.
15:44 <sherub> I thought making them reserved would do the trick but that is not happening.
16:04 govg joined
16:12 juanpaucar joined
16:15 kadoban joined
16:26 romank joined
16:37 romank joined
16:40 romank joined
16:57 haskelleksah joined
17:02 hphuoc25 joined
17:09 saussure joined
17:10 aarvar joined
17:15 conal joined
17:16 Gurkenglas joined
17:17 juanpaucar joined
17:20 thedoomguy joined
17:31 romank joined
17:50 romank joined
17:50 takle_ joined
17:51 zero_byte joined
17:52 sherub joined
17:58 govg joined
17:58 prophile joined
18:00 takle joined
18:00 Progster joined
18:03 romank joined
18:10 takle joined
18:11 HallaSurvivor joined
18:16 juanpaucar joined
18:17 takle joined
18:19 malaclyps joined
18:24 romank joined
18:26 zacts joined
18:27 saussure joined
18:36 romank joined
18:46 halogenandtoast joined
18:47 romank joined
18:50 takle_ joined
18:58 yellowj joined
19:01 takle joined
19:05 kmicu joined
19:06 sherub1 joined
19:06 sigmundv joined
19:11 diegs_ joined
19:11 sigmundv joined
19:11 diegs_ joined
19:11 takle joined
19:16 juanpaucar joined
19:20 takle joined
19:29 slomo joined
19:31 saussure joined
19:40 takle joined
19:44 ianandrich joined
19:48 Deide joined
19:53 ngastyle joined
19:55 mac10688 joined
20:02 Xion_ joined
20:04 systemfault joined
20:04 yellowj joined
20:05 systemfault joined
20:07 Xion_ joined
20:10 takle joined
20:17 romank joined
20:20 <Xion_> What's the idiomatic way of consuming HTTP APIs these days? aeson plus http-conduit?
20:22 takle joined
20:26 juanpaucar joined
20:41 romank joined
20:43 delexi joined
20:45 diegs_ joined
20:48 fotonzade joined
20:48 juanpaucar joined
20:53 ego joined
20:54 takle joined
20:55 romank joined
21:09 romank joined
21:09 HallaSurvivor joined
21:20 juanpaucar joined
21:27 romank joined
21:30 peterbecich joined
21:34 zacts joined
21:37 mr_sm1th joined
21:39 sigmundv joined
21:43 conal joined
21:44 zacts joined
21:46 cur8or joined
21:47 takle joined
21:51 efeuska joined
21:53 hiratara joined
21:55 romank joined
21:58 romank joined
21:59 Pupnik joined
22:03 mengu joined
22:04 argent0 joined
22:08 takle joined
22:09 im0nde joined
22:11 Pupnik joined
22:15 ngastyle joined
22:18 saussure joined
22:24 juanpaucar joined
22:26 romank joined
22:30 louispan joined
22:31 hiratara joined
22:32 ngastyle joined
22:35 ngastyle joined
22:43 irrequietus joined
22:45 systemfault joined
22:46 halogenandtoast joined
22:46 RFburns joined
22:50 romank joined
22:50 RFburns joined
22:53 romank joined
23:08 romank joined
23:08 <coredump> any good online talk about lambda? I am really into learning it but drawing blanks on khan academy or MIT stuff
23:11 kritzcreek joined
23:14 texasmynsted joined
23:14 ngastyle joined
23:18 patbecich joined
23:20 ianandrich joined
23:22 romank joined
23:24 <qu1j0t3> lambda calculus?
23:28 juanpaucar joined
23:29 ngastyle joined
23:43 louispan joined
23:48 romank joined
23:48 tnks joined
23:52 zaltekk joined