<     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 _2_7  
28 29 30 31
00:00 Hunter1 joined
00:01 infinity0_ joined
00:01 infinity0_ joined
00:01 davr0s joined
00:01 actualHuman_462 joined
00:02 dustinm joined
00:03 takle joined
00:04 infinity0 joined
00:06 LuckyRawApe joined
00:06 safe joined
00:06 infinity0 joined
00:07 sgronblo joined
00:07 jer1 joined
00:08 JeanCarl1Machado joined
00:09 <ReinH> ixmap (l,u) f creates a new array with bounds (l,u) by applying f to each index at i to produce the new index at j
00:09 micmus joined
00:09 infinity0 joined
00:10 <ReinH> Sorry, that's not quite right.
00:10 tromp joined
00:11 <ReinH> It producer a new array with bounds (l,u) where the i'th index holds the value at f i in the original array.
00:11 takle joined
00:12 Guest29587 joined
00:12 <ReinH> (where i ranges from l to u)
00:12 infinity0 joined
00:12 cioran89 joined
00:12 sgronblo joined
00:15 drcode joined
00:15 <ReinH> ixmap (0,10) succ arr produces an array where index 0 is arr ! succ 0 and so on up to 10,which I'd arr ! succ 10
00:15 <ReinH> *is
00:16 <ReinH> So it shifts the indices from (1,11) to (0,10)
00:16 <edwardk> thats the contravariant map thing, right?
00:16 <ReinH> Er, shifts the bounds
00:16 <ReinH> Yeah contravariant index map
00:17 Hunter1 joined
00:17 <edwardk> the corresponding construction in lens is one of 2-3 contravariant setters is the only reason why i remember it
00:18 <jle`> \me . o O (instance Profunctor Array where ...)
00:18 <ReinH> It's weird that ixmap would be contra instead of co.
00:18 <ReinH> edwardk: also hi
00:18 kav joined
00:19 <* jle`> . o O (instance Category Array where ...)
00:19 takle joined
00:19 <edwardk> reinh: heya, ltns. when are you coming out to boston? i missed the little davean hackahon thing they scheduled around you in january or february or whatever
00:19 StoneToad joined
00:19 <davean> We need to schedule another :)
00:20 <edwardk> jle: both -almost- work
00:20 <ReinH> Not sure, maybe there's a conference or a hack Boston or something I can plan around.
00:20 <edwardk> davean: you coming down to compose?
00:20 <davean> edwardk: to what? When?
00:20 <* edwardk> just landed in nyc
00:20 <davean> I guess no? Since I don't even know when or what that is
00:20 <ReinH> jle`: instance Category Matrix where
00:20 <edwardk> compose conference, tomorrow through sunday
00:20 <davean> Uh, guess not!
00:20 <jle`> different instance :o
00:21 <davean> :(
00:21 <davean> Would have
00:21 <ReinH> Heh, johnw also asked me. I'm sad I'm missing it now.
00:21 <davean> And I'm sailing next week, so I'll miss johnw's thing
00:21 <edwardk> johnw is also here
00:22 <edwardk> come down, crash on carter's floor or somehing
00:22 <edwardk> emily reihl will be talking about effects tomorrow morni
00:22 <davean> carter is coming up *here*
00:22 <davean> he's crashing on *my* floor
00:23 <edwardk> tell him to toss you his keys, then ditch him :)
00:23 <ReinH> edwardk: the categorical effects stuff? I saw that.
00:23 <davean> Lol
00:23 <ReinH> Looks nest.
00:23 <carter> edwardk: I'll be around Thursday
00:23 <davean> I'm running a cooking thing tomorrow
00:23 <ReinH> Neat.
00:23 <davean> er
00:23 plutoniix joined
00:23 <davean> friday
00:23 <davean> What day of the week is it?
00:23 nighty-- joined
00:23 <edwardk> the hackathin part is the weekend
00:23 <edwardk> thu/fri are talks
00:24 <ReinH> edwardk: I've been making another attempt at HoTT
00:24 dfordivam joined
00:24 <carter> edwardk: ... but the hack thing is in new jerseyyyy
00:24 <edwardk> is it? i didnt see the address
00:24 <carter> edwardk: it's at Jet. In New Jersey.
00:24 <edwardk> that may mak getting back/forth complicated
00:25 <carter> Yes. Why I wasn't planning to go to the hack part
00:25 nnplv joined
00:25 rcschm joined
00:25 drewbert joined
00:26 TheFuzzball joined
00:26 takle joined
00:27 <edwardk> depending on how much the saturday sucks i'll decide if i can reschedule my return flight / crash on someone's couch for sunday
00:27 filterfish joined
00:27 <davean> Low expectations?
00:28 filterfish joined
00:28 kadoban_ joined
00:28 <edwardk> realistic ones now that i know that i have to figure out transit to/from jersey
00:28 jer1 joined
00:29 <davean> I need to maintain a calendar of FP conference/events and make it to more of them
00:29 drcode joined
00:29 Deide joined
00:30 <carter> edwardk: allegedly its easy to get to from Hoboken... but I'm too planning to go either way
00:30 <ezyang> see y'all at Compose :)
00:30 uglyfigurine joined
00:31 <carter> ezyang: you'll be theee ?
00:31 <ezyang> yep, NYC based I am
00:31 juanpaucar joined
00:32 <carter> ezyang: generally or just this week ?
00:32 Reshi joined
00:33 <ezyang> generally
00:33 nighty-- joined
00:33 nnplv joined
00:33 <carter> ezyang: woah when did that happen?!
00:34 <edwardk> ezyang: so when are we getting you to come up to boston and give a backpack talk to boston haskell?
00:34 <ezyang> edwardk: Oh, clearly in the near future!
00:34 <ezyang> carter: Last month. Started a cushy job... writing Python and C++ haha
00:34 <edwardk> good to know. i'll bug you about it while we're both here at compose
00:35 <edwardk> anyways welcome back to this coast
00:35 <carter> ezyang: is that code for Google?
00:35 <ezyang> Facebook :P
00:35 <carter> Also see yah around :)
00:35 <ezyang> yeah, I can feel the heat already
00:36 Jesin joined
00:37 <carter> I was doing some cpp and python this week and deciding python is terrible
00:38 pfoetchen joined
00:39 <davean> Well, at least it's cushy?
00:39 drewbert joined
00:40 uglyfigurine joined
00:40 <carter> What does cushy mean in this context ?
00:41 <edwardk> compared to the typical grad student lifestyle?
00:41 <carter> That's a low bar
00:41 mizu_no_oto joined
00:42 <edwardk> ezyang: did you finish the phd first?
00:42 sproingie joined
00:42 <davean> Well, I have to assume it's enough to make up for what followed?
00:43 Rodya_ joined
00:43 reliability joined
00:43 Scip joined
00:44 <edwardk> that is my one regret. without finishing a phd folks can get away with calling me mr. ed rather than dr. ed.
00:44 <ezyang> weeeell
00:44 araujo joined
00:44 <ezyang> i haven't submitted final copy of my thesis yet haha
00:45 davr0s joined
00:45 <ezyang> cushy means making way more than a PhD
00:45 araujo joined
00:45 <blackdog> carter: python is indeed terrible! why were you writing it?
00:45 <blackdog> edwardk: oh thanks, i'll never get that song out of my head now.
00:46 halogenandtoast joined
00:46 <edwardk> you do realize i probably would have hired you in a cushy capacity from about any point from your sophomore year on, right? ;)
00:46 <pacak> ezyang: o/
00:46 <ezyang> pacak: hihi
00:46 <davean> edwardk: there's still life left in you
00:46 <MarcelineVQ> dr. ed? https://s-media-cache-ak0.pinimg.com/736x/d1/ea/7a/d1ea7a1e6808865585cf3a5f4cc77d84.jpg
00:46 <pacak> ezyang: About !13710 - I have code that panics with -j1. Would it be useful to minimize the failure with -j1?
00:46 <ezyang> that definitely would help!
00:47 <davean> edwardk: I'm sure if you get bored some winter, you can still become Dr. Ed
00:47 takle joined
00:48 <edwardk> see thats my problem. no matter how many masters degrees you get people never seem to start calling you master.
00:48 vaibhavsagar joined
00:48 <Axman6> it won't take him a whole winter
00:48 <edwardk> i was suckered
00:48 abra0 joined
00:48 <EvanR> doctor doctor doctor doctor doctor </sleeper>
00:48 jer1 joined
00:48 <dyreshark> edwardk: if it makes you feel better, i got a bachelor's degree and am still a bachelor.
00:49 uglyfigurine joined
00:51 <edwardk> i managed to get a double b.s. and as folks who know me can tell you, that left me with a lot of b.s. left over
00:51 justanotheruser joined
00:55 <actualHuman_462> Random question - I have seen on Reddit and a few places, people mentioning this idea of "using records instead of sum types" to replace stuff like data AppSignal = Exit | RunCommand Text | Etc ... Does anyone have like a code example or a blog post somewhere that elaborates on this?
00:56 <actualHuman_462> It seems like sort of a logical non sequitur to talk about replacing a sum type with a product type, so like, obviously I am missing some kind of core concept here
00:56 darlan joined
00:56 abroz joined
00:57 <EvanR> maybe talking about the record of functions to simulate OOP
00:57 <edwardk> you can use row typing to talk about open sums as well
00:57 <edwardk> e.g. data types a la carte
00:58 <edwardk> or the CoRec type in the vinyl records stuff
00:58 <glguy> actualHuman_462: it would be more useful to be shown a specific Reddit comment that you didn't understand than to guess what was meant
00:59 <edwardk> given an open sum and a product of "handlers" you can do case analysis. given an open record a sum type acts as a field selector
00:59 <carter> There's a duality!
01:00 ehsanullahjan joined
01:00 <edwardk> indeed.
01:01 <carter> blackdog: after briefly considering going along with impl in python I decided nope nope
01:01 <carter> _init_.py is gross
01:01 <carter> There's just so much terribleness if I wanted to write an ok lib blackdog
01:02 Destol joined
01:02 <pacak> carter: Try php, after php python feels nice.
01:02 ehsanullahjan left
01:02 uglyfigurine joined
01:03 <carter> pacak: not sure how much money I'd need to do that
01:06 cyborg-one joined
01:06 andyhuzhill joined
01:06 Supersonic112_ joined
01:08 conal joined
01:08 ChaiTRex joined
01:09 jer1 joined
01:13 mrkgnao joined
01:13 alveric4 joined
01:17 lc_ joined
01:17 ystael joined
01:18 sordina1234 joined
01:18 slack1256 joined
01:19 <sordina1234> Hey Haskellers, has anyone experienced servant apps somehow setting duplicate cookies?
01:20 takle joined
01:23 xmj1 joined
01:24 renzhi joined
01:25 YongJoon joined
01:26 hybrid joined
01:26 flatmap13 joined
01:28 jmcarthur joined
01:30 jer1 joined
01:31 darjeeli1 joined
01:32 dual joined
01:33 varuaa joined
01:33 anodium joined
01:34 _ashbreeze_ joined
01:35 juanpaucar joined
01:35 lc_ joined
01:36 benl23 joined
01:36 lc_ joined
01:37 takle joined
01:38 lc_ joined
01:38 yepo_ joined
01:39 P1RATEZ joined
01:40 lc_ joined
01:41 <pacak> Is it possible to to have two cabal sandboxes in the same directory?
01:41 <MarcelineVQ> posibly with --sandbox=DIR
01:41 <pacak> I'm passing --sandbox .new and --ignore-sandbox, but it says Using an existing sandbox located at
01:41 <pacak> for sandbox init
01:42 revprez joined
01:44 takle joined
01:45 <geekosaur> I don't think you can, because cabal.sandbox.config is outside the dot-dir with the actual sandbox in it?
01:45 Rodya_ joined
01:45 wroathe joined
01:46 reliability joined
01:47 <pacak> Hmm... I think I managed to do it by messing with folders manually. It's sad that cabal seems to ignore --ignore-sandbox parameter.
01:48 <pacak> That moment when you go to reproduce a bug in ghc but find a bug in cabal instead.
01:48 uglyfigurine joined
01:48 Nicmavr joined
01:49 Xanather joined
01:49 Nicmavr joined
01:49 <MarcelineVQ> hmm, I'm not having your issue here
01:50 Ptival left
01:50 <pacak> cabal-install 1.24.0.2, compiled using version 1.24.2.0 of the Cabal library
01:50 jer1 joined
01:50 <pacak> ghc 8.0.2
01:52 obadz joined
01:52 e14 joined
01:53 msko joined
01:53 <MarcelineVQ> 1.24.0.0 here as well, in a fresh directory mkdir .new && cabal sandbox init && cabal sandbox init --sandbox .new works without conflict, were you after something else and I'm misunderstanding?
01:53 <MarcelineVQ> *here, in
01:53 abroz joined
01:53 lambdamu joined
01:53 halogenandtoast joined
01:54 sgronblo joined
01:54 louispan joined
01:54 takle joined
01:55 <MarcelineVQ> the config file might still end up being an issue as geekosaur mentions, depends how smart the --sandbox option is :X
01:55 e14 joined
01:55 <pacak> I did something similar, but in my case it detected previous sandbox and reused it. Moving it out of the way and moving back in helped.
01:57 louispan joined
01:57 uglyfigurine joined
01:57 <MarcelineVQ> you might end up needing to have a config for each and pass a --sandbox-config-file=FILE option for cabal commands, seems like a hassle
01:58 <pacak> Yea. I'm trying to compile the same code that depends on half a hackage on both ghc 8.0 and 8.2.rc2 the same time
01:58 <pacak> because rc2 panics
01:59 <pacak> https://ghc.haskell.org/trac/ghc/ticket/13710
01:59 saussure joined
01:59 twomix joined
01:59 saussure joined
02:00 hucksy_ joined
02:02 <MarcelineVQ> ah, I don't know anything about boot files, that's a pretty obscure reference in the error message though
02:02 cschneid_ joined
02:03 cschneid_ joined
02:05 ystael joined
02:10 takle joined
02:10 erisco joined
02:10 <erisco> at this rate I will have to port everything to a different language... but that would be miserable
02:10 <EvanR> o_O
02:10 jcjustjc joined
02:10 <erisco> can't get haste working either as hplayground won't install
02:11 <erisco> could elect to not use it but then I have to do even more annoying UI workl
02:11 jer1 joined
02:13 <erisco> I suspect Elm/PureScript don't support type families and rank-n-types and data kinds
02:13 <paf31> PS has rank n types and you can create custom kinds, but no type families
02:13 <paf31> We have fundeps though
02:16 saussure joined
02:16 e14 joined
02:17 tromp joined
02:17 <jle`> aw man, ghcjs doesn't do Data.Kind.Type yet
02:19 <jle`> i don't think this is a fundamental issue with ghcjs
02:20 <erisco> haste-install install haste-compiler Backjump limit reached
02:21 ljc joined
02:21 jer1 joined
02:23 argent0 joined
02:23 exferenceBot joined
02:23 <erisco> haste-compiler depends on bin-package-db which is not a package
02:24 <erisco> they recommend just downloading the binary... but their libs depend on it anyways...
02:26 takle joined
02:26 roconnor joined
02:27 CoderPuppy joined
02:28 hexagoxel joined
02:28 eschnett joined
02:29 uglyfigurine joined
02:30 sword865 joined
02:30 roconnor_ joined
02:30 sproingie joined
02:30 sproingie joined
02:30 SkyPatrol joined
02:31 drewbert joined
02:32 geekg_000 joined
02:33 safe joined
02:35 tripped joined
02:35 mjora7 joined
02:36 flatmap1_ joined
02:36 anodium joined
02:38 takle joined
02:39 juanpaucar joined
02:43 uglyfigurine joined
02:43 _sras_ joined
02:44 njmurphy joined
02:44 <_sras_> Using servant-swagger, how can I provide a description for a particular endpoint?
02:45 filterfish joined
02:45 CoderPuppy joined
02:46 Rodya_ joined
02:46 SkyPatrol joined
02:47 kritzcreek joined
02:48 ycz0926 joined
02:50 augur joined
02:52 takle joined
02:56 danthemyth joined
02:57 whoman joined
03:02 sgronblo_ joined
03:03 louispan joined
03:04 saussure joined
03:11 Goplat joined
03:11 rstefanic joined
03:11 wroathe joined
03:13 saussure joined
03:15 rcschm joined
03:17 dan_f joined
03:17 ForgedPancake joined
03:18 ericsagnes joined
03:19 sleffy joined
03:20 takle joined
03:27 ycz0926 joined
03:27 biotty joined
03:28 ycz0926 joined
03:28 ycz0926 joined
03:28 ycz0926 left
03:28 <biotty> if i miss the dot in following i get the inverse -- (flip ($)) 1 . (/) $ 2
03:29 ycz0926 joined
03:29 ddere joined
03:30 robotroll joined
03:30 andyhuzhill joined
03:32 <lyxia> biotty: flip ($) 1 (/) $ 2 = ((/) $ 1) $ 2 = (/) 1 2 flip ($) 1 . (/) $ 2 = flip ($) 1 ((/) 2) = (/) 2 $ 1 = (/) 2 1
03:32 fkurkowski joined
03:33 cgfbee joined
03:35 jer1 joined
03:38 _ashbreeze_ joined
03:39 <ReinH> So, I mean, did you not want to use `(/) 1`?
03:39 <ReinH> Oh, you wanted the (.)
03:39 <biotty> so when no dot, this space is using (/) as argument, and when a dot, we compose with (/) and in the latter case the 2 is given to the composed function
03:39 <ReinH> @pl \x -> (/) x 1
03:39 <lambdabot> (/ 1)
03:39 <ReinH> sections ftw
03:40 <biotty> lyxia: thank you, this clarified. i underline i am a newb experimenting with the basics
03:40 drewbert joined
03:40 <ReinH> biotty: when in doubt, it's good to get in the habit of evaluating terms yourself by using their definitions
03:41 FreeBirdLjj joined
03:41 <ReinH> This is one of the nice things about referential transparency: you can always substitute terms with their definitions.
03:42 <biotty> ReinH: yes, in this case i should do that on all leaving the discussed (.) or space as long i can, so that i see why it at all compiles in both cases
03:42 <ReinH> this sort of thing is known as "equational reasoning" and is a very useful skill.
03:42 <ReinH> biotty: space?
03:43 <ReinH> oh, you mean the application that occurs when you don't have the .
03:43 <biotty> ReinH: exactly
03:43 <ReinH> cool
03:43 <ReinH> well, you don't get a choice about how long to leave the (.) or application
03:43 <biotty> i was just fiddling, and got surprised (scared) when both where valid
03:43 <ReinH> that's decided for you by Haskell's evaluation order
03:43 juanpaucar joined
03:44 <ReinH> although you will get the same result in a lot of cases, it isn't guaranteed
03:45 <ReinH> (you will get the same result when your expression is total)
03:45 BlueRavenGT joined
03:45 <ReinH> > const 1 undefined -- sometimes evaluation order matters though
03:45 <lambdabot> 1
03:45 danvet joined
03:46 <biotty> by the way, is there a synonym for flip ($) ?
03:46 <jle`> there's (&), but it isn't quite idiomatic in most places
03:46 systadmin joined
03:46 <ReinH> Some people call it (&), but it isn't in the standard library
03:46 <jle`> it is actually in base
03:46 <ReinH> oh it is now
03:46 <ReinH> right
03:46 Rodya_ joined
03:47 <jle`> it...snuck in there
03:47 <ReinH> heh
03:47 <ReinH> all my Haskell knowledge is out of date
03:47 reliability joined
03:49 CoderPuppy joined
03:50 prophile joined
03:50 jgt1 joined
03:52 orhan89 joined
03:52 jer1 joined
03:53 wroathe joined
03:53 rootnode joined
03:53 sellout- joined
03:54 _ashbreeze_ joined
03:56 jedws joined
03:58 abroz joined
04:04 <glguy> Anyone know what I'd need to do with ghcjs-dom to get the context I've typed into a textarea? getAttribute myTextArea "value" , doesn't seem to be it
04:04 saussure joined
04:04 isenmann joined
04:04 <glguy> This is what I've tried http://lpaste.net/709854168705138688
04:04 fkurkowski joined
04:05 <glguy> however all that ever sets the output div to is "null"
04:06 pavonia joined
04:07 castlelore joined
04:07 castlelore joined
04:08 jaziz1 joined
04:09 <hamishmack> glguy: Have you tried GHCJS.DOM.HTMLTextAreaElement.getValue ?
04:10 descender joined
04:12 <glguy> No, but that does sound promising.
04:12 <glguy> That's the best place to find the haddocks for this module?
04:13 takle joined
04:13 <hamishmack> https://hackage.haskell.org/package/jsaddle-dom-0.8.0.0/docs/JSDOM-Generated-HTMLTextAreaElement.html
04:14 <hamishmack> That is the underlying module that gets re-exported through ghcjs-dom-jsaddle and ghcjs-dom
04:14 <glguy> OK, thanks. I think because of the indirections that ghc-dom does to make it possible to run things on multiple platforms I was looking in the wrong place
04:14 jer1 joined
04:14 <glguy> and using getValue works for me, thank you
04:14 filterfish_ joined
04:15 infinity0 joined
04:15 butterthebuddha joined
04:15 <glguy> My goal is to learn enough GHCJS to make my config-schema library example file interactive :) I plan to replace the string literal in 'exampleFile' with a textarea https://github.com/glguy/config-schema/blob/master/README.md
04:16 <glguy> dmj`: Helped me to get so far as to be able to load the parser and schema libraries in ghcjs proper, so now it's UI time
04:23 simukis_ joined
04:23 mmachenry joined
04:25 orion joined
04:25 orion joined
04:26 torgdor joined
04:29 kantokom1 joined
04:29 hamishmack joined
04:30 louispan joined
04:30 jer1 joined
04:30 rcschm joined
04:32 <glguy> hamishmack: What was I doing wrong when using getAttribute? What was happening there instead of what I had in mind?
04:32 takle joined
04:34 <dmj`> UI time :)
04:34 wroathe joined
04:35 eklavya joined
04:37 sproingie joined
04:37 sproingie joined
04:39 takle joined
04:39 mtg joined
04:46 systemfault joined
04:47 takle joined
04:47 Rodya_ joined
04:47 juanpaucar joined
04:48 flatmap13 joined
04:48 reliability joined
04:50 saurabhnanda joined
04:55 xall joined
04:56 benl23 joined
04:56 jer1 joined
04:58 takle joined
05:00 Guest6344 joined
05:01 abroz joined
05:01 ilyaigpetrov joined
05:02 [[[[[ExTR joined
05:07 Cooler joined
05:07 dec0n joined
05:08 butterthebuddha joined
05:10 {emptyset} joined
05:11 brynedwardz joined
05:14 marr joined
05:15 jer1 joined
05:16 wroathe joined
05:18 <nshepperd_> I didn't think textarea had a "value" attribute
05:18 <glguy> It's apparently how you get the contexts of a textarea
05:18 <nshepperd_> The content is a child node of the textarea, not an attribute
05:19 <glguy> Sure, but it's exposed via .value in the DOM
05:20 LordBrain joined
05:20 Kuros` joined
05:23 <nshepperd_> Is that the same thing as an "attribute" according to ghcjs.dom?
05:23 <Zemyla> When was RankNTypes added to GHC?
05:23 mstruebing joined
05:23 <edwardk> long long ago, before hugs died
05:24 <glguy> nshepperd_: Perhaps not, that'd explain why it didn't work
05:24 osa1 joined
05:24 meandi_2 joined
05:24 takle joined
05:24 LAZAR joined
05:25 <edwardk> zemyla they were really old when i first joined the community 10 years ago
05:25 <nshepperd_> I'd assume that a function called "getAttribute" applies to only actual html attributes. But i dunno
05:28 _sras_ joined
05:28 <_sras_> Using servant-swagger, is there any way to give descriptions to indvidual endpoints?
05:29 sordina1234 joined
05:29 vlatkoB joined
05:30 Swizec joined
05:30 <jle`> just saw 'type ★ = Type', haha
05:31 <jle`> http://hackage.haskell.org/package/base-4.9.1.0/docs/Data-Kind.html#t:-9733-
05:31 <jle`> didn't realize it was that simple
05:32 exarkun joined
05:33 <LAZAR> What is wrong about this piece of code attempting to parse a JSON license either consisting of a String or an Object?
05:33 <LAZAR> http://lpaste.net/355637
05:33 <nshepperd_> jle`: all we need is more Unicode on our keyboards...
05:34 leat joined
05:34 xtreak joined
05:36 <nshepperd_> Although does that one actually work? It looks like haddock thinks it's an operator. It would be a bit annoying to have to write (★) in stead of (★)
05:36 <nshepperd_> Err, instead of ★
05:36 jer1 joined
05:37 <jle`> yeah
05:37 <jle`> well
05:37 <jle`> parsing rules are already special-cased with *
05:37 sproingie joined
05:37 sproingie joined
05:37 <jle`> looks like ★ is also special-cased
05:37 wroathe joined
05:38 <jle`> :k ★
05:38 <lambdabot> error:
05:38 <lambdabot> Not in scope: type constructor or class ‘★’
05:38 <lambdabot> error: Operator applied to too few arguments: ★
05:38 <jle`> @let import Data.Kind
05:38 <lambdabot> Defined.
05:38 <jle`> :k ★
05:38 <lambdabot> *
05:38 thebardian joined
05:39 <jle`> :k 'Just ★
05:39 <lambdabot> Maybe *
05:39 takle joined
05:39 <pacak>
05:41 nickager joined
05:42 jedws joined
05:42 reliability joined
05:44 inad922 joined
05:44 caumeslasal joined
05:44 <LAZAR> Umm what kind of error happens when Aeson returns Error in $[285]: empty?
05:48 Rodya_ joined
05:49 oish joined
05:49 <eklavya> is there a way to have triple quote strings in ghci?
05:49 <eklavya> I don't want to escape all "s in string while pasting
05:50 tromp joined
05:50 <LAZAR> Im trying to parse JSON which could be either String or an Object, does not seem to work tho, can someone check this 7 LoC? http://lpaste.net/355638
05:51 <pavonia> LAZAR: What is the error?
05:51 jgt1 joined
05:52 <LAZAR> pavonia: Surprisingly short... Error in $[285]: empty
05:52 juanpaucar joined
05:53 <pavonia> Could you paste a minmal but complete module?
05:53 <LAZAR> the module is very short, so sure
05:53 sproingie joined
05:53 sproingie joined
05:54 <LAZAR> http://lpaste.net/355639
05:55 <pavonia> And what's the input?
05:55 paolino joined
05:55 abroz joined
05:55 takle joined
05:56 <LAZAR> pavonia: The input is http://lpaste.net/3681361192619606016 in input line 285
05:57 jer1 joined
05:57 fizruk joined
05:57 <LAZAR> pavonia: and this would be an example with an object license http://lpaste.net/4647840138297081856
05:58 <dmwit> This... is not what I would call minimal.
05:58 wroathe joined
05:58 dan_f joined
05:58 <LAZAR> dmwit: What do you mean?
05:59 <dmwit> Minimal is like 3-4 lines of code and 5-6 characters of input.
05:59 Cooler joined
05:59 <LAZAR> dmwit: Well I originally posted 7 loc and was aked for more. my program is really short with 80 loc and almost only type declarations
06:00 sgronblo joined
06:00 <dmwit> I'm not saying you should show something less than your whole program.
06:00 <dmwit> I'm saying you should put in some work so that your whole program is tiny, and still demonstrates the problem.
06:00 <_sras_> In Servant, Is there anyway to get a path of an endpoint from the endpoint's type alone?
06:00 <dmwit> Cut out anything non-essential to demonstrating the issue.
06:01 <dmwit> (While verifying that it still does demonstrate the issue.)
06:01 <dmwit> https://stackoverflow.com/help/mcve
06:01 <dmwit> Indeed, most of the time just following this process makes the problem so apparent you don't even need to ask the channel. =)
06:02 <dmwit> eklavya: Nope, you have to escape them all.
06:02 <dmwit> eklavya: You could put in a placeholder and swap it out later... =P
06:03 <LAZAR> dmwit: okay. well it is this then http://lpaste.net/355639 I know the mistake is inside the asum block i just did not found a good documentation for this anywhere
06:03 <eklavya> dmwit: :D I can use multi edit I guess
06:03 takle joined
06:03 <eklavya> there really should be a """
06:03 <eklavya> it's so convenient !
06:03 <dmwit> > let swap '%' = '"'; swap '"' = '%'; swap x = x in swap <$> "%This is a quote,% said the senseis, %and if you can't see that it's your problem.%"
06:03 <lambdabot> "\"This is a quote,\" said the senseis, \"and if you can't see that it's you...
06:04 <dmwit> LAZAR: Okay. If the problem is in the `asum`, you should be able to cut out most of the code that doesn't directly impact the `asum`, then. I suggest you try that.
06:05 <pavonia> LAZAR: Shouldn't you treat the object as an object if it isn't string? You now seem to try to use it as a string in both cases
06:05 <LAZAR> dmwit: and there we are at my original post which was the exact 7 lines of asum...
06:06 <eklavya> dmwit: :)
06:06 <dmwit> LAZAR: But your 7 lines is not a complete program.
06:06 <LAZAR> pavonia: Yep Im just using a default string just to see if the code works
06:06 <dmwit> LAZAR: And doesn't have a small input that shows the problem.
06:06 <pavonia> LAZAR: No, I mean in the Just branch
06:06 darjeeli1 joined
06:06 <LAZAR> pavonia: eventually i will deconstruct the object and pull the license out
06:06 <dmwit> I know it sounds like I'm being difficult here, but I really am trying to help, not just with this problem but with your method of figuring out solutions in the long term future.
06:06 Cooler joined
06:07 <pavonia> O rmaby I'm confused
06:07 wm41 joined
06:08 <LAZAR> pavonia: Well eventually I want to readMaybe the license, if this succeeds it is a string and i return that, if not it must be an object. for simplicity's sake in that case i just return a default string
06:08 guiben joined
06:09 <pavonia> LAZAR: But that makes the parser fail, I think, because it tries to parse it as a string even if it is an object
06:10 <LAZAR> pavonia: well in that case the error would be Error in $[285].license: expected String, encountered Object
06:10 anoLB joined
06:10 <LAZAR> ?
06:10 <pavonia> The docs say it returns empty in that case
06:10 hurkan joined
06:11 kylefang joined
06:11 <LAZAR> pavonia: yeah but why? i specified it to return (Just "Default")
06:11 nomotif joined
06:12 <pavonia> readMaybe takes a string as input, so (.:) has result type Parser String
06:12 AlphaAtom joined
06:13 <pavonia> But the object cannot be parsed as string, hence the empty result
06:13 dm3 joined
06:13 mschristiansen joined
06:14 mjora7 joined
06:15 <LAZAR> pavonia: Strange... I did it pretty much the same way it has been done in this tutorial: https://artyom.me/aeson#more-interesting-choices
06:16 hamishmack joined
06:16 <pavonia> Right, but there it is a string, not an object
06:17 <LAZAR> pavonia: or a number i believe
06:17 jer1 joined
06:18 <LAZAR> so what would be the way to distinguish object from string? i can not do pattern matching there?
06:18 <pavonia> Yes. Another thing I just noticed, you do "return x" which is also wrong, because you have to return a Maybe value
06:18 <pavonia> So now both the parser and the read fail :)
06:19 jgt1 joined
06:19 wroathe joined
06:19 <pavonia> LAZAR: You need to extract the "type" field and use its value with readMaybe
06:20 quchen joined
06:20 LuckyRawApe joined
06:20 <pavonia> Or for testing purposes at least give the compiler a hint that the result you expect is an object
06:22 reliability joined
06:22 abroz joined
06:23 <LAZAR> pavonia: can you give an example of how to extract this type field? Like with typeOf?
06:24 drola joined
06:25 takle joined
06:26 butterthebuddha joined
06:26 <pavonia> LAZAR: Something like do { license <- value .: "license"; mbType <- license .:? "type"; ... }
06:27 renzhi joined
06:27 leat joined
06:27 justan0theruser joined
06:28 ixxie joined
06:31 mmachenry1 joined
06:31 LuckyRawApe joined
06:32 renzhi joined
06:33 mbuf joined
06:35 heurist joined
06:36 dm3 joined
06:38 alfredo joined
06:40 baldrick1 joined
06:40 mattyw joined
06:40 takle joined
06:41 ADG_ joined
06:41 jer1 joined
06:42 <ADG_> hello everyone, can you tell me how can I make this code more readable (without introducing syntax errors, I tried breaking lines and this exact thing happened) : https://github.com/adityagupta1089/Project-Euler-Haskell/blob/master/src/50.hs
06:43 <jle`> ADG_: try naming things
06:43 <jle`> but you should be able to break some lines
06:43 wonko7 joined
06:43 xtreak joined
06:43 <ADG_> also why can't I break lines in the array declaration
06:43 <jle`> what exact things are oyu talking about
06:43 <jle`> line breaks are fine
06:44 <ADG_> "parse error (possibly incorrect indentation or mismatched brackets)"
06:44 <jle`> as long as they start after the first 's' in 'sms'
06:44 <mbrock> how much do y'all care about name shadowing with variables and parameters? I find myself a bit sad that the names I want to use would so often cause a shadowing warning
06:44 <jle`> ADG_: you're gonna have to post the code and full error message if you want us to be able to meaningfully help with that
06:44 <mbrock> (I guess in the Lisp world, my sadness is related to the conflict between Lisp
06:45 <jle`> i pretty much try to never shadow anything
06:45 <mbrock> ...Lisp-1 and Lisp-2, i.e. whether to have separate namespaces for functions and variables)
06:45 <jle`> except for special cases like with record wildcards/record puns
06:45 <ADG_> here : https://hastebin.com/milaxeyaga.hs
06:46 <jle`> ADG_: yeah, like i said, you have to put everything after the 's' in sms
06:46 <jle`> otherwise GHC things that you're starting a new declaration/binding
06:46 <mbrock> record fields (or their corresponding lenses) are probably what steal the most valuable names
06:46 oish joined
06:46 <ADG_> hmm, I get it
06:46 <jle`> mbrock: well, what are you naming your record fields
06:46 <jle`> there are...conventions
06:47 <mbrock> like in a VM there will be a "bytecode" field in some record, and then I'll be naming variables "theBytecode" or "myBytecode" or whatever
06:47 LHoT10820 joined
06:47 <jle`> that's a bad name for a record field
06:47 <jle`> or well, at least for how haskell works
06:48 <jle`> it's definitely not a name that anyone would recommend you use, and not one that any library or production code would use
06:48 <mbrock> I'm familiar with the convention of prefixing each field with the record name, but that makes lens compositions very noisy
06:48 <jle`> ADG_: i'd also probably pull out the giant list you pass to 'array' and give it a name
06:49 <ADG_> It's recursive and it needs itself, I think so
06:49 Rodya_ joined
06:49 takuan joined
06:49 <jle`> you can still refer to sms
06:49 <jle`> recursion is allowed in haskell
06:49 <jle`> it's actually something people do pretty often :)
06:49 <_sras_> Using Swagger, If I have a Swagger value, how can I add a description to a particular path in it?
06:50 <jle`> @src map
06:50 <lambdabot> map _ [] = []
06:50 <lambdabot> map f (x:xs) = f x : map f xs
06:50 <jle`> ^ example of recursion
06:50 xtreak_ joined
06:51 tromp joined
06:52 ragepandemic joined
06:52 juanpaucar joined
06:53 takle joined
06:54 xtreak joined
06:55 xcmw joined
06:58 <osa1> sigh it's annoying that I can't document data constructor fields unless I use record syntax or invent single-use newtypes
06:59 <anoLB> you mean they wont show up in haddock... you can put comments tho
06:59 <osa1> yeah that's what I mean
06:59 <anoLB> get haddocks source and hack it for us
06:59 <anoLB> :)
06:59 raichoo joined
07:00 <anoLB> save yourself the annoyance... and gain karma too
07:00 xtreak_ joined
07:00 <osa1> I'd love to if I had time ;-)
07:00 <anoLB> haddocks interface is hairy seeming to me, i usually just run cabal haddock
07:01 jer1 joined
07:01 wroathe joined
07:03 connrs joined
07:03 coot____ joined
07:04 Neo joined
07:05 dalek_ joined
07:05 dalek__ joined
07:07 lenstr joined
07:08 LHoT10820 joined
07:08 kotangen1 joined
07:08 bvad joined
07:09 xtreak joined
07:10 ventonegro joined
07:10 Gloomy joined
07:10 Itkovian joined
07:10 takle joined
07:12 exarkun joined
07:12 dolio joined
07:13 yoneda joined
07:14 Gurkenglas joined
07:15 vlatkoB_ joined
07:16 ali_bush joined
07:16 ali_bush joined
07:17 pgiarrusso joined
07:18 jutaro joined
07:18 Cooler joined
07:18 merijn joined
07:19 juanpaucar joined
07:19 pgiarrusso_ joined
07:20 oish joined
07:21 zargoertzel joined
07:22 wroathe joined
07:25 nh2 joined
07:25 filterfish_ joined
07:26 jer1 joined
07:27 <riaqn> hello, can I define the predecence of an infix data constructor to be higher than 0? like (-1)
07:27 <merijn> riaqn: eh, -1 is lower
07:27 <whoman> ^_^
07:27 <merijn> fixity is 0-9, higher being stronger binding
07:27 <riaqn> ahh.. yes but it's actually "higher predecence"
07:28 <riaqn> yeah, I want it weaker binding.
07:28 <merijn> riaqn: No, 0 is the lowest
07:28 takle joined
07:28 nickager joined
07:28 <riaqn> OK, then I cann't use things like (a `op` b $ c), where I hope b $ c bind first?
07:29 <merijn> eh...
07:29 <riaqn> hey, I can define op to be infixr 0, right?
07:29 <merijn> if you want b $ c to bind first, why don't you juse write 'a `op` b c'
07:29 <riaqn> it works at least in this case.
07:29 <riaqn> merijn: that would be too complex..I avoid backquote.
07:30 <int-e> There have been some proposals for generalised fixities (I seem to recall a propsal to have fractional fixities as well) but I have never seen much support for any of them... so no you can't do that
07:30 <jle`> not saying that the fixity system is perfect, but binding something looser than $ would throw off a lot of expectations
07:30 <int-e> well, actually, since $ is right associative, you can
07:31 <kadoban> Even if you could, a `op` b $ c where (b $ c) goes first would be *horrible* to read for most.
07:31 <merijn> riaqn: I don't understand what you're saying
07:31 <int-e> <riaqn> hey, I can define op to be infixr 0, right? <--- yes.
07:31 <merijn> riaqn: You give an example where you use backquotes and then say that's to complicated?
07:31 <merijn> I wrote literally the same thing you did, but without the $ and that should do what you want
07:32 <riaqn> merijn: ahh sorry, I wrote backquote just meaning it's infix. But I hope to avoid the backquote.
07:32 <jle`> `op a (b c)` is probably pretty readable if you want to have op not be infix
07:32 mjora7 joined
07:33 <merijn> riaqn: How can op be infix without backquotes
07:33 Wizek joined
07:33 <merijn> It's either an operator or you use backquotes, else it can't be infix anyway
07:33 <riaqn> it's not op.. it's things like :=
07:33 Wizek__ joined
07:34 <riaqn> some EDSL of assembly language.
07:34 <merijn> riaqn: Well, what's the problem with using 'a := b c' then?
07:34 silentoxygen joined
07:35 <riaqn> merijn: sometimes it's a := b $ c d
07:35 not_on_fp joined
07:35 xinming_ joined
07:35 connrs joined
07:35 takle joined
07:36 <glguy> `seq` has very low precedence as surprises go
07:37 Levex joined
07:37 <glguy> `elem` is another surprise
07:38 xtreak_ joined
07:38 baldrick1 joined
07:39 reliability joined
07:41 eSVG joined
07:42 takle joined
07:44 jer1 joined
07:45 whoman joined
07:46 grayjoc joined
07:48 dm3 joined
07:49 takle joined
07:49 Rodya_ joined
07:49 sgflt joined
07:51 zero_byte joined
07:51 Mibaz joined
07:51 <merijn> hvr: ping?
07:51 <hvr> oink?
07:52 ragepandemic joined
07:52 <merijn> hvr: I was looking at your multi-GHC travis thing and it claims to support 8.2.1 prerelease and GHC HEAD, but I'm unsure what Tested-With syntax I need to actually trigger those?
07:53 jedws joined
07:53 <merijn> Doesn't seem to get 6.12.3 either, which supposedly is included in the setup :)
07:54 jer1 joined
07:54 sproingie joined
07:54 <hvr> merijn: 6.12.3 is kinda out of support by now; I should update the docs about it
07:54 <hvr> merijn: as for 8.2.1; just refer to ==8.2.1
07:54 <merijn> I have GHC == 8.2.1 but it doesn't end up generating anything for it
07:54 <hvr> the RCs are packaged in such a way that they smoothly transition to the final release
07:55 <hvr> merijn: which script did you use? the _2.sh one?
07:55 <merijn> No, should I?
07:55 <hvr> yes...
07:55 <hvr> :-)
07:55 mfukar joined
07:55 <glguy> I've been playing with making a demo tool for my configuration language and schema system: https://glguy.net/~pi/result/
07:56 <merijn> As for 6.12 being out of support...I figured, if I'm going out of my way to be stupidly backwards compatible, I might as well include it :p
07:56 <glguy> Uses GHCJS to allow the user to try out the parser in their browser directly
07:56 <hvr> glguy: fwiw, I'm mildly torn between Dhall and config-{schema,values} nowadays :)
07:56 <hvr> (they have totally different tradeoffs, which is why I'm torn)
07:56 <merijn> hvr: -2.hs has a parse error on line 1 :p
07:57 ixxie joined
07:57 <glguy> Dhall doesn't appeal to me at all for configuration, but it certainly looks fun
07:57 <hvr> merijn: you're on Apple
07:57 <merijn> hvr: Yes
07:57 <hvr> merijn: I learned about that issue just yesterday
07:57 ericsagnes joined
07:57 drola joined
07:57 <hvr> merijn: remove the #! line, and compile it via ghc --make or use the .cabal file to generate a binary
07:57 <merijn> oh, I think I can manage this bug :)
07:57 <hvr> I'll probably have to get rid of #! thanks to Clang
07:58 <hvr> (the reason is that Clang's CPP adds whitespace to #!, whcih then causes GHC to not recognise the #! anymore)
07:58 <merijn> hvr: The weird thing is...the old script seems to use the same shebang and does work...
07:58 <hvr> merijn: the old one didn't need -XCPP yet
07:58 <merijn> Well, modulo space
07:59 <hvr> but in order to support Cabal < 2.0 and >= 2.0, I needed CPP
07:59 <merijn> GHC should really just ditch CPP and define it's own preprocessor
07:59 <hvr> merijn: https://ghc.haskell.org/trac/ghc/wiki/Proposal/NativeCpp =)
08:00 <hvr> hrm... I need to update the page
08:00 <merijn> Honestly, cpphs is not big improvement
08:00 <hvr> we'd likely go with 'hpp'
08:00 <mniip> glguy, looks an awful lot like YAML
08:01 <hvr> mniip: it's a more sane YAML-ish syntax
08:01 <hvr> w/ less weirdness
08:01 <mniip> yaml is good enough by me
08:01 <hvr> mniip: then keep using it =)
08:01 <mniip> alrighty
08:01 <glguy> mniip: then you can focus on the schema definition and documentation part of the demo
08:02 <merijn> ok, now it seems to grab 8.2.1 and head too
08:02 WhereIsMySpoon joined
08:02 WhereIsMySpoon joined
08:02 sgronblo joined
08:02 <merijn> hvr: So head is just "8.3.*"?
08:02 <mniip> glguy, so, a value tree walking monad?
08:02 zzz joined
08:03 <glguy> mniip: No, not a monad, but similar
08:03 WhereIsMySpoon left
08:03 <mniip> I see a do, is it ApplicativeDo?
08:03 <glguy> yes
08:03 ErinvanderVeen joined
08:03 campi joined
08:03 <mniip> any particular reason it's not a monad?
08:03 wroathe joined
08:03 <glguy> so that you can extract the structure
08:04 <glguy> like optparse-applicative
08:04 <mniip> ah so it's bidirectional?
08:04 Yuras joined
08:04 LuckyRawApe joined
08:04 bennofs joined
08:04 ErinvanderVeen joined
08:04 <mniip> right that makes sense
08:04 nickolay_ joined
08:05 <merijn> hvr: Also, is there a way to selectively disable the "--enable-benchmarks" flag? I need it disabled for old cabal versions, because old cabal is stupid
08:05 <glguy> The generated .travis.yml has one env section for each compiler
08:05 <glguy> where you can turn off benchmarks
08:06 Elhamer joined
08:06 <merijn> oh, wait
08:06 <hvr> merijn: that's why there is a env-variable provided in the generated template; you can set/override it in the per-version matrix config
08:06 <merijn> the new one already seems to disable benchmarks
08:06 <merijn> \o/
08:06 Orion3k joined
08:07 <glguy> mniip: also beyond Yaml it distinguishes quoted strings from unquoted "atoms" so you can use them like an enumeration
08:07 acidjnk22 joined
08:07 <merijn> I basically just uncomment the env entries, right?
08:07 Itkovian joined
08:07 eklavya joined
08:07 <glguy> The string "default" can be distinct from a special atom default
08:07 <glguy> (for example)
08:07 <mniip> sounds like an insignificant encoding perk
08:08 <glguy> No, it turns out to be quite useful
08:08 thc202 joined
08:08 <glguy> and helps avoid common errors in yamls permissive coersions
08:09 <ph88^> Gurkenglas, the thing with catchC and handleC is that it will continue the conduit (you can just change the flow depending if there was an exception or not) .. in my case i would like the conduit to stop and print to stderr. snoyberg suggested that i rethrow the exception with my own message attached to it (possibly as my own exception type)
08:10 <merijn> Actually, seems it might be moot. if I understand the new travis script correctly it always uses cabal-install-head, which already fixes my issue anyway :)
08:10 fkurkows1 joined
08:10 <glguy> hvr: is the travis script self-hosting yet?
08:10 <glguy> ^_^
08:10 <hvr> glguy: what'ya mean by self-hosting? :)
08:10 <merijn> hvr: Presumably testing itself :p
08:10 <glguy> It should be used to build itself on travis
08:11 <hvr> heh
08:11 <hvr> soon!
08:12 <merijn> Fingers crossed, time to see on how many GHC's it's broken
08:12 Elhamer_ joined
08:14 alqatari joined
08:15 <glguy> hvr: if you do use dhall for something I'd be interested to see it
08:20 filterfish joined
08:23 <Mibaz> Any Netwire gurus around?
08:23 juanpaucar joined
08:24 wroathe joined
08:24 <merijn> Mibaz: I think he's on later in the day. Also, pretty sure netwire has been deprecated for wires
08:24 freusque joined
08:25 <Mibaz> merijn: Ok thanks. And is "wires" a different module?
08:25 <merijn> Mibaz: https://hackage.haskell.org/package/wires
08:27 jer1 joined
08:28 <Mibaz> merijn: Thanks a lot. Is wires the best FRP implementation to use, in your opinion?
08:29 <merijn> Best strongly depends on what you're trying to do
08:29 torstein joined
08:30 <Mibaz> merijn: definitely does.
08:32 deresz joined
08:33 oish joined
08:36 ninedotnine joined
08:37 lep-delete joined
08:37 kamyar joined
08:38 abroz joined
08:38 <kamyar> Hello guys!
08:38 <kamyar> I have a stack question
08:38 <kamyar> anyone here to answer?
08:38 <electrocat> kamyar: don't ask to ask
08:38 <electrocat> just ask ;)
08:39 <kamyar> electrocat: Ok! it is because sometimes people say 'I dont know anythin about x'
08:39 Difteria joined
08:39 <kamyar> I want to move my lts-8.12 to lts-8.14
08:39 <kamyar> Do I have to redownload all packages and install all packages with --resolver option?
08:40 Bassetts joined
08:40 <electrocat> move what exactly?
08:40 <merijn> How do I find out which GHC version first supported a given extension?
08:40 <kamyar> electrocat: I wanna migrate, sorry for choosing bad word
08:41 <electrocat> kamyar: migrate what? a project of yours?
08:41 <kamyar> I have a working project on stackage 8.12 and wanna upgrade it to stackage 8.14 for some reason
08:41 tomphp joined
08:41 Cooler joined
08:41 <kamyar> electrocat: Is tehre any single command to migrate?
08:41 <electrocat> kamyar: just change the version in the stack.yaml file
08:42 <kamyar> electrocat: The required dependencies wiill eb downloaded automatically? Like Maven?
08:42 <electrocat> yeah stack will do all that kind of work for you
08:42 <kamyar> electrocat: Wow! I thought the .stack directory is the inventory for packages
08:42 <kamyar> electrocat: I mean ~/.stack
08:43 <electrocat> it is, but it can hold multiple versions
08:43 xcmw joined
08:43 <electrocat> of the same package
08:44 jer1 joined
08:44 <kamyar> You mean stack will check project fodler first and then .stack?
08:45 danthemyth joined
08:45 <kamyar> electrocat: ?
08:46 <electrocat> no ~/.stack holds everything related to dependencies
08:46 <electrocat> for every project
08:47 <electrocat> so it can reuse compiled packages over multiple projects
08:47 dalek_ joined
08:47 <kamyar> electrocat: But dependencies are packages by themselves
08:47 <kamyar> electrocat: Why not to save them beside the main project?
08:48 <kamyar> electrocat: I am familiar with Python (+venv) and Ruby (gem, bundle) ecosystem of build
08:48 <electrocat> so they can be shared across multiple projects
08:48 <kamyar> electrocat: Which of them are more similar to haskell's?
08:48 <kamyar> electrocat: So the .stack directory is similar to site-packages of python
08:49 <electrocat> possibly, i don't know that much about other package ecosystems
08:50 <kamyar> electrocat: Python tries current project (venv) at first and then tries site-packages,
08:50 JuanDaugherty joined
08:50 <kamyar> electrocat: So if the same dependency exists in site-packages, it does not redownload it
08:50 ErinvanderVeen joined
08:50 <kamyar> electrocat: Except when the version differs
08:51 tromp joined
08:51 <Saizan> kamyar: afaiu
08:51 shayan_ joined
08:51 sjpet joined
08:51 <kamyar> Saizan: u=use?
08:51 <electrocat> ah, i see, stack is quite similar in that regard
08:51 <Saizan> kamyar: you could just try and see what happens when you change the version in your .yaml file
08:51 Rodya_ joined
08:52 <electrocat> well yes, the point of stack is that you don't really have to worry about dependencies :p
08:52 <kamyar> electrocat: Son in compare with Ruby ecosystem, I guess cabal=gem and stack=bundle
08:53 <kamyar> Does cabal do the same thing or not?
08:54 <kamyar> electrocat: I just used stack since I noticed stack is bacisally created to resolve cabal lacks and shortages
08:54 <maerwald> like what?
08:54 <kamyar> electrocat: But I am not master at them
08:54 <bennofs> kamyar: cabal supports sandboxing since quite some time
08:54 <kamyar> maerwald: You are talking to me?
08:55 <sjpet> is there something like a deep <- that can be used in do notation?
08:55 <bennofs> kamyar: a major difference I can think of in terms of featuresis that cabal doesn't manager ghc versions for you though
08:55 <maerwald> yeah
08:55 <sjpet> to bind an IO (IO a)
08:55 <sjpet> for example, I have a function myFunction :: [MyType a] -> IO a
08:55 <kamyar> maerwald: I mean cabal-install in fact not cabal itself since stack uses cabal package internally
08:55 <sjpet> what if my a is an IO b?
08:56 <Myrl-saki> :: IO a -> IO [Maybe a]
08:56 <kamyar> maerwald: And the point bennofs told! I wanna use GHC 8.0.2 not GHC 7
08:56 <Myrl-saki> how
08:56 <electrocat> kamyar: cabal doesn't handle dependencies very well and doesn't have stable snapshots of packages, sandboxes kindof solve that problem but not entirely. stack just does all of that a lot better
08:56 <bennofs> kamyar: ? you can use ghc 8.0.2 with cabal but you'd need to install it some other way
08:56 <maerwald> kamyar: you want multiple GHCs or just one?
08:56 <Myrl-saki> Whoops.
08:56 <Myrl-saki> :: [IO a] -> IO [Maybe a]
08:56 <bennofs> electrocat: you can use stackage with cabal though
08:57 <electrocat> bennofs: good point
08:57 felixsch_ joined
08:57 <kamyar> maerwald: I need multiple GHC for multiple projects in fact
08:57 <bennofs> electrocat: just drop the cabal.config provided by stackage into your project and you should be fine
08:57 <Myrl-saki> (Yes, that is pretty much `select` in C.
08:57 <kamyar> Another problem
08:57 <kamyar> Has anyone used INtellijIDEA for haskell here? I mean the plugins
08:58 <sjpet> I have
08:58 <jle`> sjpet: you can always use join :: IO a -> IO a, but there might be a more natural way too
08:58 <kamyar> I am currently using HaskForce, is tehre any other better one out?
08:58 <jle`> Myrl-saki: (fmap . fmap) Just . sequence ?
08:58 <hvr> electrocat: I think you drank too much koolaid ;-)
08:59 <sjpet> kamyar: I've tried two, one was pretty bad, let me check which one I stuck with
08:59 <electrocat> hvr: koolaid? o.O
08:59 <merijn> Cabal handles dependencies just great, it's developers who don't :)
08:59 <maerwald> merijn++
08:59 <kamyar> sjpet: My problem is that HaskForce does not support stack fully!
08:59 takle joined
08:59 <bennofs> kamyar: you can use multiple ghc versions with cabal as well
08:59 <kamyar> sjpet: You can create stack project but when trying to run on IntellijIDEA you have to use caba
09:00 <maerwald> people think it's a tool problem and add more abstraction for something that is not actually a tool problem
09:00 <bennofs> kamyar: just install them, and pass them to cabal configure -w ghc-$VER
09:00 <sjpet> kamyar: Yeah, HaskForce has it's problems, but it worked better than that other one
09:00 <hvr> electrocat: you seem to consider Stack to way superior to cabal in a way that sounds exagerated :)
09:00 <Myrl-saki> jle`: lol
09:00 <electrocat> merijn: not sure if i agree, installing two packages with different requirements for dependencies can often fail
09:00 bjz joined
09:00 yellowj joined
09:00 <bennofs> electrocat: cabal has sandboxes
09:01 <bennofs> electrocat: and in the future, new-build
09:01 <kamyar> sjpet: Yes! BUt the plugin named "Haskell" has been downloaded more! Maybe since it is older
09:01 <merijn> electrocat: Well yes, if those requirements contradict each other, there is no solution to the dependencies. This can happen in exactly two scenarios: 1) wrong bounds set by developers or 2) incompatible packages
09:01 <kamyar> electrocat: bennofs is cabal's advoctae! :)
09:01 <kamyar> advocate I mean
09:02 <electrocat> hvr: it just makes my life so much easier :p
09:02 <* hvr> leaves the defense to bennofs then
09:02 <maerwald> electrocat: that's mostly because of a) unmaintained packages (there are a lot) and b) upper bounds which are just bad, see https://thefeedbackloop.xyz/thoughts-on-dependency-hell-is-np-complete/
09:02 <bennofs> kamyar: sorry, just trying to point out what cabal features are nowadays because IMO there's a lot of outdated/ inaccurate info out there :) I don't particularly care myself if people use cabal or stack :D
09:02 Levex joined
09:02 <Myrl-saki> jle`: Types are not enough to explain this, I guess.
09:02 <sjpet> jle`: Thank you. really, hoogling for that should've been my first thought, dunno why it didn't occur to me
09:03 <jle`> * join :: IO (IO a) -> IO a, sorry
09:03 <kamyar> bennofs: Just kidding! Bu in fact what made me migrate was GHC versioning. At least your point is not well documented in cabal world! So I wuickly migrated to stack
09:03 <kamyar> quickly
09:03 <hvr> maerwald: if you consider upper bounds bad, then you're basically ok w/ letting cabal pick random install-plans
09:03 <maerwald> hvr: nah, I'm saying the solution is something else
09:04 <maerwald> there are some proposed solutions in that link
09:04 <hvr> maerwald: but the solution isn't stackage eitehr
09:04 <electrocat> sure, supporting multiple versions would also solve that issue, sandboxing does that for us, but i dont want to recompile everything for every project
09:05 <bennofs> kamyar: yeah, I agree that stack is a lot more "user friendly" in that a) I feel its command line interface is easier to use (although I cannot actually say why :D) and its docs feel a bit better thus more works "out of the box". cabal-install has more ways to shoot yourself into the foot
09:05 <merijn> bennofs: Last time I looked at stack I got confused about how to make the CLI do what I wanted, so I just gave up, so that's debatable at best
09:06 <bennofs> merijn: yes, me too. stack works better for simple use cases out of the box, if you want something concrete and know exactly what you want, cabal is often easier
09:06 wroathe joined
09:06 pie_ joined
09:06 <hvr> maerwald: anyway, that link is interesting; *adding it to my literature research list*
09:06 takle joined
09:06 <merijn> bennofs: I thought stack worked better for complex use cases, as I consider my usecases pretty simple
09:07 eklavya joined
09:07 Kreest__ joined
09:08 <maerwald> hvr: releases/branches are a solution that has been used in distros for a few decades now and it works well with proper maintenance (as in: no version dependencies). I don't see how that would work on something like hackage though. It basically moves the "version selection problem" to the packaging stage
09:08 <bennofs> merijn: hmm. I think the difference is that stack is way more opinionated which leads to less ways to screw up but also less flexibility / may make it hard to use if you want full control
09:08 <maerwald> and it needs a lot of manpower
09:08 <merijn> bennofs: It also requires a fair amount of "setup" in terms of projects, etc. to get simple things working
09:09 <hvr> maerwald: hackage actually does something that I consider to be in a local optimum; but we need better tooling (which I'm working on)
09:09 grizwako joined
09:09 halogenandtoast joined
09:09 TheFuzzball joined
09:09 <hvr> maerwald: and there's something to having two "channels" I'm also working on
09:10 <hvr> +distribution channels
09:10 <bennofs> merijn: hmm are you talking of new projects or starting on an existing project? do you have examples of the setup required?
09:10 takle_ joined
09:10 <merijn> bennofs: my quick hack projects, patching existing packages, etc.
09:11 prophile joined
09:11 jer1 joined
09:11 garphy`aw joined
09:12 takle joined
09:12 <bennofs> merijn: patching existing packages seems to be harder with cabal? at least if you don't use the user db
09:12 Reshi joined
09:12 jaspervdj joined
09:12 <merijn> bennofs: huh, is there anyone who doesn't use the user db?
09:12 <hvr> new-build
09:12 <bennofs> merijn: sandboxing?
09:12 <merijn> I never ever installed something globally with cabal
09:13 takle joined
09:13 <merijn> I use sandboxing nowadays, but even before that existed almost no one use the global db
09:13 <merijn> hvr: I only just have a GHC and cabal that support it and I don't know how to actually use it :p
09:13 <bennofs> merijn: if you use sandboxing you don't use the user db
09:13 <hvr> bennofs: patching packages w/ cabal new-build is just a matter of 'cabal unpack'ing them, patching em, and pointing cabal.project to them
09:13 <maerwald> hvr: I think the main problem is about how people understand the dependency version spec. A lot of people write down upper bounds based on what they have tested, not based on what is actually the known case. I only add upper bounds when a) I know it doesn't build with later versions and b) I can't be bothered to fix it in a timely manner
09:13 <merijn> bennofs: I've used cabal for years before sandboxing existed :p
09:13 <maerwald> mostly I just do b) and still have no upper bounds
09:14 <hvr> maerwald: writing down upper bounds on what they know to work is the proper way
09:14 <maerwald> (as in: just fix it)
09:14 <hvr> maerwald: that's the whole point of semver et al
09:14 louispan joined
09:14 <maerwald> well, that's not how rolling release distros do it
09:15 <maerwald> you add upper bounds when you get build failures
09:15 <hvr> but that's how the hackage/cabal ecosystem is designed and optimsed for ;)
09:15 <hvr> maerwald: that's too late
09:15 <maerwald> and I think that's a wrong decision, which is why we end up with the dependency problem
09:15 <hvr> maerwald: if everybody did it that way, we'd always fluctuate into breakage on hackage
09:15 <maerwald> not if you have channels
09:15 <hvr> maerwald: as there's a) a response latency invovled with detecting the breakage
09:16 <hvr> which sometimes doesn't even result ina build failure
09:16 <hvr> but the code just behaves wrongly even though it compiles
09:16 <bennofs> merijn, hvr: I think one advantage of stack is simply that it is "new", so if you google "stack XXX" you're probably getting the right way (TM) to do XX in stack, while with cabal you're likely to end up on 3 year old SO posts that are out of date right now :)
09:16 <hvr> maerwald: different major versions of a package are to be treated like different packages; the only thing they share formally is the package name
09:17 <hvr> maerwald: that's the whole premise of semver
09:17 <merijn> btw, are Hackage candidates publically visible? i.e. if I upload a candidate + docs can I have people sanity check the docs?
09:17 <hvr> merijn: yes
09:17 <maerwald> hvr: that's implemented via slots in some distros, so you can still have a dependency that says "all slots"
09:17 <hvr> merijn: that's the point of them :) to share prereleases
09:17 <maerwald> unless you know it only works with one of them
09:18 <bennofs> maerwald: how is stackage different from channels?
09:18 <maerwald> bennofs: is it rolling?
09:18 <bennofs> maerwald: stackage nightly?
09:18 <electrocat> I'm quite suprised quite a few people here still vouch for cabal-install
09:18 bjz joined
09:18 <hvr> maerwald: well, that's what we got --allow-newer for; you can opt out of the known-to-work domain
09:18 mjora7 joined
09:18 <maerwald> bennofs: then that could be called a channel
09:19 <hvr> maerwald: we just have a different way to accomplish what other ecosystems do via e.g. slots
09:19 <maerwald> hvr: well no, because I never know if someone meant "it DOESNT work with later version" or just "I don't know if it works with late versions", so --allow-newer doesn't do what I want
09:19 <bennofs> electrocat: I actually use both, stack when I don't care and cabal when I need more control
09:20 <hvr> maerwald: there's been discussions to add the distinction between hard/soft bounds to the .cabal syntax
09:20 <electrocat> bennofs: could you give an example of needing more control
09:20 <maerwald> hvr: that could be interesting
09:20 <merijn> ugh, one pet peeve left over, beating haddock into adding a kind signature :\
09:20 <maerwald> but that would basically be an "emulation" of channels
09:21 <maerwald> I am still of the opinion this problem cannot be solved just by tooling, it needs a proper platform, workflow and people dedicated in doing the work
09:21 <hvr> maerwald: but tbh, I think that maintainers are already having a hard time using the current system, increasing the expressivity would only set the bar of the information matinainers need to provide higher
09:21 <merijn> Is there a way to have a module's haddock "intro" be shared with cabal's description so I don't have two maintain two pieces of text separately?
09:21 <bennofs> electrocat: it is easier to use cabal-install when you already have a GHC with the correct packages installed (through other ways, such as nix) than coercing stack into using the packages from GHC
09:22 kamyar joined
09:23 Yuras joined
09:23 <hvr> maerwald: fwiw, .cabal 2.0 has learned a new operator '^>=' which is currently just syntax sugar, but one can conceive a way to infer some additional knowledge from it
09:23 cspollard joined
09:23 <ongy> wouldnt ^<= be the more interesting one?
09:23 <hvr> and have e.g. a specific variant of --allow-newer that aacts only on ^>=
09:23 <electrocat> bennofs: ah very true, that's why i use stack for everything haskell related
09:23 BartAdv joined
09:23 <bennofs> maerwald: I'm still not understanding how stackage is not what you want?
09:24 <hvr> ongy: what would it mean?
09:24 <ongy> hvr: that seems more intuitive for less then, but may be more
09:24 <maerwald> bennofs: I'm not even disagreeing, maybe only on details. It's one solution to the dependency problem
09:24 <bennofs> maerwald: I don't think there are a enough resources to have more than one stackage
09:25 <hvr> ongy: it's inspired by the "caret operator" you see in e.g. npm or other package managers; ^>= 1.2.3 then means, allow versions API compatible w/ 1.2.3
09:25 gargawel joined
09:25 <bennofs> hvr: ^<= X could mean "defintely doesn't work with newer than X"
09:25 louispan joined
09:26 <hvr> bennofs: that's what <X already would convey
09:26 juanpaucar joined
09:26 <maerwald> then we have --allow-newer and --really-allow-newer xD
09:26 <hvr> maerwald: we can bikeshed names
09:26 <bennofs> hvr: but the other approach also sounds interesing. if I understand correctly, you meant that --allow-newer would only *ignore* those new bounds, and not the other ones?
09:27 <bennofs> ("act on" was ambiguous. does it rely on them for solving or is it ignoring them? :)
09:27 wroathe joined
09:27 <hvr> bennofs: so if you warite '>= 1.2.3 && < 1.3' you'd provide hard-bounds; but if you say '^>= 1.2.3' you say I know this works w/ 1.2.3 and nothing more
09:27 mmn80 joined
09:27 TheFuzzball joined
09:27 <cspollard> is there a general way to do (MonadTrans t, MonadTrans f, Monad m) => (f m a -> m b) -> t (f m) a -> t m b ?
09:27 marfoldi joined
09:27 <cspollard> it seems this should exist already somewhere!
09:28 <cspollard> maybe MonadTrans is not the correct class
09:28 <hvr> bennofs: (the 'nothing more' refers to knowledge)
09:28 <bennofs> hvr: ah ok so ^>= 1.2.3 would replace the current >= 1.2.3 && <1.3 PVP
09:28 <bennofs> hvr: makes sense
09:29 kamyar joined
09:29 jer1 joined
09:29 <hvr> bennofs: yeah; and w/ a variant of allow-newer which only acts on ^>= relations
09:29 <maerwald> ideally, there should be NO difference between tested versions and hard-bounds
09:29 <maerwald> everything else means the maintainer was lazy
09:29 <bennofs> hvr: like --allow-unknown or something ?
09:29 simukis_ joined
09:30 <bennofs> (to allow versions where we don't know if it works)
09:30 <hvr> bennofs: I don't have a concrete bikeshed name for it... whatever name makes sense :)
09:30 <bennofs> cool
09:30 inad922 joined
09:30 <hvr> bennofs: the point being is that it's very useful information to know which versions a package has been vetted by its author to be compatible with
09:31 <hvr> bennofs: as form that you can infer a lot
09:31 <hvr> and there's some related machinery I'm working on to increase the amount of additional knowledge you can infer from that
09:31 <maerwald> what I'd find more interesting is an "alarm system" that would tell me that some library maintainer bumped a version which broke my package (at compile time)
09:32 ixxie joined
09:32 cloudhead joined
09:32 ertes-w joined
09:32 <maerwald> as in: the CI doesn't just test the package, but also reverse dependencies
09:32 asthasr joined
09:33 xall joined
09:33 <hvr> maerwald: to some degree that's what the matrix-builder will help with
09:33 <maerwald> if it breaks a lot, it could be put automatically into an "unstable" channel
09:33 <hvr> as I plan to hook it up to the hackage candidate feature
09:33 nglsr joined
09:34 mekeor joined
09:34 <merijn> hvr: Is there a cabal new-build write up somewhere, btw?
09:35 <merijn> Interesting...
09:35 <merijn> I'm panicing 7.4.2, apparently...
09:35 <maerwald> hvr: and in turn, it would be interesting if the library maintainer would be able to keep track of the progress of people fixing their packages to work with his new version
09:35 xtreak joined
09:35 <maerwald> this is all done manually via bug reports and trackers in rolling release distros
09:37 <maerwald> and when the amount of packages which are still broken is very low, it can be discussed if the package is moved to the stable channel, triggering a new CI run first
09:38 tomphp joined
09:38 <hvr> maerwald: otoh, I wouldn't put a package in unstable if it clearly signalled the breakage via the appropraite version increment
09:38 <hvr> that's what version bounds are for... ;)
09:38 <maerwald> and I want to get rid of them ;)
09:39 <hvr> then we have diametral design goals
09:39 <maerwald> only partly
09:39 kritzcreek joined
09:40 <hvr> I want correctness, and a way to encode that at the package-level declaratively
09:40 <hvr> and semantic versioning is currently the best tool I know to accomplish that
09:40 <maerwald> yes, but only hard bounds that are _true_ are "correct"
09:40 netheranthem joined
09:40 <hvr> as otherwise you'd have to vet *every* single new version
09:41 <hvr> or fly blind and detect breakages only in production in the worst case
09:41 <maerwald> so when lens is bumped and breaks 1000 packages, it MUST be put in unstable, unless maintainers either a) fix their packages to work with the new version as well or b) add true upper bounds
09:41 <hvr> what does 'lens is bumped' mean?
09:41 <maerwald> version bumped
09:41 <hvr> which kind of version bump? are we talking minor or major?
09:42 <maerwald> both
09:42 <hvr> well, a major bump that breaks 1000 packages is no reason to put it in unstable
09:42 <hvr> unless you're assuming a stackage-snapshot model
09:42 <maerwald> it is, because I assume that people add no upper bounds
09:42 <hvr> where each channel contains exactly one version of each package
09:43 <maerwald> no no
09:43 <hvr> maerwald: ok, but then we don't need any versioning scheme whatsoever, just use timestamps instead of version numbers, or natural numbers
09:43 <hvr> as then there's no need for any kind of structure in the versioning system
09:43 xtreak joined
09:43 <maerwald> I am basically projecting something similar to the gentoo/exherbo/sabayoon rolling release model to hackage
09:44 <maerwald> I think we are misunderstanding slightly
09:44 <hvr> but that's a totally different paradigm
09:44 <Athas> Those have only one "current version", right?
09:44 <maerwald> no
09:44 <hvr> a rolling rleease system pays almost no attention to version numbers
09:44 <Athas> Right, that's what I mean.
09:44 <maerwald> yes it does
09:44 <Athas> Gentoo didn't last time I used it (in 2007), and surely nothing can change in ten years.
09:44 <maerwald> hvr: it depends which one, I'm not talking arch linux
09:45 <merijn> bollocks...
09:45 <hvr> maerwald: ok, how would rolling systems take into account version numbers?
09:45 <hvr> merijn: btw, the cabal user guide isn't enough of a writeup?
09:45 <merijn> Does anyone know how I can investigate why GHC7.4.2 would be panicing on some fairly simple code
09:45 <maerwald> hvr: as I said: upper bounds still exist, but are only used for "we know it doesn't work with later versions"
09:45 <merijn> hvr: I dunno? I think I keep getting the old one when I google stuff
09:45 <maerwald> and when that happens, people put a lot of effort into fixing that problem, in order to remove the upper bounds
09:46 <maerwald> because they know it's problematic for the dependency solver
09:46 <hvr> merijn: http://cabal.readthedocs.io/en/latest/nix-local-build-overview.html
09:47 <maerwald> hvr: and the process of detecting real upper bounds, fixing reverse dependencies and so on is something that can be improved with tooling, CI, platform and so on. A lot of that can be automated
09:47 <maerwald> and still be _rolling_, not freezing releases
09:47 <hvr> maerwald: yes, much can be automated, but not all.
09:48 wroathe joined
09:48 <hvr> maerwald: especially, you can't automate detecting semantic incompatilities
09:49 <maerwald> run the test suite? :P
09:49 <hvr> (unless we encode those at the type-level...)
09:49 noan_ joined
09:49 <hvr> maerwald: not feasable for matrix-builder due to the combinatorics invovled
09:49 <hvr> I've thought about it, but matrix-builder won't be able to ever run th4em
09:50 <maerwald> you're basically concerned about some library changing the behavior of IO code in a fundamental way without renaming the function but just bumping major version?
09:50 <hvr> maerwald: yes, not the least, because I do that sometimes
09:50 Rodenbach joined
09:50 <hvr> (and I bump major versions for that)
09:50 jgt1 joined
09:50 <hvr> but not only IO code
09:50 <hvr> even pure functions
09:51 <maerwald> well, I think people in the C/C++ world are more strict about those things and don't do it
09:51 jer1 joined
09:51 <hvr> yes, because they don't have a version policy and constraint solving and declarative version bounds
09:51 <maerwald> which is why distros don't randomly break, although they run very different combinations of software
09:51 <hvr> but in a semver world, you have the tools to signal such breakage
09:52 <hvr> so you don't have to cripple yourself when evolving your API
09:52 <Athas> C/C++ people also tend to use far fewer (but bigger) libraries, which means you don't need to be as careful about versioning policies.
09:52 <maerwald> but then you have to deal with upper bounds, np-complete, add more tools to manage that mess etc ;)
09:53 Rodya_ joined
09:53 <hvr> maerwald: well... I guess cabal's solver is quite great at tackling the np-completeness of version constraint solving :-)
09:53 <Athas> Pretty sure my moderately-sized Haskell project has at least a 100 (transitive) dependencies, and I'm not even using any of the big lens-hierarchies.
09:53 Younder joined
09:53 <merijn> ugh, 7.4 dies on my DataKinds usage :\
09:53 <hvr> maerwald: otherwise matrix-builder would be always stuck in the solving phase ;-)
09:53 <hvr> merijn: that sounds plausible... there were a few bugs in there back then
09:54 <merijn> Is it ok for package to expose a different interface for different GHC versions via e.g. CPP?
09:54 sproingie joined
09:54 <Younder> It is hard to take a math lanuage serios if it makes it so hard to use matrixes and vectors
09:54 <merijn> I can probably ifdef out my DataKinds usage and replace it with regular phantoms, but that means the API isn't quite exactly the same for 7.4
09:55 <hvr> merijn: it's not ideal; but it's tolerable if you can't do it differently; the downside is that it may force consumers to mirror the CPP
09:55 <Athas> Is it important to support 7.4?
09:55 <merijn> Athas: No, but it's trivial to do :p
09:55 <hvr> merijn: it's tolerable because the GHC version is part of the static compile environment, so it doesn't cause too big problems
09:56 oisdk joined
09:56 <merijn> hvr: Well, basically the only real change is that a single ADT gets dropped and some of it's DataKinds uses just get replaced with phantoms
09:56 <merijn> So the same code should still be valid, even without the DataKinds, so consumers shouldn't need CPP I think
09:56 jutaro joined
09:57 Orion3k joined
09:57 Guest40398 joined
09:57 <hvr> merijn: what's less ok is if your package API becomes dependent on the version of another dependency which then appears to be a hidden degree of freedom of your API
09:57 <hvr> merijn: that causes real bad problems on Hackage
09:57 fotonzade joined
09:58 <Guest40398> purely functional language
09:59 harfangk joined
10:01 <maerwald> hvr: I don't like it... we're breaking the "it compiles, so it works" with that philosophy :( and then we build a safeguard around that so people don't get to compile code that compiles, but doesn't work
10:01 <maerwald> but that's just me
10:01 <maerwald> (wrt the semver stuff discussion)
10:02 <hvr> I'd argue it's the other way round, SemVer gives you the formal basis for 'it compiles, so it works'
10:02 kamyar joined
10:02 <maerwald> well, unless you use --allow-newer :P
10:03 <hvr> yeah... because you're disabling the safe-guard and deliberatly ignoring compatiblity information
10:03 sordina1234 joined
10:04 <maerwald> yeah, that's what I mean... it's a safeguard
10:04 <hvr> I mean, there is different ways to rome
10:04 <maerwald> I think we understand each other
10:04 <hvr> the SemVer paradigm is one way to address it
10:04 romank joined
10:04 <hvr> but there's also different schemes that would work w/ different tradeoffs
10:05 <maerwald> yeah and it's probably not practical to try to change the paradigm. The ecosystem is too far into it
10:05 yellowj joined
10:06 <hvr> and it's not like that the current scheme wouldn't work at all.. :-)
10:06 <hvr> personally I don't experience all that cabal hell many talk about
10:06 WhereIsMySpoon joined
10:06 WhereIsMySpoon joined
10:06 takle joined
10:07 <maerwald> me neither, just with a few packages that are undermaintained
10:07 <maerwald> and those usually also fail at compile-time with --allow-newer
10:07 <maerwald> very hard
10:07 xtreak_ joined
10:07 halogenandtoast joined
10:07 <hvr> the biggest problem is undermaintained packages which the package author doesn't want to pass on
10:08 louispan joined
10:08 <hvr> as those will effectively force you to fork or vendor them
10:08 <hvr> (or not use them at all)
10:09 wroathe joined
10:10 ub joined
10:10 sgronblo joined
10:11 jer1 joined
10:11 WhereIsMySpoon left
10:11 freusque joined
10:13 pie_ joined
10:17 Tene joined
10:17 Tene joined
10:19 thimoteus joined
10:20 Swizec joined
10:21 qwertydvorak joined
10:22 afldcr joined
10:22 Enigmagic joined
10:23 zv joined
10:24 phaji_ joined
10:24 petermw joined
10:26 saurabhnanda joined
10:28 takle joined
10:30 juanpaucar joined
10:31 xcmw joined
10:31 twanvl joined
10:32 jer1 joined
10:33 petermw joined
10:33 jcjustjc joined
10:34 ragepandemic joined
10:35 saurabhn_ joined
10:35 ErinvanderVeen joined
10:36 Levex joined
10:40 louispan joined
10:41 coot____ joined
10:42 jacereda joined
10:43 <jacereda> how can I tell stack to use a package version newer than the one in the plan?
10:43 nighty-- joined
10:43 davr0s joined
10:43 <jacereda> I tried with `extra-deps` but didn't work
10:43 <quchen> jacereda: Add it to your stack.yaml
10:44 <jacereda> quchen: where?
10:44 jer1 joined
10:44 <quchen> jacereda: Hold on, looking for an example
10:44 <merijn> hvr: This should be fine, right? https://github.com/merijn/broadcast-chan/blob/master/BroadcastChan.hs#L51-L71
10:44 <quchen> jacereda: The extra-deps entry: https://github.com/quchen/prettyprinter/blob/master/stack-older-snapshots.yaml
10:45 <quchen> jacereda: In my case, this adds something that wasn’t in the snapshot before, but you can also override packages this way.
10:45 <quchen> jacereda: Here I’m overriding packages with local ones, https://github.com/quchen/stgi/blob/wl-pprint-dependency-rewritten/stack.yaml
10:45 Hunter1 joined
10:45 danthemyth joined
10:46 <jacereda> quchen: I've added dependencies not in the snapshot before and it worked fine, but in this case there's already an old version in the snapshot
10:46 <merijn> Let's see if my testing finally goes green :>
10:46 Gloomy joined
10:50 <jacereda> quchen: ok, I'll try using the second approach, thanks!
10:50 ErinvanderVeen joined
10:50 gawen joined
10:50 wroathe joined
10:52 torstein joined
10:53 gmcabrita joined
10:53 abroz joined
10:54 Yuras joined
10:57 Elhamer joined
10:57 torstein joined
10:58 oisdk joined
11:00 Faucelme joined
11:00 _deepfire joined
11:00 danthemyth joined
11:01 danthemyth joined
11:01 <Jinxit> what are the benefits of having a newtype instead of just type?
11:01 <Jinxit> and drawbacks
11:02 pookle42 joined
11:02 Snircle joined
11:02 <phadej> type doesn't add any type-safety, only convenience
11:03 mattyw joined
11:03 <phadej> type Km = Int; type Mile = Int; and you can still add kilometers and miles
11:04 <phadej> with newtypes you couldn't. The drawback, is that you have to write some amount of boilerplate (instances etc. though GeneralizedNewtypeDeriving helps a lot)
11:04 <Jinxit> ah
11:04 <Jinxit> thanks
11:04 felixsch__ joined
11:04 tabaqui joined
11:05 <Jinxit> so when i see newtype used plainly for aliasing it might as well use type?
11:05 mattyw__ joined
11:06 <phadej> `type` is useful to make complicated type signatures less complicated; if that is what you mean by aliasing: then yes.
11:06 <Jinxit> yeah okay
11:06 <phadej> but type Age = Int is most likely just programmer laziness
11:07 <phadej> yet `type State = StateT Identity` makes type-signagures simpler
11:07 fendor joined
11:07 <phadej> and you cannot really have newtype there (it won't make sense)
11:08 <Jinxit> the one i saw was "newtype TypeEnv = TypeEnv (Map.Map Var Scheme)"
11:08 Hunter1 joined
11:08 <phadej> Jinxit: that's a good use of `newtype`. TypeEnv is more then a map from vars to schemes
11:09 TheFuzzball joined
11:09 <phadej> as there can be maps from vars to schemes which aren't typeenvs
11:09 <phadej> which you don't want to mix
11:09 _paul0 joined
11:10 <phadej> another way to see it, newtype creates a layer of abstraction; if you talk about Age you don't care how it's implemented
11:10 <Jinxit> to me it's such a specialized type that i doubt it'll reappear
11:10 <Jinxit> that's a better argument though
11:11 <Jinxit> means it doesn't necessarily have to be a Data.Map
11:12 Bassetts joined
11:12 fotonzade joined
11:12 jer1 joined
11:12 matrium joined
11:13 <phadej> Jinxit: especially it's important i`type e Var = String` and `type Scheme = Either ... `
11:14 _ashbreeze_ joined
11:14 sepp2k joined
11:14 cpennington joined
11:14 <Jinxit> not sure i follow
11:14 <matrium> Hi, I just don't get how to use NonNull from mono-traversable. How can I construct a singleton of it?
11:14 <phadej> Jinxit: if you have `type TypeEnv = Map Var Scheme`, and `type Var = String` and so one, than `TypeEnv` isn't a specialised type at all
11:14 sz0 joined
11:15 <phadej> it's a map from strings to (maybe other map or list)
11:15 joakim` joined
11:16 <Jinxit> ah, because it cascades down
11:16 <Jinxit> i see
11:16 <Jinxit> then yeah you're right, it matters
11:16 <phadej> matrium: https://www.stackage.org/haddock/lts-8.14/mono-traversable-1.0.2/Data-MonoTraversable.html#t:MonoPointed
11:17 zargoertzel joined
11:17 mattyw joined
11:18 Levex joined
11:20 bjz_ joined
11:20 <joakim`> /?
11:21 eklavya joined
11:21 oish joined
11:22 mohsen_ joined
11:22 takle joined
11:24 inad922 joined
11:24 <matrium> phadej: Thanks! That's what I was looking for!
11:24 locallycompact joined
11:25 jimmyrcom_ joined
11:26 locallycompact joined
11:27 _ashbreeze_ joined
11:28 jcjustjc joined
11:28 locallycompact joined
11:28 _sras_ joined
11:29 <_sras_> What exactly happens when a "OVERLAPPING" local pragme resolves an overlapping instance situtation?
11:29 jer1 joined
11:30 ericsagnes joined
11:30 freusque joined
11:31 sdothum joined
11:32 felixsch_ joined
11:32 <phadej> _sras_: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#overlapping-instances
11:33 yellowj joined
11:33 FjordPrefect joined
11:34 juanpaucar joined
11:34 cretiq joined
11:35 jgt2 joined
11:36 cloudhead joined
11:37 jedws joined
11:37 takle joined
11:38 Levex joined
11:41 Shatnerz0 joined
11:41 eyck joined
11:41 kuribas joined
11:42 cspollard joined
11:42 <torstein> Is there any way to get IO.hGetLine to block until there's a line ready?
11:43 <mauke> torstein: isn't that what it does?
11:43 mattyw joined
11:44 ErinvanderVeen joined
11:44 JeanCarl1Machado joined
11:44 JeanCarloMachado joined
11:44 quobo joined
11:44 <torstein> mauke, Yes, I meant ByteString.hGetLine
11:44 <mauke> ... isn't that what it does?
11:45 <torstein> I'm getting end of file error
11:45 <torstein> trahs: fd:5: Data.ByteString.hGetLine: end of file
11:45 <mauke> then you've reached the end of the file
11:46 <torstein> What determines that? I'm just putting strings out with IO.hPutStrLn on the other end
11:46 <mauke> what other end?
11:46 <kuribas> :t foldl (liftA2 (*)) [1]
11:46 <lambdabot> (Num c, Foldable t) => t [c] -> [c]
11:46 isBEKaml joined
11:46 abra0 joined
11:46 <torstein> Well I have a client and server communicating with handles over SSH
11:47 <mauke> so this is a socket?
11:47 <torstein> i use handles
11:47 <mauke> irrelevant
11:47 <mauke> does the handle refer to a socket?
11:47 abroz joined
11:48 <torstein> I don't think so
11:48 locallycompact joined
11:48 <torstein> std_in and out from a process
11:48 <torstein> ssh process
11:48 <mauke> it's probably either a socket or a pipe
11:49 <torstein> Yes, a pipe
11:49 <torstein> Like this: http://lpaste.net/355642
11:49 mivael joined
11:49 chlong joined
11:49 <mauke> in either of those cases, you get EOF from reading when the write end shuts down / is closed
11:50 <torstein> So only if the write end process terminates or the handle is closed manually?
11:50 jedws joined
11:50 thunderrd joined
11:50 <mauke> er... maybe?
11:51 <mauke> more precisely, it's when all write ends have been closed
11:51 <mauke> terminating a process is one way to close all its open handles
11:52 locallycompact joined
11:52 <mauke> on the other hand, fork() also clones all open file descriptors in the new process
11:52 jimmyrcom_ joined
11:52 WhereIsMySpoon joined
11:52 WhereIsMySpoon joined
11:53 jhrcek joined
11:53 tromp joined
11:53 itihas joined
11:54 bjz joined
11:54 selthas joined
11:54 sproingie joined
11:54 sproingie joined
11:54 benl23 joined
11:55 buttbutter joined
11:56 sw1nn joined
11:56 jer1 joined
11:57 sdrodge joined
11:58 Levex joined
11:59 felixsch__ joined
12:00 drbojingle joined
12:01 SkyPatrol joined
12:01 drbojingle left
12:05 <piyush-kurur> what happens if I do an hIsEOF on a handle that is a socket. Does it wait till the other end of the socket is closed or does it check whether the socket is closed right now?
12:06 bencryption_ joined
12:06 akh joined
12:06 nnplv joined
12:07 Elhamer joined
12:07 TCZ joined
12:10 Gloomy joined
12:12 Gurkenglas joined
12:12 wroathe joined
12:12 takle joined
12:13 inad922 joined
12:13 <piyush-kurur> okey got the answer from the docs
12:13 <piyush-kurur> sorry for the noise
12:14 <piyush-kurur> it says hIsEOF may block to make sure that there is no more data.
12:14 jer1 joined
12:15 asm_ joined
12:18 felixsch_ joined
12:18 systadmin joined
12:19 xcmw joined
12:19 WhereIsMySpoon left
12:19 swerve joined
12:20 darlan joined
12:20 mizu_no_oto joined
12:21 jgt3 joined
12:21 <piyush-kurur> alanz: ping
12:21 qnikst joined
12:22 <alanz> piyush-kurur: pong
12:22 <piyush-kurur> alanz: I hope you have some time. I managed to get liquid haskell to compile using stack
12:22 danthemyth joined
12:23 <swerve> am I suppose to use MonadIO in order to print a string within a function that returns a different monad?
12:23 <alanz> nice
12:23 _ashbreeze_ joined
12:24 <piyush-kurur> alanz: but liquidhaskel-cabal seems to have some compilation problem (does not look like a difficult one to fix).
12:24 <alanz> I have never used that, so cannot comment
12:24 shadowdaemon joined
12:24 rcat joined
12:24 <piyush-kurur> so what do you think is the easiest way to integrate liquidhaskell into a package like raaz. Can it do cross module verification, i.e. specs in one module, the code to be verified in another?
12:25 <torstein> Sometimes, though not always, doing "IO.hPutStrLn stderr" behaves as if drunk. Printing "Running as server on dir:" becomes "Ruunnninnign g aass scelirevern t oonn ddiirr::" any idea why?
12:25 <tuturto> swerve: yes, if you want to print on screen, you need IO monad
12:25 <Athas> swerve: yes.
12:25 <Athas> swerve: you can only do that if your monad is really a wrapper around IO.
12:26 lonokhov joined
12:26 <alanz> piyush-kurur: I have only ever experimented with LH, I am by no means an expert. And I have never tried to integrate it into the build process
12:26 sordina1234 joined
12:26 fotonzade joined
12:27 <swerve> Athas, the monad's run function returns an IO ( ....) but it's an instance of Monad not MonadIO right now
12:27 ziyourenxiang joined
12:28 <piyush-kurur> alaz: sorry I will try it out myself. Incidently there is a liquidhaskell channel. Let me try my luck there
12:29 <alanz> good luck
12:29 bloogie joined
12:30 <bloogie> is this outdated? https://wiki.haskell.org/Implement_a_chat_server
12:30 spacecadetbrown joined
12:30 <Athas> bloogie: doesn't look that way from a quick skim.
12:31 <swerve> Athas, ah ha, figured it out. liftIO works
12:31 <bloogie> Athas: thanks, and do you think this would be a good introduction to network programming in Haskell?
12:31 <Athas> bloogie: it's a very low-level way of doing it, though.
12:31 <quchen> bloogie: I have a working version of a simple client/server app here: https://github.com/quchen/talks/tree/master/beginner-workshop_rolling-update/src/ClientServer
12:31 <quchen> bloogie: See the two Main.hs files in app/
12:31 <Athas> Sure, for actual socket-level programming. If you want web services, then there are more high-level libraries (I hope).
12:32 e14 joined
12:32 <bloogie> quchen: thanks, looking at it
12:32 <mauke> torstein: sounds like two threads printing at the same time
12:33 <quchen> bloogie: You can try it out first by following the instructions in the readme :-)
12:34 joe9 joined
12:34 <torstein> mauke, Aaahh.. Of course.. Any way to make it block until the line is finished printing?
12:35 <quchen> Let only one thread print at a time.
12:35 <quchen> Simple solution: global lock.
12:35 carlomagno1 joined
12:35 <mauke> alternatively, switch stderr to line buffering
12:36 <quchen> Downside is that if one thread dies your lock stays locked.
12:36 <quchen> Or that.
12:36 jer1 joined
12:36 <quchen> Or use a dedicated printing thread, which is what I like to do.
12:36 <torstein> Why doesn't it block by default? It's printing lines after all
12:37 <quchen> The buffer behaviour is part of the handle, not of putStrLn.
12:37 <mauke> torstein: the deeper reason is that strings are lazy lists
12:37 <torstein> Would "hSetBuffering stderr LineBuffering" work?
12:38 <quchen> Yes.
12:38 <quchen> mauke: I don’t think so, you’d probably have the same issue with Text.
12:38 <mauke> unlikely
12:38 <torstein> That changes the stderr handle globally, right, or do I need to pass it around?
12:38 <mauke> torstein: it's a global setting
12:38 <quchen> mauke: Well, Text is much faster, making the race condition less likely to be observable.
12:38 juanpaucar joined
12:39 <mauke> quchen: the issue is that stderr is unbuffered. in other languages that means every write() or print() call is seen immediately
12:39 fotonzade joined
12:40 <mauke> but in haskell strings are lazy lists, and you never know if you have a next character
12:40 <mauke> (or maybe you'll get it eventually but it will take a long time)
12:40 <mauke> so you get a separate write() syscall for every single character you output to stderr
12:40 <quchen> Wait, really?
12:40 <mauke> sure
12:40 <torstein> wouldnt hPutStrLn force the string before passing it to the handle?
12:40 dmcampos joined
12:40 <mauke> torstein: no
12:41 <mauke> hPutStrLn (repeat "y\n") works fine
12:41 <quchen> Ah, I remember reading this in the GHC source and being equally surprised as I am now
12:41 <mauke> hPutStrLn stdout (repeat "y\n") works fine
12:41 <mauke> quchen: try running strace on a haskell program that writes to stderr :-)
12:41 <quchen> torstein: Better suggestion, don’t ever use String.
12:41 abroz joined
12:41 <quchen> Use Text instead.
12:42 <quchen> String is for Hello World, exclusively.
12:42 <quchen> mauke: Eww. Okay, hold on.
12:42 eacameron joined
12:43 takle joined
12:43 <osa1> is there a way to give a test suite target to `stack repl` ?
12:43 takle_ joined
12:44 saussure joined
12:45 <quchen> mauke: Ewwwewewww..!!!
12:45 dmcampos joined
12:45 swerve left
12:45 <mauke> can you taste the performance?
12:46 <quchen> write() is in C so it’s very fast
12:46 <mauke> write is a syscall so it does a context switch into the kernel
12:46 <merijn> quchen: That's like the opposite of correct :p
12:47 <quchen> merijn: write is not in C so it’s very fast?
12:47 <merijn> quchen: No, it's not very fast :p
12:48 <merijn> quchen: At least, not if you call it repeatedly with small data
12:48 dmcampos joined
12:48 <quchen> mauke: I just repeated it with Text and it’s the same amount of writes. :-s
12:49 Gloomy joined
12:49 <mauke> that's interesting
12:49 <quchen> main = hPutStrLn stderr "hello world" >> T.putStrLn stderr "hello world"
12:49 mizu_no_oto joined
12:49 <quchen> That’s strange.
12:49 <mauke> how about ByteString.Char8?
12:50 <quchen> Changing it to STDOUT gives me one write call each
12:50 <quchen> So Text is written char-buffered as well! Eww
12:50 <quchen> I thought Text would do the chunking
12:50 <quchen> Or at least some of it
12:50 <merijn> That doesn't sounds right...
12:51 <quchen> lpaste.net/355643
12:51 <merijn> quchen: And you're seeing how many writes?
12:51 <quchen> stack ghc Test.hs --package=text && strace ./Test
12:52 <quchen> merijn: Two "hello world" writes to STDOUT
12:52 <quchen> Two chains of hello-world-charwise to STDERR
12:52 <merijn> hmmm
12:52 <merijn> oh
12:52 <merijn> bingo
12:52 <merijn> https://hackage.haskell.org/package/text-1.2.2.1/docs/src/Data-Text-IO.html#hPutStr
12:52 aqu41 joined
12:52 <merijn> (NoBuffering, _) -> hPutChars h str
12:53 <merijn> That's the offender
12:53 <merijn> So it should work if you change the buffering of stderr
12:53 <quchen> If I change the buffering of stderr then Text looks efficient, and String does as well :-þ
12:53 <mauke> they should just fix their code
12:54 felixsch__ joined
12:55 <quchen> No buffering meaning charwise printing is awkward, yes
12:55 jathan joined
12:56 gmcabrita left
12:56 jer1 joined
12:56 <mauke> they could just implement it as a block write
12:57 <Jinxit> if i'm inside an RWST (with Except), how do i throw an except including the entire RWST state? do i have to grab it piece by piece?
12:57 <Itkovian> any idea if Aeson's toEncoding = genericEncoding defaultOptions should provide similar performance compared to manually specifying the pairs or would the former be worse?
12:57 darjeeli1 joined
12:58 <mauke> sometimes I feel like Haskell is similar to C++ in that its standard IO handles are crazy and you're better off implementing your own abstraction on top of raw fds yourself
12:58 <maerwald> mauke: heh, exactly what I did
12:58 TheFuzzball joined
12:59 <quchen> mauke: RFC, https://github.com/bos/text/issues/179
13:00 tomphp joined
13:00 locallycompact joined
13:01 juanpaucar joined
13:02 mtg joined
13:02 freusque joined
13:03 sgronblo joined
13:03 xcmw joined
13:04 rcschm joined
13:04 <mbrock> fun expression: [0..n-1] where n is a Word256 and sometimes accidentally is 0...
13:05 beerdrop joined
13:05 alfredo joined
13:06 felixsch_ joined
13:06 exferenceBot joined
13:06 <ongy> and that's why we need integer intervals in types
13:07 <quchen> The joy of implicit overflows is only eclipsed by the joy of implicit exceptions on overflow
13:07 <quchen> The joy of implicit overflows is only eclipsed by the joy of explicit exceptions on overflow
13:07 <quchen> Grr.
13:08 <kuribas> Is sorting a (almost) sorted list cheaper?
13:08 <ongy> depends on your algorithm
13:08 <quchen> Depends on the algorithm. Data.List.sort? Yes, it’s massively cheaper.
13:09 <quchen> It has run detection built-in.
13:09 <kuribas> quchen: like O(n)?
13:09 <kuribas> for a sorted list?
13:09 <quchen> Yes.
13:09 <quchen> Or reverse-sorted.
13:09 <mauke> I only remember that head . sort is O(n)
13:09 <quchen> It’s mergesort with run detection.
13:10 <quchen> The algorithm is quite nice and worth a read
13:10 <kuribas> mauke: minimum will be faster...
13:10 <quchen> Not complicated at all
13:10 <kuribas> right, thanks
13:10 <mauke> kuribas: why?
13:10 pgiarrusso joined
13:10 a3Dman joined
13:10 <kuribas> mauke: because it's just a fold?
13:11 <kuribas> mauke: can't go faster than that.
13:11 <kuribas> right?
13:11 <mauke> that's not evidence. it's not even logically correct
13:11 Dance joined
13:12 nighty-- joined
13:12 bodisiw joined
13:13 pgiarrusso_ joined
13:13 <kuribas> well, you need to examine every element at least once, so the fastest way to do it is once...
13:13 <kuribas> if (<) is strict at least
13:14 guardianx joined
13:15 xtreak joined
13:15 mmhat joined
13:15 xtreak joined
13:16 fortruce joined
13:17 jer1 joined
13:17 iAmerikan joined
13:18 cdg joined
13:20 shangxiao joined
13:20 cpup joined
13:21 renzhi joined
13:22 alfredo_ joined
13:23 <quchen> mauke: Are you sure about the head thing?
13:23 guardianx joined
13:24 <quchen> I would expect a list of n elements to require O(log(n)) merges until the final merge, which then results in a O(1) first element
13:25 prkc joined
13:25 <mauke> as it turns out, I'm not sure, no
13:26 <mauke> http://stackoverflow.com/questions/40820093/haskell-head-mergesort-for-min-element-in-linear-time
13:27 ErinvanderVeen joined
13:27 mmn80 joined
13:28 nshepperd joined
13:28 takle joined
13:31 dddddd joined
13:32 Sh4rPEYE joined
13:33 Yuras joined
13:35 ystael joined
13:35 cspollard joined
13:36 <ph88^> how can i make my own exception type (with a string) and then throw it ?
13:37 <lyxia> Declare a new data type, implement Exception
13:37 saussure joined
13:37 <ph88^> no minimal implementation for Exception class ?
13:37 jer1 joined
13:38 <lyxia> the minimal implementation is empty
13:38 saussure joined
13:38 beaky joined
13:39 <lyxia> and I can't see a reason not to let it so
13:39 <ph88^> are unused instances of typeclasses removed by the compiler ? if i derive Show and don't use show
13:40 <byorgey> ph88^: probably
13:40 <Maxdamantus> Well, it would be a bit wasteful if the compiler included the infinite number of Show instances that typically exist
13:40 <quchen> I’d say no, because of the open world assumption
13:40 tomphp joined
13:40 <Maxdamantus> otherwise we'd have binaries that are infinitely large.
13:40 <quchen> I.e. a module could be imported and always has to export its instances
13:41 <Maxdamantus> Show Char, Show [Char], Show [[Char]], Show [[[Char]]], ...
13:41 <byorgey> quchen: good point
13:41 mizu_no_oto joined
13:41 <quchen> Maxdamantus: There is no Show [[Char]] instance definition.
13:41 cpup joined
13:41 systadmin joined
13:41 <ph88^> is it possible to run main in ghch with command line options ?
13:41 <byorgey> Maxdamantus: type class instances in Haskell aren't like template instances in C++. You don't need a different version of the code for each type.
13:41 <quchen> Maxdamantus: Similarly, we don’t have to export »id :: Int -> Int« and »id :: (a -> b) -> (a -> b)« and so on
13:42 ErinvanderVeen joined
13:42 <quchen> ph88^: »:main arg arg arg«
13:42 guardianx left
13:42 kritzcreek joined
13:43 <Maxdamantus> Mm, I guess.
13:43 <byorgey> ph88^: more generally you can also use System.Environment.withArgs
13:44 nakal joined
13:44 <quchen> byorgey: Woah! I didn’t know about that one, but I’ve been looking for it for a long time!
13:44 <byorgey> =)
13:44 <byorgey> I learned about it from fryguybob
13:44 <quchen> Is it new?
13:44 harfangk joined
13:44 dsfox joined
13:44 <quchen> I wrote countless hacky ways of cutting off certain parameters
13:44 <byorgey> I don't know how long it's been around
13:45 <quchen> https://hackage.haskell.org/package/base-4.5.0.0/docs/System-Environment.html#v:withArgs
13:45 <quchen> Ookkkayyy
13:45 <byorgey> hahaha
13:45 <quchen> I guess the error is on my side
13:45 <quchen> 4.5 was what, 7.4?
13:45 <byorgey> yep
13:46 <ph88^> what did i do wrong in this optparse-applicative option ? https://bpaste.net/show/4381b835fc7b
13:46 oisdk joined
13:46 buglebudabey joined
13:46 <byorgey> quchen: https://hackage.haskell.org/package/base-4.0.0.0/docs/System-Environment.html#v:withArgs
13:47 <byorgey> that would be.... GHC 6.10
13:47 <byorgey> 9 years ago
13:47 <quchen> I wasn’t around at that time.
13:47 jgt3 joined
13:47 <quchen> Long time!
13:48 <ph88^> you are 8 ? :P
13:48 dddddd joined
13:48 <byorgey> ph88^: yes, quchen is very precocious
13:48 <lyxia> ph88^: auto uses Read (Maybe Int)
13:49 <quchen> I’m turning 8 in August
13:49 Elhamer_ joined
13:49 <* byorgey> is... almost 12, I think. Or maybe 11.
13:50 ixxie joined
13:50 <quchen> Oh, Haskell-wise, hmm.
13:50 <quchen> I’d have to look it up.
13:50 <quchen> But I can point it down to the second!
13:50 <quchen> Not nearly 12 though. More like 5.
13:50 <quchen> Cold and boring winter recess 2012.
13:51 <quchen> January, that is.
13:51 `^_^v joined
13:51 oisdk joined
13:53 al-damiri joined
13:53 jer1 joined
13:53 oisdk joined
13:54 tromp joined
13:54 stevenxl joined
13:54 stevenxl joined
13:54 stevenxl joined
13:54 sproingie joined
13:54 sproingie joined
13:54 meba joined
13:56 Rodya_ joined
13:56 <byorgey> what do you know, it looks like today is exactly the 10-year anniversary of the first time I said something in this channel =)
13:56 <exio4> byorgey: so cool! I wish I was here ten years ago!
13:57 <exio4> ok, that doesn't really sound grammatical, ignore it :P
13:57 Sh4rPEYE joined
13:57 <mbrock> byorgey: congrats! how did you find out? ircbrowse.net seems down
13:58 <byorgey> I have a bunch of old #haskell logs stored on my HD
13:58 earldouglas joined
13:58 sternmull joined
13:58 <Sh4rPEYE> Hello. I'm doin the parsing chapter in Haskell Book and I don't quite get what the "stop" and "eof" mean. I guess 'char' means 'read this one char from a string', and 'unexpected "stop"' might mean something like 'throw an exception and stop reading the string. But eof?
13:59 <phadej> Sh4rPEYE: eof "at this point the input should be empty, otherwise raise parse error"
14:00 <phadej> "expecting end-of-input; trailing data found" or something like that
14:00 reliability joined
14:00 erisco joined
14:00 <Sh4rPEYE> Thanks
14:02 sellout- joined
14:03 Elhamer__ joined
14:03 <quchen> »EOF« stands for »end of file«, if that helps.
14:04 <quchen> It’s typically a parser that succeeds only if there is nothing left in the input stream.
14:04 takle joined
14:04 heebo joined
14:05 sproingie joined
14:05 freusque joined
14:05 juanpaucar joined
14:06 selthas joined
14:06 darjeeli1 joined
14:07 xcmw joined
14:10 cpup joined
14:11 mmachenry joined
14:12 akh joined
14:13 reliability joined
14:14 wroathe joined
14:14 sordina1234 joined
14:15 sgflt joined
14:16 dxtr joined
14:17 asm_ joined
14:17 torstein joined
14:18 paolino joined
14:18 nh2 joined
14:18 rcschm joined
14:18 jer1 joined
14:18 abroz joined
14:18 crobbins joined
14:19 dxtr joined
14:20 ixxie joined
14:22 fotonzade joined
14:23 juanpaucar joined
14:24 eschnett joined
14:25 jgt3 joined
14:25 `^_^v joined
14:26 eazar001 joined
14:27 cloudhead joined
14:28 fizruk joined
14:30 <erisco> luite_, is ghc-8.0 branch of ghcjs working on Windows with GHC 8+ or is it still in development? tried it but had issues
14:31 jer1 joined
14:31 Gloomy joined
14:34 Argue joined
14:35 pookleblinky joined
14:36 robertc joined
14:37 user___ joined
14:38 danthemy_ joined
14:38 buttbutter joined
14:41 robotroll joined
14:41 cretiq joined
14:41 <merijn> Did anyone ever write a nice blog post on writing efficient (recursive) monadic loops?
14:41 Kreest_ joined
14:42 FjordPrefect joined
14:43 Wizek joined
14:43 Wizek__ joined
14:44 Elhamer_ joined
14:45 takle joined
14:45 varuaa joined
14:45 FjordPrefect joined
14:45 Levex joined
14:46 <erisco> hope this still works... deleted a patch during ghc-boot so it wouldn't fail on it
14:47 <erisco> nope, fails later on on something else... I'm done
14:47 <erisco> can't get my Haskell compiled to JavaScript :( now what
14:47 hackebeilchen joined
14:48 {emptyset} joined
14:48 xall joined
14:48 burtons joined
14:48 mschristiansen left
14:49 teggi joined
14:49 ChristopherBurg joined
14:49 felixsch__ joined
14:50 saussure joined
14:51 aarvar joined
14:51 <cocreature> erisco: write js like a peasant
14:51 <erisco> I already have written the Haskell program, though, and I like it
14:52 paolino joined
14:53 paolino_ joined
14:53 saussure joined
14:54 <shapr> erisco: using ghcjs?
14:54 <ventonegro> write a PureScript port
14:54 uglyfigurine joined
14:54 felixsch_ joined
14:54 <erisco> shapr, yeah, can't get it running on the Windows
14:54 <shapr> oh, I don't know
14:54 <erisco> ventonegro, doesn't have the language features I am using
14:56 <erisco> if there was a prebuilt for GHC 8+ that I could run with Vagrant... maybe...
14:56 saussure joined
14:56 Rodya_ joined
14:57 davenpcm joined
14:57 felixsch__ joined
14:58 Levex joined
14:58 jer1 joined
14:58 <athan> Can I use IO in QuickCheck's Gen? Or will I need to do some unsafe stuff?
14:58 jgt3 joined
14:59 <erisco> maybe I will just make this a desktop program... lol...
15:00 <merijn> So, starting from transformers-0.5.2 MonadIO is just a reexport of base, right?
15:00 <lyxia> athan: you can't
15:00 felixsch_ joined
15:01 fizruk joined
15:01 <lyxia> athan: If you're writing tests, ioProperty may be useful
15:02 <erisco> what are the hot and awesome UI libs?
15:02 <torstein> Is it possible to have sub-tests with arguments in HSpec? e.g. a HSpec test function "testDir :: FilePath -> IO" which is only called in other tests and not run standalone
15:03 takle joined
15:04 TheFuzzb_ joined
15:04 Computist joined
15:04 dddddd joined
15:04 argent0 joined
15:05 <athan> erisco: pux from purescript :v
15:05 <MitchellSalad_> hello all, been a while since I did any SYB programming... is uniplate still preferred?
15:05 juanpaucar joined
15:06 <erisco> no GADTs, no DataKinds... I'd have to lose too much
15:06 takle joined
15:07 afarmer joined
15:07 felixsch__ joined
15:07 <lyxia> GHC.Generics > SYB but I don't know of any uniplate equivalent.
15:07 tabaqui joined
15:07 juanpaucar joined
15:08 asm_ joined
15:08 <MitchellSalad_> yeah? why is generics > SYB? (I assume by SYB we mean Data.Data?)
15:09 Rodya_ joined
15:10 <mrkgnao> MitchellSalad_: are you Neil Mitchell?
15:10 obadz joined
15:10 <MitchellSalad_> no, haha
15:10 <mrkgnao> I'm asking because, in that case, your Uniplate post was my introduction to the library, of a sort
15:10 <mrkgnao> oh :)
15:10 oisdk joined
15:11 <lyxia> Yes I mean Data.Data. the problem is that the Constr representation loses all type information
15:11 <int-e> mrkgnao: he's no longer on IRC I think; ndm used to be the nickname.
15:11 <int-e> @quote ndm
15:11 <lambdabot> ndm says: As always, the most useful thing in the error message is the line number.
15:12 ErinvanderVeen joined
15:12 juanpaucar joined
15:12 <lyxia> So SYB is unsafe because you can mix up your types, and slow because of dynamic typing.
15:13 FreeBirdLjj joined
15:13 _sras_ joined
15:14 sproingie joined
15:14 sproingie joined
15:14 <_sras_> I am trying to represent a Nonempty value using Swagger Schema. Is this the right way to go about this http://lpaste.net/355647 ?
15:15 wroathe joined
15:15 [[ExTRa]] joined
15:15 cpup joined
15:16 Snircle joined
15:16 jer1 joined
15:16 <paolino_> erisco, reflex
15:17 <EvanR> i just used foldl for something
15:17 <erisco> "Reflex is a high-performance, deterministic, higher-order Functional Reactive Programming system
15:17 <erisco> "
15:17 flatmap13 joined
15:17 <erisco> doesn't sound like UI to me
15:17 <EvanR> but its essentially a list reverse, but on a different data type
15:17 <paolino_> erisco, reflex-dom
15:18 dsh joined
15:19 <erisco> well I don't want to write a web server and I can't get GHCJS working
15:19 <paolino_> it compiles also gtk
15:19 obadz joined
15:20 marinelli joined
15:20 <erisco> reflex platform does not support Windows... do I need that?
15:21 <paolino_> never used Windows, sorry
15:23 <kuribas> erisco: gi-gtk and wxHaskell?
15:23 urodna joined
15:24 <paolino_> erisco, by writing for the browser you can overcome some platform related issues
15:24 tusj joined
15:24 <erisco> yeah, I tried that, but not to the extent that I stop using Haskell
15:24 conal joined
15:24 <erisco> and all options failed
15:24 <ventonegro> erisco: what about threepeny-gui?
15:24 <ventonegro> penny, even
15:25 jgt3 joined
15:25 sellout- joined
15:25 <erisco> sounds interesting but it is too much to have the user start a server and connect to it with the browser
15:25 cschneid_ joined
15:25 <erisco> kuribas, I will take a look
15:26 <EvanR> why is ghcjs not a solution?
15:26 <erisco> paolino_, what provides the gtk backend for reflex?
15:26 <erisco> EvanR, I can't get it compiled, that's why
15:26 <EvanR> thats...
15:26 <EvanR> sounds like surrender
15:27 <erisco> yes. I am tired of dealing with it
15:27 <kuribas> erisco: wxHaskell is useable but incomplete.
15:27 <ventonegro> doesn't stack have a ghcjs template?
15:27 <EvanR> erisco: are you trying to make a haskell GUI for windows?
15:27 <fizruk> _sras_: there's minItems property that you can set to 1
15:27 <kuribas> erisco: gtk is more complete but is only native on linux.
15:27 <EvanR> "at any cost" ?
15:27 <erisco> EvanR, that's the fallback plan now, yes
15:27 mkoenig_ joined
15:27 mtg joined
15:28 <EvanR> then you can write the GUI in C# and use FFI to make haskell control it
15:28 joakim` joined
15:28 <EvanR> .net bridge
15:28 <EvanR> it will look nice and native
15:28 <erisco> looking nice is not a requirement... easy for me and easy for the user is
15:28 <EvanR> or like i did, not FFI, but STDIO to control it
15:29 <kuribas> EvanR: why not the win32 API?
15:29 <fizruk> _sras_: btw, I think NonEmpty is in dependencies of swagger2, so it makes sense to add that instance directly to swagger2
15:29 <EvanR> kuribas: have you used win32 directly to make a gui app?
15:29 <paolino_> erisco, gi-gtk
15:29 <kuribas> EvanR: long time ago yes :)
15:29 jgt3 joined
15:29 <EvanR> yeesh
15:29 <_sras_> fizruk: I am completly lost. How can I do this. Also, Where is the minItems thing you mentioned earlier?
15:30 pookleblinky joined
15:30 <kuribas> EvanR: for win 3.1 :)
15:30 <_sras_> fizruk: Right now I have this http://lpaste.net/355648
15:30 <kuribas> erisco: for something native wxHaskell is probably the easiest.
15:31 jacereda joined
15:31 <kuribas> erisco: as long as you don't need the newest features.
15:31 felixsch_ joined
15:31 <erisco> I need some basic forms and basic drawing
15:32 <kuribas> should be no problem
15:33 <lpaste> fizruk revised “No title”: “No title” at http://lpaste.net/355647
15:33 <EvanR> that kind of thing, specifically on windows, could use a simple direct haskell solution as a library
15:33 <fizruk> _sras_: should be something like this: http://lpaste.net/355647
15:33 <EvanR> win32 bindings cant be the answer
15:33 <fizruk> _sras_: it's best to use lenses to work with Swagger data model
15:34 <kuribas> EvanR: wxHaskell?
15:34 <EvanR> wx anything has never worked out for me, and from the stories in here
15:34 exarkun joined
15:35 <orion> Is there a more idiomatic way of writing the following?: modifyFoo f = f & someFieldInFoo %~ (<*>) (pure bar) -- where someFieldInFoo is a Maybe Foo?
15:35 <fizruk> _sras_: mapped is basically lens version of fmap, allows me to get to NamedSchema of (m NamedSchema)
15:35 <orion> is a Lens over a Maybe Foo*
15:35 <fizruk> _sras_: schema then goes to Schema in NamedSchema
15:36 <kuribas> EvanR: I wrote a simple canvas in wx: http://hackage.haskell.org/package/wxSimpleCanvas
15:36 <kuribas> EvanR: it works ok
15:36 <fizruk> _sras_: then description and minItems go to corresponding properties of the Schema
15:37 <fizruk> _sras_: (?~) operator sets optional value to (Just something)
15:37 <EvanR> kuribas: the good thing about my gui in cocoa (in haskell) was that i got any and all toolkit features provided by the platform, everything worked the way it was supposed to...
15:37 etehtsea joined
15:37 oisdk joined
15:37 <EvanR> there was no fiddling with WX
15:38 <kuribas> EvanR: you build it in objective C?
15:38 <EvanR> "native is best"
15:38 <EvanR> yes
15:38 <fizruk> _sras_: now you may be wondering how to know which lenses are there
15:38 <_sras_> fizruk: I had tried something like your paste eralier..But got so many errors...
15:38 jer1 joined
15:38 <EvanR> just the thin outer layer
15:38 paolino joined
15:38 simendsjo joined
15:38 <_sras_> fizruk: http://lpaste.net/355649
15:38 <kuribas> EvanR: yes, but you get the other platforms for free with wx
15:38 <EvanR> i dont know how well that would work on windows, since win32 is noticably more crunchy
15:39 <EvanR> kuribas: ... that is what the brochure says
15:39 <EvanR> "its so easy, call now"
15:39 <EvanR> "satisfaction guaranteed"
15:39 marinelli left
15:39 <fizruk> _sras_: I'm not sure, but that's probably because you lack some spaces, try this: mapped . Swagger.schema . description
15:40 <kuribas> EvanR: is .NET so much better then?
15:40 osa1 joined
15:40 <fizruk> _sras_: wait, no
15:40 osa1 joined
15:41 <EvanR> kuribas: its not going to look exactly right, its not going to have all the features of your OS in case you change your mind about something, you have to deal with WX the actual C++ library
15:41 <erisco> I agree that native UIs are the best way to go (speaking from mobile dev experience)
15:41 <erisco> but doing it with FFI would be such a PITA
15:41 <EvanR> like i said, i used stdio
15:41 <EvanR> which was a mild pain in the ass
15:42 inad922 joined
15:42 ErinvanderVeen joined
15:42 <EvanR> since the target for this project is specifically windows, it might be a good idea to exploit that
15:42 <fizruk> _sras_: the root problem is this: The type variable ‘b0’ is ambiguous
15:43 <erisco> I am not sure how I'd do the communication really
15:43 <_sras_> fizruk: Yes
15:43 <fizruk> _sras_: that is the type of description is ambiguous, you can fix that by adding an explicit annotation to the description
15:43 chlong joined
15:43 <fizruk> _sras_: description ?~ ("description" :: Text)
15:43 <erisco> I would... what... need to invent a small language to communicate between the UI and Haskell programs
15:44 <fizruk> _sras_: that's a bit weird since I thought there's a functional dependency to prevent that ambiguity
15:44 <erisco> and all the care I've taken with the types in Haskell means nothing
15:44 a3Dman joined
15:45 <EvanR> erisco: the UI layer would be concerned only with showing graphics, getting particular events
15:45 <EvanR> as much as possible would be in haskell
15:45 <EvanR> and it would be pure haskell
15:45 <erisco> yes, but I've taken care to model what to show well with types
15:45 <erisco> none of which would matter now
15:45 <fizruk> _sras_: hmm... which versions of lens and swagger2 do you build with?
15:46 <_sras_> fizruk: After annotation http://lpaste.net/355650
15:46 <EvanR> im not sure i understand, you wrote the GUI in haskell without a working GUI ?
15:46 <EvanR> i dont really understand how whatever you have cant be used with a proper driver
15:46 Reisen joined
15:47 <EvanR> assuming it just types and not drivery stuff you already have
15:47 <erisco> the states and flow of states is done
15:47 <erisco> it is just a matter of putting a head on it
15:47 <EvanR> there you go
15:47 <_sras_> fizruk: Is minitems part of Schema? I am not seeing that property...
15:48 <erisco> yes but I lose everything over the bridge
15:48 <EvanR> you can think of it like an FFI, if you have foreign objects that should be deleted if they are gc'ed over here, finalizers, etc
15:48 <erisco> I have to serialise and deserialise on the other side
15:48 <_sras_> fizruk: I am using resover: nightly-2017-03-01
15:48 <erisco> which means I have to emulate the types on the UI side
15:48 <erisco> but C# is not strong enough... so not only do I have to redo the work but it will be worse
15:48 Itkovian joined
15:49 <EvanR> if its not "just a head" and a lot of functionality is in the forms and panels... might not work
15:49 <EvanR> if the gui is just there to provide controls and display info... could work
15:49 jmelesky joined
15:50 <kuribas> EvanR: that still sounds more complicated than using wxWidgets...
15:50 <erisco> how did you use stdio? I haven't done IPC much
15:50 <fizruk> _sras_: it's in ParamSchema which is a part of Schema
15:50 <EvanR> kuribas: well, we can go over my gripes about that again if you want, they are orthogonal to complexity
15:50 tomphp joined
15:51 <kuribas> EvanR: but if erisco just wants some forms?
15:51 <EvanR> just doing something now in wx may work, right now
15:51 <EvanR> if all you really care about is throwing something up
15:51 <kuribas> it's true that it's not very active, and not so well supported...
15:51 <fizruk> _sras_: this does not make sense: Could not deduce (HasDescription Schema (Maybe Text))
15:52 <ph88^> with optparse-applicative, how can i make an option that takes integers on the command line and transforms them into Just integer, and Nothing when the option was not given?
15:52 solus_mate_usr joined
15:52 <fizruk> _sras_: there's exactly this instance in swagger2-2.1.3 which is in nightly-2017-03-01
15:52 kmels joined
15:52 <EvanR> my gripes were the quality of the wx project, the quality of the resulting front end, the flexibility of the app wrt to the particular platforms
15:53 <EvanR> and theres only one platform in this case
15:53 felixsch__ joined
15:53 raichoo joined
15:53 ertes-w joined
15:53 <EvanR> not claiming itll be a cheaper up front amount of effort
15:54 mmachenry joined
15:54 <erisco> maybe this? hrm http://hackage.haskell.org/package/hs-dotnet
15:54 <lyxia> ph88^: replace auto with (Just <$> auto) ?
15:54 <erisco> little worried that it is 8 years old
15:55 <erisco> "All reported builds failed as of 2017-01-01" yeah no... and docs talk about GHC 6
15:55 <_sras_> fizruk: Do you know how to check installed package version using stack?
15:55 trism joined
15:55 locallycompact joined
15:55 <erisco> EvanR, if you can explain the IPC then I can consider it
15:56 <ph88^> thanks lyxia
15:56 dfeuer joined
15:56 felixsch_ joined
15:56 <EvanR> erisco: well, i spawned my gui process using an exec pipe from System.Process and get two fds, which were stdin and stdout in the child. which was written in objC
15:57 <ph88^> lyxia, eh it didn't quite do the right thing .. now i need to supply to option
15:57 <ph88^> it's not optional anymore
15:57 <EvanR> the protocol consisted of commands, two sets of commands one for each direction
15:57 <EvanR> the commands had a simple format
15:57 <EvanR> command arg1 arg2 arg3 newline
15:57 <erisco> okay, so you spawned a child process and communicated via pipe?
15:58 <EvanR> if there was a large amount of binary data, then it would be sent in hex and cached on one end, with an ID to refer to it later
15:58 jer1 joined
15:58 <EvanR> erisco: two children actually, one for the GUI one for CoreAudio
15:58 <erisco> yes I don't care so much about the protocol
15:58 <erisco> just the mechanism to do IPC
15:58 oisdk joined
15:58 <EvanR> yes exec pipe
15:59 <EvanR> so the child processes could easily be tested separately on stdio
15:59 <EvanR> and typing commands by hand
15:59 whaletechno joined
15:59 <mrkgnao> does kind! not reduce type family applications inside constructors?
16:00 felixsch__ joined
16:00 alibabzo joined
16:01 <erisco> okay, thanks
16:01 <kuribas> EvanR: I just install wx with cabal, without any problems. On ghc-8.2.
16:02 <EvanR> and you alread have wx the c++ lib?
16:02 drewbert joined
16:02 <kuribas> EvanR: naturally
16:02 dddddd joined
16:02 <erisco> I never had a positive experience with non-native UIs (except web) so I am hesitant to go that route
16:02 <ph88^> lyxia, i got it, i used optional
16:03 <EvanR> and youre happy with what wx produces, great
16:03 <kuribas> erisco: wxwidgets is native
16:03 <erisco> by native I mean proprietary to the platform
16:03 freusque joined
16:04 <erisco> they have all the features and are specially designed and tested to work on that platform
16:04 conal joined
16:04 <fizruk> _sras_: stack exec ghc-pkg -- list | grep swagger2
16:05 <kuribas> EvanR: is Win32 not supported anymore?
16:06 <EvanR> i think it is, and there are haskell bindings for it
16:06 <erisco> there is inconsistency with web but there is so much attention given that you're not usually hard pressed to find a solution
16:06 Luke joined
16:06 <EvanR> i just assumed erisco would want the modern version and he knows c#
16:06 <erisco> I do but I haven't made desktop UIs... not even sure what the toolkit for that is nowadays
16:07 <EvanR> but if you want to write this front end in C ...
16:07 <EvanR> erisco: heh, C, win32 ;)
16:07 <EvanR> with special microsoft C
16:07 <erisco> there is WinForms which I think is older
16:07 <EvanR> whatever is more comfortable
16:07 <kuribas> EvanR: there is mingw
16:08 <EvanR> some people are really good with a particular weird old API
16:08 <kuribas> you couldn't call that native though
16:08 <EvanR> mingw, the c compiler
16:08 fnurglewitz joined
16:08 <EvanR> should work
16:09 QubeX2 joined
16:09 rkazak joined
16:09 <erisco> ah and I think Windows Presentation Foundation (WPF) is the new one
16:09 <EvanR> hell you could write the front end in visual studio
16:09 baldrick1 joined
16:09 <erisco> of course I'm doing that
16:09 <EvanR> or .net
16:09 <EvanR> or the latest greatest
16:09 <erisco> it is actually a good IDE for C#
16:10 <erisco> the build system can be a quagmire but so are most...
16:10 <kuribas> is it free?
16:10 <erisco> they have free editions with limited features and license
16:11 uglyfigurine joined
16:11 kmels joined
16:11 <erisco> I happen to have VS 2015 pro licensed from work I did a while ago
16:12 Levex joined
16:12 <EvanR> i think this way youre sort of taking windows and haskell seriously at the same time
16:12 <EvanR> no diluting the spirit of each other ;)
16:12 QubeX2 left
16:13 <erisco> ah yes... the XAML stuff... been a long time since I've done any of this
16:13 <erisco> last time was Silverlight when I was doing WP dev
16:13 Sonolin joined
16:13 varuaa1 joined
16:13 LKoen joined
16:13 shangxiao joined
16:14 <_sras_> fizruk: It seems that I have both swagger and swagger2...
16:15 <_sras_> fizruk: http://lpaste.net/355651
16:15 <fizruk> _sras_: although you probably don't need swagger, it shouldn't conflict
16:15 <ph88^> i have an IO action which returns () and i want to use `try`, i'm only interested to do something in the case of Left, is there some nice syntax for this so i don't have to put a dummy case for Right in a case statement?
16:16 <EvanR> ph88^: onException
16:16 <EvanR> instead of try
16:16 wroathe joined
16:16 uglyfigurine joined
16:16 ragepanda joined
16:16 <erisco> heh... though dynamic UI never worked that well with visual editors
16:16 <EvanR> youll have to use actual code then to add and delete widgets
16:17 <erisco> mhm
16:17 <ph88^> nice one EvanR
16:17 AlphaAtom joined
16:18 peterbecich joined
16:19 <ph88^> EvanR, how do i get the actual exception with onException ? i want to put the exception string to stderr
16:19 SpinTensor joined
16:20 <fizruk> _sras_: can you try loading this code into GHCi? https://gist.github.com/fizruk/bef0d81d5d6f4422bfed9631b08087e3
16:20 <fizruk> _sras_: stack ghci
16:20 heurist joined
16:20 Gloomy joined
16:20 <EvanR> ph88^: actually then you might want to do catch or handle
16:21 <ph88^> aah catch ok ok
16:21 <EvanR> but catching all exceptions, printing it out and ignoring it is probably bad unless youre doing threads?
16:21 matrium joined
16:21 <EvanR> in which case async makes this reall yeasy
16:21 peterbecich joined
16:21 uglyfigurine joined
16:22 tabaqui joined
16:22 danthemyth joined
16:22 <matrium> hi, is there any type in base or containers that guarantees a infinite stream of values?
16:22 <EvanR> @src Stream
16:22 <lambdabot> Source not found. Sorry.
16:22 jer1 joined
16:22 <EvanR> Stream package
16:22 <_sras_> fizruk: Yes
16:23 <EvanR> capital S
16:23 <EvanR> data Stream a = Stream a (Stream a)
16:23 SpinTensor joined
16:23 <matrium> EvanR: thanks!
16:24 <fizruk> _sras_: does it load fine?
16:24 chrisM_1 joined
16:24 <_sras_> fizruk: Yes. It loads fine
16:25 <byorgey> matrium: http://hackage.haskell.org/package/streams
16:25 <byorgey> I don't think there's anything in base or containers.
16:25 <byorgey> Oh, I didn't know about the Stream package. It looks much simpler.
16:26 <fizruk> _sras_: then there's some other problem in your actual code
16:26 <EvanR> byorgey: whoa... anti-causal ;)
16:26 oisdk joined
16:27 abroz joined
16:28 <matrium> Unfortunately, capital Stream is not on stackage
16:28 erisco joined
16:28 <EvanR> o_O
16:29 <EvanR> maybe people tend to make their own Stream
16:29 <EvanR> which seems silly. or stackage is lacking
16:29 <sproingie> doesn't a plain old list from an unfold express a stream pretty well?
16:29 <EvanR> like Integer represents Naturals
16:29 <EvanR> and ByteString represents Ascii text
16:30 <sproingie> ok, so a Stream class then
16:30 <EvanR> o_O
16:30 <EvanR> which is broken for [] ?
16:30 Elhamer joined
16:30 jgt3 joined
16:30 thimoteus joined
16:30 <sproingie> so, guaranteed infinite then?
16:30 <EvanR> that was the question
16:31 earldouglas joined
16:32 afarmer joined
16:34 mmachenry joined
16:36 pera joined
16:36 <_sras_> fizruk: Yes...
16:36 tommd joined
16:37 <fizruk> _sras_: can you share the whole module that has that type error?
16:37 rkazak joined
16:37 marr joined
16:37 <fizruk> _sras_: just in case, do you have swagger (without 2) in your .cabal?
16:39 jmelesky joined
16:40 baldrick1 joined
16:41 merijn joined
16:41 jer1 joined
16:42 <_sras_> fizruk: It works now. Was a stupid error. 'description' instead of 'Swagger.description'....
16:42 theelous3 joined
16:43 <fizruk> _sras_: is there a reason you use Swagger qualified?
16:43 oleksiyp joined
16:43 permegreen joined
16:43 <fizruk> _sras_: also, where does description come from if not from Swagger?
16:44 <carter> johnw: I'll be compose this afternoon.
16:44 <carter> Be at
16:44 saussure joined
16:45 DSM joined
16:45 <merijn> Any blog posts/whatever on "Things You Should Know for Writing Fast Monadic Loops"?
16:45 daishi joined
16:45 <fizruk> _sras_: can you open an issue about ToSchema (NonEmpty a) ?
16:46 jgt3 joined
16:46 dsh-1 joined
16:46 MarcelineVQ joined
16:47 danthemyth joined
16:47 <_sras_> fizruk: other description comes from my own code.
16:47 danthemyth joined
16:47 <_sras_> fizruk: What is the issue about ToSchema (NonEmpty a)?
16:47 <fizruk> _sras_: to add it directly to swagger2
16:48 uglyfigurine joined
16:48 earldouglas joined
16:49 <_sras_> fizruk: Yes.
16:50 tzh joined
16:51 juanpaucar joined
16:51 biglama joined
16:53 fortruce joined
16:53 juanpaucar joined
16:53 Swizec joined
16:53 uglyfigu_ joined
16:53 <fizruk> _sras_: btw, I don't think that was really a stupid error
16:54 fortruce joined
16:54 armyriad joined
16:55 tabaqui joined
16:55 <_sras_> fizruk: It was obvious that it was some other "description" because I can access it unqualified, right?
16:56 <fizruk> _sras_: yeah, but it's easy to miss this kind of error
16:56 <fizruk> _sras_: luckily it still happens at compile time
16:56 <_sras_> fizruk: Yes.
16:57 ErinvanderVeen joined
16:57 flatmap13 joined
16:57 Argue joined
16:58 <merijn> hmmm, one of my criterion benchmarks isn't outputting a bar plot for my benchmarks. In fact, it's not even producing graphs for every benchmark?
16:58 <merijn> Any clues what could be going wrong?
16:58 <fizruk> _sras_: I hope it'll get better when we have OverloadedRecordFields
16:58 <Philonous> Are there good resources on program design ("design patterns") in dependently typed settings?
16:59 flatmap13 joined
16:59 <_sras_> fizruk: how does it relate in this case?
17:00 <fizruk> Philonous: Type Driven Development with Idris? :) honestly I don't know though
17:00 <Philonous> Looking
17:00 <Philonous> Looks interesting
17:00 connrs joined
17:00 reliability joined
17:00 flatmap1_ joined
17:00 <fizruk> _sras_: there'd be one "description" for both your lenses and Swagger's
17:01 <fizruk> _sras_: it's still possible to reuse Swagger's HasDescription class in your makeClassy
17:01 <Philonous> And once again libgen saves the day. Thanks :)
17:01 <fizruk> _sras_: you just have to bring it into scope afaik
17:02 <_sras_> fizruk: Yes. I think so too.
17:02 gillesmajor joined
17:02 jer1 joined
17:03 <fizruk> _sras_: but that approach won't work if you have HasDescription in two different libraries you depend on :)
17:04 t7 joined
17:05 juanpaucar joined
17:06 eklavya joined
17:06 saussure joined
17:06 <merijn> oh...
17:06 <merijn> maybe my benchmarks just break the JS plotting library criterion uses...
17:06 <merijn> And I was hoping to conveniently use the bar chart for comparisons :\
17:07 Unode joined
17:07 <_sras_> fizruk: You mean, if it is not generated via TH?
17:08 geekguy joined
17:08 uam joined
17:08 <_sras_> fizruk: btw, is there any way to generate a Swagger schema for a type from a Digestive functor's Form for the same type?
17:08 <merijn> oh...$10 says the JS is barfing on NaN
17:09 geekg_000_ joined
17:09 fortruce joined
17:11 sleffy joined
17:13 <Philonous> merijn, If you have the data as csv or json or something you could just plot them in R
17:14 asm_ joined
17:14 lilyofthevalley joined
17:14 baldrick1 joined
17:14 <merijn> Philonous: That involves first installing and learning R....
17:14 lilyofthevalley left
17:15 <Philonous> You have a point there
17:15 <merijn> And not be automatable from cabal as easily
17:15 geekg_000 joined
17:17 meghnath joined
17:18 quobo joined
17:20 <fizruk> _sras_: I don't really know digestive-functors, but it can be possible I guess
17:20 geekg_000_ joined
17:21 <_sras_> fizruk: If it is possible, that would be really amazing...
17:21 uam joined
17:22 bodisiw joined
17:22 takle joined
17:23 bonz060 joined
17:24 <bonz060> Hi people!
17:24 <lyxia> hi
17:24 Luke joined
17:26 jer1 joined
17:26 juanpaucar joined
17:26 <_sras_> fizruk: Is there a way using lenses, to add/modify a description of a path/method pair inside a Swagger value?
17:27 <_sras_> fizruk: I have something atrocious like this now. http://lpaste.net/355656
17:28 geekg_000 joined
17:30 oisdk joined
17:31 user___ joined
17:32 Swizec joined
17:33 geekg_000 joined
17:35 geekg_000_ joined
17:38 takle joined
17:38 replay joined
17:38 torstein joined
17:38 <fizruk> _sras_: yes, to peak into an endpoint (called operation in Swagger terminology) see Data.Swagger.Operation
17:39 <fizruk> _sras_: if you're using servant-swagger, see also subOperations from Servant.Swagger
17:40 <fizruk> _sras_: subOperations allows you to select endpoints of a subAPI within a Swagger spec of an API
17:40 <fizruk> _sras_: it's easy and safe
17:40 <_sras_> fizruk: Yes. Will look.
17:44 ixxie_ joined
17:45 jer1 joined
17:46 fresheyeball joined
17:47 <fresheyeball> what is the easiest way to ping a host in haskell
17:47 <fresheyeball> more or less like the ping command in bash
17:47 <fresheyeball> I just want to know if the host is reachable at all
17:47 BlueRavenGT joined
17:47 Vorpal joined
17:47 Vorpal joined
17:48 <Athas> fresheyeball: it may be reachable, but not listening to pings.
17:48 jaziz1 joined
17:48 <Athas> The easiest solution is to use System.Process to launch the 'ping' program, but that's not portable.
17:48 <fresheyeball> sure, but I think that is the bestI can do
17:48 <sproingie> open a tcp connection to it. if you get a connection or even "connection refused" it's up
17:49 <sproingie> ping itself uses icmp and has to be setuid root, it's yuck.
17:49 <sproingie> s/up/reachable/
17:49 <fresheyeball> I'm used to using servant for communication have not touch the low level
17:50 Rodya_ joined
17:50 <Athas> fresheyeball: you need to handle the case where the host goes down after your initial check anyway, so is there value in doing an initial check at all?
17:50 <Athas> This is like checking whether a file exist, then trying to open the file. You still need to check whether the open succeeds.
17:51 <sproingie> host availability isn't exactly that kind of race condition
17:51 <fresheyeball> Athas: I'm just writing an integration test service
17:51 <fresheyeball> so I just want to check connectivity at the start of the tests
17:52 <Athas> I think sproingie's suggestion is the best (opening a TCP connection).
17:52 <Athas> But you still need to handle the host going down later.
17:52 <sproingie> that said i'd just run a really "sanity" test that involved opening a connection
17:52 <fizruk> _sras_: looked at digestive-functors
17:52 <sproingie> and make all the other tests dependent on that passing
17:52 <fresheyeball> Is there a package you recommend for opening a simple tcp connection?
17:53 <fresheyeball> yeah this is just a sanity check
17:53 <_sras_> fizruk: Found something?
17:53 <fizruk> _sras_: apparently conditions and checks are just haskell functions
17:53 <sproingie> test sanity first, if that fails, skip all other tests
17:53 <fizruk> _sras_: so you can't derive restrictions for Swagger Schema for those
17:54 <sproingie> program sanity that is. should probably test programmer sanity too, but i don't know how to automate that :)
17:54 Itkovian joined
17:54 <fresheyeball> https://hackage.haskell.org/package/network-simple-0.4.0.5/docs/Network-Simple-TCP.html
17:54 <fresheyeball> this looks good
17:55 <monochrom> Fortunately, dailywtf can be your reference for programmer sanity :)
17:55 <fresheyeball> but I can't tell what happens if the connection fails
17:55 <_sras_> fizruk: Yes. But every `Form` has a bunch of possible errors inside it. Like "Field x should be less than 10" which are displayed when a validation fails. If I can get all possible such errors for a filed, I think that should be enough..
17:55 <sproingie> eh. i think programming at all tends to make one's sanity suspect
17:55 <fizruk> _sras_: as a part of description you mean?
17:55 <_sras_> fizruk: Yes.
17:57 raynold joined
17:57 sordina1234 joined
17:58 <fizruk> _sras_: ah, those errors are not statically available
17:59 <fizruk> _sras_: they depend on input
17:59 <cocreature> fresheyeball: if you only need the client side, the "connection" package is quite nice
18:00 <_sras_> fizruk: How did you figure that out?
18:01 <fizruk> _sras_: there's this example in the docs: http://lpaste.net/3766601716326203392
18:01 <fizruk> _sras_: see how validate returns Error based on the input it gets
18:02 pranitbauva1997 joined
18:03 patbecich joined
18:03 fortruce joined
18:03 <fizruk> _sras_: also, if you look at FormTree definition you see that (Result v a) (a type that contains Error constructor) only appears in Map constructor like this
18:03 <_sras_> fizruk: Yes
18:03 <fizruk> _sras_: Map :: (b -> m (Result v a)) -> FormTree t v m b -> FormTree t v m a
18:03 taksuyu joined
18:04 mmachenry1 joined
18:04 <fizruk> _sras_: and you cannot extract Error's from a value of type (b -> m (Result v a))
18:04 <_sras_> fizruk: Yes.
18:04 <_sras_> See it now
18:05 metaporia joined
18:06 iAmerikan joined
18:07 pie_ joined
18:07 jer1 joined
18:07 <bloogie> Is it ever the case for any Monad that pure and return are different?
18:07 chaosmasttter joined
18:07 armyriad joined
18:07 <geekosaur> no
18:08 <geekosaur> the current arrangement allows it to be possible, which is a wart because a _lot_ of stuff will break if someone accidentally does make them different
18:08 ertes joined
18:09 <geekosaur> but the current arrangement is a compromise between history and correctness, intended to make it easier to adapt old code to the new Monad constraints
18:09 <bloogie> I saw someone use pure inside IO, is that weird?
18:10 <geekosaur> that is: you can currently retrofit an Applicative instance onto an old Monad that lacks one with: instance Applicative MyOldMonad where pure = return; <*> = ap
18:10 <pikajude> not really
18:10 drewbert joined
18:10 <pikajude> it's 2 letters shorter
18:10 alx741 joined
18:11 <geekosaur> as for using pure with IO, that is not weird and there are arguments for making that the default arrangement (specifically: we made Applicative a prerequisite for Monad for a reason; using 'pure' instead of 'return' supports that reason)
18:11 <geekosaur> but, currently it causes a bit of confusion, again relating to that compromise I mentioned
18:11 <ggVGc> isn't pure always "return" in the context of monads?
18:11 caumeslasal joined
18:11 dm3 joined
18:11 <pikajude> yes
18:11 <ggVGc> I mean, foramlly?
18:11 <geekosaur> that was what started this line of discussion, ggherdov
18:12 <geekosaur> er
18:12 <geekosaur> that was what started this line of discussion, ggVGc
18:12 <ggVGc> alright
18:12 <ggVGc> this confused me "if someone accidentally does make them different"
18:12 <pikajude> does ggVGc mean delete everything?
18:12 <ggVGc> but now I see "accidentally"
18:12 dreis joined
18:12 <ggVGc> because, it would be an error to do so, right?
18:12 <ggVGc> pikajude: http://ggvgc.com
18:12 <bloogie> pikajude: and start editing
18:13 Sh4rPEYE joined
18:13 <ggVGc> personally I never use return
18:13 <geekosaur> it would logically be an error, but the compiler can;t check it for you because that would also prevent, or at least complicate, the Applicative retrofit I mentioned
18:13 <ggVGc> I think pure makes much more sense
18:13 <ggVGc> even if the name isn't that great either
18:13 <ggVGc> geekosaur: yeah . I understand the discussion now
18:13 castlelore joined
18:13 castlelore joined
18:13 <bloogie> "makes much more sense" what does this mean?
18:14 <geekosaur> it's better than 'return'. I mean we still get newcomers who think 'return' is a control structure
18:14 <ggVGc> bloogie: for me personally, "pure" is more what it actually is
18:14 shangxiao joined
18:14 <ggVGc> "return" feels awkward
18:14 <bloogie> what is it, *actually*?
18:14 <EvanR> in parsers, return reads sanely
18:14 <geekosaur> I file the naming of 'return' into "cute idea. too cute."
18:14 <EvanR> i <- parseNumber; s <- parserString; return (i,s)
18:15 <bloogie> geekosaur: but confusing to newbies, no?
18:15 <ggVGc> bloogie: in my understanding the identity value of a context
18:15 <EvanR> like a control structure
18:15 <EvanR> but not
18:15 <ggVGc> or, well
18:15 <geekosaur> siiigh
18:15 <ggVGc> yeah, my theory isn't that strong
18:15 <bloogie> ggVGc: isn't that what eta also is?
18:15 <ggVGc> I don't know how to express myself
18:15 <geekosaur> bloogie, that;s what I said about 3 messages earlier...
18:15 mac10688 joined
18:15 <bloogie> geekosaur: heh, sorry
18:15 <ggVGc> bloogie: I don't think I have a strong argument for why I prefer pure over return. It just feels more reasonable tome
18:16 <ggVGc> I don't understand the reasoning behind naming "return" that
18:16 geekg_000 joined
18:16 <ggVGc> I mena, I kind of do
18:16 <ggVGc> but it doesn't feel right
18:16 <EvanR> its what all the cool kids are doing
18:16 <Tuplanolla> We should rename `pure` to the even shorter `bye`.
18:16 <fizruk> Tuplanolla: "ok"
18:17 <Tuplanolla> Also `threadDelay` should be `relax`.
18:17 <EvanR> overloaded whitespace
18:17 wroathe joined
18:17 <Tuplanolla> I haven't found a spot for `expandafter` yet though.
18:18 <ggVGc> pureM = pure
18:18 ziocroc joined
18:18 takle joined
18:19 <monochrom> Did the v and V commands exist in vi before vim?
18:19 <ggVGc> no idea
18:19 <ggVGc> I'm not that ancient here on earth :)
18:19 <monochrom> Because I learned vi 25 years ago, and didn't learn v or V, and if it existed back then, this is very embarrassing.
18:19 cyborg-one joined
18:19 <ggVGc> I feel dirty every time I use visual mode
18:19 <fresheyeball> https://hackage.haskell.org/package/network-simple-0.4.0.5/docs/Network-Simple-TCP.html
18:19 <ggVGc> but I still like having it around
18:20 abroz joined
18:20 <fresheyeball> `connect "localhost" "8080"` fails with `NoSuchThing`
18:20 <fresheyeball> but the servant client there works!
18:20 <fresheyeball> AND I'm getting the info for both from the same ClientEnv type
18:20 drewbert joined
18:20 <ggVGc> monochrom: I've been using vim daily for about a decade, but I still learn new embarressing things
18:20 <fresheyeball> wtf yo!
18:20 <ggVGc> it took me years to learn zz, za, z<cr>
18:20 beanbagula joined
18:20 <ggVGc> and since then I use it all the time
18:21 <monochrom> Because I have always had to use m ' a to mark a region and call it a (without the aid of highlighting) before I copied and pasted.
18:21 <ggVGc> wait, not za
18:21 <ggVGc> that's folds and that's crap
18:23 uglyfigurine joined
18:24 ludat joined
18:27 jer1 joined
18:27 leat joined
18:28 grayjoc joined
18:28 hybrid joined
18:29 asthasr_ joined
18:29 grayjoc joined
18:29 rkazak joined
18:30 grayjoc joined
18:30 <Tuplanolla> People always praise Vim's expressiveness, but I find myself often wishing it was more complete consistent, like Haskell with J syntax.
18:31 flatmap13 joined
18:31 grayjoc joined
18:31 <Tuplanolla> Complete and consistent.
18:31 grayjoc joined
18:32 Scip joined
18:32 flatmap13 joined
18:33 Guest10 joined
18:34 <Sonolin> yea vim isn't that great on consistency
18:34 <Sonolin> I mean, its consistent with itself I guess..
18:35 mstruebing joined
18:35 <Tuplanolla> There's no reason not to treat the key binding scheme as a programming language.
18:35 <Sonolin> I quite like how qutebrowser does keybindings
18:36 <Sonolin> unfortunately it leads to some things not being quite possible due to leaky Abstraction
18:36 ph88 joined
18:36 connrs joined
18:39 AlphaAtom joined
18:39 xall joined
18:40 dm3 joined
18:41 oish joined
18:41 yellowj joined
18:42 sanitypassing joined
18:44 ph88 joined
18:46 t7 joined
18:47 castlelore joined
18:47 drewbert joined
18:48 jer1 joined
18:50 jgt3 joined
18:50 castlelore joined
18:50 castlelore joined
18:53 <MitchellSalad_> hey, is uniplate still the preferred/recommend SYB library?
18:53 raatiniemi joined
18:55 <glguy> umiplate has been subsumed by lens
18:55 <ph88> and for some things you can use GHC.Generics
18:55 alx741 joined
18:57 rkazak joined
18:57 juanpauc_ joined
18:59 abroz joined
19:00 buttbutter joined
19:00 dm3 joined
19:00 uglyfigurine joined
19:01 <eacameron> My memory escapes me. Didn't Michael Snoyman make a library with MonadBracket or something similar?
19:01 <eacameron> Recently?
19:03 xcmw joined
19:03 mizu_no_oto joined
19:04 <eacameron> Oh, he added it to foundation. :( I want it! But I'm not using foundation.
19:04 <cocreature> eacameron: he wrote a blogpost on it. I haven’t seen a library
19:04 <MitchellSalad_> i think that was a blog post about what the type of bracket might be generalized to
19:04 uelen joined
19:04 <eacameron> I found the post: https://www.fpcomplete.com/blog/2017/02/monadmask-vs-monadbracket
19:05 phyrex1an joined
19:05 <eacameron> Is foundation gaining a lot of traction then?
19:06 laplacian joined
19:06 <eacameron> I've seen PRs from snoyberg and ndmitchell recently
19:07 <MitchellSalad_> last I looked (around when it was first uploaded), the api seemed sloppy
19:07 <MitchellSalad_> i mean, what's the point of this... https://hackage.haskell.org/package/foundation-0.0.9/docs/Foundation-VFS.html
19:07 geekg_000_ joined
19:08 ralu joined
19:08 agjacome joined
19:08 <eacameron> :shrug:
19:08 jer1 joined
19:09 angelos joined
19:10 <davean> eacameron: Its in the FPCO "group" so you'd always expect PRs from them
19:10 <eacameron> davean: You mean fpco has adopted it?
19:11 geekg_000 joined
19:11 myhask joined
19:12 <myhask> hi all, is there a haskell expert who has time to help a beginner for some minutes? :)
19:12 <cocreature> myhask: just ask your question directly :)
19:13 <MitchellSalad_> myhask: I'm an expert
19:14 <myhask> i had my first lecture in functional programming. we are using haskell to develop some code. after about 2 hours of our lecture, we got a task what we have to solve until next week.
19:14 <myhask> We have to create a function which return the derivative of an rational function
19:14 <Tuplanolla> Is this really an expert-level question, myhask?
19:14 <myhask> i don't know ..
19:15 <Tuplanolla> Considering it's homework the answer is no.
19:15 mrkgnao joined
19:15 <myhask> yeah, but no one knows how to solve that ..
19:15 <eacameron> Tuplanolla: I can imagine PhD homework that would be expert ;)
19:15 <myhask> the lecture was very confusing ..
19:15 billxtn joined
19:16 <james999> myhask: what country are you in?
19:16 xall joined
19:16 <myhask> germany
19:16 psychicist__ joined
19:17 <james999> ah ok i didn't think that many ppl there spoke eng
19:18 |Kin| joined
19:18 <myhask> MY current code:
19:18 <myhask> data Term = Monom(Int, Int)
19:18 <myhask> | Addition[Term] deriving Show;
19:19 <myhask> diff :: Term -> Term
19:19 <myhask> diff (Monom(a,b)) = if b>0 then Monom(a*b, b-1) else Monom(0,0)
19:19 <myhask> diff (Addition(x:xs)) = diff(x)
19:19 <cocreature> myhask: please use http://lpaste.net/ and only post the link here
19:19 baldrick1 joined
19:19 <myhask> https://thepasteb.in/p/oYhlWXr5POZfZ
19:19 <james999> also i hate to be the buzzkill here, but this homework q is so ivory tower
19:19 <davean> myhask: thats just symbolic differentiation?
19:19 <Tuplanolla> Are the anti-spam measures less stringent these days?
19:20 <james999> how often do you do symbolic differentiation in practice
19:20 <myhask> yes, symbolic differentiation
19:20 <Tuplanolla> I've seen less people getting kicked out for pasting code lately.
19:20 <davean> myhask: Its a very well explored area, I'm not sure what you mean "no one knows how to solve that"
19:20 <davean> myhask: its solved all over the place
19:20 fizruk joined
19:21 cretiq joined
19:21 <shapr> james999: I think only when you do math
19:21 <myhask> no one in my class.. i know a lot of people already solved that, but using code whats not allowed for use
19:21 <geekosaur> Tuplanolla, that is something that is pretty much impossible to automate
19:21 JakePeralta joined
19:21 <geekosaur> it was tighter than that some time back.
19:21 <JakePeralta> hi
19:21 <davean> myhask: you know how to do a symbolic derivative, right?
19:21 <geekosaur> people using evalbots were getting kicked
19:22 <myhask> sure
19:22 <davean> myhask: Then I'm confused as to what your question is
19:22 <davean> myhask: theres ways to make it prettier
19:22 <shapr> My 300 person employer makes money entirely off doing derivatives of audio.
19:22 Zoddo joined
19:22 <davean> myhask: are you asking how to make it not need special encoding?
19:24 <myhask> using GHCI and calling "diff(Addition([Monom(1,2), Monom(2,3)]))", it returns "Monom(2,1)", but i would like to see "Monom(2,1),Monom(6,2)"
19:24 chaosmasttter joined
19:25 darjeeli1 joined
19:25 da-x joined
19:25 freusque joined
19:25 <davean> what is Monom?
19:25 <pgiarrusso_> Monom(a, b) represents monomial a * x^b, right?
19:26 <myhask> yes
19:26 <pgiarrusso_> myhask: diff (Addition(x:xs)) = diff(x) seems wrong, why?
19:26 <pgiarrusso_> and explains why diff(Addition([Monom(1,2), Monom(2,3)])) does not work
19:27 <myhask> that's what i don't know and would like to learn -.-
19:27 <pgiarrusso_> I think you might want diff (Addition (xs)) = Addition (map diff xs)
19:27 <myhask> map keyword is not allowed to use :O
19:28 <davean> map isn't a keyword
19:28 <pgiarrusso_> myhask: sorry, I read up on your description
19:28 <pgiarrusso_> does your task say to not use map?
19:29 <davean> ... in which case does it say not to use fmap?
19:29 <pgiarrusso_> that's cheating
19:29 jer1 joined
19:29 <davean> pgiarrusso_: its implimenting it with quality :-p
19:30 <myhask> the only "keywords" we learned are: [], head, tail, let, where, nameles functions, type, data
19:30 <myhask> all other "keywords" or functions are not allowed
19:30 <pgiarrusso_> you're using (x:xs), seems like that's forbidden
19:30 <davean> myhask: none of those are keywords, and its important they aren't keywords, but at least we understand the requirements now :)
19:30 <davean> myhask: So, its ugly but you can impliment map with that
19:31 <davean> you just need to use head and tail
19:31 <davean> and recuse
19:31 afarmer joined
19:31 <pgiarrusso_> myhask: they taught you recursion also?
19:31 <myhask> yes
19:31 zv joined
19:31 <myhask> but only 1 simple example
19:32 <pgiarrusso_> OK, given you had 2 hours of Haskell, maybe the next thing you should do
19:32 JagaJaga joined
19:32 <* shapr> recuses himself
19:32 <pgiarrusso_> is implement mapDiff :: [Term] -> [Term]
19:32 <pgiarrusso_> mapDiff should take a list of terms and return a list of differentiated terms
19:33 <pgiarrusso_> if the example was a recursive function on lists, this one is probably going to be similar
19:33 <pgiarrusso_> would you paste the example you got?
19:33 <myhask> this one? diff(Addition([Monom(1,2), Monom(2,3)]))
19:33 <pgiarrusso_> myhask: just to phrase the answer in terms close to what you learned
19:34 <pgiarrusso_> no, I mean the example of recursion
19:34 <pgiarrusso_> recursive functions on lists are similar
19:34 <myhask> ok, moment
19:34 <pgiarrusso_> (An important class of recursive functions)
19:34 uglyfigurine joined
19:35 Itkovian joined
19:35 jbeigel joined
19:36 mada joined
19:36 <myhask> https://thepasteb.in/p/76hE7mAw4OKCV
19:36 thang1 left
19:37 <pgiarrusso_> myhask: OK, mapDiff is somewhat similar to len0 there
19:38 <mniip> huh
19:38 <mniip> len0 is not strict in n
19:38 <mniip> you get no gain
19:38 dsh joined
19:38 <pgiarrusso_> mniip: he got 2 confusing hours of Haskell
19:38 <mniip> ah alright
19:38 <pgiarrusso_> as a skeleton, I'd use
19:38 <pgiarrusso_> mapDiff [] = ?
19:39 <pgiarrusso_> mapDiff x : xs = ... x ... mapDiff xs ...
19:39 <pgiarrusso_> those on the right are placeholder where to put code
19:39 <pgiarrusso_> and now, you want to write mapDiff so that it creates a new list, where each x was transformed with diff
19:40 Ronja joined
19:40 <byorgey> pgiarrusso_: need parens around (x : xs)
19:40 <myhask> yes, it's still confusing :O
19:40 <pgiarrusso_> myhask: my idea is to use mapDiff to implement diff (Addition xs)
19:40 <pgiarrusso_> byorgey, you're right, sorry
19:41 <pgiarrusso_> mapDiff (x : xs) = ...
19:41 Ronja joined
19:41 <pgiarrusso_> myhask: don't worry, that's normal...
19:41 mstruebing joined
19:41 <pgiarrusso_> first, did they actually explain len0? Probably not well I guess
19:41 cpup joined
19:42 <mniip> whoever wrote that len0...
19:42 <myhask> len0 is to count the number of elements of a list
19:42 <pgiarrusso_> myhask: good, but can you explain (to yourself) how it works?
19:42 Ronja joined
19:44 <myhask> yes, when i see the code, i can understand what happens and why
19:44 <pgiarrusso_> myhask, BTW: I'm not sure what your doubts are, so feel free to explain what is clear and what isn't
19:44 StoneToad joined
19:44 <Guest10> Is there a type class for "flipped" profunctors (covariant in first type argument, contravariant in the second)?
19:44 leat joined
19:45 <myhask> Ok, looking at this example, i don't know how to "call" the function diff for all elemnts of x:xs
19:45 <myhask> diff (Addition(x:xs)) = diff(x)
19:45 <pgiarrusso_> myhask: BTW, let me add that diff (Monom(a,b)) = if b>0 then Monom(a*b, b-1) else Monom(0,0) is correct :-)
19:45 <pgiarrusso_> myhask: OK, good question.
19:46 <pgiarrusso_> But you call it on x, right?
19:46 KaneTW joined
19:46 <pgiarrusso_> you did that already, indeed
19:47 <pgiarrusso_> myhask: in my template, I wasn't clear probably
19:47 <pgiarrusso_> when I write mapDiff x : xs = ... x ... mapDiff xs ...
19:47 <pgiarrusso_> sorry
19:47 <pgiarrusso_> mapDiff (x : xs) = ... x ... mapDiff xs ...
19:47 sampuka joined
19:47 Darulo joined
19:48 <pgiarrusso_> I mean that the code after the equal (the right hand side of the equation) uses mapDiff xs
19:48 xcmw joined
19:48 {emptyset} joined
19:48 <pgiarrusso_> myhask: because the idea is that, to call diff on all elements of x : xs, you call it on one element x
19:49 <pgiarrusso_> and then you call some helper function (mapDiff)
19:49 <lyxia> Guest10: that doesn't sound very useful
19:49 peterbecich joined
19:49 <pgiarrusso_> myhask, and that helper function calls diff on all elements of xs
19:49 jer1 joined
19:50 <myhask> how do i have to extend my code?
19:50 <Guest10> lyxia: Useful-ish if you want to have a `Contravariant` instance on the partially applied type constructor? But yeah, agreed, just wanted to make sure I wasn't saying something technically incorrect to a friend I'm helping
19:50 <pgiarrusso_> let me try one more hint before the solution:
19:51 <pgiarrusso_> one thing you can write (though it's not the right one)
19:51 <pgiarrusso_> is
19:51 <pgiarrusso_> mapToZero [] = []
19:51 <pgiarrusso_> mapToZero (x : xs) = Monom(0,0) : mapToZero xs
19:52 <pgiarrusso_> myhask: this function transforms all elements of the input list, by replacing each with Monom(0, 0) (a stupid transformation, yes, sorry I don't have a better example).
19:53 <myhask> hm..
19:53 <pgiarrusso_> Then you can write (again, not correct)
19:53 <pgiarrusso_> diff :: Term -> Term
19:53 peterbecich joined
19:53 <pgiarrusso_> iff (Monom(a,b)) = if b>0 then Monom(a*b, b-1) else Monom(0,0)
19:53 <pgiarrusso_> sorry
19:53 <pgiarrusso_> diff (Monom(a,b)) = if b>0 then Monom(a*b, b-1) else Monom(0,0)
19:53 <lyxia> Guest10: Okay. I don't know of any standard one.
19:53 <pgiarrusso_> diff (Addition xs) = Addition (mapToZero xs)
19:54 flatmap13 joined
19:54 <pgiarrusso_> myhask: this is *not* the solution (you need mapDiff instead)
19:54 <pgiarrusso_> but it's close
19:54 <pgiarrusso_> and you can run it and see what it does
19:55 yellowj joined
19:55 <pgiarrusso_> what matters is that mapToZero xs does something for each element of xs by calling itself recursively
19:55 carlosda1 joined
19:55 <myhask> ok, i run this code..
19:55 <Guest10> lyxia: Thanks! By the way, do you know if anything would go wrong if you could do things like `instance Contravariant (_ -> b) where ...`? My feeling is that it would be consistent but resolution might be tough
19:56 fizruk joined
19:56 <myhask> load failed due to "variable not in scope: mapToZero "
19:56 uelen joined
19:57 <lyxia> Guest10: I haven't thought about this before, but that sounds pretty interesting.
19:58 tefter joined
19:58 juanpaucar joined
19:59 merijn joined
19:59 <pgiarrusso_> myhask, ah wait
19:59 <pgiarrusso_> did you give first the definition of mapToZero I typed?
19:59 <pgiarrusso_> mapToZero [] = []
19:59 <pgiarrusso_> mapToZero (x : xs) = Monom(0,0) : mapToZero xs
20:00 <byorgey> Guest10, lyxia: that opens a giant can of worms. type-level lambdas can make type inference undecidable. Also, Scala allows this kind of notation at the term level and it is terrible because you have to introduce all sorts of heuristics to determine the scope
20:00 <Darulo> hello
20:00 <Darulo> i was wondering
20:00 <pgiarrusso_> only then you can try to define diff, because it uses mapToZero
20:00 <Darulo> what is haskell
20:00 <myhask> ah, ok. i added this definition and now i compiles
20:00 <pgiarrusso_> myhask +1
20:00 <byorgey> Darulo: Haskell is a programming language
20:00 <byorgey> Darulo: https://www.haskell.org/
20:01 <myhask> we are coming closer :) im getting 2 results back :)
20:01 <pgiarrusso_> myhask, what's important is that you understand the idea
20:01 <Guest10> byorgey: Thanks for the response! To be clear, is the `_ -> b` notation the problem or would a type-level lambda notation make scope simple to determine?
20:01 <Darulo> byorgey , what sets haskell apart for all the other programming languages
20:02 <pgiarrusso_> myhask, but those results are the wrong Monom, they are Monom(0,0)
20:02 gawen joined
20:02 <pgiarrusso_> also, mapToZero does not call diff
20:02 uglyfigurine joined
20:02 <byorgey> Guest10: using underscores for implicit lambda arguments causes scope problems. If you had a notation like (\a => (a -> b)) that wouldn't have scope problems, just the usual problems with type-level lambdas
20:03 <pgiarrusso_> but you want mapDiff to call diff
20:03 <myhask> ok, so i have to replace "Monom(0,0)" with "diff(x)"?
20:03 <Darulo> byorgey , what sets haskell apart for all the other programming languages
20:03 <pgiarrusso_> myhask, yep
20:03 <ertes> Darulo: put with as few technicalities as possible: it puts a lot of emphasis on principled abstractions and makes them exceptionally cheap, both in terms of code size and performance
20:03 <byorgey> Darulo: it is functional, lazy, and strongly typed
20:03 ^bschafer1 joined
20:03 <Darulo> like perl
20:03 <pgiarrusso_> (you can write it diff x instead of diff(x) BTW)
20:04 <lyxia> Guest10: You have to give up the fact that `f a ~ g b` implies `f ~ g` and `a ~ b`, I can't imagine working without that.
20:04 <myhask> it works!!
20:04 <ertes> Darulo: abstractions not in terms of "hide this thing and make a safe interface", but in terms of: "these things are instances of this common concept, so we can stop repeating ourselves"
20:04 <myhask> thank you very much!!
20:04 <ertes> Darulo: so it's not the perl kind of "abstraction"
20:05 <Guest10> byorgey: OK, got it! Is it different in kind to type inference problems with GADTs or RankNTypes, or similar?
20:05 <pgiarrusso_> myhask: I'm happy it helped
20:05 <Guest10> lyxia: Oh wow! Could you say a little bit more about why or point me somewhere where I can find out?
20:07 Darulo left
20:07 iAmerikan joined
20:07 cdg joined
20:07 <byorgey> Guest10: it's worse. What lyxia said.
20:07 sampuka joined
20:07 <shapr> I guess Darulo was unimpressed.
20:07 <byorgey> I am not at all clear whether Darulo was genuinely curious, or trying to troll
20:07 a3Dman joined
20:07 <myhask> @pgiarrusso_ So the logic is: we create an empty variable "map to zero" and calculate the diveration by and resursive function
20:07 <lambdabot> Unknown command, try @list
20:07 <ertes> me neither
20:08 <byorgey> *shrug*
20:08 <shapr> byorgey: I think he ended up in the wrong channel entirely.
20:08 <myhask> pgiarrusso_: right?
20:08 <ertes> but if they were trying to troll, we resisted very well =)
20:08 <shapr> We've had a surprising number of people who just joined all the largest channels on this irc network, and have no idea.
20:09 <pgiarrusso_> myhask, well, "mapToZero" wasn't a great example... and not sure what's the diveration (differentiation?)
20:09 <pgiarrusso_> but well, the recursive skeleton is the important part
20:10 <lyxia> Guest10: you have "(_ -> b) a = (a -> _) b", and now you can't just decompose the application.
20:10 jer1 joined
20:10 <pgiarrusso_> to do something on all elements of a list, you write your recursive function
20:10 juanpaucar joined
20:10 <pgiarrusso_> f [] = something
20:10 <myhask> pgiarrusso_ thanks again for your help! i spent about 5 hours to solve this "little problem".. i'll try to understand it tomorrow..
20:11 <pgiarrusso_> f (x : xs) = do something with x, and f xs
20:11 <Guest10> lyxia: Ah right, of course. Would there maybe be an equivalent to pattern synonyms / views that could avoid this?
20:11 <pgiarrusso_> myhask after only two hours I'm not surprised
20:11 <ertes> perhaps it was a bot that was running an algorithm to populate its facts database: join #x, say: "what is x?", wait for "x is an A", respond "what sets x apart from other A?", collect responses, leave, repeat with a different x
20:12 <myhask> pgiarrusso_ yes, but my prof says he'll evaluate our results..
20:12 <pgiarrusso_> myhask, I'd recommend trying to work with others (students, teachers, ...) if you can somehow...
20:12 <pgiarrusso_> ah right, that's homework
20:12 <pgiarrusso_> still, you need some chance to practice with others sitting next to you, so you can help each other
20:13 <myhask> pgiarrusso_ yes, but as you said, it's hard to solve such an excercise after only 2 hours of lecture
20:13 <pgiarrusso_> this course seems a bit too fast, but I won't second-guess teachers with so little info
20:13 uglyfigurine joined
20:14 <Guest10> (Looks like type lambdas could exist in instance heads without such severe undecidability: https://link.springer.com/chapter/10.1007/978-3-319-39110-6_4)
20:14 juanpauc_ joined
20:14 <myhask> pgiarrusso_ thanks again! i'll leave this channel now! bb
20:15 jacereda` joined
20:16 <Ulrar> So, dumb question, how do I use writeIORef ? Seems like it wants an IO Integer, so I need to add IO to my Integer ?
20:16 <ertes> :t writeIORef
20:16 <lambdabot> error:
20:16 <lambdabot> • Variable not in scope: writeIORef
20:16 <lambdabot> • Perhaps you meant ‘writeSTRef’ (imported from Data.STRef)
20:17 <ertes> :t Data.IORef.writeIORef
20:17 <lambdabot> GHC.IORef.IORef a -> a -> IO ()
20:17 akh joined
20:17 <ertes> Ulrar: do you understand this type signature?
20:17 <Ulrar> Yeah, that's not what the doc says
20:17 <Ulrar> Still : Expected type: IO Integer
20:17 <ertes> it probably is, but without the "GHC.IORef."
20:17 <lyxia> Guest10: oh, good find!
20:17 <ertes> Ulrar: do you have code that fails?
20:18 <Ulrar> Oh, wait.
20:18 darjeeli1 joined
20:19 wroathe joined
20:20 drewbert joined
20:20 kareeeeem joined
20:21 tomphp joined
20:22 saurik joined
20:24 xinming joined
20:25 prophile joined
20:26 conal joined
20:26 argent0 joined
20:28 raichoo joined
20:29 <WarmCookie> Applying two arguments (your reference and the val to write) as in `writeIORef foo val` is supposed to give you an action of type :: IO ()
20:29 <glguy> (Functions are applied to arguments)
20:30 <WarmCookie> s/Applying/Supplying/
20:31 jer1 joined
20:31 <Ulrar> Yeah it's my bad, looked at it again and I realised I actually changed a bit of code, and line numbers changed
20:31 <Ulrar> I was looking at the wrong line for that error :)
20:32 micmus joined
20:32 <byorgey> Guest10: oh, interesting indeed. I wasn't aware of that paper.
20:32 <WarmCookie> Ulrar: Any way we can help with the line that's bogus then?
20:32 mizu_no_oto joined
20:33 pookleblinky joined
20:35 <geekosaur> (also, it's incorrect, twcc dropped one world sports for it. but their sked says all three scheduled games are oostende-anderlecht...)
20:35 dm3 joined
20:35 Deewiant joined
20:36 pranitbauva1997 joined
20:39 fotonzade joined
20:39 <Tuplanolla> Foreign code question: is `void (*)(void*, int*)` equivalent to `void (*)(void* restrict, int* restrict)`?
20:40 lgas joined
20:40 <monochrom> Yes.
20:41 <james999> "foreign code"... o_0
20:41 <Ulrar> WarmCookie: Figured it out, I was using map instead of mapM
20:41 <monochrom> For type sigs. But I think you mean type sigs.
20:41 <Ulrar> Made a lot more sense when I realised the line with the actual problem
20:42 <Tuplanolla> Yes. I wasn't sure how `void*` aliases other pointers.
20:43 <ReinH> Ok, who is Guest10?
20:43 <monochrom> Actually this one is "in type sigs, parameter names are optional"
20:44 <Tuplanolla> How is that related?
20:44 <monochrom> Hrm, I guess I am wrong. I thought "restrict" was parameter name. Is it a keyword?
20:44 <Guest10> ReinH: ?
20:44 <geekosaur> monochrom, remember ritchie's "noalias must go"? he lost
20:45 xcmw joined
20:45 Itkovian joined
20:45 peterbecich joined
20:46 bjz joined
20:46 <ReinH> Guest10: just wondering if you usually go by a different name
20:46 <geekosaur> (restrict means the pointer is "guarateed" not to be an alias, which in this case means the memory referenced by the (void *) will not overlap that of the (int *)
20:46 <ReinH> other than, you know, guest
20:46 <Guest10> ReinH: No, I don't use IRC. Just visiting :)
20:46 <ReinH> Ok :)
20:47 <geekosaur> or at least that the compiler is free to generate code with that assumption
20:48 <monochrom> Then I don't know whether the two type sigs are equivalent. But I know that Haskell FFI doesn't know the difference. No such concept there.
20:48 coltfred joined
20:48 <geekosaur> anyway I think there is no guarantee given by the FFI that that is true, so I would not expect you can say those are equivalent
20:48 <monochrom> Hell, it is not even going to tell apart int* and void*
20:49 <geekosaur> I mean, the ffi doesn't check that you didn't use castPtr to pass the same array as both parameters
20:49 <geekosaur> so it can't assert "restrict"
20:49 <glguy> Tuplanolla: Is the question if the calling convention is the same for those two types of function pointers?
20:49 <geekosaur> that said, note that "restrict" is an optimization hint, not a storage modifier
20:49 <geekosaur> the calling convention does not change, all it does is tell the compiler it can make some otherwise questionable optimizations
20:50 <Tuplanolla> I was just wondering if it's safe to treat the the same, like the case of `void (*)(long int*, int*)` and `void (*)(long int* restrict, int* restrict)`.
20:50 <monochrom> Haha, the open problem of static analysis of C has been closed by human annotation.
20:50 <geekosaur> now, if the actual question is "can I call a function declared that way?", the answer is "yes, but it;s on you as the caller to make sure the (void *) and (int *) are not overlapping"
20:50 <glguy> Tuplanolla: It's safe import them and use them from the Haskell FFI the same way
20:50 abroz joined
20:51 <Tuplanolla> Okay, great.
20:51 jer1 joined
20:52 Ronja2 joined
20:53 sproingie joined
20:53 sproingie joined
20:53 bonz060 joined
20:54 <EvanR> i see how you can memoize function results using recursion, but is it also possible to forget using recursion, depending on the memoization and current input?
20:54 <bonz060> Just a very random question. I'm sort of new here. Why is haskell so amazing?
20:54 <EvanR> i.e. undo the memoization to save space
20:54 uglyfigurine joined
20:54 <monochrom> Haskell is not amazing. But I like Haskell anyway.
20:54 emmanuel_erc joined
20:54 <monochrom> No programming language is amazing. Period.
20:55 Mibaz joined
20:55 <Ronja2> can anyone help me with the differentiation of a product?
20:55 <EvanR> the haskell project and ghc is kind of amazing
20:55 <monochrom> Do not be so easily amazed. Lest I could amaze you by simply running a fizzbuzz program.
20:55 <glguy> I mentioned it earlier, but maybe someone will find this neat, its a browser-based demonstration of my config-schema package that compiles either to javascript via ghcjs or an app bundle for mac via ghc: https://github.com/glguy/config-app/blob/master/Main.hs https://glguy.net/~pi/result/ (the app bundle half is new since last time I mentioned it)
20:55 <Ronja2> I already got help from the community concerning the differentiation of a sum, now I am struggling again :(
20:55 inad922 joined
20:56 zero_byte joined
20:57 <byorgey> EvanR: https://hackage.haskell.org/package/base-4.9.1.0/docs/System-Mem-Weak.html
20:58 <byorgey> EvanR: though that doesn't really give you control over what gets deleted when
20:58 <Mibaz> Trying to learn FRP. Want to avoid arrows. Tried Netwire but I was told it was deprecated. Are wires and reactive-banana the two implementation options currently?
20:59 conal joined
20:59 <koala_man> tbh, even fizzbuzz is amazing. we shouldn't take computers for granted.
20:59 <byorgey> Mibaz: there's also reflex and frpnow
20:59 <EvanR> byorgey: right... i mean i could also unsafePerformIO over an MVar too
20:59 <monochrom> Ah, next time I'll try Eliza instead.
21:00 ertesx joined
21:00 yqt joined
21:00 <byorgey> EvanR: ok, right. Well, I'm not sure I understand well enough what you mean by "memoize using recursion" to answer your real question then.
21:01 <EvanR> https://wiki.haskell.org/Memoization memoized_fib on this page
21:01 <Mibaz> byorgey: thanks!
21:02 <EvanR> im sure if i understood how this memoized fib worked i could answer my own question
21:02 <Mibaz> If anyone has preferences on banana / wires / reflex / frpnow please let me know so I don't waste a bunch of time again ;)
21:02 <byorgey> EvanR: ok, then no, it's not possible to undo memoization in that case. It works by creating an infinite table of all results, and evaluating it lazily.
21:02 <byorgey> Lazily evaluated things only ever become more defined, not less.
21:02 <EvanR> interesting
21:03 <EvanR> this kind of ties into another thing, undoing lazy evaluation, returning thunks to an uncomputed state (to save space0
21:03 <EvanR> trade space for time
21:03 <kadoban> Mibaz: reflex is cool as hell, I haven't used any of the others. I looked at reactive banana briefly, but didn't really do anything with it.
21:05 LKoen joined
21:06 <Mibaz> kadoban: it does look cool. Just glancing at the platform readme I don't see any types more than 3 lines long so that's already an improvement
21:06 <EvanR> how to turn a boiled egg back into a raw egg ;)
21:06 <EvanR> haskell analogies ftw
21:07 rcschm joined
21:07 cpup joined
21:07 <monochrom> nanotechnology could go in, repair the proteins, and rejuvenate the egg again.
21:08 iAmerikan joined
21:08 kuribas joined
21:08 kmels joined
21:09 <Mibaz> frpnow doesn't look that well tutorial-ed for someone like me so I'll go Reflex. Wires barely has documentation
21:09 <hexagoxel> Mibaz: i am familiar with reflex and reactive-banana. imho banana is better for getting familiar with frp, while reflex seems a bit more "lower level".
21:09 <Mibaz> monochrom: How does this fit into the monad burrito?
21:10 <monochrom> It doesn't.
21:10 <hexagoxel> reflex tutorials are focused on web dev, but reflex+reflex-host are very similar to the reactive-banana interface; you can almost mechanically translate between the two in many cases.
21:10 sleffy joined
21:11 <hexagoxel> (i.e. reflex is not limited to web-dev at all)
21:11 LHoT10820 joined
21:12 <Mibaz> hexagoxel: Got it. Is reflex the library actually organized around web dev or just the community?
21:12 ChaiTRex joined
21:12 jer1 joined
21:12 flatmap13 joined
21:12 <hexagoxel> for the most part, the web-dev part is in reflex-dom.
21:12 anderson_ joined
21:12 <fresheyeball> Mibaz: reflex itself is just a library for reactivity
21:13 <fresheyeball> but its mostly used for web dev
21:13 <hexagoxel> although reflex-dom also contains some helper functions that have there uses for general-purpose UI dev.
21:13 <Mibaz> hexagoxel: fresheyeball: cool I just wanted to make sure it was general-purpose.
21:14 <ertes> nitpick: the API of reflex is actually very different from reactive-banana, but both are general purpose FRP libraries
21:14 augur joined
21:14 flatmap1_ joined
21:14 <fresheyeball> ertes: frp-zoo ftw
21:14 drewbert joined
21:14 <EvanR> heh
21:14 <hexagoxel> ertes: because reflex has Dynamic?
21:14 <EvanR> which is mostly js frpish things
21:15 flatmap13 joined
21:15 <fresheyeball> EvanR: what is?
21:15 <EvanR> frp-zoo
21:15 <fresheyeball> its all haskell no?
21:15 <Mibaz> I also want to avoid arrows after being warned away. I didn't see any arrows on the Readme, but Reflex doesn't use them heavily, does it?
21:15 augur joined
21:15 m0rphism joined
21:15 <fresheyeball> Mibaz: I see RecursiveDo in reflex, and not really Arrows
21:15 <EvanR> this is a different frp zoo
21:15 <ertes> hexagoxel: no, the controller interface is very different… reactive-banana is very much designed for callback-based toolkits, while reflex makes no such assumption and is more likely used in a "main loop" kind of way
21:16 <EvanR> what was i thinking of
21:16 <monochrom> frp botany?
21:16 wonko7 joined
21:16 <ertes> hexagoxel: in other words: reactive-banana takes control, and events fire by callbacks, while with reflex you fire the events imperatively within the loop
21:17 lifter joined
21:17 <fresheyeball> ertes: with Reflex how do you fire events?
21:17 <ertes> Mibaz: both are arrow-free
21:17 <ertes> "free" in the sense of "without" =)
21:17 <ertes> fresheyeball: you use the fireEvents* functions from Reflex.Host.Class
21:18 <Mibaz> fresheyeball: ertes: arrow-without, excellent!
21:18 <ertes> fresheyeball: reflex gives you an explicit state-machine-like interface
21:18 <fresheyeball> I've not used Arrows, but I hear people complain about them
21:19 <fresheyeball> what is so wrong with Arrows?
21:19 <hexagoxel> ertes: even with reflex-host? reactive-banana's newAddHandler is the same as reflex-host's newExternalEvent
21:19 mivael_ joined
21:19 <ertes> fresheyeball: they are inconvenient, and values (results/inputs) in arrows are not actually first class, but arrow notation pretends that they are
21:19 coot____ joined
21:20 <ertes> hexagoxel: i'm not really familiar with reflex-host
21:20 <ertes> i use reflex directly
21:20 wroathe joined
21:20 <hexagoxel> ertes: yeah, well. when just comparing reflex to reactive-banana, i'd probably agree with your assessment.
21:21 danthemy_ joined
21:22 <lifter> Is it common for people to essentially throw an unhandled exception for pattern match cases that they would consider to be "impossible" cases?
21:22 <monochrom> I would do that.
21:23 <glguy> Are you people?
21:23 <lifter> I guess I'm asking if doing so is a code smell.
21:23 <monochrom> I am people. :)
21:23 <lifter> glguy: Are you asking me?
21:23 <glguy> monochrom
21:23 <lifter> By "people" I just mean "Haskell programmers."
21:23 <monochrom> I am Caesar. Caesar does represent "people" in "senate and people of Rome" :)
21:23 <Tuplanolla> It depends on how impossible we're talking about here, lifter.
21:24 <tommd> I see it frequently. Some people take this as motivation to rework types, add a GADT, etc.
21:24 <lifter> OK
21:25 <monochrom> To be sure, I would also review "is there a better way?". But often there is no significantly better way.
21:25 <lifter> Right.
21:25 <glguy> It'd be easier to give feedback if you had a particular example in mind. Otherwise it's up to everyone's imagination to determine what impossible means
21:26 juanpaucar joined
21:27 <lifter> I'm afraid I don't have a specific example at the moment. Sounds like it's rather case-by-case, and that makes sense.
21:27 aspiwack[m] joined
21:27 zaphar_ps[m] joined
21:27 <monochrom> I don't think in terms of "code smell". I don't understand what the hell it is.
21:28 <jle`> lifter: by throw an exception, do you mean leave a case branch as undefined/bottom?
21:28 jascot[m] joined
21:28 bobjason[m] joined
21:28 jyp[m] joined
21:28 <lifter> What the hell what is?
21:28 <jle`> like 'error' ?
21:28 <monochrom> What I understand is "is perfection worth my time" and "is imperfection worth my time".
21:28 karroffel joined
21:28 <jle`> or do you mean throwing an actual IO exception in IO
21:28 hiq[m] joined
21:28 <lifter> jle`: Yeah I was thinking of calling "error".
21:28 <Tuplanolla> How about "everything is written in French", monochrom?
21:28 gillesmajor left
21:29 <monochrom> I don't know French.
21:29 wonko7 joined
21:29 <jle`> ah yeah. "throwing an exception" has a specific meaning in haskell
21:29 <monochrom> (But I will go watch Bon Cop Bad Cop anyway.)
21:29 alaradia[m] joined
21:29 rakete joined
21:29 seequ_ joined
21:29 <jle`> lifter: in that case if you are sure that the case is impossible, then you can use 'error' with a very good reason why you believe this case is impossible
21:29 bb010g joined
21:29 aer[m] joined
21:29 <jle`> maybe even including a human-readable proof explaining why the case is logically impossible
21:30 <jle`> but, in many cases in haskell, you can avoid such a situation by using better types.
21:30 <monochrom> Put the proof inside the error message, for maximum potential irony :)
21:30 <Tuplanolla> > error "nope" -- Good enough.
21:30 <lambdabot> *Exception: nope
21:30 <jle`> in many languages with weaker types, errors like what you describe come up often
21:31 cdg joined
21:31 <lifter> How about `error "sorry"`
21:31 albertus1 joined
21:31 <jle`> but in haskell, 90% of the time, you can have the *compiler* prove that certain cases are impossible, and so you don't need to explicitly handle it
21:31 <lifter> Or better yet `error "I'm sorry"`
21:31 <monochrom> That's the best error message ever. No one will kill you when you say "sorry" :)
21:31 <jle`> but that doesn't mean that there's the few exceptions in haskell where you have to not trust the compiler
21:31 nickolay_ joined
21:32 <jle`> um no pun intended
21:32 rcschm joined
21:32 <monochrom> oh haha didn't spot that one
21:32 sw1nn joined
21:32 jer1 joined
21:33 <lifter> These days the trend is to serve up error messages with cute mascots and shit, so I guess I ought to consider how to do that. Like "Oops we're sorry something went wrong!" with a pic of a cute bunny or some shit.
21:33 <ertes> lifter: throwing exceptions gets rid of the non-exhaustiveness warning, so i do that, too
21:33 <lifter> ertes: Yep.
21:33 <EvanR> imagine if video games did that
21:33 <ertes> lifter: however, sometimes it's possible to handle a case, even if it will never be seen in practice
21:33 dfeuer joined
21:33 <ertes> lifter: in that case i prefer to handle the case properly
21:33 <EvanR> sorry your save was deleted
21:34 <ertes> EvanR: if you consider GHC a video game…
21:34 juanpaucar joined
21:34 <ertes> GHC had a bug once that deleted your source files, if you had a type error
21:34 <EvanR> heh right, the legend that
21:34 <EvanR> yeah
21:34 <monochrom> then you can you TH to play a cute bunny video at compile time!
21:35 irisl joined
21:35 allenj12 joined
21:35 <monochrom> s/can you/can use/
21:35 <ertes> "are you stupid? expected A, inferred B… try again, idiot!"
21:36 <lifter> Haha just searched google images for "cute error messages", it's kind of barfy.
21:36 <ertes> that… reminds me of someone…
21:36 <ertes> who was it again?
21:36 <ertes> oh yeah!
21:36 <ertes> @src fnsiugnsig
21:36 <lambdabot> Source not found. My brain just exploded
21:36 <ertes> @src fnsiugnsig
21:36 <lambdabot> Source not found. Sorry.
21:36 <ertes> come on
21:36 <ertes> @src fnsiugnsig
21:36 <lambdabot> Source not found. Are you on drugs?
21:36 <monochrom> Make it cute lamb.
21:36 <ertes> there we go
21:37 [[[[[ExTRa]]]]] joined
21:37 metaporia joined
21:37 <ertes> i think, we should have made that bug optional
21:37 raichoo joined
21:37 <lifter> Every 404 pg has to have some cute graphic that a designer was paid $500 to make.
21:37 Levex joined
21:37 <EvanR> put the bug back and make it a flag
21:37 <EvanR> haskell hardcore mode
21:37 <ertes> -fnightmare
21:38 <ertes> -fi-am-death-incarnate
21:38 <glguy> It could be like Dark Souls, after the first type error you get one shot to fix the error
21:38 <monochrom> http://www.mail-archive.com/haskell-cafe@haskell.org/msg94712.html
21:38 drewbert joined
21:38 <EvanR> didnt somebody hookup their ghc to twitter, if you fail to check tweet it
21:38 <EvanR> publically shaming you
21:39 WhereIsMySpoon joined
21:39 WhereIsMySpoon joined
21:40 <monochrom> Oh God, that mascot thread degenerated into bringing up GADT.
21:40 <ertes> if i did that, i would probably be banned for flooding
21:40 <ertes> "Found hole: …"
21:40 <ertes> "Found hole: …"
21:40 <ertes> "Found hole: …"
21:40 <monochrom> A drinking game for Haskell will just need to say "drink when you hear one of: GADT, data kinds, type families".
21:40 JakePeralta joined
21:41 jwbuurlage joined
21:41 <EvanR> from the compiler?
21:41 tosun joined
21:42 <geekosaur> heh
21:42 <Hafydd> Drink for each type error.
21:42 trolling joined
21:45 flatmap13 joined
21:46 flatmap13 joined
21:46 rockfordal joined
21:46 erisco joined
21:47 saussure joined
21:48 coltfred joined
21:48 ZDaddy joined
21:50 <ertes> take a shot each time the phrase "you can" is used in a programming language channel, and vomit each time "you can't" is used
21:50 <WarmCookie> ertes: -fvia=PHP
21:50 <ertes> don't do it too long though… you might turn into a black hole
21:51 <geekosaur> WarmCookie, http://hackage.haskell.org/package/acme-php
21:52 <int-e> > "you can" `isInfixOf` "you can't"
21:52 <lambdabot> True
21:52 <tosun> When I look at the `Core` AST type for a simple integer declaration e.g., `a :: Integer; a = 1`, I see that the corresponding Core type is a `(TyConApp AlgTyCon ...))` whereas I was expecting it to be a type literal. Can anyone explain why?
21:52 sepp2k joined
21:52 <monochrom> ertes, you can't turn into a black hole. <duck> :)
21:52 <* ertes> vomits
21:52 <monochrom> Oh haha good eyes, int-e
21:52 <monochrom> This is so fizzbuzz.
21:53 <monochrom> "Say fizz when you see 'you can'. Say buzz when you see 'you can't'"
21:53 <ertes> int-e: of course… that's why you will eventually turn into a black hole, because you can never vomit faster than you drink
21:53 abroz joined
21:53 jer1 joined
21:53 mizu_no_oto joined
21:53 <ertes> now take a shot!
21:54 <monochrom> s/you can never/you can't/
21:54 <EvanR> oh god stop
21:54 hiratara joined
21:54 <Tuplanolla> I just calculated the can-to-can't ratio of my logs from this channel.
21:54 juanpaucar joined
21:55 ixian joined
21:55 <Tuplanolla> > 28727 / 6997 :: Double
21:55 <lambdabot> 4.105616692868372
21:55 <monochrom> That's good news.
21:55 <geekosaur> tosun, integer literals are wrapped in fromInteger by the compiler
21:56 dm3 joined
21:56 <geekosaur> this is how you can use he kliteral 1 as Integer or Int or Double or ...
21:56 <geekosaur> tosun, https://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-190002.5
21:57 <glguy> I think tosun's asking about the representation of the Integer type in core
21:58 <tosun> glguy: yes
21:58 irisl left
21:58 <geekosaur> but in that case its representation is more or less what I described, no? raw compile to fromInteger @Integer, then with optimization that should hopefully go away
21:58 <geekosaur> but without optimization the inner workings get exposed
21:59 <glguy> the fromInteger layer lives at the value level
22:01 JeKs joined
22:01 JeKs left
22:02 fortruce joined
22:02 twanvl joined
22:03 geekg_000_ joined
22:04 <glguy> tosun: I'm sure sure what you had expected specifically, but all the primitive types in core appear to be introduced with: TyConApp TyCon [Type]
22:04 <glguy> and if the particular type constructor has no parameters then it will have an empty list in the second field
22:04 exarkun joined
22:05 <tosun> glguy: thanks. But why isn't it a literal?
22:06 <glguy> I don't know what you mean actually
22:06 <glguy> What would it look like if the type was a "literal"?
22:06 <tosun> glguy: there is a `LitTy` constructor.
22:07 <glguy> That's for DataKinds extension
22:07 juanpaucar joined
22:07 <glguy> You can have the type "Example" with kind Symbol
22:07 redfish64 joined
22:07 <glguy> Or the type 10 with kind Nat
22:08 <glguy> These types have no values
22:08 <glguy> But the type of any Integer, even if its the integer literal 1, is always going to be Integer
22:10 geekg_000__ joined
22:10 anuxivm joined
22:10 <glguy> @kind 1
22:10 <lambdabot> GHC.Types.Nat
22:11 <glguy> @type (1::Integer)
22:11 <lambdabot> Integer
22:12 <tosun> glguy: I see, thanks.
22:12 kadoban joined
22:12 <mniip> hmm, curious
22:12 <mniip> does ghci do TH splices?
22:13 <glguy> hi
22:13 <glguy> err, yes
22:14 jer1 joined
22:15 sproingie joined
22:15 sproingie joined
22:16 geekg_000 joined
22:16 bjz_ joined
22:16 augur joined
22:17 <EvanR> i just wrote (> t) and then suddenly became dyslexic or something, and didnt know whether the symbol was "greater than" or "less than"
22:18 <EvanR> its less than t
22:18 geekg_000_ joined
22:18 <glguy> It's greater than t...
22:18 <EvanR> uhg
22:19 <EvanR> right but the t is on the small side heh
22:19 jmcarthur joined
22:19 <EvanR> maybe (t <) works better
22:20 <EvanR> oh well
22:20 crave joined
22:20 dfeuer joined
22:21 <ski> (rarely) sometimes when i'm writing something, i'm suddenly unsure about the spelling of a word which i know i usually know the spelling of ..
22:21 wroathe joined
22:21 juanpaucar joined
22:21 <MarcelineVQ> like apricot
22:21 <glguy> I get that feeling if I stop to actually think about the letters in the word
22:21 afarmer joined
22:22 mterwoord joined
22:23 <_cyril_> Is https://hackage.haskell.org/package/protobuf the recommended library to encode/decode protobufs in Haskell?
22:23 <Tuplanolla> I had that today with "scratch".
22:23 <mniip> hmm
22:24 <mniip> I guess you can create an unlifted kind
22:24 <mniip> but it has no inhabitants
22:26 juanpaucar joined
22:27 fotonzade joined
22:27 albertus1 joined
22:31 hiratara joined
22:31 darjeeli1 joined
22:32 e14 joined
22:33 richi238 joined
22:34 sordina1234 joined
22:37 jer1 joined
22:38 roconnor joined
22:38 <erisco> ski, well it is not as annoying as my condition where I type completely the wrong word or the wrong conjugation
22:39 <erisco> I turned off spell correct but it still haunts my life
22:40 takle_ joined
22:41 crave joined
22:41 prophile joined
22:51 matt__ joined
22:51 tromp joined
22:56 epsilonhalbe joined
22:56 hybrid joined
22:57 jer1 joined
22:57 epsilonhalbe left
22:57 flatmap13 joined
22:59 flatmap1_ joined
23:00 user___ joined
23:00 flatmap__ joined
23:01 _deepfire joined
23:02 louispan joined
23:03 flatmap13 joined
23:03 geekg_000 joined
23:03 jgt3 joined
23:04 bigos joined
23:05 dfeuer joined
23:05 thimoteus joined
23:10 saussure joined
23:12 louispan joined
23:14 nh2 joined
23:15 sordina1234 joined
23:18 jer1 joined
23:19 louispan joined
23:21 drewbert joined
23:21 Rotaerk joined
23:22 sanitypassing joined
23:22 wroathe joined
23:22 takle joined
23:23 darjeeli1 joined
23:27 drewbert joined
23:29 takle joined
23:30 {emptyset} joined
23:30 pookleblinky joined
23:30 fotonzade joined
23:32 lambda-11235 joined
23:33 cschneid_ joined
23:33 iqubic joined
23:33 aussie joined
23:34 Koterpillar joined
23:34 Bhootrk_ joined
23:34 e14 joined
23:34 <iqubic> How hard is it to create a simpel game in Haskell.
23:34 theDon_ joined
23:35 markus1209 joined
23:35 <iqubic> Like how hard would it be create a Tic-Tac-Toe game in haskell?
23:36 <lyxia> main = putStrLn "You lost the game."
23:36 mkoenig joined
23:36 zv joined
23:36 Gloomy joined
23:36 markus1219 joined
23:36 lambda_foo joined
23:36 <iqubic> lyxia, I more wanted a way to save the state of the game.
23:36 <monochrom> No harder than soft water.
23:37 <ertes> main = do putStrLn "Guess my random integer between 1 and 2!"; getLine; putStrLn "Wrong."
23:37 <iqubic> LOL
23:38 <iqubic> So how would I update and save the current state of the game?
23:38 takle joined
23:38 jer1 joined
23:39 <ertes> and i *know*, this being #haskell, that at least a few people tried to exploit my number notation to claim that my game is unfair
23:39 <aussie> Check out code.world, it supplies a bunch of graphics capabilities for you
23:40 Levex joined
23:40 <ertes> iqubic: if your game state is a value, you can serialise it to binary (binary/cereal), JSON (aeson), YAML (yaml), etc.
23:40 <iqubic> ertes, I don't want to serialize my data. I just want to update it on the fly.
23:40 posco joined
23:40 <aussie> How would I convert Just (Just 5) to a single just?
23:41 <iqubic> > join Just (Just 5)
23:41 <monochrom> consider join
23:41 <aussie> I tried "maybe Nothing fromJust" but that gives an error
23:41 <lambdabot> error:
23:41 <lambdabot> • Couldn't match expected type ‘Maybe Integer -> t’
23:41 <lambdabot> with actual type ‘Maybe a0’
23:41 <iqubic> > join $ Just (Just 5)
23:41 <lambdabot> Just 5
23:41 <aussie> Ah awesome
23:41 <iqubic> Join works
23:41 <iqubic> Works for any monad m.
23:41 <iqubic> :t join
23:41 <lambdabot> Monad m => m (m a) -> m a
23:41 <ertes> iqubic: "update"? in memory? on disk?
23:42 Bhootrk_ joined
23:42 <monochrom> "state" is a red herring.
23:42 <iqubic> update in memory
23:43 moth joined
23:43 <ertes> iqubic: every time you recursively call a function with a different value, you're "updating"
23:43 nakal_ joined
23:43 <ertes> printFrom n = print n >> printFrom (n + 1)
23:44 <iqubic> How would you store the current board position of a Tic-Tac-Toe game in Haskell? And how would you update that position when the user makes a move?
23:44 <aussie> You could use a small 2D list
23:44 <aussie> And then just work off that representation
23:44 <monochrom> Instead of "store", you should speak of "represent" or "model", so that you are not stuck in the "state" red herring.
23:45 <ertes> iqubic: your board state is a value, right?
23:45 <iqubic> Sure. Type position = [[Piece]]
23:45 <monochrom> And yeah it is going to be a value.
23:45 <iqubic> Data Piece = X | O | Empty
23:45 <ertes> iqubic: and your game is a recursive "loop" that takes the current board state as its argument, right?
23:46 takle joined
23:47 drewbert joined
23:47 <iqubic> No. Should it be
23:48 Guest51841 joined
23:48 <ertes> iqubic: do you have code?
23:49 jao joined
23:49 <Logio> iqubic: you would update the board using some function like: move :: Position -> Board -> Board, which takes a given move and the current board and returns the altered board
23:50 wroathe joined
23:50 <Logio> the "game state" at each point is just the Board configuration
23:51 c0d3x joined
23:52 <c0d3x> Hi
23:52 <monochrom> I seem to remember that a month ago someone asked about representing Tic-Tac-Toe at the type level.
23:52 fotonzade joined
23:52 alveric1 joined
23:53 Bhootrk_ joined
23:53 <ertes> type TicTacToe = Ordering -> Ordering -> Ordering
23:54 peterbecich joined
23:54 abroz joined
23:54 <monochrom> How does that work?
23:55 augur joined
23:55 <ertes> type TicTacToe = Maybe (Ordering -> Bool) -> Maybe Bool
23:56 <ertes> monochrom: a board is just a function from 2D coordinates to a cell state
23:56 <ertes> > [minBound..maxBound] :: Ordering
23:56 <lambdabot> error:
23:56 <lambdabot> • Couldn't match expected type ‘Ordering’ with actual type ‘[t0]’
23:56 <lambdabot> • In the expression: [minBound .. maxBound] :: Ordering
23:56 <monochrom> Ah yes.
23:56 <ertes> > [minBound..maxBound] :: [Ordering]
23:56 <lambdabot> [LT,EQ,GT]
23:58 cloudhead joined
23:59 <jle`> Ordering ~ 3
23:59 infinity0_ joined
23:59 infinity0_ joined
23:59 <jle`> i prefer Maybe Bool
23:59 jer1 joined
23:59 <jle`> or Either () (Either () ())