<     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 _2_5 26 27  
28 29 30 31
00:02 govg joined
00:05 juanpaucar joined
00:06 juanpaucar joined
00:07 juanpaucar joined
00:08 juanpaucar joined
00:08 dni- joined
00:16 juanpaucar joined
00:21 juanpaucar joined
00:21 louispan joined
00:26 juanpauc_ joined
00:30 juanpaucar joined
00:33 eacameron joined
00:34 louispan joined
00:35 juanpaucar joined
00:39 fotonzade joined
00:39 juanpaucar joined
00:44 juanpaucar joined
00:49 juanpaucar joined
00:53 eacameron joined
00:53 juanpaucar joined
00:53 lacko joined
00:54 louispan joined
01:03 juanpaucar joined
01:07 juanpaucar joined
01:12 juanpauc_ joined
01:15 seagreen joined
01:16 juanpaucar joined
01:21 juanpauc_ joined
01:25 NeverDie joined
01:26 juanpaucar joined
01:30 juanpauc_ joined
01:35 juanpaucar joined
01:37 ekinmur joined
01:39 juanpaucar joined
01:39 takle joined
01:44 juanpaucar joined
01:49 juanpaucar joined
01:50 DataComputist joined
01:52 geekosaur joined
01:53 juanpaucar joined
01:57 takle joined
01:57 dni- joined
01:58 juanpaucar joined
02:02 juanpaucar joined
02:07 takle joined
02:07 juanpaucar joined
02:07 flojo2 joined
02:08 acarrico joined
02:11 juanpaucar joined
02:12 louispan joined
02:16 juanpaucar joined
02:21 juanpaucar joined
02:26 juanpaucar joined
02:30 juanpaucar joined
02:30 exferenceBot joined
02:31 takle joined
02:34 hexagoxel joined
02:35 juanpaucar joined
02:39 juanpauc_ joined
02:40 ekinmur joined
02:44 juanpaucar joined
02:48 juanpaucar joined
02:52 takle joined
02:53 juanpaucar joined
02:56 permagreen joined
02:57 andyhoang joined
02:57 takle joined
02:57 juanpaucar joined
03:02 juanpauc_ joined
03:03 takle joined
03:03 Youmu joined
03:07 juanpaucar joined
03:11 juanpaucar joined
03:13 takle joined
03:13 louispan joined
03:16 juanpauc_ joined
03:21 juanpaucar joined
03:23 blissdev joined
03:24 Oliphaunte joined
03:25 juanpauc_ joined
03:30 juanpaucar joined
03:34 juanpaucar joined
03:36 louispan joined
03:37 takle joined
03:37 Rodya_ joined
03:39 ryantm joined
03:39 juanpauc_ joined
03:40 circ-user-yFWjr joined
03:44 circ-user-nj10z joined
03:44 juanpaucar joined
03:46 sergey_ joined
03:46 dni- joined
03:48 juanpauc_ joined
03:52 louispan joined
03:53 juanpaucar joined
03:53 sza joined
03:55 aqualogic joined
03:58 juanpaucar joined
04:07 juanpauc_ joined
04:09 takle joined
04:11 juanpaucar joined
04:16 juanpaucar joined
04:19 takle joined
04:20 Oliphaunte joined
04:20 juanpauc_ joined
04:25 juanpaucar joined
04:30 juanpaucar joined
04:34 juanpauc_ joined
04:39 juanpaucar joined
04:39 Oliphaunte joined
04:43 juanpaucar joined
04:47 eacameron joined
04:48 juanpaucar joined
04:49 takle joined
04:53 juanpaucar joined
04:55 fluffystub joined
04:56 Dance joined
04:57 Mutter joined
04:59 govg joined
05:02 juanpaucar joined
05:06 Guanin left
05:06 juanpaucar joined
05:11 juanpaucar joined
05:14 conal joined
05:16 juanpauc_ joined
05:20 juanpaucar joined
05:24 conal joined
05:25 juanpaucar joined
05:25 Computist joined
05:32 andyhoang joined
05:34 juanpauc_ joined
05:35 dni- joined
05:39 juanpaucar joined
05:43 juanpauc_ joined
05:46 Computist_ joined
05:47 ali_bush joined
05:48 juanpaucar joined
05:53 juanpaucar joined
05:55 Rodya_ joined
05:57 juanpauc_ joined
05:58 takle joined
06:02 juanpaucar joined
06:02 conal joined
06:06 cschneid_ joined
06:06 juanpaucar joined
06:06 ebw joined
06:11 juanpauc_ joined
06:12 eatman joined
06:15 juanpaucar joined
06:19 exferenceBot joined
06:20 juanpaucar joined
06:25 juanpaucar joined
06:26 patbecich joined
06:29 juanpaucar joined
06:30 geekosaur joined
06:34 takle joined
06:34 juanpaucar joined
06:35 Guanin joined
06:36 Pupnik joined
06:36 galderz joined
06:37 eacameron joined
06:39 juanpauc_ joined
06:41 takle joined
06:43 juanpaucar joined
06:43 MolluskEmpire joined
06:48 juanpaucar joined
06:50 <adarqui> anyone here good with esqueleto?
06:50 <adarqui> https://hastebin.com/elibewupew.vbs so basically, i'm trying to figure out how to add some 'grouping' in my where clause, so i have the proper precedence and stuff with my query.. The esqueleto code at the top, becomes the first query
06:50 <adarqui> but i need it to be in the form of the second.. where it's AND .. AND .. AND (BLAH || BLAH || BLAH)
06:52 <LiaoTao> Bona fide beginner o/
06:52 juanpaucar joined
06:53 slomo joined
06:54 <adarqui> cool LiaoTao
06:55 dni- joined
06:55 <adarqui> weird. i added a set of parenthesis and i think i got it working.. im not even sure if esqueleto uses template haskell, i imagine it does? seems like it was able to figure something out based on my parentheiss
06:56 Rodya_ joined
06:57 juanpaucar joined
06:57 Hithroc joined
06:58 takle joined
07:02 juanpauc_ joined
07:06 juanpaucar joined
07:12 eacameron joined
07:13 ali_bush joined
07:13 ali_bush joined
07:15 Hithroc_ joined
07:15 juanpauc_ joined
07:16 eacameron joined
07:20 juanpaucar joined
07:24 takle joined
07:25 juanpaucar joined
07:28 nickolay joined
07:29 xificurC joined
07:29 juanpauc_ joined
07:29 conal joined
07:32 mattyw joined
07:34 juanpaucar joined
07:34 bram_ joined
07:34 thc202 joined
07:38 juanpaucar joined
07:43 juanpaucar joined
07:44 taksuyu joined
07:45 patbecich joined
07:47 juanpauc_ joined
07:50 merijn joined
07:50 takle joined
07:51 colt44 joined
07:52 juanpaucar joined
07:53 eacameron joined
07:57 juanpauc_ joined
07:58 Rodya_ joined
07:59 Gurkenglas joined
08:01 juanpaucar joined
08:04 takle joined
08:06 juanpaucar joined
08:09 yellowj joined
08:10 juanpaucar joined
08:15 juanpaucar joined
08:20 juanpauc_ joined
08:20 fluffystub left
08:24 juanpaucar joined
08:33 juanpauc_ joined
08:34 takle joined
08:37 slomo joined
08:37 slomo joined
08:38 juanpaucar joined
08:39 <bram_> How do you replace all occurances in a string, I'm finding MissingH every time I'm looking for it, but subsequence replacement is somewhere else in Haskell as well, right? What is the haskell replaceall "ab" "bc" "abc" -> "bcc" ?
08:41 grdryn joined
08:42 colt44 joined
08:42 <Geekingfrog> bram_: do you want to code the function or use something from a library ?
08:43 juanpaucar joined
08:43 <bram_> Geekingfrog: very much a library person :)
08:43 <bram_> I found Data.Text.replace, but I'm using String everywhere and doing some ByteString transforms already
08:44 <bram_> so not keen on also introducing Text for just the replace function, but it is what I want :S
08:45 <Geekingfrog> I'm not aware of a `replace` function for String unfortunately. Not too hard to come up with though.
08:45 <Geekingfrog> Be careful about String though, the performances are horrible.
08:46 <bram_> Ok, I now have "applyMapping (a, b) line = T.unpack $ T.replace (T.pack a) (T.pack b) (T.pack line)" but will probably replace that with something niec in the future.
08:46 patbecich joined
08:47 <bram_> Geekingfrog: What would you advise: everything to Text or everything to ByteString in the future rewrite? (levelDB already requires ByteString)
08:47 juanpaucar joined
08:47 <Geekingfrog> ByteString is for binary data, Text is for text (who would've guessed !)
08:48 <Geekingfrog> If you're storing textual data in levelDB, I suspect you simply need to encode/decode for the conversion
08:49 <bram_> Geekingfrog: Thank you!
08:52 juanpaucar joined
08:56 juanpaucar joined
08:59 Rodya_ joined
09:01 juanpaucar joined
09:06 juanpaucar joined
09:10 juanpauc_ joined
09:15 juanpaucar joined
09:16 colt44 joined
09:20 juanpauc_ joined
09:21 nacon joined
09:21 nacon joined
09:22 Guanin left
09:24 juanpaucar joined
09:28 kritzcreek joined
09:29 juanpaucar joined
09:32 dni- joined
09:33 juanpaucar joined
09:36 mengu joined
09:38 juanpauc_ joined
09:38 lacko left
09:40 zero_byte joined
09:43 juanpaucar joined
09:46 pbrant joined
09:51 patbecich joined
09:52 juanpauc_ joined
09:53 conal joined
09:56 _rgn joined
09:56 juanpaucar joined
09:59 Rodya_ joined
10:01 juanpaucar joined
10:01 uglyfigurine joined
10:05 juanpauc_ joined
10:10 juanpaucar joined
10:11 andyhoang joined
10:11 bram_ joined
10:13 bram_ joined
10:15 juanpaucar joined
10:19 netheranthem joined
10:19 juanpaucar joined
10:24 im0nde joined
10:24 juanpaucar joined
10:26 galderz joined
10:27 andyhoang joined
10:29 juanpaucar joined
10:30 nacon joined
10:33 juanpaucar joined
10:35 Guanin joined
10:36 fotonzade joined
10:36 eacameron joined
10:37 <LiaoTao> As if regular Haskell wasn't abstract enough, now you get Template Haskell
10:37 <* LiaoTao> sobs
10:38 juanpaucar joined
10:41 c4r50nz joined
10:42 juanpaucar joined
10:47 juanpaucar joined
10:51 mengu joined
10:52 juanpaucar joined
10:56 juanpauc_ joined
11:00 Rodya_ joined
11:01 juanpaucar joined
11:05 <merijn> LiaoTao: Template Haskell isn't really that abstrac, though
11:05 juanpauc_ joined
11:06 cschneid_ joined
11:06 <merijn> LiaoTao: TH is just compile-time macros, like CPP, except instead of the macros using a shitty language (like CPP), the macro language is also Haskell
11:10 juanpaucar joined
11:14 juanpaucar joined
11:17 Guanin left
11:19 juanpaucar joined
11:21 dni- joined
11:24 juanpaucar joined
11:33 juanpaucar joined
11:34 Big_G joined
11:38 juanpauc_ joined
11:42 juanpaucar joined
11:47 juanpaucar joined
11:49 <bram_> I'm trying to get a list of all regex matches given a pattern but trying "sdf" =~ "asdf" :: [String] I get an error message saying there is no instance arising??
11:51 juanpauc_ joined
11:54 patbecich joined
11:56 Pupnik_ joined
11:56 juanpaucar joined
11:58 <bram_> `"a" =~ "b" :: String` works, but `"a" =~ "b" :: [String]` does not. Does anybody know what I'm doing wrong?
12:00 juanpaucar joined
12:01 <merijn> bram_: Not really, what are you trying to do? (as in, what are you using these regexes for?)
12:01 <bram_> merijn: I want to get a list of all matches of a regex from a subject
12:02 <bram_> merijn: "a b c d e" =~ "(a|b|c)" -> ["a", "b", "c"]
12:03 <bram_> I was following http://www.serpentine.com/blog/2007/02/27/a-haskell-regular-expression-tutorial/ but that does not seem to work (anymore?)
12:03 <merijn> Honestly, I've never used regexes in Haskell
12:04 <bram_> HAha, I think it might be new behaviour, realworldhaskell shows the exact error I get: http://book.realworldhaskell.org/read/efficient-file-processing-regular-expressions-and-file-name-matching.html
12:05 juanpaucar joined
12:05 <bram_> Ah, found a stack overflow on the subject :)
12:06 Guanin joined
12:06 <bram_> merijn: [[String]] works, found a stackoverflow answer http://stackoverflow.com/questions/7636447/raise-no-instance-for-regexcontext-regex-char-string
12:07 <bram_> merijn: should be able to implement this, thank you!
12:10 juanpauc_ joined
12:11 salios joined
12:11 dni- joined
12:14 Hithroc joined
12:14 juanpaucar joined
12:19 juanpauc_ joined
12:21 takle joined
12:26 nickolay joined
12:27 mengu joined
12:27 juanpaucar joined
12:30 mattyw joined
12:30 juanpaucar joined
12:55 aqualogic joined
12:58 patbecich joined
13:11 mengu joined
13:13 nickolay_ joined
13:20 juanpauc_ joined
13:22 govg joined
13:23 Rodya_ joined
13:27 Pupnik joined
13:28 carlomagno joined
13:35 pranitbauva1997 joined
13:47 raduom joined
13:50 hvr joined
14:00 eacameron joined
14:00 madjestic joined
14:05 juanpaucar joined
14:09 chlong joined
14:15 nitrix joined
14:16 mengu joined
14:20 mengu joined
14:21 mengu joined
14:29 Rodya_ joined
14:29 jathan joined
14:47 galderz joined
14:50 juanpaucar joined
14:50 uglyfigurine joined
14:56 fotonzade joined
15:02 patbecich joined
15:04 mengu joined
15:13 juanpaucar joined
15:13 vivekramaswamy joined
15:15 albertus1 joined
15:16 cschneid_ joined
15:18 juanpaucar joined
15:21 Gurkenglas joined
15:22 unsymbol joined
15:26 slentzen joined
15:28 slentzen joined
15:32 skeet70 joined
15:36 NeverDie joined
15:39 salios joined
15:42 hvr joined
15:42 salios joined
15:47 salios joined
15:47 juanpaucar joined
15:48 Kuros` joined
15:48 juanpaucar joined
15:51 madjestic joined
16:07 patbecich joined
16:09 malaclyps joined
16:11 juanpaucar joined
16:13 meandi_3 joined
16:17 acarrico joined
16:27 dni- joined
16:27 Rodya_ joined
16:31 juanpaucar joined
16:39 pilne joined
16:50 juanpaucar joined
17:03 juanpaucar joined
17:10 patbecich joined
17:12 ebw joined
17:20 jship joined
17:24 juanpaucar joined
17:29 bvad joined
17:29 Rodya_ joined
17:29 M-wamaral joined
17:33 zaquest joined
17:33 juanpaucar joined
17:50 patbecich joined
17:56 juanpaucar joined
18:01 permagreen joined
18:02 ebw joined
18:05 sigmundv__ joined
18:06 juanpaucar joined
18:16 uglyfigurine joined
18:17 dni- joined
18:23 justinfokes joined
18:28 <justinfokes> Anyone here have experience making a directory walker?
18:29 <glguy> justinfokes: Unless you're taking a survey about how many people have implemented one it'll be better to ask your actual question
18:29 <justinfokes> Ha, the hardest part is formulating the question I guess.
18:31 <justinfokes> Alright, I'm using System.FilePath.Posix's listDirectory function to try and build a list of Directories, but I'm having a difficult time creating a function that can recursively walk the directory, check if it's a directory or, perform a certain action, then continue walking...
18:33 <justinfokes> I guess I'm not sure if I should be using a Tree or not.. if that even makes sense.
18:34 <toppler> I think I wrote one of those once. It was just a recursive function in IO.
18:35 <justinfokes> yeah, that's the problem I'm having: it's destroying my mind trying to implement it.
18:35 malaclyps joined
18:36 <justinfokes> I figured the best way to learn Haskell would be trying to develop something with it, but, i've more or less hit a stopping point before I even built anything of value...
18:37 <justinfokes> http://lpaste.net/820466348424429568
18:37 <toppler> Ah. This might be bad advice, but my suggestion for learning Haskell is to start with something that's not so IO heavy. Interacting with UNIX is very IO heavy, and Haskell doesn't have such a great shell scripting story.
18:38 <justinfokes> Yeah, that makes sense. I was reading this https://codereview.stackexchange.com/questions/23231/is-there-a-better-way-to-walk-a-directory-tree, which goes over some of the finer points of directory walking, but it was completely over my head.
18:39 <justinfokes> I was going to use Turtle for a while, but felt like I didn't understand the tool well enough.
18:40 <toppler> Are you happy enough with recursive functions?
18:40 <justinfokes> From like a super basic level, I'm alright
18:41 <justinfokes> I understand base cases, but I have a difficult time understanding how to perform multiple actions
18:42 <justinfokes> For instance, if I need to perform a writeFile IO action, or, perform another walk
18:43 <toppler> So to start with, I'd be thinking about a recursive function which takes a FilePath as an argument. If the FilePath is a directory, I'd list the contents, and then call myself recursively over each element. If it's a file, I'd do the other thing (I'm not sure if that's your intended logic)
18:44 <justinfokes> Pretty much, but all of that needs to happen within another function
18:44 <justinfokes> Right?
18:44 <toppler> Right.
18:45 <toppler> Make it a toplevel function that you can test in GHCi.
18:46 <justinfokes> So, there would be like a walk function: walk :: [FilePath] (a -> m b) -> m () -> ?
18:47 <justinfokes> I'm trying to think what the final return is of such a function: [FilePath]?
18:47 <justinfokes> Or can I perform all the actions, and just return a String?
18:48 <justinfokes> Because I don't really need the contents of the folder, I just need to perform some action on them.
18:48 <toppler> The function will be doing IO, calling stuff like listDirectory, so the final return type will be of the form IO ...
18:49 <justinfokes> Right, but I can just putStrLn "finished"
18:49 <justinfokes> Right?
18:49 <toppler> Not sure I understand.
18:50 <justinfokes> Let me try and create a paste.
18:50 <toppler> One possible return type would be IO [FilePath].
18:51 <toppler> Maybe the function would have type getAllSubdirectories :: FilePath -> IO [FilePath]
18:51 <lpaste> ebw pasted “getOpt ??” at http://lpaste.net/355459
18:52 <toppler> But if you want to do all your business in a single pass like with UNIX's find, you'd want to pass in an action to perform on each file visited.
18:53 <ebw> Hi! Could you suggest some bette way to process the result of getOpt? http://lpaste.net/355459 feels a bit clunky to me and this ioError/userError combo doesn't produce a very nice usage, is there some better way?
18:53 blissdev joined
18:54 <justinfokes> Toppler: That's exactly what I'm trying to figure out..
18:54 <toppler> How to do it in one pass?
18:54 <justinfokes> Or, I guess pass in the function
18:54 <justinfokes> I think I'm just confused about performing actions between I and O
18:55 <toppler> ebw: Have you looked at optparse-generic?
18:56 <ebw> toppler: No. What is that?
18:56 <toppler> justinfokes: In that case, you might have a type walker :: (FilePath -> IO ()) -> FilePath -> IO ()
18:57 <toppler> ebw: It's a library that takes Haskell data-types and automatically figures out how to set them in command-line arguments, and provides usage info automatically.
18:57 <toppler> It might not meet your needs. But I'm super lazy. :)
18:58 malaclyps joined
18:59 <ebw> It looks nice, but it needs a bunch of language extensions and I am still learning basic haskell, shouldn't I stick to that first?
19:00 <toppler> It might be a good exercise to roll stuff yourself, but Generics is a pretty standard extension now.
19:00 martingale joined
19:00 <ebw> ok
19:02 juanpaucar joined
19:02 dni- joined
19:16 takle_ joined
19:18 uglyfigurine joined
19:26 justinfokes joined
19:31 justinfokes joined
19:31 Rodya_ joined
19:37 justanumber joined
19:39 Hithroc_ joined
19:41 Rodya_ joined
19:48 juanpaucar joined
19:50 Gurkenglas joined
19:55 justanumber joined
19:57 Hithroc joined
20:00 jship joined
20:02 malaclyps joined
20:06 takle joined
20:06 juanpaucar joined
20:12 carlomagno joined
20:15 justanumber joined
20:18 justinfokes joined
20:26 mattyw joined
20:29 nobodyzxc joined
20:35 juanpaucar joined
20:45 uglyfigurine joined
20:51 justinfokes joined
20:54 Iceland_jack joined
20:57 Guanin left
20:59 Deide joined
21:09 efm__ joined
21:10 justinfokes joined
21:12 machinedgod joined
21:17 juanpaucar joined
21:18 acarrico joined
21:25 mojjo joined
21:42 Rodya_ joined
21:49 justinfokes joined
21:52 hiratara joined
22:00 malaclyps joined
22:03 mengu joined
22:15 patbecic` joined
22:26 albertus1 joined
22:29 cschneid_ joined
22:34 jship joined
22:42 fotonzade joined
22:42 yellowj joined
22:43 Rodya_ joined
22:47 alhariel joined
22:50 justinfokes joined
22:57 eacameron joined
23:02 ego joined
23:07 carlomagno joined
23:09 malaclyps joined
23:20 mojjo joined
23:28 juanpaucar joined
23:38 im0nde joined
23:44 ali_bush joined
23:44 ali_bush joined
23:46 Rodya_ joined
23:46 viralstitch joined
23:53 justinfokes joined