Home freenode/#haskell: Logs Calendar

Logs on 2021-02-14 (freenode/#haskell)

00:00:59 × jb55 quits (~jb55@gateway/tor-sasl/jb55) (Read error: Connection reset by peer)
00:00:59 × teardown quits (~user@gateway/tor-sasl/mrush) (Write error: Connection reset by peer)
00:00:59 × srk quits (~sorki@gateway/tor-sasl/sorki) (Read error: Connection reset by peer)
00:00:59 × hexo quits (~hexo@gateway/tor-sasl/hexo) (Remote host closed the connection)
00:00:59 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
00:01:00 × denisse quits (~spaceCat@gateway/tor-sasl/alephzer0) (Read error: Connection reset by peer)
00:01:00 × cantstanya quits (~chatting@gateway/tor-sasl/cantstanya) (Read error: Connection reset by peer)
00:01:00 × vgtw quits (~vgtw@gateway/tor-sasl/vgtw) (Read error: Connection reset by peer)
00:01:00 × xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Read error: Connection reset by peer)
00:01:00 × geyaeb quits (~geyaeb@gateway/tor-sasl/geyaeb) (Read error: Connection reset by peer)
00:01:00 × ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Read error: Connection reset by peer)
00:01:00 × andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Read error: Connection reset by peer)
00:01:00 × hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Write error: Broken pipe)
00:01:00 × finn_elija quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Write error: Connection reset by peer)
00:01:00 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Write error: Connection reset by peer)
00:01:25 aliuser joins (~aliuser@45.83.27.135)
00:01:29 × aliuser quits (~aliuser@45.83.27.135) (K-Lined)
00:02:01 × LittleFox quits (~littlefox@rondra.lf-net.org) (Quit: ZNC 1.7.2+deb3 - https://znc.in)
00:02:02 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
00:02:07 × ph88^ quits (~ph88@2a02:8109:9e00:7e5c:d5a3:7dbb:e434:b544) (Ping timeout: 272 seconds)
00:02:12 LittleFox joins (~littlefox@rondra.lf-net.org)
00:02:35 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
00:02:44 × LittleFox quits (~littlefox@rondra.lf-net.org) (Client Quit)
00:02:54 LittleFox joins (~littlefox@rondra.lf-net.org)
00:02:57 ph88^ joins (~ph88@2a02:8109:9e00:7e5c:d5a3:7dbb:e434:b544)
00:03:29 xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar)
00:03:33 hexo joins (~hexo@gateway/tor-sasl/hexo)
00:03:35 srk joins (~sorki@gateway/tor-sasl/sorki)
00:04:13 geyaeb joins (~geyaeb@gateway/tor-sasl/geyaeb)
00:04:16 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
00:04:24 finn_elija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
00:04:32 ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
00:04:36 jb55 joins (~jb55@gateway/tor-sasl/jb55)
00:04:39 denisse joins (~spaceCat@gateway/tor-sasl/alephzer0)
00:04:41 andreas303 joins (~andreas@gateway/tor-sasl/andreas303)
00:05:51 × jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection)
00:06:19 jb55 joins (~jb55@gateway/tor-sasl/jb55)
00:07:09 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 264 seconds)
00:10:52 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
00:11:12 × xcmw quits (~textual@dyn-72-33-2-47.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:11:36 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
00:11:46 teardown joins (~user@gateway/tor-sasl/mrush)
00:11:49 heatsink joins (~heatsink@2600:1700:bef1:5e10:606c:d5c5:bedc:297d)
00:15:10 × hiroaki quits (~hiroaki@ip4d166d67.dynamic.kabel-deutschland.de) (Quit: Leaving)
00:16:50 × heatsink quits (~heatsink@2600:1700:bef1:5e10:606c:d5c5:bedc:297d) (Ping timeout: 264 seconds)
00:17:09 hiroaki joins (~hiroaki@ip4d166d67.dynamic.kabel-deutschland.de)
00:17:20 vgtw joins (~vgtw@gateway/tor-sasl/vgtw)
00:18:15 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:19:45 × elliott_ quits (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
00:19:51 × atraii quits (~atraii@2601:681:8800:a991:b78:7e8b:3676:bb2c) (Ping timeout: 272 seconds)
00:20:33 elliott_ joins (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net)
00:20:54 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
00:25:14 hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
00:25:59 sh9 joins (~sh9@softbank060116136158.bbtec.net)
00:26:14 × jb55 quits (~jb55@gateway/tor-sasl/jb55) (Ping timeout: 268 seconds)
00:27:34 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
00:27:52 cantstanya joins (~chatting@gateway/tor-sasl/cantstanya)
00:32:21 × dhil quits (~dhil@80.208.56.181) (Ping timeout: 264 seconds)
00:32:38 × jumper149 quits (~jumper149@130.75.103.194) (Ping timeout: 272 seconds)
00:33:07 pineapples[m] joins (pineapples@gateway/shell/matrix.org/x-pbxgbqdlizpfukkk)
00:33:52 dcoutts_ joins (~duncan@85.186.125.91.dyn.plus.net)
00:35:01 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
00:35:48 × dcoutts quits (~dcoutts@unaffiliated/dcoutts) (Ping timeout: 246 seconds)
00:36:12 dcoutts joins (~dcoutts@unaffiliated/dcoutts)
00:36:25 × dcoutts__ quits (~duncan@85.186.125.91.dyn.plus.net) (Ping timeout: 240 seconds)
00:36:29 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
00:37:32 × stef204 quits (~stef204@unaffiliated/stef-204/x-384198) (Ping timeout: 260 seconds)
00:38:13 <pineapples[m]> Is there a reason that the folding function that foldr and foldl both take, has reversed order? i.e., for foldr, the first argument is of type `(a -> b -> b)`, such that `a` represents the type of the current element of the list, and `b` represents the type of the accumulator, but for `foldl`, the type is instead `(b -> a -> b)`, such that the accumulator comes on the right? Was this just done to make things easier to
00:38:13 <pineapples[m]> remember? Or for tail recursion optimization? I'm finding this difficult to remember...
00:38:28 <pineapples[m]> * Is there a reason that the folding function that foldr and foldl both take, has reversed order? i.e., for `foldr`, the first argument is of type `(a -> b -> b)`, such that `a` represents the type of the current element of the list, and `b` represents the type of the accumulator, but for `foldl`, the type is instead `(b -> a -> b)`, such that the accumulator comes on the right? Was this just done to make things
00:38:28 <pineapples[m]> easier to remember? Or for tail recursion optimization? I'm finding this difficult to remember...
00:38:41 <pineapples[m]> * Is there a reason that the folding function that foldr and foldl both take, has reversed order? i.e., for `foldr`, the first argument is of type `(a -> b -> b)`, such that `a` represents the type of the current element of the list, and `b` represents the type of the accumulator, but for `foldl`, the type is instead `(b -> a -> b)`, such that the accumulator comes on the left? Was this just done to make things easier
00:38:41 <pineapples[m]> to remember? Or for tail recursion optimization? I'm finding this difficult to remember...
00:38:45 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
00:39:33 jb55 joins (~jb55@gateway/tor-sasl/jb55)
00:41:16 × conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer)
00:42:39 <monochrom> No important reason. But I find this order a good mnemonic.
00:42:54 <monochrom> I heard that the ocaml library uses the opposite order.
00:43:01 <monochrom> It really doesn't matter.
00:44:05 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
00:45:29 conal joins (~conal@64.71.133.70)
00:45:32 <hpc> if it helps, foldr follows the type's order
00:45:35 <hpc> like maybe, either, etc
00:45:48 <hpc> and curry, i suppose
00:45:53 <hpc> :t maybe
00:45:54 <lambdabot> b -> (a -> b) -> Maybe a -> b
00:46:22 <hpc> data Maybe a = Nothing | Just a
00:46:44 <hpc> to come up with the type for maybe, go through the types of the constructors for Maybe in order, and replace (Maybe a) with b
00:46:50 <hpc> do the same thing for [] and you have foldr
00:46:52 <hpc> :t foldr
00:46:53 <lambdabot> Foldable t => (a -> b -> b) -> b -> t a -> b
00:46:57 <pineapples[m]> hpc: what do you mean by the type's order?
00:47:12 <hpc> data [] a = [] | (:) a [a]
00:47:46 <hpc> oh, that's annoying, foldr's arguments are backwards
00:48:33 <hpc> but basically, the way you remember (a -> b -> b) is from the type of (:)
00:48:35 <hpc> :t (:)
00:48:37 <lambdabot> a -> [a] -> [a]
00:48:50 <hpc> mentally replace [a] with b, and there you go
00:48:57 <monochrom> It's OK, it's the a->b->b order we have in mind, and it follows (:)'s order.
00:49:37 <monochrom> And foldl's is the accumulator steamrolling from left to right so it's b->a->b.
00:49:55 <pineapples[m]> Right, for `foldr` it's `a -> b -> b`, so the replacement works with (:)
00:49:58 × dxld quits (~dxld@rush.pub.dxld.at) (Remote host closed the connection)
00:50:06 <pineapples[m]> `foldl` is `b -> a -> b`
00:50:07 <pineapples[m]> Hmm
00:50:16 <monochrom> So that's easy to remember.
00:50:20 <hpc> for extra credit, extend foldr to work on trees :D
00:51:12 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
00:51:15 <hpc> a nice property foldr has too, is foldr (:) [] = id
00:51:22 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
00:51:32 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
00:52:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
00:53:06 dxld joins (~dxld@80-109-136-248.cable.dynamic.surfer.at)
00:54:58 × neiluj quits (~jco@unaffiliated/neiluj) (Ping timeout: 256 seconds)
00:55:00 heatsink joins (~heatsink@2600:1700:bef1:5e10:606c:d5c5:bedc:297d)
00:55:11 conal joins (~conal@64.71.133.70)
00:57:56 xcmw joins (~textual@dyn-72-33-2-47.uwnet.wisc.edu)
01:00:59 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
01:02:22 jedws joins (~jedws@101.184.202.248)
01:03:20 × Feuermagier quits (~Feuermagi@2a02:2488:4211:3400:246e:bf09:8453:9d6) (Remote host closed the connection)
01:13:34 × m0rphism1 quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 268 seconds)
01:14:28 jamm_ joins (~jamm@unaffiliated/jamm)
01:15:52 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
01:15:59 rajivr joins (uid269651@gateway/web/irccloud.com/x-pdqpqnvxjwncrovd)
01:18:29 × tremon quits (~aschuring@217-63-61-89.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
01:18:57 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
01:19:21 × Guest_70 quits (d4e848ca@212.232.72.202) (Quit: Connection closed)
01:23:37 × libertyprime quits (~libertypr@124.197.60.232) (Remote host closed the connection)
01:25:41 × ezrakilty quits (~ezrakilty@75-172-120-208.tukw.qwest.net) (Remote host closed the connection)
01:25:44 × Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 240 seconds)
01:27:23 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
01:29:32 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
01:31:01 tribble2 joins (~tribble2@unaffiliated/tribble2)
01:35:32 plutoniix joins (~q@node-ug9.pool-125-24.dynamic.totinternet.net)
01:38:29 × hiroaki quits (~hiroaki@ip4d166d67.dynamic.kabel-deutschland.de) (Ping timeout: 272 seconds)
01:40:23 <minoru_shiraeesh> are there good, easy to follow resources explaining how the `evaluate` function works?
01:40:46 <c_wraith> evaluate is a weird thing to need. Are you sure that's what you actually want?
01:40:54 <minoru_shiraeesh> it is mentioned briefly in the book I'm reading
01:41:01 <minoru_shiraeesh> here is a snippet: https://paste.tomsmeding.com/BWPp6agN
01:41:21 <minoru_shiraeesh> it is mentioned in the context of exceptions
01:41:41 <minoru_shiraeesh> catching them to be specific
01:41:56 <c_wraith> I suppose that *is* the one case where its details are actually important
01:42:13 <dmj`> minoru_shiraeesh: http://hackage.haskell.org/package/base-4.14.1.0/docs/Control-Exception.html#v:evaluate has good docs
01:42:46 <c_wraith> you can't say that. If you point out that the documentation is actually good, the mob will come after you
01:44:07 <koz_> [0 .. (- 1)]
01:44:13 <koz_> > [0 .. (- 1)]
01:44:15 <lambdabot> []
01:46:06 <dmj`> c_wraith: let them come
01:47:29 × carlomagno1 quits (~cararell@148.87.23.12) (Remote host closed the connection)
01:48:02 × jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:48:11 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
01:49:05 × elliott_ quits (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
01:49:47 elliott_ joins (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net)
01:51:40 × usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving)
01:51:44 <minoru_shiraeesh> so the `catch` becomes useless if you use `return` instead of `evaluate`, that's such a subtlety
01:52:10 <c_wraith> that particular point isn't the subtlety. That's crucial for understanding haskell
01:52:12 <minoru_shiraeesh> it would be good if compiler helped to prevent useless catches
01:52:38 <c_wraith> the subtlety is that evaluate x is different from return $! x
01:53:25 <minoru_shiraeesh> dmj`: thanks for the link btw
01:53:52 <dmj`> minoru_shiraeesh: cheers
01:54:06 dmj` buttons vest back up
01:55:55 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-wprlceqhkwfmdjez) (Quit: Connection closed for inactivity)
01:59:57 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds)
02:01:28 <minoru_shiraeesh> intuitively one would expect catch to work with return, the `catch` function returns a description of an action to take, it could as well add "oh, btw, this thing catches this exception when run"
02:01:49 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
02:02:17 <c_wraith> intuitively, return does nothing to a pure computation. If it's a bottom, it stays a bottom.
02:03:02 <minoru_shiraeesh> yeah, when you return something, you get a description of an action
02:03:11 <c_wraith> actually, the monad laws are kind of precise there.
02:03:46 <c_wraith> return undefined >> const (pure ()) must be equivalent to const (pure ()) undefined
02:03:58 <c_wraith> but you're asking for return to do more than that
02:04:22 <minoru_shiraeesh> when you streamline that description through `catch`, it would make sense to expect it to add its logic to the description, right? Maybe there is something wrong with the mental model I'm working with.
02:05:21 <c_wraith> catch's model is "if executing this IO action raises an exception of the expected type, return Left of that exception"
02:05:29 <minoru_shiraeesh> I mean, do you agree that this thing doesn't make much sense and you just have to memorize it?
02:05:34 <c_wraith> note that it's about executing IO, not evaluating expressions
02:06:03 <c_wraith> If the IO action you pass to it doesn't raise any exceptions, that's not catch doing anything wrong
02:06:22 <c_wraith> and pure/return can't raise exceptions in pure code, as doing so would violate the monad laws
02:06:53 × ph88^ quits (~ph88@2a02:8109:9e00:7e5c:d5a3:7dbb:e434:b544) (Ping timeout: 272 seconds)
02:07:09 <c_wraith> the critical part is separating execution from evaluation
02:07:21 <c_wraith> they are separate processes
02:07:37 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 272 seconds)
02:07:39 <c_wraith> (that's pretty critical for working with Haskell in general)
02:07:49 <monochrom> It makes a lot of sense to me. What you're looking at is turning some bottoms (but not all) into exceptions. That's going to exceed every simple model.
02:08:50 <zebrag> What is it with G being always below F? Is it because if you are forgetful you are necessarily deemed lesser than if you are free. (Don't answer that.)
02:09:19 <monochrom> I thought F was below G.
02:10:01 <MarcelineVQ> weird, for me f and g are right next to each other
02:10:03 <minoru_shiraeesh> hmm, looks like there is some incompatibility between monads and exceptions
02:10:36 <monochrom> No, it's an incompatibility between purity and exceptions.
02:11:06 × DataComputist quits (~lumeng@50.43.26.251) (Remote host closed the connection)
02:11:51 <monochrom> bottom is in the pure world, exception is in the control-flow world. But some people still want to convert the former to the latter.
02:12:12 <monochrom> OK, it can be done, but it is not going to be intuitive. People deserve the mess they asked for.
02:12:28 <zebrag> Well it's below if you like your natural transforms downward, personally I like them horizontal.
02:13:10 <minoru_shiraeesh> c_wraith: "and pure/return can't raise exceptions in pure code, as doing so would violate the monad laws"
02:13:15 <minoru_shiraeesh> I don't get this part
02:13:29 <minoru_shiraeesh> they don't raise exception immediately
02:13:34 <minoru_shiraeesh> *exceptions
02:13:39 <c_wraith> the expression (return undefined) cannot raise an exception.
02:13:43 <c_wraith> that monad laws forbid it
02:13:52 <dsal> I managed to build a program on my new Mac (and have it run) using nix. I look forward to a future where it's not so emulated.
02:14:10 <zebrag> It's below there: https://bartoszmilewski.com/2016/04/18/adjunctions/
02:14:40 jedws joins (~jedws@101.184.202.248)
02:15:50 <c_wraith> therefore (catch (return undefined)) cannot catch anything. That's just how it goes.
02:15:57 <minoru_shiraeesh> pure/return just give you a description of an action, right? but the action itself can raise exceptions - not immediately, when constructing the structure, but later, when run
02:16:26 <monochrom> zebrag, if one day you become as famous as Bartosz, and someone sees you drawing horizontally, therefore, I don't know, maybe you put F on the left and G on the right, and someone asks "why not the other way round?", what should I answer? You see what I mean?
02:17:00 <c_wraith> minoru_shiraeesh: no, they give you an action, not a description of one.
02:17:21 <monochrom> You make an arbitrary choice that completely doesn't matter, then you become a big shot, then someone is going to overthink your arbitrary choice.
02:18:16 <minoru_shiraeesh> yes, they give an action, and what's wrong with adding "I'm going to return this action, and this action may raise an exception"?
02:18:51 <minoru_shiraeesh> adding this clause to the description of an action is not the same as raising an exception when constructing an action, right?
02:18:59 <c_wraith> because that would violate the monad laws
02:19:16 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
02:19:19 <c_wraith> return x >>= f must behave the same as f x
02:19:33 × xff0x quits (~xff0x@2001:1a81:52bc:5400:1105:83cf:5342:8ee4) (Ping timeout: 272 seconds)
02:20:06 × wz1000 quits (~wz1000@static.11.113.47.78.clients.your-server.de) (Ping timeout: 246 seconds)
02:20:33 <sclv> is bodigrim on irc?
02:21:02 xff0x joins (~xff0x@2001:1a81:52f8:8e00:3f0c:a02c:d901:27bc)
02:22:40 <minoru_shiraeesh> c_wraith: "return x >>= f must behave the same as f x" - how does this apply to the context of `evaluate` and exceptions?
02:22:59 <minoru_shiraeesh> you put `catch` in place of `f`?
02:23:25 × shatriff quits (~vitaliish@176-52-216-242.irishtelecom.com) (Ping timeout: 240 seconds)
02:23:25 <minoru_shiraeesh> hmm, no
02:25:19 <minoru_shiraeesh> if the `x` is going to raise an exception, then they will behave the same way, no?
02:25:40 <c_wraith> consider f = const (return ())
02:26:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:26:40 <minoru_shiraeesh> so f doesn't evaluate `x`?
02:26:44 <c_wraith> nope
02:28:07 <minoru_shiraeesh> ok, but where is the violation of monad laws if `return` were to raise "catchable" exceptions?
02:29:05 <c_wraith> f = const (return ()) ; x = undefined ; returnOrThrow x >>= f is bottom, f x is not
02:30:35 <zebrag> monochrom: indeed. I don't know why I made my silly comment in the first place. Maybe because it was a good mnemonic for the Bartosz's diagrams.
02:30:41 Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362)
02:31:58 <minoru_shiraeesh> `returnOrThrow` throws immediately?
02:32:12 <c_wraith> if it doesn't, it's identical to the current return
02:32:16 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 240 seconds)
02:32:16 Lord_of_Life_ is now known as Lord_of_Life
02:32:17 <minoru_shiraeesh> and `catch` catches exceptions that were immediately thrown?
02:32:29 <minoru_shiraeesh> I think I understand now
02:32:55 <c_wraith> it really isn't a conspiracy to get you. That's just what it has to do
02:33:52 <minoru_shiraeesh> and the first thing that comes to mind in this sutuation is to introduce a function something like `catchWhenRun`
02:34:33 <minoru_shiraeesh> evaluation an expression just to catch an expression looks like a perversion
02:34:44 <swarmcollective> c_wraith, would you explain "bottom" used here `returnOrThrow x >>= f is bottom, f x is not` ? I am not familiar with that term in that context.
02:34:46 <minoru_shiraeesh> it's supposed to be lazy
02:36:56 × clog quits (~nef@bespin.org) (Ping timeout: 240 seconds)
02:37:34 <c_wraith> Bottom is a general term for any sort of non-returning behavior. Could be an infinite loop, could be an exception, etc
02:38:04 × xcmw quits (~textual@dyn-72-33-2-47.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:38:30 × plutoniix quits (~q@node-ug9.pool-125-24.dynamic.totinternet.net) (Quit: Leaving)
02:38:51 <c_wraith> \f -> catch (f >>= evaluate)
02:39:00 Sheilong joins (uid293653@gateway/web/irccloud.com/x-iidzzuqrwayebdaf)
02:39:18 <c_wraith> :t \x -> catch (x >>= evaluate)
02:39:19 <lambdabot> Exception e => IO a -> (e -> IO a) -> IO a
02:39:32 <c_wraith> there you go. Your catch that always forces the evaluation.
02:39:37 <swarmcollective> Ah, thank you!
02:39:51 <c_wraith> Here's the thing: That's *not* really what catch is for.
02:40:10 <c_wraith> catch is *really* for IO exception. the FileNotFounds of the world.
02:40:25 × seemtav_ quits (~seemtav3@bcde0474.skybroadband.com) (Ping timeout: 240 seconds)
02:41:20 <c_wraith> that was sort of monochrom's point about purity and exceptions being a weird mix
02:42:12 <c_wraith> We allow raising exceptions from pure code, which is sort of a weird thing.
02:42:20 <c_wraith> So catching them is also sort of a weird thing.
02:44:44 <minoru_shiraeesh> I meant something like a "lazy catch"
02:44:59 <c_wraith> that's sort of time travel
02:44:59 <minoru_shiraeesh> "lazy catch" for "lazy exceptions"
02:45:11 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
02:46:21 <minoru_shiraeesh> the "catch" that doesn't force anything, just defers catching for later
02:46:52 <c_wraith> so... time travel
02:47:23 <minoru_shiraeesh> I don't see how it is time travel
02:49:28 <minoru_shiraeesh> imagine writing let x = try somethingThatRaises; case x of ... and then you pattern-match on either
02:49:51 × hiptobecubic quits (~john@unaffiliated/hiptobecubic) (Ping timeout: 246 seconds)
02:49:51 <c_wraith> consider setting mutable variables from the handler. If you haven't inspected the result, what do you read from the mutable variable?
02:51:29 <minoru_shiraeesh> why suppose that I haven't inspected the result?
02:51:37 <c_wraith> because that's the only time laziness matters
02:52:19 <minoru_shiraeesh> you can return either and then pattern match it, right?
02:52:36 <minoru_shiraeesh> and you can encode a lazy logic like that
02:53:10 <minoru_shiraeesh> that's basically what catching an exception is, isn' it?
02:53:10 <c_wraith> If you're going to be inspecting it immediately, what's wrong with my suggestion above?
02:53:38 <minoru_shiraeesh> what suggestion?
02:55:01 <c_wraith> well, I suggested \x -> catch (x >>= evaluate), but maybe you'd prefer \x -> try (x >>= evaluate)
02:56:16 <minoru_shiraeesh> do I have to use `evaluate` with `try` too?
02:56:34 <c_wraith> it's also for IO exceptions, yes
02:58:47 xcmw joins (~textual@dyn-72-33-2-47.uwnet.wisc.edu)
03:00:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
03:00:50 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 272 seconds)
03:03:34 alx741 joins (~alx741@186.178.108.225)
03:04:21 ezrakilty joins (~ezrakilty@75-172-120-208.tukw.qwest.net)
03:05:28 __minoru__shirae joins (~shiraeesh@109.166.57.144)
03:07:09 × minoru_shiraeesh quits (~shiraeesh@109.166.57.144) (Ping timeout: 264 seconds)
03:08:57 × ezrakilty quits (~ezrakilty@75-172-120-208.tukw.qwest.net) (Ping timeout: 264 seconds)
03:10:06 Feuermagier joins (~Feuermagi@2a02:2488:4211:3400:246e:bf09:8453:9d6)
03:14:30 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
03:15:23 stef204 joins (~stef204@unaffiliated/stef-204/x-384198)
03:16:48 idhugo joins (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net)
03:16:57 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-iidzzuqrwayebdaf) ()
03:19:42 dyeplexer joins (~lol@unaffiliated/terpin)
03:19:45 <__minoru__shirae> looks like `try` acts the "lazy catch" I was talking about
03:19:56 <__minoru__shirae> *act like
03:20:01 <__minoru__shirae> *acts like
03:20:58 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
03:21:36 <__minoru__shirae> turns out the documentation recommends `try` over `catch` for regular exceptions, and recommends `catch` for asynchronous exceptions.
03:22:24 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
03:24:50 <__minoru__shirae> and to add to the confusion `try` is implemented using `catch`?
03:24:54 <__minoru__shirae> try a = catch (Right `liftM` a) (return . Left)
03:27:17 <__minoru__shirae> (╯°□°)╯︵ ┻━┻
03:27:38 <glguy> __minoru__shirae, why is that confusing?
03:28:18 <__minoru__shirae> glguy: we were discussing this snippet from a book: https://paste.tomsmeding.com/BWPp6agN
03:29:41 <glguy> OK. Yes, you'd prefer to use try or catch in: try (evaluate x)
03:29:46 <monochrom> try is not lazier than catch
03:29:53 FinnElija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
03:29:53 finn_elija is now known as Guest80175
03:29:53 FinnElija is now known as finn_elija
03:30:03 <glguy> the difference in try and catch is about how long async exceptions are masked
03:30:08 <monochrom> nor does it kill laziness
03:30:08 <glguy> nothing about laziness at all
03:30:32 <monochrom> try (return (div 1 0)) still doesn't do what you think.
03:30:51 <monochrom> Have you actually written actual code to test any of your understanding?
03:31:52 <__minoru__shirae> so, that weird behavior in the example from the book is related exactly to `return` and `catch`? If you don't use `return` - there's no weirdness like that, right?
03:32:08 <__minoru__shirae> I think it's getting clearer to me now
03:32:17 <glguy> __minoru__shirae, what was the alernative to return you're thinking of?
03:32:49 <__minoru__shirae> using try with an action in the middle of a do block
03:33:42 × Guest80175 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 268 seconds)
03:35:39 <__minoru__shirae> monochrom: no, I haven't
03:35:49 <monochrom> I wonder why.
03:36:56 <__minoru__shirae> too tedious I think
03:37:39 <__minoru__shirae> and it's not convenient to write functions in ghci
03:37:53 <monochrom> So use an editor and :load
03:38:14 <monochrom> OK I'm done. This is counterproductive.
03:39:07 wideEyedPupil joins (~wideEyedP@121.211.80.53)
03:40:21 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Quit: leaving)
03:40:36 × wideEyedPupil quits (~wideEyedP@121.211.80.53) ()
03:41:16 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
03:41:25 × hololeap quits (~hololeap@unaffiliated/hololeap) (Ping timeout: 240 seconds)
03:42:05 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 240 seconds)
03:42:15 <__minoru__shirae> monochrom: I can run functions, but I can't have an actual conversation with a compiler, right?
03:43:16 <__minoru__shirae> it's the conversation that I'm interested in
03:43:39 ph88^ joins (~ph88@2a02:8109:9e00:7e5c:d5a3:7dbb:e434:b544)
03:44:12 <__minoru__shirae> ok, gonna try anyway
03:45:06 × average quits (uid473595@gateway/web/irccloud.com/x-eraxnppaxgxfmpke) (Quit: Connection closed for inactivity)
03:45:17 hololeap joins (~hololeap@unaffiliated/hololeap)
03:45:45 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds)
03:45:56 × hololeap quits (~hololeap@unaffiliated/hololeap) (Max SendQ exceeded)
03:46:25 hololeap joins (~hololeap@unaffiliated/hololeap)
03:50:45 ransom joins (~c4264035@2a09:bac0:98::830:8634)
03:55:45 × idhugo quits (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) (Ping timeout: 240 seconds)
03:59:16 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 240 seconds)
03:59:25 × theDon quits (~td@muedsl-82-207-238-227.citykom.de) (Ping timeout: 240 seconds)
04:01:23 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
04:01:35 theDon joins (~td@94.134.91.232)
04:02:04 × geyaeb quits (~geyaeb@gateway/tor-sasl/geyaeb) (Remote host closed the connection)
04:02:30 geyaeb joins (~geyaeb@gateway/tor-sasl/geyaeb)
04:02:59 Tario joins (~Tario@201.192.165.173)
04:03:37 <__minoru__shirae> ok, tried it, `try` works without `evaluate`
04:04:28 Lycurgus joins (~niemand@cpe-45-46-139-165.buffalo.res.rr.com)
04:05:48 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 246 seconds)
04:07:50 × borne quits (~fritjof@2a06:8782:ffbb:1337:9d49:b858:e7dc:a61e) (Ping timeout: 264 seconds)
04:08:09 Rudd0 joins (~Rudd0@185.189.115.108)
04:10:35 average joins (uid473595@gateway/web/irccloud.com/x-xocrlotfjlxduqbi)
04:12:11 <c_wraith> I'd double-check that.
04:12:12 × ubert quits (~Thunderbi@p200300ecdf25d9cde6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
04:12:15 ubert1 joins (~Thunderbi@p200300ecdf25d9afe6b318fffe838f33.dip0.t-ipconnect.de)
04:12:30 Kilomomo parts (~anon@186.113.173.107) ()
04:12:32 polyrain joins (~polyrain@124.177.21.171)
04:13:35 × polyrain quits (~polyrain@124.177.21.171) (Client Quit)
04:14:35 ubert1 is now known as ubert
04:16:49 × zaquest quits (~notzaques@5.128.210.178) (Remote host closed the connection)
04:16:59 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
04:18:41 <c_wraith> __minoru__shirae: https://paste.tomsmeding.com/mDdF21aR I don't think that's true
04:18:42 zaquest joins (~notzaques@5.128.210.178)
04:23:15 <__minoru__shirae> c_wraith: I'm trying to understand your example
04:23:21 <__minoru__shirae> here is what I tried: https://paste.tomsmeding.com/jS1AForg
04:23:52 × elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Quit: WeeChat 3.0)
04:24:32 <c_wraith> so, this is still the difference between execution and evaluation
04:24:36 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
04:25:04 <c_wraith> Have you seen the distinction between those described in a Haskell context?
04:26:40 elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
04:26:58 <__minoru__shirae> no, what is it?
04:27:29 <__minoru__shirae> I'm relieved that I don't have to use `evaluate` each time I use `try`
04:27:40 <c_wraith> You don't need to use evaluate for catch, either
04:27:42 <__minoru__shirae> I think I misunderstood you
04:27:53 <c_wraith> you need to use evaluate for converting evaluation to execution
04:28:21 <__minoru__shirae> wait, for `catch` I have to use `evaluate` instead of `return`
04:28:26 <c_wraith> Nope
04:28:36 <c_wraith> Your code would work with catch, too
04:28:44 <c_wraith> without any use of evaluate
04:29:02 <__minoru__shirae> there is no `return` in there
04:29:14 <c_wraith> so?
04:29:26 <__minoru__shirae> the example doesn't apply
04:29:29 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 265 seconds)
04:30:13 <c_wraith> I feel like you're thinking in circles really hard
04:31:40 <c_wraith> Evaluation is the majority of what goes on in Haskell. It's what happens when an expression is forced to WHNF
04:32:01 <c_wraith> Execution is what the runtime does with IO actions
04:32:18 <__minoru__shirae> I think the cause of misunderstanding is that there is a mismatch on the levels or the contexts we are talking about
04:32:29 borne joins (~fritjof@200116b8647b450069fc6bd724c60777.dip.versatel-1u1.de)
04:32:58 <c_wraith> try and catch work the same way. They deal with exceptions raised in the *execution* of the IO action passed to them.
04:33:06 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
04:33:31 <__minoru__shirae> you switched the context and said "You don't need to use evaluate for catch, either" - but I was still in the previous context, and in that context that phrase sounds like you're trying to confuse me
04:33:33 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Read error: Connection reset by peer)
04:33:42 <c_wraith> If that IO action produces a value which contains an unevaluated expression that will raise an exception when it's evaluated... Well, it's not their job to handle it.
04:33:59 × Lycurgus quits (~niemand@cpe-45-46-139-165.buffalo.res.rr.com) (Quit: Exeunt)
04:34:09 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
04:34:11 <c_wraith> evaluate is a function that produces an IO action that evaluates an expression when it's executed.
04:34:41 <c_wraith> that's handy when you want to convert evaluation to execution in order to raise an exception as the result of evaluation during execution
04:35:20 <c_wraith> But if you only care about exceptions as the result of executing other IO actions, there's no need
04:38:57 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 264 seconds)
04:41:21 <__minoru__shirae> c_wraith: I get that you're trying to explain something to me, but you're doing it in such confusing manner that you just confuse me more, but I heard new keywords, so that's nice.
04:42:01 <c_wraith> Nah, I'm not being confusing :)
04:43:10 polyrain joins (~polyrain@2001:8003:e4d8:4101:cd73:c730:3a58:912c)
04:43:45 <c_wraith> Look, here's your code using catch: https://paste.tomsmeding.com/mwwvvajN
04:43:47 <c_wraith> It's fine
04:44:10 <c_wraith> the exception is raised during execution, so you're good
04:45:02 <swarmcollective> c_wraith, to clarify for myself, evaluation produces one (or more?) thunks, and execution would produce a value (or record)? Am I in the ball-park at least?
04:45:39 <c_wraith> The difference is what drives them, not what they produce
04:46:30 ph88 joins (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de)
04:46:32 <c_wraith> execution is driven by being part of main. The runtime takes care of the details there.
04:46:48 <c_wraith> evaluation is driven by pattern-matching
04:46:57 <swarmcollective> Ohhhhh! :)
04:47:29 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
04:47:52 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
04:48:44 <c_wraith> at a sufficiently wide perspective, evaluation is always driven by execution
04:49:08 <c_wraith> after all, if you didn't need to do IO with a value, there would never be any demand to evaluate it.
04:49:15 <__minoru__shirae> can you rewrite it so that there is `return` in there? https://paste.tomsmeding.com/mwwvvajN
04:49:20 × ransom quits (~c4264035@2a09:bac0:98::830:8634) (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:49:34 <c_wraith> why would I?
04:49:40 <c_wraith> return doesn't do anything
04:49:44 <c_wraith> that's the whole point of it
04:50:03 <swarmcollective> Evaluation determins what steps to take and execution takes the steps? Evaluation would is unecessary when there is no execution?
04:50:17 × ph88^ quits (~ph88@2a02:8109:9e00:7e5c:d5a3:7dbb:e434:b544) (Ping timeout: 272 seconds)
04:50:27 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
04:50:53 <c_wraith> swarmcollective: hmm. No, evaluation is its own thing. Once something kicks it off, it handles things until the value is reduced to WHNF
04:51:03 <__minoru__shirae> I think that weird behavior is caused by `return`
04:51:26 <swarmcollective> Thank you. Much appreciated, c_wraith
04:51:33 <__minoru__shirae> I'm trying to add `return` there, but get type errors
04:52:07 clog joins (~nef@bespin.org)
04:52:49 <c_wraith> swarmcollective: so like.. "main = let x = 1 + 2 in print x". Execution says "print the value named x". Evaluation says "x is the result of applying (+) to 1 and 2"
04:53:23 <swarmcollective> Yes, makes sense!
04:55:09 <swarmcollective> and "main = let x = 1 + 2 in print 0": Execution says "print the value 0". Evaluation says "I'm bored." since x is not used and 0 is const. :)
04:55:20 × kam1 quits (~kam1@5.125.240.66) (Read error: Connection reset by peer)
04:55:25 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
04:55:41 <c_wraith> pretty much. There's evaluation going on under the hood that I ignored, since print = putStrLn . show
04:55:47 <c_wraith> but you've got the right idea
04:56:44 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:57:09 × danso quits (~dan@d67-193-121-2.home3.cgocable.net) (Read error: Connection reset by peer)
04:57:25 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
04:57:40 danso joins (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009)
04:57:53 raym joins (~ray@45.64.220.98)
04:58:15 × danso quits (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Client Quit)
04:58:42 danso joins (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009)
04:58:58 × motherfsck quits (~motherfsc@unaffiliated/motherfsck) (Ping timeout: 265 seconds)
04:59:48 <c_wraith> __minoru__shirae: https://paste.tomsmeding.com/52rbE2mX
05:01:36 <__minoru__shirae> c_wraith: the exception is raised during execution, so you're good
05:02:06 <__minoru__shirae> the thing is that it is also catched, but the example says that it shouldn't?
05:02:14 <__minoru__shirae> I mean the book says
05:02:26 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
05:03:30 motherfsck joins (~motherfsc@unaffiliated/motherfsck)
05:03:34 <c_wraith> I'm pretty sure you'll find the book says something else
05:04:10 desophos joins (~desophos@2601:249:1680:a570:b92b:7f69:c86c:e272)
05:05:02 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-nldpnezpjzmypwhq) (Quit: Connection closed for inactivity)
05:05:03 <c_wraith> Indeed. the book says that (return (n / d)) doesn't raise ArithException when it's executed and d=0
05:05:12 <__minoru__shirae> so how do I reconcile this example from the book https://paste.tomsmeding.com/BWPp6agN with the other one https://paste.tomsmeding.com/mwwvvajN ?
05:05:29 <c_wraith> execution vs evaluation
05:05:54 <c_wraith> return does nothing when executed
05:06:01 <c_wraith> When it does nothing, no exception is raised
05:06:31 <c_wraith> readFile, on the other hand, does something when it's executed
05:06:42 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
05:06:44 <__minoru__shirae> hmm, "n / d" doesn't do any IO - that's one difference
05:07:08 <c_wraith> you're so close
05:07:16 <__minoru__shirae> yeah, I think I vaguely understand
05:08:07 <c_wraith> try/catch handle exceptions raised *by the IO*.
05:08:25 × conal quits (~conal@64.71.133.70) (Ping timeout: 240 seconds)
05:08:25 <c_wraith> return does no IO. So it can't raise an exception
05:08:50 <swarmcollective> In my limited understanding: `return` doesn't really care much about the "parameter" to the right, it is just saying "Ok, I'm done working *in* the context of the Monad".
05:08:50 <c_wraith> readFile tries to open the file when it's executed. It will raise an exception if it fails to do that for some reason
05:10:09 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 264 seconds)
05:10:29 × Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 256 seconds)
05:11:48 × Wuzzy quits (~Wuzzy@p57a2e574.dip0.t-ipconnect.de) (Remote host closed the connection)
05:12:12 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-ernfxztrwrfkcllh)
05:13:40 <__minoru__shirae> so there is a big difference between performing IO and forcing something to WHNF - from the exceptions standpoint and I think it is messy
05:14:12 <c_wraith> yes, and yes
05:14:28 × MarcelineVQ quits (~anja@198.254.199.42) (Ping timeout: 272 seconds)
05:14:30 <c_wraith> as was brought up before, exceptions don't really fit into a lazy world
05:14:44 <c_wraith> There are... problems.
05:14:53 <c_wraith> A lot more than just this
05:15:36 <c_wraith> which is why it's recommended that pure code not raise exceptions that you're intended to handle.
05:15:42 MarcelineVQ joins (~anja@198.254.199.42)
05:16:36 <__minoru__shirae> you meant to say "not intended to handle"?
05:17:16 × raym quits (~ray@45.64.220.98) (Quit: leaving)
05:18:04 <c_wraith> few people are concerned when you have (error "this shouldn't have happened, this is a bug in function X") inside function X.
05:18:43 <c_wraith> IE, it's an exception you're not expected to handle. You're expected to fix it so it isn't raised anymore
05:19:36 <c_wraith> Some people don't like that, but most people accept it as easier than handling the issue some other way when the underlying cause is a bug
05:20:18 <c_wraith> On the other hand, something like the way (!!) uses an exception to indicate the index was negative or too big? That's kind of bad.
05:20:20 kam1 joins (~kam1@5.125.240.66)
05:20:37 × Noldorin quits (~noldorin@unaffiliated/noldorin) (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:20:49 <c_wraith> It makes people want to catch the exception. An out of range index isn't a bug in the indexing code.
05:20:53 × kam1 quits (~kam1@5.125.240.66) (Client Quit)
05:21:23 <c_wraith> This is the sort of thing that causes problems.
05:21:29 <swarmcollective> It would be less bad if (!!) returned Maybe a, but the author didn't want to introduce Maybe in that case?
05:22:10 <c_wraith> So no, I said what I meant. It's recommended that pure code should not raise exceptions that the caller might want to handle.
05:22:13 <__minoru__shirae> how about the likes of FileNotFoundException? are there people having issue with that?
05:22:33 <c_wraith> I *really* hope FileNotFoundException isn't raised by pure functions.
05:22:51 <__minoru__shirae> oh, I forgot that we are talking about pure functions
05:22:52 <c_wraith> If it is, yes - a lot of people would be concerned.
05:23:06 <c_wraith> Raising it from an IO action is perfectly fine, though
05:23:49 conal joins (~conal@64.71.133.70)
05:23:52 <c_wraith> swarmcollective: yeah, (!!) is one of the family of partial functions in Prelude that are sometimes convenient enough to be worth using, despite the ways they aren't perfect design.
05:23:55 lordyod joins (~lordyod@c-67-169-144-132.hsd1.ca.comcast.net)
05:25:20 <swarmcollective> The pure code using (!!) should ensure that the index value is within range, making exception handling irrelevant? Which is a great place to be. I've always been able to fix my code when seeing exceptions like `head`, empty list) or (!!) index out of bounds.
05:26:05 <c_wraith> I mean, yeah. That's the way it works in practice. But it's a little unpleasant to push those preconditions onto the caller without specifying it in the type
05:26:32 <c_wraith> Here's an example of something using error internally as a "this should never happen" case: https://gist.github.com/chowells79/996f2749b088d287937e3eff11055522
05:26:57 <c_wraith> (see line 49 - I may have overdocumented it just to make sure I never had to remember how it works from scratch again)
05:28:34 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
05:28:57 <swarmcollective> Especially where the behavior *seems* inconsistent. For example `take i xs` and `drop i xs` where i > length xs is acceptable, returning []. I kind of get why. `head` and (!!) are expected to return a sane single value. `take` and `drop` are expected to return a list.
05:29:33 × vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
05:30:31 <c_wraith> I won't argue that head and (!!) don't have problems. I just think of them as convenience hacks when I'm ok with being sloppy :)
05:30:53 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
05:31:50 × polyrain quits (~polyrain@2001:8003:e4d8:4101:cd73:c730:3a58:912c) (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:32:21 <swarmcollective> Optimizing for the 98+% case. :)
05:32:24 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
05:32:57 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 264 seconds)
05:34:05 × Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007)
05:34:44 Tario joins (~Tario@201.192.165.173)
05:35:29 Saukk joins (~Saukk@83-148-239-3.dynamic.lounea.fi)
05:37:54 <desophos> hi, i'm having some confusion with generating functions using QuickCheck. i have a function whose logic requires an argument function `f :: [a] -> [b]` such that `length (f x) == length x` for all x. is this possible? is there a better way to go about this? i just need my generated function to preserve the length of the input list. i'm using `suchThat` to generate other constrained values but i can't figure out how to define
05:37:54 <desophos> this particular constraint, since i want it to hold true over all inputs (i know this can't be directly computed because there are infinite inputs, but maybe it can be proven? idk)
05:42:24 <desophos> hmm, i can specify that the length of both input and output should be 2, if that would make this easier
05:44:57 × borne quits (~fritjof@200116b8647b450069fc6bd724c60777.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
05:46:40 borne joins (~fritjof@200116b864bdfd0063240409dc9964f8.dip.versatel-1u1.de)
05:47:22 × ph88 quits (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) (Ping timeout: 256 seconds)
05:49:56 × petersen quits (~petersen@redhat/juhp) (Ping timeout: 240 seconds)
05:50:48 × Saukk quits (~Saukk@83-148-239-3.dynamic.lounea.fi) (Remote host closed the connection)
05:55:29 × banux1 quits (~banux@195.140.213.38) (Remote host closed the connection)
05:56:24 Neuromancer joins (~Neuromanc@unaffiliated/neuromancer)
05:56:35 kam1 joins (~kam1@5.125.240.66)
05:57:35 × kam1 quits (~kam1@5.125.240.66) (Read error: Connection reset by peer)
06:01:44 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:04:25 × hololeap quits (~hololeap@unaffiliated/hololeap) (Ping timeout: 240 seconds)
06:05:56 × borne quits (~fritjof@200116b864bdfd0063240409dc9964f8.dip.versatel-1u1.de) (Ping timeout: 240 seconds)
06:07:18 hololeap joins (~hololeap@unaffiliated/hololeap)
06:16:22 ixaxaar joins (~ixaxaar@49.207.197.94)
06:20:34 raym joins (~ray@45.64.220.98)
06:30:32 × andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Remote host closed the connection)
06:31:08 andreas303 joins (~andreas@gateway/tor-sasl/andreas303)
06:32:26 <desophos> for the record, i ended up using a newtype where i generate the test input for the function under test (`xs`) and then generate an f `suchThat (\f -> all ((== 2) . length) (map f (pairs xs))`
06:32:52 <desophos> ^ in its Arbitrary instance
06:33:56 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
06:34:13 <swarmcollective> desophos, that is interesting. I'd like to learn more about QuickCheck; I've done minimal testing in Haskell thus far.
06:34:15 <desophos> idk if tuple newtypes that represent the arguments to a function under test are an anti-pattern, but i've found them very useful
06:34:45 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
06:35:12 bitmagie joins (~Thunderbi@200116b80679950091e8a387e741c6b0.dip.versatel-1u1.de)
06:35:18 <__minoru__shirae> c_wraith: I revisited our conversation and I think I'm less confused now, thanks for the help
06:35:42 <swarmcollective> desophus, do you have a one line example of the "tuple newtype" ?
06:35:57 <desophos> newtype ChunkArgs a = ChunkArgs (Int, [a])
06:36:07 <c_wraith> Sorry for jumping around as much as I did. you could have been better served by a more compact explanation
06:37:04 <desophos> and then i define an Arbitrary instance for it with custom constraints for the function
06:37:41 × bitmagie quits (~Thunderbi@200116b80679950091e8a387e741c6b0.dip.versatel-1u1.de) (Client Quit)
06:38:12 <swarmcollective> When I try to use newtype with a tuple, I get: Illegal binding of built-in syntax: (,)
06:38:43 <desophos> this is my full implementation: https://paste.tomsmeding.com/8AZappu1
06:41:07 × stef204 quits (~stef204@unaffiliated/stef-204/x-384198) (Ping timeout: 272 seconds)
06:42:09 <c_wraith> desophos: what are you trying to do with n there? Unless I'm misreading something, the only value that can satisfy those constraints is len
06:42:24 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
06:43:22 ransom joins (~c4264035@2a09:bac0:98::830:8634)
06:43:23 <desophos> i'm trying to get a value `0 < y <= len` that evenly divides len
06:43:58 <c_wraith> oh.
06:44:15 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
06:44:32 Tario joins (~Tario@201.192.165.173)
06:44:36 <c_wraith> that'd be way more efficient to do by factoring and choosing one of the factors.
06:44:45 <__minoru__shirae> c_wraith: good to know about execution and evaluation, as I said, I can run code in terminal, but I can't have a conversation with a compilator.
06:44:48 them_ joins (~them_@217.146.82.202)
06:44:58 <__minoru__shirae> *compiler
06:47:23 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
06:49:20 <desophos> hmm, despite learning haskell, i'm not enough of a mathematician to write a factoring algorithm off the top of my head
06:49:34 <swarmcollective> It doesn't appear as though one can use `fst` and `snd` to access the properties of a tuple newtype. HaskellWiki does not address this. :/
06:49:39 <swarmcollective> Any pointers?
06:50:26 <c_wraith> newtypes are totally separate types.
06:50:35 <c_wraith> fst and snd only work with (a, b)
06:50:52 <c_wraith> (The whole point of a newtype is that it's a *new* type)
06:51:05 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 240 seconds)
06:51:06 <desophos> i use pattern matching to extract the values
06:51:15 × __minoru__shirae quits (~shiraeesh@109.166.57.144) (Ping timeout: 272 seconds)
06:51:48 <swarmcollective> Yeah, pattern matching makes sense now that you say it. Thank you.
06:51:58 <desophos> `f args = ... where ChunkArgs (n, xs) = args`
06:54:09 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
06:58:36 <swarmcollective> Is there overhead with using `newtype Thing = MkThing (String, String)` compared to `type Thing = (String, String)`? I can see the benefit in the source code being a bit more explicit in providing the MkThing in pattern matching; perhaps there are other benefits as well?
06:59:40 <c_wraith> newtypes have no direct runtime overhead - there's no runtime representation of their constructor
07:00:07 <c_wraith> But they can have an impact if you map their constructor over something. That will require rebuilding the data structure, even though no values are changing
07:00:27 <swarmcollective> Perfect. So, newtype provides a more strict type checking by nature without adding overhead, it sounds.
07:01:01 __minoru__shirae joins (~shiraeesh@109.166.57.144)
07:01:34 <ski> `f args = ... where ChunkArgs (n, xs) = args' is equivalent to `f (ChunkArgs (n,xs)) = ...'. or `f args@(ChunkArgs (n,xs)) = ...', if you actually wanted to name the whole thing as well
07:02:25 bitmagie joins (~Thunderbi@200116b80679950091e8a387e741c6b0.dip.versatel-1u1.de)
07:02:36 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
07:02:41 <swarmcollective> I was using `type Thing = (String, [String])` in (_, otherChannel) = partition ((==) channelName . fst) $ watching dashboardState
07:02:50 <swarmcollective> Where watching :: [Thing]
07:03:23 <ski> `(==) channelName' could also be spelled `(channelName ==)'
07:04:00 × bitmagie quits (~Thunderbi@200116b80679950091e8a387e741c6b0.dip.versatel-1u1.de) (Client Quit)
07:04:06 <swarmcollective> I won't be able to use function composition `((==) channelName . fst)` once switching to `newtype Thing = MkThing (String, [String])` unless I'm missing something (which is likely)
07:04:36 <ski> you could define `unThing :: Thing -> (String,[String])'
07:05:25 <ski> also, if you're only picking one of the partitions, you could use `filter' instead
07:05:36 <swarmcollective> then ((channelName ==) . fst . unThing) $ watching dashboardState
07:06:26 <swarmcollective> Oh! That's true! Pebkac + copy / paste issue there. ;)
07:06:30 <ski> > partition even [0 .. 9]
07:06:31 <lambdabot> ([0,2,4,6,8],[1,3,5,7,9])
07:06:54 <ski> otherChannel = filter ((channelName /=) . fst . unThing) (watching dashboardState)
07:07:47 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
07:08:10 <desophos> thanks ski! i forgot about that, that makes it much more concise
07:09:48 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
07:09:48 <swarmcollective> ski <- Thanks + 1
07:09:49 × heatsink quits (~heatsink@2600:1700:bef1:5e10:606c:d5c5:bedc:297d) (Remote host closed the connection)
07:11:18 forgottenone joins (~forgotten@176.42.25.228)
07:12:13 jamestmartin joins (james@jtmar.me)
07:13:27 ezrakilty joins (~ezrakilty@75-172-120-208.tukw.qwest.net)
07:13:35 <swarmcollective> As some of the types I'm working with have more than two and `fst` and `snd` are less concise, I opted for: "otherChannel = filter ((channelName /=) . nameFromChannel) $ watching dashboardState"
07:14:00 <swarmcollective> I believe the (something)From(SomeNewType) will work consistently in this module.
07:14:32 <ski> looks reasonable
07:14:47 <ski> (apart from the `$', that is)
07:15:43 frozenErebus joins (~frozenEre@94.128.81.133)
07:16:09 × forgottenone quits (~forgotten@176.42.25.228) (Remote host closed the connection)
07:16:15 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
07:17:01 Lowl3v3l joins (~Lowl3v3l@dslb-002-203-233-121.002.203.pools.vodafone-ip.de)
07:17:36 × ezrakilty quits (~ezrakilty@75-172-120-208.tukw.qwest.net) (Ping timeout: 240 seconds)
07:18:11 forgottenone joins (~forgotten@176.42.25.228)
07:20:26 × hexfive quits (~hexfive@50.35.83.177) (Quit: i must go. my people need me.)
07:21:08 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 272 seconds)
07:27:21 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:29:47 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
07:30:24 ransom_ joins (~c4264035@c-73-243-2-10.hsd1.co.comcast.net)
07:30:44 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
07:30:52 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
07:31:14 × Lowl3v3l quits (~Lowl3v3l@dslb-002-203-233-121.002.203.pools.vodafone-ip.de) (Remote host closed the connection)
07:31:56 × ransom quits (~c4264035@2a09:bac0:98::830:8634) (Ping timeout: 240 seconds)
07:32:40 × coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
07:33:25 × berberman_ quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.8.2 - https://znc.in)
07:33:51 berberman joins (~berberman@unaffiliated/berberman)
07:33:57 <ibloom> Has anyone written a haskell library for Metal shaders?
07:35:08 <ibloom> Googling this I'm getting machine shops and stuff :)
07:41:40 _noblegas joins (uid91066@gateway/web/irccloud.com/x-twmjqwcrorjsfymz)
07:48:58 × desophos quits (~desophos@2601:249:1680:a570:b92b:7f69:c86c:e272) (Quit: Leaving)
07:49:45 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 264 seconds)
07:55:06 × average quits (uid473595@gateway/web/irccloud.com/x-xocrlotfjlxduqbi) (Quit: Connection closed for inactivity)
07:58:24 average joins (uid473595@gateway/web/irccloud.com/x-lumfcglyvjlqciwx)
08:01:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
08:03:36 × frozenErebus quits (~frozenEre@94.128.81.133) (Ping timeout: 240 seconds)
08:03:48 <koz_> ibloom: I'm not aware of one.
08:04:17 <ibloom> Hmmm... they finally totally dump OpenCL unfortunately.
08:04:27 <ibloom> *dumped
08:05:32 <ibloom> it's so sad that we have 3 baseline GPU languages for different platforms.
08:05:46 <ibloom> it's like back to the 80's
08:07:36 × ransom_ quits (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:09:55 stiell joins (~stian@fsf/member/stiell)
08:12:23 Varis joins (~Tadas@unaffiliated/varis)
08:19:01 wz1000 joins (~wz1000@static.11.113.47.78.clients.your-server.de)
08:23:19 aggin joins (~ecm@103.88.87.1)
08:25:20 × tribble2 quits (~tribble2@unaffiliated/tribble2) (Read error: Connection reset by peer)
08:34:07 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
08:34:40 × __minoru__shirae quits (~shiraeesh@109.166.57.144) (Remote host closed the connection)
08:35:25 __minoru__shirae joins (~shiraeesh@109.166.57.144)
08:36:51 × forgottenone quits (~forgotten@176.42.25.228) (Read error: Connection reset by peer)
08:36:56 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
08:37:43 forgottenone joins (~forgotten@176.42.25.228)
08:44:05 × forgottenone quits (~forgotten@176.42.25.228) (Ping timeout: 272 seconds)
08:49:10 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
08:49:24 hekkaidekapus{ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
08:51:54 × hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds)
08:54:19 × __minoru__shirae quits (~shiraeesh@109.166.57.144) (Ping timeout: 256 seconds)
08:54:33 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
08:57:39 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Quit: WeeChat 3.0)
09:00:03 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
09:00:03 × tomferon[m] quits (tomferonmo@gateway/shell/matrix.org/x-vhvkjejfaetfyvlx) (Quit: Idle for 30+ days)
09:00:20 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
09:06:17 forgottenone joins (~forgotten@176.42.25.228)
09:09:23 × kmein quits (~weechat@static.173.83.99.88.clients.your-server.de) (Quit: ciao kakao)
09:11:21 kmein joins (~weechat@static.173.83.99.88.clients.your-server.de)
09:12:15 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
09:14:43 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
09:17:54 coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
09:20:25 m0rphism1 joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de)
09:25:12 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
09:28:17 × hekkaidekapus{ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds)
09:28:47 hekkaidekapus{ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
09:29:42 × forgottenone quits (~forgotten@176.42.25.228) (Ping timeout: 272 seconds)
09:32:01 <[exa]> ibloom: why not vulkan & spir-v?
09:34:52 nicecoats joins (~nicecoats@h8.138.213.151.dynamic.ip.windstream.net)
09:35:02 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-ernfxztrwrfkcllh) (Quit: Connection closed for inactivity)
09:38:21 Lowl3v3l joins (~Lowl3v3l@dslb-002-203-233-121.002.203.pools.vodafone-ip.de)
09:39:28 Narinas joins (~Narinas@189.223.179.61.dsl.dyn.telnor.net)
09:39:38 Gurkenglas joins (~Gurkengla@dslb-092-075-179-204.092.075.pools.vodafone-ip.de)
09:43:54 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Read error: Connection reset by peer)
09:45:00 × aggin quits (~ecm@103.88.87.1) (Quit: WeeChat 3.0.1)
09:47:48 _ht joins (~quassel@82.169.194.8)
09:51:50 idhugo joins (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net)
09:57:57 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
09:58:54 fendor joins (~fendor@77.119.131.57.wireless.dyn.drei.com)
10:00:49 × nicecoats quits (~nicecoats@h8.138.213.151.dynamic.ip.windstream.net) (Quit: Textual IRC Client: www.textualapp.com)
10:04:10 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
10:04:12 frozenErebus joins (~frozenEre@94.128.81.133)
10:04:23 Rudd0 joins (~Rudd0@185.189.115.103)
10:07:29 iqubic joins (~user@2601:602:9500:4870:4339:c0b6:b79f:872d)
10:09:44 ezrakilty joins (~ezrakilty@75-172-120-208.tukw.qwest.net)
10:12:16 Sonderblade joins (~helloman@94.191.137.213.mobile.tre.se)
10:12:24 × Sonderblade quits (~helloman@94.191.137.213.mobile.tre.se) (Client Quit)
10:12:35 heatsink joins (~heatsink@2600:1700:bef1:5e10:f066:c875:bf57:1bea)
10:14:29 knupfer joins (~Thunderbi@200116b82ce187003420f2975f416810.dip.versatel-1u1.de)
10:15:17 aramend joins (~aramend@5.186.119.223.cgn.fibianet.dk)
10:15:31 × aramend quits (~aramend@5.186.119.223.cgn.fibianet.dk) (Client Quit)
10:16:45 × hololeap quits (~hololeap@unaffiliated/hololeap) (Ping timeout: 264 seconds)
10:17:26 × heatsink quits (~heatsink@2600:1700:bef1:5e10:f066:c875:bf57:1bea) (Ping timeout: 264 seconds)
10:19:05 borne joins (~fritjof@200116b864bdfd0069fc6bd724c60777.dip.versatel-1u1.de)
10:20:49 hololeap joins (~hololeap@unaffiliated/hololeap)
10:21:07 × hololeap quits (~hololeap@unaffiliated/hololeap) (Max SendQ exceeded)
10:21:38 hololeap joins (~hololeap@unaffiliated/hololeap)
10:22:08 × _ht quits (~quassel@82.169.194.8) (Remote host closed the connection)
10:23:12 × knupfer quits (~Thunderbi@200116b82ce187003420f2975f416810.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
10:23:47 × borne quits (~fritjof@200116b864bdfd0069fc6bd724c60777.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
10:24:30 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
10:25:18 borne joins (~fritjof@200116b864bdfd0069fc6bd724c60777.dip.versatel-1u1.de)
10:28:25 × frozenErebus quits (~frozenEre@94.128.81.133) (Ping timeout: 240 seconds)
10:30:15 × borne quits (~fritjof@200116b864bdfd0069fc6bd724c60777.dip.versatel-1u1.de) (Quit: WeeChat 3.0)
10:32:08 frozenErebus joins (~frozenEre@94.128.81.133)
10:32:21 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
10:35:24 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:37:21 × leah2 quits (~leah@vuxu.org) (Ping timeout: 272 seconds)
10:37:27 × hololeap quits (~hololeap@unaffiliated/hololeap) (Ping timeout: 256 seconds)
10:38:34 hololeap joins (~hololeap@unaffiliated/hololeap)
10:39:35 son0p joins (~son0p@181.58.39.182)
10:39:41 × denisse quits (~spaceCat@gateway/tor-sasl/alephzer0) (Remote host closed the connection)
10:39:57 denisse joins (~spaceCat@gateway/tor-sasl/alephzer0)
10:41:25 kam1 joins (~kam1@83.123.32.229)
10:41:57 × st8less quits (~st8less@inet-167-224-197-181.isp.ozarksgo.net) (Quit: WeeChat 2.9)
10:42:31 × kam1 quits (~kam1@83.123.32.229) (Read error: Connection reset by peer)
10:42:45 <merijn> ibloom: It's a bit unclear if you're talking, like, a DSL for creating Metal shaders or just a library to run existing ones (in whatever language Metal uses)?
10:45:47 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Read error: Connection reset by peer)
10:46:05 × frozenErebus quits (~frozenEre@94.128.81.133) (Ping timeout: 240 seconds)
10:49:10 leah2 joins (~leah@vuxu.org)
10:49:23 Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362)
10:49:58 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
10:51:26 knu10 joins (58823d80@gateway/web/cgi-irc/kiwiirc.com/ip.88.130.61.128)
10:51:27 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Read error: Connection reset by peer)
10:52:43 frozenErebus joins (~frozenEre@94.128.81.133)
10:52:54 Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362)
10:54:43 <knu10> Is it possible to get a representation of a promoted constructor? Like Generics Rep, but for kinds other than *
10:55:11 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds)
10:56:00 <merijn> knu10: Wow...that's a cursed question
10:56:18 <knu10> I'd like to write a type family which converts a Symbol to an appropriate promoted constructor but don't want to write a line for every promoted constructor and I want to avoid TH
10:57:09 <merijn> I think you want Idris :p
10:57:20 <knu10> So I thought I could convert the Symbol to an Representation and then turn it back into the promoted constructor
10:57:44 <knu10> Well, it's still all on the type level, no terms involved
10:58:09 fendor_ joins (~fendor@77.119.131.224.wireless.dyn.drei.com)
10:58:31 <merijn> Sure, but with Idris you can at just directly use the term level stuff at the type level
10:58:55 <knu10> I'm lazy, don't force me
10:58:59 __monty__ joins (~toonn@unaffiliated/toonn)
10:59:05 <knu10> :)
10:59:12 <merijn> knu10: Your question is, essentially, "has anyone duplicated all this term level generics stuff at the type level?" to which I'm pretty sure the answer is: No
10:59:20 <merijn> Alternative answer: Ew...god, no
11:00:05 <knu10> Hm, so perhaps I'll have to use TH.
11:00:23 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Remote host closed the connection)
11:00:41 × fendor quits (~fendor@77.119.131.57.wireless.dyn.drei.com) (Ping timeout: 256 seconds)
11:01:19 <merijn> I would probably recommend instead consulting your diety/spiritual advisor of choice and reevaluating your life's choices leading to this question, but to each their own ;)
11:01:33 <knu10> I had assumed, that it's quite a common case to want to convert a Symbol to a promoted constructor.
11:01:49 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
11:01:59 <knu10> It's the kind of question which I ponder on sundays and on vacation.
11:02:37 <merijn> I mean, I think it *can* be done, but it'd involve a hell of a lot of TH *and* hasochism
11:02:47 × jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection)
11:03:12 jb55 joins (~jb55@gateway/tor-sasl/jb55)
11:03:45 × coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
11:03:50 <knu10> Well, a bit of a challenge is good for mental health
11:06:41 <knu10> Hm, or I make the promoted constructors "sloppy kinded", i.e. make only one constructor which takes a symbol and checks against a list of valid symbols to typerror if not found.
11:07:04 <knu10> I.e. stringly typed on the type level.
11:07:47 jamm_ joins (~jamm@unaffiliated/jamm)
11:08:54 × Guest64938 quits (~textual@2603-7000-3040-0000-0036-b491-5ac9-398e.res6.spectrum.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:09:11 jamm__ joins (~jamm@unaffiliated/jamm)
11:10:07 <Uniaika> https://lukelau.me/haskell/posts/making-the-most-of-cabal/
11:10:13 <Uniaika> jlombera pointed out that you can in fact, pretty much replicate Stackage in Cabal by freezing with a specific Stackage LTS, by downloading a config file provided:
11:10:16 <Uniaika> that's nice!!
11:10:18 <Uniaika> curl https://www.stackage.org/lts-15.15/cabal.config > cabal.project.freeze
11:12:12 <maerwald> Uniaika: that's only half the way
11:12:38 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds)
11:13:18 heatsink joins (~heatsink@2600:1700:bef1:5e10:f066:c875:bf57:1bea)
11:13:19 <maerwald> but if you don't have a stack.yaml, then it's probably fine
11:13:50 <Uniaika> maerwald: I'd also love to have a way to distribute LTSs for cabal
11:14:11 Tops2 joins (~Tobias@dyndsl-095-033-023-209.ewe-ip-backbone.de)
11:14:31 <Uniaika> like "import https://packages.company.tld/haskell/lts-company.cabal.project" in the cabal.project
11:15:05 kenran joins (~kenran@i59F67B96.versanet.de)
11:15:15 <merijn> Uniaika: I mean, isn't that better address by having a company hackage server only having those packages imported and not using Hackage at all?
11:15:30 Franciman joins (~francesco@host-82-49-79-189.retail.telecomitalia.it)
11:15:34 <maerwald> Uniaika: https://github.com/haskell/cabal/issues/6528
11:16:06 Tops21 joins (~Tobias@dyndsl-095-033-023-209.ewe-ip-backbone.de)
11:16:25 <merijn> maerwald: Wouldn't hold my breath >.>
11:16:43 kafl joins (~kafl@unaffiliated/kafl)
11:16:51 <maerwald> merijn: why? I don't think it's hard to implement
11:17:01 <Uniaika> merijn: having worked in a company that used stack LTSs rather than a custom hackage server, it's better to have to edit a yaml file to point to the proper commits/tags in the git rather than making releases for every project
11:17:08 <merijn> maerwald: Who would implement it?
11:17:13 <maerwald> merijn: me
11:17:28 <maerwald> but I'm not gonna if there's no response from the maintainers
11:17:37 <merijn> maerwald: There won't be
11:17:44 <maerwald> Then I'm not gonna
11:17:49 Tops22 joins (~Tobias@dyndsl-095-033-023-209.ewe-ip-backbone.de)
11:18:02 × heatsink quits (~heatsink@2600:1700:bef1:5e10:f066:c875:bf57:1bea) (Ping timeout: 264 seconds)
11:18:07 <merijn> maerwald: phadej stopped working on cabal-install because he (justifiably) felt abandonned
11:18:09 × kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
11:19:06 <maerwald> Uniaika: "enterprise environments" :p
11:19:13 <merijn> maerwald: Since hvr has been absent/busy for well over a year that means there's no regular maintainer and none of the occasional contributors feel empowered/authorised to take control
11:19:26 × Tops2 quits (~Tobias@dyndsl-095-033-023-209.ewe-ip-backbone.de) (Ping timeout: 256 seconds)
11:19:28 <maerwald> that's a CLC matter imo
11:20:14 <merijn> maerwald: The issues has been handed to the Haskell Foundation to deal with, but considering a significant portion of the board is stack fanboys...
11:20:45 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
11:20:52 <maerwald> means we should join the foundation
11:21:08 × Tops21 quits (~Tobias@dyndsl-095-033-023-209.ewe-ip-backbone.de) (Ping timeout: 256 seconds)
11:21:23 <merijn> maerwald: As for your proposal, I see one problem
11:21:44 <merijn> maerwald: cabal.project.freeze is part of critical path
11:21:56 <merijn> maerwald: I don't think network requests are acceptable
11:22:31 <maerwald> Why?
11:22:37 <merijn> maerwald: hvr spend *a lot* of work on the critical path/recompilation detection to keep it under 100ms so "cabal run", etc. can be suitably used interactively
11:22:49 <maerwald> it's already slow af
11:22:52 <maerwald> but yeah
11:22:59 × jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:23:00 <merijn> maerwald: having to do a network request for plan.json is bad
11:23:02 <merijn> maerwald: How so?
11:23:08 <maerwald> you can reduce it with caching and HEAD request
11:23:19 <merijn> I use no-op and interactive use of cabal daily
11:23:56 × frozenErebus quits (~frozenEre@94.128.81.133) (Ping timeout: 240 seconds)
11:24:17 <maerwald> given that it's an optional feature I'm pretty sure ppl using it will be aware that it causes a network request
11:24:22 <merijn> maerwald: I have a pretty big project and a few hundred dependencies and no-op build/run overhead is under 100ms for me, so I'm curious what makes you say it's slow?
11:24:36 <maerwald> if you don't use the feature, you're not affected
11:24:42 <maerwald> so I don't see a conflict of interest
11:25:21 <merijn> maerwald: Well, if you say this is so desirable, then your basically sacrificing the interactive use for everyone who is interested in using this
11:25:24 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
11:26:34 <maerwald> stack already does this, it works well, I don't know of any issues with speed there
11:27:18 saitamaplus joins (uid272474@gateway/web/irccloud.com/x-zjttagjjvsylgivd)
11:28:58 <merijn> Pretty sure stack only fetches each snapshot once and caches it, because they're immutable and only a version bump affects them
11:29:20 <merijn> So if you are willing to require the remote snapshot/freeze never changes, then it's easy to do without affecting latency, sure
11:29:21 <maerwald> a resolver can be a url
11:30:00 <merijn> I dunno the details of how stack approaches this
11:30:14 <maerwald> yeah, I don't see any major issue here
11:30:29 <maerwald> there are some tradeoffs to make, but nothing that affects users not interested in it
11:30:38 <merijn> I'd want to see how it affects the latency first, tbh
11:30:47 × knu10 quits (58823d80@gateway/web/cgi-irc/kiwiirc.com/ip.88.130.61.128) (Quit: Connection closed)
11:31:12 <maerwald> refetch policy could simply be provided by command line
11:31:28 <Uniaika> < maerwald> Uniaika: "enterprise environments" :p // gotta hit the proper keywords ;)
11:31:44 <Uniaika> < maerwald> that's a CLC matter imo // see the libraries@ thread about it
11:31:52 <maerwald> yes, I commented there
11:33:08 <Uniaika> ah sorry
11:34:16 <maerwald> Go ecosystem is more towards authorship (with it's hilarious github import feature)... haskell could have something similar, but hackage is not that
11:34:52 <merijn> Well, you know, if someone is willing to pay me to work on cabal-install I'll happily declare myself cabal czar after my thesis is out the door :p
11:35:13 <Franciman> what is enterprise environments?
11:35:27 <maerwald> merijn: once your thesis is out the door, you'll quit programming due to depression after looking at your TODO-after-thesis.md
11:35:27 <dcoutts> merijn: that's not a bad idea :-)
11:35:36 × xcmw quits (~textual@dyn-72-33-2-47.uwnet.wisc.edu) (Quit: Textual IRC Client: www.textualapp.com)
11:36:22 pera joins (~pera@unaffiliated/pera)
11:37:04 <merijn> dcoutts: I know, but my work doesn't pay me to work on Haskell (at least, not intentionally :p) and doing that in my spare time/weekend sounds like a one way trip to burnout-ville
11:37:35 <dcoutts> merijn: you said "if someone is willing to pay". That's an important part of it.
11:37:39 <Franciman> maerwald, my politics for adding custom behaviours to cabal is to try to write a wrapper, when possible
11:37:43 <Uniaika> merijn: open a patreon
11:37:47 <Uniaika> or a ko-fi
11:37:48 <Franciman> if everybody likes what you do, probably it gets merged
11:37:52 <Uniaika> I'll send some bucks
11:37:56 <merijn> dcoutts: tbh, I've been worried about Oleg's situation for a few months
11:38:04 <Franciman> i think that a wrapper works fine for that issue
11:38:39 coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
11:38:44 <merijn> Uniaika: Building something like that up to a satisfiable amount takes a lot of time, so that's unrealistic
11:39:42 __minoru__shirae joins (~shiraeesh@109.166.57.144)
11:40:00 × coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Client Quit)
11:40:21 <maerwald> I have motivation to work on cabal-install, but not the capacity :o
11:40:57 <madnificent> Is there a way to have a type `data Thing = AThing | BThing` and then further have an `data ExtendedThing = AThing | BThing | CThing` ? I was assuming I'd be allowed to `data ExtendedThing = Thing | CThing`?
11:42:07 <Franciman> if I find a way to get around the problem of revisions that stackage mantainers so much whine about
11:42:14 <Franciman> i shall have news
11:42:24 <merijn> Franciman: Easy
11:42:28 <merijn> Franciman: Include index-state
11:42:42 <Franciman> merijn, problem
11:42:45 <Franciman> it is a global setting
11:42:49 <madnificent> So, I vaguely know that what I'm writing mixes things up. But it's the closest I got to expressing my vague goal and I'm hoping someone will smugly point me to how this sort of case is wrong thinking and will link me to some article or keywords to help my search.
11:42:54 <merijn> Franciman: https://cabal.readthedocs.io/en/latest/cabal-project.html?highlight=index-state#cfg-field-index-state
11:43:03 <Franciman> i suppose the stackage whiners want per package index state
11:43:04 <merijn> Franciman: It's not, you can set it in cabal.project...
11:43:08 <Franciman> no I mean
11:43:13 <Franciman> I want to set it on a per package base
11:43:51 <maerwald> hackage revisions were a huge design mistake, but there's no way back
11:44:01 jedws joins (~jedws@101.184.202.248)
11:44:58 <Franciman> I guess it would have been better if they modified the number
11:45:12 <Franciman> of he version
11:45:12 <Franciman> but you can't change much things when doing a revision
11:45:19 <Franciman> it should theoretically be safe
11:45:29 <Franciman> but i still don't understand why stackage whines about it
11:45:33 <Franciman> they say it broke things
11:45:41 <Franciman> -> they skip tests for some packages anyways
11:46:05 <dcoutts> Given that it's entirely optional and easy to ignore, I've never undersood why tool authors complain.
11:46:06 <maerwald> Franciman: it does break things, because the revision is not part of the tarball on hackage
11:46:36 <Franciman> maerwald, wut
11:46:43 <maerwald> Franciman: yes
11:46:47 <Franciman> and how does it work?
11:46:53 <Franciman> do you have any link to learn about it?
11:46:57 <maerwald> Franciman: hackage API allows you to fetch the latest revision
11:47:21 <maerwald> so if you package hackage stuff, you have to account for the fact
11:47:35 <maerwald> and you can see that by looking at all the .cabal metadata patches gentoo does
11:48:15 <maerwald> instead they could use the hackage API, but yeah
11:48:21 × Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
11:48:47 <maerwald> a source tarball being a self-contained consistent thing is an important property imo
11:49:19 × __minoru__shirae quits (~shiraeesh@109.166.57.144) (Ping timeout: 265 seconds)
11:49:33 <Franciman> also, changing things under others nose is not a good idea
11:49:44 <Franciman> it is better to signal with a version change
11:49:45 <dcoutts> Yes, it's crucial not to modify the original tarball. And of course hackage does not, it just provides the revisions as an optional thing that tools can choose to use or ignore.
11:49:53 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:50:08 <Franciman> dcoutts, but as far as I understand, there have been cases of revisions breaking things
11:50:14 <maerwald> also true
11:50:26 <maerwald> which is why cabal.freeze requires index pinning to be reliable
11:50:37 <dcoutts> Franciman: if you choose to use them, then yes it's both possible to fix mistakes and also possible to make mistakes.
11:50:58 <maerwald> and it's also possible the revision never makes it into the upstream repo
11:51:10 <Franciman> the problem is that RN stackage can reference revisions
11:51:12 <Franciman> cabal can not
11:51:17 <Franciman> cabal freeze*
11:51:33 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
11:51:42 <dcoutts> there's no need to reference revisions, all revisions are the same version of the code. It's the same tarball.
11:52:02 <Franciman> so what breaks?
11:52:04 <maerwald> dcoutts: you just said revisions can introduce mistakes
11:52:27 <maerwald> so with cabal you can't say "this revision is broken, don't use it" only implicitly via index state
11:52:31 <maerwald> which is not enough control
11:53:22 <maerwald> (I had a case of revision breaking build plan in production, because of another architecture that we didn't use)
11:53:25 <dcoutts> If you choose to use the latest revision of a package metadata and that tightens the constraints such that your build plan no longer works then you have a choice: you can look at what the maintainers have done (perhaps there is a bug in some combination of versions that you're using) or you can choose to override the constraint in your cabal.project.
11:53:56 × Bigcheese quits (~quassel@unaffiliated/bigcheese) (Remote host closed the connection)
11:54:01 <__monty__> Hmm, so it may be better to just bump the version? Potentially carefully revising the bad version so less people experience problems?
11:54:33 <maerwald> dcoutts: how can you override it? You can only override it by usint either a) index state (which is global per-project) or b) by adding source-repository
11:54:35 <dcoutts> You always have the option to override the constraints. But if maintainers have tightened constraints then it's very often for a good reason and it's worth looking at.
11:54:49 <maerwald> ah, you mean allow-newer/older?
11:55:04 Bigcheese joins (~quassel@unaffiliated/bigcheese)
11:55:09 <dcoutts> maerwald: you can override specific constraints in specific packages. Yes, using allow-newer/older
11:55:26 <Franciman> this is game changing
11:55:29 <Franciman> thanks
11:55:48 <dcoutts> "I want to ignore the upper boung constraint on foo in package bar"
11:55:50 <Franciman> I can compare the revision with the old version
11:55:57 <Franciman> and use allow- stuff
11:56:02 <Franciman> to fake the revision control
11:56:10 Franciman is dreaming
11:56:13 × hololeap quits (~hololeap@unaffiliated/hololeap) (Ping timeout: 256 seconds)
11:56:37 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
11:56:55 <maerwald> but allow-newer doesn't allow a version range afaik
11:56:58 <Franciman> maerwald, sorry, do you have al ink to hackage api?
11:57:01 hololeap joins (~hololeap@unaffiliated/hololeap)
11:57:08 <Franciman> maerwald, well I could use the constraint options
11:57:17 <dcoutts> maerwald: no, but why would it? You can already constraint further.
11:57:17 <maerwald> yeah, it's a bit more finicky
11:57:19 <Franciman> there is an option that allows adding further constraints that override
11:57:43 <maerwald> Franciman: https://hackage.haskell.org/api
11:57:44 <Franciman> ah you mean that using constraint, it is global
11:57:49 <Franciman> thanks a lot
11:58:45 × shailangsa quits (~shailangs@host86-186-177-153.range86-186.btcentralplus.com) (Ping timeout: 240 seconds)
11:59:13 <Franciman> as a side note, I still do not understand if I can create my own stackage
11:59:18 <Franciman> and make stack use my stackage
11:59:25 <maerwald> Franciman: yes
11:59:38 Alleria joins (~textual@2603-7000-3040-0000-0036-b491-5ac9-398e.res6.spectrum.com)
12:00:01 Alleria is now known as Guest4247
12:00:12 <maerwald> https://docs.haskellstack.org/en/stable/yaml_configuration/#resolver
12:00:27 <maerwald> it uses this pantry thing (awful if you ask me.. too much syntax/options)
12:00:37 <maerwald> so you provide a snapshot url
12:00:38 <Franciman> thanks, again
12:00:57 × jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:01:34 frozenErebus joins (~frozenEre@94.128.81.133)
12:01:53 bnbgg_ joins (uid454564@gateway/web/irccloud.com/x-dlouokgmjjwefkhf)
12:04:14 × Guest4247 quits (~textual@2603-7000-3040-0000-0036-b491-5ac9-398e.res6.spectrum.com) (Ping timeout: 264 seconds)
12:06:45 <ij> what does a priority queue do that Set doesn't?
12:07:18 <ij> I don't have any particular priority queue in mind
12:09:57 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 260 seconds)
12:10:14 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
12:11:10 jmo` joins (~user@h-162-127.A785.priv.bahnhof.se)
12:11:12 __minoru__shirae joins (~shiraeesh@109.166.57.144)
12:11:46 petersen joins (~petersen@redhat/juhp)
12:13:05 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
12:14:01 heatsink joins (~heatsink@2600:1700:bef1:5e10:f066:c875:bf57:1bea)
12:14:45 × lawid_ quits (~quassel@dslb-090-186-208-195.090.186.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
12:14:55 <dcoutts> ij: a heap is less ordered than an ordered search tree. Priority queues types typically use heap data structures. Ordered set types typically use ordered search trees.
12:15:10 <dcoutts> https://en.wikipedia.org/wiki/Heap_(data_structure)
12:15:13 lawid joins (~quassel@dslb-090-186-198-195.090.186.pools.vodafone-ip.de)
12:16:26 <dcoutts> The basic trade-off is that because heaps are less ordered than search trees, they provide fewer useful operations but the ones they do provide are faster (asymptotically).
12:17:01 coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
12:17:49 <ij> Data.PQueue shows that insert is faster (O(1), worst case O(log n), but deleteFindMin is O(log n) for both
12:18:38 × heatsink quits (~heatsink@2600:1700:bef1:5e10:f066:c875:bf57:1bea) (Ping timeout: 264 seconds)
12:19:58 <dcoutts> A nice way to look at it is this: you can build a heap in O(n) time, and then repeatedly extract the minimum element n times, each one O(log n) giving you O(n log n) total to sort. With an ordered tree it costs you O(n log n) to build in the first place and then O(n) to traverse to yield a sorted sequence.
12:20:11 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection)
12:20:30 <dcoutts> So both give you O(n log n) to sort (as theory requires) but with a difference balance of where you pay the costs.
12:20:42 <ij> that is a nice way to look at it!
12:21:10 <dcoutts> this is the basis of the heap sort algorithm
12:21:19 × leifm quits (~leif@dawn.whatbox.ca) (Ping timeout: 272 seconds)
12:21:34 leifm_ joins (~leifm@dawn.whatbox.ca)
12:21:38 shailangsa joins (~shailangs@host86-185-98-28.range86-185.btcentralplus.com)
12:22:15 <ij> I recently learned about it. It took me forever to figure out what the "heap order" for the data meant precisely. More than one tutorial seemed to gloss over it, when I was searching.
12:22:36 × hololeap quits (~hololeap@unaffiliated/hololeap) (Ping timeout: 272 seconds)
12:22:41 Deide joins (~Deide@217.155.19.23)
12:23:17 hololeap joins (~hololeap@unaffiliated/hololeap)
12:23:45 <dcoutts> ij: so you get why the heap order mean the elements are only partially ordered, not totally ordered like in a search tree.
12:25:13 <ij> it seems that they just aren't built with with the preservation of sortedness, but it's easy to find the smallest one :)
12:25:58 <dcoutts> Yes, and it's exactly because they're not totally ordered that they're cheaper to build.
12:26:08 <ij> gotcha
12:26:50 <dcoutts> Since the theory of sorting says any (comparison based) sort is O(n log n) minimum.
12:26:57 × __minoru__shirae quits (~shiraeesh@109.166.57.144) (Ping timeout: 264 seconds)
12:27:21 shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:40b3:9495:b829:f8f6)
12:29:07 atraii joins (~atraii@2601:681:8800:a991:b78:7e8b:3676:bb2c)
12:33:07 <merijn> Franciman: "revisions can break things" <- well, consider this: A maintainer finds out their dependency bounds are wrong and lead to incorrect behaviour with dependency foo-1.0. They make a revision to disallow "foo-1.0". Someone was using this package and need foo-1.0 to get a working build plan. This build plan is now "broken" by the revision
12:33:47 <merijn> Franciman: But can you *really* consider this as "the revision breaking things"? I'd say it's merely "the revision makes previously undetectable breakage, detectable"
12:34:14 × atraii quits (~atraii@2601:681:8800:a991:b78:7e8b:3676:bb2c) (Ping timeout: 264 seconds)
12:34:20 <merijn> People who complain about "revisions breaking things" seem to be blindly assuming "it compiled in the past, therefore it worked"
12:34:25 × jmo` quits (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 240 seconds)
12:34:41 <dcoutts> Exactly. And that's where you get to decide if you agree with the maintainer or want to override their advice.
12:35:42 <pjb> merijn: isn't it the motto of haskel: "if it compiles, then it just works"?
12:35:58 <merijn> It also strikes me there is considerable overlap between the "specifying upperbounds sucks, it's too much work!" and "why is half of hackage broken?!" crowds
12:36:51 <merijn> "Well, well, well...if it isn't the consequences of my own actions!"
12:37:02 <merijn> pjb: Yes, no, maybe, it depends
12:37:27 <merijn> If *my* code compiles it works, if other peoples code compiles, that probably just means they did something dumb >.>
12:38:40 <merijn> dcoutts: tbh, half the "problems" with cabal-install is just "people don't realise how hard long term packaging is, because most other tools just whiff on that goal entirely" >.>
12:38:53 <dcoutts> yup
12:39:10 <dcoutts> people believe it should be an easy problem
12:39:14 <merijn> dcoutts: And one of these days I will finally get around to my sequence of blogposts of "cabal is right and the conveniences you demand are dumb"
12:40:05 <merijn> dcoutts: Well, the problem is that pip/npm/gem are just "incrementally automating actions people do manually" without a consistent design, and if all you've got is a massive pile of hacks, then layering on more convenience hacks is reasonable, so that's what people do
12:40:15 <dcoutts> you can probably put it more diplomatically ;-)
12:40:33 <merijn> And then they try to transpose their "but it's only a little code to handle this specific edge case I want"
12:40:44 <merijn> dcoutts: I could, but then no one would read it, so what'd the point be? :p
12:41:07 <dcoutts> hah hah, ok, clickbait it is
12:42:49 <merijn> No one's going to click "Cabal-install: a thoughtful overview of the difficulties of packaging" :p
12:43:06 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
12:43:07 <dcoutts> clearly that is what I was doing wrong :-)
12:43:47 <merijn> dcoutts: The average Haskeller was considerably difficult when you started on cabal-install :p
12:43:51 <merijn> eh
12:43:54 <merijn> s/difficult/different
12:44:23 <merijn> Like, academics and compiler hackers in a time where npm had implanted terrible ideas in the heads of most beginners :p
12:44:32 <merijn> s/had/hadn't
12:44:38 <dcoutts> true
12:44:40 <merijn> Typing is hard, maybe I should give up on it >.>
12:47:14 <merijn> dcoutts: FWIW, cabal-install has consistently been the most reliable/predictable/consistent language tool I've worked with, which says something about the quality of its design. I think the biggest pain point is communicating the difficulty of the problem and design rationale for the current solution to beginners with essentially no frame of reference for these problems
12:47:39 <dcoutts> aye, and some sharp corners still
12:48:04 <merijn> Their reference is "but I can easily do this in pip" and not the "yeah, but that fundamentally breaks tons of things hiding in dark corner cases"
12:48:26 × idhugo quits (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) (Remote host closed the connection)
12:48:31 idhugo_ joins (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net)
12:48:42 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
12:52:36 Alleria__ joins (~textual@zrcout.mskcc.org)
12:52:39 hiroaki joins (~hiroaki@ip4d166d67.dynamic.kabel-deutschland.de)
12:54:01 <merijn> dcoutts: btw, I know cabal(-install) leadership was put before the Haskell Foundation, but I dunno if that was anywhere public and if/where discussion about it would be, do you happen to know?
12:55:01 <dcoutts> merijn: getting properly involved in that coversation is on my todo list for this weekend :-)
12:55:15 <maerwald> merijn: you have made no argument why revisions are anything more than mere maintenance convenience for hackage trustees and are superior to doing a micro version bump with the fixed .cabal metadata
12:55:53 <__monty__> maerwald: That would require everyone to cooperate and split their constraints to include the broken versions though.
12:55:57 <dcoutts> maerwald: having a separation of role between people looking after individual packages and a whole collection is really useful.
12:56:11 <merijn> maerwald: That would require a full new tarball release and blow up the index too
12:56:14 geekosaur joins (ac3a89e7@172.58.137.231)
12:56:15 <maerwald> yes
12:56:20 <merijn> maerwald: It's not just trustees, though
12:56:28 <__monty__> maerwald: I do think it's reasonable to ask to be able to constrain revisions too though.
12:56:30 <merijn> I bump my own upper bounds in revisions
12:56:58 <maerwald> dcoutts: you can have that separation and still release a new tarball
12:57:01 <dcoutts> This split role model works really well in lots of places: e.g. distros, and individual package maintainers can help too. They can always upload new micro versions if they prefer.
12:57:19 <merijn> maerwald: What, exactly, is the advantage of your suggestion?
12:57:21 <dcoutts> maerwald: non-maintainers should not be releasing tarballs. That's crossing a line.
12:57:35 <merijn> maerwald: The disadvantage is "blows up the index size", I don't see any real advantage?
12:58:02 <maerwald> merijn: a tarball is self consistent
12:58:03 <merijn> If you, as maintainer, prefer micro updates you can still do that just fine?
12:58:24 <maerwald> if you want to pull the latest package from hackage without cabal, you're up for a challenge
12:58:29 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
12:58:46 <merijn> maerwald: It's just two fetch requests, iirc?
12:58:54 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
12:59:02 <merijn> 1 for the tar ball, 1 for the revision
12:59:10 <maerwald> yes
12:59:22 <merijn> That doesn't seem like such a huge amount of work?
12:59:33 <maerwald> merijn: gentoo hasn't managed to do it afais :)
12:59:35 <__monty__> Don't you need the 01-index tarball thing too?
12:59:37 <dcoutts> there's even a library available to do it properly (hackage-security)
12:59:49 <merijn> dcoutts: Can you lemme know when you find out? (wrt cabal discussion) :)
12:59:52 Varis joins (~Tadas@unaffiliated/varis)
12:59:57 <maerwald> merijn: I tried to implement it in exherbo and the patch was rejected
13:00:07 <dcoutts> merijn: sure, are you volunteering? :-)
13:00:42 <merijn> dcoutts: I am not not volunteering :p
13:01:10 <dcoutts> merijn: part of it is just making sure we have enough people who feel empowered to do a release when needed. So it's not necessarily about taking over responsibility for everything.
13:02:06 × grumble quits (~Thunderbi@freenode/staff/grumble) (Quit: ACCORDING TO ALL KNOWN LAWS OF AVIATION THERE IS NO WAY A BEE SHOULD BE ABLE TO FLY ITS WINGS ARE TOO SMALL TO GET ITS FAT LITTLE BODY OFF THE GROUND THE BEE OF COURSE FLIES ANYWAY BECAUSE BEES DON'T CARE WHAT HUMANS THINK IS IMPOSSIBLE)
13:02:39 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
13:02:54 jmo` joins (~user@h-162-127.A785.priv.bahnhof.se)
13:03:09 <merijn> dcoutts: I've tried to at least keep up to date with stuff in the time I've been to busy to actually hack on cabal-install, but I know that at least some of the people with commit bits (me, fgaz, some others) are unsure about how far that authority goes. OTOH, the commit bit ticket says "be bold", so I guess maybe it's just a matter of "Just Do It" ;)
13:03:45 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
13:04:43 <merijn> dcoutts: In the past I'd just run patches by hvr, but he's clearly too busy these days.
13:05:30 <maerwald> dcoutts: hackage trustees already have the power to do releases, when the maintainer isn't responding, btw. We're already crossing that line. And hackage is a shared resource. Maintaining build plans is clearly part of that
13:06:07 <maerwald> merijn: versions (without revisions) is a cleaner API overall
13:06:10 <merijn> __monty__: 01-index is the index of all packages, which includes revisions, but you don't need to fetch that just to get a specific tarball
13:06:17 × frozenErebus quits (~frozenEre@94.128.81.133) (Ping timeout: 272 seconds)
13:06:25 Ariakenom joins (~Ariakenom@2001:9b1:efb:fc00:6820:5e7f:6476:59ce)
13:06:44 <dcoutts> maerwald: really? for specific packages or for all packages? when did that change?
13:07:05 <__monty__> merijn: Don't you need it to figure out the latest revision?
13:08:00 <merijn> __monty__: There's an HTTP endpoint for that, I think?
13:08:09 <maerwald> dcoutts: https://github.com/haskell-infra/hackage-trustees/blob/master/policy.md#3-source-changes-simple-patches
13:08:25 <merijn> dcoutts: As intermediate step instead of package take over
13:08:39 <__monty__> maerwald: You didn't address the usability issue though. Do you really expect everyone to poke holes in their version constraints for every revision-equivalent version bump?
13:08:58 dhil joins (~dhil@80.208.56.181)
13:09:02 <maerwald> __monty__: revisions are a usability issue.. every tool dealing with hackage tarballs needs to be aware of them
13:09:22 <merijn> __monty__: Well, presumably those micro bumps are PVP compliant
13:09:26 <dcoutts> maerwald: oh that, ok that's a bit different, and not so controversial
13:09:33 grumble joins (~Thunderbi@freenode/staff/grumble)
13:09:41 <__monty__> merijn: Probably, since you can get it via hackage. Maybe it the problem was you can't get anything but no revision or latest revision without 01-index? I remember some discussion about this.
13:10:02 × grumble quits (~Thunderbi@freenode/staff/grumble) (Client Quit)
13:10:21 × geekosaur quits (ac3a89e7@172.58.137.231) (Quit: Connection closed)
13:10:29 <merijn> __monty__: That's not true
13:10:29 <maerwald> __monty__: the fact that you have to pin hackage index state for a freeze file to be reliable is another good case showing that although it seems simple, it even breaks the assumptions of the cabal maintainers
13:10:33 <__monty__> merijn: Still requires people to make sure the pre-revision version does not pass their constraints.
13:10:35 grumble joins (~Thunderbi@freenode/staff/grumble)
13:10:45 <merijn> __monty__: Why?
13:11:08 <maerwald> (and: index state pinning has more side-effects)
13:11:16 <maerwald> (you might not actually want that)
13:11:30 <maerwald> so stuff now is more complicated, not less
13:12:20 <dcoutts> a freeze file should probably just pin the index state too
13:12:20 <__monty__> merijn: constraint ^>= 1.0, if this is revised you'll automatically get the fixed 1.0 instead, if a new version is released you have to change your constraint so 1.0 isn't allowed anymore, because another dependency could have naively added constraint == 1.0.
13:12:45 <maerwald> dcoutts: well, you might want to pin a subset of hackage and have the rest rolling and up2date... but now you can't
13:12:48 <merijn> __monty__: huh?
13:13:03 <maerwald> unless you accept the fact that the next revision update may break your build plan
13:13:32 <dcoutts> maerwald: well if you're managing your freeze file manutally you can do what you like. Your complaint seemed to be about what's a sensible default for most users.
13:13:36 <__monty__> maerwald: I said I agree there should be something like constraints on revisions.
13:13:47 <merijn> __monty__: Like?
13:14:09 <__monty__> merijn: "Don't use revision 3 cause it's broken."
13:14:20 <maerwald> dcoutts: well, I can't pin revisions, as was discussed before. This simple addition to hackage had far more implications than cabal devs anticipated
13:14:21 <merijn> __monty__: I think you misunderstand maerwald's comment
13:14:43 heatsink joins (~heatsink@2600:1700:bef1:5e10:f066:c875:bf57:1bea)
13:14:57 <__monty__> I'm open to being made to understand.
13:14:59 <merijn> __monty__: "You need to change ^>= 1.0 if it's fixed with a new release" <- that's not what maerwald was talking about
13:15:31 <merijn> __monty__: His point was, rather than revising package 1.0.0 with a new upper bound on dependency foo, you can release version 1.0.0.1 with the new "foo" upperbound
13:15:35 <__monty__> No, that's an example of a usability issue I see with "Just use versions instead of revisions."
13:15:51 <dcoutts> maerwald: the thing I'd like to do in the long term is unify the idea of the hackage revisions and the stackage snapshots into a single package sets idea, an allow anyone to publish them on hackage, and to select them (or combinations of them) in project files.
13:16:18 <maerwald> dcoutts: What do you think about this: a metadata update is carried out the same way as now by hackage trustees... but instead of creating a revision update, it will 1) create a new release with micro version bumped, 2) send an email to a dedicated ML + the maintaner and 3) mark this version in hackage in some way, indicating that it's a metadata update only release
13:16:24 <merijn> __monty__: If another package uses ^>=1.0.0 it still works, because 1.0.0 wasn't broken, it just had a restricted build plan and 1.0.0.1 is the same code with a relaxed buildplan
13:16:54 <dcoutts> maerwald: I don't see how that's any better (and it's worse in several ways).
13:17:03 <__monty__> merijn: Yeah, that's the problem, that leaves 1.0.0 potentially broken because somewhere in your build plan something constrains the package to not allow 1.0.0.1 or to require a version of foo past that upper bound, which rules out 1.0.0.1.
13:17:07 <merijn> dcoutts: That was maerwald's suggested issue on cabal github, but that'd harm the critical path for plan.json, though
13:17:19 <merijn> __monty__: Why does it leave 1.0.0 broken?
13:17:43 <merijn> __monty__: The assumption is that you released 1.0.0 with accurate (i.e. conservative) upperbounds
13:17:50 <merijn> If you didn't, then yeah, you're fucked
13:18:31 <merijn> maerwald: The main reason revisions are necessary over microbumps is the insistence of a certain subsection of Hackage to on principle just refuse to add upperbounds to their releases
13:18:47 <merijn> maerwald: Your approach *only* works if people upload package with proper upperbounds
13:19:00 <__monty__> merijn: That sounds like an "It works if you do it right," argument. Which applies equally to revisions.
13:19:18 <merijn> __monty__: Revisions work if you don't do it right either, which is why we have them
13:19:32 <merijn> because a vocal minority of the community refuses to do it right :p
13:19:35 × jmo` quits (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 272 seconds)
13:19:40 <__monty__> No, the "you" here is the person authoring the revision.
13:19:48 <merijn> __monty__: That's irrelevant
13:19:50 × heatsink quits (~heatsink@2600:1700:bef1:5e10:f066:c875:bf57:1bea) (Ping timeout: 264 seconds)
13:20:02 <merijn> __monty__: Because if you fuck it up by accident, you can revise your revision :p
13:20:06 <maerwald> merijn: given the ^>= syntax (although I think cabal has no switch to ignore those upper bounds yet), I think it's less controversial
13:20:13 <merijn> maerwald: It does
13:20:17 <maerwald> which one is it
13:20:29 <__monty__> No it's not. I'm not talking about package uploaders doing it right. I'm talking about the hackage trustee(?) doing it right. They're only human they can accidentally push a bad revision.
13:20:39 <merijn> --allow-newer has a ^ syntax that lets you select it, but documentation is...lacking :)
13:20:51 deja joins (~deja@213162080090.public.t-mobile.at)
13:20:56 <merijn> __monty__: Which can be fixed with a new one
13:21:10 <maerwald> well, I want a switch saying "ignore all upper bounds, except those that are in place due to *known* build failures"
13:21:16 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 240 seconds)
13:21:34 <__monty__> merijn: The revise a revision part is exactly why constraints on revisions is sensible. You can simply specify "revision 3 is broken, never use it, even if it's the most recent revision you have access to because of index-state."
13:21:39 <merijn> maerwald: So, kinda the inverted selection of what's possible now
13:21:49 × deja quits (~deja@213162080090.public.t-mobile.at) (Client Quit)
13:22:19 <maerwald> dcoutts: what we may really want is the stable/unstable separation like in Gentoo ;)
13:22:40 <merijn> maerwald: https://cabal.readthedocs.io/en/latest/cabal-project.html?highlight=allow-newer#cfg-field-allow-newer
13:23:08 <merijn> maerwald: Note the description of ^ to relax only ^>= bounds and in certain scopes
13:23:43 jmo` joins (~user@h-162-127.A785.priv.bahnhof.se)
13:24:43 <merijn> maerwald: I think a negation operator for allow-newer so that "~foo" would allow newer for everything *except* "foo" would be a good idea. I think you can already get those semantics right now, by enumerating all the non-foo ones, but having an explicit operator to act as "inversion" makes sense
13:24:48 <nshepperd> it was a revelation when i discovered that you can do per-dependency allow-newer in cabal.project
13:25:01 × Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 265 seconds)
13:25:06 <nshepperd> no more forking things locally just to bump bounds
13:25:07 <merijn> nshepperd: That works on the commandline too :p
13:25:13 <merijn> But, yeah
13:26:33 <nshepperd> it would be good if you could do "allow-newer: package:dep < x.y.z" or something too
13:26:51 <merijn> maerwald: If you care enough to implement it, I would merge an inversion operator for allow-newer. You'd have to consult the specs to find if ~ or ! is disallowed in package names (and thus safe to use)
13:27:02 <merijn> nshepperd: You can add custom constraints to the build plan
13:27:28 hseg joins (~gesh@IGLD-84-228-239-97.inter.net.il)
13:27:28 <merijn> nshepperd: So you can just use --constraint (or 'constraint:' in cabal.project) to give an arbitrary constraint like that
13:27:30 <maerwald> dcoutts: so there could be three levels: 1. testing (this is the only layer package authors have direct upload access to), 2. unstable (only boot/core are guaranteed to build, upper bounds are loose), 3. a large subset of hackage is guaranteed to work with tight upper bounds
13:27:32 <nshepperd> i suppose so
13:27:51 × kenran quits (~kenran@i59F67B96.versanet.de) (Quit: leaving)
13:27:58 <nshepperd> yeah i guess the intersection of allow-newer and a separate constraint is enough
13:28:19 <maerwald> dcoutts: and all layers could still be rolling
13:29:03 deja joins (~deja@213162080090.public.t-mobile.at)
13:29:55 <Franciman> <merijn> People who complain about "revisions breaking things" seem to be blindly assuming "it compiled in the past, therefore it worked" <- gotcha merijn
13:29:56 <Franciman> thanks
13:30:16 × dhil quits (~dhil@80.208.56.181) (Ping timeout: 240 seconds)
13:30:22 <maerwald> I don't think I have to argue why rolling is generally superior... freeze files, LTS, nix are all nice, but are really less interesting if there is hight build success chance in your rolling stable branch
13:30:26 × them_ quits (~them_@217.146.82.202) (Remote host closed the connection)
13:32:05 × son0p quits (~son0p@181.58.39.182) (Quit: Lost terminal)
13:32:07 Wuzzy joins (~Wuzzy@p57a2e574.dip0.t-ipconnect.de)
13:33:06 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
13:33:09 <maerwald> Franciman: tighter upper bounds are sometimes introduces due to build failures in *specific* architectures... but we lack a way to express different build plans for different arches
13:33:25 <maerwald> so revisions sometimes break valid build plans due to that
13:33:59 frozenErebus joins (~frozenEre@94.128.81.133)
13:34:23 <merijn> maerwald: That could be addressed by an arch() flag in cabal (Don't we have one already) and making the restriction architecture specific
13:34:46 <merijn> Although I think revisions currently don't allow you to introduce if/else constructs in a revision
13:34:46 <__monty__> Metadata on constraints does sound reasonable to me. "This bound is because PVP, this bound is because it's broken on ARM, this bound is because of a bug..."
13:35:15 <merijn> __monty__: PVP vs bug is the intended difference between ^>= and <
13:35:33 <merijn> ^>= singals "PVP bound" and < signals hard bound
13:36:06 rdivyanshu joins (uid322626@gateway/web/irccloud.com/x-pkahdvkefnsdjqce)
13:37:08 × jmo` quits (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 256 seconds)
13:37:27 <maerwald> merijn: not arches, old GHCs... my mistake
13:37:38 <__monty__> I guess that's true. Limited and new enough that some people don't use for "compatibility" reasons though : /
13:37:43 <maerwald> merijn: https://github.com/ekmett/contravariant/issues/61#issuecomment-498606805
13:37:46 <Franciman> wait, we also have constraints on ghc versions
13:37:48 <Franciman> ah no!
13:37:51 <Franciman> it's compiler version
13:37:55 <Franciman> err
13:37:59 <Franciman> I mean compiler flavour
13:38:05 <Franciman> GHC , JHC and others
13:39:22 × Marissa quits (Marissa@33.anserq.com) (Quit: Marissa)
13:39:43 <__monty__> The indirect constraint on GHC version through base is kind of opaque, yeah.
13:39:48 <merijn> __monty__: It's slowly becoming old enough to start making head way
13:39:53 ambiso9 joins (~ambiso@209.182.239.205)
13:40:07 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
13:40:25 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
13:40:29 <__monty__> merijn: In a couple years I'll claim I pioneered it by using it extensively in my unreleased projects ; )
13:40:33 <Franciman> I don't know if this was already said, but I really hope the haskell foundation regularizes cabal development a bit
13:41:08 <maerwald> I think it *does* make sense to reduce valid build plans sometimes, as long as there's still a valid build plan
13:41:09 <merijn> __monty__: ^>= syntax requires cabal-version 2.0 which is approaching 4 years old
13:41:20 <Franciman> that was a cool hat trick
13:41:28 <Franciman> it scammed really hard with the stack fellas
13:41:37 <Franciman> I really hope the two tools join forces in a constructive way
13:41:43 <maerwald> Franciman: no
13:41:47 <merijn> Franciman: Unlikely
13:41:58 <maerwald> different philosophies are better off separate
13:41:59 <Franciman> that's what I wanted to do with vabal, but I failed :P
13:42:05 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
13:42:06 <Franciman> I like the idea of stackage
13:42:18 <Franciman> I strongly dislike forking the community creating two different tools with different user interfaces
13:42:21 <maerwald> yes, stackage as a concept is possible in cabal
13:42:22 <merijn> __monty__: I mean, there's not much reason to support old cabal versions
13:42:24 <__monty__> Stackage is great but you don't need stack for that?
13:42:34 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
13:42:54 <merijn> __monty__: cabal 3.4 is backwards compatible with all cabal files/versions and supports every GHC since 7.0
13:42:59 <__monty__> merijn: I agree. I only support current and up whenever I start something.
13:43:24 <maerwald> I don't believe in the concept of stackage, as I believe in rolling, but it's perfectly possible and doesn't conflict with cabal philosophy either imo
13:43:25 <merijn> __monty__: Well, it can make sense to support a slightly lower cabal-version for slow moving distros
13:43:46 <merijn> __monty__: But 2.0 is 4 years old, that's more than enough for distro to move to a cabal version that's at least 2.0
13:44:09 <merijn> __monty__: Personally I default to 2.0/2.2 unless I specifically need some newer feature
13:44:18 <maerwald> Franciman: what conflicts with cabal philosophy is mainly the cli interface and non-separation of concerns of stack
13:44:24 <__monty__> I'm also on the flip side of that coin though. I'm still using a 32 bit machine and the "Nobody needs stuff *this* old, right?" reasoning is really inconvenient.
13:44:42 × hololeap quits (~hololeap@unaffiliated/hololeap) (Ping timeout: 246 seconds)
13:44:45 <Franciman> maerwald, FREAKING +1
13:44:50 <Franciman> in fact I vehemently hate stack
13:44:56 <Franciman> it hurts my health, so I stop
13:45:12 <maerwald> I like stack for its file format
13:45:23 <merijn> __monty__: It's not "nobody needs this" it's "why should the community bend over backwards to support niche usecases"
13:45:32 <Franciman> maerwald, you mean hpack's file format?
13:45:39 <maerwald> Franciman: no, I hate hpack :p
13:45:40 <merijn> __monty__: Like, no offense, but it's 2021, why do you even *have* a 32 bit machine? :p
13:45:46 <maerwald> Franciman: I mean stack.yaml etc
13:45:46 <Franciman> lol
13:45:49 <Franciman> ah ok
13:45:56 <merijn> Franciman: both hpack and stack use yaml and both are terrible
13:46:00 <maerwald> although pantry made it worse
13:46:11 <merijn> Like, I'm willing to "live and let live" when it comes to stack
13:46:11 <__monty__> merijn: Because I can't stand consumerism. I know this is self-inflicted suffering.
13:46:13 <maerwald> It's a feature creep and most ppl don't even know how deep it goes
13:46:15 <merijn> But hpack should go away
13:46:32 <maerwald> there's a bazillion ways to write your stack.yaml
13:46:36 <merijn> __monty__: I mean, is it really consumerism? I think my first 64bit machine was in, like, 2006?
13:46:41 Sheilong joins (uid293653@gateway/web/irccloud.com/x-ltinxgozprmzwqca)
13:47:09 <Franciman> maerwald, honestly I think part of the issue with stack is how cabal is complicated
13:47:09 <maerwald> but it's yaml and you don't need to rely on esoteric package-specific parsers
13:47:14 <Franciman> I'm not saying that it could be simpler
13:47:21 <merijn> __monty__: If you machine is less than a decade old it should be 64 bit, and if it's more than a decade old then I don't think it's consumerism to say "we don't support something that old"
13:47:25 <Franciman> but it is complicated
13:47:27 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
13:47:30 <Franciman> so ppl try their way
13:47:42 <maerwald> Franciman: cabals cli interface is quite messy
13:47:46 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
13:47:53 <Franciman> but I dislike that a private company pursues its agenda at the level of splitting the community and starting flames
13:48:08 <Franciman> because they invest in stack, and then they don't want to lose their investment
13:48:35 <maerwald> Franciman: I think it's a fair game, though. Because stack *does* provide an alternative philosophy
13:48:42 <maerwald> it's more than just a cabal fork
13:48:43 <Franciman> this is true
13:48:57 <Franciman> but why not try to mix with cabal? instead of fighting and flaming ?
13:49:06 <Franciman> it could have been done in a different way
13:49:10 <__monty__> merijn: Maybe this is better suited to offtopic? Anything that still works fine and is dropped because it's "too old" is consumerism to me. Note that me not throwing it out is because of consumerism, a community deciding to stop building 32 bit binaries is totally reasonable, maybe even better for resource consumption. I only said it was *inconvenient*.
13:49:15 <maerwald> Franciman: arguing about philosophy is what caused the flame war I believe
13:49:20 <Franciman> oh I see
13:49:33 <Franciman> well java has like 2000 build systems
13:49:42 <Franciman> we should learn from java then :)
13:49:46 <maerwald> like, Poettering doesn't believe in unix and the "everything is a file" principle
13:49:52 <maerwald> have fun convincing him
13:50:07 <Franciman> probably we had a small community and creating a fork would like splitting anything in half
13:50:10 <maerwald> or you just don't and ignore him
13:50:31 <Franciman> that is what philip glass says about serialist american composers
13:50:42 <Franciman> you don't argue with them, you just outlive them
13:50:43 <Franciman> :)
13:50:58 × _noblegas quits (uid91066@gateway/web/irccloud.com/x-twmjqwcrorjsfymz) (Quit: Connection closed for inactivity)
13:51:04 <__monty__> Franciman: FPComplete's reasoning was they moved too fast for Cabal maintainers to keep up so they just did their own thing.
13:51:05 <maerwald> no no... you support them
13:51:35 <Franciman> __monty__, I still do not understand the super different UX
13:51:40 <maerwald> that's why I strive (for my projects), to support whatever tool ppl want... stack, cabal, nix (if someone writes a patch)
13:51:41 <Franciman> they thought they created something more polished?
13:51:44 <Franciman> spolier they did not
13:51:47 <Franciman> it sucks equally
13:51:52 <Franciman> plus it is different
13:52:16 <ij> everything is a file is nice, if the files lived in a vfs (but what do I know)
13:52:33 <Franciman> lately I have been blasted by snoyman saying that github was better because it was an UX everybody knows
13:52:36 <Franciman> so it is better than gitlab
13:52:43 <Franciman> and then I have to cringe any time I have to use stack
13:52:48 <Franciman> because I am too used to cabal?
13:53:27 <maerwald> I think tools are an emotional thing for developers too
13:53:42 <maerwald> only half of the dicussions are really about tech issues :p
13:53:46 <__monty__> Yeah, UX is too subjective.
13:53:48 × hseg quits (~gesh@IGLD-84-228-239-97.inter.net.il) (Ping timeout: 246 seconds)
13:53:50 <Franciman> but really
13:53:54 <Franciman> it is a double standard at play here
13:53:59 <Franciman> but it is personal ok
13:54:00 <Franciman> yes
13:54:02 <Franciman> subjective
13:54:24 <__monty__> They probably started out thinking "Now *this* is simple/intuitive UX." Then they bolted things on and now we're here.
13:54:30 <maerwald> and I'm not trying to say emotional is non-sense... no, it's pretty important for productivity too
13:54:45 × deja quits (~deja@213162080090.public.t-mobile.at) (Quit: requested)
13:55:04 sz0 joins (uid110435@gateway/web/irccloud.com/x-jawittjnojcejvfc)
13:55:11 <Franciman> I also got to say that I am not a serious programmer, and I have difficulties understanding production problems
13:55:20 <Franciman> and in fact I prefer pipes over conduit
13:55:26 <Franciman> i think conduit is awful
13:55:31 <__monty__> Btw, Franciman, your nick is too similar to frangipane, please tone down being delicious.
13:55:32 <Franciman> pipes instead is pretty nice
13:55:42 deja joins (~deja@213162080090.public.t-mobile.at)
13:55:52 <Franciman> __monty__, what? Llol
13:55:53 <maerwald> I'll refrain from conduit bashing today
13:55:57 maerwald smirks at merijn
13:56:21 hololeap joins (~hololeap@unaffiliated/hololeap)
13:59:02 <maerwald> Franciman: production problems are about how to not fail while your system has to swallow more crap input. Avoiding failure is an interesting approach that works pretty well for very successful companies, despit having absolute crap software
14:00:08 knupfer joins (~Thunderbi@mue-88-130-61-128.dsl.tropolys.de)
14:00:34 chris8142 joins (~chris8142@srvnet-01-071.ikbnet.co.at)
14:00:45 <maerwald> I guess haskellers roam in the subset of the industry, where either the founders are visionaries or the company just has insane funding, so that they can hire actual engineers
14:01:24 <Franciman> true, maerwald
14:04:27 tlyu joins (~tlyu@195.140.213.38)
14:05:20 × coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
14:08:38 dhil joins (~dhil@80.208.56.181)
14:10:48 × deja quits (~deja@213162080090.public.t-mobile.at) (Quit: requested)
14:11:51 deja joins (~deja@213162080090.public.t-mobile.at)
14:13:28 × theDon quits (~td@94.134.91.232) (Quit: waking up from the american dream ...)
14:14:34 <hc_> interesting hypothesis
14:15:47 heatsink joins (~heatsink@2600:1700:bef1:5e10:b101:b0cf:b14d:ce6b)
14:18:11 × alx741 quits (~alx741@186.178.108.225) (Quit: alx741)
14:19:06 <[exa]> (invalid though)
14:19:12 × bnbgg_ quits (uid454564@gateway/web/irccloud.com/x-dlouokgmjjwefkhf) (Quit: Connection closed for inactivity)
14:19:22 <merijn> Not that invalid, I think
14:20:26 × heatsink quits (~heatsink@2600:1700:bef1:5e10:b101:b0cf:b14d:ce6b) (Ping timeout: 264 seconds)
14:20:54 <[exa]> not sure if "hired for a research job" counts as industry but we did that a few times
14:21:11 <[exa]> hiring a haskeller saves a lot of time and money on both sides
14:22:21 <merijn> [exa]: Is your company representative of most companies which employ haskell programmers to write Haskell, though?
14:22:52 <merijn> Most of them seem to be big multinationals with big budgets. Target, Facebook, several banks...
14:23:21 <pineapples[m]> Facebook hires Haskell programmers?
14:23:34 <__monty__> pineapples[m]: For their spam stuff Sigma or something?
14:23:52 × jamm__ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
14:24:07 <Franciman> I think Simon Marlowe still works there?
14:24:09 <Franciman> Marlow*
14:24:36 jamm_ joins (~jamm@unaffiliated/jamm)
14:24:47 <pineapples[m]> Wow, I didn't know this, thanks!
14:26:25 <[exa]> merijn: well no, but I guess similar institutions make a lot of demand for the programmers
14:26:43 <[exa]> -> #offtopic
14:26:50 pavonia joins (~user@unaffiliated/siracusa)
14:27:07 new_haskeller joins (ae72a197@cpe00fc8d386d93-cm00fc8d386d90.cpe.net.cable.rogers.com)
14:27:24 <merijn> pineapples[m]: There's a number of prominent Haskellers working their and part of their anti-spam infra is written in/uses Haskell
14:29:22 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
14:30:20 jamm_ joins (~jamm@unaffiliated/jamm)
14:30:48 <new_haskeller> I am curious why the following are not equivalentPrelude> [ x * 3 | x <- [1..100], x<10]
14:30:48 <new_haskeller> [3,6,9,12,15,18,21,24,27]
14:30:49 <new_haskeller> Prelude> [ x * 3 | x <- [1..], x<10]
14:30:49 <new_haskeller> [3,6,9,12,15,18,21,24,27
14:31:29 <Franciman> new_haskeller, because haskell tries to go trhough the whole list
14:31:35 <Franciman> it does not have any idea that after 10
14:31:36 <xerox_> the second one is still checking the various x > 10, forever
14:31:40 <Franciman> the other numbers will fail
14:31:46 <ski> > filter (< 10) [1 ... 100]
14:31:47 <lambdabot> error:
14:31:48 <lambdabot> • Could not deduce (Plated c0)
14:31:48 <lambdabot> from the context: (Ord (Over p f s t a b), Applicative f, Plated c,
14:31:52 <ski> > filter (< 10) [1 .. 100]
14:31:54 <ski> > filter (< 10) [1 ..]
14:31:54 <lambdabot> [1,2,3,4,5,6,7,8,9]
14:32:00 <lambdabot> mueval-core: Time limit exceeded
14:32:17 <pineapples[m]> takeWhile might be better in this use case than filter
14:32:22 <pineapples[m]> If you want to use infinite lists
14:32:26 <ski> (`filter p xs' does the same as `[x | x <- xs,p x]')
14:33:07 Marissa joins (Marissa@33.anserq.com)
14:33:15 <ski> it can't know that there won't be any element less than ten, later. if you want to take advantage of the list being sorted, use `takeWhile'
14:33:25 <ski> > takeWhile (< 10) [1 .. 100]
14:33:27 <lambdabot> [1,2,3,4,5,6,7,8,9]
14:33:28 <ski> > takeWhile (< 10) [1 ..]
14:33:29 <lambdabot> [1,2,3,4,5,6,7,8,9]
14:33:35 <new_haskeller> makes sense now. Thanks!
14:33:49 <ski> > [x * 3 | x <- takeWhile (< 10) [1 ..]]
14:33:51 <lambdabot> [3,6,9,12,15,18,21,24,27]
14:34:25 <new_haskeller> I thought Haskell would terminate when x >10
14:34:54 <Franciman> new_haskeller, the problem is that haskell does not know anything about the predicate
14:34:55 <pineapples[m]> It does terminate
14:35:02 <Franciman> for haskell it is a generic predicate
14:35:07 <Franciman> so it must test it all the time
14:35:10 <new_haskeller> I get it.
14:35:12 <pineapples[m]> All x are in the range [1..9]
14:35:17 <int-e> 10 < 10 is already false
14:35:18 <pineapples[m]> But the output function multiplies that by 3
14:35:29 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
14:35:30 × Marissa quits (Marissa@33.anserq.com) (Client Quit)
14:35:41 Marissa joins (Marissa@33.anserq.com)
14:39:10 <ski> % :set -XTransformListComp
14:39:10 <yahb> ski:
14:39:13 <ski> % [x | x <- [0 ..],then takeWhile by x < 10]
14:39:13 <yahb> ski: [0,1,2,3,4,5,6,7,8,9]
14:39:38 <ski> % [x * 3 | x <- [0 ..],then takeWhile by x < 10]
14:39:38 <yahb> ski: [0,3,6,9,12,15,18,21,24,27]
14:40:02 × frozenErebus quits (~frozenEre@94.128.81.133) (Ping timeout: 256 seconds)
14:40:45 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 240 seconds)
14:41:17 × drozdziak1 quits (~drozdziak@vps-520f86fd.vps.ovh.net) (Quit: ZNC 1.8.1 - https://znc.in)
14:41:59 bnbgg_ joins (uid454564@gateway/web/irccloud.com/x-rbckpsfnteepsstm)
14:44:26 frozenErebus joins (~frozenEre@94.128.81.133)
14:44:46 son0p joins (~son0p@181.136.122.143)
14:47:12 viluon joins (uid453725@gateway/web/irccloud.com/x-phgigjwjsbgranpk)
14:47:27 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
14:47:46 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
14:47:56 ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net)
14:49:31 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
14:50:34 stef204 joins (~stef204@unaffiliated/stef-204/x-384198)
14:55:47 × chris8142 quits (~chris8142@srvnet-01-071.ikbnet.co.at) (Quit: WeeChat 3.0.1)
14:59:14 neiluj joins (~jco@91-167-203-101.subs.proxad.net)
14:59:23 a-tsioh[m] joins (a-tsiohmat@gateway/shell/matrix.org/x-lhnuiggshvkhptok)
15:02:02 frozenErebus is now known as Alan_Turing
15:07:15 × idhugo_ quits (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) (Ping timeout: 272 seconds)
15:07:27 × hexo quits (~hexo@gateway/tor-sasl/hexo) (Ping timeout: 268 seconds)
15:07:27 × xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 268 seconds)
15:08:33 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
15:08:41 × srk quits (~sorki@gateway/tor-sasl/sorki) (Ping timeout: 268 seconds)
15:08:48 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
15:08:51 Tario joins (~Tario@201.192.165.173)
15:09:02 xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar)
15:09:32 srk joins (~sorki@gateway/tor-sasl/sorki)
15:09:37 hexo joins (~hexo@gateway/tor-sasl/hexo)
15:12:17 geekosaur joins (ae68c070@cpe-174-104-192-112.neo.res.rr.com)
15:15:17 × Franciman quits (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving)
15:15:42 × hololeap quits (~hololeap@unaffiliated/hololeap) (Ping timeout: 246 seconds)
15:16:30 heatsink joins (~heatsink@2600:1700:bef1:5e10:b101:b0cf:b14d:ce6b)
15:16:41 <xsperry> then takes a function that takes a predicate, and a predicate?
15:16:43 hololeap joins (~hololeap@unaffiliated/hololeap)
15:17:48 × jonathanx quits (~jonathan@h-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
15:21:36 ClaudiusMaximus joins (~claude@191.123.199.146.dyn.plus.net)
15:21:36 jmo` joins (~user@h-162-127.A785.priv.bahnhof.se)
15:21:36 × ClaudiusMaximus quits (~claude@191.123.199.146.dyn.plus.net) (Changing host)
15:21:36 ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus)
15:21:38 × heatsink quits (~heatsink@2600:1700:bef1:5e10:b101:b0cf:b14d:ce6b) (Ping timeout: 264 seconds)
15:21:56 urodna joins (~urodna@unaffiliated/urodna)
15:22:46 catalin joins (~catalin@82.77.237.51)
15:23:13 × catalin quits (~catalin@82.77.237.51) (Client Quit)
15:23:19 × jmsx quits (~jordan@li1158-85.members.linode.com) (Quit: bye o/)
15:28:31 <edwardk> what version of ghc did explicit bidirectional pattern synonyms become usable with the current signature format, again?
15:28:54 <edwardk> basically trying to figure out how recently i'd have to cut off to adopt them
15:29:36 × RusAlex quits (~Chel@unaffiliated/rusalex) (Quit: WeeChat 2.7.1)
15:30:36 <merijn> edwardk: GHC user guide claims pattern synonyms are in since 7.8, but I think bidirectionaly patterns weren't completely working until 8.0?
15:31:20 <edwardk> that sounds about right, given we're moving into 9 i'm thinking about doing a mass drop of things below 8 across my whole ecosystem and seeing what cleanups i could get
15:31:22 <geekosaur> my track record with these kind of questions is poor but I want to say there were lingering issues until 8.2
15:31:50 <geekosaur> but that may have been interactions with checking exhaustiveness
15:33:10 <edwardk> i remember the type signature flipping around
15:33:18 <edwardk> not sure what version that was in
15:34:45 × ephemera_ quits (~E@122.34.1.187) (Ping timeout: 264 seconds)
15:35:26 <edwardk> 8 seems to be where signatures came along in modern style, and allowed bundling synonyms
15:37:39 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
15:38:37 × rdivyanshu quits (uid322626@gateway/web/irccloud.com/x-pkahdvkefnsdjqce) (Quit: Connection closed for inactivity)
15:40:39 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
15:40:54 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
15:41:15 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
15:41:44 ephemera_ joins (~E@122.34.1.187)
15:41:59 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
15:42:15 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
15:44:44 kenran joins (~kenran@i59F67B96.versanet.de)
15:44:50 sagax joins (~sagax_nb@213.138.71.146)
15:45:53 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
15:46:09 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
15:47:25 × Alan_Turing quits (~frozenEre@94.128.81.133) (Ping timeout: 256 seconds)
15:47:27 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
15:47:35 <pineapples[m]> When did the typeclass `Num` stop having `class (Eq a) => Num a` as a class constraint? Going through LYAH right now, but it seems that Eq must have been a constraint on Num when the book was written
15:47:46 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
15:48:59 <dolio> A long time ago.
15:49:25 <geekosaur> sometime early in the ghc8 series
15:49:46 <geekosaur> I think the standard still specifies Num and Show constraints
15:50:34 karasu1[m] joins (karasu1mat@gateway/shell/matrix.org/x-dxpaeclqknizkxjp)
15:50:36 <edwardk> pineapples[m]: it was back in the 7.4 era i think when igloo started breaking compatibility with haskell 98
15:50:46 <edwardk> geekosaur: its way older than that
15:50:54 <merijn> geekosaur: Naah, way older
15:51:01 <merijn> geekosaur: Like, early 7.x
15:51:03 <edwardk> its literally the first breaking change to the standard we consciously made
15:51:21 <edwardk> and only one to the Prelude for a looong time
15:51:38 <dolio> Yeah, it's already gone in 7.4.
15:51:39 <merijn> pineapples[m]: The Haskell Report requires Show and Eq as superclass of Num, but it's a documented deviation in GHC
15:51:45 <merijn> Actually
15:51:52 <merijn> Possibly in 6.x already
15:52:10 <merijn> It was already gone when I started learning Haskell and that'd be late 6.x, early 7.x
15:52:39 <dolio> No, edwardk actually nailed it somehow.
15:52:52 <dolio> 7.2.1 still has Eq and Show.
15:52:53 <merijn> pineapples[m]: See also: https://downloads.haskell.org/ghc/latest/docs/html/users_guide/bugs.html
15:52:55 <edwardk> 7.4 was peak igloo
15:53:03 <edwardk> thats how i remembered =)
15:53:20 × caef^ quits (caef@ip98-184-89-2.mc.at.cox.net) ()
15:53:21 ph88 joins (~ph88@2a02:8109:9e00:7e5c:a5e6:eed6:171f:46a3)
15:54:32 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
15:56:49 RusAlex joins (~Chel@unaffiliated/rusalex)
15:57:00 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
15:58:09 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
15:58:24 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
15:58:45 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
16:00:03 fendor_ is now known as fendor
16:00:05 × Hatsue[m] quits (berbermanm@gateway/shell/matrix.org/x-ofhjghikpvbiahie) (Quit: Idle for 30+ days)
16:05:33 × new_haskeller quits (ae72a197@cpe00fc8d386d93-cm00fc8d386d90.cpe.net.cable.rogers.com) (Quit: Ping timeout (120 seconds))
16:06:15 theDon joins (~td@94.134.91.34)
16:08:15 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
16:09:15 Tario joins (~Tario@201.192.165.173)
16:09:39 nrh^ joins (nrh@ip98-184-89-2.mc.at.cox.net)
16:11:38 __minoru__shirae joins (~shiraeesh@109.166.57.144)
16:11:44 × jmo` quits (~user@h-162-127.A785.priv.bahnhof.se) (Remote host closed the connection)
16:11:58 jmo` joins (~user@h-162-127.A785.priv.bahnhof.se)
16:12:12 Franciman joins (~francesco@host-82-49-79-189.retail.telecomitalia.it)
16:14:01 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
16:15:31 kroww joins (~kroww@196.240.57.156)
16:16:36 jamm_ joins (~jamm@unaffiliated/jamm)
16:16:40 × MidAutumnHotaru quits (~MidAutumn@unaffiliated/midautumnhotaru) (Quit: Quit 啾)
16:16:58 MidAutumnHotaru joins (~MidAutumn@unaffiliated/midautumnhotaru)
16:20:00 Rudd0 joins (~Rudd0@185.189.115.108)
16:20:51 × MidAutumnHotaru quits (~MidAutumn@unaffiliated/midautumnhotaru) (Client Quit)
16:21:31 MidAutumnHotaru joins (~MidAutumn@unaffiliated/midautumnhotaru)
16:22:56 × greymalkin quits (~greymalki@199.180.249.79) (Ping timeout: 240 seconds)
16:23:35 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
16:25:46 × kroww quits (~kroww@196.240.57.156) (Quit: Leaving)
16:25:51 × _ashbreeze_ quits (~mark@64.85.214.234.reverse.socket.net) (Remote host closed the connection)
16:26:31 <karasu1[m]> What is the difference between `fromInteger` and `fromIntegral`, and when would you use one or the other? It seems that in the class declaration of Num, only `fromInteger` is defined, but `fromIntegral` is one of the "Numeric Functions" in Prelude (I am new to Haskell so I don't know what the "Numeric Functions" are supposed to mean, but that's what Hoogle is saying). Is this oddity for historical reasons?
16:26:56 <merijn> :t fromIntegral
16:26:57 <lambdabot> (Integral a, Num b) => a -> b
16:27:00 <merijn> :t fromInteger
16:27:01 <lambdabot> Num a => Integer -> a
16:27:12 × son0p quits (~son0p@181.136.122.143) (Quit: Lost terminal)
16:27:18 _ashbreeze_ joins (~mark@64.85.214.234.reverse.socket.net)
16:27:39 <merijn> karasu1[m]: fromInteger is part of the Num class and specifies how (integer) literals in the source are converted into a specific value
16:27:49 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
16:27:50 toorevitimirp joins (~tooreviti@117.182.183.159)
16:27:56 <merijn> karasu1[m]: fromIntegral allows you to convert any type that is Integral to another numeric type
16:28:07 <karasu1[m]> Hmm, I'm not sure I totally understand the difference. So `Integral` is an algebraic data type with a type constraint `a`, but Integer is a concrete type I guess?
16:28:17 <merijn> karasu1[m]: No
16:28:34 <merijn> karasu1[m]: Integral is a typeclass (specifically for stuff that behaves lik an integer)
16:29:35 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
16:29:42 <merijn> "Integral a => a -> ..." says that the function works for any type that is an instance of the Integral typeclass.
16:30:43 <merijn> karasu1[m]: I'm not sure the term "type constraint" makes a lot of sense. The stuff in front of => in a type signature is a constraint (which you can think of as something like a compile time precondition)
16:30:51 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
16:32:52 <karasu1[m]> I was thinking that both `fromIntegral` and `fromInteger` would convert Integrals (in the case of `fromIntegral`) and Integers (in the case of `fromInteger`) to the generic `Num` type.... Is this the wrong way of looking at it then? Num, Integral, and Integer are all typeclasses right?
16:33:22 Alan_Turing joins (~frozenEre@94.128.81.133)
16:33:49 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
16:33:52 <xsperry> Integer is a type
16:34:04 <merijn> karasu1[m]: No
16:34:13 <merijn> karasu1[m]: Num and Integral are type classes
16:34:20 <merijn> Integer is not
16:34:26 <merijn> > 500 :: Integer
16:34:27 <lambdabot> 500
16:34:33 <merijn> :t 500
16:34:34 <lambdabot> Num p => p
16:34:50 <xsperry> Integer is a type with Integral instance
16:35:12 <merijn> Literals are polymorphic, so that is saying that the literal has type "Num p => p" i.e. this can be any type if (and only if) that type is also an instance of Num
16:35:21 <merijn> :t (500 :: Integer)
16:35:22 <lambdabot> Integer
16:35:38 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Client Quit)
16:36:00 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
16:36:19 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Client Quit)
16:37:31 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
16:37:45 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
16:38:59 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
16:38:59 × jmo` quits (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 256 seconds)
16:39:02 Noldorin joins (~noldorin@unaffiliated/noldorin)
16:39:05 <karasu1[m]> Do you have examples on when to use `fromIntegral` vs `fromInteger`? I'm still not sure I understand :(. `negate $ fromIntegral 1` and `negate $ fromInteger 1` seem to be doing exactly the same thing....
16:40:19 <geekosaur> > fromInteger (length "abc")
16:40:21 <lambdabot> error:
16:40:21 <lambdabot> • Couldn't match expected type ‘Integer’ with actual type ‘Int’
16:40:21 <lambdabot> • In the first argument of ‘fromInteger’, namely ‘(length "abc")’
16:40:28 <geekosaur> > fromIntegral (length "abc")
16:40:30 <lambdabot> 3
16:40:42 <merijn> karasu1[m]: Integer is an instance of Integral, so you can use fromIntegral for everything
16:40:54 <merijn> karasu1[m]: The reason fromInteger exists is far more specific
16:40:55 conal joins (~conal@64.71.133.70)
16:41:20 <merijn> karasu1[m]: Literals are polymorphic, so how can the compiler turn an arbitrary literal into a value of a specific type?
16:41:25 <geekosaur> it'll look like it's unnecessary a lot of the time because of defaulting which means if you don't use something that specifies otherwise, it'll default to Integer
16:41:41 jmo` joins (~user@h-162-127.A785.priv.bahnhof.se)
16:41:50 <merijn> Integer is an unbounded integer type, so we can convert any integer literal into an Integer safely
16:42:04 <merijn> karasu1[m]: then use fromInteger to produce the actual type we want
16:42:16 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
16:42:35 <merijn> karasu1[m]: writing "500" in your code is, effectively, like writing "fromInteger 500". That's why fromInteger exists.
16:42:36 <geekosaur> and one specific reason for fromInteger is that a numeric literal is compiled as an Integer and fromInteger applied to it to get (Num a => a), since the compiler has to pick some type for literals in order to compile them
16:42:46 <merijn> geekosaur: hah, too slow :p
16:42:58 <geekosaur> yeh, me and my verbose mouth :)
16:44:11 <maerwald> merijn: considering literals... haskell is dynamically typed :p
16:45:11 × raym quits (~ray@45.64.220.98) (Quit: leaving)
16:46:05 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
16:46:17 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
16:46:25 × jmo` quits (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 240 seconds)
16:46:39 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
16:46:58 hseg joins (~gesh@IGLD-84-228-239-97.inter.net.il)
16:47:14 <Igloo> edwardk: I always wondered how history would remember me. Now I know: The guy who broke compatibility with H98 :-)
16:47:22 <edwardk> yup
16:47:27 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
16:47:43 <edwardk> you cracked open the dam and made room for me
16:47:46 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
16:48:34 <karasu1[m]> <geekosaur "and one specific reason for from"> Wait.... but why would the compiler want to do that? `fromInteger` converts things to a generic `Num a` type right? Wouldn't it be be better to keep it as an `Integer` or `Int` type rather than converting it to `Num a`?
16:48:55 <merijn> karasu1[m]: There is no "generic" num type
16:49:10 <merijn> karasu1[m]: It converts to a *specific* type that happens to be an instance of the Num class
16:49:37 <merijn> karasu1[m]: Well, what if you want:
16:49:41 <merijn> > 500 :: Double
16:49:43 <lambdabot> 500.0
16:50:11 <merijn> karasu1[m]: The reason you can use 500 as a Double is that Double is an instance of Num and literals are converted to *any* instance of Num you want
16:50:32 boxscape joins (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243)
16:50:43 <karasu1[m]> Ah, so Integral and Num are completely unrelated typeclasses? I thought there might have been constraints and things going on such that `Integral` is constrained to be a `Num`, but the only constraints seem to be `Real` and `Enum`
16:51:06 <boxscape> cursed unicode https://i.imgur.com/hepukXI.png
16:51:28 <merijn> karasu1[m]: Yes
16:51:28 <geekosaur> Real has the constraint Num
16:51:39 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
16:51:45 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 272 seconds)
16:52:03 <merijn> karasu1[m]: All Integral instances *must* be Num instances, but no all Num instance are Integral instance (like Double)
16:52:38 <tomsmeding> boxscape: what obscure symbol is that "3"
16:52:49 <boxscape> tomsmeding erm let me check
16:53:06 <tomsmeding> because it's not a 3 :p
16:53:13 <boxscape> tomsmeding YI RADICAL VEP ꒱
16:53:35 tomsmeding 's font doesn't have that
16:53:42 <boxscape> :(
16:53:58 jmo` joins (~user@h-162-127.A785.priv.bahnhof.se)
16:54:46 <geekosaur> I'm reminded of that hack with the not-a-semicolon
16:54:53 <geekosaur> (someone's question mark iirc)
16:55:07 <pera> Does anyone knows the minimum memory requirements to compile Pandoc nowadays? 8GB of RAM is not enough for GHC anymore unfortunately... I was wondering if 16GB could do it, otherwise I will need to buy a new laptop :/
16:55:13 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
16:56:26 <koz_> pera: 16 should be enough.
16:56:30 × knupfer quits (~Thunderbi@mue-88-130-61-128.dsl.tropolys.de) (Ping timeout: 246 seconds)
16:57:13 × xsperry quits (~as@unaffiliated/xsperry) ()
16:57:16 <pera> cool, gonna buy a new module then :)
16:58:38 <tomsmeding> geekosaur: the Greek question mark, indeed, or this fabulous one https://www.reddit.com/r/rust/comments/5penft/parallelizing_enjarify_in_go_and_rust/dcsgk7n/
16:58:52 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
17:00:09 × bnbgg_ quits (uid454564@gateway/web/irccloud.com/x-rbckpsfnteepsstm) (Quit: Connection closed for inactivity)
17:00:35 × rajivr quits (uid269651@gateway/web/irccloud.com/x-pdqpqnvxjwncrovd) (Quit: Connection closed for inactivity)
17:01:52 <karasu1[m]> <geekosaur "and one specific reason for from"> When the typer (the thing that gives literals types, don't know the formal name for this), looks at numeric literal, it says: this seems like an `Integer`, but we should convert it to a `Num`. But to me that makes no sense, since as I realized, `Integer` already is an instance of `Num`.....
17:02:22 <geekosaur> there is no "conversion" going on at that point
17:02:33 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
17:02:41 <geekosaur> Num is not a thing you convert to, it is a constraint
17:02:55 <karasu1[m]> But didn't you say `fromInteger` is applied to convert it to a `Num`, or am I misunderstanding still?
17:03:13 <geekosaur> :t fromInteger
17:03:14 <lambdabot> Num a => Integer -> a
17:03:20 × jmo` quits (~user@h-162-127.A785.priv.bahnhof.se) (Remote host closed the connection)
17:03:38 jmo` joins (~user@h-162-127.A785.priv.bahnhof.se)
17:03:59 <geekosaur> in practice, fromInteger takes two parameters: an Integer, and a record of functions specifying the Num "interface" for some type
17:04:16 <geekosaur> sorry, not specifying but implemnting
17:05:12 <geekosaur> fromInteger then invokes the appropriate interface function to produce a value of that type from the Integer
17:05:13 <karasu1[m]> What would happen if `fromInteger` was not applied though? `Integer` already is an instance of `Num` so I don't see why we need to convert it back.... :(
17:05:29 <geekosaur> Num is not a type, there are no values of "type" Num
17:05:33 <maerwald> pera: 32gb work well
17:06:34 <pera> maerwald: my thinkpad can't go that high though :p
17:06:46 <maerwald> yeah, I had to buy thinkpad X1 extreme
17:07:13 <maerwald> and then linux support is still awful... but the alternative is mac with soldered non-upgradable ram
17:07:17 <geekosaur> a constraint like Num means the function must be given proof that some type obeys the constraint. with GHC specifically, this proof is an implementation
17:07:37 <MarcelineVQ> I'd try closing my browser and building with -j1 before buying a new pc
17:07:48 <karasu1[m]> <geekosaur "Num is not a type, there are no "> Right. Is this a better question: Why do we need to convert numeric literals to some type `a`, where `a` is an instance of the `Num` typeclass, when the compiler has already interpreted `a` as `Integer` (but `Integer` already has an instance of the `Num` typeclass)
17:08:22 × boxscape quits (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Quit: Connection closed)
17:08:33 <geekosaur> because you don't want to have to jump through extra hoops to use a bare `500` as, say, a Double instead of an Integer
17:08:52 × hexo quits (~hexo@gateway/tor-sasl/hexo) (Remote host closed the connection)
17:08:52 × srk quits (~sorki@gateway/tor-sasl/sorki) (Remote host closed the connection)
17:09:10 srk joins (~sorki@gateway/tor-sasl/sorki)
17:09:10 hexo joins (~hexo@gateway/tor-sasl/hexo)
17:09:17 <pera> MarcelineVQ: yeah I'm using -j1 now, and my system is under 2gb without ghc
17:09:31 berberman_ joins (~berberman@unaffiliated/berberman)
17:09:56 <tromp> is there a Haskell library offering Int256 or Word256 ?
17:10:22 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds)
17:10:28 <geekosaur> the whole point of the numeric typeclass hierarchy is to try to make numbers behave somewhat like they do with C's auto-promotion, instead of having to always be explicit about all your numeric types
17:10:43 <tromp> oh, there is https://hackage.haskell.org/package/basement-0.0.11/docs/Basement-Types-Word256.html
17:10:45 <Franciman> https://hackage.haskell.org/package/accelerate-bignum-0.2.0.0/docs/Data-Array-Accelerate-Data-BigInt.html
17:10:45 × Alan_Turing quits (~frozenEre@94.128.81.133) (Ping timeout: 240 seconds)
17:10:46 <Franciman> like thiz?
17:10:54 <geekosaur> in particular:
17:10:58 <geekosaur> :t (^)
17:10:59 <lambdabot> (Integral b, Num a) => a -> b -> a
17:11:09 <karasu1[m]> geekosaur: You said that `Num` is not a type, but a typeclass, which makes sense. But when I do `:t 500`, I see `500 :: Num p => p`. So, it seems the GHCi has typed the numeric literal 500 as the "type" `Num p => p`. So is it then fine to say that `Num p => p` is a type (although `Num` is not)?
17:11:17 × jmo` quits (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 256 seconds)
17:11:32 <geekosaur> there is no way to infer a type for b, so we have defaulting and typeclass relationships to make things Just Work most of the time
17:11:39 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
17:12:30 <geekosaur> yes. it says "given proof that some type p has a Num instance, this value can have the type p"
17:13:14 <geekosaur> the proof is usually inferred, but sometimes has to be manually specified by providing an explicit type
17:13:59 <Uniaika> Is there anyone here who has been roaming the Haskell wiki for quite some time now?
17:14:15 <Uniaika> I need someone experienced with it to review a list of changes to pages of the wiki
17:14:49 <geekosaur> when nothing else works, it'll try defaulting, which is a possibly empty list of types to attempt if everything else fails; the first that allows an expression to typecheck will be used. the defalt list is Integer and Double in that order
17:14:57 × mnrmnaugh quits (~mnrmnaugh@unaffiliated/mnrmnaugh) (Ping timeout: 264 seconds)
17:15:41 <geekosaur> all of this so numbers aren't an explicitly typed pain in the *ss to use
17:16:37 heatsink joins (~heatsink@2600:1700:bef1:5e10:b101:b0cf:b14d:ce6b)
17:17:56 <karasu1[m]> How does GHCi generate the list of types for defaulting?
17:18:47 <karasu1[m]> I think I get most of this stuff now though, so thanks a lot lol
17:18:58 <geekosaur> the language specification says the "default default" is (Integer, Double)
17:19:44 <karasu1[m]> OK! thanks!
17:19:49 <geekosaur> with ExtendedDefaultRules a few more are added, so that lists behave sensibly in the face of the Foldable typeclass which has similar issues
17:19:54 <geekosaur> :t length
17:19:55 <lambdabot> Foldable t => t a -> Int
17:20:30 jonathanx joins (~jonathan@h-176-109.A357.priv.bahnhof.se)
17:20:39 <geekosaur> so with ExtendedDefaultRules if length can't figure out what instance to use, it'll use the Foldable instance for lists which is usually what you want
17:21:56 <geekosaur> and there's a similar extension which extends defaulting and type inference to strings since there are two string-like types and some quasi-string-like types
17:23:53 nullniverse joins (~null@unaffiliated/nullniverse)
17:23:57 × xff0x quits (~xff0x@2001:1a81:52f8:8e00:3f0c:a02c:d901:27bc) (Ping timeout: 272 seconds)
17:24:26 xff0x joins (xff0x@gateway/vpn/mullvad/xff0x)
17:26:01 mnrmnaugh joins (~mnrmnaugh@unaffiliated/mnrmnaugh)
17:28:20 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
17:28:54 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 256 seconds)
17:30:33 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
17:31:41 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
17:32:00 × xff0x quits (xff0x@gateway/vpn/mullvad/xff0x) (Ping timeout: 265 seconds)
17:32:52 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
17:32:56 jmo` joins (~user@h-162-127.A785.priv.bahnhof.se)
17:33:38 xff0x joins (~xff0x@2001:1a81:52f8:8e00:23fc:8648:28c:c2cd)
17:33:45 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
17:33:46 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:35:40 alx741 joins (~alx741@186.178.108.225)
17:36:03 vicfred joins (~vicfred@unaffiliated/vicfred)
17:36:33 × neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Remote host closed the connection)
17:36:57 × ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer)
17:37:16 × toorevitimirp quits (~tooreviti@117.182.183.159) (Remote host closed the connection)
17:38:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
17:39:34 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:40:36 × stef204 quits (~stef204@unaffiliated/stef-204/x-384198) (Ping timeout: 240 seconds)
17:42:16 ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net)
17:42:58 × ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer)
17:43:01 × ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ->)
17:43:03 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
17:43:44 nullniv38 joins (~null@unaffiliated/nullniverse)
17:44:44 <Squarism> Im curious if its possible to rewrite these 2 functions to use the same case expression ? https://wtools.io/paste-code/b3AT
17:44:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
17:45:23 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:45:55 <Squarism> Or would it require the proxy type be exactly the same as the value type ( the variants of "Form_X" )
17:46:24 stef204 joins (~stef204@unaffiliated/stef-204/x-384198)
17:46:52 <geekosaur> at a guess, it's possible but would be a huge mistake
17:47:10 <Squarism> oh ok?
17:47:16 <Squarism> Why?
17:47:21 × nullniverse quits (~null@unaffiliated/nullniverse) (Ping timeout: 264 seconds)
17:47:27 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
17:47:36 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
17:47:46 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
17:48:40 <geekosaur> I'd expect it to be possible with lots of complicated type machinery that would be a massive pain to understand much less maintain
17:49:21 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
17:49:53 <geekosaur> starting with a type family to paper over the difference between the proxy and value types
17:50:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
17:51:28 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:52:18 × kenran quits (~kenran@i59F67B96.versanet.de) (Quit: leaving)
17:54:05 <Squarism> geekosaur, the number of versions will increase so I thought it would be nice to limit the number of place needed changing when adding versions.
17:54:27 × jmo` quits (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 272 seconds)
17:55:17 jmsx joins (~jordan@li1158-85.members.linode.com)
17:55:25 <geekosaur> best I can think of is to drop the default clause and use the pattern exhaustiveness checker to highlight such spots
17:56:18 <geekosaur> the other alternative is a record of variants, but that'll be a pain too (but at least colllects them all into one place)
17:56:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
17:56:58 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:57:31 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:a5e6:eed6:171f:46a3) (Ping timeout: 272 seconds)
17:58:48 Alan_Turing joins (~frozenEre@94.128.81.133)
17:58:56 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
17:59:05 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-kpbpuzyuhnpbsdju)
17:59:07 Jd007 joins (~Jd007@162.156.11.151)
17:59:19 <Squarism> You mean record of variants in signatures. like VersionDispatch { call :: .., proxyCall :: ... } ? Yeah, maybe ill just leave it for now,
17:59:42 × nullniv38 quits (~null@unaffiliated/nullniverse) (Read error: No route to host)
17:59:54 <geekosaur> yes
18:00:32 <geekosaur> there are no good answers to this kind of problem, only different tradeoffs
18:02:02 × shatriff quits (~vitaliish@176-52-216-242.irishtelecom.com) (Remote host closed the connection)
18:02:18 × Alan_Turing quits (~frozenEre@94.128.81.133) (Client Quit)
18:02:20 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
18:02:36 frozenErebus joins (~frozenEre@94.128.81.133)
18:02:37 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
18:03:05 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:04:45 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
18:05:09 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
18:05:39 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
18:05:48 × _ashbreeze_ quits (~mark@64.85.214.234.reverse.socket.net) (Remote host closed the connection)
18:06:28 jmo` joins (~user@h-162-127.A785.priv.bahnhof.se)
18:07:33 × dyeplexer quits (~lol@unaffiliated/terpin) (Ping timeout: 246 seconds)
18:08:15 × shatriff quits (~vitaliish@176-52-216-242.irishtelecom.com) (Remote host closed the connection)
18:08:30 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
18:08:44 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
18:08:52 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:09:02 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
18:09:23 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
18:09:35 coot joins (~coot@37.30.54.17.nat.umts.dynamic.t-mobile.pl)
18:10:13 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 256 seconds)
18:13:10 × ptrcmd quits (~ptrcmd@unaffiliated/petercommand) (Quit: Lost terminal)
18:13:51 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
18:14:41 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:14:45 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
18:14:52 × jmo` quits (~user@h-162-127.A785.priv.bahnhof.se) (Remote host closed the connection)
18:16:09 ptrcmd joins (~ptrcmd@unaffiliated/petercommand)
18:17:25 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
18:20:06 idhugo_ joins (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net)
18:20:10 boxscape joins (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243)
18:20:13 bnbgg_ joins (uid454564@gateway/web/irccloud.com/x-kgcnnasbwqjrcwxm)
18:22:05 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
18:22:28 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
18:27:01 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
18:27:16 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
18:27:22 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
18:33:56 Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)
18:34:31 bitmagie joins (~Thunderbi@200116b80679950091d656c272596245.dip.versatel-1u1.de)
18:35:10 × Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007)
18:35:14 × coot quits (~coot@37.30.54.17.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
18:38:06 jamm_ joins (~jamm@unaffiliated/jamm)
18:39:33 × frozenErebus quits (~frozenEre@94.128.81.133) (Ping timeout: 264 seconds)
18:40:25 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
18:42:38 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds)
18:43:08 × Noldorin quits (~noldorin@unaffiliated/noldorin) (Ping timeout: 268 seconds)
18:43:45 frozenErebus joins (~frozenEre@94.128.81.133)
18:44:54 × bitmagie quits (~Thunderbi@200116b80679950091d656c272596245.dip.versatel-1u1.de) (Quit: bitmagie)
18:45:06 × average quits (uid473595@gateway/web/irccloud.com/x-lumfcglyvjlqciwx) (Quit: Connection closed for inactivity)
18:45:21 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
18:47:27 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
18:47:46 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
18:48:51 Noldorin joins (~noldorin@unaffiliated/noldorin)
18:55:09 × leah2 quits (~leah@vuxu.org) (Ping timeout: 272 seconds)
18:55:55 mizu_no_oto joins (~textual@cpe-66-66-222-11.rochester.res.rr.com)
18:56:11 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
18:56:40 ransom joins (~c4264035@8.48.134.52)
18:57:06 × ransom quits (~c4264035@8.48.134.52) (Client Quit)
18:58:42 _ashbreeze_ joins (~mark@64.85.214.234.reverse.socket.net)
18:59:51 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
19:01:16 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
19:03:26 × berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 240 seconds)
19:03:31 berberman joins (~berberman@unaffiliated/berberman)
19:04:45 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 272 seconds)
19:06:58 × mizu_no_oto quits (~textual@cpe-66-66-222-11.rochester.res.rr.com) (Quit: Computer has gone to sleep.)
19:08:08 mizu_no_oto joins (~textual@cpe-66-66-222-11.rochester.res.rr.com)
19:08:08 × ptrcmd quits (~ptrcmd@unaffiliated/petercommand) (Quit: leaving)
19:08:59 aldessa joins (~hugh@cpc158605-hari23-2-0-cust303.20-2.cable.virginm.net)
19:09:19 Dufaer joins (4d38337f@77-56-51-127.dclient.hispeed.ch)
19:09:24 <Dufaer> Hi!
19:09:24 <Dufaer> The documentation page
19:09:25 <Dufaer> https://hackage.haskell.org/package/base-4.14.1.0/docs/GHC-TypeNats.html
19:09:25 <Dufaer> states:
19:09:26 <Dufaer> "The programmer interface for working with type-level naturals should be defined in a separate library."
19:09:26 <Dufaer> Does this "separate library" exist?
19:09:39 ptrcmd joins (~ptrcmd@unaffiliated/petercommand)
19:10:45 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds)
19:10:49 <merijn> singletons, if anything
19:10:57 <merijn> @hackage singletons
19:10:58 <lambdabot> https://hackage.haskell.org/package/singletons
19:11:16 <Dufaer> Thanks!
19:11:31 <merijn> Dufaer: But maybe others exist, I'm also vaguely aware of the existence of several GHC plugins for working with type level nats
19:12:15 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
19:12:18 <merijn> Dufaer: Basically, that's just a disclaimer of "this is just the raw GHC internals, with no attempt at convenience and the lack of usability is not a bug in this module" ;)
19:12:25 × mizu_no_oto quits (~textual@cpe-66-66-222-11.rochester.res.rr.com) (Ping timeout: 240 seconds)
19:13:14 <geekosaur> that, basically. the ghc plugins and some ad hoc stuff are otherwise all I'm aware of in terms of usability
19:13:24 <geekosaur> and it doesn't add up to much yet
19:13:29 × alx741 quits (~alx741@186.178.108.225) (Quit: alx741)
19:13:40 <geekosaur> hm, I may have phrased that badly :)
19:13:45 × frozenErebus quits (~frozenEre@94.128.81.133) (Ping timeout: 240 seconds)
19:14:49 × boxscape quits (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Quit: Connection closed)
19:14:52 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
19:15:08 boxscape joins (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243)
19:15:44 <aldessa> hi, with reflex-dom is it possible to use any package on Hackage? I'm looking at Reflex Platform but it says it is a curated set of packages.
19:16:22 × shatriff quits (~vitaliish@176-52-216-242.irishtelecom.com) (Remote host closed the connection)
19:16:28 <geekosaur> not "any" package; I'd expect problems with any package that uses the FFI, if nothing else
19:16:38 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
19:16:45 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
19:17:09 × shatriff quits (~vitaliish@176-52-216-242.irishtelecom.com) (Remote host closed the connection)
19:17:26 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
19:17:28 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
19:17:57 × shatriff quits (~vitaliish@176-52-216-242.irishtelecom.com) (Remote host closed the connection)
19:18:14 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
19:18:44 × shatriff quits (~vitaliish@176-52-216-242.irishtelecom.com) (Remote host closed the connection)
19:19:00 <aldessa> i'm a bit confused, how do i use reflex without reflex-platform? it looks like GHCJS support for stack has gone
19:19:01 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
19:19:08 <aldessa> reflex-dom*
19:19:31 × shatriff quits (~vitaliish@176-52-216-242.irishtelecom.com) (Remote host closed the connection)
19:20:26 thongpv87 joins (~thongpv87@103.6.151.121)
19:20:32 × sm quits (~user@li229-222.members.linode.com) (Ping timeout: 246 seconds)
19:22:16 × conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer)
19:22:41 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
19:23:55 conal joins (~conal@64.71.133.70)
19:31:22 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
19:31:41 leah2 joins (~leah@vuxu.org)
19:31:42 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
19:32:05 bitmagie joins (~Thunderbi@200116b806799500c47356767c14074b.dip.versatel-1u1.de)
19:32:18 × kmein quits (~weechat@static.173.83.99.88.clients.your-server.de) (Quit: ciao kakao)
19:32:36 kmein joins (~weechat@static.173.83.99.88.clients.your-server.de)
19:33:15 Jd007 joins (~Jd007@162.156.11.151)
19:33:46 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
19:34:16 × bitmagie quits (~Thunderbi@200116b806799500c47356767c14074b.dip.versatel-1u1.de) (Client Quit)
19:35:57 frozenErebus joins (~frozenEre@94.128.81.133)
19:36:42 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 265 seconds)
19:38:40 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
19:40:05 × ixaxaar quits (~ixaxaar@49.207.197.94) (Ping timeout: 240 seconds)
19:40:26 × dale quits (dale@unaffiliated/dale) (Remote host closed the connection)
19:40:39 dale joins (dale@unaffiliated/dale)
19:41:05 × dale quits (dale@unaffiliated/dale) (Remote host closed the connection)
19:41:34 dale joins (dale@unaffiliated/dale)
19:43:45 mizu_no_oto joins (~textual@cpe-66-66-222-11.rochester.res.rr.com)
19:44:02 <tromp> my program imports Basement.Types.Word256(Word256), but yields an error " • No instance for (Integral Word256) arising from a use of ‘div’" when dividing two Word256s
19:44:34 <tromp> yet https://hackage.haskell.org/package/basement-0.0.11/docs/Basement-Types-Word256.html shows an instance Integral Word256
19:45:01 <tromp> do i need a different import for that
19:45:16 <geekosaur> make sure you have the matching version installed?
19:45:24 sm joins (~user@li229-222.members.linode.com)
19:45:29 <tromp> i do
19:45:48 × dale quits (dale@unaffiliated/dale) (Remote host closed the connection)
19:45:49 <tromp> basement-0.0.11 is installed
19:45:54 <swarmcollective> Remove the "(Word256)" so it will allow all imports from Basement.Types.Word256 ?
19:46:12 <geekosaur> instances should always be imported
19:46:21 <swarmcollective> Oh, good to know.
19:46:24 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
19:46:28 <geekosaur> type system soundness depends on it
19:46:35 dale joins (dale@unaffiliated/dale)
19:46:52 <tromp> that gave a ton of errors every time i use + (asking whether I mean Prelude.+ or Basement one, evven if I add two Ints)
19:47:26 × aldessa quits (~hugh@cpc158605-hari23-2-0-cust303.20-2.cable.virginm.net) (Quit: Leaving)
19:47:26 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
19:47:46 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
19:48:58 <tromp> can i let the + be inferred from arguments?
19:49:13 <merijn> tromp: eh, Basement is intended to be a replacement for Prelude
19:49:22 <merijn> if you use it you should be getting rid of Prelude
19:49:23 <geekosaur> type directed name resolution is not a thing, no
19:49:35 <merijn> (via -XNoImplicitPrelude or whatever the flag is)
19:49:40 <tromp> merijn: ah that explains
19:49:52 <geekosaur> and merijn is probably right, it's trying to find an instance for the wrong Integralk
19:49:55 <davean> But wouldn't types not be enough? Does basement's + not also add Ints?
19:50:00 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
19:50:24 <geekosaur> true that
19:50:46 <davean> Theres nothing here to say which is the correct oneto my knowlege
19:51:33 × pera quits (~pera@unaffiliated/pera) (Ping timeout: 264 seconds)
19:51:51 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
19:52:31 <tromp> ok, with that language extension, I now get error: Not in scope: type constructor or class ‘Int’
19:52:53 <tromp> for instance on my function sig: armies :: Int -> Int -> [(Int, Int, Int, Word256)]
19:53:13 <geekosaur> you need more than just that module if you're using it as your Prelude. probably: import Basement
19:53:47 <geekosaur> you don't get to pick and choose types from it, in short; you need the whole package as a group
19:54:13 <merijn> Or maybe read the README which discusses how to use it with and without Prelude :p
19:54:38 <geekosaur> reading documentation. imagine that :)
19:54:47 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
19:55:39 <Squarism> if you have 2 types that are sets of constraints. Can you combine then into one type?
19:55:58 <davean> geekosaur: No, I won't
19:56:00 <Squarism> ...by reusing the other two
19:56:09 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
19:57:19 × mizu_no_oto quits (~textual@cpe-66-66-222-11.rochester.res.rr.com) (Ping timeout: 256 seconds)
19:57:34 <geekosaur> "types"? afaik you can only do that with type synonyms
19:57:49 <geekosaur> types hide too much
19:58:30 <tromp> i think i need Foundation. will try using latter's README
19:58:46 <monochrom> But since the syntax is "type XXX = ..." people think that XXX is a type.
19:59:00 <monochrom> So much for meaningful reserved words.
19:59:24 <merijn> monochrom: Well, it is :p
19:59:59 <DigitalKiwi> i know of shelly HSH and turtle but are there any more i should look at? want to replace some shell scripts but i don't know which of these best fits the kind of scripts i write :(
20:00:00 <Squarism> geekosaur, i guess i mean "type XYZ a b .. = "
20:00:03 <geekosaur> if that's the case then you can just combine them, I think: type XAndY a = (X a, Y a) -- may require ConstraintKinds still?
20:00:14 <davean> I mean perhaps he means sometihng like http://hackage.haskell.org/package/constraints-0.12/docs/Data-Constraint.html ?
20:00:24 <merijn> monochrom: Arguably it's "a name for a type", then again "ReaderT Foo" is, arguably, also just a name for a type :p
20:00:43 minoru_shiraeesh joins (~shiraeesh@46.34.207.93)
20:01:08 × __minoru__shirae quits (~shiraeesh@109.166.57.144) (Ping timeout: 272 seconds)
20:01:20 <monochrom> More generally and meta-ly, so much for wording your question in your own wording without actual code or concrete example.
20:01:45 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 272 seconds)
20:01:49 <monochrom> I want to tell you the story of 1048.
20:02:07 <DigitalKiwi> https://mostlyabsurd.com/files/tito is one i want to do
20:03:06 <monochrom> It was 10-15 years ago. My friend was an on-site tech support person, he went to a small office to upgrade software. The small office people asked him "will this work for 1048?"
20:03:28 <monochrom> Their homebrew terminology "1048" means "1024x768 monitors"
20:03:33 Tops2 joins (~Tobias@dyndsl-095-033-023-209.ewe-ip-backbone.de)
20:03:37 <dmj`> DigitalKiwi: just writing bash, and then using ShellCheck is nice too
20:03:48 <DigitalKiwi> dmj`: yeah that's what i do now lol
20:04:17 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
20:04:40 <DigitalKiwi> some of these are starting to get more advanced than i know how to do in bash :(
20:04:56 pfurla joins (~pfurla@219.15.195.173.client.static.strong-in52.as13926.net)
20:04:57 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
20:05:05 × petersen quits (~petersen@redhat/juhp) (Ping timeout: 240 seconds)
20:05:11 <dmj`> lots of haskell shell libs are stringly-typed anyways
20:05:15 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
20:05:18 × frozenErebus quits (~frozenEre@94.128.81.133) (Ping timeout: 256 seconds)
20:05:38 <geekosaur> lots of shell scripts are stringly typed anyways :)
20:05:59 <monochrom> lots of Turing machines, too.
20:07:11 petersen joins (~petersen@redhat/juhp)
20:07:31 × Tops22 quits (~Tobias@dyndsl-095-033-023-209.ewe-ip-backbone.de) (Ping timeout: 256 seconds)
20:08:04 irc_user joins (uid423822@gateway/web/irccloud.com/x-ywgoyvpgklsytbwc)
20:09:45 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
20:11:33 kam1 joins (~kam1@5.125.120.35)
20:12:04 × kam1 quits (~kam1@5.125.120.35) (Read error: Connection reset by peer)
20:13:04 <DigitalKiwi> yeah lots of String -> [String] -> [String] in HSH at least
20:13:47 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
20:18:19 <dmj`> System.Process is very stringy
20:18:58 ADG1089__ joins (~aditya@223.235.76.112)
20:20:02 <geekosaur> POSIX is very stringy
20:20:11 × tlyu quits (~tlyu@195.140.213.38) (Remote host closed the connection)
20:20:16 <geekosaur> for ByteString values of "stringy"
20:20:26 conal joins (~conal@64.71.133.70)
20:20:45 × ADG1089__ quits (~aditya@223.235.76.112) (Read error: Connection reset by peer)
20:22:28 × boxscape quits (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Quit: Connection closed)
20:22:39 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
20:25:25 × stef204 quits (~stef204@unaffiliated/stef-204/x-384198) (Quit: WeeChat 3.0)
20:25:55 boxscape joins (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243)
20:27:08 × thongpv87 quits (~thongpv87@103.6.151.121) (Remote host closed the connection)
20:27:27 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 265 seconds)
20:28:44 mizu_no_oto joins (~textual@cpe-66-66-222-11.rochester.res.rr.com)
20:29:36 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
20:30:15 × ezrakilty quits (~ezrakilty@75-172-120-208.tukw.qwest.net) (Remote host closed the connection)
20:30:46 gioyik_ joins (~gioyik@gateway/tor-sasl/gioyik)
20:31:17 <DigitalKiwi> as it turns out i manipulate a lot of strings in my bash scripts ;P
20:31:54 × heatsink quits (~heatsink@2600:1700:bef1:5e10:b101:b0cf:b14d:ce6b) (Remote host closed the connection)
20:32:07 <pjb> DigitalKiwi: that sounds dire. bash is not very efficient at processing strings…
20:32:38 <geekosaur> which is funny because processing strings is most of what shells do
20:32:56 × mizu_no_oto quits (~textual@cpe-66-66-222-11.rochester.res.rr.com) (Ping timeout: 240 seconds)
20:34:17 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 268 seconds)
20:35:13 <DigitalKiwi> git show -U25 --word-diff=plain --color=auto --word-diff-regex='\w+.\w+' | grep -E 'assets:cc|Net' | sed 's:\$ ::'|sed -E 's:(\[-|\{\+)::g'| sed -E 's:(\+\})::g'|sed -E 's:(\-\]):",":g'|sed 's:",": ":g'|sed 's:"::g'|awk '{ if ($3) {v=$3-$2; if(v>0) { print $1 "\t" "\033[1;31m" $2 "\033[0m" "\t" "\033[1;35m" $3 "\033[0m" "\t" "\033[0;32m(v: +" v ")\033[0m" } else print $1 "\t" "\033[1;31m" $2 "\33[0m" "\t" "\033[1;35m" $3 "\033[0m" "\t" "\033[0
20:35:13 <DigitalKiwi> ;31m(v: " v ")\033[0m" } else print $1 "\t" "\033[0;36m" $2 "\033[0m" "\t" "\033[0;36m" $2 "\033[0m" }'|sed 's:\t:,:g' | column -N "coin,prev,current,delta" --table --output-separator " " --separator ","
20:35:16 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
20:36:58 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
20:37:00 zepheiryan joins (~zepheirya@178.239.168.171)
20:37:19 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
20:37:35 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
20:38:31 hexfive joins (~hexfive@50.35.83.177)
20:38:56 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
20:39:28 × bnbgg_ quits (uid454564@gateway/web/irccloud.com/x-kgcnnasbwqjrcwxm) (Quit: Connection closed for inactivity)
20:39:37 <DigitalKiwi> https://dpaste.com/4DWY2S7JE#wrap
20:41:43 <DigitalKiwi> https://dpaste.com/G4TJE79QZ#wrap
20:41:54 <DigitalKiwi> it's messy and wrong ;_;
20:41:56 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
20:42:28 <DigitalKiwi> but it's pretty
20:42:41 <monochrom> haha
20:42:55 <DigitalKiwi> https://mostlyabsurd.com/files/2021-02-14-110551_2880x1800_scrot.png
20:43:00 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
20:43:28 <merijn> DigitalKiwi: You seem to have misspelled "terrifying"
20:43:54 <DigitalKiwi> 03:39 DigitalKiwi: i have something amazingly horrific but so pretty
20:44:24 <geekosaur> looks like something I would write >.>
20:44:55 <DigitalKiwi> don't trust anyone who says they wouldn't
20:44:55 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
20:45:01 knupfer joins (~Thunderbi@200116b8246bfb009dcc87cb843657f3.dip.versatel-1u1.de)
20:45:03 × sh9 quits (~sh9@softbank060116136158.bbtec.net) (Ping timeout: 246 seconds)
20:47:02 <DigitalKiwi> i use jq in a few others a lot...
20:47:26 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
20:47:46 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
20:47:48 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
20:48:02 × leah2 quits (~leah@vuxu.org) (Ping timeout: 264 seconds)
20:48:08 <monochrom> https://www.youtube.com/watch?v=O4SXqAnKWwE "ASCII Haskell raytracer"
20:49:09 × zar quits (~zar@fw1.ciirc.cvut.cz) (Ping timeout: 264 seconds)
20:49:39 sh9 joins (~sh9@softbank060116136158.bbtec.net)
20:50:10 × fissureman quits (~quassel@c-73-163-84-25.hsd1.dc.comcast.net) (Ping timeout: 265 seconds)
20:50:21 fissureman joins (~quassel@c-73-163-84-25.hsd1.dc.comcast.net)
20:51:10 <dmj`> jq is a classic
20:51:23 usr25 joins (~J@68.red-83-46-58.dynamicip.rima-tde.net)
20:51:35 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
20:51:51 bnbgg_ joins (uid454564@gateway/web/irccloud.com/x-jxwbvqetgazmpwcn)
20:52:01 <maerwald> I write my backends with jq and bash
20:54:10 × knupfer quits (~Thunderbi@200116b8246bfb009dcc87cb843657f3.dip.versatel-1u1.de) (Quit: knupfer)
20:54:58 <DigitalKiwi> the problem isn't so much that bash isn't good at the things i've shown you so far it's that it's not good at the things i want to do :(
20:56:05 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
20:57:11 <DigitalKiwi> hmm but maybe i can combine them
20:58:53 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
20:59:10 zar joins (~zar@fw1.ciirc.cvut.cz)
20:59:46 <DigitalKiwi> btw what's a haskell lib to print color text like i did above heh
21:01:02 DigitalKiwi sees ansi-terminal...ohhi ocharles
21:02:53 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
21:05:21 × elliott_ quits (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 264 seconds)
21:05:42 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
21:05:43 <dmj`> maerwald: what about your front ends?
21:06:14 <sm[m]> DigitalKiwi: maybe overkill but I like cmd that's built in to shake. Easy to use, and if your script happens to generate any artifacts, you have the full power of shake available
21:06:46 <maerwald> dmj`: I write them all in miso
21:07:52 <sm[m]> also: cool scripts, why would you rewrite them ?
21:07:58 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
21:08:38 <dmj`> maerwald: that's correct
21:09:05 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
21:11:03 heatsink_ joins (~heatsink@2600:1700:bef1:5e10:b101:b0cf:b14d:ce6b)
21:11:54 ezrakilty joins (~ezrakilty@75-172-120-208.tukw.qwest.net)
21:13:09 xsperry joins (~as@unaffiliated/xsperry)
21:13:45 × sMuNiX quits (~sMuNiX@lnsm2-montreal02-142-118-236-120.internet.virginmobile.ca) (Ping timeout: 246 seconds)
21:15:36 elliott_ joins (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net)
21:16:39 × ezrakilty quits (~ezrakilty@75-172-120-208.tukw.qwest.net) (Ping timeout: 256 seconds)
21:17:45 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
21:18:19 sMuNiX joins (~sMuNiX@lnsm2-montreal02-142-118-236-120.internet.virginmobile.ca)
21:18:52 mirrorbird joins (~psutcliff@2a00:801:44d:603d:d116:d5a1:4a2f:a08f)
21:19:34 coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
21:19:54 × coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection)
21:19:55 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-ltinxgozprmzwqca) ()
21:20:28 coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
21:21:21 × verement quits (~anonymous@cpe-76-167-229-223.san.res.rr.com) (Quit: verement)
21:22:09 × elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 264 seconds)
21:22:45 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
21:23:16 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
21:24:12 <__monty__> sm[m]: Oo, cool idea. How does shake help with coloring though?
21:25:04 <sm[m]> I didn't mean it for that question :)
21:25:45 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
21:27:19 × gioyik_ quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 268 seconds)
21:27:56 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
21:29:57 slack1256 joins (~slack1256@pc-198-213-46-190.cm.vtr.net)
21:30:02 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
21:30:40 son0p joins (~son0p@181.136.122.143)
21:32:05 × pfurla quits (~pfurla@219.15.195.173.client.static.strong-in52.as13926.net) (Ping timeout: 240 seconds)
21:33:27 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Client Quit)
21:33:47 <sm[m]> but related to that: ansi-terminal is the package, indeed. Which brings the question, can I robustly add packages to my scripts ? The answer is yes, if you make it a cabal or (works slightly better) stack script.
21:33:49 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
21:34:14 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
21:34:44 <sm[m]> these scripts are more verbose and much heavier for other people to install than shell scripts, but if you can get past that it sure is intoxicating knowing there's no ceiling on your script's power
21:35:32 verement joins (~anonymous@cpe-76-167-229-223.san.res.rr.com)
21:36:45 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
21:38:16 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
21:41:35 × heatsink_ quits (~heatsink@2600:1700:bef1:5e10:b101:b0cf:b14d:ce6b) (Remote host closed the connection)
21:41:38 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
21:47:25 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
21:47:45 × idhugo_ quits (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) (Ping timeout: 240 seconds)
21:47:46 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
21:48:19 × kmein quits (~weechat@static.173.83.99.88.clients.your-server.de) (Quit: ciao kakao)
21:48:35 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
21:48:35 kmein joins (~weechat@static.173.83.99.88.clients.your-server.de)
21:49:27 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:51:12 × geekosaur quits (ae68c070@cpe-174-104-192-112.neo.res.rr.com) (Quit: Connection closed)
21:51:20 × boxscape quits (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Quit: Connection closed)
21:51:20 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
21:51:22 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
21:54:25 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
21:54:37 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
21:56:47 <ij> alterF is for only for the new containers, which doesn't build :/
21:56:47 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 260 seconds)
21:56:49 × Gurkenglas quits (~Gurkengla@dslb-092-075-179-204.092.075.pools.vodafone-ip.de) (Read error: Connection reset by peer)
21:56:56 <ij> womp womp
21:57:35 <ij> ah, but that must be the optimized version. lens likely has a working, slower one
21:59:05 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
21:59:08 <ij> hm, no it compiled after all.. on the 10th rerun _after_ I stopped fiddling with NIX_PATH and override definitions
21:59:58 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
22:00:25 conal joins (~conal@64.71.133.70)
22:00:44 × fendor quits (~fendor@77.119.131.224.wireless.dyn.drei.com) (Remote host closed the connection)
22:01:07 fendor joins (~fendor@77.119.131.224.wireless.dyn.drei.com)
22:02:10 elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
22:04:40 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
22:04:45 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
22:05:09 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:05:15 × conal quits (~conal@64.71.133.70) (Ping timeout: 272 seconds)
22:06:08 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
22:07:51 <ij> @hoogle a -> Data.Set.Set a -> a
22:07:52 <lambdabot> Data.Set lookupLT :: Ord a => a -> Set a -> Maybe a
22:07:52 <lambdabot> Data.Set lookupGT :: Ord a => a -> Set a -> Maybe a
22:07:52 <lambdabot> Data.Set lookupLE :: Ord a => a -> Set a -> Maybe a
22:07:56 × hseg quits (~gesh@IGLD-84-228-239-97.inter.net.il) (Ping timeout: 240 seconds)
22:08:35 <ij> there's no lookup that finds the exact one. there's delete, but it doesn't return it :/
22:09:10 <ij> is it really not there or am I just not seeing it?
22:10:55 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
22:11:06 <Rembane> ij: Why do you want to get it back? You already have it.
22:11:32 <ij> I have the Eq/Ord value, but not the rest
22:12:48 <ij> ah, it's DIY – lookupIndex + elemAt
22:12:59 bo_ joins (~bo@178.150.122.153)
22:13:16 <Rembane> Don't you already have the value you are doing a lookup on?
22:13:33 × Franciman quits (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving)
22:13:45 <MarcelineVQ> use member to test for Set membership
22:13:56 <ij> I do, but it's not equal to the value with the same Ord order in the set
22:15:16 × sMuNiX quits (~sMuNiX@lnsm2-montreal02-142-118-236-120.internet.virginmobile.ca) (Ping timeout: 240 seconds)
22:15:16 ski . o O ( some values are more equal than others )
22:15:25 × minoru_shiraeesh quits (~shiraeesh@46.34.207.93) (Ping timeout: 240 seconds)
22:15:26 <Rembane> That sounds like a potential footgun
22:15:38 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
22:16:01 × _bo quits (~bo@178.150.122.153) (Ping timeout: 272 seconds)
22:16:07 <ij> well, I don't know a better way to write it
22:17:56 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
22:18:38 <c_wraith> ij: I think you want alterF
22:19:10 <ephemient> alterF doesn't return the element itself either
22:19:33 <c_wraith> sure it does
22:19:38 <c_wraith> it does whatever f does
22:19:43 × danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
22:19:56 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
22:20:01 <c_wraith> oh, wait. It only gets a Bool? that's austere
22:20:14 <ephemient> :t \a s -> case S.spanAntitone (< a) s of (l, S.minView -> Just (a', r)) -> Just (a', l <> r); _ -> Nothing
22:20:16 <lambdabot> Ord a => a -> S.Set a -> Maybe (a, S.Set a)
22:20:30 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:20:49 <ephemient> that being said, I think it's pretty unusual to have Eq/Ord on only part of a type
22:21:29 <ephemient> wait, that doesn't check for a == a'
22:21:39 <ephemient> anyway, you can bodge together something like that I guess
22:21:45 <ij> :t fmap (flip Data.Set.findIndex Data.Set.empty) . Data.Set.lookupIndex
22:21:47 <lambdabot> Ord a => a -> S.Set a -> Int
22:21:58 <ij> sorry, wrong copypaste
22:22:13 greety joins (bab7262d@186.183.38.45)
22:22:18 <ij> it's elemAt + lookupIndex
22:22:23 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 256 seconds)
22:23:01 <ij> is it that unusual? that's the whole reason it's by instances in the first place :) so you can swap it for something else
22:23:07 <c_wraith> The whole api for set just isn't designed for Ord/Eq ignoring fields
22:29:48 <ij> it would be really odd, if I was the only one donig that
22:30:05 × clog quits (~nef@bespin.org) (Ping timeout: 240 seconds)
22:30:22 <nshepperd> just use a Map?
22:31:13 boxscape joins (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243)
22:31:48 leah2 joins (~leah@vuxu.org)
22:32:40 <ij> that would work
22:33:59 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
22:34:19 <ij> that does sound like the saner option
22:35:13 <nshepperd> a Set containing items where Ord only handles part of the value is basically simulating a Map poorly
22:35:34 conal joins (~conal@64.71.133.70)
22:36:03 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
22:37:46 greety parts (bab7262d@186.183.38.45) ()
22:37:47 <ij> it's funny to moe how totally unaware I was of that... it seemed like an ok idea
22:37:56 <ij> moe ~> me
22:38:50 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 272 seconds)
22:41:39 ezrakilty joins (~ezrakilty@75-172-120-208.tukw.qwest.net)
22:41:59 heatsink joins (~heatsink@2600:1700:bef1:5e10:b101:b0cf:b14d:ce6b)
22:44:24 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:46:50 × heatsink quits (~heatsink@2600:1700:bef1:5e10:b101:b0cf:b14d:ce6b) (Ping timeout: 264 seconds)
22:47:26 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
22:47:46 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
22:50:31 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
22:53:48 <ephemient> Set a ≅ Map a (), Map a b ≅ Set (Arg a b)
22:54:41 <ephemient> I wouldn't have been surprised if they used the same representation underneath, but apparently that's not what containers does
22:55:44 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
22:56:05 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:57:49 sMuNiX joins (~sMuNiX@lnsm2-montreal02-142-118-236-120.internet.virginmobile.ca)
22:59:38 jpds joins (~jpds@gateway/tor-sasl/jpds)
22:59:42 <Axman6> the former is how Set in DAML is defined (for not anyway, I think there's work to make TextMap a specific type which is provided by whatever platform the contract code is run on)
22:59:47 <Axman6> now*
23:00:45 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
23:02:53 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
23:04:20 × nrh^ quits (nrh@ip98-184-89-2.mc.at.cox.net) ()
23:04:21 × usr25 quits (~J@68.red-83-46-58.dynamicip.rima-tde.net) (Quit: Bye)
23:06:53 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
23:09:28 × bnbgg_ quits (uid454564@gateway/web/irccloud.com/x-jxwbvqetgazmpwcn) (Quit: Connection closed for inactivity)
23:09:39 × coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
23:11:00 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 246 seconds)
23:11:30 polyrain joins (~polyrain@124.177.21.171)
23:13:54 × boxscape quits (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Quit: Connection closed)
23:16:37 jedws joins (~jedws@101.184.202.248)
23:18:33 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
23:19:45 × slack1256 quits (~slack1256@pc-198-213-46-190.cm.vtr.net) (Ping timeout: 246 seconds)
23:19:54 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
23:21:10 × Lowl3v3l quits (~Lowl3v3l@dslb-002-203-233-121.002.203.pools.vodafone-ip.de) (Remote host closed the connection)
23:21:47 heatsink joins (~heatsink@2600:1700:bef1:5e10:b101:b0cf:b14d:ce6b)
23:24:21 <Squarism> Given a "class SomeConst a => AClass a". When you make an instance of AClass wo yet having declared SomeConst a you need to add "instant SomeConst SomeValue => AClass SomeValue". This gets a bit verbose so I wonder if you can "predefine" it per module?
23:24:56 <Squarism> If say you have more instances that require SomeConst SomeValue so to speak.
23:25:58 × Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:6820:5e7f:6476:59ce) (Quit: Leaving)
23:26:46 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds)
23:26:52 <Axman6> I don't understand the question
23:29:12 dsrt^ joins (dsrt@ip98-184-89-2.mc.at.cox.net)
23:29:33 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
23:30:17 <Squarism> Axman. You have "class SomeConst a => AClass a". You want to define an instance of "AClass Foo". But "SomeConst Foo" is not yet defined at that point in the compilation module dependency graph, but will higher up.
23:30:39 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds)
23:31:39 <Squarism> I mean i can write "instance SomeConst Foo => AClass Foo" and it works. But i need to do it at every place "SomeConst Foo" is a constraint
23:34:27 × mirrorbird quits (~psutcliff@2a00:801:44d:603d:d116:d5a1:4a2f:a08f) (Ping timeout: 272 seconds)
23:37:11 × dhil quits (~dhil@80.208.56.181) (Ping timeout: 256 seconds)
23:37:21 s00pcan joins (~chris@075-133-056-178.res.spectrum.com)
23:40:08 <monochrom> Huh, I would implement "instance SomeConst SomeValue" as well.
23:40:46 <monochrom> I mean, no one does "instance Functor T => Applicative T". Everyone does both "instance Functor T where" and "instance Applicative T where".
23:41:08 jpds joins (~jpds@gateway/tor-sasl/jpds)
23:42:01 <Axman6> yeah I didn't even know that was legal
23:43:48 <monochrom> Perhaps legal under abuse of FlexibleContext.
23:45:42 × Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007)
23:46:11 <Squarism> oh ok
23:47:26 × zebrag quits (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
23:47:47 zebrag joins (~inkbottle@aaubervilliers-654-1-112-148.w86-198.abo.wanadoo.fr)
23:48:01 × son0p quits (~son0p@181.136.122.143) (Quit: Lost terminal)
23:52:32 × fendor quits (~fendor@77.119.131.224.wireless.dyn.drei.com) (Remote host closed the connection)
23:56:15 <NieDzejkob> http://dev.stephendiehl.com/hask/index.html#partial-functions this document claims that foldr and some other folds are partial for empty lists, but
23:56:18 <NieDzejkob> > foldr (+) 3 []
23:56:19 <lambdabot> 3
23:56:23 <NieDzejkob> am I missing something?
23:59:17 alx741 joins (~alx741@186.178.108.225)

All times are in UTC on 2021-02-14.