<    April 2017    >
Su Mo Tu We Th Fr Sa  
 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  
00:00 Pupnik_ joined
00:06 takle joined
00:08 <glguy> the parser 'many (string "AB")' parses "", "AB", "ABAB", "ABABAB", etc
00:09 <glguy> What did you expect to happen?
00:10 stef_204 joined
00:19 takle joined
00:20 <qmm> geekosaur: when you say dependent-sum needs to be built from git, how would i make this custom build known to cabal when it attempts to install lambdabot again?
00:24 systemfault joined
00:25 systemfault joined
00:27 abhiroop joined
00:33 eacameron joined
00:43 eacameron joined
00:47 mac10688 joined
00:50 Majiir joined
00:56 eacameron joined
00:56 mariusz89016 joined
00:56 sigmundv joined
00:59 <saylu> Hi folks -- anyone know how to access the 'host' record from a URI?
00:59 <saylu> Example is here:
00:59 <saylu> http://lpaste.net/2589185128467005440
00:59 <saylu> I haven't done anything with nested records before, or with lenses -- just need to retrieve a single field here and not sure how to do it
01:00 acarrico joined
01:04 abhiroop joined
01:05 eacameron joined
01:07 <saylu> There is a lens provided:
01:07 <saylu> > hostBSL :: Lens' Host ByteString
01:07 <lambdabot> error:
01:07 <lambdabot> Not in scope: type constructor or class ‘Host’error:
01:07 <lambdabot> Not in scope: type constructor or class ‘ByteString’
01:07 <saylu> apparently I can use this to retrieve the record I would like to...but how do you actually _use_ this?
01:07 <Gurkenglas> view hostBSL :: Host -> ByteString
01:10 <saylu> Any advice for retrieving that Host?
01:10 <Gurkenglas> saylu, view hostBSL has type Host -> ByteString
01:10 <Gurkenglas> Or do you not have a Host to apply this to?
01:10 <saylu> Yes, but I have the type URI Absolute, which has a bunch of records, one of which is Host
01:10 <saylu> Right
01:11 Cthalupa joined
01:12 stef204 joined
01:13 <Gurkenglas> "authorityHostL :: Lens' Authority Host" and "uriAuthorityL :: Lens' URI (Maybe Authority)" look right, but the latter says deprecated, sure you want to use the URI type?
01:13 <Gurkenglas> "Absolute"?
01:14 <Gurkenglas> (URI does not have a type parameter, you mean URIRef Absolute?)
01:14 vaibhavsagar joined
01:15 <acarrico> Hey folks, Haskell book chapter exercises 16.17 number 4. I think the answer is "no"; there is no valid functor because the type constructor wants a type constructor rather than a concrete type. Is this correct, or am I missing something?
01:17 <Gurkenglas> preview $ authorityL . _Just . authorityHostL . hostBSL -- URI -> Maybe ByteString
01:17 ultalbot joined
01:17 eacameron joined
01:18 <saylu> Whoops, sorry, you're right-- URIRef absolute
01:18 <saylu> (fmap hostBS . fmap authorityHost . uriAuthority) uri -- this does let me get out the host, but feels quite clunky
01:19 <saylu> is `preview` from Lens?
01:19 <Gurkenglas> Yep
01:19 <Gurkenglas> (^? authorityL . _Just . authorityHostL) :: URI -> Maybe Host -- (^?) is flip preview
01:23 <saylu> Thanks!
01:24 <glguy> acarrico: If the type in question has kind: (* -> *) -> *, then you're right, it can't be an instance of Functor
01:24 <glguy> also note that that has nothing to do with being a type constructor or not
01:24 <acarrico> glguy: newtype Mu f = InF { outF :: f (Mu f) }
01:25 <acarrico> glguy: So if the kind had been * -> * -> *, I could apply a concrete type to get * -> *, but with (* -> *) -> *, it can't be done.
01:26 <glguy> No, it doesn't have that kind
01:26 <glguy> Mu :: (* -> *) -> *
01:26 <acarrico> glguy: Right.
01:27 <acarrico> glguy: Great, thanks.
01:27 <acarrico> It is as strange thing. Googling around it seems to have something to do with F algebras, which also sounds pretty cool.
01:27 <acarrico> Rather than going on to the next exercise, I'm tempted to read about F algebras.
01:28 Cthalupa joined
01:28 <glguy> Mu doesn't require a type constructor as you mentioned above, any type with kind * -> * will do
01:29 <acarrico> Oh, what is an example of a type with kind *->* that isn't a type constructor?
01:29 <glguy> Either Int
01:29 <glguy> That's a type expression built from the application of one type constructor to another
01:30 <glguy> or newtype MyExample f = MyEx (Mu f), there's Mu is applied to the type variable f
01:30 <acarrico> Well Either Int applied to String "constructs" Either Int String, so I guess I assumed that would be called a type constructor. But I'm new here.
01:30 <glguy> constructor refers to the fact that it's a capitalized name
01:31 <acarrico> Ok, I see.
01:31 <glguy> When you find a type signature: (a -> b) -> Maybe a -> Maybe b, you know that the type variables (a and b) are local to the signature
01:31 eacameron joined
01:31 <glguy> but that the type constructors: (->) and Maybe, are not
01:32 <glguy> Or when you're writing a typeclass instance, the type constructors are being matched while the type variables are not
01:32 <acarrico> Ok, so "type literals" specifically, not any expression with an -> kind.
01:33 <glguy> right
01:33 <acarrico> That terminology makes sense. Cool.
01:33 <glguy> That terminology will work for you at the value level too
01:33 <glguy> You have constructors like True and Just
01:33 <glguy> variables like x and awesome
01:34 <glguy> when you build patterns, the constructors are matched and the variables name things
01:34 <glguy> Just x -> stuff
01:34 <acarrico> So you'd consider True a constructor, even though it is fully applied?
01:34 <glguy> Right, it's the same story. Nothing to do with the types
01:34 <acarrico> Ah. Ok good to know.
01:39 eacameron joined
01:39 <acarrico> glguy: If you think of Int as: data Int = ... | 0 | 1 | 2 | ..., would 0 be a constructor?
01:39 dni- joined
01:39 <glguy> Integer literals serve a similar purpose to constructors, they're a special case in the language
01:40 <acarrico> glguy: Ok. Thanks for the help with Mu. :)
01:40 <glguy> you're welcome
01:43 eacameron joined
01:48 eacameron joined
01:53 <Lokathor> odd fact, the phrase "Haskell Programming From First Principles" doesn't appear *textually* anywhere on the main page of the haskellbook.com website, only within graphics that you can't copy and pate into a text box ( bitemyapp )
01:54 <MarcelineVQ> it does in metadata at least
01:57 eacameron joined
02:02 takle joined
02:10 exferenceBot joined
02:13 <qu1j0t3> whoa, look at our very own SEO experts
02:13 abhiroop joined
02:14 hexagoxel joined
02:15 eacameron joined
02:15 jrajav joined
02:21 aarvar joined
02:23 eacameron joined
02:27 <MarcelineVQ> I'm an expert in eating hamburgers
02:30 eacameron joined
02:34 takle joined
02:34 eacamero_ joined
02:42 louispan joined
02:44 mariusz89016 joined
02:55 meandi_2 joined
02:56 sherub2 joined
03:02 madsa joined
03:09 eacameron joined
03:12 abhiroop joined
03:28 dni- joined
03:39 Pupnik joined
03:40 louispan joined
03:44 <geekosaur> qmm, if you are building in a sandbox then "cabal sandbox add-source" the directory with the cabal file
03:46 <monochrom> That's a very belated reply. :)
03:51 <geekosaur> actually it;'s a reiteration as I said that earlier
03:52 <monochrom> Ah.
03:52 <geekosaur> but got pinged, so. (during a badly needed nap)
03:57 begriffs joined
03:58 <glguy> lambdabot appears to have too many dependencies to work on macOS Sierra (<- specifically)
04:00 <bitemyapp> I fixed this for my company last week
04:00 <bitemyapp> the fix is, "use stack's ez-pz docker integration and build under Linux"
04:00 <bitemyapp> this is not the answer I wanted but after spending hours researching alternatives, it's all that is realistic for now.
04:01 Kuros` joined
04:07 <bitemyapp> Docker for Mac has the benefit of being lighter weight than using VirtualBox et al.
04:09 manWithNoName joined
04:15 abhiroop joined
04:33 mariusz89016 joined
04:54 abhiroop joined
05:09 mariusz89016 joined
05:17 dni- joined
05:18 monochrom joined
05:20 takle joined
05:33 takle joined
05:41 suds13_ joined
06:03 abhiroop joined
06:11 takle joined
06:20 takle joined
06:22 abhiroop joined
06:38 sherub3 joined
06:46 mojjo joined
06:48 abhiroop joined
07:00 takle joined
07:06 dni- joined
07:13 mariusz89016 joined
07:14 takle joined
07:15 slomo joined
07:22 t0by joined
07:30 yellowj joined
07:30 abhiroop joined
07:32 Pupnik_ joined
07:35 albertus1 joined
07:45 shayan_ joined
08:09 myrkraverk_ joined
08:09 zero_byte joined
08:13 TheAceOfHearts joined
08:13 takle joined
08:13 TheAceOfHearts joined
08:14 MotherFlojo joined
08:15 Durz0 joined
08:20 harfangk joined
08:26 kritzcreek_ joined
08:35 Ferdirand joined
08:38 mariusz89016 joined
08:38 govg joined
08:43 harfangk joined
08:48 thc202 joined
08:51 abhiroop joined
08:53 azahi joined
08:55 dni- joined
08:59 takle joined
09:15 <abhiroop> Ihad posted this question earlier too but could not get it work. Can someone please help http://lpaste.net/354450
09:26 louispan joined
09:28 MotherFlojo joined
09:39 Ferdirand joined
09:40 adarqui joined
09:40 <adarqui> sup
09:42 <adarqui> is it normal to get "depressed" when like, you have some ideas you'd love to code/finish, but you just keep struggling.
09:42 <adarqui> struggle due to ability, time, etc
09:46 ali_bush joined
09:46 ali_bush joined
09:50 merijn joined
09:52 abhiroop joined
10:05 abhiroop joined
10:12 Ferdirand joined
10:15 contiver joined
10:19 MotherFlojo joined
10:37 Deide joined
10:38 Pupnik joined
10:40 Nik05 joined
10:43 abhiroop joined
10:44 dni- joined
10:50 <vaibhavsagar> adarqui: I feel like that too sometimes
10:52 LiaoTao joined
10:55 wildlander joined
10:56 madjestic joined
10:57 jespada joined
10:59 <adarqui> vaibhavsagar: ah. wonder if it's more common than I think.
10:59 <adarqui> with haskell it's particularly brutal, but not limited to haskell/pure fp
11:12 jespada joined
11:14 Ferdirand joined
11:15 hdeshev joined
11:16 Nycatelos joined
11:18 hdeshev joined
11:20 hdeshev joined
11:40 <abhiroop> adarqui: True
11:43 sherub3 joined
12:04 NoCreativity joined
12:11 Gurkenglas_ joined
12:14 MotherFlojo joined
12:18 <vaibhavsagar> adarqui: with Haskell I often feel like I'm discovering programming again for the first time
12:18 <vaibhavsagar> and that'
12:18 <vaibhavsagar> s a bit frustrating at times because there's so much I don't know
12:18 <vaibhavsagar> and I'm not used to feeling that way
12:19 <vaibhavsagar> but without that frustration I'd have no reason to learn or get better
12:19 <vaibhavsagar> and then when I revisit things I thought were difficult and they make a little more sense, I feel good
12:23 <adarqui> ya well, i felt like that at first too (years ago).. but i'm definitely at the point where, i'd rather not have the frustrations .. i'd rather just "get it" and knock out really solid code. so personally, i hate the frustration at this point. haskell is still my favorite language to program in.. i have one personal app that is backend haskell / frontend purescript which is coming along.
12:24 <adarqui> reading "pro" haskellers code is depressing.. lmao
12:24 prophile joined
12:24 <adarqui> but that's a different story all together
12:25 <adarqui> programming in general makes me feel both good and bad.. haskell made me feel more good than bad - for the first year.. probably alot to do with what you said - discovering programming again for the first time.
12:26 <adarqui> but now haskell to me is similar to other languages.. in that it's pretty evenly good/bad
12:26 <adarqui> feel good when you figure out something/learn something/implement something, feel bad when you struggle/can't finish an important project
12:27 <adarqui> 8|
12:27 <adarqui> im out, peace vaibhavsagar
12:30 <vaibhavsagar> take care adarqui
12:33 dni- joined
12:39 tfero joined
12:41 mojjo joined
12:42 merijn joined
12:46 tfero left
12:58 MotherFlojo joined
13:09 mariusz89016 joined
13:23 MotherFlojo joined
13:25 wei2912 joined
13:31 Gurkenglas joined
13:35 meck joined
13:36 joneshf-laptop joined
13:40 abhiroop joined
13:53 Ferdirand joined
13:54 meck joined
13:56 abhiroop joined
14:00 howdoi joined
14:02 abhiroop joined
14:12 azahi joined
14:14 takle joined
14:16 <abhiroop> Any help in this? http://stackoverflow.com/questions/43306945/parse-multiple-instances-of-a-string-using-readp
14:19 Zialus joined
14:22 dni- joined
14:22 oconnorct1 joined
14:23 abhiroop joined
14:25 zero_byte joined
14:30 jrajav joined
14:31 Ferdirand joined
14:43 abhiroop joined
14:44 abhiroop joined
14:52 systemfault joined
14:53 takle joined
14:54 takle_ joined
15:08 abhiroop joined
15:15 abhiroop joined
15:15 shayan_ joined
15:20 abhiroop joined
15:25 abhiroop joined
15:30 Zialus joined
15:32 takle joined
15:34 takle_ joined
15:36 rstefanic joined
15:40 abhiroop joined
15:43 t0by joined
15:46 DataComputist joined
15:54 abhiroop joined
16:00 takle joined
16:02 Ferdirand joined
16:02 \Mike joined
16:04 joneshf-laptop joined
16:06 abhiroop joined
16:06 madsa joined
16:09 peterbecich joined
16:11 dni- joined
16:11 expo873 joined
16:15 nick_h joined
16:18 sigmundv joined
16:51 MotherFlojo joined
16:57 hoffmeyer joined
16:58 MotherFlojo joined
17:02 albertus1 joined
17:02 azahi joined
17:05 abhiroop joined
17:05 Ferdirand joined
17:15 takle joined
17:17 takle_ joined
17:18 flounders joined
17:21 <flounders> How do I go about incorporating .Internal portions of a package in my projects?
17:21 rstefanic joined
17:22 <glguy> flounders: Is there a more specific question you had about that?
17:22 <geekosaur> ideally you don't; they're Internals for a reason, usually because they're subject to change without notice (unlike the public API)
17:23 <flounders> I'm trying to use System.Directory to identify if something is a file, directory or symlink.
17:24 <flounders> Unfortunately using the public module I have to daisy chain if statements to match everything.
17:24 <glguy> If you depend on the .Internal modules from another package, you need to tighten your version bounds on that package in your build-depends
17:24 <flounders> I'm just trying to make a way to pattern match against the possiblities in one go, but maybe it's a stupid idea.
17:25 hoffmeyer joined
17:25 <flounders> glguy: I currently have it set to a specific version right now.
17:25 <glguy> in the .cabal?
17:25 <flounders> Yes.
17:26 <flounders> The only thing that is stopping me right now is cabal is complaining about it being hidden.
17:26 <glguy> Oh, then you're out of luck
17:26 <glguy> You'll need to raise an issue on the tracker for the directory package to see if the maintainer would be intersted in providing the API you need
17:27 jmiven joined
17:27 <flounders> I guess I'll be daisy chaining in the mean time.
17:27 <flounders> Thanks for the help guys.
17:33 mariusz89016 joined
17:43 MotherFlojo joined
17:43 circ-user-tSe6r joined
17:44 <qmm> geekosaur, monochrom: i don't mind belated responses. it's IRC after all. glguy mentioned using "cabal get package_name" and then building from there
17:45 <qmm> it isn't clear to me (thanks to lack of experience) how you would make a sandboxed version of the package available as a global binary for execution
17:46 takle joined
17:54 abhiroop joined
17:58 <yellowj> sorry potentially stupid question: is there some way to define function from Int to type level peano numbers?
17:58 <yellowj> something like that http://lpaste.net/354458
17:59 harfangk joined
18:00 dni- joined
18:01 <glguy> yellowj: No, the type : Peano n => Int -> n wouldn't make sense to exist
18:01 <glguy> What is possible would be something like: data SomePeano = forall n. Peano n => SomePeano n; toPeano :: Int -> Maybe SomePeano
18:02 <glguy> The problem with the type you started with is that the caller gets to pick 'n'
18:02 <glguy> so: toPeano 100 :: Zero -- would typecheck
18:10 <yellowj> glguy: can i make something like (data SomePeano) without language extensions?
18:10 <glguy> yellowj: no
18:11 <glguy> actually..
18:12 <yellowj> yes?
18:12 <glguy> No, I can't think of one
18:12 <glguy> had an idea but it just used another extension :)
18:13 <glguy> we might be able to do something like : toPeano :: Int -> SomePeano Zero
18:13 <glguy> and then: data SomePeano n = Done n | Step (SomePeano (Succ n))
18:19 rstefanic joined
18:19 <lpaste> glguy pasted “peano numbers without extensions for yellowj” at http://lpaste.net/354460
18:20 <glguy> yellowj: Next would be to figure out what operations one can do with a SomePeano
18:22 zero_byte joined
18:28 abhiroop joined
18:31 <yellowj> glguy: all i want is to be able to somehow construct peanos at runtime
18:31 <glguy> at do what?
18:31 <glguy> yellowj: Just make: data Nat = Zero | Succ Nat
18:31 <glguy> you need to involve types
18:32 abhiroop joined
18:32 <yellowj> that's the thing i need type (Succ (Succ (Succ Zero)))
18:32 <yellowj> not the value
18:32 <glguy> The types don't exist at runtime
18:32 <glguy> What were you going to do with that type?
18:32 <yellowj> yeah, i realize silliness of my desire
18:33 MotherFlojo joined
18:33 <yellowj> i wanted to make matrix algebra, with matrices parametrised with phantom types
18:35 <yellowj> but i have no idea how to construct arbitrary sized matrices
18:35 abhiroop joined
18:38 <yellowj> it seems that it was silly idea to begin with
18:43 \Mike joined
18:47 abhiroop joined
18:54 systemfault joined
18:56 stef204 joined
18:58 t0by joined
18:58 t0by joined
19:01 stef204 joined
19:04 takle joined
19:05 \Mike joined
19:08 eacamero_ joined
19:11 rstefanic_ joined
19:12 abhiroop joined
19:14 takle joined
19:14 Ferdirand joined
19:21 mariusz89016 joined
19:21 eldiz joined
19:26 abhiroop joined
19:26 aarvar joined
19:30 abhiroop joined
19:30 MotherFlojo joined
19:33 mariusz89016 joined
19:35 systemfault joined
19:38 Cthalupa joined
19:43 RonnieHolm joined
19:44 mariusz89016 joined
19:44 RonnieHolm left
19:46 Gurkenglas_ joined
19:49 dni- joined
19:52 zero_byte joined
19:53 m1dnight_ joined
20:02 delexi joined
20:03 takle joined
20:10 \Mike joined
20:11 monochrom joined
20:16 takle joined
20:39 Guest81707 joined
20:58 Uniaika joined
21:01 Guest81707 joined
21:02 sigmundv joined
21:05 bkboggy joined
21:20 Ferdirand joined
21:31 Deide joined
21:33 sherub3 joined
21:38 dni- joined
21:38 zero_byte joined
21:42 moei joined
21:44 louispan joined
21:49 aarvar joined
21:52 eacameron joined
21:53 hiratara joined
21:59 louispan joined
22:12 eacameron joined
22:22 eacameron joined
22:25 Ferdirand joined
22:27 louispan joined
22:31 hiratara joined
22:57 Ferdirand joined
23:02 acarrico joined
23:24 mariusz89016 joined
23:26 louispan joined
23:26 dni- joined
23:27 carlomagno joined
23:29 Ferdirand joined
23:31 acarrico joined
23:32 stef204 joined
23:35 mariusz89016 joined
23:38 Pupnik joined
23:51 louispan joined
23:55 louispan joined