<     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:00 bydo joined
00:15 cschneid_ joined
00:19 exferenceBot joined
00:30 i-amd3 joined
00:31 shayan_ joined
00:33 chlong joined
00:34 shayan_ joined
00:55 dni- joined
00:58 moei joined
01:27 takle joined
01:35 hphuoc25 joined
01:35 Tene joined
01:35 Tene joined
01:36 cschneid_ joined
01:55 conal joined
01:55 takle joined
02:07 Youmu_ joined
02:14 Gurkenglas joined
02:15 Guest75964 joined
02:15 Guest75964 joined
02:17 takle joined
02:23 mizu_no_oto_work joined
02:29 louispan joined
02:34 exferenceBot joined
02:36 systemfault joined
02:39 hexagoxel joined
02:41 thallada joined
02:43 dni- joined
02:45 jmnk joined
02:49 uglyfigurine joined
02:59 eacameron joined
03:08 ridho joined
03:17 takle joined
03:25 hphuoc25 joined
03:26 louispan joined
03:35 takle joined
03:53 hphuoc25_ joined
03:53 louispan joined
04:11 louispan joined
04:14 hphuoc25 joined
04:16 takle joined
04:29 haskelleksah joined
04:32 dni- joined
04:33 takle joined
04:37 uglyfigurine joined
04:53 louispan joined
05:17 louispan joined
05:18 exferenceBot joined
05:31 uglyfigurine joined
05:31 louispan joined
05:44 takle joined
05:48 haskelleksah joined
05:49 BOOKBOOK joined
05:50 aniketd joined
05:52 conal joined
05:57 takle joined
06:03 ThomasLocke joined
06:12 Mutter joined
06:13 louispan joined
06:13 conal joined
06:19 redcedar joined
06:19 redcedar joined
06:19 ego joined
06:19 pixelfog_ joined
06:19 ridho joined
06:19 acarrico joined
06:19 ThomasLocke joined
06:19 ThomasLocke joined
06:19 Cir0X joined
06:19 zero_byte joined
06:20 Guest37310 joined
06:20 jle` joined
06:20 thallada joined
06:20 Nikotiini joined
06:20 sivs joined
06:20 jmnk joined
06:21 dmj` joined
06:21 CARAM__ joined
06:21 dni- joined
06:25 hrnz joined
06:25 Mutter joined
06:26 bvad joined
06:26 louispan joined
06:29 louispan joined
06:32 conal joined
06:42 fluffystub joined
06:48 dni- joined
06:49 Durz0 joined
06:52 louispan joined
06:52 malaclyps joined
06:59 nickolay joined
07:02 Pupnik joined
07:05 malaclyps joined
07:08 louispan joined
07:11 thc202 joined
07:11 galderz joined
07:15 galderz joined
07:15 cur8or joined
07:18 mattyw joined
07:20 uglyfigurine joined
07:21 uglyfigurine joined
07:24 Levex joined
07:29 mstruebing joined
07:43 louispan joined
07:45 superlinux joined
07:45 <superlinux> hello
07:45 Levex joined
07:47 <superlinux> I completely understand that "retrun" of haskel IS NOT return of C++. now my question is , what is the output of "return 2" in haskell? because I feel that the monad of 2 is ambiguous.
07:57 <mniip> 2 is not the monad
07:57 <mniip> and you are correct, it is ambiguous
07:58 <mniip> Haskell has bidirectional type inference though, so the compiler can figure out the type from the way the value is used, if necessary
07:58 <mniip> > (return 2) ++ [5, 8, 3]
07:58 <lambdabot> [2,5,8,3]
07:58 <mniip> > fromJust (return 2)
07:58 <lambdabot> 2
07:59 <mniip> > return 2 "foo"
07:59 <lambdabot> 2
07:59 <mniip> (that's at least 3 different monads)
08:02 hphuoc25 joined
08:05 Nik05 joined
08:05 <superlinux> mniip, so (return 2) ++ [5, 8, 3] is making the return a list. correct?
08:06 <superlinux> and in fromJust it's a Just(2) ..
08:06 <mniip> yes
08:07 <mniip> you could use a type restriction to see it more clearly
08:07 <mniip> > return 2 :: [Int]
08:07 <lambdabot> [2]
08:07 <mniip> > return 2 :: Maybe Int
08:07 <lambdabot> Just 2
08:07 <superlinux> the last one I did not understand because return is taking two params.
08:07 <mniip> oh it isn't
08:07 <mniip> all functions are unary in haskell
08:08 <mniip> return is returning a function because functions are monads too
08:08 geekosaur joined
08:09 <superlinux> mniip, I understand functions are unary.. but here i am not able to understand it
08:09 <mniip> are you familiar with the Reader functor/...?
08:10 <superlinux> the reader functor.. no! but I know what a functor is.
08:10 <superlinux> ahhhhh!!!
08:10 <superlinux> but where is the fmap here?
08:11 geekosaur joined
08:11 <mniip> by ... I denoted functor/applicative/monad
08:11 <mniip> we're using the reader monad
08:12 yellowj joined
08:13 takle joined
08:18 geekosaur joined
08:18 mbrcknl joined
08:19 grdryn joined
08:20 binaryplease joined
08:22 Kristof_HT joined
08:22 takle joined
08:22 uglyfigurine joined
08:24 Uniaika joined
08:25 geekosaur joined
08:25 <Kristof_HT> I installed Haskell Stack, now I'm trying to install WinGHCi bnut cant't find insaller or binarys - i know on haskell platform it comes with the package but I dont want to install platform just for WinGHCi - any ideas on how can i get it for the Stack?
08:28 <Kristof_HT> i checked github (they jow to instasll it but no file provided) and googled but can't find WinGHCi installer
08:31 Levex joined
08:35 Xion_ joined
08:37 hphuoc25 joined
08:37 hphuoc25 joined
08:41 louispan joined
08:42 hphuoc25 joined
08:43 hphuoc25 joined
08:43 hphuoc25 joined
08:44 Xion_ joined
08:56 hphuoc25 joined
08:57 Xion_ joined
09:00 eacameron joined
09:04 romank joined
09:05 geekosaur joined
09:07 bkboggy joined
09:08 nacon joined
09:08 nacon joined
09:08 geekosaur joined
09:09 Gloomy joined
09:19 prophile joined
09:22 Uniaika joined
09:32 sa1_ joined
09:34 amatecha joined
09:34 colt44 joined
09:35 malaclyps joined
09:40 qu1j0t3 joined
09:49 merijn joined
09:50 Uniaika joined
09:51 Xion_ joined
09:57 qu1j0t3 joined
09:59 Uniaika joined
10:06 netheranthem joined
10:09 ploop joined
10:15 geekosaur joined
10:18 jarshwah joined
10:23 malaclyps joined
10:24 uglyfigurine joined
10:34 c4r50nz joined
10:37 spicydonuts joined
10:40 jasobrown joined
10:42 louispan joined
10:48 hphuoc25 joined
10:53 foton joined
10:54 efm__ joined
10:56 <reptar_> how is this a non-exhaustive pattern? http://lpaste.net/8374356821770502144
10:57 <merijn> reptar_: Can you paste the error too?
10:57 <reptar_> merijn: *** Exception: convex.hs:(44,1)-(49,42): Non-exhaustive patterns in function removeSame
10:58 <LiaoTao> reptar_: Because the first list might also be empty?
10:58 <reptar_> oh, that's why
10:58 <merijn> reptar_: Style note: you should replace the if/then/else with a guard
10:58 <reptar_> why?
10:59 <lpaste> merijn annotated “No title” with “No title (annotation)” at http://lpaste.net/8374356821770502144#a355324
10:59 <merijn> reptar_: Because it looks much nicer :p
11:00 <reptar_> maybe you're right
11:00 <reptar_> i'm just trying out stuff
11:01 <merijn> reptar_: It takes a while to get familiar with all the syntactical tricks to make things nicely readable. I recommend frequent and aggressive refactoring as soon as something works :)
11:02 <LiaoTao> Is it bad that I actually enjoy refactoring Haskell? :D
11:02 <LiaoTao> As opposed to procedural languages where you'd rather just go home for the day
11:02 <merijn> LiaoTao: Naah, I like it too. Which is good, because at least 60% of my initial code versions is awful :)
11:03 <merijn> Refactoring haskell is much more pleasant than almost every other language
11:03 <merijn> C++ is okay-ish for refactoring, but too verbose to enjoy writing :p
11:04 <LiaoTao> I've found that properly refactoring C++ involves a lot of structural rewriting
11:04 <LiaoTao> Different classes and hierarchy and all that
11:04 <LiaoTao> It's not fun
11:04 <reptar_> merijn: thanks for your input, will do :D
11:04 <merijn> It is if you enjoy mindless busy work for a bit :p
11:05 <merijn> At least you feel like there's progress. With Haskell often I stare at the code for a day or longer and then write like 2 lines. Can feel less satisfying sometimes :p
11:05 <reptar_> haha, so true
11:05 <LiaoTao> Mmm
11:05 <reptar_> still like it tho
11:05 <LiaoTao> Haskell is tiring in that sense
11:06 <LiaoTao> When you're stuck you're really stuck
11:07 <LiaoTao> Anyway! Back to the learning of Monads
11:08 efm__ joined
11:08 <merijn> LiaoTao: My recommendation would be there's two ways: 1) don't learn monad, learn instances for specific types and overtime realise how common that simple interface is or 2) slightly less recommended: read the original paper by Wadler, which is very readable
11:09 <merijn> The main problem people have with monads is that they seem to overthink things and think there's more than there actually is
11:09 mpiuser_ joined
11:09 <LiaoTao> It's coming along nicely now, I think
11:10 <LiaoTao> The State monad was no problem at all
11:10 <LiaoTao> The only thing I've seen that's funky is co-monads
11:10 louispan joined
11:11 <merijn> Comonads are far less commonly used, though :)
11:11 <merijn> LiaoTao: I would probably look at transformers first, before spending much time on comonads, because they tend to be more practically/immediately useful
11:11 <vin-ivar> foton: wtf are you doing here
11:12 <LiaoTao> merijn: Okay
11:12 <foton> homework vin-ivar
11:14 <merijn> LiaoTao: If you've already looked at State, I can recommend first trying to implement State yourself and then generalising it to a transformer: https://gist.github.com/merijn/098106abd45c940dab09
11:16 <LiaoTao> merijn: That looks like fun!
11:16 <LiaoTao> Thanks for making it
11:26 louispan joined
11:26 andro__ joined
11:27 Levex joined
11:29 ridho joined
11:33 andro__ joined
11:36 slomo joined
11:36 Guest19141 joined
11:36 thoradam joined
11:36 Denthir joined
11:42 kritzcreek joined
11:43 bkboggy joined
11:44 xunien joined
11:49 Gloomy joined
11:54 uglyfigu_ joined
12:08 romank joined
12:14 geekosaur joined
12:17 mixandgo joined
12:19 mpiuser__ joined
12:25 chlong joined
12:31 mattyw joined
12:33 Denthir joined
12:42 <LiaoTao> merijn: Hmm
12:42 <LiaoTao> Not sure how to implement >>=
12:43 mengu joined
12:43 <merijn> LiaoTao: What do you have so far?
12:44 <LiaoTao> merijn: http://lpaste.net/355325
12:44 <LiaoTao> Disregard the >>=, I'm just trying out different things
12:44 malaclyps joined
12:45 <merijn> LiaoTao: Any specific reason why you're implementing fmap via do-notation? :)
12:46 <LiaoTao> I suppose it's the first thing that came to mind
12:46 <merijn> LiaoTao: I'd recommend implementing fmap and <*> without do notation, because now you're just postponing the *actual* implementation until >>= by using it inside your implementation
12:46 <LiaoTao> Yeah
12:47 <merijn> If you write them out directly without do notation it might become easier to see how >>= can be build
12:49 <LiaoTao> merijn: So should I implement fmap without <$> or <*>? :D
12:49 <merijn> <$> is a synonym for fmap :)
12:50 <merijn> as in "f <$> x = fmap f x"
12:50 <merijn> And you don't need <*> for fmap
12:50 <LiaoTao> Oops
12:50 <LiaoTao> I thought it meant pure f <*> x
12:50 <LiaoTao> Right, I'll try it some other way
12:50 <merijn> LiaoTao: In fact, I would suggest looking at your implementation of modify and then think about fmap again :)
12:56 geekosaur joined
13:06 iAmerikan joined
13:10 Gurkenglas joined
13:17 malaclyps joined
13:21 c4r50nz joined
13:27 pbrant joined
13:32 johnson[m] joined
13:34 Guanin joined
13:35 Guanin left
13:36 <nitrix> An alternative suggestion (that might give you an eureka moment) is to try to implement join :: m (m a) -> m a
13:41 <nitrix> (Since >>= relies on two concepts combined; fmap and join)
13:43 jathan joined
13:45 Guanin joined
13:45 Guanin left
13:45 fbergmann joined
13:47 <nitrix> join (MyState f) = MyState $ \x -> let (a, s) = f x in a s ?
13:47 guampa joined
13:47 <nitrix> That's probably wrong, I'm just waking up :P
13:49 <nitrix> :t MyState $ \x -> let (MyState a, s) = f x in a s
13:49 <lambdabot> (FromExpr (MyState t a, t), Show t) => MyState t a
13:50 <Uniaika> hohai nitrix o/
13:50 <nitrix> :t \(MyState f) -> MyState $ \x -> let (MyState a, s) = f x in a s
13:50 <lambdabot> MyState t (MyState t a) -> MyState t a
13:50 <nitrix> There you go, join :D
13:50 <nitrix> Uniaika: Hai hai! \o
13:50 Denthir joined
13:51 <Uniaika> nitrix: how are you? =)
13:51 <nitrix> Splendid. Like a fish in water.
13:51 yellowj joined
13:52 <Uniaika> cool
13:53 <nitrix> Cold water, if you're in Canada, but still :P
13:58 <nitrix> LiaoTao: Hope that gives you a hint of how to proceed, I wouldn't main explaining what I've done here.
13:58 <nitrix> s/main/mind/
13:59 romank joined
14:00 govg joined
14:00 <nitrix> LiaoTao: We can start over with fmap if you want, and not use `do` this time.
14:08 hphuoc25 joined
14:14 chlong joined
14:23 blissdev joined
14:27 takle joined
14:31 carlomagno joined
14:33 Gloomy joined
14:35 fluffystub joined
14:43 uglyfigurine joined
14:43 <LiaoTao> nitrix, Thank you for the offer
14:43 <LiaoTao> I had some stuff come up earlier
14:44 <LiaoTao> Back to working on it now
15:02 jud joined
15:09 texasmynsted joined
15:09 eacameron joined
15:19 cschneid_ joined
15:26 NemesisD joined
15:38 eacameron joined
15:42 fotonzade joined
15:45 chlong joined
15:45 dibblego joined
15:45 dibblego joined
15:46 corintho[m] joined
15:51 razvanc-r[m] joined
15:51 sudoreboot[m] joined
15:51 dyce[m] joined
15:51 sirius[m] joined
15:51 agates joined
15:51 unclechu joined
15:51 johnson[m] joined
15:51 korayal[m] joined
15:51 curry[m] joined
15:52 isacloud joined
15:55 skeet70 joined
15:56 <LiaoTao> http://lpaste.net/355327
15:56 <LiaoTao> Think I got it
15:56 <LiaoTao> Thanks for the help
16:06 jorris joined
16:07 chlong joined
16:08 tlax joined
16:09 Gurkenglas joined
16:13 meandi_2 joined
16:17 <nitrix> (Back, I'll check in just a minute)
16:19 aarvar joined
16:23 NeverDie joined
16:24 teehemkay joined
16:31 carlomagno joined
16:32 <nitrix> LiaoTao: That looks a whole lot better :)
16:33 <nitrix> fmap f (MyState g) = MyState $ \s -> let (a, x) = g s in (f a, x)
16:34 <nitrix> fmap f (MyState g) = MyState $ \s -> fmap (\(a, x) -> (f a, x)) s
16:35 <nitrix> LiaoTao: That's just how I'd write it, but it implies knowing about the fact that functions are also functors and using `fmap` on them results in composition.
16:35 <nitrix> LiaoTao: Yours is just as good, if not more readable :)
16:37 <nitrix> LiaoTao: Looks all good. I think in practice, the pattern used is ~(a, x) instead, to avoid accumulating thunks.
16:38 <nitrix> Err, sorry for lazy pattern matching.
16:38 <nitrix> So the opposite.
16:39 boris_rh joined
16:40 <nitrix> Makes sense. You're not really using `a`, you're just creating another thunk which will be the application of `f` on `f`, so it's probably best to define the pattern matching as lazy in the standard library ;o
16:40 <nitrix> *`f` on `a`.
16:40 <nitrix> Very neat.
16:40 <nitrix> Which makes me wonder...
16:41 <nitrix> > runStateT (do { modify (const undefined); modify (const 42); modify (+1) }) 0
16:41 <lambdabot> error:
16:41 <lambdabot> • Ambiguous type variables ‘m0’, ‘s0’ arising from a use of ‘show_M48072...
16:41 <lambdabot> prevents the constraint ‘(Show (m0 ((), s0)))’ from being solved.
16:42 <nitrix> > runState (do { modify (const undefined); modify (const 42); modify (+1) }) 0
16:42 <lambdabot> ((),43)
16:43 <nitrix> Very cool.
16:48 pilne joined
16:48 <boris_rh> Hello, I am trying to find package that I can use to create Haskell data type from XSD and also generate XML encoder/decoder for this type
16:49 <boris_rh> The packages that I found so far are either deprecated or have no updates for last 2-3 years
16:50 <boris_rh> and have no much documentation
16:56 <nitrix> boris_rh: No updates for the last 2-3 years is probably not that big of an issue, unless the dependencies are way off.
16:56 <nitrix> XSD hasn't changed much.
16:57 <boris_rh> nitrix: thanks
17:01 jship joined
17:03 sclv joined
17:22 blissdev joined
17:25 ebw joined
17:38 pixelfog joined
17:46 Levex joined
17:47 uglyfigurine joined
17:56 uglyfigurine joined
17:59 ebw joined
17:59 DataComputist joined
18:05 binaryplease joined
18:16 nacon joined
18:16 nacon joined
18:19 Deide joined
18:20 binaryplease joined
18:24 govg joined
18:27 colt44 joined
18:29 iAmerikan joined
18:31 mikedlr joined
18:33 colt44 joined
18:33 customminer joined
18:34 cschnei__ joined
18:40 takle joined
18:44 xificurC joined
18:46 iAmerikan joined
18:48 rizary joined
18:48 carlomagno joined
18:50 efm joined
18:53 uglyfigu_ joined
19:12 fotonzade joined
19:13 nacon_ joined
19:25 MotherFlojo joined
19:26 ploop joined
19:37 efm joined
19:44 ebw joined
19:51 jmiven joined
20:24 zero_byte joined
20:33 mengu joined
20:41 yellowj joined
21:10 uglyfigurine joined
21:12 crave joined
21:25 conal joined
21:31 binaryplease joined
21:32 shawn_lu joined
21:36 Denthir joined
21:38 Levex joined
21:44 <shawn_lu> Hi Friends got a question regarding database, when I browse documents of Persist I see options of mysql, postgres, sqlite even mongo, but I didn’t see oracle, maybe I’m missing something, can someone gives me some tips? Thanks!
21:52 hiratara joined
21:53 conal joined
21:56 madjestic joined
22:26 haskelleksah joined
22:26 kipd joined
22:35 kritzcreek joined
22:35 shawn_lu left
22:36 shawn_lu joined
22:38 conal joined
22:43 AlainODea joined
22:45 conal joined
22:55 NeverDie joined
22:59 EduardoBautista joined
23:01 cschneid_ joined
23:10 exferenceBot joined
23:10 fotonzade joined
23:27 DataComputist joined
23:32 cschneid_ joined
23:40 louispan joined
23:57 haskelleksah joined