<    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:01 earldouglas joined
00:13 earldouglas joined
00:16 aarvar joined
00:22 aarvar joined
00:25 karls joined
00:31 andrei_chifa joined
00:32 aarvar joined
00:33 carlomagno joined
00:36 eacameron joined
00:39 harfangk joined
00:47 conal joined
00:51 malaclyps joined
00:52 pie_ joined
00:52 pie_ joined
00:53 malaclyps joined
00:53 gazarsgo left
01:02 vmeson joined
01:05 aarvar joined
01:18 eacameron joined
01:19 louispan joined
01:23 alpounet joined
01:29 animated joined
01:45 peterbecich joined
01:45 peterbec` joined
01:52 systemfault joined
02:08 louispan joined
02:13 dni- joined
02:17 cschneid_ joined
02:18 jtcs joined
02:19 Youmu joined
02:27 \Mike joined
02:35 texasmynsted joined
02:39 <dosequis> hey all - I'm running a QuickCheck test in ghci and wondering if it's possible to get the test data where it failed so that I can play around with it and see what happened - is this possible?
02:44 nomotif joined
02:45 louispan joined
02:59 conal joined
03:09 peterbec` joined
03:12 hphuoc25 joined
03:12 skeet70 joined
03:14 malaclyps joined
03:14 louispan joined
03:15 chlong_ joined
03:16 takle joined
03:26 louispan joined
03:30 takle joined
03:40 takle joined
03:46 takle joined
03:49 threestrikes_ joined
03:53 louispan joined
03:54 takle joined
03:57 exferenceBot joined
04:01 lspitzner joined
04:01 hexagoxel joined
04:02 dni- joined
04:04 pie_ joined
04:04 pie_ joined
04:05 takle joined
04:21 takle joined
04:24 threestrikes_ joined
04:37 mengu joined
04:38 takle joined
04:50 hexagoxel joined
04:57 eacameron joined
05:00 threestrikes_ joined
05:00 takle joined
05:01 andrei_chifa joined
05:04 cschnei__ joined
05:08 takle joined
05:08 malaclyps joined
05:15 conal joined
05:19 louispan joined
05:21 eacameron joined
05:22 hexagoxel joined
05:23 mac10688 joined
05:26 takle joined
05:30 takle_ joined
05:35 threestrikes_ joined
05:36 takle joined
05:45 cschneid_ joined
05:46 takle joined
05:48 cur8or joined
05:51 dni- joined
05:53 malaclyps joined
06:05 takle joined
06:10 threestrikes_ joined
06:25 hexagoxel joined
06:27 howdoi joined
06:34 thc202 joined
06:34 eacameron joined
06:46 threestrikes_ joined
06:46 Big_G joined
06:47 nick_h joined
06:48 louispan joined
06:53 t0by joined
06:59 takle joined
07:04 LiaoTao joined
07:14 aarvar joined
07:17 takle joined
07:21 threestrikes_ joined
07:21 hdeshev joined
07:30 conal joined
07:30 smkz joined
07:32 takle joined
07:35 conal joined
07:36 owiecc joined
07:37 andrei_chifa joined
07:40 dni- joined
07:43 pbrant joined
07:47 cschneid_ joined
07:48 Arjun joined
07:56 threestrikes_ joined
07:59 Miroboru joined
08:09 RouxTheDay joined
08:14 patbecich joined
08:24 patbecich joined
08:31 gregman_ joined
08:32 threestrikes_ joined
08:34 louispan joined
08:40 zero_byte joined
08:44 takle joined
08:46 nick_h joined
08:50 ilja_kuklic joined
08:51 takle joined
08:52 pie_ joined
09:01 nick_h joined
09:02 hphuoc25 joined
09:07 nick_h joined
09:07 threestrikes_ joined
09:08 baweaver joined
09:16 eacameron joined
09:18 kritzcreek_ joined
09:19 dni- joined
09:21 grdryn joined
09:24 takle joined
09:25 patbecich joined
09:25 takle_ joined
09:35 andrei_chifa joined
09:41 louispan joined
09:42 threestrikes_ joined
09:48 HaskellLord69 joined
09:51 nick_h joined
09:55 animated joined
09:58 mengu joined
10:06 hphuoc25 joined
10:09 Glooomy joined
10:14 pie_ joined
10:18 threestrikes_ joined
10:25 pie_ joined
10:26 patbecich joined
10:31 contiver joined
10:35 animated joined
10:41 lspitzner joined
10:46 nick_h joined
10:46 rkrishnan joined
10:46 takle joined
10:51 netheranthem joined
10:53 lithie joined
10:53 threestrikes_ joined
10:53 harfangk joined
10:55 hphuoc25 joined
11:06 animated joined
11:14 takle joined
11:28 threestrikes_ joined
11:29 Gloomy joined
11:32 djfo joined
11:35 djfo_ joined
11:38 Gurkenglas_ joined
11:41 ederign joined
11:42 snowcrshd joined
11:50 sarkin joined
11:52 AndreasK joined
11:53 skapazzo joined
12:03 threestrikes_ joined
12:04 harfangk_ joined
12:05 harfangk__ joined
12:20 djfo joined
12:29 merijn joined
12:39 threestrikes_ joined
12:46 cschneid_ joined
13:17 andrei_chifa joined
13:20 animated joined
13:23 binaryplease joined
13:24 eacameron joined
13:40 harfangk joined
13:46 hashaskell joined
13:48 <hashaskell> Hey y'all! Just been trying to install ghc-mod for vim, and stack couldn't do it. Found out it has trouble installing old-time. It gives me an error saying:
13:48 <hashaskell> checking whether we are cross-compiling... error in /tmp/stack[..]/old-time
13:48 <hashaskell> my /tmp has rwxrwxrwt permissions.
13:49 djfo left
13:52 xektor joined
13:53 andrei_chifa joined
13:53 pbrant joined
13:55 lak joined
14:00 hashaskell joined
14:01 geekosaur joined
14:08 eacameron joined
14:11 Glooomy joined
14:19 andrei_chifa joined
14:29 acarrico joined
14:32 sullyj3 joined
14:35 <sullyj3> Hey guys, in this snippet: http://lpaste.net/353308 is there a way to not have to write nextHour twice that isn't super ugly and doesn't require a toplevel function?
14:38 Dasio_ joined
14:40 takle joined
14:40 <Akii> sullyj3: annotated it with a possible way
14:40 <Dasio_> Hello, could someone help me with http://lpaste.net/7782388286885986304 ? I need to make decomposion on classes of equivalence
14:43 <Dasio_> I found that i have to somehow to sort it before, but idk exactly how
14:43 <sullyj3> Akii: That's pretty, cheers.
14:44 <Akii> :D
14:49 chlong_ joined
14:58 mizu_no_oto_work joined
14:58 <merijn> Dasio_: Not related to your question, but you scan skip the fst/snd in that example
14:59 <lpaste_> merijn annotated “No title” with “No title (annotation)” at http://lpaste.net/7782388286885986304#a353311
14:59 <merijn> ^^
14:59 <merijn> You can pattern match in where clauses too :)
15:00 <Dasio_> Oh, i can see, thanks :)
15:00 <merijn> Dasio_: Also, I'm not quite sure what you're trying to do, but a wild ass guess: Realise that groupBy only groups *adjacently* not everywhere
15:01 <merijn> Maybe that's the problem?
15:01 <Dasio_> yes, thats the problem
15:01 <merijn> > groupBy (==) [1,1,2,1,3,1,4]
15:01 <lambdabot> [[1,1],[2],[1],[3],[1],[4]]
15:01 <merijn> Dasio_: Well, then maybe you wanna sort before grouping? :)
15:01 <merijn> > groupBy (==) . sort $ [1,1,2,1,3,1,4]
15:01 tsmish joined
15:01 <lambdabot> [[1,1,1,1],[2],[3],[4]]
15:04 <Dasio_> but idk exactly how and based on what. It's part of school project where i have to minimize deterministic finite automat.... Now i need make "split by equivalence classes", i dont know properly english words for tis
15:05 <Dasio_> if in input will be also [(1,7),(7,1),(7,7)] than output should be [[1,6,7],[2,5],[3,4]]
15:13 vmeson joined
15:13 mengu joined
15:24 lithie joined
15:28 xuinkrbin joined
15:44 owiecc joined
15:57 NeverDie joined
15:58 strix joined
16:01 hphuoc25 joined
16:02 strix left
16:05 geekosaur joined
16:06 mizu_no_oto_work joined
16:07 mattyw joined
16:08 cschneid_ joined
16:20 stryx joined
16:20 simendsjo joined
16:22 skeet70 joined
16:26 jathan joined
16:31 hphuoc25 joined
16:32 NeverDie joined
16:43 aniketd joined
16:50 mengu joined
17:05 NeverDie joined
17:07 twopoint718 joined
17:08 Glooomy joined
17:12 andrei_chifa joined
17:16 stryx joined
17:16 stryx joined
17:17 stryx_ joined
17:19 conal joined
17:25 Arjun joined
17:29 mattyw joined
17:32 hphuoc25 joined
17:34 skapazzo joined
17:42 snowcrshd joined
17:49 joneshf-laptop joined
17:51 Xyliton joined
17:56 nadirs joined
18:00 <Xyliton> How do I iterate over the pixels in images generated by friday and/or juicypixels?
18:04 <benzrf> Xyliton: well, what types do they produce?
18:08 michbad joined
18:10 initiumdoeslinux joined
18:12 <Xyliton> benzrf: good question. According to the friday docs it handles the image I'm working with as Vectors
18:13 <Xyliton> Although I neither have any idea how exactly it uses vectors to store the image, nor do I have any idea on how to use them
18:13 <benzrf> well... look up the library documentation for vectors :)
18:14 <Xyliton> but aren't vectors describing a point in n-dimensional space?
18:14 <Xyliton> how can that describe an image?
18:17 <benzrf> Xyliton: "vector" is also sometimes used to generically describe certain types which are like arrays
18:17 <benzrf> "like arrays" in the sense of being efficiently indexable but inefficient to modify the shape of
18:20 Xyliton left
18:20 Xyliton joined
18:21 skapazzo joined
18:23 owiecc joined
18:27 threestrikes_1 joined
18:29 nil_ joined
18:31 NeverDie joined
18:33 <nil_> Two related questions: does every Cokleisli arrow qualify as a fold? And on a deeper level, is there a sort of kinship between Comonad and Foldable?
18:33 hphuoc25 joined
18:50 stryx joined
18:53 mengu joined
18:54 chlong_ joined
19:02 netheranthem joined
19:02 threestrikes_1 joined
19:10 zero_byte joined
19:22 <nitrix> nil_: If there exist a relation it must be super rare.
19:23 <nil_> :(
19:23 <nitrix> nil_: In general, foldables aren't going to be comonad, as the foldable typically contains multiple values and you cannot extract all of their values with a comonad.
19:23 twopoint718 joined
19:23 <nitrix> nil_: Consider instance Comonad [a] where extract :: [a] -> a
19:24 <nil_> Hm, that makes sense.
19:24 <nitrix> nil_: It's a little dubious as you can see.
19:24 <nitrix> e.g. What happens if you have multiple values, or worse, [].
19:24 <nil_> Yeah, if it were a Foldable I could get a fold to produce more or less any (collection of) value(s), but extract gives me only an a.
19:25 <nitrix> nil_: You might be interested in Unfoldable.
19:25 <nil_> I guess it could make sense to view Comonad as a kind of restricted, crippled Foldable?
19:25 <nitrix> nil_: Nah, it's a much higher abstraction than Foldables.
19:25 <nil_> What do you mean?
19:26 <nitrix> nil_: It's the dual of Monad so it'd be at the same level as monads, just an inverse.
19:26 <nil_> Now you're suggesting Monad is "on a higher level" than Foldable. How so?
19:26 malaclyps joined
19:27 <nitrix> While monads provide join :: w (w a) -> w a, to join two monadic contexts into one, comonads provide extract :: w a -> a, removing the context.
19:27 <nitrix> They are duals. One merges, one removes.
19:27 <nil_> Oh, sure, I understand that.
19:28 <nitrix> nil_: Myeah. Because monads are a categorical construct.
19:28 <nitrix> nil_: And you can have categories of pretty much everything.
19:28 <nitrix> nil_: Including categories of categories. It's way more abstract than foldable.
19:29 <nitrix> nil_: Foldables are merely an Haskell convenience thing. Monads exists beyond Haskell :)
19:29 <nil_> You're describing _categories_ as more abstract than foldables. I agree, but I don't know about co/monads.
19:30 <nil_> nitrix: I'm really not sure about that. Catamorphisms (folds) turn up everywhere both inside and outside Haskell, so Foldables should too.
19:31 <nitrix> If you have a category of endofunctors (functors to the same category), a monoid of such endofunctors is what you call a monad.
19:31 <nitrix> Functors, Monoids, Monads are all constructs of CT. Foldables doesn't fit in there.
19:31 <nitrix> Ah.
19:31 <nitrix> nil_: Well I'd have to read on those.
19:33 <nil_> I guess you're right that Foldables don't come from CT, but I'm not sure that alone makes them "lower level".
19:34 hphuoc25 joined
19:35 t0by joined
19:36 andrei_chifa joined
19:37 ilja_kuklic joined
19:38 <nitrix> I'm reading and trying to find where ana and cata morphisms would be located.
19:38 threestrikes_1 joined
19:38 <nitrix> Apparently they work on endofunctors as well, so probably on the same level as monads then.
19:39 <nitrix> nil_: Getting somwwhere :D
19:39 Miroboru joined
19:39 <nitrix> nil_: I never had to look at ana and cata before, I'll ask around and let you know what I find :)
19:40 <monochrom> I don't know what is "level". But you create a functor, call it F, and you can have F-algebras, then you can have an initial F-algebra, and from that you get catamorphisms.
19:41 snowcrshd joined
19:41 <monochrom> Foldable's fold is usually different from catamorphism's fold, except []'s case.
19:45 hvr joined
19:47 <nil_> monochrom: huh, I didn't realize that. So the Foldable folds are basically artificial ones?
19:48 <monochrom> Yes but is category theory less artificial?
19:49 <monochrom> If it is any consolation, Foldable's foldmap is Monoid-based, if you draw a line such that "artificial" = "not in a math book".
19:53 <nil_> @karma++ monochrom
19:53 <lambdabot> monochrom's karma raised to 127.
19:54 <nil_> Hey. What if I try this:
19:54 <nil_> @karma++ nil_
19:54 <lambdabot> You can't change your own karma, silly.
19:54 <nil_> Alright, just checking, jeez!
19:54 <monochrom> It is somewhat smart. But you can change nick to fool it.
19:54 <nil_> @karma++ lambdabot
19:54 <lambdabot> lambdabot's karma raised to 33.
19:55 <MarcelineVQ> omy
19:56 <nil_> I just finished the parser combinator chapter in CIS194 and now I never want to look at C++ again.
19:56 <nitrix> nil_: Was it parsec / autoparsec?
19:57 <qu1j0t3> :)
19:57 <nil_> nitrix: the chapter is about writing your own mini-library.
19:59 <kadoban> It's trifecta-ish IIRC?
20:00 lak joined
20:01 mattyw joined
20:02 delexi joined
20:02 <monochrom> String -> Maybe (r, String)
20:03 <nil_> Oh, I don't know any trifecta but yeah, what monochrom just typed.
20:03 <nil_> newtype Parser = Parser { runParser :: String -> Maybe (r, String) }
20:04 <kadoban> Ah
20:05 <kadoban> But yeah, parser combinators are satisfying as hell
20:05 <nil_> It's fun, especially the part where you build larger Parsers from smaller ones using the Applicative instance.
20:05 <kadoban> Ya, Applicative really shines there
20:05 <kadoban> It's probably like my number1 usage of Applicative
20:06 <monochrom> Parser combinator was the last straw I needed to understand monads. (Not just the definition, but also its implications.)
20:06 <monochrom> (It was String -> [(r, String)] back then.)
20:06 <nil_> Applicative strikes me as "the sweet spot" between type classes that are amazingly general and ones that are monstrously powerful -- Applicative is both.
20:06 <monochrom> (Also, no Applicative back then.)
20:07 <nil_> monochrom: yeah, I just read a classic paper about that kind of parser a few days ago.
20:07 <kadoban> Applicative + parser combinators is approximately equivalently powerful to like, regex I believe (in before that's totally wrong), so it's definitely a decent place to be for a lot of uses.
20:07 Deide joined
20:08 nomotif joined
20:08 <monochrom> Yes, I think I know what sense you mean.
20:09 <monochrom> where with regexes you concatenate X and Y to make XY and Y's behaviour does not depend on X's "return value".
20:10 <monochrom> Ah this is a lightbulb because if you now try with highly extended regex such as "(x*)\1\1" this is like monad's >>=
20:10 <nil_> (fwiw it was Hutton, Meijer: Monadic Parsing in Haskell.)
20:11 <monochrom> Yes that was the paper I read too.
20:11 mattyw joined
20:13 threestrikes_1 joined
20:15 mattyw joined
20:18 pilne joined
20:20 lspitzner joined
20:21 albertus1 joined
20:22 mthek joined
20:28 chlong_ joined
20:29 Pupnik joined
20:29 mattyw joined
20:32 takle joined
20:35 hphuoc25 joined
20:36 louispan joined
20:39 <snowcrshd> nil_: how do you like CIS194 so far? I intend to get the haskell book when the print is out, but would love to get started while its not ready
20:40 <kadoban> cis194 is IMO pretty good, I'm sure it was *great* as an actual class. But haskellbook.com is great on its own, way better.
20:40 <nil_> snowcrshd: I love everything about it. I've got one more homework to go fwiw.
20:43 <nil_> I'm not quite a complete beginner and I was surprised how tough the first few exercises might seem to absolute beginners.
20:43 <MarcelineVQ> super tough
20:44 <nil_> Other than that, the homeworks are a lot of fun, impeccably paced (i.e. just enough help and hints) and they teach actual practical skills.
20:44 <snowcrshd> that's nice! I'm skimming through the chapters right now and they indeed look like fun
20:45 <snowcrshd> nil_: was CIS194 your first time working with haskell
20:46 mattyw joined
20:46 <snowcrshd> kadoban: hmm, I'll consider that. I'm really tempted to get the haskell book even though its only digital. But I usually like print books better for learning
20:47 <nil_> snowcrshd: no, it wasn't. I'd done most of the "99 Haskell Problems" exercises, read LYAH etc.
20:47 <kadoban> Yeah, I prefer print books as well honestly, but if it were me I'd definitely not wait. haskellbook.com is how I wish I could have learned haskell.
20:48 <MarcelineVQ> digital is nice for sitting it side-by-side with your editor
20:48 threestrikes_1 joined
20:50 <nil_> The Haskell Book seems tediously thorough and slow paced to me TBH. I looked at the sampler and it turned out it dealt with string concatenation 90 pages in.
20:50 <nil_> Looks like it covers every single thing in painstaking detail.
20:52 <snowcrshd> MarcelineVQ: good point. I like writing on my books, though :P
20:53 <qu1j0t3> snowcrshd: https://getremarkable.com/ ?
20:54 <snowcrshd> qu1j0t3: yeah, that looks awesome. I'm considering if it is worth the price
20:55 mthek joined
20:55 <snowcrshd> nil_: I got that impression too. I was looking for something that would enable me to "get shit done" with haskell
20:56 <snowcrshd> but I'm thinking the slow paced approach might be better to let the concepts sink in
21:00 <monochrom> I like ebooks because of the "no more carrying heavy docs" part. So I bought a Kindle Paperwhite.
21:01 <monochrom> reMarkable is better, of course. But sunk cost fallacy. :)
21:05 <nil_> Now that we're on the topic of books: I considered picking up Clean Code today. I looked up what the main author had to say about functional programming. Robert Martin seems to believe that being functional is about "unenforced" immutability, i.e. you're not really supposed to assign to variables all that much, but hey, if you really feel like it, knock yourself out.
21:05 <nil_> I decided not to read the book based on that alone.
21:05 <qu1j0t3> there's quite a bit of stuff in there that's dodgy.
21:06 <qu1j0t3> functional programming has left Bob behind
21:06 <nil_> (Reference: http://blog.cleancoder.com/uncle-bob/2014/11/24/FPvsOO.html )
21:08 <nil_> I wonder if more people get that picture about FP.
21:11 dni- joined
21:15 <monochrom> Understand that people have confirmation bias. If they like mutability, they will change every definition of every desirable word to say "mutability is allowed".
21:16 <monochrom> Having said that, people are also multi-facet. They have valuable points on other facets, even when on one facet they're wrong.
21:16 <monochrom> Also, even when they're wrong, you may still learn a thing or two in their detailed reasoning.
21:16 animated joined
21:18 <nil_> How about the book in question, would I learn something from it?
21:19 <monochrom> This I don't know.
21:19 <monochrom> But I suspect yes.
21:19 peterbecich joined
21:20 <monochrom> Under this uncertainty, I would risk cdn$10 to give it a try. But I wouldn't risk cdn$30. :)
21:21 peterbecich joined
21:22 threestrikes_1 joined
21:22 Xyliton joined
21:30 litwol joined
21:32 <nil_> To be frank I'm as worried about my free time as the money. Any time I spend reading a book on something other than Haskell is time I could spend learning Haskell.
21:33 <* ski> smiles
21:36 hphuoc25 joined
21:48 <nil_> Anyone else feel like introducing the Monad class with (>>=) instead of join is a didactic error?
21:49 <monochrom> Both ways are didactic errors :)
21:49 <monochrom> More seriously, neither way is a didactic error.
21:49 <nil_> It's not?
21:50 <nil_> I really think the whole point of the typeclass is more readily appreciated through join.
21:50 <monochrom> For example, I know how to transit from <*> to >>= by saying "wouldn't it be nice if you could have dependence on 'return values'?" (See also what I said about what kadoban said.)
21:51 <nil_> I guess you have a point.
21:52 <kadoban> I get the sense that join is more natural if you come at it from a more math-centric perspective, and >>= comes out more naturally when you just try to code something? I'm not sure that's right though.
21:53 hiratara joined
21:53 <monochrom> The way I would motivate join is "you can't do 'M a -> a', but the next best thing is 'M (M a) -> M a'"
21:54 <monochrom> I also feel that the join story is more mathematical, the >>= story is more computational.
21:54 <monochrom> Or maybe s/mathematical/algebraic/ because it's math all the way down.
21:54 Rodya_ joined
21:55 NoCreativity joined
21:58 <ski> for the list monad, `join' (i.e. `concat') is simpler to grasp than `(>>=)' (`concatMap')
21:59 contiver joined
22:00 <ski> however, if you've seen list (or set/ZF) comprehensions, then `do x <- xs; y <- x_to_ys x; ..x..y..' may perhaps be easier to grasp, still
22:01 roboguy` joined
22:01 peterbecich joined
22:08 fhoffmeyer joined
22:10 jarshwah joined
22:14 AndreasK joined
22:19 Denthir joined
22:21 ederign joined
22:24 peterbecich joined
22:25 Xyliton left
22:31 hiratara joined
22:32 peterbecich joined
22:37 hphuoc25 joined
22:40 louispan joined
22:42 malaclyps joined
22:42 louispan joined
22:46 madjestic joined
22:52 NoCreativity joined
22:57 <nil_> "Incidentally, it is common to use the letter k for the second argument of (>>=) because k stands for “continuation”. I wish I was joking." (Brent Yorgey, CIS194)
22:57 <nil_> Isn't the k supposed to mean Kleisli arrow though?
22:59 <ski> haven't heard that
22:59 suls joined
22:59 <glguy> continuation sounds right
23:00 <monochrom> No, k stands for continuation, with someone thinking that "c is already taken, so k is the next best thing"
23:00 dni- joined
23:00 <nil_> Why, what does 'c' mean?
23:02 <glguy> obviously a, b, and c are type variables, f g h k are functions, i and j are more like counters
23:03 <glguy> x y z are for your non function values
23:03 <glguy> and that's all you get
23:05 <glguy> Oh, you can have n
23:05 <qu1j0t3> it was good enough for FORTAN!
23:05 <qu1j0t3> R*
23:09 fhoffmeyer joined
23:15 <monochrom> k is an integer counter during its day job, and a function during weekends when it plays with functional programming. :)
23:15 <qu1j0t3> bwaha.hah.ha.
23:16 <qu1j0t3> "Two days off from NPE's and mutable state bugs! Wheee!"
23:20 NeverDie joined
23:28 geekosaur joined
23:38 hphuoc25 joined
23:42 louispan joined
23:47 mattyw joined
23:49 meck joined
23:50 geekosaur joined
23:58 <meck> f