<     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 biglambda joined
00:00 flatmap13 joined
00:00 infinity0 joined
00:03 infinity0 joined
00:04 acidjnk22 joined
00:04 sgronblo joined
00:06 LnL joined
00:06 infinity0 joined
00:06 mithrandeer joined
00:09 infinity0 joined
00:09 Aruro joined
00:11 infinity0 joined
00:12 <iqubic> :t (<|>)
00:12 <lambdabot> Alternative f => f a -> f a -> f a
00:12 <iqubic> For ExceptT e m what is the f in that type signature?
00:13 <pacak> > Nothing <|> Just 4
00:13 <lambdabot> Just 4
00:13 <pacak> > Left "uplorry" <|> Right "OK lah"
00:13 <lambdabot> Right "OK lah"
00:14 <pacak> For ExceptT that'll be "ExceptT e" part
00:15 anuxivm left
00:15 <iqubic> pacak, look at the kind of Alternative.
00:15 tromp joined
00:17 <iqubic> I needed to write instance (Monad m, Monoid e) => Alternative (ExceptT e m)
00:17 LnL joined
00:18 nighty-- joined
00:20 sgronblo joined
00:21 e14 joined
00:22 <pacak> Hmm... ExceptT e m a...
00:23 <pacak> iqubic: But there is Alternative instance in Control.Monad.Trans.Except for ExceptT
00:24 kvda joined
00:24 andyhuzhill joined
00:25 takle joined
00:26 vektorweg11 joined
00:27 nomicflux joined
00:28 sanitypassing joined
00:28 <iqubic> pacak, I'm writting this so I understand how it works.
00:28 nicknovi1 joined
00:29 Noldorin joined
00:30 codesoup joined
00:32 ystael joined
00:32 takle joined
00:33 <iqubic> Eduard_Munteanu: If I mappend the errors together, then this fails: empty <|> x = x
00:34 <iqubic> because my empty is a Left
00:35 <iqubic> and if I have Left 5 <|> Left 4 and I mappend, then I'm no longer returning x
00:35 boj joined
00:36 niteria joined
00:37 samp joined
00:38 <iqubic> Well I got something that type checks.
00:38 <iqubic> http://termbin.com/zsh0
00:38 <iqubic> Sure aint pretty
00:39 <EvanR> transformers
00:40 <glguy> Yeah, it'd be easier to implement ExceptT using ExceptT
00:40 <iqubic> http://termbin.com/571m
00:40 Hunter1 joined
00:40 <iqubic> Alright, that's slightly better looking
00:40 <iqubic> Guys, I'm only writing this to prove that I can.
00:40 <thang1> "it'd be easier to implement ExceptT using ExceptT"
00:40 <iqubic> It's good practice for me.
00:40 <thang1> k
00:40 <glguy> iqubic: No, mappending the errors together doesn't fail "empty <|> x = x"
00:41 <glguy> but not mappending them together fails "x <|> empty = x"
00:41 plutoniix joined
00:41 umib0zu joined
00:41 beerdrop joined
00:41 <iqubic> Oh, so is my code wrong?
00:41 <iqubic> Because if the first thing is an error, I just ignore it.
00:42 plutoniix joined
00:43 <Koterpillar> glguy: empty is mempty anyway, so it makes no difference
00:43 <glguy> Koterpillar: I'm not sure what you mean
00:44 <iqubic> Koterpillar: I'm still throwing away the value of the first computation if it's an error.
00:44 <iqubic> :t (<>)
00:44 <lambdabot> Monoid m => m -> m -> m
00:44 <Koterpillar> glguy: whether you mappend or not, the results of `empty <|>` or `<|> empty` will be the same
00:45 <glguy> oh, no
00:45 <iqubic> Koterpillar: Was the last paste I showed correct or now?
00:45 <iqubic> s/now/not/
00:45 <glguy> Koterpillar: That's not true
00:46 lambdaman joined
00:47 JeanCarloMachado joined
00:47 scottj joined
00:48 <iqubic> Koterpillar: Was the last thing I showed correct or not?
00:48 <glguy> iqubic: No, it doesn't combine the errors with mappend
00:48 tathougies joined
00:48 <iqubic> How do I do that?
00:49 <glguy> map runExcept [ throwE "err" <|> empty, empty <|> throwE "err" ]
00:49 <glguy> [Left "err",Left "err"]
00:49 <iqubic> Because I have a thing, and I can't get it to work.
00:49 <iqubic> http://termbin.com/tzrp
00:49 <iqubic> That last mappend is not working properly.
00:50 <Koterpillar> glguy: I don't see that, can you show me a counterexample (privmsg if it's a spoiler)?
00:50 <glguy> Koterpillar: I just pasted the counter example
00:51 <glguy> If you forget to mappend the errors, then you won't get the output as pasted above
00:51 <iqubic> I don't understand how to make that last mappend work properly.
00:51 <glguy> iqubic: What isn't it doing?
00:51 <Koterpillar> glguy: in your example, which exact values are mappended?
00:52 <glguy> Koterpillar: mempty and "err"
00:52 <glguy> or rather: "" and "err"
00:52 vaibhavsagar joined
00:52 <Koterpillar> mappend mempty doesn't change a thing
00:52 <glguy> Yes, that's important
00:52 <glguy> that's one of the laws of monoid
00:52 <glguy> and you rely on it for this Alternative instance
00:52 <iqubic> Why won't the mappend work in this: http://termbin.com/tzrp
00:52 <Koterpillar> but I can also choose to ignore one of the results
00:53 <Koterpillar> and it will still work
00:53 <glguy> Koterpillar: Then you won't get the right answer
00:53 <glguy> empty won't be the identity for <|>
00:53 jship joined
00:53 <iqubic> glguy: That mappend is not being given the right types.
00:53 <glguy> iqubic: Add the error messages you get to your pastes
00:54 <Koterpillar> glguy: aha, I see now. I had a different instance in mind and was confused
00:54 mizu_no_oto joined
00:56 <lpaste> iqubic pasted “mappend error” at http://lpaste.net/355121
00:56 <iqubic> That is what's happening.
00:56 <glguy> do you know what that error message means?
00:56 <glguy> specifically the first line
00:56 <iqubic> Yeah. I do.
00:57 eacameron joined
00:57 <iqubic> It means I'm using the wrong types for mappend
00:57 <glguy> no
00:57 <iqubic> What does it mean?
00:57 <glguy> it said "variable not in scope"
00:58 <iqubic> Oh. So I need to import Control.Monoid
00:58 <glguy> (<>) is a variable
00:58 <iqubic> It is?
00:58 patbecich joined
00:58 <pacak> Isn't it Data.Monoid?
00:58 <iqubic> I though that it was an infix mapppend
00:58 <iqubic> pacak, I think it is.
00:59 <glguy> yes, it's a variable
00:59 <iqubic> :t (<>)
00:59 <lambdabot> Monoid m => m -> m -> m
00:59 <pacak> (<>) = mappend, and defined there
00:59 <glguy> and it's implemented with mappend
00:59 <iqubic> Well, now my thing works
01:00 <iqubic> http://termbin.com/494a
01:00 <iqubic> It's now mappending the errors together.
01:00 <iqubic> Or short-circuiting if that's what is needed.
01:01 <iqubic> It's a large ass pile of code, but I think it'll work.
01:02 <glguy> Regarding variables, variables are lowercase names, and operator symbols that don't start with :
01:02 <iqubic> Really?
01:02 <glguy> and then there are names that are constructors, captialized names and operator symbols starting with :
01:02 <iqubic> So <|> is a variable?
01:02 <glguy> yeah
01:03 <iqubic> Not a function?
01:03 <Axman6> what's the difference?
01:03 <glguy> function has to do with types
01:03 <glguy> not names
01:03 robatosan joined
01:03 <iqubic> But I'm defining <|> in the same way I'd define a function.
01:03 <iqubic> How is it not a function.
01:04 <glguy> yeah, it's a function. that doesn't have anything to do with being a variable or not
01:04 <iqubic> A function isn't a variable.
01:04 <glguy> id is a function and a variable. Just is a function and a constructor
01:04 bigos joined
01:04 <Axman6> variables can definitely contain functions
01:05 <glguy> "A function isn't a variable." this is incorrect
01:05 <Axman6> functions aren't special
01:05 <glguy> True is a constructor and not a function, getLine is a variable and not a function
01:05 Netwolf joined
01:05 Netwolf joined
01:05 <iqubic> Why isn't getLine a function?
01:06 Taslem joined
01:06 <Koterpillar> why not call them values?
01:06 <iqubic> Oh. That's because getLine :: IO (String)
01:06 <pacak> :t getLine
01:06 <lambdabot> IO String
01:06 fragamus joined
01:06 <iqubic> That's just a value.
01:06 <pacak> In a monad.
01:07 <Axman6> functiona take one argument, getLine taskes none, so it's not a function
01:07 <tzh> a function is any value that has a -> in it
01:07 <pacak> :t absurd
01:07 <lambdabot> Void -> a
01:08 <Lokathor> a quick check for oauth2 in haskell turns up the "hoauth2" package
01:08 <Lokathor> is this a favored package? or is there some other winner?
01:09 <iqubic> Axman6: I'm just used to the OOP style of programming where everything is a function. Even sub-routines that take no inputs.
01:09 <pacak> Lokathor: I usually look at "last updated" and "downloads count"
01:09 Costar joined
01:09 Stanley00 joined
01:09 <Lokathor> Uploaded Mon Apr 17 04:19:50 UTC 2017
01:10 <Lokathor> not bad
01:10 <glguy> tzh: It's not enough to have a -> in the type, the -> has to be the outermost type
01:11 <glguy> tzh: IO (a -> a) isn't a function, for example
01:11 <Lokathor> iqubic, a variable /can hold/ a function, but it can also hold some data (2, 'a', etc), but it's still a variable either way
01:12 <Axman6> iqubic: very7 few things in oop are functions generally, at least by the definition we use
01:12 toresbe1 joined
01:12 <Axman6> "everything is an object" is generally closer to my experience with OOP
01:13 <Lokathor> iqubic, depending on your OOP flavor, what you're talking about might also be "methods", if it's a subroutine attatched to a class and/or instance
01:13 <Axman6> and objects have methods
01:14 <Axman6> functions usually don't have any kind of state, methods almost by definition must have state
01:14 hamishmack joined
01:16 m1ng0sfear joined
01:16 beerdrop joined
01:17 drcode joined
01:17 darjeeling_ joined
01:18 shayan_ joined
01:19 mithrandeer joined
01:24 JeanCarloMachado joined
01:26 eacameron joined
01:27 Supersonic112_ joined
01:29 drcode joined
01:29 lambdaman joined
01:30 rkazak joined
01:31 andyhuzhill1 joined
01:32 louispan joined
01:32 modal joined
01:32 jer1 joined
01:32 eacameron joined
01:33 mithrandeer joined
01:33 filterfish joined
01:33 <iqubic> Git vs Darcs?
01:33 <iqubic> Which do people here prefer?
01:33 <c_wraith> prefer in theory, or use in reality?
01:33 vaibhavsagar_ joined
01:34 <iqubic> Which do people here use.
01:34 <c_wraith> there's a ton of haskell development that takes place on github, including a bunch of the most popular packages
01:34 <iqubic> I use Git, but I was thinking of switching to Darcs
01:35 <c_wraith> ghc itself uses arcanist/phabricator. Just to confuse people. :)
01:35 <kadoban> Not many use darcs, as far as I can tell. git is quite generally popular.
01:36 eacameron joined
01:36 sword865 joined
01:37 <pacak> iqubic: git.
01:37 <Lokathor> +1 for git
01:37 <Lokathor> speaking of which
01:37 <Lokathor> https://github.com/facebookincubator/duckling did people see this new thing that was announced in the reddit?
01:38 <Lokathor> seems pretty cool
01:38 <thang1> I saw that! No idea wtf it actually is
01:38 <thang1> oh nvm should've looked at the github readme. I see
01:38 <thang1> That's awesome
01:38 <thang1> "we recommend using stack"
01:38 <c_wraith> the announcement was awfully light on what it actually was, yes.
01:38 <thang1> gg no re, stack won. Wrap it up, fuckers
01:39 <thang1> /s
01:39 <c_wraith> yeah, no matter how many things recommend stack, I still don't need it.
01:39 <thang1> Not all of us can be geniuses, c_wraith :p
01:41 <iqubic> Is that a thing that facebook is making?
01:41 <thang1> made. past tense. They're actively working on it
01:41 <iqubic> Facebook made that?
01:41 <thang1> anyway imma go for now. Gotta drive home, eat, then actually crank out some homework
01:41 butterthebuddha joined
01:41 acarrico joined
01:41 <c_wraith> iqubic: hardly the first haskell thing facebook has done.
01:41 <thang1> Yup. Facebook does some cool crap. They're trying to be the second google faster than microsoft is getting there
01:41 darlan joined
01:42 <c_wraith> iqubic: they employ one of the very long-term authors of GHC. (Obviously, he's worked on GHC longer than he's been at Facebook)
01:42 <Lokathor> iqubic, Facebook is a big user of Haskell. Some of GHC's top fixes and patches have come from the Facebook team
01:42 drcode joined
01:42 <thang1> And for good reason. It's absolutely amazingly ideal for a lot of their usecases
01:42 <iqubic> I thought that Facebook was C or C++
01:42 <thang1> They use tons of C++ internally too
01:42 <Lokathor> iqubic, they're very multi-language. You've gotta be when you're are big as them
01:42 <c_wraith> Their frontend is still PHP!
01:42 <thang1> You use C++ whenever you need raw speed, you use Haskell whenever you need extreme expressiveness and yet tons of safety and correctness
01:43 <exio4> Lokathor: woah, that's quite a cool library
01:43 eacameron joined
01:43 <Lokathor> perhaps one day they'll use Rust for the raw speed :P
01:43 <thang1> c_wraith: I thought they were switching from PHP finally? They had PHP for a long time, and then made a typed PHP, and then made something that compiled into PHP, etc...
01:43 lavalike_ joined
01:43 <thang1> Lokathor: oh most likely. Rust just needs to develop a tiny bit more before places like Facebook pick it up.
01:44 <thang1> The biggest thing preventing rust from hitting adoption (imho) is the fact that you can't just super painlessly take your project, snapshot it, and then incrementally write the new parts in rust seamlessly through FFI
01:44 <iqubic> Lokathor: Looks like this was created 2-months ago
01:44 <Lokathor> thang1, yeah, a few pain points to go
01:44 andyhuzhill joined
01:44 <thang1> Like, you can, but not perfectly. Tons of C/C++ stuff can't be seamlessly interfaced in and out of Rust
01:44 chatter29 joined
01:44 <chatter29> hey guys
01:44 <chatter29> allah is doing
01:44 <thang1> Once that happens, libraries and shit with decades of legacy work can pick up Rust without having to rewrite old work
01:44 <Lokathor> iqubic, hmm, the blog post about it that got posted to the /r/haskell feed is from today, https://wit.ai/blog/2017/05/01/new-duckling
01:44 was kicked by glguy: chatter29
01:45 crobbins_ joined
01:45 <thang1> lol
01:45 <Lokathor> that was fast :P
01:45 <thang1> Lokathor: I'm guessing it was created 2 months ago and then made public quite recently?
01:45 <iqubic> Lokathor: Look at the date and message for the commit for LICENSE.md
01:45 <thang1> anyway, see y'all
01:45 <Lokathor> probably yes, to get everything in order for the big reveal
01:45 <pacak> glguy: It uses the same nick every time, maybe chatter29!*@*
01:46 eacamero_ joined
01:46 zcourts_ joined
01:47 <glguy> chatter is not chatting, glguy is banning
01:47 <iqubic> What did he just do?
01:47 m1ng0sfear joined
01:47 <iqubic> is glguy a mod here?
01:47 <Lokathor> iqubic, a spambot that keeps showing up
01:48 <iqubic> Lokathor: Why does he like our channel so much?
01:48 lavalike joined
01:48 <c_wraith> it's one of the largest channels on freenode
01:48 <c_wraith> There are only a few larger.
01:48 <kadoban> That bot spams all the small channels too.
01:48 <Lokathor> and none as pure
01:48 <iqubic> This is a large Freenode Channel?
01:49 dmwit_ joined
01:49 <iqubic> What channels are bigger than this one?
01:49 <iqubic> emacs, vim?
01:49 <kadoban> It's always in the top 10, I think it was the second or third biggest last I looked.
01:49 <c_wraith> #ubuntu is huge
01:49 <iqubic> kadoban: Is there a list of top freenode channels?
01:50 <Lokathor> even #rust over on their own Mozilla server is ~1300 compared to our ~1475
01:50 revtintin joined
01:50 louispan joined
01:50 <Lokathor> and rust is kinda a big deal lately
01:50 <kadoban> Huh, I was way off, it's apparently 7th right now.
01:50 <iqubic> kadoban: Where are you getting that data from?
01:50 <kadoban> iqubic: Your client should be able to produce one, though don't ask me how, I probably won't know.
01:50 <jchia> I have a constraint "KnownNat nt" in the context of a function. How do I express that "KnownNat nt" cannot be zero?
01:51 <jchia> In other words, it cannot match "KnownNat 0".
01:51 Goplat joined
01:51 Argue joined
01:51 beanbagu1 joined
01:51 <c_wraith> jchia: I suppose there are ways to write type inequality. They scare me.
01:52 <geekosaur> fwiw my logs show nick chatter[1-9][0-9]* and various ip addresses via kiwiirc gateway
01:52 <jchia> c_wraith: There's '~' to express type equality. Is there an opposite?
01:52 <geekosaur> no
01:52 <c_wraith> jchia: there are ways to construct it, but they're indirect and I don't remember them. I'm sure you can search for them, though.
01:53 Aruro joined
01:54 eacameron joined
01:54 <exio4> jchia: I think in this case, it might be better to find a "GreaterThan" constraint?
01:54 <c_wraith> actually, GHC.TypeLits already has that.
01:54 <glguy> jchia: http://hackage.haskell.org/package/base-
01:54 splanch_ joined
01:55 <jchia> glguy: Thanks
01:55 ystael joined
01:55 <c_wraith> It's difficult to use, though.
01:55 <c_wraith> It doesn't know things like (n + 1) > 0
01:55 <EvanR> can you get strict fields in GADT syntax?
01:55 dsfox2 joined
01:55 <c_wraith> EvanR: yeah. you can even get record accessors in GADT syntax
01:56 <EvanR> how does that work
01:56 <glguy> data T where C :: !Int -> T
01:56 <EvanR> ok
01:56 mithrandeer joined
01:58 <jchia> c_wraith: OK, I'll see how far I can get.
01:58 descender joined
02:00 jer1 joined
02:00 Netwolf left
02:00 hucksy_ joined
02:02 reggie_ joined
02:04 louispan joined
02:05 mmachenry joined
02:05 JeanCarloMachado joined
02:06 <vaibhavsagar_> c_wraith: how do you get record accessors in GADT syntax?
02:07 gienah joined
02:07 <vaibhavsagar_> ooh, very nice: https://downloads.haskell.org/~ghc/6.6/docs/html/users_guide/gadt.html
02:08 <monochrom> Yes, except 6.6 < 8.0
02:08 <nshepperd> jchia: you want (<=) from GHC.TypeLits
02:09 xcmw joined
02:10 <vaibhavsagar_> monochrom: it was the first result when I googled "GADT record syntax"
02:10 m1ng0sfear joined
02:11 <nshepperd> oh, glguy already pointed that
02:11 biglambda joined
02:12 <Koterpillar> https://downloads.haskell.org/~ghc/8.0.2/docs/html/users_guide/glasgow_exts.html#record-constructors hmm
02:13 dmwit joined
02:13 <Koterpillar> no, https://downloads.haskell.org/~ghc/8.0.2/docs/html/users_guide/glasgow_exts.html#generalised-algebraic-data-types-gadts
02:14 mjora7 joined
02:22 coltfred joined
02:22 sanitypassing joined
02:23 eacameron joined
02:26 michbad joined
02:26 mizu_no_oto joined
02:26 LiaoTao joined
02:28 JeanCarloMachado joined
02:28 uuplusu joined
02:29 nomicflux joined
02:30 eacameron joined
02:30 takle joined
02:30 duog joined
02:31 Velpoman joined
02:33 eacamero_ joined
02:33 robatosan joined
02:34 tromp joined
02:34 dmwit_ joined
02:35 Destol joined
02:36 eacameron joined
02:39 dmwit joined
02:40 sssilver joined
02:41 exferenceBot joined
02:41 eacameron joined
02:42 systadmin joined
02:43 wagle joined
02:45 sssilver joined
02:45 hexagoxel joined
02:46 panovia joined
02:46 tripped joined
02:47 newhoggy_ joined
02:48 eacameron joined
02:50 JeanCarloMachado joined
02:50 xcmw joined
02:51 peterbecich joined
02:52 ubsan_ joined
02:53 takle joined
02:53 mrck10 joined
02:54 <mrck10> helo
02:54 mizu_no_oto joined
02:56 <lambdabot> Hello.
02:56 mithrandeer joined
02:57 ystael joined
02:57 <mrck10> whats this server?
02:58 smillmorel joined
02:58 samp_ joined
02:59 lambdaman joined
02:59 tom7942 joined
03:01 soniku joined
03:02 nomicflux joined
03:03 eacameron joined
03:04 CindraMan joined
03:05 Anonymous0250 joined
03:05 carlomagno joined
03:06 JeanCarloMachado joined
03:06 zcourts joined
03:07 sanitypa1 joined
03:10 ridho joined
03:10 forgottenone joined
03:10 <Zemyla> I wish fromRational weren't part of Fractional.
03:10 otto_s_ joined
03:10 andyhuzhill joined
03:11 <Zemyla> Because there are objects where fromRational makes sense but (/)/recip don't, and vice versa.
03:11 watabou joined
03:11 <Zemyla> Example of the first: Polynomials on Q. Example of the second: Z_p where p is prime.
03:13 mac10688 joined
03:13 JeanCarloMachado joined
03:13 augur joined
03:14 sgronblo_ joined
03:15 felixsch_ joined
03:16 louispan joined
03:21 asthasr joined
03:22 andyhuzhill joined
03:23 sssilver joined
03:25 louispan joined
03:28 JeanCarloMachado joined
03:28 doesthiswork joined
03:29 m1ng0sfear joined
03:29 flatmap13 joined
03:30 iqubic joined
03:30 <doesthiswork> I tried :loading https://github.com/noelmarkham/learn-you-a-haskell-exercises/blob/master/03-types-and-typeclasses.hs and got parse error on input `('
03:32 mizu_no_oto joined
03:32 <Koterpillar> doesthiswork: well, it's valid haskell. Try typing it manually?
03:34 tromp joined
03:36 {emptyset} joined
03:37 indi_ joined
03:37 <doesthiswork> haskell 2010 (the last version compatible with my operating system) doesn't permit defining typeclasses manually.
03:37 <doesthiswork> interactively
03:37 <Koterpillar> type it manually into a file
03:38 <pacak> doesthiswork: Can you show full error message?
03:39 <doesthiswork> :load 03-types-and-typeclasses
03:39 <doesthiswork> [1 of 1] Compiling Main ( 03-types-and-typeclasses.hs, interpreted )
03:39 <doesthiswork> 03-types-and-typeclasses.hs:10:0: parse error on input `{'
03:39 <doesthiswork> Failed, modules loaded: none.
03:39 beanbagu1 joined
03:39 <pacak> Hmm... ghci --version
03:39 <pacak> ?
03:42 <panovia> Is that error an indication about wrong layout? Because there isn't even a brace on line 10
03:42 <mikeplus64> anyone got case-splitting working in [spac]emacs, or vs code or ...?
03:43 <doesthiswork> that was the wrong error message for that error message I had tried adding a brace to see if it remove the complaint
03:43 <doesthiswork> it didn't
03:43 <pacak> panovia: There is one below
03:43 mithrandeer joined
03:43 <doesthiswork> and I got no response for --version
03:44 <pacak> O_o
03:44 <glguy> doesthiswork: We need to see the actual contents of the file and the actual error message for that file to help
03:44 <pacak> How do you start it?
03:44 <doesthiswork> Prelude> :load 03-types-and-typeclasses
03:44 <doesthiswork> [1 of 1] Compiling Main ( 03-types-and-typeclasses.hs, interpreted )
03:44 <doesthiswork> 03-types-and-typeclasses.hs:10:9: parse error on input `('
03:44 <doesthiswork> Failed, modules loaded: none.
03:44 CindraMan joined
03:44 <doesthiswork> and the file is unmodified
03:45 <glguy> There's no ( on column 9
03:45 <Koterpillar> doesthiswork: can you run sha1sum on that file?
03:45 <pacak> that's ghci. How do you start ghci? It should print version info
03:45 <panovia> doesthiswork: Make sure there's whitespace before "deriving" in your file
03:46 <doesthiswork> The Glorious Glasgow Haskell Compilation System, version 6.12.3
03:46 <glguy> doesthiswork: I suspect you deleted the whitespace from that line
03:46 <glguy> doesthiswork: that would generate the error at the location
03:46 <doesthiswork> thank you panovia
03:46 <pacak> 6.12.3 is a bit old.
03:47 <doesthiswork> all leading whitespace had been deleted
03:47 <pacak> Some stuff you'll find on the internets might not work.
03:48 <glguy> doesthiswork: In Haskell, indentation is significant, so you'll need to take care to preserve it
03:49 filterfish joined
03:49 filterfish joined
03:51 grp joined
03:52 insitu joined
03:54 robatosan joined
03:54 drcode joined
03:56 Xanather joined
03:56 Guest35790 joined
03:57 sssilver joined
03:58 ystael joined
03:58 smillmorel joined
03:59 takle joined
04:00 drcode joined
04:01 sgronblo joined
04:02 splanch_ joined
04:03 kamog joined
04:04 splanch__ joined
04:06 plot joined
04:07 splanch joined
04:07 zcourts joined
04:09 <Axman6> 6.12.3 isn't a bit old, it's ancient
04:09 <Axman6> even ubuntu isn't that out of date
04:09 <Zemyla> It could be worse.
04:09 GeorgeEdward joined
04:11 splanch_ joined
04:11 systadmin joined
04:13 dfeuer joined
04:13 <Zemyla> I remember someone popped into ##c++ a while asking for help getting something to work with Borland C++ for Windows 3.1.
04:14 infinity0 joined
04:14 newhoggy joined
04:15 newhoggy joined
04:15 <erisco> would have to dig up my time capsule to help you with that one
04:16 dsantiago joined
04:17 <Koterpillar> that far back, there are emulators
04:18 <Zemyla> Oh, I found it http://qdb.us/310062
04:19 <Axman6> heh
04:19 eklavya joined
04:20 smillmorel joined
04:20 blym joined
04:20 ner0x652 joined
04:21 lambdaman joined
04:24 louispan joined
04:24 takle joined
04:25 sleffy__ joined
04:27 <iqubic> What's cracking me amigos?
04:27 xcmw joined
04:27 <iqubic> Quick poll: what colorscheme do people prefer?
04:27 jer1 joined
04:27 <iqubic> I don't like my current emacs scheme at all.
04:28 conal joined
04:28 <Axman6> perhaps #haskell-blah would be a better place to ask
04:28 <iqubic> Is that a real place?
04:28 <Axman6> yes
04:29 newhoggy joined
04:29 <Axman6> has over 100 people in it
04:29 <iqubic> Must be down right now.
04:29 athan joined
04:30 <iqubic> irssi doesn't want to connect to it right now.
04:30 <Axman6> it's a channel? :\
04:30 <iqubic> What does that mean?
04:30 <Axman6> /join #haskell-blah
04:30 <iqubic> I tried that.
04:30 <iqubic> It won't load
04:30 <Costar> Lol
04:31 <Koterpillar> You might have to have proper ident, or SSL connection, or something.
04:31 <athan> iirc -blah requires some kind of auth
04:31 <athan> use -offtopiuc
04:31 <athan> offtopic*
04:31 takle joined
04:31 soniku joined
04:31 <athan> SASL
04:31 <athan> SxSL
04:31 <iqubic> How do I set up SASL?
04:32 <athan> it depends per-irc client :\
04:32 <athan> it's somewhat tricky
04:32 <Koterpillar> iqubic: #help for IRC questions
04:32 <athan> but it obsoletes `nickserv identify` iirc
04:32 <Axman6> @google irssi SASL
04:32 <lambdabot> https://freenode.net/kb/answer/irssi
04:32 <iqubic> #help
04:32 <athan> :v
04:32 codesoup joined
04:32 <athan> oh my sweet summer child
04:33 <Koterpillar> I meant the channel #help too
04:33 <glguy> 1) SASL isn't related to getting into #haskell-blah 2) figuring out SASL is offtopic in #haskell
04:33 <athan> glguy: re: 1) - why?
04:33 <glguy> because it's not
04:33 <iqubic> It is not related to getting into #haskell-blah?
04:33 <athan> er, how is it not relateded :|
04:34 <glguy> SASL is a way to authenticate to nickserv at connection time, it's not related to connecting to that channel
04:34 <Koterpillar> what is required then?
04:34 <athan> is it all "#haskell-blah is all registered securely with freenode and stuff" and stuff?
04:34 <glguy> TLS
04:34 <athan> oh hm
04:34 <athan> duy, sorry :x
04:34 tromp joined
04:35 <* athan> finds his unique mapping back to his dungeon
04:35 iqubic joined
04:35 filterfish joined
04:35 <iqubic> So, how is SASL not related to #haskell-blah?
04:36 SpinTensor joined
04:36 <glguy> we just talked about that...
04:36 newhoggy joined
04:36 <iqubic> Also, enabling SASL didn't help me get into haskell-blah
04:36 <iqubic> glguy: I had to restart my client.
04:37 <athan> just do it &copy; nike
04:37 <glguy> iqubic: You need to connect with TLS (SSL)
04:37 <Koterpillar> iqubic: enable TLS, instructions are still in that link (https://freenode.net/kb/answer/irssi), for more help join #help channel
04:38 mjora7 joined
04:38 <iqubic> Why does #Haskell-blah require this?
04:39 <athan> ...semantics
04:39 <pacak> iqubic: https://cdn.meme.am/instances/500x/51628642/kumamon-why-for-the-glory-of-stan-of-course.jpg
04:39 Stavr joined
04:39 Wamanuz joined
04:39 iqubic left
04:39 conal joined
04:40 <pacak> no, this one https://cdn.meme.am/cache/instances/folder129/500x/49480129/kumamon-why-for-the-glory-of-satan-of-course.jpg
04:40 newhoggy joined
04:40 takle joined
04:41 <Axman6> to stop spam and keep it to people who have some understanding of irc and its etiquette
04:41 <Axman6> possibly
04:42 <Axman6> oh iqubic left - this is was not a jab at iqubic btw
04:42 iqubic joined
04:43 <iqubic> I need help enabling SSL in irssi
04:43 <MarcelineVQ> come on now
04:43 <iqubic> Sorry, wrong channel
04:43 <iqubic> I will be taking that to #help
04:44 JeanCarloMachado joined
04:44 <Axman6> I would help if I could remember now, but I stopped using IRC after about 12 years or so only recently
04:45 <iqubic> Axman6: How do you chat with us if you don't use IRC?
04:45 <Axman6> uh... irssi, whoops!
04:45 <MarcelineVQ> he's got you there
04:45 <Axman6> telepathy
04:45 <Axman6> this test is not really here
04:45 <Axman6> text*
04:46 <glguy> You use glirc, of course
04:46 <Axman6> indeed :)
04:46 iqubic joined
04:47 <iqubic> What is glirc?
04:47 <athan> :v
04:47 <Axman6> it's glguy's Haskell irc client
04:47 <Axman6> it's pretty nice3
04:47 <athan> !!!!!!
04:47 <* athan> bookmarks
04:48 splanch joined
04:48 <glguy> https://imgur.com/a/ASDi2
04:48 pacak joined
04:48 <iqubic> Is it free, and availible for others to use?
04:48 <athan> that looks as good, if not better than irssi
04:48 <Axman6> yes
04:48 <athan> endoprops glguy
04:48 <iqubic> I love that.
04:48 <iqubic> I think I may have to switch right now.
04:49 <iqubic> Where can I get the download for that?
04:49 <Axman6> it’s not as flexible as irssi, but is in many ways much nicer
04:49 <iqubic> I want to use glirc.
04:49 <Axman6> github
04:49 <pacak> iqubic: /server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network freenode -port 6697 chat.freenode.net
04:49 BartAdv joined
04:49 <Axman6> pacak++
04:49 <iqubic> Axman6: I don't use any of the fancy irssi stuff
04:50 <iqubic> Looks like I can also get it on hackage
04:50 <athan> they botched their last release iirc
04:50 <athan> their latest release on github was broken
04:50 <athan> so irssi has gotten lower on the totem pole imho
04:51 <athan> v1 I mean
04:51 <iqubic> I'm switching to glirc
04:51 <iqubic> right now.
04:51 <* athan> waits for the cabal hell
04:51 ninedotnine joined
04:53 <Axman6> heh
04:53 <Axman6> yeah iirc building it is a little less fun than it should be
04:53 doesthiswork left
04:54 <Axman6> I wonder if he'll ever be back...
04:54 jer1 joined
04:58 <glguy> glirc? It should be find to build with any of the favorite Haskell build tools
04:58 <glguy> be fine*
04:58 smillmorel joined
04:59 ystael joined
04:59 takle joined
05:01 nicknovi1 joined
05:01 dec0n joined
05:03 Gurkenglas joined
05:04 ninedotnine joined
05:09 zcourts joined
05:11 fakenerd joined
05:12 biglambda joined
05:13 rkazak joined
05:14 takle joined
05:15 robatosan joined
05:15 JeanCarloMachado joined
05:17 teggi joined
05:20 LuckyRawApe joined
05:20 seventh-chord joined
05:22 jer1 joined
05:23 splanch_ joined
05:24 newhoggy joined
05:27 pungi-man joined
05:29 takle joined
05:31 SpinTensor joined
05:33 richi235 joined
05:33 ichor joined
05:35 carlomagno joined
05:35 jhrcek joined
05:35 iqubic joined
05:37 <iqubic> So, how the heck do I install glirc?
05:37 butterthebuddha joined
05:38 dm3 joined
05:38 <iqubic> I created a new stack project just because I didn't want to pollute the global project.
05:38 mstruebing joined
05:38 hamishmack joined
05:38 <iqubic> Not sure I actually needed to do that. But I did.
05:39 permagreen joined
05:39 <iqubic> So why can't I install glirc??
05:39 <iqubic> I want to use that, but it has a ton of deps.
05:39 <suzu> clone the repo and `stack build`
05:40 insitu joined
05:40 <iqubic> Oh, is that all I need to do
05:40 <iqubic> I feel stupid.
05:40 torgdor joined
05:40 <iqubic> I was trying to run "Stack Install glirc"
05:40 <suzu> stack init then stack build
05:40 <suzu> once you've cloned the project
05:40 <suzu> i think that should be all
05:40 <suzu> you may need to use a ghc8 resolver
05:41 <iqubic> I do.
05:41 <suzu> then you're good
05:41 <suzu> should be al lyou need
05:41 <glguy> stack init --solver --resolver=lts-8
05:41 <glguy> should work to make a stack.yaml
05:42 <glguy> You don't need the resolver flag, but it makes stack init run faster
05:43 <pacak> iqubic: Just use irssii
05:43 <suzu> glirc so pretty tho
05:43 <* suzu> is a weechat user himself
05:44 <suzu> speaking of which, everybody using weechat, upgrade to 1.7 or disable DCC
05:44 <iqubic> what's DCC?
05:44 <suzu> there's a flaw that'll let anybody crash your client with a privmsg
05:44 <ab9rf> why would anyone use weechat?
05:44 <yushyin> iqubic: direct client to client
05:44 suriro joined
05:44 <iqubic> yushyin: why is that bad?
05:45 <yushyin> only in 1.7 because of a bug
05:45 mjora7 joined
05:45 <iqubic> pacak: I'd like to use glirc, because I think it looks better than irssi
05:45 <ab9rf> weechat has a long history of being vulnerable to remote attaacks like that
05:45 <ab9rf> which is why sane people avoid it like the plague
05:46 <iqubic> Also, irssi lags a lot on my machine.
05:46 <yushyin> but weechat is nice <3
05:46 <ab9rf> i don't care how pretty or nice an app is, if it's insecure it's out the door
05:46 mbuf joined
05:47 <iqubic> glguy: After running stack init, what should I do?
05:47 <iqubic> stack build?
05:47 <athan> via an explosion, due to insecurity
05:47 <iqubic> Alright, that seems to be working.
05:47 <athan> yes
05:48 splanch joined
05:48 <athan> iqubic: after `stack build` is legit'd, then run `stack install`
05:48 <suzu> weechat has a history of vulnerabilites?
05:48 <yushyin> iqubic: https://weechat.org/download/security/
05:48 <yushyin> suzu: so many!
05:49 <athan> at least (...join?), they know of them
05:49 <iqubic> athan: Why should I do that? Will it move the executable to ~/.local/bin?
05:49 <athan> like.. greatest lower bound of vulnerabilities...
05:49 <iqubic> where stack put all executables.
05:49 <athan> iqubic: copy it
05:49 jer1 joined
05:49 <athan> so `glirc` is available in $PATH
05:49 <iqubic> So why would I do stack build then?
05:50 andyhuzhill joined
05:50 <athan> because stack needs some shit
05:50 ninjazoete joined
05:50 <athan> that's not like "oh everything is hunkey-dorey"
05:50 <athan> you know?
05:50 <kadoban> If you really want you can skip to 'stack install', it doesn't matter.
05:50 takle joined
05:51 osa1 joined
05:51 <athan> given that you're inside a `stack.yaml` backed repo :x
05:51 torstein joined
05:51 <iqubic> kadoban: I'm not going to skip it.
05:51 <kadoban> *shrug* okay
05:52 jle` joined
05:52 jle` joined
05:53 <* jle`> hopes nobody noticed that he just logged off to upgrade weechat
05:53 vlatkoB joined
05:53 <suzu> :)
05:53 <dysfun> hah, one of my friends discovered that
05:53 <suzu> the flaw?
05:53 <dysfun> yes
05:53 <suzu> they were the one to report it?
05:53 brynedwards joined
05:53 <suzu> that's really cool tbh
05:54 <suzu> the workaround posted on the site literally tells you what to do to sploit people though
05:54 <dysfun> they've recently been interested in finding security holes because their work doesn't keep them sufficiently busy
05:54 <suzu> kinda not cool
05:54 <dysfun> they got 4 CVEs in the last fortnight
05:54 <iqubic> So I'm trying to run stack build in the glirc repo, but it can't find the program Alex
05:55 aarvar left
05:55 <dysfun> iqubic: stack install alex
05:55 <suzu> ^
05:55 <dysfun> you might need happy too, you usually do if you need alex
05:55 <suzu> yup
05:55 <iqubic> What are Alex and Happy
05:55 <iqubic> ??
05:56 <dysfun> haskell eqiuvalents of lex and yacc
05:56 <suzu> they are parser generators
05:56 <iqubic> dysfun, what are lex and yacc?
05:56 <suzu> those are also parser generators
05:56 magthe joined
05:56 <dysfun> tools for building parsers
05:56 zcourts_ joined
05:56 cyborg-one joined
05:56 <dysfun> low level tools, i should say
05:57 <suzu> they're tools that'll let you write programs that can parse and understand a provided language specification
05:57 zcourts joined
05:58 <iqubic> Alright, I can't install Alex, because I don't have QuickCheck.
05:58 <iqubic> Is there a way to fix this?
05:58 <suzu> uhh what
05:58 <dysfun> stack install QuickCheck ?
05:58 <suzu> it should install quickcheck for you
05:58 <iqubic> Or am in Stack hell
05:58 <suzu> there is no stack hell
05:58 <iqubic> suzu, it's not doing that for me.
05:58 <suzu> only stack afterlife
05:58 ogrady joined
05:58 <suzu> hm, okay. try dysfun's suggestion
05:59 <iqubic> Great, QuickCheck wants tf-random
05:59 <kadoban> iqubic: What do you mean you don't have quickcheck? Stack installs libraries as it needs them. What exact message did you get?
05:59 <suzu> k this isn't the right solution
05:59 <suzu> `stack install quickcheck` just refuses to work?
05:59 ystael joined
05:59 <kadoban> iqubic: Are you still in the directory with whatever program you were trying to build? Go outside of it and install happy and alex first
06:00 <suzu> ^ you need to install alex and happy into your system
06:00 andyhuzhill1 joined
06:00 <kadoban> Well, 'stack install quickcheck' wouldn't be good, the capitalization is wrong. But it shouldn't ever be necessary anyway for this.
06:00 <Koterpillar> you might be able to install them as system packages even with your brain dead package manager
06:00 <Koterpillar> iqubic: ^
06:00 <dysfun> that's not a very nice way to talk about cabal
06:01 <Koterpillar> dysfun: they are on Gentoo
06:01 <suzu> he was joking about cabal
06:01 <dysfun> oh. yeah ok portage is pretty messed up
06:01 <athan> hey, I'm brain dead and I still kinda do things sometimes when I am
06:01 <dysfun> i've been braindead for many years now and i get by
06:01 <iqubic> Koterpillar: I installed them into the global stack package with "stack install happy" and "stack install alex" in my home dir
06:02 <suzu> is jumping in and writing something important in haskell a good idea
06:02 <suzu> or is it a method for making me miserable about both the project and haskell
06:02 <athan> ...you know?
06:02 danvet joined
06:02 <dysfun> 'important'?
06:02 <Koterpillar> iqubic: then go back to glirc and build it again?
06:02 <iqubic> Koterpillar: I'm trying that right now.
06:02 <athan> yes
06:02 <kadoban> suzu: Without knowing haskell you mean?
06:02 <suzu> web application that's going to process bitcoin
06:02 <glguy> I thought stack was supposed to handle build-tools for you, why would he have to manually install alex or happy?
06:02 Guest82996 joined
06:02 <suzu> i know haskell up to a point
06:02 <dysfun> i mean writing stuff in haskell is a good idea, but if you don't know much of it you might get frustrated in maintenance
06:02 <kadoban> I think stack was supposed to do that, but its ability to do so seems limited and wonky.
06:03 <suzu> crazier things like type families and heterogenous lists and such escape me
06:03 <athan> ...the least fixed point..?
06:03 <dysfun> glguy: it's because of cabal. i don't understand the reasons, but they're because of cabal
06:03 <suzu> but i know my typeclassopedia and rank-n types and such
06:03 <iqubic> glguy: See this https://github.com/commercialhaskell/stack/issues/595
06:03 <athan> dysfun: I disagree; stack seems to be committed to ensuring reproducible builds
06:04 <suzu> i couldn't tell you how half the shit in servant works, but i can /use/ servant.
06:04 <glguy> iqubic: I think it fails less if you're using one of the lts resolvers
06:04 ninedotnine joined
06:04 <glguy> are you using that or something else?
06:04 <athan> across any build envionment, where `stack` is available as an exec
06:04 <iqubic> How do I check what resolver I'm using?
06:04 <glguy> It gets put into the stack.yaml
06:04 hurkan joined
06:04 <dysfun> athan: well it doesn't quite achieve that. but it does neatly stop cabal hell
06:04 <athan> suzu: use nested-routes! :v
06:04 <athan> jk don't actually use it
06:05 <athan> because it's lolworthy
06:05 <iqubic> glguy: I'll look at that.
06:05 <athan> iqubic: check your stack.yaml
06:05 {emptyset} joined
06:05 <iqubic> I will
06:05 JeanCarloMachado joined
06:05 <athan> dysfun: how does it not achieve that explicitly?
06:06 takle joined
06:06 <dysfun> well, build tools is the main area where it doesn't achieve that
06:06 <athan> ..?
06:06 <athan> build tools? like alex..?
06:06 <kadoban> C libraries are a pain point still
06:06 <dysfun> you pretty much can't avoid needing alex and happy if you build a webapp at all
06:06 leobloom joined
06:06 <iqubic> Using GHC-8 as my resolver.
06:06 <athan> oh shit
06:06 <iqubic> What?
06:06 LAZAR joined
06:06 <dysfun> GHC-8 isn't a resolver
06:06 <athan> hm, I haven't seen that dysfun
06:06 <glguy> dysfun: it is
06:07 <dysfun> is it?
06:07 <iqubic> stack init --resolver=ghc-8
06:07 <LAZAR> What happens when ghci hangs after an input? No error message etc
06:07 <dysfun> christ, when did that happen?
06:07 <iqubic> See the building instructions here: https://hackage.haskell.org/package/glirc
06:07 <suzu> LAZAR: maybe infinite loop? try a CTRL-C
06:07 <iqubic> That is what happened to me.
06:07 <athan> iqubic: for shits, try `lts-8.9`
06:07 fakenerd joined
06:07 <glguy> iqubic: Use one of the lts resolvers
06:07 <dysfun> we're on lts-8.12 now
06:07 <iqubic> athan: I already got my glirc installed
06:07 <glguy> when I wrote that page there wasn't an lts resolver for GHC 8
06:07 <athan> :s
06:08 <iqubic> Oh, but there is now?
06:08 <athan> I ain't a friggin person who should be dependenated upon
06:09 <* athan> sees the void, the void asks him on a shitty date with fuckin sparklers and shit
06:09 <iqubic> glguy: You thinking of updating that hackage page?
06:09 <LAZAR> Well this is the code: http://lpaste.net/355125 I just wonder why my interpreter works for assigning values to variables but not variables to variables
06:09 <glguy> yeah. I never have to fiddle with stack, I jsut "cabal install glirc" when I'm on a new environment
06:10 jer1 joined
06:10 <iqubic> glguy: Once I've done "Stack install" where can I find the executable of glirc
06:11 <glguy> I believe it goes into ~/.local/bin
06:11 <thang1> that's funny, I have the opposite thing with cabal. I'm so glad I never have to fuck with cabal again
06:11 <athan> what's DAssign LAZAR?
06:11 brisbin_ joined
06:11 <thang1> yes, stack install installs the exec into ~/.local/bin
06:11 leobloom joined
06:11 <thang1> however stack exec will run the executable for you automagically
06:11 <thang1> so you don't ever really need to go inside ~/.local/bin/
06:11 <athan> please... no
06:12 <athan> `automagially` is forbidden in these realms
06:12 brisbin_ joined
06:12 <* dysfun> automagically automagicates
06:12 <* athan> hates hate
06:13 brisbin_ joined
06:13 zymurgy joined
06:13 brisbin_ joined
06:14 dec0n joined
06:14 osa1_ joined
06:14 <thang1> Welp, that derailed things
06:14 brisbin__ joined
06:14 JeanCarloMachado joined
06:14 <athan> okay, so... will -XDependentHaskell be in GHC-9? place your bets
06:14 <thang1> s/automagic/automatic
06:14 <jle`> dependent haskell is scheduled for ghc 8.6 i believe
06:14 <athan> I am for srsly rtnw
06:15 <thang1> what jle` said
06:15 <athan> :O
06:15 Costar joined
06:15 <thang1> I'm so excited for DH + Linear Types
06:15 <athan> way to destroy a legitimate potential for gains jle`
06:15 <dysfun> linear types scheduled for 8.4 :)
06:15 <thang1> However, I have to wonder...
06:15 <athan> :O!!!
06:15 <thang1> You guys know the language Curry?
06:15 <athan> KINDA
06:15 <thang1> https://en.wikipedia.org/wiki/Curry_(programming_language)
06:15 <iqubic> What's DH?
06:15 <thang1> It's a logic based programming language
06:15 quchen joined
06:16 brisbin_1 joined
06:16 <thang1> DH == dependent Haskell. It's dependent types inside haskell
06:16 <dysfun> Dependent Haskell
06:16 <jle`> 8.8 i think the timetable actually is
06:16 <athan> thang1: I am pretending to try and read about the book about Oz right now
06:16 <dysfun> anybody made good use of TypeInType yet?
06:16 <suzu> any recommendations on a web framework? snap / happstack / yesod / scotty?
06:16 <athan> so I'm sorta kinda close to understanding curry
06:16 <thang1> Anyway, I really want to see logic && functional programming glued into haskell
06:17 <athan> dysfun: It's a hack, but it's useful
06:17 <dysfun> suzu: snap is easiest to get going with. yesod is pretty full stack. servant is the trendy for typesafe rest apis
06:17 <athan> suzu: nestedroutes!
06:17 <thang1> It'd be amazing to see if someone could blend linear types, dependant types, and logical programming into a single language usefully
06:17 <suzu> hmm, full stack sounds like what i want
06:17 <suzu> think i'll pick yesod then
06:17 <suzu> the TH makes me feel uneasy though
06:17 <dysfun> athan: it was also billed as "the first major step to DH"
06:17 <suzu> what if it breaks on something? i'll be so fucked
06:17 takle joined
06:17 <athan> suzu: the TH is aids
06:17 <athan> it will consume your life
06:17 <suzu> y..eah
06:17 <thang1> suzu: TH is really not something to get your pants worked up about, it's totally chill
06:17 <dysfun> honestly i never liked yesod
06:18 <suzu> im looking at persistent right now and its making me feel uneasy too
06:18 brisbin_1 joined
06:18 <suzu> i dont know how this TH works or how to debug it if theres a problem
06:18 <dysfun> well for the most part it 'just works'
06:18 <athan> dysfun: have you looked into the caluclus of constructions / types for programming lang's by B. C. Pierce ?
06:18 <dysfun> stuff like yesod is by now well tested
06:18 <dysfun> athan: no
06:18 <suzu> hmm okay
06:18 <athan> dysfun: do so
06:19 <dysfun> but why?
06:19 <athan> but, TIT (type in type, srsly yall) is a very primitate subset of CoC
06:19 brisbin_1 joined
06:19 <athan> suzu: start with persistent
06:19 <dysfun> ah
06:20 <athan> so see M. Snoyman's method of TH
06:20 <athan> it's actually pretty okay for persistent
06:20 <dysfun> persistent comes with different problems though
06:20 <athan> but i don't trust yeosd so I stay away and have a legal restraining order
06:20 <dysfun> so i generated a yesod example project last week
06:21 <suzu> what are the problems with persistent?
06:21 <dysfun> i've never seen such a horrible cabal file
06:21 <athan> :s
06:21 <suzu> man i dont want to be debugging this shit at 3am plz plz no
06:21 <athan> suzu: not many iirc
06:21 <athan> i usually just go with acid-state though
06:21 <athan> because FUUUUUCKIN HASKELL AMIRITE?
06:21 <suzu> ye tru
06:21 <suzu> but is it WEBSCALE tho
06:21 <athan> not in the slightest
06:21 <athan> so yes
06:21 <suzu> lmao
06:21 <suzu> okay
06:22 <suzu> i'll stick with postgres
06:22 <suzu> and take my chances
06:22 Mortomes|Work joined
06:22 <dysfun> but it has remote databases. that sounds erlang as fuck
06:22 beanbagu1 joined
06:22 <johnw> suzu: esqueleto works well
06:22 <suzu> yeah esqueleto looks sick
06:22 <suzu> man fuck this whamlet shit
06:22 <suzu> im putting blaze in asap
06:22 <athan> siiiiiiick*
06:22 <* athan> make sure you have a wolf tattoo
06:22 <suzu> gimme them monoids
06:22 <dysfun> yeah fuck hamlet
06:22 <athan> McWhamlet*
06:22 <suzu> rofl
06:23 <dysfun> but if you don't like any of the choices yesod makes, maybe you don't want yesod
06:23 <pacak> Yesod makes strange choices.
06:23 <suzu> what do i want then?
06:23 <athan> suzu: use lucid instead of blaze
06:23 godel_ joined
06:23 <suzu> if i want the rails dream but in haskell
06:23 <pacak> You not program in haskell, you program in yesod.
06:23 <athan> you'll thank me later when you try to do insane shit
06:23 <suzu> lucid, kk
06:23 <dysfun> i'm leaning towards snap
06:23 edsko joined
06:24 <dysfun> not because it's amazing, because it gets out of your way
06:24 <pacak> suzu: There's nothing like rails in haskell.
06:24 <athan> the rails dream was fucked in the beginning
06:24 <suzu> yeah they picked ruby
06:24 <athan> they imagined reality as something fininte
06:24 <suzu> it was already doomed
06:24 <athan> so they fucker'd themselves
06:24 <suzu> "fucker'd" lmao
06:24 <athan> yeah that goes without saying
06:24 <athan> watch trailer park boys
06:25 <iqubic> glguy: Why does glirc have 2 executables?
06:25 sajith joined
06:25 <iqubic> What's the difference between glirc2 and irc-core-bot?
06:25 <pacak> Not really. Ruby is a nice language, implementation is bad. You can't make dynamic function names in haskell without doing TH magic
06:25 <athan> rtf,
06:25 <glguy> the bot is just some example code
06:25 <athan> seroiously that comma needs some attention and appreciation
06:25 <iqubic> Really?
06:25 <iqubic> glguy: What does the bot do?
06:26 <athan> pacak: that's what makes it static though iirc
06:26 dm3 joined
06:26 andyhuzhill1 joined
06:26 <suzu> rails redefines so much dangerous shit
06:26 <glguy> check out the Main.hs in the bot directory. it's just an example of using the irc library
06:26 lambdaman joined
06:26 <suzu> rvm even modifies `cd` in your shell
06:27 <suzu> fucking
06:27 <suzu> cd
06:27 <suzu> monkeypatched
06:27 <iqubic> Do I need to run that?
06:27 <glguy> no
06:27 <iqubic> Do I need to run the bot?
06:27 <suzu> 2 years of rails dev was good but no more
06:27 <iqubic> I'm not going to run the bot.
06:27 <pacak> athan: Well... You can imagine find_by_foo_and_bar as MonadFind m, MonadPanic m, HasFoo a, HasBar a => m a
06:27 <dysfun> well it's ironic, but most of the jobs i'm seeing that will let me work remotely are rails
06:28 <dysfun> this... is not enough to make me write rails
06:28 <athan> suzu: I want to battle the rails inventor on something
06:28 <suzu> DHH?
06:28 <athan> like... doing things
06:28 <athan> for instance
06:28 <suzu> lolll
06:28 <suzu> you mean challenge him to do stuff?
06:28 <suzu> i dont understand
06:28 <dysfun> so i used to hate DHH, but i've agreed with him a lot recently
06:28 JeanCarloMachado joined
06:28 <athan> no i mean, challenge him on to being capable of doing shit
06:28 <athan> because wtf
06:28 <pacak> It's getting more and more offtopic.
06:29 splanch joined
06:29 <thang1> Ok so I'm confused here
06:29 <athan> exactly
06:29 <suzu> rofl
06:29 <thang1> In type theory, there's Calculus of Constructions, Homeotopy type theory, and Intuitionistic type theory
06:29 <* athan> finds that dungeon again, shit.
06:29 <* athan> thang1 be more specific :|
06:29 <thang1> Haskell uses a subset of Intuitionistic type theory, right?
06:30 <athan> very very like..... SUPER small subset
06:30 <athan> (iirc)
06:30 <athan> read PFPL
06:30 <thang1> And Homotopy theory being implemented in a computer language is still being studied, so no languages even uses it yet
06:30 <thang1> right?
06:30 <thang1> So then Calculus of Constructions... wher edoes that one come in? o.O
06:30 <athan> and you will have light shining from your eyes so you'll never need a flashlight again
06:30 <dysfun> PFPL?
06:31 <athan> thang1: Coq implements CoC
06:31 takuan joined
06:31 <thang1> Yeah, but someone said earlier that DH was gonna use CoC of some sort? o.O
06:31 <athan> iirc well
06:31 <athan> it's fucker'd
06:31 soniku joined
06:32 <thang1> Also, is CoC different than intuitionistic type theory or from the same "family" of type theories? It's a higher-order typed lambda calculus, but I'm not quite sure where all of these things fit together in the whole space of type theories...
06:32 <athan> yeaaa boiii: https://coq.inria.fr/refman/Reference-Manual006.html
06:32 mjora7 joined
06:32 <thang1> I also have no idea where the fuck logic programming fits in there
06:32 nomotif joined
06:32 <athan> thang1: I think you are right
06:32 <athan> in the sense of decidability
06:33 <athan> but that's something PFPL explains, given that I've already read it (get it?)
06:33 <thang1> Man if only I knew what tf that acronym meant...
06:33 <thang1> brb gonna see if based google knows
06:33 montik joined
06:33 <thang1> ahhh, yes. Park forest public library
06:33 <athan> practical foundataions for parks and territories
06:33 <thang1> or practical foundations for programming languages
06:33 <athan> er, programming languages
06:34 <thang1> hahaa
06:34 leat joined
06:34 <thang1> thx, downloaded it
06:34 <suzu> class Term arg result | result -> arg where
06:34 <suzu> wtf is this
06:34 <suzu> this | shit
06:35 <thang1> *cough* I mean added to cart
06:35 <athan> \me will cut you if you denote my T as not equivialent, extensionally to an L
06:35 NJBS joined
06:35 <athan> suzu: it's close enough
06:35 <athan> you know>
06:35 <athan> ?**
06:35 <lambdabot> Maybe you meant: wn v rc pl id do bf @ ? .
06:35 <athan> > class WTF a b | a -> b
06:35 <lambdabot> <hint>:1:1: error: parse error on input ‘class’
06:35 MoALTz joined
06:36 zeroed joined
06:36 <suzu> its what
06:36 <suzu> ?
06:36 <johnw> thang1: https://cstheory.stackexchange.com/questions/7561/whats-the-relation-and-difference-between-calculus-of-inductive-constructions-a
06:36 <suzu> > class WTF a b | a -> b where
06:36 <athan> > class WTF a b | a -> b where; fuckinn :: a -> b; instance WTF () () where; fuckinn () = ()
06:36 <lambdabot> <hint>:1:1: error: parse error on input ‘class’
06:36 <lambdabot> <hint>:1:1: error: parse error on input ‘class’
06:36 <athan> basicall
06:36 <athan> y'd
06:37 <NJBS> Does Haskell support "or patterns" in pattern matching like OCaml? Basically I want to have multiple patterns invoke the same expression without needing to write the expression twice.
06:37 <athan> you're using `->` in the sense of "funcitonal dependencies"
06:37 <thang1> johnw: thanks
06:38 <athan> they denote the capacity to identify dependent "tags", of which can determine the exact instances of particular type classes
06:38 JeanCarloMachado joined
06:38 <athan> NJBS++
06:38 <Axman6> NJBS: I don't believe you can do it in Haskell
06:39 masse joined
06:39 <NJBS> Ah, that's unfortunate :(. Thanks for the answer!
06:39 <suzu> oh ok let me look up fundeps
06:39 <athan> (given that the n-pair of dependent tags is accumulated at compile time)
06:39 <athan> it's chill'n
06:39 aarvar joined
06:40 <suzu> so it says that the type of `b` can be determined by the instance of `a` being used
06:40 <suzu> thats what WTF a b | a -> b means
06:40 <suzu> is that correct?
06:40 <dysfun> yes. that's FunctionalDependencies
06:40 <suzu> why do we care though?
06:40 <suzu> why cant we live with class WTF a b
06:40 <suzu> and just define instances of a and b ourselves?
06:40 <dysfun> you can. but it'll reduce the helpfulness of the type checker
06:41 <yushyin> NJBS: https://github.com/ghc-proposals/ghc-proposals/pull/43 just for reference
06:41 <athan> correctanamamously
06:41 <athan> 'd
06:41 <athan> 'jet
06:41 <suzu> so i'm looking at the haskell wiki entry for fundeps and i dont understand the motivation for using these
06:42 <suzu> supposing you have:
06:42 <NJBS> yushyin, Oh great, thanks! I'll be sure to sub to the thread.
06:42 <dysfun> essentially, they give GHC an option for solving the constraint backwards
06:42 <jle`> in practice it seems to be mostly for type inference, although you can use them to simulate type functions in a way
06:42 <athan> suzu: you can use MultiParamTypeClasses, but you may find yourself annotating types to determine instances of which are used before typechecking
06:42 <athan> [tm]
06:42 <athan> *
06:42 <suzu> class Mult a b c where; (*) :: a -> b -> c;
06:42 <suzu> instance Mult Matrix Matrix Matrix where {- ... -}
06:42 ketil_ joined
06:42 <suzu> instance Mult Matrix Vector Vector where {- ... -}
06:42 <suzu> and
06:42 <suzu> m1, m2, m3 :: Matrix
06:43 robatosan joined
06:43 <dysfun> you would have to solve this one way or another, but this way it won't require manual type entry at the use site
06:43 <athan> [tm*] of which defines a method where things are more better than our trash heap we like to call trademarks
06:43 <suzu> why does (m1 * m2) * m3
06:43 <suzu> give you an ambiguity error?
06:43 <suzu> i mean m1 and m2 are Matrix-es
06:43 <suzu> why cant the compiler choose to use Mult Matrix Matrix Matrix?
06:43 <suzu> wtf else could you use
06:43 <athan> because multiparam type classes doesn't prefer to define the set of which instances already exist
06:44 <quchen> The outer * could Mult Matrix Matrix Anything.
06:44 <athan> and constrain against it
06:44 <jle`> there might be other instances potentially
06:44 <suzu> but the m3 is there
06:44 <athan> because space math
06:44 <suzu> so it can't be Mult Matrix Matrix _
06:44 <jle`> what abotu the type of (m1 * m2) * m3 ?
06:44 <quchen> Yes, that’s the »Mult Matrix (Matrix) Anything« matrix.
06:44 jutaro joined
06:44 <athan> ot
06:45 <athan> it's legit'dly space
06:45 <athan> srsly
06:45 <athan> okay I'm out, g'night yall
06:45 <suzu> im not sure where the anything part comes from
06:45 <suzu> night athan
06:45 <dysfun> night
06:45 <jle`> suzu: yes, suppose m1 * m2 :: Int
06:45 <suzu> okay
06:45 <jle`> then (m1 * m2) * m3 could be a Matrix Int Matrix instance
06:45 <jle`> who knows
06:46 <athan> (fuckin Int is decided tho, and fundeps coerce decidability
06:46 <athan> )
06:46 <mivael_> hi all
06:46 <jle`> it could be that the inner one uses Matrix Matrix Bool, and the other * uses Matrix Bool Matrix
06:46 <suzu> but such an instance does not exist
06:46 <jle`> it could potentially exist
06:46 <* athan> fuckin had toomany wite-ish russians
06:46 <suzu> if it doesn't, would it typecheck ok?
06:46 <quchen> It could exist in another module.
06:46 <suzu> if it didnt exist at all, would it work?
06:46 <quchen> It could exist based on how the module is used in other modules.
06:47 <jle`> it might exist until some remote module imported some other remote module and everything breaks
06:47 <suzu> lol kk
06:47 <suzu> so pretty much ghc doesnt know what you want the (m1 * m2) to be
06:47 <dysfun> honestly if you want to avoid 'space math' as athan charmingly puts it, it's easier to just treat the type system as what it is and learn how to use it
06:47 <suzu> (m1 * m2) :: Matrix * m3 would typecheck
06:47 <suzu> but be uggo af
06:47 <mivael_> Are there backward compatible ways of "including" int64Dec in source code?
06:48 <jle`> ((m1 * m2) :: Matrix) * m3 :: Matrix might
06:48 <suzu> err yeah
06:48 <dysfun> yes. the functionaldeps stops you having to write that type sig
06:48 <suzu> didnt onion it enough
06:48 <suzu> so the fundeps here
06:48 coot joined
06:48 <suzu> class Mult a b c | a b -> c where
06:48 <suzu> tell GHC that you can lookup c by knowing a and b
06:48 <dysfun> yes
06:48 <suzu> so do that to get the type of c
06:48 <dysfun> and ghc will tell you if you break a fundep
06:49 <athan> specifically
06:49 <suzu> if i define a Matrix A B X and an Matrix A B Y, it'll tell me that i fucked up?
06:49 <suzu> sweet
06:49 <dysfun> yes
06:49 <dysfun> it'll tell you it breaks the fundep
06:49 <athan> there must be a route of wich it can bona-fide decide `c`'s monomorphic type
06:49 <suzu> ily ghc
06:49 <athan> given `a` and `b`'s "shape"
06:49 <suzu> shoutz to spj for the sick compiler
06:49 <dysfun> well you could use IncoherentInstances if there's only one, but don't do that
06:50 <mivael_> According to the docs, int64Dec should reside in Data.ByteString.Builder (http://hackage.haskell.org/package/bytestring-
06:50 <athan> (of which can be either monomorphic types or some kind of higher order thing that's not worth spending time on because I don't know why I'm here)
06:50 <athan> suzu: don't shout
06:51 <athan> SCREAM, for bitcoins and monero to go his way
06:51 jer1 joined
06:51 <athan> somehow
06:51 <mivael_> However, it is an error on my current environment: "Could not find module `Data.ByteString.Builder'"
06:51 <athan> or, even better
06:51 <suzu> athan: lol what are you saying
06:51 <athan> do more research than me onto the unshowered devs that make our ideas
06:52 <dysfun> he should just go work at facebook with SM and be paid to improve ghc all day
06:52 <suzu> oh to go to spj
06:52 <suzu> ye
06:52 <athan> it'znt just spj tho
06:52 <suzu> i actually did apply to fb
06:52 sgronblo joined
06:52 <athan> he'dn't maketh' DH iirc
06:52 <suzu> i got an offer but no guarantee that i'd be doing haskell
06:52 <suzu> :(
06:52 <athan> therefore fuckin wat
06:52 <athan> you know?
06:53 <dysfun> oh i wouldn't want to work at fb unless i was famous enough to cut a great deal
06:53 <athan> suzu: I would bitch at them
06:53 <suzu> i'm sure all the other minds in this channel could do the same and get a haskell team unlike me
06:53 ertes joined
06:53 <athan> and say "haskell makes for sure that things will always be correct and working for your demos because you're fucking dumb"
06:53 <athan> and they usually bityer
06:53 <athan> bite* fak
06:53 <suzu> yeah recruiters don't understand those words
06:54 <suzu> they got team placement and quotas and shit to deal with
06:54 <athan> "fuck you" :D
06:54 <suzu> rofl
06:54 <suzu> i ended up not taking the offer fyi
06:54 lambdama_ joined
06:54 <suzu> ¯\_(ツ)_/¯
06:54 ccomb joined
06:54 <suzu> but y'all should go for a hs team at fb if you can. def would've taken it if offered :(
06:55 <athan> "yep haskell sure does put the dealio's in the effect modulator so that the area compartment sure does put the part in the dealio"
06:55 <suzu> lmfao
06:55 <suzu> athan go sleep
06:55 <athan> FUCK
06:55 <sophiag> question wrt to criterion: how do i call whnf or nf when benchmarking pure functions of arity 0?
06:55 <athan> suzu: fb'
06:55 <athan> s haskell
06:55 <athan> is unspeakable
06:55 <athan> so yea
06:55 <suzu> it is unspeakable?
06:56 <athan> fuckin spaaaaaace
06:56 biglambda joined
06:56 <suzu> ur high m8
06:56 <johnw> athan: language, please
06:56 <dysfun> suzu: google for 'haxl', should give you an idea
06:56 <suzu> yeah i've seen haxl
06:56 <athan> only around the area of which doesn't techically have grammatical semantics because I somehow just convinced you of it, eh?
06:57 zeroed joined
06:57 zeroed joined
06:57 <suzu> can you go to bed yet
06:58 <* athan> will dive for cover before the mortars of assumed friggin' bad language hit. Thank you johnw and glguy for everything you've done for me, lmao srsly rn. RN, thank you.
06:58 insitu joined
06:58 guiben joined
06:58 <athan> SRS (mortar hits)
06:58 louispan joined
06:58 jer1 joined
06:59 <mivael_> I finally found int64Dec in Data.ByteString.Lazy.Builder.ASCII -- but it should not be there according to docs (http://hackage.haskell.org/package/bytestring-
07:00 fruittec joined
07:00 <mivael_> The question is how to write code which would run on both environments (e.g. bytestring- and bytestring-
07:00 ystael joined
07:00 <vaibhavsagar_> {-# LANGUAGE CPP #-}
07:01 <mivael_> vaibhavsagar_: #ifdef ?
07:01 <vaibhavsagar_> yeah, that's what I was thinking
07:02 louispan joined
07:02 <vaibhavsagar_> I've never used it before, so I can't be of more help than that
07:02 <mivael_> vaibhavsagar_: what identifiers I could check with #ifdef?
07:02 <mivael_> vaibhavsagar_: ah, okay
07:02 ventonegro joined
07:02 <vaibhavsagar_> https://guide.aelve.com/haskell/cpp-vww0qd72#item-qxhl6vk6
07:03 <vaibhavsagar_> miavel_: you can check the version of bytestring you have available
07:03 <mivael_> vaibhavsagar_: the post you mentioned seems to be cabal-dependent
07:04 <vaibhavsagar_> no, you can do the #if MIN_VERSION_bytestring(<version>) check in a source file
07:04 nomotif joined
07:05 <vaibhavsagar_> the post indicates that Cabal automatically generates macros for you
07:05 ragepandemic joined
07:05 <mivael_> vaibhavsagar_: thanks, I'll try
07:05 <quchen> mivael_: Look for »cabal*.h«, it’s the file that defines the macros
07:06 <quchen> cabal_macros.h
07:07 <mivael_> quchen: I can not rely on assumption that my code will be built with cabal
07:07 <quchen> What else?
07:07 <mivael_> quchen: just ghc
07:07 <mivael_> vaibhavsagar_: It still seems to be cabal dependent: "Cabal automatically generates macros (MIN_VERSION_<library>) for all libraries your project depends upon."
07:08 JeanCarloMachado joined
07:08 bartavelle joined
07:09 mceier joined
07:09 jer1 joined
07:10 <mivael_> quchen: like this: ghc ... -o 'hs.exec' file.hs && ./hs.exec
07:10 yoneda joined
07:11 systadmin joined
07:11 splanch joined
07:12 mmn80 joined
07:13 vlatkoB_ joined
07:14 <vaibhavsagar_> mivael_: how would your user make bytestring available to ghc?
07:16 louispan joined
07:16 <Lokathor> https://hackage.haskell.org/package/base-
07:16 <Lokathor> this doesn't work with getLine
07:16 <Lokathor> such sadness
07:18 eklavya joined
07:19 bennofs joined
07:21 Eduard_Munteanu joined
07:22 <mivael_> vaibhavsagar_: for example, by using haskell platform installed by means of an operating system
07:22 <cocreature> Lokathor: huh, I would have expected that getLine goes through the standard GHC IO manager so it should work
07:23 louispan joined
07:23 <vaibhavsagar_> mivael_: can you check the GHC version?
07:23 lambdaman joined
07:23 JeanCarloMachado joined
07:23 <mivael_> vaibhavsagar_: The Glorious Glasgow Haskell Compilation System, version 7.6.3
07:23 <Lokathor> cocreature, ACTUALLY, maybe it's cause i tried in ghci? which never runs in threaded mode?
07:23 <vaibhavsagar_> no, I mean in your script
07:24 <vaibhavsagar_> I think Cabal might not generate your macros
07:24 fowlslegs joined
07:24 <vaibhavsagar_> as in, you'd have them available even if you don't use Cabal
07:24 mattyw joined
07:24 <cocreature> Lokathor: I’ve just tried it outside of ghci and it works just fine
07:24 <mivael_> vaibhavsagar_: which script? you mean me *.hs source code?
07:24 laz joined
07:24 <vaibhavsagar_> yup
07:24 <mivael_> s/me/my/
07:24 <cocreature> Lokathor: but it also works in ghci for me
07:25 <cocreature> not sure what’s causing problems for you
07:25 <vaibhavsagar_> nvm, just throwing ideas out there
07:25 <Lokathor> cocreature, I'm sure the answer somehow boils down to "haskell on windows"
07:26 baldrick1 joined
07:26 <cocreature> Lokathor: ah right, ghc’s io manager on windows doesn’t properly support nonblocking IO iirc. afaik Phyx is working to change that for ghc 8.4
07:27 <Lokathor> .4? yikes that sounds far off
07:28 drcode joined
07:29 dm3 joined
07:30 jer1 joined
07:31 Sampuka joined
07:31 Reshi joined
07:31 uiop_ joined
07:32 oish joined
07:33 Yuras joined
07:34 mohsen_ joined
07:35 Elhamer joined
07:35 bollu joined
07:35 albertid joined
07:36 Itkovian joined
07:37 guiben joined
07:37 JeanCarloMachado joined
07:38 pie_ joined
07:38 Itkovian joined
07:38 guiben joined
07:39 <kadoban> 8.2 is soonish I think, so it's probably not that long.
07:45 samgd joined
07:45 <cocreature> 8.4 should be in about a year
07:47 m1dnight_ joined
07:48 CurryWurst joined
07:48 cpup joined
07:49 freusque joined
07:50 osa1 joined
07:51 jer1 joined
07:51 thc202 joined
07:52 cloudhead joined
07:53 castlelore joined
07:53 castlelore joined
07:54 mfukar joined
07:54 acidjnk22 joined
07:55 m1dnight_ joined
07:55 zeroed joined
07:55 zeroed joined
07:58 <dysfun> ooh, 8.4 is when they think we'll get linear types
07:59 <dysfun> i have some use cases in mind for them
07:59 navilan joined
08:00 louispan joined
08:00 JeanCarloMachado joined
08:01 Eliel_ joined
08:01 irishsul1an joined
08:01 ystael joined
08:01 Veltas joined
08:01 robatosan joined
08:02 <mivael_> vaibhavsagar_: error: missing binary operator before token "("
08:02 <mivael_> vaibhavsagar_: error: missing binary operator before token "("
08:02 jutaro joined
08:02 <mivael_> vaibhavsagar_: #if MIN_VERSION_bytestring(0,10,0)
08:02 <mivael_> (sorry for the duplicate)
08:04 zero_byte joined
08:04 <mivael_> vaibhavsagar_: seems that MIN_VERSION_* are not defined if building without cabal
08:04 <geekosaur> correct
08:04 <vaibhavsagar_> good to know, thanks mivael!
08:04 <vaibhavsagar_> *mivael_
08:06 fakenerd joined
08:06 tekacs joined
08:08 ventonegro joined
08:09 aaron7 joined
08:09 takle joined
08:09 <mivael_> geekosaur: do you happen to know a cabal independent way to write code which would work with old and new bytestring API?
08:10 <geekosaur> no, we're pretty dependent on cpp and the Cabal library's use of it
08:11 <* geekosaur> is ... not fond of this; the problems with cpp on OS X and *BSD are a good example of why
08:11 <geekosaur> and general problems with ' and # which behave differently in C, so cpp gets confused
08:11 <geekosaur> backpack in 8.2 would get away from the cpp, but still require the Cabal library as I understand it
08:12 louispan joined
08:12 <mivael_> backpack?
08:14 <geekosaur> https://github.com/ezyang/thesis/releases
08:14 takle joined
08:14 <mivael_> geekosaur: I guess I'm not experienced enough with ghc preprocessor usage and cabal to understand most of what you said :)
08:14 cfricke joined
08:15 jer1 joined
08:15 Beetny joined
08:15 aplund joined
08:17 aloiscochard joined
08:17 Darruma joined
08:18 <yushyin> still all extensions and very compiler dependent, would like to see some of this newer stuff in haskell prime.
08:18 takle_ joined
08:18 JeanCarloMachado joined
08:19 andyhuzhill joined
08:19 louispan joined
08:20 <geekosaur> I'd care more if there were an alternative compiler on the horizon, instead of a trail of dead ones...
08:20 esph joined
08:21 fizbin joined
08:21 locallycompact joined
08:22 alqatari joined
08:23 falafel joined
08:23 takle joined
08:24 lambdaman joined
08:25 eacameron joined
08:26 micmus joined
08:27 eklavya joined
08:27 andyhuzhill joined
08:27 fotonzade joined
08:29 richi235 joined
08:29 lep-delete joined
08:29 Darruma left
08:30 noctux joined
08:31 yushyin joined
08:31 JeanCarloMachado joined
08:33 qz joined
08:33 soniku joined
08:33 sgronblo joined
08:33 newhoggy joined
08:33 petermw joined
08:34 jer1 joined
08:34 Elhamer_ joined
08:36 _sg joined
08:37 coot joined
08:37 Noldorin joined
08:37 Elhamer joined
08:40 petermw joined
08:41 Itkovian joined
08:43 Sampuka joined
08:45 unK_ joined
08:48 <jchia> How can I make a new regular Vector out of an IOVector?
08:48 filterfish joined
08:49 indi_ joined
08:49 <jchia> I think I can use create
08:53 Shatnerz joined
08:55 JeanCarloMachado joined
08:55 jer1 joined
08:56 fizruk joined
08:58 Elhamer_ joined
09:02 ystael joined
09:02 binaryplease joined
09:02 oish joined
09:03 <tsahyt> jchia: freeze?
09:03 JeanCarloMachado joined
09:04 saep joined
09:04 beanbagu1 joined
09:04 aib joined
09:05 robatosan joined
09:06 SenpaiSilver joined
09:09 bennofs joined
09:09 descender joined
09:10 SenpaiSilver joined
09:10 systadmin joined
09:12 paolino joined
09:14 Mortomes|Work_ joined
09:15 bjz joined
09:15 jer1 joined
09:16 mohsen_1 joined
09:17 Elhamer__ joined
09:17 splanch joined
09:19 ub joined
09:19 Faucelme joined
09:19 JeanCarloMachado joined
09:19 <jchia> tsahyt: Yeah, that worked. I was confused by box-vs-unboxed and generic when looking up the docs.
09:20 tcsavage joined
09:20 whit joined
09:20 book_ joined
09:22 filterfish joined
09:22 piyush-kurur joined
09:23 gmcabrita joined
09:24 ertes joined
09:24 bigos joined
09:25 k0001 joined
09:27 mbuf left
09:29 zcourts joined
09:33 guiben joined
09:34 soniku joined
09:36 jer1 joined
09:37 splanch joined
09:38 oisdk joined
09:39 splanch_ joined
09:40 soLucien joined
09:40 Elhamer joined
09:41 amiri joined
09:41 Elhamer_ joined
09:41 JeanCarloMachado joined
09:41 <jchia> How can I convert an unboxed vector to a boxed vector? I need to zip a boxed vector with an unboxed vector, so it seems that I need to do the conversion first. Is there a better way than calling toList and then fromList?
09:42 newhoggy joined
09:42 romank joined
09:43 <Taneb> jchia, there's the "convert" function
09:43 <Taneb> convert :: (Vector v a, Vector w a) => v a -> w a
09:43 <Taneb> It'll convert from an unboxed vector to a boxed vector
09:43 <jchia> Taneb: Thanks
09:43 fizbin joined
09:43 <pacak> convert
09:43 athan joined
09:44 Eduard_Munteanu joined
09:44 prefork joined
09:44 Xorlev joined
09:44 rstone_ joined
09:45 cfricke joined
09:45 johtso joined
09:45 etrepum joined
09:46 amiri joined
09:46 <pacak> How would you go about writing an AST for transformation of json (aeson) values? Transformations similar to "in top level object under key 'foo' replace it's value which is [[Double]] with [Double] which is least of means and remove all other top levevel object keys except for 'foo' and 'bar'"?
09:46 Scorchin joined
09:46 aristid joined
09:46 tharper joined
09:47 ericsagnes joined
09:47 strmpnk joined
09:48 nkpart joined
09:48 nbouscal joined
09:48 incomprehensibly joined
09:49 stasku joined
09:49 netheranthem joined
09:49 zariuq joined
09:49 yaknyasn joined
09:50 bdeferme joined
09:50 <vaibhavsagar_> pacak something like jmespath: http://jmespath.org/?
09:50 doomlord joined
09:50 ajmccluskey joined
09:50 zmanian____ joined
09:50 banjiewen joined
09:51 newhoggy joined
09:51 <pacak> vaibhavsagar_: Seems interesting
09:51 <pacak> thanks
09:52 <vaibhavsagar_> there's also jq: https://stedolan.github.io/jq/
09:52 paf31 joined
09:52 ryanpcmcquen joined
09:55 ecobos joined
09:55 gornikm_ joined
09:55 <pacak> vaibhavsagar_: Not quite what I want, but syntax might be interesting.
09:55 <pacak> I want to generate transformations from javascript and apply them in haskell
09:56 jcp___ joined
09:56 dgonyeo joined
09:56 codedmart joined
09:56 afcondon_ joined
09:56 gawen joined
09:56 peschkaj joined
09:57 enolan joined
09:57 butterthebuddha joined
09:58 ReinH joined
10:00 newhoggy joined
10:01 connrs joined
10:02 JeanCarloMachado joined
10:02 ystael joined
10:03 <vaibhavsagar_> like a virtual dom thing?
10:05 DocWinter joined
10:05 <pacak> Not quite. I have a bunch of data and I want to make queries on that data. Fetching in all and doing on javascript side is slow
10:12 manek joined
10:12 <manek> Hi! I've got a structure `data A = A { _i :: Maybe Int , _b :: B}; data B = B { _val :: Map Int A }` and I want to define instance of At for B. I can write lens `at s = val . at s . non (A mempty mempty) . b`, however it does not return value in Maybe, but is close to what I want to get
10:12 <manek> Is it a good approach ?
10:13 houli joined
10:13 yellowj joined
10:13 ebutleriv joined
10:14 si14 joined
10:14 sz0 joined
10:16 jer1 joined
10:16 micmus joined
10:17 fingerzam joined
10:17 mmn80 joined
10:17 bweston92 joined
10:17 raynold joined
10:18 Cir0X joined
10:18 sabali joined
10:20 filterfish joined
10:21 notdan left
10:22 biglambda joined
10:24 nickolay joined
10:24 insitu joined
10:24 sgronblo joined
10:26 Boomerang joined
10:27 robatosan joined
10:27 ForgedPancake joined
10:27 nighty-- joined
10:28 insitu joined
10:28 butterthebuddha joined
10:30 zcourts joined
10:33 jer1 joined
10:33 Giulia joined
10:33 phaji joined
10:34 <Giulia> Is there a specific channel for Jobs ?
10:35 newhoggy joined
10:36 lc_ joined
10:37 Wizek joined
10:38 Wizek_ joined
10:38 oisdk joined
10:41 newhoggy joined
10:42 Giulia left
10:43 lambdaman joined
10:47 marr joined
10:48 noumenon joined
10:48 eklavya joined
10:49 lattenwald joined
10:50 dreamseeker joined
10:50 seventh-chord joined
10:52 yellowj joined
10:55 jer1 joined
10:55 NikolajK joined
10:56 Elhamer_ joined
10:56 NikolajK left
10:57 simukis_ joined
10:58 locallycompact joined
10:58 kuribas joined
10:59 mmachenry joined
10:59 alqatari joined
11:02 Snircle joined
11:03 ystael joined
11:04 ozgura joined
11:05 paolino joined
11:06 ertes joined
11:08 _paul0 joined
11:10 asthasr joined
11:11 newhoggy joined
11:12 Yuras joined
11:12 Guest7367 joined
11:14 hive-mind joined
11:14 Soft joined
11:15 jer1 joined
11:16 butterthebuddha joined
11:18 soLucien joined
11:19 gottcha joined
11:19 DragonWolf joined
11:20 Giulia joined
11:23 newhoggy joined
11:24 soniku joined
11:25 shayan_ joined
11:26 connrs joined
11:28 coot joined
11:29 eklavya joined
11:31 zcourts joined
11:33 Yuras joined
11:33 kritzcreek joined
11:34 dreamseeker joined
11:36 jer1 joined
11:36 sdothum joined
11:36 sirreal joined
11:38 fotonzade joined
11:39 uuplusu joined
11:40 bartavelleT joined
11:41 SlashLife joined
11:43 Argue joined
11:44 bartavelleT joined
11:45 Fendor joined
11:48 binaryplease joined
11:49 JeanCarloMachado joined
11:52 acarrico joined
11:52 sgronblo joined
11:52 bartavelleT joined
11:56 zariuq joined
11:56 jer1 joined
11:57 Argue_ joined
11:57 robatosan joined
11:58 fakenerd joined
11:59 systadmin joined
12:00 opios joined
12:03 jer1 joined
12:04 ystael joined
12:04 uuplusu_ joined
12:04 bjz_ joined
12:05 oleo_ joined
12:07 uuplusu joined
12:07 butterthebuddha joined
12:07 alfredo joined
12:08 nh2 joined
12:08 asmyers joined
12:09 fizbin joined
12:09 asthasr joined
12:09 nomicflux joined
12:10 nicknovi1 joined
12:11 pie_ joined
12:11 chc4 joined
12:13 coot joined
12:13 Elhamer_ joined
12:14 NyanPasu joined
12:16 opios joined
12:18 jer1 joined
12:18 bennofs joined
12:21 ondrejs joined
12:21 oish_ joined
12:23 zariuq joined
12:23 jaspervdj joined
12:24 sepp2k joined
12:27 <Axman6> pacak: the lens-aeson package can give you a lot of useful operations for doing that sort of thing, it wouldn't be hard to build up all of the Value -> Value transformations you want
12:27 fotonzade joined
12:27 <Axman6> (Or is it aeson-lens... whichever was written by Ed Kmett)
12:28 acarrico joined
12:28 Elhamer joined
12:29 <pacak> Hmm...
12:30 hnhnhnhn joined
12:30 ystael joined
12:30 <pacak> My problem is not doing transformation themselves but encoding them as a string.
12:31 LiaoTao_ joined
12:32 <pacak> I wonder...
12:32 superlinux joined
12:32 bartavelleT joined
12:32 <superlinux> hey all
12:32 bjz joined
12:32 <superlinux> how are you?
12:32 danthemyth joined
12:33 <pacak> o/
12:33 <pacak> Still alive.
12:33 locallycompact joined
12:33 <ph88_> davean present ?
12:33 Fendor joined
12:33 locallycompact joined
12:34 doomlord joined
12:34 <pacak> Cale: That was fun. https://github.com/tibbe/unordered-containers/issues/147 and https://ghc.haskell.org/trac/ghc/ticket/13615
12:34 <superlinux> I just want to tell Arabs in #haskell that there is a Facebook group for Arabs who want to learn Haskell they are already Haskellers
12:34 <bartavelleT> pacak: yeah, nice bug reduction !
12:35 <superlinux> *or they are
12:36 <Giulia> Hey , is there a specific channel for jobs=
12:36 <Giulia> ?
12:36 slomo joined
12:36 slomo left
12:37 Sampuka joined
12:37 Elhamer_ joined
12:37 jer1 joined
12:38 <cocreature> quchen: should I expect any blocking issues when I try to use your pretty printer or is it ready and you’re only waiting until you become a maintainer?
12:38 umib0zu joined
12:39 <quchen> cocreature: There are no known issues.
12:39 <cocreature> quchen: great, thanks!
12:39 <quchen> cocreature: I’ve used it multiple times in my own project, I benchmarked it, the doctest suite should be quite extensive.
12:40 <Rembane> Giulia: Try here. If it becomes a too long discussion it might be advisable to move to "haskell-offtopic
12:40 <quchen> s/project/projects/
12:40 <cocreature> perfect
12:40 <quchen> cocreature: I’m still not sure whether I want to provide an annotated Doc type or not.
12:41 <quchen> cocreature: So that might be the last breakage I’m putting in (compared to the version right now). I *will* maintain the compatibility modules with wl-pprint(-ansi) though, so that part won’t break.
12:41 <quchen> And nothing will break in a major way in either case.
12:41 <cocreature> some breakage is completely fine with me :)
12:41 <quchen> cocreature: If you’re concerned about performance, take note of the fuse function :-)
12:42 <cocreature> I couldn’t care less about performance :)
12:42 Gurkenglas joined
12:42 pie__ joined
12:43 <quchen> Hm, okay. Then go ahead.
12:43 <quchen> cocreature: comments of any kind welcome! If the docs are unclear (or could be clearer) for exmaple
12:43 lambdaman joined
12:43 <quchen> Missing tests, better examples, whatever you have
12:43 kappter joined
12:44 <cocreature> quchen: the main reason I want to switch to your library is that the docs are significantly better than for the other libs :) so thanks for that :)
12:44 <quchen> Hmm, you can’t file issues because it’s a fork though :-(
12:44 <quchen> cocreature: :-)
12:44 <cocreature> quchen: you can enable issues on forks
12:44 <quchen> Oh!
12:44 descender joined
12:44 <quchen> Cool! Done! Thanks!
12:45 theelous3 joined
12:45 cpennington joined
12:45 <ph88_> i have a few functions with (MonadResource m, MonadState StreamState m) => is there any way i can abstract this pattern ?
12:46 splanch joined
12:47 <pacak> ph88_: ConstraintKinds?
12:47 <quchen> ph88_: You can define your own constraint synonym, type Foo m = (MonadResource m, MonadState StreamState m)
12:47 <pacak> :kind Show
12:47 <* pacak> pokes lambdabot
12:48 <cocreature> quchen: can I convince you to export the semigroup version of <> instead of the monoid version?
12:48 <ph88_> oh that's nice :P
12:48 systadmin joined
12:48 <quchen> cocreature: Oh, I missed that. Good point.
12:48 <quchen> cocreature: Breaks compatibility with older releases though, might require some CPP hackery, so it’s not a one-liner.
12:49 <quchen> I agree it’s better for newer releases though.
12:49 <cocreature> yeah, for now I’m just hiding it since I use a custom prelude that exports the semigroup version
12:51 <DrMentats> how does haskell manage to type check recursive definitions? say f uses g and g uses f, does it assume f :: a and g :: b before checking each and then do some sort of unification or what? I'm making a mini type checker and I can't find a good way to support this, and no tutorial I can find explains it
12:51 <DrMentats> no need for code, I just need a general algorithm
12:51 splanch joined
12:52 KitC left
12:53 <piyush-kurur> DrMentats: the thing you are searching for is Hindley-Milner-Damas algorithm
12:53 <ph88_> why does syntax on line 1 and 2 work but line 4 fail when using the same functions? https://bpaste.net/show/f2fa96906c6c
12:54 <piyush-kurur> although haskell adds some twist because of type classes and what not
12:54 <ph88_> quchen, do i need an extension for that? The ConstraintKinds ?
12:54 <quchen> DrMentats: Naive Hindley-Milner can’t typecheck recursive definitions, yes. I’ve seen papers discussing this specifically, but I can’t recall the details.
12:54 <DrMentats> piyush-kurur: I did implement it, but all I could do so far to chain declarations together is put them into nested Lets, like like a = ... in let b = ... in ..., but then they can't refer to previous declarations
12:54 <quchen> ph88_: Yes.
12:55 <DrMentats> s/like a/let a/
12:55 uuplusu joined
12:55 <quchen> DrMentats: I think maybe the Haskell Report has a section on this issue even.
12:55 <pacak> ph88_: "NB: This instantiation can be caused by the monomorphism restriction."
12:55 <ph88_> ye i see that, but why does it work on line 1 and 2 without error
12:55 <piyush-kurur> DrMentats: if you have f refereing to g and g refering to f. it is like taking fixpoint of a pair
12:56 <pacak> ph88_: Because on lines 1/2 it won't apply.
12:56 mada joined
12:56 <ph88_> why the restriction doesn't apply there ?
12:56 <DrMentats> piyush-kurur: oh. that makes sense, actually. thanks, I'll try something on those lines.
12:56 <piyush-kurur> so if you work with fix point then it should be doable (Although I have not tried it yet)
12:57 dfeuer joined
12:58 conal joined
12:58 connrs joined
12:58 blym joined
12:58 <pacak> ph88_: Because there's a type signature for top level declaration
12:58 thecallsign joined
12:58 jer1 joined
12:58 <pacak> on line 4 - there is none.
12:58 Argue joined
12:59 burtons_ joined
12:59 <pacak> ph88_: http://img.pandawhale.com/94867-magic-gif-Shia-Imgur-MAH7.gif
12:59 <pacak> ph88_: Try disabling monomorphism restriction.
13:00 yellowj joined
13:02 jutaro joined
13:03 <piyush-kurur> DrMentats: no problem. Looks like the wikipedia entry has something to say about recursive type checking https://en.wikipedia.org/wiki/Hindley–Milner_type_system#Recursive_definitions
13:03 cpennington joined
13:03 insitu joined
13:05 <quchen> cocreature: When was Monoid put into base again?
13:06 <sophiag> i'm going through the wiki for the Lens library and the examples from Data.Text.Lens seem outdated. the type Text doesn't seem to be included and ^.packed throws an error. can anyone point me to what's changed with this?
13:06 filterfish joined
13:07 <cocreature> quchen: are you talking about Semigroup? Monoid has been in base for ages
13:07 <DrMentats> piyush-kurur: beautiful. I wouldn't have thought that HM would support this out of the box like that.
13:07 <quchen> cocreature: Eh, in Prelude I mean
13:07 systadmin joined
13:07 <cocreature> quchen: it’s not in the prelude
13:07 <quchen> cocreature: Yes it is, required for Foldable
13:08 <quchen> It’s since 4.8, looked it up
13:08 <cocreature> oh right, I thought you were talking about (<>)
13:08 <cocreature> that’s not in the Prelude
13:08 mizu_no_oto_work joined
13:09 <quchen> Right
13:09 <asthasr> Anyone used the Python lenses library?
13:10 <osa1> it seems like `MonadCatch` is more general than `MonadBaseControl IO`, is there a reason to prefer Control.Exception.Lifted.catch (from lifted-base) to Control.Monad.Catch.catch (from exceptions) ?
13:10 iAmerikan joined
13:10 <cocreature> osa1: I’m not sure about MonadCatch but MonadMask is _less_ general than MonadBaseControl IO as evidenced by the missing instance for ExceptT
13:11 ertes joined
13:12 cdg joined
13:13 jathan joined
13:13 conal joined
13:13 kaeluka joined
13:13 <cocreature> osa1: the only MonadCatch instance I know that is not an instance of MonadBaseControl IO is Either and that’s not a particularly useful instance imho.
13:14 chlong joined
13:14 <osa1> cocreature: hmm it's interesting that there's an instance for MonadMask (Either e) but not for ExceptT
13:15 crobbins_ joined
13:15 jhrcek joined
13:16 <cocreature> I don’t get why you would ever want the instances for Either that the exceptions package provides
13:17 robatosan joined
13:17 <cocreature> the reason why there is no MonadMask instance for ExceptT is that due to the shortcircuiting behavior you can’t guarantee that the finalizer is run
13:18 <osa1> ahh right, `finally` can't work
13:18 <cocreature> I’m not even sure what it means for a finalizer of type Either a b to be run
13:19 <cocreature> I guess you can replace the exception
13:21 <osa1> btw I'm using lifted-base without any problems, I'm just curious about these two typeclasses (MonadCatch and friends vs. MonadBase and MonadBaseControl)
13:21 <cocreature> imho the main reason for using the “exceptions” package is that it’s easier to understand
13:21 newhoggy joined
13:22 mmachenry joined
13:22 jer1 joined
13:22 <osa1> I guess if you don't need MonadMask you could keep MonadIO/IO out of your context/stack when yo uuse "exceptions"
13:24 superlinux left
13:25 <osa1> hmm that doesn't work too well though because only base instances for MonadCatch are STM, IO, Either e
13:25 <osa1> anyway
13:25 <cocreature> if you can keep IO outside of your code you should just use Either instead of exceptions :)
13:26 soniku joined
13:28 m1ng0sfear joined
13:30 Chefe joined
13:31 bvad joined
13:32 mniip joined
13:32 zcourts joined
13:33 coltfred joined
13:33 iulian joined
13:35 `^_^v joined
13:36 jangsutsr joined
13:38 <quchen> Munich Haskell Usergroup created! Now Show Friends and Workmates! https://www.meetup.com/munich-haskell/events/239661133/
13:38 bigos joined
13:38 <shapr> yay!
13:39 forgottenone joined
13:40 ystael joined
13:40 systadmin joined
13:40 mithrandeer joined
13:41 oisdk joined
13:41 mjs2600 joined
13:41 <* cocreature> checks travel durations to munich
13:41 jer1 joined
13:41 <cocreature> meh
13:42 mkoenig joined
13:44 <pacak> lens-aeson. Suppose I have "[{a:1,b:2,c:3,d:1},{a:10,b:20,c:30,d:1}", how do I get "[{a:1,b:2},{a:10,b:20}" - keep only a and b?
13:44 alunduil joined
13:44 leat joined
13:46 eschnett joined
13:46 roconnor joined
13:47 mstruebing joined
13:49 eschnett joined
13:49 systadmi1 joined
13:51 Wuzzy joined
13:51 <quchen> cocreature: Where are you from?
13:52 <cocreature> quchen: Karlsruhe
13:52 meba joined
13:52 nh2 joined
13:52 <quchen> Hm, not too bad. Too far for a meetup, yeah
13:53 iAmerikan joined
13:54 ChristopherBurg joined
13:54 Shock_ joined
13:54 <quchen> cocreature: Zurich maybe? Or Freiburg? Or Munich, should we umm do something bigger maybe? :-)
13:54 <cocreature> quchen: I’ll be in zurich
13:54 <quchen> Cool! Me too
13:55 jhrcek joined
13:55 <cocreature> I think we actually met at zurihac 2015 although we didn’t talk a lot
13:55 <quchen> Hmm, could be. Did I know you were cocreature?
13:55 <cocreature> I don’t think so :)
13:55 smillmorel joined
13:55 fizbin joined
13:56 <quchen> See, that’s why I write my nick on the name badge ;-)
13:56 hamishmack joined
13:56 <cocreature> yeah that’s probably a good idea
13:56 greeny__ joined
13:56 <xintron> I'm using persistent-mysql with an existing database and therefore skipping the migrations. Is there a way to still get a check that would warn (at runtime) if the internal data types differs from the database tables/columns using persistent?
13:57 akh joined
13:57 systadmin joined
13:58 guiben joined
13:59 zariuq joined
13:59 Fendor joined
13:59 splanch_ joined
13:59 eschnett joined
14:00 Yuras joined
14:00 mmachenry joined
14:01 joelburget joined
14:01 taktoa joined
14:03 splanch joined
14:03 jer1 joined
14:03 rkazak joined
14:06 ogrady_ joined
14:07 ilyaigpetrov joined
14:07 ogrady_ joined
14:08 oish_ joined
14:08 <jchia_1> When I write a function, because of the other functions it calls, it may need certain things in its context, e.g. MonadResource m because of one function and MonadIO m because of another function. MonadIO m & MonadThrow m are prerequisites for MonadResource m. That means putting MonadResource m in the context is enough, but should I also include MonadIO m and MonadThrow m in the context for clarity?
14:09 samp_ joined
14:09 locallycompact joined
14:10 newhoggy joined
14:10 nh2 joined
14:11 splanch joined
14:11 <glguy> no, you don't need to include redundant constraints
14:12 Denthir joined
14:12 <wz1000> Is it possible to run an IO action as a program with some stdin and stdout?
14:12 ogrady joined
14:12 <MitchellSalad> yeah, main :)
14:13 taktoa joined
14:13 modal joined
14:14 hust921 joined
14:16 <cocreature> wz1000: are you looking to supply stdin to some IO action and capture the stdout?
14:16 <m1dnight_> Hey guys, im trying to create a kind of unittest that reads in a file line by line (i.e., [String]) and then creates a unit test for each of these lines
14:16 <m1dnight_> but for the life of me I can't make the types check
14:16 <cocreature> m1dnight_: show us the source and the error :)
14:17 gpampara joined
14:17 <wz1000> cocreature: Yeah
14:17 acidjnk22 joined
14:17 <quchen> cocreature: There you go, Semigroup <> https://github.com/quchen/prettyprinter/commit/02b5e7c2302bbf0c08a57c9bf5af32651e6e7275#diff-9996460ebf31daebeb1707e2777b9a33
14:18 <cocreature> quchen: thanks!
14:18 <cocreature> wz1000: for capturing stdout there is https://hackage.haskell.org/package/system-posix-redirect
14:18 <quchen> The change was quite small, but I had to wait for Travis :-)
14:18 <m1dnight_> https://hastebin.com/eholelugal.hs, cocreature
14:18 nicknovi1 joined
14:18 <m1dnight_> So the thing is, I know that H.TestCase takes an IO action as argument
14:19 <m1dnight_> But I need to create one big test of tests and the IO action to read in the log file is hard to get into a test
14:19 <m1dnight_> so makeTests should read in the file, and then generate a test for each line in that particular log file.
14:19 <m1dnight_> (so I can easily spot which lines dont parse well yet, and fix that)
14:20 <m1dnight_> And as far as I can tell from the docs of HUnit, IO is only allowed in a TestCase
14:20 <m1dnight_> But since I want more than 1 assert (1 assert per line) I need to do IO outside of the H.TestCase, and in the H.TestList
14:20 <cocreature> m1dnight_: sounds like you need makeTests :: String -> IO H.Test
14:21 <shapr> m1dnight_: if you want to switch to HSpec, I have tests that read a file and use that for testing here: https://github.com/shapr/schrabble/blob/master/test/Spec.hs
14:21 <m1dnight_> cocreature: but then how can I turn a `IO H.Test` into a H.Test?
14:21 <m1dnight_> That's the particular annoyance here
14:22 <m1dnight_> shapr: ill give it a look. But Im going to be stubborn and try to solve this one first :D
14:22 <shapr> I liket that approach :-)
14:23 nh2 joined
14:23 jer1 joined
14:24 kmels joined
14:25 Yuras joined
14:25 jship joined
14:26 rockfordal joined
14:26 tobiasBora joined
14:26 newhoggy joined
14:27 _sg joined
14:29 Elhamer__ joined
14:30 <cocreature> m1dnight_: you can’t. but you can push the IO up to a layer that can actually do IO, e.g., main
14:30 whiteline joined
14:30 takle joined
14:31 whiteline joined
14:31 locallycompact joined
14:32 sampuka joined
14:32 danthemy_ joined
14:33 zcourts joined
14:33 hackebeilchen joined
14:33 <EvanR> so doing a low rez sdl performance test... if i draw a 40x30 grid of sprites size 8x8 i get 30% cpu (with -O2)
14:34 ystael_ joined
14:34 <EvanR> if i draw the same grid by doing 20x15 16x16 sprites, i get 8% cpu
14:34 <EvanR> the same amount of screen space is being painted, why the 4x reduction in cpu
14:34 <EvanR> overhead of the copy call??
14:34 <ph88_> pacak, monomorphism restriction is for safety, no ?
14:35 <EvanR> MR is to avoid confusion, and reduce convenience
14:35 <EvanR> so dont use it
14:35 <EvanR> and dont be confused
14:36 <EvanR> > (30*40, 15*20)
14:36 <lambdabot> (1200,300)
14:37 bigos joined
14:37 CurryWurst joined
14:37 eazar001 joined
14:37 <ph88_> why do i get an illegal polymorphic type error here ? https://bpaste.net/show/ae54a8dde379
14:37 __mu__ joined
14:38 obadz joined
14:38 <lyxia> Producer is probably a type synonym for a polymorphic type
14:39 danthemyth joined
14:39 <lyxia> https://hackage.haskell.org/package/conduit-1.2.10/docs/Data-Conduit.html#t:Producer
14:39 <EvanR> type Producer b = Proxy X () () b
14:39 dbushenko joined
14:39 <ph88_> why is that illegal ?
14:40 <EvanR> well... thats one argument
14:40 <EvanR> lets see what it expands to...
14:40 micmus joined
14:40 <EvanR> (Proxy X () () (ResourceT IO)) ByteString
14:40 <EvanR> shouldnt even kind check
14:40 <ph88_> type Producer m o = forall i. ConduitM i o m () no ?
14:40 <lyxia> EvanR: this is conduit, not pipes
14:41 <EvanR> oh not pipes
14:41 newhoggy joined
14:41 brsm joined
14:41 <EvanR> why are there two libraries for this :(
14:41 <EvanR> with the same names and point
14:41 coltfred joined
14:41 <ph88_> forall i. ConduitM i BS.ByteString (ResourceT IO) ()
14:42 davenpcm_ joined
14:42 dfeuer joined
14:42 {emptyset} joined
14:42 <lyxia> EvanR: quiver is a third
14:42 <EvanR> o_O
14:43 <EvanR> ph88_: so that looks like an existential type at least
14:43 <lyxia> there's also all the iteratee/stream libraries
14:43 <EvanR> ph88_: generally you get all this goodness by enabling RankNTypes or GADTs
14:43 nahra joined
14:43 drewr joined
14:43 sellout- joined
14:43 <EvanR> like it says
14:43 mauke joined
14:44 <ph88_> when i disable the type signature ghci is able to infer a type
14:44 jer1 joined
14:44 kvazau joined
14:44 ziyourenxiang joined
14:44 <EvanR> but not the same type you thought?
14:44 nicknovitski joined
14:44 <ph88_> pipe :: (MonadIO m, MonadState StreamState m) => ConduitM a BSC.ByteString m () -> ConduitM BSC.ByteString c m r -> ConduitM a c m r
14:44 lambdaman joined
14:44 dm3 joined
14:45 tomphp joined
14:45 <EvanR> sometimes to control the signature a certain way you need to enable RankNTypes, even if a more general type would not require anything special
14:45 Dykam joined
14:45 iross joined
14:45 kian joined
14:45 kian joined
14:45 mikecaruso1 joined
14:45 enolan joined
14:45 tharper_ joined
14:45 rjeli joined
14:45 lambdabot joined
14:45 lambdabot joined
14:45 <ph88_> hmmm :/
14:46 CuriousErnestBro joined
14:46 jaargon joined
14:46 strmpnk joined
14:46 pent joined
14:46 mgaare joined
14:46 dsh joined
14:46 ilyaigpetrov joined
14:46 ec\ joined
14:46 brennie joined
14:46 pmade_ joined
14:46 parsnip joined
14:46 anachrome joined
14:46 Shatnerz joined
14:46 ebutleriv joined
14:46 vodkaInferno joined
14:46 `0660 joined
14:46 anoe joined
14:46 Cthalupa joined
14:47 hazyPurple joined
14:47 amuck joined
14:47 ecobos joined
14:47 hive-mind joined
14:47 <ph88_> it works with Rank2Types and RankNTypes
14:47 banjiewen joined
14:47 Xorlev joined
14:47 jcp___ joined
14:47 houli joined
14:47 <ph88_> (and i had to make a tiny adjustment as well .. but that's beside the point)
14:47 nkpart joined
14:47 bennofs joined
14:47 peschkaj joined
14:48 ajmccluskey joined
14:48 <ph88_> pipe :: (MonadResource m, MonadState StreamState m) => Producer m BS.ByteString -> Consumer BS.ByteString m () -> ConduitM BSC.ByteString BSC.ByteString m ()
14:48 johnw joined
14:48 <ph88_> this works with Rank2Types
14:48 mu joined
14:48 <ph88_> what is this Rank2Types and why do i need it ?
14:48 gornikm_ joined
14:48 sabali joined
14:48 ryanpcmcquen joined
14:48 hongminh1e joined
14:48 etrepum joined
14:48 Nolrai joined
14:49 thoughtpolice joined
14:49 aegray joined
14:49 kiltzman joined
14:49 ridho joined
14:49 cmdv joined
14:49 yaknyasn joined
14:49 JDevlieghere joined
14:49 defanor joined
14:49 trevorriles_ joined
14:49 coup_de_shitlord joined
14:50 abh joined
14:50 ReinH joined
14:50 DDR joined
14:50 ChewieBeardy joined
14:50 lpsmith joined
14:50 odamn joined
14:50 solidsnack joined
14:50 DigitalKiwi joined
14:50 dan64 joined
14:50 TonL joined
14:50 brixen joined
14:51 nbouscal joined
14:51 vfs joined
14:51 afcondon_ joined
14:51 nerdystreetrat joined
14:51 avn_nb joined
14:51 xplat|work joined
14:51 Jello_Raptor joined
14:51 mattp__ joined
14:52 xcmw joined
14:52 rizary joined
14:52 bartavelleT joined
14:52 sykora joined
14:52 agrif joined
14:52 marcel joined
14:52 gareth__ joined
14:52 bob_twinkles joined
14:52 Ankhers joined
14:52 baamonde joined
14:52 eacameron joined
14:52 rjungemann joined
14:53 leothrix joined
14:53 ohsix joined
14:53 eyck joined
14:53 nh2 joined
14:53 grandy___ joined
14:53 NemesisD joined
14:53 bbielsa joined
14:53 urdh joined
14:53 ephemeron joined
14:53 poga joined
14:53 dsantiago joined
14:54 zerokarmaleft joined
14:54 Heero__ joined
14:54 DragonWolf joined
14:54 dtop joined
14:54 vikram__________ joined
14:54 sclv joined
14:55 spoonm joined
14:55 magthe joined
14:56 g4k joined
14:56 austinkeeley joined
14:56 Tharbakim joined
14:56 Tharbakim joined
14:56 dgonyeo joined
14:56 tsani joined
14:56 darthvorik joined
14:56 pikhq joined
14:56 Intensity joined
14:56 mantovani joined
14:57 wamaral joined
14:57 jle` joined
14:57 bartavelle joined
14:57 _paul0 joined
14:57 codedmart joined
14:57 jathan joined
14:57 takuan joined
14:57 dyreshark joined
14:58 zero_byte joined
14:58 robogoat joined
14:58 eazar001 joined
14:58 clever joined
14:58 avdi joined
14:59 acarrico joined
14:59 baroncharlus joined
14:59 mudfog_ joined
14:59 dan_f joined
14:59 shans_ joined
15:01 eklavya joined
15:01 gmcabrita joined
15:02 zeroed joined
15:02 zeroed joined
15:02 metalrain joined
15:03 <ph88_> how can i use my conduit together with state now ? https://bpaste.net/show/1a87726b59ab
15:03 zargoertzel joined
15:04 AlainODea joined
15:04 jer1 joined
15:05 <jle`> ph88_: you might need to hoist src and snk
15:05 feltnerm joined
15:05 tomphp joined
15:05 <jle`> there might be a more natural way in conduit
15:05 <ph88_> do i have any other option beside hoist ?
15:06 wyvern joined
15:06 jzelinskie joined
15:06 kyagrd joined
15:06 eschnett joined
15:06 <eschnett> i hear one can write “Type” instead of “*” when specifying a kind. what GHC extension enables this?
15:06 milessabin joined
15:07 <jle`> ph88_: pipe (hoist lift src) (hoist lift snk) is how i, a non-conduiter, would naturally do it
15:07 <jle`> eschnett: TypeInType and importing Data.Kind
15:07 <EvanR> -XTypeInType at least
15:07 jmct joined
15:07 ocharles joined
15:07 <jle`> ph88_: host lift src will turn src into a Producer (StateT s (ResourceT IO)) BS.ByteString
15:07 <jle`> which is indeed a MonadState instance
15:08 <eschnett> EvanR: no — i’m getting “Not in scope: type constructor or class ‘Type’”
15:08 newhoggy joined
15:08 <jle`> you need to import Data.Kind, where 'Type' is defined
15:08 <jle`> it's not particularly special, it's basically `type Type = *`
15:08 <jle`> you could even write it in your own file heh
15:08 <EvanR> thats not the haskell way
15:08 <ph88_> jle`, could i use a data constructor for State directly instead of using conveniance function hoist ?
15:09 <EvanR> you need to import a universe of dependencies with funny names to get the one line declaration
15:09 <EvanR> code reuse
15:09 <eschnett> EvanR: ha! thanks.
15:09 <jle`> ph88_: you might be able to use it instead of lift if you wanted to make it complicated
15:10 <jle`> but hoist manipulates the Producer/Consumer itself
15:10 dmwit_ joined
15:10 <jle`> if you implemented it yourself you'd have to use the constructors of producer/consumer
15:10 <jle`> not of State
15:10 <ph88_> jle`, not neccesarily to make it complicated .. but to understand better what's going on under the hood
15:10 <jle`> hoist just changes the underlying monad
15:10 <ph88_> i don't really get what is happening with hoist
15:11 akemot joined
15:11 <jle`> hoist :: (forall a. m a -> n a) -> Producer m o -> Producer n o
15:11 <jle`> it transforms a producer over 'm' to a produer over 'n'
15:11 <ph88_> @src hoist
15:11 <lambdabot> Source not found. I am sorry.
15:11 reptar_ joined
15:11 <jle`> it's a typeclass method, and it's a part of the abstract interface of Producer/Consumer/etc.
15:11 <ph88_> can you show me how to do such a transform manually ?
15:11 <ph88_> with simple types
15:11 <jle`> you'd have to look into how Producer and Consumer are implemented
15:12 <jle`> internally
15:12 <ph88_> those are difficult
15:12 <ph88_> i mean just the concept of hoist
15:12 <jle`> hoist is a typeclass method, so every instance has its own meaning/definition
15:12 <ph88_> it looks to me to be some kind of fmap
15:12 <jle`> it is very much like an fmap
15:12 <ph88_> aah ok
15:12 centril joined
15:12 shiona joined
15:13 <jle`> did you see the type earlier?
15:13 <jle`> it transforms a Producer on m into a Producer on n
15:13 oisdk joined
15:13 <jle`> given a way to transform an m to an n
15:13 al-damiri joined
15:13 <ph88_> like fmap (m -> n) producer
15:14 <jle`> mhm
15:14 <jle`> the typeclass hoist comes from is actually called MFunctor
15:14 <jle`> so your intuition isn't crazy :)
15:14 <ph88_> when i see Morph i have to think of power rangers
15:14 <jle`> fwiw conduit re-exports hoist and calls it 'transPipe' http://hackage.haskell.org/package/conduit-1.2.10/docs/Data-Conduit.html#v:transPipe
15:15 <ph88_> https://www.youtube.com/watch?v=-jQCbqckLOs you know what i mean ?
15:15 carlomagno joined
15:15 <jle`> i do :)
15:16 <ph88_> yes i knew about transPipe !
15:16 jao joined
15:16 <jle`> transPipe is just a specialzed hoist with a nice name, like map vs. fmap
15:16 jackhill joined
15:17 <ph88_> i just needed to know what the concept of it is .. and if this is a natural thing to use (in the haskell language & eco system) .. or if i'm hitting an exotic edge case here
15:17 <ph88_> have to orientate you know :P
15:17 <jle`> ah, yeah :)
15:18 flatmap13 joined
15:18 <jle`> it seems like a normal thing
15:18 <ph88_> ye ok
15:18 <EvanR> :(
15:18 <jle`> it's a general design pattern in haskell, if you have something over 'm' but need it over 'n', find a way to map an (m a -> n a)
15:18 <ph88_> i was talking to davean earlier he said i had 3 options ... of which 1 was transPipe .. but i was going for another option actually .. so i'm still a bit surprised i have to use transPipe after all ..
15:18 <jle`> but i'm not a conduiter by trade
15:19 <jle`> all it is is switching out the underlying monad
15:19 <ph88_> i thought if i put enough typeclass constraints i could avoid the use of transPipe
15:19 <jle`> the problem is the type of src and snk
15:20 bartavelle joined
15:20 <jle`> well, actually, what is the type of sourceFile and sinkFile?
15:20 <jchia_1> What are typical use cases of Data.Default? When is it useful?
15:20 <ph88_> jle`, Producer (ResourceT IO) BS.ByteString and Consumer BS.ByteString (ResourceT IO) () ... but i think under the hood they are both ConduitM
15:21 <EvanR> so if you have a record, you can replace some or all the fields with a record update expression. but if you use lens, each field update is done separately, and so not as efficiently. is that right? is there a way around it?
15:21 <jle`> jchia_1: it's an ad-hoc typeclass so it's not super ideal from a mathematical standpoint, but they're useful for things like default arguments
15:21 sphinxo joined
15:21 <sphinxo> How best should I represent this with haskell datatypes:
15:21 <jle`> ph88_: where are you getting it from?
15:21 <jle`> ph88_: it might have a more general type
15:21 <EvanR> i dont find Data.Default useful, its like something you shouldnt use just because its there
15:22 <ph88_> jle`, did you see the paste ? https://bpaste.net/show/1a87726b59ab
15:22 <jle`> ph88_: what module is it imported from
15:22 <ph88_> https://hackage.haskell.org/package/conduit-1.2.10/docs/Data-Conduit.html#t:Producer
15:22 <jle`> i mean sourceFile and sinkFile
15:22 noam joined
15:22 <ph88_> Data.Conduit.Binary
15:22 sirreal joined
15:22 <ph88_> https://hackage.haskell.org/package/conduit-0.2.2/docs/Data-Conduit-Binary.html
15:23 <jle`> it looks like its type is MonadResource m => FilePath -> Producer m ByteString
15:23 <ph88_> sourceFile :: ResourceIO m => FilePath -> Source m ByteString
15:23 uglyfigurine joined
15:23 <jle`> so you can actually just use StateT as the underlying monad
15:23 blob_ joined
15:23 <jchia_1> I'm considering using Data.Default for some type that I defined that lets user customize behavior of some function. Is it better to use Maybe instead (Nothing means he wants the default setting)?
15:23 <jle`> CB.sourceFile "sample_data.txt" :: Producer (StateT StreamState (ResourceT IO)) BS.ByteString
15:23 <EvanR> i would avoid Nothing for that too
15:23 <jle`> then you wouldn't have to hoist
15:23 <ph88_> jle`, how do you know that i can use StateT as the underlying monad? And how do i actually put StateT as the underlying monad ?
15:23 <jchia_1> EvanR: What would you typically do?
15:24 <jle`> ph88_: it's polymorphic over any ResourceIO m
15:24 <EvanR> jchia_1: a better api i think would be to have another function that provides the default argument to the more complex function, then they dont need to pass anything in at all
15:24 carlomagno joined
15:24 <jle`> and StateT StreamState (ResourceT IO) is an instance of ResourceIO m
15:25 <jle`> ph88_: it's also an instance of MonadState StreamState
15:25 jer1 joined
15:25 <jle`> so it satisfies *all* of the constraints that 'pipe' needs
15:25 <jle`> pipe :: (MonadResource m, MonadState StreamState m) => ...
15:25 <jle`> StateT StreamState (ResouceT IO) is an instance of MonadIO, an instance of MonadState StreamState, and an instance of MonadResource
15:25 nh2 joined
15:26 pera joined
15:26 soniku joined
15:27 jmelesky joined
15:27 nomotif joined
15:27 newhoggy joined
15:27 <ph88_> jle`, so it seems everything fits together .. but yet i'm getting that error .. i don't understand what is the missing step here that i have to do
15:27 fXl joined
15:27 <jle`> so this way you don't need to do any hoisting, since it's already a valid underlying monad
15:27 <jle`> what did you change?
15:27 reptar_ joined
15:28 <jle`> did you change the type of snk and src ?
15:28 tobiasBora joined
15:28 <ph88_> eh dunno .. i can double check .. but as far as i know the code is just like this https://bpaste.net/show/1a87726b59ab
15:28 <fXl> Hello guys, if i compile with ghc, my app works properly but if i use cabal build it fails, what could make this happen ?
15:28 <jle`> ph88_: you need to change the type of snk and src like i mentioned
15:28 <jle`> ph88_: you can't use `Producer (ResourceT IO) BS.ByteString`
15:28 cloudhead joined
15:28 <glguy> fXl: You can paste the error message to http://lpaste.net . It won't be possible to guess
15:28 <jle`> you could use `Producer (StateT StreamState (ResourceT IO)) BS.ByteString`
15:29 <ph88_> ah ye that works
15:29 <jle`> ph88_: your problem is that you choise (ResourceT IO) as the underlying monad, but that's not an instnace of MonadState StreamState
15:29 <jle`> but you can use `StateT StreamState (ResourceT IO)` as your underlying monad, and that is indeed an instance of MonadState StreamState
15:30 <ph88_> jle`, how come i don't have to change the value and i can just change the type like that by adding the StateT StreamState part ?
15:30 <fXl> glguy: i do yaml parsing, http://lpaste.net/355133
15:30 <jle`> > [read "hello" :: Int, True]
15:30 <lambdabot> error:
15:30 <lambdabot> • Couldn't match expected type ‘Int’ with actual type ‘Bool’
15:30 <lambdabot> • In the expression: True
15:30 chlong joined
15:30 <jle`> > [read "True" :: Bool, True]
15:30 <lambdabot> [True,True]
15:30 <jle`> > [read "True" :: Int, True]
15:30 <lambdabot> error:
15:30 <lambdabot> • Couldn't match expected type ‘Int’ with actual type ‘Bool’
15:30 <lambdabot> • In the expression: True
15:30 <jle`> do you see why i didn't have to change the value, but only the type?
15:30 <jle`> it's because `read "True"` is polymorphic
15:31 <jle`> it's a polymorphic value that can be many types
15:31 <jle`> same in your case, for snk and src
15:31 <jle`> snk and src are polymorphic and can be have many types, but not every type is interchangeable with every other type
15:31 <jle`> just like how `read "True" :: Bool` can't be used everywhere that `read "True" :: Int` can be used
15:32 <ph88_> i was expecting some data constructor for State ..
15:32 mmn80 joined
15:32 <ph88_> but ok i guess it just means somewhere in my ConduitM monad i have now a state monad too
15:32 <jle`> src is polymorphic enough that it can be used over `StateT StreamState (ResourceT IO)`
15:32 uelen joined
15:32 <jle`> just like how `read "True"` is polymorphic enough that it can be used as a Bool, an Int, a String, etc.
15:33 <ph88_> ye ok maybe i was just a bit surprised that you can just keep adding monads like that and this value can be used in many monads
15:33 <jle`> a better example might be 'return 10'
15:33 mgaare joined
15:33 <jle`> which can be Maybe Int, StateT s Int, Writer Int, [Int], etc.
15:34 <ph88_> ye
15:34 <jle`> you can have `return 10 :: State s Int`, but you never use the State constructor
15:34 zcourts joined
15:34 <jle`> and, i can change `return 10 :: Maybe Int` into `return 10 :: State s Int` in my source code by just changing the type annotation
15:34 <jle`> i don't need to actually modify the written value `return 10`
15:34 <jle`> i also wouldn't call this "many monads"
15:34 <jle`> er i mean, "adding monads"
15:35 <jle`> src is polymorphic over many different individual monads
15:35 spatial joined
15:35 <ph88_> well i already had a ResourceT there .. so StateT seems like another wrapper
15:35 <jle`> StateT StreamState (ResourceT IO) is a specific monad it can be instantiated as
15:35 <ph88_> ok
15:35 <fXl> glguy: its clueless ? :D
15:35 <jle`> StateT doesn't "add a monad"
15:35 Apocalisp joined
15:36 <glguy> fXl: There's not enough information available to help, unfortunately
15:36 <jchia_1> ph88_: This is typically the type of thing you need to deal with when using monad transformer stacks. It's pretty common in real-world code.
15:36 <ph88_> jchia_1, ya i'm just getting into monad transformers ..
15:36 <fXl> glguy, yes and i dont understand why this happening
15:36 <fXl> ghc works though
15:37 <ph88_> thanks jle`
15:37 <jle`> ph88_: you can take this as something that works well because of haskell's typeclasses
15:37 <jle`> where `StateT StreamState (ResourceT IO)` is convenient an instance of all of the typeclasses that work
15:37 <jle`> er, all of the typeclasses that are needed
15:38 <spatial> matrix @@> (row,column) Here row is x <- [0..10] and column is the elements from another Vector. How will the code be for this ?
15:38 <spatial> It is hmatrix.
15:39 yellowj joined
15:39 dm3 joined
15:39 <jle`> ph88_: btw, StateT StreamState (ResourceT IO) isn't necessarily the *only* instance that satisfies everything
15:39 newhoggy joined
15:39 raichoo joined
15:40 <jle`> ph88_: `StateT s` is just a convenient way to imbue a monad with a free `MonadState s` instance
15:40 <jle`> free as in no work required
15:40 <ph88_> jle`, i was able to run the Conduit now .. and i get "test" as result https://bpaste.net/show/91fe2232e947 now i get my state and i try to eval it .. but now i get into problems with the ResourceT ..
15:40 <jle`> try evalStateT
15:40 <jle`> :t evalStateT
15:40 <lambdabot> Monad m => StateT s m a -> s -> m a
15:40 alqatari joined
15:41 <ph88_> oh ok
15:41 <jle`> State s is a type synonym for StateT s Identity
15:42 ADG joined
15:42 <ADG> can anyone help with functors?
15:42 trism joined
15:42 <ADG> I don't get why Either can be defined as a functor?
15:42 <ADG> I mean it takes 2 args?
15:43 <jle`> check the type of fmap
15:43 <jle`> :t fmap
15:43 <lambdabot> Functor f => (a -> b) -> f a -> f b
15:43 <ph88_> hurray ! finally got my conduit back to IO () :D
15:43 <jle`> could you put in 'Either' there for f?
15:43 <jle`> ph88_: :D
15:43 <byorgey> ADG: you are exactly right, it can't.
15:43 <jle`> ADG: `fmap :: (a -> b) -> Either a -> Either b` doesn't make any sense
15:43 <xa0> ADG: Either a takes one arg
15:43 reptar_ joined
15:43 <byorgey> ADG: however, (Either e) can be a Functor.
15:44 <ADG> what does that mean, Either is a container but what is `Either a`? variable ^ container?
15:44 <jle`> what does make sense would be `fmap :: (a -> b) -> Either e a -> Either e b`, and so `f` would be `Either e`
15:44 <ph88_> ADG, i think Either is something like data Either a = Left a | Right a ... so both Left and Right only take 1 thing
15:44 <ADG> So we could only modify right by this definition
15:44 <byorgey> ph88_: no, that's not how Either is defined.
15:44 <ph88_> byorgey, correct me
15:45 <byorgey> ADG: correct.
15:45 <byorgey> ph88_: data Either a b = Left a | Right b
15:45 <ADG> data Either a b = Left a | Right b
15:45 <jle`> yup, parametricity strikes again
15:45 <jle`> fmap can only modify things in the Right constructor
15:45 jer1 joined
15:45 <byorgey> > fmap (+1) (Left 2)
15:45 hust921 joined
15:45 <lambdabot> Left 2
15:46 <byorgey> > fmap (+1) (Right 2)
15:46 <ph88_> o_O
15:46 <lambdabot> Right 3
15:46 <jle`> > fmap (+1) (Left "hello")
15:46 <lambdabot> Left "hello"
15:46 <ph88_> you fmap be reimplemented so that it also effects Left ?
15:46 newhoggy joined
15:46 <jle`> not with the type signature it currently has
15:46 <ADG> not necessarily
15:46 <ADG> probably BiFunctor?
15:46 <jle`> `(a -> b) -> Either e a -> Either e b` can only omdify the Right, because of parametricity
15:46 <ADG> :t BiFunctor
15:46 <lambdabot> error: Data constructor not in scope: BiFunctor
15:46 <byorgey> ADG: yes, Either is a Bifunctor.
15:47 <jle`> ph88_: if you have a Left x, the only thing you can do with x is return it again in a Left
15:47 <jle`> since you don't hae any way to modify an 'e'
15:47 <jle`> in fact I'm pretty sure there is only one sensible definition of mapEither :: (a -> b) -> Either e a -> Either e b that typechecks
15:47 <ADG> so even if we are defining fmap for Either would it be like: fmap f (Left x) = Left x and fmap f (Right x) = Right (f x) ?
15:48 <jle`> you don't have to ask us
15:48 <jle`> try checking the laws :)
15:48 <jle`> well, first make sure it typechecks
15:48 cpennington joined
15:48 <byorgey> jle`: in fact that's true for *any* instance of Functor =) (that there's only one definition of fmap)
15:48 <jle`> for some instances there is more than one typechecking implementation of (a -> b) -> f a -> f b
15:49 <byorgey> oh, I guess you mean even without the laws.
15:49 <jle`> but yes, only one Functor instance
15:49 <byorgey> yes, I agree.
15:49 hazyPurple joined
15:49 <jle`> yeah, Either seems to be interesting in that only one definition actually typechecks
15:49 <byorgey> right, that's true for Maybe as well.
15:49 <jle`> not quite
15:49 <ph88_> ADG i think the problem is with an f that can do both f a and f b
15:49 <byorgey> oh! you're right =)
15:50 <* byorgey> should think for two more seconds before typing
15:50 <jle`> hm, i think it's true for `(,) w` and `(->) r`
15:50 <ADG> thanks
15:50 <jle`> so i guess it's nto as rare as i thought it was
15:51 <ph88_> 0.1 ... my first data out .. now onto the verification of the program
15:51 <jle`> there should be an anti-djinn that tries to conjure the most boring implementation possible of a type
15:51 joelburget joined
15:51 <jle`> like map _ _ = []
15:51 <byorgey> jle`: it's true for any composition of those as well =)
15:52 ridho joined
15:52 <mniip> there might be a strict formulation
15:52 <byorgey> jle`: in fact I think the only time it's NOT true is when you have something of the form T a = 1 + ...
15:53 <mniip> something like, whether there exists a non-identity transformation 'f a -> f a' natural in a
15:53 <mniip> byorgey, data P a = L a | R a
15:53 simukis joined
15:54 <byorgey> mniip: ah, but that is isomorphic to (1 + 1) * a =)
15:54 <mniip> I *think* every typechecking fmap implementation factors as true fmap composed to a natural transformation
15:54 <byorgey> mniip: yes, that is a free theorem
15:54 <mniip> so the question is whether there are multiple transformations
15:55 <mniip> cardinality of a profunctor end
15:55 <byorgey> =D
15:55 beerdrop joined
15:56 <mniip> your description fits the idea
15:56 doomlord joined
15:56 <jle`> so a type with which ther eis *only* the identity natural transformation is a type whose fmap is the only typechcking implementation
15:56 <mniip> if you have T a = 1 + ...
15:56 <mniip> then you can always build a transformation '\_ -> 1'
15:56 rkazak joined
15:56 <edwardk> mniip toList . safeHead is natural in a, but not the identity naturaly transformation on [] to []
15:56 <byorgey> right, and I was imagining the 1 + ... being able to show up deeply nested as well
15:57 <byorgey> but you're right that there could be others
15:57 <mniip> edwardk, correct
15:57 <mniip> edwardk, that proves that there are multiple typechecking fmaps for lists
15:57 splanch_ joined
15:57 <mniip> what's the problem?
15:57 <jle`> ¯\_(ツ)_/¯
15:58 <edwardk> anyways your statement about composition of 'true fmap" wih a natural transformation should follow from a free theorem
15:59 godel_ joined
15:59 <mniip> byorgey, I'm not too sure
16:00 newhoggy joined
16:00 cpup joined
16:00 bodisiw joined
16:02 augur joined
16:02 leat joined
16:02 <mniip> hmm
16:02 <mniip> I'm trying to construct something like
16:02 <mniip> 'forall a. f a' has to have no inhabitants and 'f ()' has to have one
16:02 splanch joined
16:04 <mniip> and then there's the imporant distinction that 'Either Int' doesn't fit the above definition, but 'Either Int' has multiple typechecking fmaps, while 'forall b. Either b' is what we're looking at here
16:06 <mniip> any counterexamples to the above conjecture?
16:06 jer1 joined
16:06 <jle`> types that have only a single typechecking fmap that don't involve type variables? i can only think of Identity
16:06 <jle`> or things isomorphic to it
16:06 <mniip> nono
16:06 Giu joined
16:06 <mniip> they can involve tyvars
16:06 <jle`> oh i'm just thinking out loud, that wasn't in response to yours
16:06 <Gurkenglas> "<mniip> 'forall a. f a' has to have no inhabitants and 'f ()' has to have one" I was thinking about this just yesterday iirc, it's a subclass of Each right
16:06 <Giu> >
16:07 sellout- joined
16:07 pie_ joined
16:08 sleffy joined
16:08 <edwardk> is f concrete or abstract there?
16:08 cpennington joined
16:09 cpup joined
16:09 <mniip> er?
16:09 <Gurkenglas> Ooh shouldn't it be exactly the Representable typeclass?
16:09 umib0zu joined
16:09 <mniip> Gurkenglas, is forall a. Either a representable?
16:09 <edwardk> mniip it is not
16:09 <mniip> yeah
16:09 <ph88_> is there a utility for ghci that takes a type and lists all the synomyms ?
16:09 <edwardk> well, fora
16:09 <edwardk> ll a
16:10 <Gurkenglas> Why not? It's Either Void
16:10 <edwardk> it becomes Void + a
16:10 <edwardk> which is a
16:10 <mniip> not impredicative polymorphism
16:10 Sonolin joined
16:10 <mniip> forall a. (is Either a representable)?
16:10 <Gurkenglas> No, but there's more than one inhabitant of Either a ()
16:11 <Gurkenglas> (and more than none of Either a (forall b. b)
16:11 <mniip> the inhabitant isn't continuous
16:11 descender joined
16:11 oish_ joined
16:12 <Gurkenglas> "forall a. (is Either a representable)?" <- no; "forall a. (does Either a () have exactly one inhabitant)?" <- no
16:12 newhoggy joined
16:12 <mniip> well
16:12 <mniip> the latter question is a yes
16:12 <mniip> in the spirit in which I asked it, anyway
16:13 <edwardk> are you describing something you want out of a class or a law you want in general?
16:13 meandi_2 joined
16:13 <mniip> I don't think this is expressible in haskell, but I'll try
16:13 <Gurkenglas> How does the alleged spirit of your question differ from "does (forall a. Either a ()) have exactly one inhabitant?"
16:14 danthemy_ joined
16:14 sssilver joined
16:14 <spatial> @@> is used for matrix element access. Which module ?
16:14 <mniip> with a hypothetical dependent type system,
16:15 <spatial> Data.Packed.Matrix ?
16:15 <mniip> class UniqueFmap f where uninhabited :: (forall a. f a) -> Void; singular :: (a : f ()) -> (b : f ()) -> a = b
16:15 ragepandemic joined
16:16 <mniip> you can't write an "instance" for 'Either b' but you can for 'Either Int'
16:16 maarhart_ joined
16:17 <Gurkenglas> You can't write an instance for 'Either Int' but you can for (forall b. Either b) (the latter being Either Void)
16:17 gehmehgeh joined
16:19 Giu_ joined
16:19 <mniip> oops
16:19 <mniip> yes
16:19 <mniip> I got that backwards
16:20 <sm> g'day all. Anybody here interested in pair/mob-ing on hledger tasks right now ? If so you can join me for hledger cowork hour at https://join.skype.com/GYLxZE1xe87E
16:22 newhoggy joined
16:22 <spatial> It is `atIndex`
16:22 zargoertzel joined
16:24 <edwardk> mniip what motivates the class/abstraction that you are looking for? for a moment i thought you were looking for an "is left adjoint" or something
16:24 <edwardk> now i'm less sure
16:25 <mniip> edwardk, trying to state 'there exists exactly one natural endotransformation' in more concrete terms
16:26 ertes joined
16:26 <Unode> hi all, I'm trying to understand in which cases would you chain multiple $ do expressions like Hspec does.
16:26 <Unode> Is this due to independent monads being created at each indentation level?
16:27 uelen joined
16:27 oisdk joined
16:28 robatosan joined
16:28 soniku joined
16:28 fizruk joined
16:29 fizbin joined
16:29 <edwardk> you might have a combinator like foo :: m a -> m a
16:30 <edwardk> there inside a do block you might nest a call to foo $ do
16:30 <edwardk> in which you could nest a call to foo $ do etc
16:31 <edwardk> why make a function that takes an m a argument rather than just an a
16:31 newhoggy joined
16:31 nakal joined
16:31 <edwardk> ? well not everything can be done "in" the monad
16:31 <edwardk> local for reader
16:31 <edwardk> pass/listen for writer
16:31 <edwardk> callCC
16:31 jathan joined
16:32 tom7942 joined
16:32 Levex joined
16:32 <edwardk> etc all need more info about the arg than they can get out of >>=
16:32 LordBrain joined
16:32 flatmap13 joined
16:33 <edwardk> but generally, yes, there is some sort of scoping going on
16:34 msks joined
16:34 zcourts joined
16:35 tom7942 joined
16:36 _Gold_Wolf_ joined
16:36 RayNbow`TU joined
16:37 JeanCarloMachado joined
16:37 richi235 joined
16:38 osa1 joined
16:38 osa1 joined
16:38 tsmish joined
16:39 shivansh joined
16:39 shivansh left
16:41 newhoggy joined
16:42 thoradam joined
16:43 zpconn__________ joined
16:43 mkurkov_ joined
16:43 pranz2 joined
16:43 mohsen_ joined
16:44 kritzcreek joined
16:44 S11001001 joined
16:44 wavewave joined
16:44 <jophish> hvr: is packunused still usable?
16:49 gawen joined
16:50 plutoniix joined
16:51 oish_ joined
16:51 mikecaruso joined
16:52 okuu joined
16:53 ridho joined
16:54 newhoggy joined
16:54 splanch joined
16:54 eklavya joined
16:55 SpinTensor joined
16:55 <Unode> edwardk: thanks. I haven't got to reader/writer so I don't yet get those references but I'll look into it.
16:55 araujo joined
16:55 Skye_ joined
16:56 <edwardk> then in that case, suffice it to say 'yes there is a good reason' :)
16:56 araujo joined
16:56 chocopuff joined
16:57 Elhamer joined
16:57 Swizec joined
16:58 codesoup joined
16:59 <oish> fg
16:59 <mnoonan> I've been enjoying using inline-c-cpp to wrap a C++ API recently; most of the functions and methods work on POD types and everything is nice and clean. but a few return or accept std::vectors. has anybody worked with marshalling/unmarshalling these from/to Haskell? any pointers?
16:59 jathan joined
16:59 t7 joined
17:00 emertens joined
17:01 plutoniix joined
17:01 bigos joined
17:02 lambdaman joined
17:02 micro_ joined
17:02 <geekosaur> template types will be a nightmare
17:03 newhoggy joined
17:03 oisdk joined
17:03 <cocreature> if you know it’s always going to be a concrete vector, e.g. std::vector<int>, it shouldn’t be too hard
17:03 cdg joined
17:04 <cocreature> :t peekArray
17:04 <lambdabot> error: Variable not in scope: peekArray
17:04 <cocreature> why does lambdabot hate me so much
17:04 <mnoonan> geekosaur: yeah.. my only consolation is that they are relatively rare in the API, so it isn't terribly to enumerate `std::vector<ApiType1>`, `std::vector<std::vector<ApiType2>>`, etc
17:04 <mnoonan> should I just manage them through a ForeignPtr that calls the destructor on finalization or something?
17:05 dsh joined
17:06 plutoniix joined
17:08 iAmerikan joined
17:08 psmakro joined
17:08 cpup joined
17:08 burtons joined
17:09 fowlslegs joined
17:10 raichoo joined
17:11 quobo joined
17:11 James joined
17:12 osa1_ joined
17:12 tristanp joined
17:12 danthemyth joined
17:13 Sgeo_ joined
17:13 plutoniix joined
17:13 lambdaman joined
17:14 <Guest36086> Hi
17:14 <lambdabot> Hello.
17:15 JuanMiguel joined
17:16 <shapr> lambdabot: oh HAI
17:16 <Guest36086> Haskell looks exciting but doesn't seem as employable as Scala for example. Is it just for recreational use?
17:16 <hvr> Guest36086: yes
17:16 <johnw> Guest36086: no
17:16 beanbagu1 joined
17:16 <glguy> maybe?
17:17 JeanCarloMachado joined
17:17 <hvr> Guest36086: after a long dayjob working on Scala, haskell feels like recreation :)
17:17 newhoggy joined
17:17 <shapr> Guest36086: recreational use of Haskell can lead to addiction, be careful
17:17 <johnw> some of us simply were forced to turn recreation into career
17:17 <hvr> johnw: like musicians?
17:17 <shapr> yeah, I write Haskell at work sometimes
17:18 plutoniix joined
17:18 <shapr> because writing parsers and other tools is just so much easier and faster in Haskell
17:18 <LordBrain> if you know hte library well
17:18 <LordBrain> what do you use, parsec?
17:18 <shapr> megaparsec
17:18 bennofs joined
17:19 <shapr> LordBrain: have you tried MegaParsec?
17:19 <shapr> Guest36086: what sort of things do you code?
17:19 <LordBrain> no, i havent
17:19 Skye_ joined
17:19 <LordBrain> what makes you like it better than vanilla parsec?
17:20 <Guest36086> I currently code C# during the day
17:20 <LordBrain> i've actually messed around in the past with alex quite a bit...
17:20 <LordBrain> but of course, that is a pain
17:20 <shapr> Guest36086: ooh, I did that for a few years. Do you write big LINQ expressions for fun? If yes, you'll probably love Haskell.
17:20 <LordBrain> so tell me how you landed on megaparsec shapr
17:21 <LordBrain> the hackage page says its a fork of parsec
17:21 <shapr> LordBrain: I read the MegaParsec docs on how it differs from parsec, and was thrilled, but I forget exactly why
17:21 <shapr> lemme see if I can find that page
17:21 <LordBrain> oh okay
17:22 <geekosaur> integrated with Applicative + has a bunch of bugfixes
17:22 <shapr> LordBrain: it was something from here: https://mrkkrp.github.io/megaparsec/tutorials/switch-from-parsec-to-megaparsec.html
17:22 <cocreature> megaparsec also has better docs and a few new features
17:22 <shapr> Guest36086: what's your domain? What sort of problems do you solve?
17:22 <cocreature> I think they also did some performance improvements
17:23 <hvr> megaparsec is more modern parsec
17:23 <shapr> yeah, megaparsec really does go faster
17:23 <hvr> more aligned w/ modern `base`
17:25 <Guest36086> Shapr: I am looking for a new language to write my own side projects in, so not one particular domain. For a start these will include web scraping & finance.
17:25 <LordBrain> well thanks for the info on megaparsec
17:25 <shapr> Guest36086: I have three or four recruiters trying to hire me for Haskell jobs in any given week, but I have more like twenty trying to hire me for Python
17:25 <shapr> LordBrain: ok, tell me what you think!
17:26 Levex joined
17:26 <shapr> Guest36086: finance has piles of Haskell jobs, but I don't know anything about web scraping with Haskell
17:27 <Tuplanolla> Do we have (bindings to) a headless JavaScript engine, shapr?
17:27 <shapr> I don't know
17:27 <Tuplanolla> If not, web scraping is not going to go anywhere.
17:28 <LordBrain> i guess the advantage of a renamed fork is you keep the old one maintained for closer backward compatibility eh
17:28 <kuribas> shapr: do they ask you to relocate?
17:28 <shapr> Guest36086: If you have several languages in mind to try for fun projects, how about giving each of them a day or two and then deciding which one fits you best?
17:28 <shapr> kuribas: Not for Python, many jobs in Atlanta.. I think one or two of the Haskell jobs are remote-friendly
17:29 <shapr> but I, personally, am not remote friendly
17:29 <shapr> I am not an introvert
17:29 newhoggy joined
17:29 cpup joined
17:31 rkazak joined
17:32 <Guest36086> Shapr: Whenever I look deeply into Python I always see speed questions due to it being high level and scripting
17:34 <Guest36086> Shapr: I do understand you can write those modules in C then call them directly from Python though. Seems a lot more effort though to me...
17:34 <shapr> Guest36086: I don't care about speed of execution as much as I care about speed of change. In my experience being able to change an algorithm or abstraction can improve my code much more than going from interpreted to compiled
17:34 <shapr> Guest36086: if you use Cython it's not much effort
17:34 <shapr> Even so, I still get more speed of change from Haskell than I do from Python
17:34 Cassiopaya joined
17:37 Itkovian joined
17:37 newhoggy joined
17:37 <shapr> I see advanced Python coders use objects to build structures as I would use ADTs in Haskell.
17:40 Levex joined
17:40 plot joined
17:40 exbio joined
17:41 replay joined
17:41 exbio joined
17:42 <xintron> Do people use hindent for auto-fixing code styling? I've been running it a while but can't say I agree with all the automatic formatting it does.
17:42 <glguy> I'm sure some people do, lots of us don't
17:42 ubsan_ joined
17:43 <shapr> Guest36086: any specific questions about Haskell?
17:44 <xintron> glguy, Been developing in go for a while and their go-formatter is used almost everywhere resulting in similar syntax and code structuring everywhere. Considering if hindent is worth it for Haskell
17:44 <lassulus> d
17:45 newhoggy joined
17:45 <glguy> xintron: Yeah, having exactly one style is nice, but not worth losing the context that formatting code as appropriate for the local situation provides to the reader
17:47 <xintron> glguy, Agree. It does mess up comments especially in certain situations and doesn't allow for empty whitelines in functions which I don't agree with. Splitting things up (imports, functions) with blank lines do help to contextualize and help the reader in the long term
17:48 robatosan joined
17:48 flatmap13 joined
17:50 Denthir joined
17:50 augur joined
17:51 <drewr> I too wish for a good haskellfmt story
17:52 bennofs joined
17:52 <geekosaur> .oO { haskellfmt --style=henning }
17:52 logicmoo joined
17:53 newhoggy joined
17:53 <cocreature> geekosaur: does that rename all your types to T and all your classes to C?
17:53 <nitrix> ghc --fphp main.hs
17:53 soLucien joined
17:53 <LordBrain> there's a formatter called 'stylish-haskell'
17:53 <geekosaur> that was the reference, yes
17:53 <LordBrain> oh
17:54 <cocreature> that’s obviously the best way to write haskell code
17:54 <nitrix> TT if it's a type transformer.
17:54 romank joined
17:55 zaquest joined
17:56 connrs joined
17:56 mbuf joined
17:57 phyrex1an joined
17:58 cpup joined
17:58 saep joined
17:58 jer1 joined
18:00 emmanuel_erc left
18:02 newhoggy joined
18:03 mmhat joined
18:04 chlong joined
18:04 psychicist__ joined
18:04 psychicist__ joined
18:05 cdg_ joined
18:05 uglyfigurine joined
18:06 mmachenry joined
18:07 blym_ joined
18:09 <Fendor> when using repa stencil2d quasiquoter, can i also use floating point numbers instead of only integer?
18:10 mbuf left
18:11 newhoggy joined
18:11 <hexagoxel> xintron: i am continuing to work on https://github.com/lspitzner/brittany
18:13 <xintron> hexagoxel, Neat, will have a closer look at that later
18:13 <drewr> hexagoxel: <3 <3
18:13 sssilver joined
18:13 chaosmasttter joined
18:14 blym_ joined
18:14 umib0zu joined
18:17 strykerkkd joined
18:18 cpup joined
18:18 jer1 joined
18:19 <xintron> What does `:~>` mean in the type signature of a function?
18:19 <glguy> It doesn't have a built-in meaning, that operator symbol is defined in a library you're using
18:20 newhoggy joined
18:23 preyalone joined
18:23 pera joined
18:24 fowlslegs joined
18:28 blym_ joined
18:28 newhoggy joined
18:29 soniku joined
18:31 pungi-man joined
18:32 Klapaucius joined
18:32 castlelore joined
18:33 robatosan joined
18:33 bennofs joined
18:34 <dmj`> xintron: servant?
18:34 alqatari joined
18:34 sssilver joined
18:35 <nshepperd_> I don't like any of the existing haskell formatters :(
18:36 newhoggy joined
18:37 <dmj`> xintron: used for monad morphisms
18:37 ner0x652 joined
18:38 forker joined
18:38 <xintron> dmj`, Ah, yes. The project I'm looking at do seem to use servant. Was looking for the definition in the project though, didn't consider one of the used libraries :/
18:39 <xintron> Thanks
18:39 jer1 joined
18:40 lukesp joined
18:40 zcourts_ joined
18:41 jabpe joined
18:41 doomlord joined
18:42 oish joined
18:43 <lukesp> I tried connecting to #haskell-beginners, doesn't seem to work
18:43 forgottenone joined
18:44 newhoggy joined
18:45 cpennington joined
18:46 <cocreature> lukesp: just ask your question here :)
18:46 <lukesp> ok cool :)
18:50 chocopuff298 joined
18:50 shayan_ joined
18:50 jathan joined
18:51 oberstein joined
18:51 acertain joined
18:52 SlashLife joined
18:52 mda1 joined
18:54 felixsch__ joined
18:55 mahalex joined
18:55 ridho joined
18:56 jathan joined
18:56 jbgi joined
18:56 newhoggy joined
18:57 connrs joined
18:58 ubsan_ joined
18:58 flatmap13 joined
18:58 taksuyu joined
19:00 jer1 joined
19:00 fizruk joined
19:01 mada joined
19:02 biglambda joined
19:02 jathan joined
19:04 tcsavage joined
19:04 sssilver joined
19:04 xinming_ joined
19:05 newhoggy joined
19:06 darjeeling_ joined
19:06 patbecich joined
19:07 beerdrop joined
19:09 cschneid_ joined
19:10 abhiroop joined
19:11 dm3 joined
19:11 fizruk joined
19:11 <abhiroop> Does anybody know who is igfoo https://github.com/igfoo?
19:11 takle joined
19:12 <abhiroop> He/She is the only person who has more contributions than SPJ in GHC
19:12 theelous3 joined
19:12 <abhiroop> Must be someone from the Haskell committee.
19:13 fizruk joined
19:13 qqwy joined
19:13 <mivael_> abhiroop: Bryan O'Sullivan?
19:13 <qqwy> Hey everyone! :-)
19:14 <qqwy> Short question, I am looking for a function with this type signature: `(a, Maybe b) -> `Maybe (a, b)`
19:14 zcourts joined
19:14 <abhiroop> mivael_: Dont think so. bos's github is pretty famous https://github.com/bos
19:15 <Tuplanolla> :t sequence -- This, qqwy?
19:15 <lambdabot> (Monad m, Traversable t) => t (m a) -> m (t a)
19:15 <mivael_> well, okay... misguided by this: https://github.com/igfoo/base64-bytestring
19:15 Vorpal joined
19:15 <abhiroop> All Haskell folks(just 2 of us!) at my office were awestruck at who could this be!
19:15 <qqwy> Are tuples Traversable?
19:16 <qqwy-afk> One moment, brb
19:16 <mnoonan> huh, I'm surprised hoogle didn't know `(a, Maybe b) -> Maybe (a,b)`
19:16 <MarcelineVQ> kinda looks like just a report-bot
19:16 <mivael_> abhiroop: oh, it's forked... I see now :)
19:16 <geekosaur> @instances (,)
19:16 newhoggy joined
19:16 <byorgey> abhiroop: might be Ian Lynagh. He used to contribute a lot and used to go by tthe IRC nick of 'Igloo'
19:17 Guest71075 joined
19:17 <lambdabot> Couldn't find class `(,)'. Try @instances-importing
19:17 <byorgey> Haven't seen him in a few years, though, consistent with how the GHC commits suddenly stop around 2013/2014
19:17 <geekosaur> oh, right
19:17 <geekosaur> @instances Traversable
19:17 <lambdabot> Array i, Complex, Dual, First, IM.IntMap, Identity, Last, Maybe, NE.NonEmpty, Product, Proxy, Seq.Seq, Seq.ViewL, Seq.ViewR, Sum, Tree, ZipList, []
19:17 <MarcelineVQ> I say that because the igfoo commit log has commits made by all kinds of people when compared to git log on ghc source
19:18 <MarcelineVQ> but maybe that's just how the commit process works on phab end, idk
19:18 <MarcelineVQ> a subset of mergers vs a set of contributors
19:19 cpennington joined
19:19 beanbagu1 joined
19:20 <MarcelineVQ> hmm, no, it's not that
19:20 <abhiroop> byorgey: Yes you are right its him! https://www.haskellers.com/user/igloo
19:20 yqt joined
19:20 jer1 joined
19:20 <MarcelineVQ> I wonder what the git stuff is about, such a weird system :>
19:21 ADG joined
19:21 Maxou joined
19:22 <ADG> how does functors on `->` work, I mean what does this `instance Functor ((->) r) where fmap f g = (\x -> f (g x)) ` mean?
19:23 <Tuplanolla> Is `instance Functor (a ->) where fmap = (.)` any clearer, ADG?
19:23 <ADG> People say they are quivalent but what is -> operator in first place
19:24 <EvanR> its a type constructor
19:24 <ADG> they are making random things up?
19:24 <EvanR> :k (->)
19:24 <lambdabot> * -> * -> *
19:24 <mnoonan> ADG: think of ((->) r) as one thing; you give it a type t, and you get back the type `r -> t`
19:24 <EvanR> fancy words, a type former
19:24 <ADG> I give it Int and I get a function r -> Int?
19:24 <mnoonan> yes
19:25 <EvanR> * -> (* -> *)
19:25 <ADG> -> is defined as * -> * -> what recursiveness indeed!
19:25 <EvanR> lol
19:25 <EvanR> two different ->'s
19:25 <mnoonan> it's a different -> with the *s :)
19:25 <EvanR> its -> all the way up
19:26 plutoniix joined
19:26 Madars joined
19:26 anks joined
19:26 <ADG> where is it used?
19:26 <ADG> an example would be better?
19:26 <ADG> haskell bot tell me an example for ->
19:27 <ADG> haskell bot reply
19:27 <ADG> haskell bot register me as an instructor
19:27 <ADG> haskell bot add user ADG
19:27 <EvanR> :t Maybe
19:27 <lambdabot> error:
19:27 <lambdabot> • Data constructor not in scope: Maybe
19:27 <lambdabot> • Perhaps you meant one of these:
19:27 <EvanR> :k Maybe
19:27 <lambdabot> * -> *
19:27 <ADG> :k ->
19:27 <lambdabot> error: parse error on input ‘->’
19:28 plutoniix joined
19:28 <EvanR> :k (->)
19:28 <shapr> ADG: are you learning Haskell?
19:28 <lambdabot> * -> * -> *
19:28 <suzu> it's used in the reader monad ADG
19:28 dm3 joined
19:28 <ADG> yes
19:28 <suzu> if you're familiar with that
19:28 <shapr> ADG: for school or work?
19:28 <ADG> http://learnyouahaskell.com/functors-applicative-functors-and-monoids
19:28 <suzu> in fact -> IS the reader monad
19:28 <ADG> out of interest
19:28 <shapr> oh, that's a good reason
19:28 <EvanR> (->) r is Reader r
19:28 iAmerikan joined
19:28 <EvanR> which is a Monad
19:29 <mnoonan> one nice case is if you think about ((->) Time)
19:29 jathan joined
19:29 <mnoonan> you can think of functions of the form `Time -> X` as time-varying values of type X
19:29 <EvanR> in practice you probably just want to pass time in as an argument
19:30 niteria joined
19:30 <mnoonan> and as for fmap: if you have a time-varying value of type `a`, and a function of type `a -> b`, then you can get a time-varying value of type `b`.
19:30 <ADG> composing the functions then
19:31 <mnoonan> right, that's why Tuplanolla said `fmap = (.)` above
19:31 bshelden joined
19:31 oish joined
19:32 <ADG> now exactly what is ->, it's a type constructor, given a type it returns a function that converts from one type to the given type, is it?
19:32 anks joined
19:33 xcmw joined
19:33 path[l] joined
19:34 chaosmasttter joined
19:34 <qqwy> I think you could view it in that way, indeed :-)
19:34 fizruk joined
19:36 duog left
19:38 exbio joined
19:39 rperry joined
19:40 ADG_ joined
19:40 blym_ joined
19:41 plot joined
19:41 jer1 joined
19:41 newhoggy joined
19:43 sellout-1 joined
19:43 tomboy64 joined
19:43 a3Dman joined
19:44 Yuras joined
19:44 dfeuer joined
19:44 xcmw joined
19:45 <ADG_> so can I say that -> is a constructor for creating function?
19:45 <ADG_> but then it should be * -> * -> (* -> *)
19:46 ketil_ joined
19:46 <cocreature> ADG_: no "Int -> Int" has kind "*" not kind * -> *
19:46 <cocreature> so -> has kind * -> * -> *
19:46 fosterite joined
19:46 <cocreature> but you ’re right that it’s a type constructor
19:46 <ADG_> oh so -> is just constructore for function. I get it
19:47 <ADG_> so it wouldnt be wrong to say type constructor that takes two parameters and returns a Function
19:47 <EvanR> its like Maybe or [ ] in Maybe A or [A]. except theres two arguments
19:47 <EvanR> of course, its not really two arguments, its curried
19:47 sellout- joined
19:47 <cocreature> it’s like Either
19:47 <EvanR> A `Either` B ;)
19:48 <ADG_> so to create a functor we say `instance functor (r->?) where fmap =(.)` ?
19:48 <EvanR> unfortunately (r -> ) isnt valid syntax
19:48 <EvanR> so you write ((->) r)
19:48 <cocreature> but that’s only a syntactic oddity
19:48 <qqwy> ((->) a b)
19:48 <ADG_> great!
19:48 sleffy joined
19:49 <EvanR> its odd because (3 +) is valid syntax
19:49 <ADG_> btw are you people on web or using some client for freenode?
19:49 <EvanR> but you cant do it on the type level
19:49 uelen joined
19:49 <mnoonan> is there a real reason for that, or is it just an oversight?
19:49 newhoggy joined
19:49 <Tuplanolla> We don't have type-level lambdas, mnoonan.
19:50 <EvanR> this isnt lambda
19:50 jordan36363 joined
19:50 dlight joined
19:50 <Tuplanolla> Symmetric sections would require them.
19:50 <mnoonan> I think I don't follow why.. isn't it a purely syntactic issue?
19:50 <EvanR> you mean, allowing (-> r) ?
19:50 <mnoonan> yeah
19:50 mmn80 joined
19:50 <ADG_> what about fmap (replicate 3) [1, 2, 3, 4], here the context is list or the replicate function?
19:50 flatmap13 joined
19:50 <mnoonan> well, (r ->)
19:50 <EvanR> because the meaning of (r ->) is allowed already
19:51 exbio joined
19:51 <EvanR> (-> r) would require the equivalent of a lambda, so... both get axed
19:51 <byorgey> ADG_: that does not type check, I'm not sure what you are asking.
19:51 exbio joined
19:51 <ADG_> > fmap (replicate 3) [1,2,3,4]
19:51 <lambdabot> [[1,1,1],[2,2,2],[3,3,3],[4,4,4]]
19:52 <byorgey> oh, sorry. not sure what I was thinking.
19:52 <byorgey> ADG_: I'm still not sure what you are asking though =)
19:52 darjeeling_ joined
19:52 Denthir joined
19:52 <ADG_> np I got it
19:52 <Tuplanolla> > fmap @_ (replicate 3) [1,2,3,4] -- Do we have type application holes?
19:52 <lambdabot> error:
19:52 <lambdabot> Pattern syntax in expression context: fmap@(_)
19:52 <lambdabot> Did you mean to enable TypeApplications?
19:53 dm3 joined
19:53 <MarcelineVQ> Tuplanolla: yes
19:53 <MarcelineVQ> well, wildcards at least
19:53 <seequ_> ADG_: fmap (replicate 3) (Just 5)
19:54 <jordan36363> i dont understand why i cant compile this code
19:54 <byorgey> yes, but it doesn't tell you what it inferred for the hole.
19:54 <Tuplanolla> That's a shame.
19:54 <ADG_> > fmap (replicate 3) (Just 5)
19:54 <lambdabot> Just [5,5,5]
19:54 <byorgey> Tuplanolla: perhaps there's some flag to enable that, I'm not sure
19:54 <Tuplanolla> I was hoping `NoPartialTypeSignatures` would do.
19:54 <ADG_> oh, what about the second functor law i.e. `fmap $ f.g = fmap f . fmap g` can anyone explain?
19:55 <jordan36363> https://ideone.com/gQfOFN
19:55 <byorgey> ADG_: why don't you try explaining it first, and we'll tell you if your explanation makes sense
19:55 fizruk joined
19:55 <jordan36363> "parse error on input ‘="
19:55 <jordan36363> idk why
19:55 DisruptiveNL joined
19:56 <byorgey> jordan36363: the 'd' on line 5 needs to be lined up under the 'a' on line 4
19:56 <ADG_> like if we do (f . g) [1, 2 , 3] = ? . ?
19:56 <byorgey> similarly the n on line 6
19:56 <ADG_> or even fmap ((+2) . (*2)) [1,2,3] = [4,6,8]
19:57 newhoggy joined
19:57 <byorgey> ADG_: right, so what does the second functor law tell you that is equivalent to?
19:57 <ADG_> fmap (+2) . fmap (*2) [1,2,3] = fmap (+2) . [2,4,6] ?
19:57 <jordan36363> now it says "The IO action ‘main’ is not defined in module ‘Main’
19:57 <jordan36363> byorgey
19:57 <ADG_> the RHS doesn't makes sense
19:58 <Clint> ADG_: you erred
19:58 <ADG_> (fmap (+2) . fmap (*2)) [1,2,3]?
19:58 <Myrl-saki> ADG_: fmap (f.g) x = fmap f . fmap g $ x
19:58 <Clint> > (fmap (+2) . fmap (*2)) [1,2,3]
19:58 <lambdabot> [4,6,8]
19:58 <byorgey> ADG_: that's it
19:59 <ADG_> how to evaluate n general case when law doesnt hold, what is (fmap (+2) . fmap (*2)) [1,2,3] if we ignore LHS?
19:59 <byorgey> jordan36363: well, you need a main. A function definition by itself doesn't do anything.
19:59 <jordan36363> main = d0
19:59 <jordan36363> do
19:59 <jordan36363> is this enough
19:59 <Myrl-saki> Nope.
19:59 <byorgey> jordan36363: what are you hoping that your program will do?
19:59 <Myrl-saki> do eneds a `body`, IIRC.
19:59 <Myrl-saki> needs*
20:00 <EvanR> do has to end in an expression
20:00 <EvanR> main = do { return () } for example
20:00 <Myrl-saki> close enough. c:
20:00 <jordan36363> main = summation 0 3
20:00 <jordan36363> doesnt work either
20:00 path[l] joined
20:00 <EvanR> in this case it has to be an expression of type IO ()
20:00 <jordan36363> its supposed to add numbers from x to y
20:00 <EvanR> main :: IO ()
20:00 <byorgey> jordan36363: if you want your program to print the result of summation 0 3, you can write main = print (summation 0 3)
20:01 _sg joined
20:01 <ADG_> @EvanR then isn't it same as (f.g)x = f(g(x)), isnt that always valid?
20:01 <lambdabot> Unknown command, try @list
20:01 <jordan36363> now it works byorgey
20:01 <jordan36363> thanks a lot
20:01 <ADG_> @list
20:01 <lambdabot> What module? Try @listmodules for some ideas.
20:01 <EvanR> ADG_: isnt what the same as that
20:01 <Myrl-saki> ADG_: Nope.
20:01 <byorgey> ADG_: yes, that is the definition of (.)
20:02 <byorgey> that's not the same as the second functor law though.
20:02 ragepandemic joined
20:02 <ADG_> I suppose then it means that function application should not have any side effects ?
20:02 <Myrl-saki> ADG_: That like saying `f (g . h) = f g . f h` is the same as saying `(g . h) = g . h`
20:03 <EvanR> f (x * y) = f x * f y, the homomorphism pattern
20:03 <Myrl-saki> (Rather, that's exactly what you're saying.)
20:03 psmakro joined
20:03 <byorgey> ADG_: (fmap (+2) . fmap (*2)) [1,2,3] = fmap (+2) (fmap (*2) [1,2,3]) by definition of (.)
20:03 <glguy> ADG_: that's right, function application doesn't have side effects
20:03 <ADG_> so why define second law then, what does it convey?
20:04 <Myrl-saki> (Technically nothing, the first law was enough.)
20:04 <EvanR> Myrl-saki: eh?
20:04 <Myrl-saki> fmap id = id
20:05 raichoo joined
20:05 jer1 joined
20:06 <mnoonan> ADG_: you can't actually do this in Haskell (which is kind of what Myrl-saki is alluding to), but you could imagine a naughty fmap that inspected the function you gave it and then decided what to do; in that case, fmap f . fmap g could be very different from fmap (f . g)
20:06 flatmap13 joined
20:06 <jordan36363> https://ideone.com/vlv21U
20:07 <jordan36363> is this code "end recursive"?
20:07 <ADG_> moonan something like this here at instance Functor CMaybe where http://learnyouahaskell.com/functors-applicative-functors-and-monoids
20:07 sigmundv_ joined
20:07 <jordan36363> or is my function only "linear recursive"?
20:07 <Myrl-saki> summe1 x
20:07 <Myrl-saki> | x < 0 = summe1 x
20:07 <Myrl-saki> That won't terminate if x < 0.
20:08 <jordan36363> thats ok i just wanna give an example for endrecursion and linear recursion that is not endrecursive
20:08 <jordan36363> like 2 versions of this algorithm
20:08 <byorgey> jordan36363: I don't know what "end recursive" or "linear recursive" mean.
20:08 <byorgey> where did you hear/read about them?
20:08 <Myrl-saki> Same place with byorgey here.
20:08 <EvanR> tail recursive?
20:09 <jordan36363> oops end recursion in english means tail call
20:09 <c_wraith> jordan36363, your function is only recursive in the case where it fails entirely...
20:09 newhoggy joined
20:09 <Myrl-saki> I'm guessing linear recursion means O(n)?
20:09 <byorgey> jordan36363: yes, your function is tail recursive.
20:09 <Myrl-saki> (Well, not necessarily.)
20:09 <jordan36363> ok awesome
20:10 <mnoonan> ADG_: that's close, but I was thinking more like "fmap f = if f == (+2) then .. else if f == (*2) then ... else if f == ((+2) . (*2)) then..."
20:10 <byorgey> Myrl-saki: but it was being contrasted with tail recursive which would make no sense.
20:10 <jordan36363> now what do i need to do to make it linear recursiv but not tail recursive
20:10 <byorgey> jordan36363: what is "linear recursive"?
20:10 <ADG_> moonan you can compare f == (+2) ? great
20:10 <Myrl-saki> jordan36363: We'd need a definition for linear recursive. :P
20:10 <mnoonan> ADG_: no, my point is you can't :)
20:10 dm3 joined
20:10 <mnoonan> and that's a good thing
20:10 <jordan36363> linear recursive "there is only one recursive call of the function"
20:11 <EvanR> because if you could, you could solve the halting problem, and that would be a bad thing?
20:11 <ADG_> well prevents lots of catcstrophe I suppose
20:11 <Myrl-saki> Ah.
20:11 <byorgey> jordan36363: is this for a class?
20:11 <jordan36363> sry for not telling the def earlier ^
20:11 <mnoonan> if you could, you could come up with fake-functors that satisfied the first functor law but not the second
20:11 panovia joined
20:11 <jordan36363> its just a practice task
20:11 <Myrl-saki> mnoonan: unsafePerformIO
20:11 <Myrl-saki> c:
20:11 <ADG_> you all on linux?
20:11 <jordan36363> but i cant do it idk why
20:11 <mnoonan> Myrl-saki: yes, well :)
20:11 <Myrl-saki> ADG_: Pretty sure yeah.
20:12 hybrid joined
20:12 <ADG_> do you use stack or cabal etc or did sudo-apt get install ghci or quivalent
20:12 <Myrl-saki> I use both.
20:12 <byorgey> jordan36363: it seems like a pretty useless task though. Tail recursion is not a particularly interesting concept in Haskell.
20:12 <jordan36363> ADG_ I'd just like to interject for moment. What you're refering to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components c
20:12 <jordan36363> omprising a full OS as defined by POSIX.
20:12 <jordan36363> Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called Linux, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.
20:12 <jordan36363> There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a comple
20:12 <jordan36363> te operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called Linux distributions are really distributions of GNU/Linux!
20:12 <Myrl-saki> I use stack as a build tool, and ghc{,i} for "scripts"
20:12 <shapr> jordan36363: whaat?
20:13 <Myrl-saki> shapr: Meme copy and paste fail.
20:13 <jordan36363> why fail? :o
20:13 <shapr> hrm, ok
20:13 <APic> *shrug*
20:13 <byorgey> jordan36363: uh, please don't spam the channel with multiple lines of off-topic text.
20:13 <shapr> yes, please don't spam
20:13 <Myrl-saki> jordan36363: It flooded the channel. :P
20:13 <jordan36363> sry it was just a joke
20:13 <Myrl-saki> jordan36363: It's fine. c:
20:13 <shapr> spamming makes me unhappy
20:14 <Myrl-saki> Him being unhappy makes me unhappy.
20:14 <* Clint> squints.
20:14 <glguy> happiness is offtopic in #haskell
20:14 <shapr> ha! ok then
20:15 <byorgey> this channel is so big that we need everyone's help to keep the signal-to-noise ratio high.
20:15 meoblast001 joined
20:15 <shapr> ADG_: I use stack
20:15 delYsid joined
20:15 <shapr> gutentag delYsid
20:15 delYsid joined
20:16 xcmw joined
20:16 <ADG_> does much change in haskell version like python 2 to 3 or java 7 to 8 or c++98 to c++11
20:16 <qqwy> How do you ask lambdabot to do pointfree golfing?
20:16 <ADG_> because I have 7.10.3 and maybe the latest is 8.?
20:16 <shapr> qqwy: the pl command
20:16 <qqwy> I believe that was possible, right?
20:16 <Tuplanolla> Usually not, ADG.
20:16 <shapr> @pl (\x -> x + 1)
20:16 <lambdabot> (1 +)
20:17 <qqwy> @pl (\n -> n > 0 && n <= 1000)
20:17 <lambdabot> liftM2 (&&) (> 0) (<= 1000)
20:17 <MarcelineVQ> python 2 to 3 isn't really realted to something like ghc 7 to 8, python 2 to 3 is more like haskell98 to haskell2010 possibly
20:17 anuxivm joined
20:17 <mnoonan> huh, that \x -> x + 1 answer was unexpected. it knows some arithmetic?
20:17 <Tuplanolla> @pl \ x -> x `urgh` one -- No, mnoonan.
20:17 <lambdabot> (`urgh` one)
20:18 newhoggy joined
20:18 <fosterite> @pl \ x -> (+ 1) x
20:18 <lambdabot> (1 +)
20:18 <Myrl-saki> MarcelineVQ: n+k. :D
20:18 <byorgey> mnoonan: apparently it knows that + is commutative.
20:18 mr_sm1th joined
20:18 <qqwy> nice!
20:18 <fosterite> @pl \ x -> (* 2) x
20:18 <lambdabot> (2 *)
20:18 <Tuplanolla> Ah, that much knowledge there is.
20:18 <qqwy> @pl \x -> x - 1
20:18 <lambdabot> subtract 1
20:18 <qqwy> :D
20:19 <Myrl-saki> Pffft
20:19 <Myrl-saki> Could have used dec.
20:19 <Myrl-saki> s/dec/pred/
20:19 <ADG_> anyways can anyone tell difference between fmap and <*> (and what do I call the latter one, hidden multiply?)
20:19 <Myrl-saki> :t fmap
20:19 <lambdabot> Functor f => (a -> b) -> f a -> f b
20:19 <Myrl-saki> :t (<*>)
20:19 <qqwy> <*> is apply, right?
20:19 <lambdabot> Applicative f => f (a -> b) -> f a -> f b
20:19 <qqwy> fmap === <$>
20:20 <Myrl-saki> > Nothing <*> Just 1
20:20 BartAdv joined
20:20 <lambdabot> Nothing
20:20 <Myrl-saki> > Just (+1) <*> Just 1
20:20 <lambdabot> Just 2
20:20 alx741 joined
20:20 <qqwy> Basically, $ is function application to a single structure, <$> is function composition to the structures in containers (i.e. Functors)
20:20 <mnoonan> ADG_: <*> lets you apply a *time-varying* function to a time-varying value, going back to the previous discussion
20:21 <Myrl-saki> mnoonan: Why time-varying?
20:21 <Myrl-saki> (Is this on a DSL?)
20:21 Shock_ joined
20:21 <mnoonan> Myrl-saki: we were talking about ((->) Time) as an example functor earlier
20:21 <ADG_> oh fmap applies functions inside functors but <*> applies fucntion inside functors to functors?
20:21 <Myrl-saki> mnoonan: Ah. c:
20:21 istvan joined
20:21 <Myrl-saki> ADG_: Mhm.
20:22 meoblast001 joined
20:22 <EvanR> <*> applies lifted functions to lifted arguments
20:22 <ADG_> great!
20:22 <qqwy> But you can read 'lifted function' as 'function inside functor'
20:22 <qqwy> Or, more accurately
20:22 <EvanR> fmap lifts functions
20:22 <EvanR> pure lifts values
20:22 <qqwy> 'function inside applicative functor'
20:23 <Myrl-saki> ADG_: Also, note that not all Functor can be Applicative.
20:23 <EvanR> functors arent containers, so inside is weird
20:23 <qqwy> functors aren't _neccesarily_ containers
20:23 <istvan> I am new to both Haskell and Parsec. I am trying to modify ttps://gist.github.com/m00nlight/2868363ec217f97072b4 to allow inputting variables in addition to numbers (having removed the eval component). If I add a | Var String to Exp, how do I modify the factor to parse variables appropriately?
20:23 <qqwy> The set of containers is a subset of the set of functors
20:23 debouncer joined
20:23 <ADG_> I adopt that analogy, this is all new (functional programming')
20:23 <EvanR> in general theyre not, and i havent yet seen a precise explanation of what a container is
20:23 <Myrl-saki> qqwy: Set.
20:23 <Myrl-saki> Map.
20:23 nicknovitski joined
20:24 <Myrl-saki> (Weeelll... technicallyy...)
20:24 <qqwy> @EvanR, @Myrl-saki, okay, okay, it indeed depends on what you call a container exactly
20:24 <lambdabot> Unknown command, try @list
20:24 jer1 joined
20:24 <Tuplanolla> Functions are great containers!
20:24 <EvanR> anything is a container if you spin it right
20:24 <qqwy> @Tuplanolla: Ever heard of the linked-list implementation based on function application?
20:24 <lambdabot> Unknown command, try @list
20:25 <EvanR> which is where set terminology also breaks down
20:25 <Myrl-saki> qqwy: church encoding?
20:25 <Tuplanolla> Church encoding or what, qqwy?
20:25 <EvanR> "in the remembered set" being diluted way to say something is remembed
20:25 <qqwy> Yes, Church encoding
20:25 <qqwy> (Didn't remember the name)
20:25 <Younder> Functor as the name implies is a operator which takes functions as input and returns a function as output. (functional operator). Currying can make it remember half evaluations, but that des not make it a container.
20:25 fizbin joined
20:25 <Myrl-saki> Younder: Not just functions.
20:25 <qqwy> What definition of 'operator' are you using in that statement?
20:25 newhoggy joined
20:26 sleffy joined
20:26 <EvanR> Functor here is the category theory term, not C++ or odd math (perhaps you mean a functional)
20:26 <ADG_> does `<*>` reuqire arguments to have same functor context?
20:26 <Sornaensis> yes
20:26 <EvanR> Functors take types to types and functions between types to functions between types
20:27 <qqwy> (<*>) :: Applicative f => f (a -> b) -> f a -> f b
20:27 <qqwy>
20:27 <EvanR> in a precise way weve been repeating
20:27 <qqwy> As you can see, the `f` needs to be the same for both operands
20:27 jlicht joined
20:28 <Myrl-saki> EvanR: That's just an Endofunctor on Hask though. :P
20:28 <cocreature> Myrl-saki: functors that are not endofunctors on Hask are further away from containers
20:28 <EvanR> im glad they didnt literally call it that
20:28 <Myrl-saki> class EndofunctorOnHask
20:29 <qqwy> By the way, is there ever a reason to use `liftM2` over `liftA2` (or the monadic variant of anything for which there is also an applicative variant?)
20:29 <EvanR> not really
20:29 <EvanR> anymore at least
20:29 <Myrl-saki> qqwy: Every Monad is an Applicative.
20:29 <cocreature> qqwy: liftM2 mostly exists because until recently Applicative was not a superclass of Monad for historic reasons
20:29 iAmerikan joined
20:29 <rightfold> After lots of head banging I realized analogies are not the right way to go about these abstract interfaces. The only thing that matters is the types + laws. This takes a lot of getting used to.
20:30 <qqwy> I know they should function the same, but maybe (besides historic reasons) there are efficiency concerns
20:30 <qqwy> which is why I asked
20:30 <qqwy> Thanks :-)
20:30 <Myrl-saki> rightfold: lmao. You're a step closer now. :D
20:30 LHoT10820 joined
20:30 <qqwy> rightfold: It took me a lot of headache to wrap my head around the taco- I mean monads
20:30 <EvanR> yep thats the thing about abstractions, analogies add onto the frame that is there, and then you may not be looking at that frame anymore
20:30 <cocreature> qqwy: if there is a difference, liftA2 should also be more efficient
20:30 <EvanR> the abstraction is all thats left when you lose the analogies
20:30 <cocreature> e.g. it could evaluate its arguments in parallel
20:30 <rightfold> Once you've accepted this, learning new such interfaces becomes suspiciously easy. "Oh this is the type? Ok!" "Oh this is the law? Ok!"
20:31 <qqwy> "just the monoid in the category of endofunctors, what's the problem", amIright? ;D
20:31 <Sornaensis> this is the LAW
20:31 <qqwy> cocreature: Thanks!
20:31 <Myrl-saki> rightfold: It's funny that peole say that math requires no memorization when it's the exact opposite.
20:32 <EvanR> qqwy: theres not a unique such monoid
20:32 <rightfold> You can memorize the axioms and then deduce everything every time.
20:32 erbmani joined
20:32 <rightfold> Memorizing the axioms is the trick, here. It's the types + laws.
20:32 <qqwy> The weirdest thing in the process of learning Haskell is the moment where you realize that, while the documentation could be improved, most of the stuff you need can actually be found by just searching for the type of the function you are looking for
20:32 <qqwy> Types are so descriptive :-)
20:32 <Myrl-saki> @djinn a -> a
20:32 <lambdabot> f a = a
20:32 <qqwy> @EvanR True, true. I think I wrote the quote wrong
20:32 <lambdabot> Unknown command, try @list
20:32 <mnoonan> Myrl-saki: what is there to memorize? if you have some axioms A, you don't need to remember them.. just think about a free A and you're done :)
20:32 twanvl joined
20:33 <qqwy> It should be *a* Monoid, of course
20:33 <rightfold> Axioms are not deductible. They are primitive. Therefore they must be memorized Myrl-saki
20:33 m0rphism joined
20:33 <rightfold> deducible*
20:33 newhoggy joined
20:33 <Myrl-saki> rightfold: Yes.
20:33 <EvanR> what, i just look at my notes
20:33 <Younder> A fork is a frk becuase you call it a fork.
20:34 <rightfold> EvanR: note is isomorphic to brain
20:34 <qqwy> That makes me think: What are you guys opinions about principled typeclasses?
20:34 <EvanR> principled typeclasses?
20:34 <Younder> Axioms are given. Theorems can be deduced from axioms..
20:34 path[l] joined
20:35 <qqwy> (for who did not read this earlier: http://degoes.net/articles/principled-typeclasses)
20:35 <EvanR> stupid )
20:35 <EvanR> http://degoes.net/articles/principled-typeclasses
20:36 <qqwy> The tl;dr is IIRC that we should check the laws of the type classes we write at compile time, and that it makes more sense to create new type classes like SumMonoid and MultiplicationMonoid instead of using newtype wrappers
20:36 <rightfold> qqwy: not any different than {un,}principled data types
20:36 <MarcelineVQ> that requires a whole proof language ye?
20:37 <cocreature> SumMonoid? that sounds horrible tbh
20:37 <MarcelineVQ> could be a fun phd project for some poor student
20:37 <EvanR> qqwy: in agda and idris at least, you can use records as instances, the (dependent) type of the record is the interface and can encode the laws
20:37 <qqwy> I believe that the idea was to, instead of writing a proof language or use dependent typing, to use a couple of quick tests to check if, at least in the common case, the laws are not broken
20:37 <EvanR> and then instances can be checked by the compiler
20:37 <EvanR> tests? :(
20:38 lukesp joined
20:38 <rightfold> qqwy: when you are writing a general function on any monoid, whether you're doing sum or multiplication only matters when you use them both together
20:38 <cocreature> tests, i.e. verification that’s actually used
20:38 <qqwy> 'QuickCheck-style property verification'
20:38 <rightfold> qqwy: at which point you should use Semiring, which has the proper law relating addition with multiplication
20:38 <qqwy> rightfold: Yes
20:39 <EvanR> so we have the technology to talk about this stuff, but dont really want to go fully formal after all because its too much of a pain in the ass
20:39 pranz3 joined
20:39 <cocreature> I don’t get it. why do you want an IntAddMonoid typeclass? at that point you can just use Num and use + instead of mappend
20:39 beanbagu1 joined
20:39 <rightfold> Type class instances stand out. They don't appear all over the place in your code. It's easy to check the laws by hand.
20:39 <rotaerk> hmm wonder if I should start using literate haskell by default
20:40 <rotaerk> starting to see the appeal
20:40 <qqwy> Yes, well, this was the part that I was wondering about as well
20:40 <qqwy> I am not really sure what the advantages/drawbacks of either approach are
20:40 <qqwy> which is why I am interested in the opinions/reasoning of you wonderful folks :-)
20:40 <rightfold> Instances also can't depend on runtime values, making it even easier
20:40 <rightfold> Unlike, say, the lens laws
20:40 <EvanR> there are different use cases for type classes
20:41 <EvanR> one of them is to simply use the same name for different things, i.e. +
20:41 <EvanR> that doesnt require laws, its just cultural
20:41 peterbecich joined
20:41 <EvanR> one of them is to talk about precise law abiding abstractions like Functor
20:41 <rightfold> Yeah, using such ad hoc classes in constraints is risky
20:41 <EvanR> one of them is to do type level programming, get values from types at runtime
20:41 <rightfold> Because you have no idea what they do
20:42 <cocreature> EvanR: tbf everybody kind of assumes that the ring axioms hold for + and * so it’s a bit more than just overloading symbols
20:42 <EvanR> with numerics, sometimes nobody knows what they do, because its number theory or numerical analysis
20:42 <EvanR> cocreature: uh... they do? i dont think so
20:43 cpennington joined
20:43 <rightfold> Float 🤓
20:43 MoALTz joined
20:43 <cocreature> well Float breaks everything
20:43 <EvanR> + is "addition" and thats about it
20:43 <cocreature> I still assume that == is reflexive when I’m writing code in terms of Eq
20:43 <EvanR> or perhaps you can assume == is reflexive up to some other form of equality
20:43 <ADG_> wtf is going on in `(+) <$> (+3) <*> (*100) $ 5 `
20:43 <EvanR> and it doesnt matter if == is strictly doing things different when reversed
20:44 <ADG_> > (+) <$> (+3) <*> (*100) $ 5
20:44 <lambdabot> 508
20:44 <rightfold> ADG_: do you know Reader?
20:44 <qqwy> Hehe
20:44 <Myrl-saki> Reader is ((->) a)
20:44 <qqwy> Floating point arithmetic is... another thing entirely
20:44 <ADG_> nope sorry
20:44 <rightfold> ADG_: ok
20:44 <ADG_> <$> is fmap
20:44 <Myrl-saki> :t liftA2
20:44 <lambdabot> Applicative f => (a -> b -> c) -> f a -> f b -> f c
20:44 <EvanR> == is probably a good example of something that can be given good laws
20:44 <ADG_> <*> is what i know
20:45 <qqwy> Wait, why is == not reflexive?
20:45 <rightfold> ADG_: (f <*> g) x = f x (g x)
20:45 <EvanR> its morally reflexive
20:45 <Myrl-saki> ADG_: Turns out that `f <$> g <*> y` == `liftA2 f g y`
20:45 jer1 joined
20:45 <Myrl-saki> Err
20:46 <qqwy> morally reflexive? :o
20:46 <ADG_> so It fmap's f over g <*> y?
20:46 <cocreature> > let x = 1/0-1/0 in x == x -- qqwy
20:46 <Myrl-saki> ADG_: Turns out that `f <$> g <*> h` == `liftA2 f g h`
20:46 <EvanR> but you have law violating floating point equality and undecidable equality of reals and functions and....
20:46 <lambdabot> False
20:46 <rightfold> So when you have a <$>/<*> chain on functions, what happens is that you get a new function that applies its argument to all the functions in the chain, then combines the result
20:46 <eschnett> `f <$> g <*> h` == `(fmap f g) <*> h`
20:46 <Myrl-saki> ADG_: And `liftA2 f g h x` = `f (g x) (h x)` for Reader.
20:46 <qqwy> @cocreature Now you are using NaN against me
20:46 <lambdabot> Unknown command, try @list
20:47 <ADG_> oh.
20:47 <cocreature> qqwy: don’t blame me, blame ieee :)
20:47 <qqwy> True, true
20:47 <Myrl-saki> What gcc flag was it again?
20:47 <Myrl-saki> -ffast-math?
20:47 <EvanR> you realize @-sign is not IRC for highlighting
20:47 <qqwy> But rather than saying '== is not reflexive' I'd like to conclude that 'floats do not really implement Eq well'
20:47 <eschnett> Haskell should map `NaN` to `Maybe Double`, with an efficient implementation
20:47 <eschnett> “this result is not NaN” should have the same standing as “this pointer is not null"
20:48 LHoT10820 joined
20:48 <cocreature> qqwy: right that’s why I said that I assume that == is reflexive when I write code using it
20:48 <qqwy> :')
20:48 <qqwy> Life is weird
20:48 <EvanR> qqwy: you also cant say that particular implementation of == is reflexive
20:48 <cocreature> but I also assume that the ring axioms hold when I’m using Num so maybe I’m weird
20:48 <Sornaensis> can you force (==) to be reflexive in Idris
20:48 <qqwy> I remember the days where I was blissfully ignorant, and did not know that there were undecidable problems
20:48 <EvanR> or you cause a logical contradiction
20:48 LHoT10820 joined
20:48 <Myrl-saki> Can we like... consider NaN to be bottom?
20:48 vikaton joined
20:48 <qqwy> xD
20:48 <EvanR> Sornaensis: sure
20:48 <EvanR> but they dont
20:49 <qqwy> @Sornaensis I believe it was a problem before, where they used the fact how NaN work to fool Idris' type checker
20:49 <lambdabot> Unknown command, try @list
20:49 mmachenry1 joined
20:49 <Sornaensis> well then what the fuck is the point of Idris
20:49 LHoT10820 joined
20:49 <Myrl-saki> We don't say Eq doesn't work becase `undefined =/= undefined`
20:49 <EvanR> Sornaensis: the goal is to make a practical language for writing real programs which can use dependent types
20:49 <cocreature> Myrl-saki: then you can now differentiate between different bottoms even outside of IO
20:49 <EvanR> no one says Eq doesnt work
20:49 <eschnett> NaN is more like Nothing
20:50 <EvanR> > Nothing == Nothing
20:50 <lambdabot> True
20:50 <Sornaensis> the goal should be 'even more consistent than haskell or bust'
20:50 <EvanR> ok good
20:50 <EvanR> Sornaensis: if you want mathematical precision, you really need agda or something else
20:50 <rightfold> NaN is a bad way of encoding exceptions. But we're stuck with it
20:51 <Myrl-saki> Sadly.
20:51 <rightfold> Rust deals with it quite nicely IMO, by having a superclass of Eq called PartialEq which lacks reflexivity
20:51 <EvanR> you can configure the floating env to crash on NaN instead
20:51 <EvanR> rightfold: o_O
20:51 <qqwy> We should just use Data.Ratio for everything starting now
20:51 <Myrl-saki> qqwy: That's what I do. c:
20:51 <qqwy> :D
20:51 <rightfold> EvanR: !_!
20:51 newhoggy joined
20:51 <EvanR> there are a whole lot of different number types out there
20:51 <EvanR> theres no one best number type
20:52 <qqwy> I implemented the Ratio library for Elixir, as it was lacking one, based on Data.Ratio
20:52 <cocreature> qqwy: hf implementing sqrt for rationals
20:52 <qqwy> ... and then I tried doing the same for Idris, and got completely tangled up in messy proofs. I'm not ready for that yet
20:52 danthemyth joined
20:52 <EvanR> yeah theres no good rational for idris right now
20:52 <EvanR> and there may never be
20:52 <Myrl-saki> EvanR: Why?
20:52 JoshS joined
20:53 <qqwy> cocreature: The sqrt for floats is also cheating, exactly because precision is cut off
20:53 <qqwy> Actually what we really need is an 'irrational' data type
20:53 <EvanR> because people try to encode their feelings of what rationals are into the laws
20:53 <qqwy> just move to symbolic math, everyone!
20:53 <Myrl-saki> EvanR: I see.
20:53 <EvanR> but theres no form of quotient type or homotopy in idris
20:53 <rightfold> qqwy: Is there a typed Mathematica-like language?
20:53 <rightfold> That would be incredibly rad
20:53 crosleyt joined
20:54 <Tuplanolla> There's Axiom, but it doesn't have a user interface, rightfold.
20:54 <qqwy> EvanR: It already starts with the fact that `gcd` is not properly proven in Idris right now
20:54 <EvanR> qqwy: exact real arithmetic is a thing and is much more useful than symbols
20:54 <EvanR> idris is not really on the road to proving all of math
20:54 <qqwy> rightfold: That would be amazing, but I am afraid it might not exist, or at least I don't know about it
20:54 <EvanR> use agda for that
20:54 <qqwy> Tuplanolla: Nice!
20:54 <rightfold> Tuplanolla: Thanks, my UI is Vim + Z shell anyway
20:54 cyborg-one joined
20:54 <rightfold> I'll check it out
20:55 <qqwy> But the problem with `gcd` is then again
20:55 sleffy joined
20:55 <Myrl-saki> Tuplanolla: What's that?
20:55 <qqwy> that people are not in agreement what `gcd 0 0` should be
20:55 <Tuplanolla> I mean it does not even have a working command line interface, rightfold.
20:55 <qqwy> That is, mathematicians do not agree
20:55 <EvanR> qqwy: youll find that everyone comes up with their own stdlibs in agda, because there isnt one true body of math
20:55 <Myrl-saki> qqwy: NaN. c:
20:55 <rightfold> Tuplanolla: I don't like REPLs. Does it have a compiler/interpreter? :P
20:55 <EvanR> its all subjective
20:55 <qqwy> Myrl-saky: Exactly x)
20:56 <rightfold> 22:55 <qqwy> that people are not in agreement what `gcd 0 0` should be
20:56 <rightfold> Type error
20:56 <Tuplanolla> Go find out, rightfold and Myrl-saki.
20:56 <rightfold> Tuplanolla: thanks
20:56 <EvanR> more seriously, what gcd 0 0 is depends on context
20:56 <Myrl-saki> qqwy: data Number = 0 .. | MathematiciansNotSureYet
20:56 <Myrl-saki> Ez.
20:56 iAmerikan joined
20:56 <EvanR> context sensitivity comes up a lot and we have a few tools for that
20:56 ridho joined
20:57 <EvanR> like the typeclass reflection trick
20:57 isidore joined
20:57 shainer joined
20:57 alx741 joined
20:57 <qqwy> 'under the divisibility order, 0 is the greatest natural number because every number divides 0' is the reason why `gcd 0 0` ought to be 0
20:58 <EvanR> whenever you read a book and it says "in the following pages we use the convention that 0^0 is 1" youve entered a context of convenience. we dont have a perfect answer for this in haskell right now
20:58 <qqwy> This is, if you assume that indeed you are looking at the partial order of divisibility
20:59 <EvanR> type classes are a huge step in that direction though, which gets use closer to the ubiquitous context of what + means
20:59 cloudhead joined
20:59 ertesx joined
20:59 <qqwy> Yes! I wholeheartedly agree
20:59 sssilver joined
20:59 doomlord_ joined
21:00 yellowj joined
21:00 squareburdener joined
21:00 cpennington joined
21:00 <EvanR> dependent records in idris try to go farther with it, letting you mix and match implementations first class, but then its common for the checker to get confused about what you mean
21:01 <EvanR> if you try to do category theory, the amount of contexts kind of explodes
21:01 <EvanR> its amazing these books get anywhere with it!
21:02 cdg joined
21:03 <qqwy> What books are you refering to/
21:03 <qqwy> ?*
21:03 <lambdabot> Maybe you meant: v @ ? .
21:03 fmmarques joined
21:04 rperry joined
21:04 jaspervdj joined
21:04 <qqwy> As for Idris: I read the Type-driven development book while it was in MEAP, and now that it is finished I definitely need to read it again since some things have changed
21:04 <qqwy> (but alas, no time)
21:04 <EvanR> math books open contexts regularly, when turn to a random page and see a symbol, the definition may not be anywhere on that page
21:04 <EvanR> it may not even be in the book at all
21:04 shayan_ joined
21:05 <qqwy> Ah, math books
21:05 <qqwy> Yes, I totally agree
21:05 path[l] joined
21:06 jer1 joined
21:07 <qqwy> If you ever have time on your hands, here is how you can find out the optimal matrix chain order
21:07 <qqwy> in O(n log n)
21:07 cfricke joined
21:07 <qqwy> instead of O(n³)
21:07 <qqwy> http://infolab.stanford.edu/pub/cstr/reports/cs/tr/81/875/CS-TR-81-875.pdf
21:07 <qqwy> Because Hu and Shing have mapped the problem to triangulation on polygons
21:08 <EvanR> 1981 eh
21:08 <EvanR> way before haskell
21:08 Skye_ joined
21:08 squareburdener joined
21:09 <qqwy> I think this might work great with Haskell
21:09 duog joined
21:09 cpup joined
21:09 <qqwy> But alas, this paper eludes my comprehension until this day
21:10 squareburdener joined
21:11 insitu joined
21:11 fotonzade joined
21:11 biglambda joined
21:11 <Gurkenglas> I git cloned ngless from github, opened a .hs file and emacs's intero gave me http://lpaste.net/691574534490292224
21:11 carlomagno joined
21:12 PaperSkye left
21:12 <Gurkenglas> How do I correctly get from a page like https://github.com/luispedro/ngless/blob/master/NGLess/Utils/Conduit.hs#L58 to editing/looking at it in intero?
21:13 flatmap13 joined
21:13 boxenweighter joined
21:15 ccomb joined
21:16 zcourts_ joined
21:17 chlong joined
21:17 squareburdener joined
21:20 <qqwy> I have to go
21:20 <qqwy> talk to you later
21:20 <qqwy> thank you for your help, everyone! :-)
21:20 <qqwy> \quit
21:22 ubsan_ joined
21:23 danthemy_ joined
21:24 blym_ joined
21:25 oisdk_ joined
21:25 cpup joined
21:26 jer1 joined
21:27 alexbiehl joined
21:27 lambdaman joined
21:30 plutoniix joined
21:31 plutoniix joined
21:32 duog joined
21:32 bjz joined
21:32 plutoniix joined
21:33 plutoniix joined
21:33 mbw joined
21:34 nomotif joined
21:36 e14 joined
21:36 <mbw> Has anyone been successful with getting the new accelerate-llvm-native backend to work? I have to install llvm4.0, and the devs maintain a ppa which I added to /etc/apt/sources.list . However, I get "Depends: libllvm4.0 (>= 1:4.0-3~) but 1:4.0~svn301550-1~exp1 is to be installed"...
21:38 <Gurkenglas> Is there a conduit that'll let through up to n items and then monadically error if any more arrive? (Presumably as a combination of a conduit that lets through n values (take?) and a conduit that merely does a given action once)
21:38 Levex joined
21:38 <mbw> The only way I ever could get llvm3.9 to work was to build from source, which took 3h with -j4. And then I couldn't even get it to coexist with 3.8
21:40 cpup joined
21:41 davila joined
21:41 sssilver joined
21:41 cdg_ joined
21:41 Bob131 left
21:47 jer1 joined
21:47 IndigoTiger joined
21:47 ikke joined
21:48 _ashbreeze_ joined
21:49 ccomb joined
21:49 <mbw> Nevermind: https://bugs.llvm.org//show_bug.cgi?id=32876, but was reported today.
21:49 <mbw> Just my luck.
21:50 <mbw> I am going to kill kittens now.
21:50 <mbw> *bug
21:51 mmachenry joined
21:51 fXl joined
21:52 romank joined
21:53 hiratara joined
21:54 lambdaman joined
21:58 <Gurkenglas> This one looks good https://hackage.haskell.org/package/conduit-1.2.10/docs/src/Data-Conduit-List.html#isolate is there a version of that does a specified action instead of "loop count | count <= 0 = return ()"?
21:58 sillyotter joined
22:00 xcmw joined
22:00 burtons joined
22:01 boj_ joined
22:01 lambdaman joined
22:02 tomboy64 joined
22:04 oisdk joined
22:05 oisdk joined
22:06 levex_ joined
22:06 <Gurkenglas> Man hlint should have a recommendation against reversing an accumulator
22:07 jer1 joined
22:08 epsilonhalbe joined
22:09 epsilonhalbe left
22:09 mmachenry joined
22:09 <Myrl-saki> Gurkenglas: What do you mean?
22:10 <Myrl-saki> Gurkenglas: And I was just browsing HLint recently, and HLint3 seems to have some user-defined stuff.
22:10 iqubic joined
22:11 sssilver joined
22:11 <Gurkenglas> when something says "go acc | done = reverse acc", that means you shoulda been doing a right fold instead
22:12 bno1 joined
22:12 <Myrl-saki> Ahh
22:12 <hvr> Gurkenglas: sounds like the topic of a (small) blogpost
22:13 <iqubic> How does on use glirc?
22:13 rkazak joined
22:13 <iqubic> Is there a guide anywhere?
22:13 <hvr> iqubic: yes, you need to ping the 'glguy' bot
22:13 <glguy> https://github.com/glguy/irc-core/wiki has the most information
22:14 <hvr> see, works all the time
22:15 istvan joined
22:15 cdg joined
22:15 <Myrl-saki> lmao
22:16 Levex joined
22:16 zero_byte joined
22:17 doomlord_ joined
22:17 boj joined
22:19 ipuustin joined
22:21 uglyfigurine joined
22:21 anks joined
22:22 zaquest joined
22:22 <iqubic> glguy: ping
22:22 <iqubic> Trying to ping the glguy bot.
22:22 <* Clint> squints.
22:23 mac10688 joined
22:24 darjeeling_ joined
22:24 <MarcelineVQ> iqubic: he already said <glguy> https://github.com/glguy/irc-core/wiki has the most information
22:24 <iqubic> I know.
22:25 <MarcelineVQ> alrighty just makin sure :>
22:28 jer1 joined
22:29 cdg_ joined
22:29 blym_ joined
22:30 bas313 joined
22:31 jmcarthur joined
22:31 hiratara joined
22:31 <bas313> Hello folks
22:34 <bas313> very quick question: why is f :: (Monoid a) => a f = [] not valid?
22:34 <bas313> since [] is a monoid
22:35 uglyfigurine joined
22:35 <dolio> [] isn't every monoid.
22:36 <dario`> you could say f = mempty
22:37 splanch joined
22:37 peterbecich joined
22:38 justanotheruser joined
22:38 HallaSurvivor joined
22:40 <bas313> @dolio Is my understanding of generics possibly flawed? As in: I read the (Monoid a) part as: satisfieable by any monoid.
22:40 <lambdabot> Unknown command, try @list
22:40 Koterpillar joined
22:41 <glguy> bas313: If 'f' has the type ' Monoid a => a ', that means *forall* types 'a' with kind * that satisfy the constraint 'Monoid a', that 'f' can have type 'a'
22:42 <glguy> of course [] isn't such a value that can have any type 'a' satisfying 'Monoid a', it can only have types [b]
22:43 <bas313> hmmm
22:43 <bas313> *grabs thinking hat&
22:43 crobbins_ joined
22:43 <glguy> So the correct type signature would be: 'f :: [b]'
22:44 iAmerikan joined
22:44 <glguy> The *user* of f gets to determine how the type variables should be instantiated
22:45 butterthebuddha joined
22:46 bno1 joined
22:47 dan_f joined
22:47 <dario`> it's the difference between \forall and \exists
22:50 raynold joined
22:51 newhoggy joined
22:52 <bas313> glguy, dario` I have some reading up to do, but thank you for your directions!
22:52 moth joined
22:53 verne joined
22:53 jdt joined
22:53 <verne> Hello world
22:55 anuxivm joined
22:55 carlomagno1 joined
22:57 splanch joined
22:58 ridho joined
22:58 beanbagu1 joined
23:00 carlomagno joined
23:05 darlan joined
23:05 carlomagno joined
23:05 gugah joined
23:06 anks joined
23:06 anks left
23:06 wroathe joined
23:07 oleo joined
23:09 sleffy joined
23:09 shayan_ joined
23:09 carlomagno joined
23:11 cschneid_ joined
23:12 soniku joined
23:12 dm3 joined
23:12 alveric1 joined
23:14 carlomagno joined
23:14 prophile joined
23:17 splanch joined
23:18 safe joined
23:19 patbecich joined
23:21 guampa joined
23:24 <reuben364> How do I disable the persistent squigglely error lines after running haskell-process-load-file in Haskell in emacs?
23:24 romank joined
23:25 mekeor joined
23:25 shayan_ joined
23:26 wroathe joined
23:26 ExpHP joined
23:27 <ExpHP> What is the relationship between Control.Exception and Control.Exception.Base?
23:27 thimoteus joined
23:27 MP2E joined
23:28 <sm> reuben364: maybe M-x flycheck-mode ?
23:30 <mniip> hum
23:30 nakal_ joined
23:30 <mniip> has any research been put into generating "lazy" LR parsers for possibly infinite grammars
23:30 <ExpHP> oh, never mind, I thought that onException was only defined in the .Base module for some reason
23:31 <ExpHP> ("for some reason" = "I really could've sworn I imported Control.Exception butididn't >_>")
23:33 <glguy> mniip: I'd expect you could construct such a lazy parser with Happy
23:35 <mniip> no like
23:35 <mniip> infinite amount of nonterminals
23:36 <mniip> just like you can do for LL
23:36 montik joined
23:37 wroathe joined
23:38 richi235 joined
23:41 lambdaman joined
23:42 cschneid_ joined
23:43 debouncer joined
23:43 plot joined
23:44 sgronblo joined
23:44 louispan joined
23:45 <thang1> LL?
23:46 markus1209 joined
23:46 wroathe joined
23:46 markus1219 joined
23:47 fizbin joined
23:47 Jesin joined
23:48 hexfive joined
23:49 uglyfigurine joined
23:50 splanch joined
23:51 darlan joined
23:52 theDon_ joined
23:54 <mniip> thang1, google "LL parser"
23:54 kvda joined
23:55 <thang1> oooh neat
23:57 romank joined
23:57 jdt joined
23:58 infinity0_ joined
23:58 infinity0_ joined
23:58 tromp joined