Home liberachat/#haskell: Logs Calendar

Logs on 2021-09-16 (liberachat/#haskell)

00:05:37 ec_ joins (~ec@gateway/tor-sasl/ec)
00:07:41 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
00:11:31 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
00:11:45 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
00:12:55 × aegon quits (~mike@174.127.249.180) (Quit: leaving)
00:13:45 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
00:16:29 lavaman joins (~lavaman@98.38.249.169)
00:21:11 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds)
00:21:42 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:21:51 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
00:22:10 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
00:24:28 ph88 joins (~ph88@2a02:8109:9e00:7e5c:c17a:3fe0:849c:9e0a)
00:24:58 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
00:26:06 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
00:26:57 geekosaur joins (~geekosaur@xmonad/geekosaur)
00:27:40 × ph88^ quits (~ph88@ip5f5af6fd.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
00:29:33 × stites quits (~stitescoc@130.44.141.131) (Quit: Bridge terminating on SIGTERM)
00:29:33 × enick_769 quits (~matrixbot@130.44.141.131) (Quit: Bridge terminating on SIGTERM)
00:30:00 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
00:39:24 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2.1)
00:43:42 × proofofkeags_ quits (~proofofke@205.209.28.54) (Ping timeout: 268 seconds)
00:46:18 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
00:51:27 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
00:51:44 <ldlework> i'm finding the rendering performance of gloss a bit unsatsifactory
00:51:48 <ldlework> but i bet it's my code
00:54:16 × jinsun quits (~quassel@user/jinsun) (Read error: Connection reset by peer)
00:55:12 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
00:57:03 jinsun joins (~quassel@user/jinsun)
00:57:56 × lbseale quits (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer)
00:59:24 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
01:01:39 geekosaur joins (~geekosaur@xmonad/geekosaur)
01:01:43 <Axman6> Feel free to share some code
01:05:20 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
01:07:40 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
01:08:41 <ldlework> Axman6: https://github.com/dustinlacewell/cells-hs
01:08:46 <ldlework> It's very "jerky"
01:09:06 <ldlework> It's not the computation going on either, because I can kick it up to 1000 ticks a frame and it keeps up just fine
01:09:16 <ldlework> It's like the rendering itself is very jerky / not vsynced
01:10:57 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
01:12:00 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:12:50 × vysn quits (~vysn@user/vysn) (Ping timeout: 260 seconds)
01:13:07 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:13:09 <Axman6> mrianbloom: it looks relatively easy to run an Acc a expression with either backend, what issues are you running into?
01:13:30 <awpr> from a cursory look I think its memory usage will grow unbounded and make GCs take progressively longer over time as there's more live data on the heap to look through
01:13:40 <awpr> (ldlework)
01:14:23 <ldlework> awpr: i'm not sure what to do about that, since you need to generate new rows of cells as the simulation evolves, etc
01:14:27 <mrianbloom> Axman6: I think in early debugging sessions I maybe convinced myself that aliasing PTX.runN was somehow problematic. Now I'm thinking that's a false negative.
01:14:49 <awpr> can old rows be deleted as they get very old?
01:15:00 <ldlework> awpr: yeah
01:15:07 <ldlework> i don't even keep them in the World structure
01:15:10 <Axman6> mrianbloom: yeah worth exploring further I think
01:15:13 × xff0x quits (~xff0x@2001:1a81:522c:4300:5ee7:ef88:cf65:a085) (Ping timeout: 252 seconds)
01:15:31 <Axman6> ldlework: looks like you're reinvention a lot of Data.Bits btw
01:15:40 <ldlework> yeah? lol
01:15:51 <Axman6> reinventing*
01:15:55 <awpr> oh, I missed that appendRow trims it to a bounded length
01:16:08 × asivitz quits (uid178348@id-178348.tinside.irccloud.com) (Quit: Connection closed for inactivity)
01:16:20 <ldlework> If I increase the resolution of a the sim a lot, it starts off fast, then gets slow after about 2 seconds, then starts to chug
01:16:22 <awpr> could store rows as Integer or Word64 depending on size, to have 1 allocation per row instead of 2n
01:16:47 xff0x joins (~xff0x@2001:1a81:526d:1c00:a4aa:2b9e:15c4:9931)
01:16:55 <awpr> well, Integer would be like n/64 rather than 1, but still
01:17:03 <ldlework> awpr: maybe I should pregenerate every possible row ;P
01:17:59 <awpr> if the number of rows is large, you might benefit from Data.Sequence where you can append and uncons in constant time. worse constant factors, though, so it may or may not help
01:18:02 <ldlework> storing rows directly as numbers will complicate make having the row size be flexible I think
01:18:14 <Cajun> are you trying to strictly stay with Lists or are you willing to use an array library for a more efficient (and simpler) implementation?
01:18:20 <mrianbloom> Axman6: I think my main question is how to make it a compile time option without modifying any code.
01:18:33 <ldlework> Cajun: not at all, I'm open to optimizations that I can still understand
01:18:38 <awpr> Integer is an unbounded number of bits, and you can use testBit to access each one
01:18:39 <Cajun> doing this with `massiv` and stencils
01:18:47 <Cajun> *would be not too complicated
01:18:54 <mrianbloom> Axman6: as in a user of my library can decide.
01:20:01 <Axman6> hmm, so do you only want to compile in one backend and have a flag which decides which?
01:20:04 <ldlework> Would another option be to parallize it?
01:20:10 <ldlework> Like split the row in half
01:20:27 <awpr> I'd check out how much memory it's using and how much time it's spending in GC first. if you have GC pauses, parallelizing work might not fix it
01:20:49 <Cajun> massiv could parallelize it automatically, removes all the issues that updating a state in parallel has. it shouldnt be necessary to use massiv though
01:20:49 <Axman6> You'll just make garbage faster!
01:20:52 <mrianbloom> Axman6: That's correct.
01:20:52 <ldlework> haha
01:21:08 <awpr> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/runtime_control.html#rts-options-to-produce-runtime-statistics
01:21:47 <Axman6> mrianbloom: what are you exposing to the user? are you exposing Acc things or functions which are supposed to use accelerate behind the scenes?
01:22:23 <mrianbloom> I'm exposing functions on Array representations.
01:23:01 <mrianbloom> Axman6: So definitely behind the scenes accelerate.
01:23:02 <Axman6> So wouldn't it be up to the user to decide how to execute those functions and make the necessary decisions in their code?
01:23:05 <Axman6> ah ok
01:23:46 <mrianbloom> Axman6: I mean none of the exposed functions have Acc in the type signatures.
01:23:47 <Axman6> Well, usually this is the sort of thing you would do with a combination of cabal flags and some CPP
01:24:08 <Axman6> as that's the only way to dynamically add dependencies
01:24:16 <Axman6> "dynamically" at compile time
01:24:36 sneedsfeed joins (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com)
01:24:37 <mrianbloom> Axman6: Ok cool, that's good confirmation. I was thinking there might be another way besides cpp.
01:25:30 <geekosaur> backpack?
01:29:06 neurocyte6 joins (~neurocyte@185.117.68.241)
01:29:06 × neurocyte6 quits (~neurocyte@185.117.68.241) (Changing host)
01:29:06 neurocyte6 joins (~neurocyte@user/neurocyte)
01:31:11 × neurocyte quits (~neurocyte@user/neurocyte) (Ping timeout: 268 seconds)
01:31:11 neurocyte6 is now known as neurocyte
01:36:16 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
01:37:27 <ldlework> OK made the Data.Bits refactor, https://github.com/dustinlacewell/cells-hs/blob/master/app/Main.hs#L45
01:37:29 <ldlework> thanks for that tip
01:38:22 <ldlework> I'm more uncertain about my ability to use massiv
01:40:39 <zzz> now im worried
01:41:30 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
01:42:30 <awpr> ldlework: I'd try running with `+RTS -s -RTS` to see how much time it's spending on GC first; there's more info in the link I sent
01:42:55 <awpr> best to know what it's spending time on before trying to speed up any particular thing
01:43:10 roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:d11a:2286:b23f:5e4c)
01:43:12 <ldlework> awpr: I use nix, and no idea how it's build infrastructure works really
01:43:19 <ldlework> So I'm not sure how I would add those flags :(
01:43:24 <awpr> those are flags to the compiled binary itself
01:43:29 <ldlework> oh weird
01:44:02 <awpr> the GHC runtime has its own set of flags that are magically in every binary, if enabled. you might have to enable it explicitly, though
01:45:28 favonia joins (~favonia@user/favonia)
01:45:38 <ldlework> awpr: https://gist.github.com/dustinlacewell/466cd9c9bbf58290ef3cf8470521bca2
01:46:13 <awpr> wow, 0% of time in GC, was not expecting that
01:46:39 <ldlework> awpr: are you able to run the project
01:46:52 <ldlework> i wonder if it's just me?
01:47:01 <ldlework> screwy linux, not using gpu or something?
01:48:19 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
01:50:06 × abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Client Quit)
01:51:19 brainfreeze joins (~brainfree@2a03:1b20:4:f011::20d)
01:51:56 brettgilio joins (~brettgili@x-node.gq)
01:53:16 <awpr> still building, but the list indexing looks like it'll be pretty slow -- every cell will traverse the row 3 times
01:54:57 <awpr> switching to Vector Bool might speed it up a lot, since it's constant-time access
01:57:12 <awpr> could also build and run it with profiling enabled, if you can figure out how to do that with nix (I haven't used it myself, but it's not terribly hard to profile under Stack)
01:57:29 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fcfd:5153:b61b:fe3d) (Remote host closed the connection)
01:58:43 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds)
01:59:05 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fcfd:5153:b61b:fe3d)
02:00:25 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fcfd:5153:b61b:fe3d) (Remote host closed the connection)
02:00:34 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fcfd:5153:b61b:fe3d)
02:02:12 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
02:02:27 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
02:03:25 × sneedsfeed quits (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) (Ping timeout: 256 seconds)
02:04:28 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
02:09:15 proofofkeags_ joins (~proofofke@97-118-134-2.hlrn.qwest.net)
02:09:27 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
02:10:54 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
02:11:24 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
02:13:09 geekosaur joins (~geekosaur@xmonad/geekosaur)
02:14:58 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Ping timeout: 268 seconds)
02:16:11 <awpr> looks like all the time is going to OpenGL functions, especially matrix stack manipulation
02:17:12 goepsilongo joins (~chacho@2603-7000-ab00-62ed-0000-0000-0000-0bd0.res6.spectrum.com)
02:19:22 × alx741 quits (~alx741@181.196.68.49) (Quit: alx741)
02:21:14 <ldlework> awpr: maybe it is the way I reset the transform for each cell?
02:21:26 <ldlework> i wonder why that would cause it to slow down over time though
02:21:45 <awpr> that sure sounds consistent with the profile. I didn't run it for very long, though
02:22:01 × td_ quits (~td@muedsl-82-207-238-063.citykom.de) (Ping timeout: 265 seconds)
02:23:44 td_ joins (~td@muedsl-82-207-238-006.citykom.de)
02:24:20 orion joins (~orion@user/orion)
02:25:02 × ridcully_ quits (~ridcully@p508ac428.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
02:27:05 ridcully_ joins (~ridcully@p57b523cc.dip0.t-ipconnect.de)
02:27:32 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
02:28:36 jpds joins (~jpds@gateway/tor-sasl/jpds)
02:33:30 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 276 seconds)
02:33:51 <ldlework> awpr: https://i.imgur.com/rRVPkZ6.png
02:35:27 <awpr> odd, I didn't notice any space-leaky behavior when I ran it. do you have optimizations on?
02:36:18 <ldlework> awpr: i just added -O2 yeah
02:36:28 <ldlework> just throwing stuff at the wall lol
02:37:48 <ldlework> awpr: when I run it for longer, it looks like the memory flattens out
02:37:49 <ldlework> http://logos.ldlework.com/caps/2021-09-16-02-37-35.png
02:37:53 <awpr> my binary seems to be constant memory. it might ramp up until the row limit is reached and then plateau, does that heap profile cover after that part?
02:37:55 <ldlework> the curve is probably filling up the grid with rows
02:37:56 <awpr> yeah, what you just said
02:38:01 greg8128 joins (~user@50.47.115.102)
02:38:19 <ldlework> I also increased the resolution by a lot to make the effect more dramatic
02:39:14 <ldlework> these stand out https://gist.github.com/dustinlacewell/135cf3906f0fb036e2048558cadb14f4
02:39:54 <awpr> the rightmost 4 columns seem to say very little time or allocation is spent on them
02:42:22 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
02:45:25 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 252 seconds)
02:45:42 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
02:48:04 <ldlework> awpr: `neighborhood` is the most expensive function of my own authorship, with 4.4 individual %
02:48:13 <ldlework> doesn't that indicate that stenciling might help?
02:48:22 sneedsfeed joins (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com)
02:49:06 <ldlework> beyond that, my only guess is the wasteful transforms
02:49:18 <awpr> well it was running at 2-3fps on my machine, so making that function infinitely faster isn't gonna bring it up to 60. the time is going to the rendering much more than the world update (as much as I initially expected it to go to list indexing or GC)
02:49:18 <ldlework> need haskell->GLSL
02:49:51 <awpr> if matrix stack manipulation is expensive, try to do less of it
02:50:14 <ldlework> I guess my drawing routine will have to be smarter somehow
02:50:39 ph88^ joins (~ph88@2a02:8109:9e00:7e5c:c17a:3fe0:849c:9e0a)
02:50:39 <ldlework> the reason i'm translating to origin for each cell that's drawn, is so that i don't have to draw each cell
02:50:40 <awpr> my vague recollection is that the matrix stack is meant for, like, loading an entire mesh under a transform, not so much to be the entire means of getting positions for every vertex
02:50:49 jokleinn joins (~jokleinn@user/jokleinn)
02:50:52 <ldlework> to avoid the transforms, i'd have to like go cell by cell
02:51:01 <ldlework> which seems like it would mean even more transforms
02:51:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:51:42 <awpr> I don't really know how gloss does things unfortunately. the code looked sensible, but somehow it's changing the matrix stack a whole lot
02:51:55 <ldlework> awpr: indeed the API for Gloss wants you to transform somewhere, then use some kind of primitive like a square of a certain size
02:51:59 <ldlework> the square doesn't take a position
02:52:32 <awpr> is it possible this is just pushing the limits of the number of individual things Gloss can deal with? I'm not really familiar with the library
02:52:59 <ldlework> awpr: I believe it is using the old-style OpenGL pipeline
02:53:06 hyiltiz joins (~quassel@31.220.5.250)
02:53:08 <awpr> yeah, it is
02:53:39 <awpr> profile mentioned the function that pushes a singular vertex into the stream
02:54:26 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:c17a:3fe0:849c:9e0a) (Ping timeout: 268 seconds)
02:55:33 × orion quits (~orion@user/orion) (Read error: Connection reset by peer)
02:56:01 <ldlework> I assume it would be no faster switching to hSDL
02:56:03 <ldlework> hmm
02:56:16 <ldlework> I could just move on with my life I guess
02:58:18 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 260 seconds)
02:58:49 <awpr> it doesn't really look very aggressively performance optimized; this might just be how fast it goes with lots of tiny rectangles
02:59:32 chexum joins (~quassel@gateway/tor-sasl/chexum)
03:00:07 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
03:02:03 <awpr> https://www.47deg.com/blog/game-of-life-haskell/ has someone doing a similar thing, and the end result is "hooray, we improved it from 2 iterations before crashing to 60 iterations before crashing", so it looks like yours is already ahead of the curve
03:03:26 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 260 seconds)
03:04:40 × goepsilongo quits (~chacho@2603-7000-ab00-62ed-0000-0000-0000-0bd0.res6.spectrum.com) (Quit: Konversation terminated!)
03:07:49 × doyougnu quits (~user@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 252 seconds)
03:13:17 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
03:15:46 × zaquest quits (~notzaques@5.128.210.178) (Remote host closed the connection)
03:17:12 zaquest joins (~notzaques@5.128.210.178)
03:20:38 <Cajun> Idlework: if you want to learn `massiv` (which i highly recommend as an upgrade to `repa` and a good cpu-bound upgrade to `accelerate` ) he has a 6 part talk from 2019 about the library. its quite long, around 6 hours but itll tell you the ins and outs of the library
03:21:02 <ldlework> phew
03:21:05 <ldlework> hit me I guess
03:21:31 <Cajun> heres 1/6: https://www.youtube.com/watch?v=euEacUD6jQQ
03:21:35 <ldlework> thanks
03:23:15 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
03:23:16 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
03:23:16 wroathe joins (~wroathe@user/wroathe)
03:25:49 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
03:29:06 × dtman34 quits (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
03:38:50 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 268 seconds)
03:39:54 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
03:46:36 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 265 seconds)
03:50:10 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2)
03:52:08 falafel joins (~falafel@2603-8000-d800-688c-4852-3b82-73df-20ff.res6.spectrum.com)
03:54:01 dtman34 joins (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net)
03:55:01 notzmv joins (~zmv@user/notzmv)
03:58:25 × dtman34 quits (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net) (Ping timeout: 252 seconds)
04:07:59 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
04:08:19 × jokleinn quits (~jokleinn@user/jokleinn) (Ping timeout: 252 seconds)
04:15:20 × phma quits (~phma@host-67-44-208-97.hnremote.net) (Read error: Connection reset by peer)
04:18:56 phma joins (~phma@host-67-44-208-97.hnremote.net)
04:21:42 hays is now known as h_
04:23:14 texasmynsted parts (~texasmyns@99.96.221.112) (WeeChat 3.1)
04:37:09 lavaman joins (~lavaman@98.38.249.169)
04:40:23 × sneedsfeed quits (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) (Ping timeout: 256 seconds)
04:49:45 × roboguy_ quits (~roboguy_@2605:a601:afe7:9f00:d11a:2286:b23f:5e4c) ()
04:49:45 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:49:58 lavaman joins (~lavaman@98.38.249.169)
04:50:07 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:56:06 × dsrt^ quits (~dsrt@68.101.54.227) (Remote host closed the connection)
05:03:42 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
05:07:14 Vajb joins (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi)
05:07:20 zmt00 joins (~zmt00@user/zmt00)
05:10:43 × zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 268 seconds)
05:10:52 michalz joins (~michalz@185.246.204.61)
05:11:58 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
05:13:07 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
05:14:02 qbt joins (~edun@user/edun)
05:15:26 × myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Read error: Connection reset by peer)
05:15:43 myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net)
05:16:12 dtman34 joins (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net)
05:16:35 gentauro joins (~gentauro@user/gentauro)
05:20:36 lavaman joins (~lavaman@98.38.249.169)
05:20:53 aws joins (~aws@mx1.aosync.me)
05:21:36 sagax joins (~sagax_nb@user/sagax)
05:24:02 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:24:03 × Vajb quits (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
05:25:08 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
05:25:31 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds)
05:26:32 aws parts (~aws@mx1.aosync.me) (Leaving)
05:26:43 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
05:30:05 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
05:30:05 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
05:30:05 wroathe joins (~wroathe@user/wroathe)
05:34:40 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
05:37:25 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
05:37:31 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
05:39:06 × greg8128 quits (~user@50.47.115.102) (Remote host closed the connection)
05:40:20 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:43:07 <Orbstheorem> The more I play with `ViewPatterns`, the more I like them, but I also have to admit, it makes the code look a bit scarier x)
05:52:10 × ellie quits (~ellie@user/ellie) (Quit: The Lounge - https://thelounge.chat)
05:52:24 ellie joins (~ellie@user/ellie)
05:53:47 <c_wraith> You can use them with Pattern Synonyms to make them look much more normal
05:56:07 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
05:57:47 chele joins (~chele@user/chele)
06:00:01 <Orbstheorem> Oh, neat!
06:02:33 × phma quits (~phma@host-67-44-208-97.hnremote.net) (Read error: Connection reset by peer)
06:04:11 × nshepperd quits (nshepperd@2600:3c03::f03c:92ff:fe28:92c9) (Quit: quit)
06:04:11 × nshepperd2 quits (~nshepperd@li364-218.members.linode.com) (Quit: The Lounge - https://thelounge.chat)
06:04:23 phma joins (~phma@host-67-44-208-97.hnremote.net)
06:05:57 × brainfreeze quits (~brainfree@2a03:1b20:4:f011::20d) (Remote host closed the connection)
06:09:50 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
06:10:50 Akronymus joins (~Akronymus@85.31.8.180)
06:12:12 img joins (~img@user/img)
06:13:36 ubert joins (~Thunderbi@178.165.161.81.wireless.dyn.drei.com)
06:14:51 ph88 joins (~ph88@2a02:8109:9e00:7e5c:c17a:3fe0:849c:9e0a)
06:15:40 jakalx parts (~jakalx@base.jakalx.net) ()
06:18:16 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
06:18:20 × ph88^ quits (~ph88@2a02:8109:9e00:7e5c:c17a:3fe0:849c:9e0a) (Ping timeout: 268 seconds)
06:19:03 lavaman joins (~lavaman@98.38.249.169)
06:23:10 × falafel quits (~falafel@2603-8000-d800-688c-4852-3b82-73df-20ff.res6.spectrum.com) (Ping timeout: 260 seconds)
06:23:17 nshepperd2 joins (~nshepperd@li364-218.members.linode.com)
06:23:20 nshepperd joins (nshepperd@2600:3c03::f03c:92ff:fe28:92c9)
06:23:40 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
06:27:10 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 240 seconds)
06:30:01 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Quit: WeeChat 3.1)
06:31:41 falafel joins (~falafel@2603-8000-d800-688c-753f-04f5-7eeb-6eb7.res6.spectrum.com)
06:31:50 × nattiestnate quits (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) (Quit: WeeChat 3.2)
06:33:31 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
06:33:41 ubert1 joins (~Thunderbi@178.165.161.81.wireless.dyn.drei.com)
06:34:14 pfurla joins (~pfurla@64.145.79.69)
06:35:40 × ubert quits (~Thunderbi@178.165.161.81.wireless.dyn.drei.com) (Ping timeout: 240 seconds)
06:35:40 ubert1 is now known as ubert
06:36:49 × pfurla_ quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 252 seconds)
06:37:18 benin036932301 joins (~benin@183.82.24.197)
06:38:41 × xff0x quits (~xff0x@2001:1a81:526d:1c00:a4aa:2b9e:15c4:9931) (Ping timeout: 268 seconds)
06:39:14 xff0x joins (~xff0x@port-92-195-42-138.dynamic.as20676.net)
06:39:47 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
06:41:27 pfurla_ joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
06:43:08 × myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Read error: Connection reset by peer)
06:44:28 × pfurla quits (~pfurla@64.145.79.69) (Ping timeout: 265 seconds)
06:45:24 × falafel quits (~falafel@2603-8000-d800-688c-753f-04f5-7eeb-6eb7.res6.spectrum.com) (Read error: Connection reset by peer)
06:45:30 falafel_ joins (~falafel@2603-8000-d800-688c-753f-04f5-7eeb-6eb7.res6.spectrum.com)
06:47:56 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 268 seconds)
06:48:15 cfricke joins (~cfricke@user/cfricke)
06:49:16 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
06:49:35 xsperry joins (~as@user/xsperry)
06:49:37 × xsperry quits (~as@user/xsperry) (Excess Flood)
06:50:08 jstolarek joins (~jstolarek@ers4.neoplus.adsl.tpnet.pl)
06:51:15 kuribas joins (~user@ptr-25vy0i96fc65i21clnv.18120a2.ip6.access.telenet.be)
06:52:07 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
06:52:46 × benin036932301 quits (~benin@183.82.24.197) (Ping timeout: 252 seconds)
06:53:05 benin036932301 joins (~benin@183.82.24.197)
06:54:02 falafel__ joins (~falafel@2603-8000-d800-688c-753f-04f5-7eeb-6eb7.res6.spectrum.com)
06:57:14 × falafel_ quits (~falafel@2603-8000-d800-688c-753f-04f5-7eeb-6eb7.res6.spectrum.com) (Ping timeout: 260 seconds)
07:02:31 lavaman joins (~lavaman@98.38.249.169)
07:03:53 jakalx joins (~jakalx@base.jakalx.net)
07:04:08 <kuribas> I got to present my haskell project to the company. Mostly it went well, they where quite interested. They asked me to explain why I think haskell is a good fit for the project.
07:05:32 <kuribas> One example I give was type directed parsing of the CSV, which allows you to easily parse code with good error messages.
07:05:47 <kuribas> Their response "we can do that in lisp, you don't need haskell for that"
07:06:30 <tdammers> I can do that in C, no need for lisp
07:06:30 <kuribas> My claims for robustness where refuted with "those are easy fixes, we don't care".
07:06:55 <kuribas> point is, you "can" do this in lisp/clojure, but nobody does.
07:07:06 <tdammers> case in point, though, CSV parsing is maybe not the most compelling example
07:07:22 <Akronymus> csv's aren't even a good format
07:07:37 <Akronymus> escape character > escaping the range
07:07:43 <kuribas> true, but loading CSVs into the database was the usecase for this project.
07:07:47 <tdammers> technically, CSV isn't even a format at all, there is no standard
07:07:55 <kuribas> and we'll go to .ods
07:08:16 <tdammers> seriously though, CSV data is basically [[String]], so there's not much to be gained in terms of type safety
07:08:49 <Akronymus> But if you have a separator in the data, you have to use "
07:08:52 System123 joins (~System123@net-37-179-171-3.cust.vodafonedsl.it)
07:08:59 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fcfd:5153:b61b:fe3d) (Remote host closed the connection)
07:09:06 <Akronymus> And if you have " in it too, you need to use "" afair
07:09:09 <kuribas> tdammers: you need a parser [String] -> Either err a
07:09:26 <Akronymus> Just let me do \<escape character>
07:09:28 <kuribas> or (Map String String) -> a
07:09:44 <tdammers> what? no
07:09:58 <tdammers> there are only 2 special characters, you can special-case those in code
07:10:34 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
07:10:37 VoidNoir0 joins (~VoidNoir0@72.80.203.52)
07:12:24 <Akronymus> tdammers `,;.:` all of those are valid for csv afair
07:12:29 <kuribas> tdammers: but parsing a record is still better than taking a list with clojure types, and getting a stacktrace when the types don't match later.
07:12:37 <Akronymus> Along with quoting
07:13:17 <kuribas> three quotes, no?
07:13:28 <kuribas> "abc" => """abc"""
07:15:05 <kuribas> Another point was that all my queries worked the first time, and the type system even caught something that could be a subtle bug...
07:15:43 <kuribas> Their response that it's hard to write such code, and those kind of errors are easy to fix.
07:15:50 <DigitalKiwi> o/ ldlework
07:15:57 <kuribas> Both of which statements I disagree with.
07:16:22 <kuribas> 1) it's not that hard when you know what you do 2) Some of those bugs can be tricky to find.
07:16:22 <ldlework> yo yo
07:17:11 <awpr> kuribas: I haven't had much luck convincing people with those sorts of obviously different values that there's any value to Haskell. I've had better luck looking for people with the same values as me to begin with
07:17:27 <kuribas> awpr: makes sense.
07:18:03 mousey joins (~sky@gateway/tor-sasl/mousey)
07:18:22 <awpr> but if you have unlimited effort to convince people and manage to succeed, that's awesome
07:18:31 <Akronymus> kuribas also: the bugs can make quite expensive problems even if they are easy to fix
07:19:04 <kuribas> the sad thing is most of the developers where quite interested, only the two leads where giving me a hard time.
07:19:18 <kuribas> trying as hard as possible to refute any of my arguments.
07:19:21 <Akronymus> If they want lisp, implement haskell as a DSL? /s
07:19:26 <awpr> guerilla Haskell team!
07:19:30 <Akronymus> On top of lisp
07:20:03 <Akronymus> kuribas was it a thesis defense or something?
07:20:10 vaucouleur joins (~vaucouleu@78.194.70.105)
07:20:16 <kuribas> Akronymus: nah, a project I am doing in the company.
07:20:30 <kuribas> It felt a bit like that yeah...
07:21:21 <tdammers> kuribas: how can the types not match? It's all just strings. Converting those to "proper" types is something you'd do later, when you map the list-of-string CSV rows to more meaningful record types.
07:21:34 <tdammers> I wouldn't call that "parsing"
07:21:39 <Akronymus> Numbers?
07:21:56 <kuribas> tdammers: I mean, the "later" is what I am talking about.
07:22:15 <kuribas> tdammers: not the library code that takes a ByteString and returns a [[String]]
07:22:24 <tdammers> OK
07:23:11 <kuribas> anyway, the project is still ongoing, so if it works well and is very stable, I'll have proven my point :)
07:23:32 <kuribas> then they'll rewrite it in clojure...
07:23:56 max22- joins (~maxime@2a01cb088335980073df05503d80cbee.ipv6.abo.wanadoo.fr)
07:24:02 falafel_ joins (~falafel@2603-8000-d800-688c-753f-04f5-7eeb-6eb7.res6.spectrum.com)
07:24:49 <tdammers> So you need to make the conversion explicit, and you have to somehow fail if the conversion is invalid. That goes for both Haskell and Clojure: in both cases, if the data is malformed, you have to throw (or return Nothing, or a Left Error, or however you decide to signal it) - malformed data is always going to cause a runtime error, not compile-time
07:24:56 <kuribas> awpr: you're right, but otherwise I like the values of the company, working in renewables etc...
07:25:05 <tdammers> so the "exception throwing" argument is a strawman
07:25:12 <tdammers> Haskell's advantage is more subtle
07:25:16 <dminuoso> Unless you unsafePerformIO in TemplateHaskell and load the file then, tdammers!
07:25:23 <dminuoso> Oh wait, dont even need unsafePerformIO.
07:25:24 <kuribas> tdammers: I am also not throwing, I collect the errors using Validation.
07:25:37 <tdammers> dminuoso: indeed, there's runIO :: IO a -> Q a
07:25:48 <tdammers> kuribas: you can do the same in clojure though
07:26:04 <tdammers> kuribas: hence the "or however you want to signal it" part
07:26:35 <kuribas> tdammers: you can do anything in any language which is turing complete.
07:26:37 <tdammers> kuribas: the advantage that Haskell brings is that once you've done the conversion, the type system can make sure, statically, that from that point onwards, your data is valid as per the type
07:26:52 <kuribas> indeed, I made that point.
07:27:37 × falafel__ quits (~falafel@2603-8000-d800-688c-753f-04f5-7eeb-6eb7.res6.spectrum.com) (Ping timeout: 268 seconds)
07:28:20 <kuribas> IMO, it's not just about what the language can do, but also the idiomatic way to do things.
07:29:07 <kuribas> Because in practice, people in clojure simply don't start from a single "type definition", which they use to verify the types, etc...
07:29:24 <kuribas> Being more rigorous is *possible* in clojure, but most of the time not done.
07:29:48 <kuribas> The honeysql libary for example *should* validate the arguments, so the generated SQL is valid, but it doesn't.
07:30:20 <tdammers> it's all about ergonomics and meatware performance
07:30:37 <tdammers> (which is also why the Turing Completeness argument is utter bullshit)
07:30:45 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:30:47 <kuribas> Even if the query generator is correct, some error in an unrelated part can cause the generation of an invalid query, or even a valid but simply wrong query.
07:31:12 <tdammers> yup. welcome to the crazy world of the Consenting Adults Fallacy
07:31:20 <kuribas> what's that?
07:33:10 × falafel_ quits (~falafel@2603-8000-d800-688c-753f-04f5-7eeb-6eb7.res6.spectrum.com) (Ping timeout: 260 seconds)
07:35:49 × bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
07:41:08 lavaman joins (~lavaman@98.38.249.169)
07:43:14 <tdammers> a thing from the Python community, where they reject features like proper module systems, type systems, controllable mutability, etc., saying that "we're all consenting adults here, we don't need to police each other", which is of course not what any of those features are about, but the sentiments runs quite strong - not just in the Python community, but in pretty much any dynamic language
07:43:23 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:43:43 <tdammers> it's kind of a gross overestimation of the reliability and feasibility of manual diligence
07:44:16 <tdammers> "without a type checker, how can I make sure that nobody passes the wrong arguments to this function?" - "well, duh, just don't pass the wrong arguments, ezpz"
07:44:42 <kuribas> yeah, in our place it's called "garbage in - garbage out".
07:45:51 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds)
07:46:04 <Drew[m]> "I have an excellent and flawless plan. All it requires is to get everyone everywhere to alter their behavior."
07:48:09 <kuribas> How am I suppose to know what is garbage in a function I didn't write, or write a year ago, and which has no type signature...
07:48:21 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
07:49:17 <tdammers> easy: just read the code :P
07:49:52 <dminuoso> 09:26:37 tdammers | kuribas: the advantage that Haskell brings is that once you've done the conversion, the type system can make sure, statically, that from that point onwards, your data is valid as per the type
07:50:16 <dminuoso> Having seen a talk by Richard Hickey, Im nearly convinced that your averge clojure fan will not care about that in the slightest.
07:50:56 <kuribas> yeah
07:51:00 <tdammers> having written clojure professionally for a year and a half, I'm gonna say you're probably right
07:51:48 ph88^ joins (~ph88@2a02:8109:9e00:7e5c:c17a:3fe0:849c:9e0a)
07:52:22 × hnOsmium0001 quits (uid453710@id-453710.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
07:55:09 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:c17a:3fe0:849c:9e0a) (Ping timeout: 268 seconds)
07:59:45 System12_ joins (~System123@ec2-52-61-197-79.us-gov-west-1.compute.amazonaws.com)
08:03:10 × System123 quits (~System123@net-37-179-171-3.cust.vodafonedsl.it) (Ping timeout: 252 seconds)
08:03:14 hendursa1 joins (~weechat@user/hendursaga)
08:04:21 × mousey quits (~sky@gateway/tor-sasl/mousey) (Ping timeout: 276 seconds)
08:05:45 dexterfoo joins (dexter@2a01:7e00::f03c:91ff:fe86:59ec)
08:06:00 hendursa2 joins (~weechat@user/hendursaga)
08:06:18 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds)
08:09:09 Gurkenglas joins (~Gurkengla@dslb-002-207-014-195.002.207.pools.vodafone-ip.de)
08:09:24 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fcfd:5153:b61b:fe3d)
08:09:33 × hendursa1 quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds)
08:13:51 nschoe joins (~quassel@2a04:cec0:11d0:a38e:f051:be01:a43f:d5b6)
08:14:28 mc47 joins (~mc47@xmonad/TheMC47)
08:15:06 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fcfd:5153:b61b:fe3d) (Ping timeout: 268 seconds)
08:15:49 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
08:16:07 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 268 seconds)
08:17:02 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
08:17:45 allbery_b joins (~geekosaur@xmonad/geekosaur)
08:17:45 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
08:17:48 allbery_b is now known as geekosaur
08:17:56 hyiltiz joins (~quassel@31.220.5.250)
08:21:09 × max22- quits (~maxime@2a01cb088335980073df05503d80cbee.ipv6.abo.wanadoo.fr) (Quit: Leaving)
08:23:33 × theang quits (~theang@fef109.internetdsl.tpnet.pl) (Ping timeout: 265 seconds)
08:24:54 theang joins (~theang@2a00:f41:58f0:244b:4742:c02a:6877:e413)
08:26:43 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
08:30:55 × benin036932301 quits (~benin@183.82.24.197) (Ping timeout: 268 seconds)
08:31:25 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c18a:e65c:d93c:bac0)
08:32:57 eggplant_ joins (~Eggplanta@2600:1700:bef1:5e10:65ff:a34c:5e53:2b94)
08:33:22 × System12_ quits (~System123@ec2-52-61-197-79.us-gov-west-1.compute.amazonaws.com) (Ping timeout: 260 seconds)
08:33:39 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
08:34:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
08:34:59 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
08:35:00 chele_ joins (~chele@user/chele)
08:35:09 × chele quits (~chele@user/chele) (Ping timeout: 265 seconds)
08:36:28 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c18a:e65c:d93c:bac0) (Ping timeout: 268 seconds)
08:36:54 × chele_ quits (~chele@user/chele) (Remote host closed the connection)
08:37:55 × eggplant_ quits (~Eggplanta@2600:1700:bef1:5e10:65ff:a34c:5e53:2b94) (Ping timeout: 268 seconds)
08:42:08 × azeem quits (~azeem@2a00:801:23a:d5ca:5e0:54f5:67cf:d7dc) (Read error: Connection reset by peer)
08:45:46 azeem joins (~azeem@emp-91-123.eduroam.uu.se)
08:46:40 mateusz joins (~mateusz@83.0.46.72.internetdsl.tpnet.pl)
08:46:42 <ldlework>
08:46:51 <ldlework> I just got hylide working and i'm kind of excited
08:47:35 __monty__ joins (~toonn@user/toonn)
08:54:11 System123 joins (~System123@net-37-179-171-3.cust.vodafonedsl.it)
08:56:00 <mateusz> Hi! I want to understand deeper why `untest` function cannot compile due to type error. The question is what should I look for in order to understand that? data Test = X Int | Y String deriving Show
08:56:01 <mateusz> untest val = case val of ; X i -> i ; Y s -> s
08:57:13 <__monty__> mateusz: The first step is really reading the type error.
08:57:19 <__monty__> @where paste
08:57:19 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
08:57:33 <__monty__> Output includes the errors : )
08:58:41 Guest2294 joins (~neo3@cpe-292712.ip.primehome.com)
08:58:48 <dminuoso> mateusz: The only way to write something as generic as that, is with GADTs.
08:58:49 Guest2294 is now known as neo1
08:59:02 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 260 seconds)
08:59:10 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
08:59:19 × System123 quits (~System123@net-37-179-171-3.cust.vodafonedsl.it) (Ping timeout: 265 seconds)
08:59:24 <mateusz> So error says like types don't match, and its probably due to type inference but I wonder if there is any way in standard Haskell (without extensions) to manually annotate that https://paste.tomsmeding.com/2aHWTmAo
08:59:37 <dminuoso> The thing is
08:59:45 <dminuoso> What do you expect the return type of that function?
09:00:58 <mateusz> What I can't understand is that if I annotate this as: `Test -> a` it doesnt work, I would expect type to be a, and based on expression either Int or String
09:01:11 <dminuoso> You can do this with GADTs.
09:01:17 <dminuoso> % data Test a where X :: Int -> Test Int; Y :: String -> Test String
09:01:18 <yahb> dminuoso:
09:01:28 <dminuoso> % untest val = case val of; X i -> i; Y s -> s
09:01:28 <yahb> dminuoso: ; <interactive>:24:34: error:; * Couldn't match expected type `p' with actual type `Int'; `p' is untouchable inside the constraints: a ~ Int bound by a pattern with constructor: X :: Int -> Test Int, in a case alternative at <interactive>:24:27-29; `p' is a rigid type variable bound by; the inferred type of untest :: Test a -> p; at <interactive>:24:1-44; Possible
09:01:37 <dminuoso> Hold on
09:02:14 <__monty__> mateusz: But if the return type were 'a' then someone calling the function would get to choose the type. How can your function return a value of any type it is asked for starting from a Test?
09:02:24 <mateusz> thanks, will look into that later but I think I should understand why it throws error before I dive into GADTs, any resource or search keyword which might help in it?
09:02:39 <dminuoso> % untest :: Test a -> a; untest val = case val of; X i -> i; Y s -> s
09:02:39 <yahb> dminuoso:
09:02:42 <dminuoso> mateusz: ^- there.
09:03:00 <kuribas> mateusz: the idiomatic way is to return a sumtype.
09:03:08 <awpr> a) can't infer stuff across GADT constructor matches, but b) I doubt GADTs are the most helpful answer here, this seems like a case of missing some key aspects of type checking
09:03:14 <dminuoso> mateusz: Your expectation is *exactly* what GADTs fill. :)
09:03:28 <kuribas> or just go to idris :)
09:03:34 <dminuoso> Then you can annotate it as `Test a -> a` exactly.
09:03:52 <dminuoso> GADTs are a very intuitive and almost obvious conclusion of ADTs, really.
09:04:10 × hpc quits (~juzz@ip98-169-35-13.dc.dc.cox.net) (Ping timeout: 260 seconds)
09:04:40 <dminuoso> mateusz: So part of the reason without GADTs is the way that type variables work. A type variable is something the caller/consumer must chose.
09:04:48 <awpr> sure, but they're probably not the next step after "why doesn't this function work as `forall a. Test -> a`?"
09:04:56 <dminuoso> Let's for the same of argument argue that you coudl write it as:
09:05:03 <dminuoso> untest :: Test -> a; untest = ...
09:05:16 <dminuoso> That means, the *consumer* of untest can pick an arbitrary type for `a`
09:05:22 × sim590 quits (~simon@modemcable090.207-203-24.mc.videotron.ca) (Ping timeout: 252 seconds)
09:05:27 <dminuoso> Irrespective of what the value of Test is.
09:05:34 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 260 seconds)
09:06:08 <dminuoso> So you coudl write something like:
09:06:18 <kuribas> the cps version is still "simple" haskell, the GADT is not.
09:06:20 <dminuoso> `untest (Y "String") :: Float`
09:06:26 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
09:06:54 <dminuoso> Which is of course non-sense.
09:07:45 <mateusz> ok so the question is where from comes the constaint of not typing this union like: `Test -> [Int|String]`? Is it from system f?
09:08:05 <mateusz> kuribas what you mean by cps?
09:08:11 <kuribas> mateusz: Continuation passing style
09:08:25 <kuribas> mateusz: That would be "Text -> Either Int String"
09:08:32 <__monty__> mateusz: It's because that would mean the caller gets to pick whether the return type is Int or String *regardless* of what the input Test value is.
09:09:06 chris joins (~chris@81.96.113.213)
09:09:09 chris is now known as Guest240
09:09:19 <kuribas> mateusz: untest :: Text -> (Int -> a) -> (String -> a) -> a
09:09:19 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
09:09:23 hpc joins (~juzz@ip98-169-35-13.dc.dc.cox.net)
09:09:29 <__monty__> kuribas: Test, not Text.
09:09:48 <kuribas> __monty__: yeah. Muscle memory
09:11:58 max22- joins (~maxime@2a01cb08833598004808c986d8fd0bff.ipv6.abo.wanadoo.fr)
09:12:00 <awpr> wow, QuickCheck discovered the Haskell `\&` syntax all on its own and showed me a bug regarding it
09:12:09 × Guest240 quits (~chris@81.96.113.213) (Remote host closed the connection)
09:12:19 × nschoe quits (~quassel@2a04:cec0:11d0:a38e:f051:be01:a43f:d5b6) (Remote host closed the connection)
09:12:22 <mateusz> kuribas i don't get this example, why two additional args?
09:12:33 <kuribas> mateusz: one for each case
09:13:13 <kuribas> mateusz: but note that untest doesn't do anything useful.
09:13:16 <mateusz> hmm this example shows how to make polymorphic a possible with untest function?
09:13:32 nschoe joins (~quassel@2a04:cec0:11d0:a38e:b326:412:811:9d36)
09:13:33 <mateusz> polymorphic `a`
09:13:40 × pounce quits (~pounce@facebook/engineering/pounce) (Ping timeout: 240 seconds)
09:13:50 <kuribas> mateusz: no, `a` is the return type of the continuation.
09:14:13 <kuribas> see for example the either function
09:14:14 <kuribas> :t either
09:14:15 <lambdabot> (a -> c) -> (b -> c) -> Either a b -> c
09:14:52 <kuribas> it's case matching on each case.
09:15:01 <kuribas> And you get a different continuation for each.
09:15:19 <mateusz> why different if both return `c`?
09:15:45 <mateusz> I cant handle differently way from a/b to c
09:15:48 <kuribas> > either show id $ (Left 2 :: Either Int String)
09:15:50 <lambdabot> "2"
09:16:01 <kuribas> > either show id $ (Right "2" :: Either Int String)
09:16:03 <lambdabot> "2"
09:16:52 <kuribas> mateusz: but note that normally you just pattern match. either just makes the code a bit shorter.
09:17:33 <kuribas> > case (Left 2 :: Either Int String) of Left i -> show i; Right s -> s
09:17:35 <lambdabot> "2"
09:18:16 <kuribas> mateusz: you have to handle them differently, since they have different types.
09:19:01 <__monty__> mateusz: Inference example, `\x -> toUpper (id x) :: Char -> Char`, what is the inferred type of `id` here?
09:19:17 pounce joins (~pounce@facebook/engineering/pounce)
09:20:02 × ishutin_ quits (~ishutin@87-97-12-212.pool.digikabel.hu) (Ping timeout: 260 seconds)
09:20:40 <mateusz> __monty__ Char?
09:21:02 <__monty__> No, id is a function, so the type has to have an `->`.
09:21:24 ishutin joins (~ishutin@80-95-82-223.pool.digikabel.hu)
09:21:26 <mateusz> :D i meant `Char->Char` because its derived from lambda annotation
09:21:47 <__monty__> And do you see where that Char is coming from?
09:22:13 <__monty__> You're inferring it from the *output* side a in `a -> a`, right? Not the input side?
09:22:15 × max22- quits (~maxime@2a01cb08833598004808c986d8fd0bff.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
09:22:18 <mateusz> I think yes, `x` can be Char exclusively so id has to return Char
09:22:37 <mateusz> I inferred from input
09:22:41 <__monty__> How do you know x can only be Char?
09:22:43 <mateusz> input to lambda
09:22:51 <__monty__> Ah, crap.
09:22:54 <mateusz> from the annotation for lambda: `Char->Char`
09:22:58 <__monty__> Shouldn't have put a signature on it >.<
09:23:03 max22- joins (~maxime@2a01cb0883359800c203f4e20803de91.ipv6.abo.wanadoo.fr)
09:23:19 <__monty__> Let's just pretend I gave you `toUpper . id`.
09:24:50 <__monty__> Do you see how the inference for the type of id would be the same even though you have no information about the type of the input?
09:25:36 <mateusz> given that toUpper is `Char->Char` and id `a->a`, contraint comes from toUpper which expect `Char` as input so i think it would be `Char->Char`
09:25:46 <__monty__> Exactly.
09:25:56 <__monty__> How about `toUpper . untest`?
09:26:00 <mateusz> Are there any priorities in inference rules?
09:26:06 <mateusz> wow give me sec
09:28:11 System123 joins (~System123@net-37-179-171-3.cust.vodafonedsl.it)
09:31:14 <mateusz> consider `toUpper :: Text->Text`, OverloadedStrings, I can't pick untest implementation which dosnt raise type error
09:31:28 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
09:32:03 <mateusz> or will define untestY as function which returns always Text, so it matches
09:32:33 <mateusz> __monty__
09:34:39 × hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
09:34:47 <__monty__> mateusz: Let's take `Data.Char.toUpper . untest`. OverloadedStrings is only complicating matters.
09:35:46 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
09:35:46 <mateusz> so not sure which implementation of untest you picked, the one I proposed (`Test -> a`) which doesnt compile?
09:35:54 <__monty__> Yeah.
09:36:33 <mateusz> ok, so `Test -> Char` but it doesnt sound right to me becaouse untest may also return Int which is unhandled
09:36:46 <__monty__> No, it's exactly correct.
09:37:02 <__monty__> Do you see how I as a user of your untest function get to constrain the return type?
09:37:38 <__monty__> You seemed to think that as the definer of untest you got to fill in the `a`, but that's not the case.
09:38:04 <__monty__> If you say your function returns `a` it *really* has to be able to return any type.
09:38:41 <mateusz> I think I start to understand that
09:38:49 <__monty__> Just like how when you say a function takes input type `a` it has to actually be able to deal with *any* value I can give it.
09:38:53 Everything parts (~Everythin@37.115.210.35) ()
09:40:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
09:40:49 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
09:41:05 <mateusz> So I wonder if there you know about any formal description of this so I can revise it in moments of doubt?
09:41:13 × nschoe quits (~quassel@2a04:cec0:11d0:a38e:b326:412:811:9d36) (Ping timeout: 268 seconds)
09:41:13 nschoe_ joins (~quassel@178.251.84.79)
09:41:29 xsperry joins (~as@user/xsperry)
09:41:30 × xsperry quits (~as@user/xsperry) (Excess Flood)
09:42:40 × pounce quits (~pounce@facebook/engineering/pounce) (Ping timeout: 240 seconds)
09:43:18 pounce joins (~pounce@facebook/engineering/pounce)
09:43:52 × max22- quits (~maxime@2a01cb0883359800c203f4e20803de91.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
09:44:37 max22- joins (~maxime@2a01cb0883359800326db5d5b924c729.ipv6.abo.wanadoo.fr)
09:47:12 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:6430:ba41:fc15:9c04)
09:47:56 xsperry joins (~as@user/xsperry)
09:48:49 eggplant_ joins (~Eggplanta@2600:1700:bef1:5e10:c461:91fb:5e87:26b7)
09:50:52 <kuribas> mateusz: it's easy to confuse the type variable `a` with a supertype, or Any type. But it really is just a variable, it stands for another type.
09:51:40 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:6430:ba41:fc15:9c04) (Ping timeout: 240 seconds)
09:52:24 <__monty__> Unfortunately I don't have a good reference, it's the kind of thing you internalize and forget where you learned about it, though for me that was here : )
09:52:37 <kuribas> types and programming languages?
09:52:42 × max22- quits (~maxime@2a01cb0883359800326db5d5b924c729.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
09:53:10 × eggplant_ quits (~Eggplanta@2600:1700:bef1:5e10:c461:91fb:5e87:26b7) (Ping timeout: 240 seconds)
09:53:34 <mateusz> thanks all for help, will look into that @kur
09:54:15 × hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection)
09:54:28 max22- joins (~maxime@2a01cb0883359800b93d6fac2a60b640.ipv6.abo.wanadoo.fr)
09:54:46 × max22- quits (~maxime@2a01cb0883359800b93d6fac2a60b640.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
09:55:42 hololeap joins (~hololeap@user/hololeap)
09:57:27 hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de)
09:58:07 chris joins (~chris@81.96.113.213)
09:58:11 chris is now known as Guest5493
09:58:23 <__monty__> Quite a heavy reference for something like this : )
10:00:40 × System123 quits (~System123@net-37-179-171-3.cust.vodafonedsl.it) (Ping timeout: 240 seconds)
10:10:18 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
10:10:51 <kuribas> yeah, a basic haskell course should explain it as well.
10:12:33 max22- joins (~maxime@2a01cb08833598005b81de1e843a31cc.ipv6.abo.wanadoo.fr)
10:16:10 × azeem quits (~azeem@emp-91-123.eduroam.uu.se) (Read error: Connection reset by peer)
10:16:44 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
10:20:27 jacks2 joins (~bc8165b6@217.29.117.252)
10:21:37 <DigitalKiwi> i missed half of that conversation and thought __monty__ said this irc channel was quite a heavy reference not tapl and i think that would be more correct lol
10:21:59 <kuribas> ah right
10:22:18 <DigitalKiwi> at least if i set out to read tapl i could do it in a finite amount of time
10:22:42 <DigitalKiwi> >10 years probably and i'm still reading this channel
10:24:28 chele joins (~chele@user/chele)
10:24:29 <kuribas> this channel good when you are stuck.
10:24:43 <kuribas> But you really should read a book if you are serious with learning.
10:25:03 <DigitalKiwi> is it bad when i am not stuck
10:26:58 thyriaen joins (~thyriaen@dynamic-078-055-122-076.78.55.pool.telefonica.de)
10:27:43 tfeb joins (~tfb@host81-155-127-18.range81-155.btcentralplus.com)
10:28:12 × tfeb quits (~tfb@host81-155-127-18.range81-155.btcentralplus.com) (Read error: Connection reset by peer)
10:32:13 × juhp quits (~juhp@128.106.188.220) (Ping timeout: 252 seconds)
10:32:18 × Guest5493 quits (~chris@81.96.113.213) (Remote host closed the connection)
10:35:03 vysn joins (~vysn@user/vysn)
10:36:23 raehik joins (~raehik@2a00:23c6:4c83:a901:95bf:f7ec:7b7d:c21e)
10:36:50 frisbro joins (uid518331@id-518331.helmsley.irccloud.com)
10:37:48 frisbro_ joins (uid518331@id-518331.helmsley.irccloud.com)
10:49:58 × mateusz quits (~mateusz@83.0.46.72.internetdsl.tpnet.pl) (Quit: Client closed)
10:51:45 × raehik quits (~raehik@2a00:23c6:4c83:a901:95bf:f7ec:7b7d:c21e) (Ping timeout: 260 seconds)
10:53:03 raehik joins (~raehik@2a00:23c6:4c83:a901:95bf:f7ec:7b7d:c21e)
11:00:59 alx741 joins (~alx741@181.196.68.49)
11:03:45 × raehik quits (~raehik@2a00:23c6:4c83:a901:95bf:f7ec:7b7d:c21e) (Quit: WeeChat 3.2)
11:04:34 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 260 seconds)
11:10:18 × neurocyte quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
11:12:40 × gentauro quits (~gentauro@user/gentauro) (Ping timeout: 240 seconds)
11:12:46 × Akronymus quits (~Akronymus@85.31.8.180) (Quit: Client closed)
11:12:58 Akronymus joins (~Akronymus@85.31.8.180)
11:14:22 neurocyte joins (~neurocyte@185.117.68.241)
11:14:22 × neurocyte quits (~neurocyte@185.117.68.241) (Changing host)
11:14:22 neurocyte joins (~neurocyte@user/neurocyte)
11:16:49 jespada joins (~jespada@2803:9800:9842:7a62:e809:3117:30c6:aea3)
11:20:27 × Cajun quits (~Cajun@user/cajun) (Quit: Client closed)
11:20:44 System123 joins (~System123@net-37-179-171-3.cust.vodafonedsl.it)
11:22:29 lavaman joins (~lavaman@98.38.249.169)
11:27:54 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 260 seconds)
11:29:36 gentauro joins (~gentauro@user/gentauro)
11:30:25 burnsidesLlama joins (~burnsides@dhcp168-022.wadham.ox.ac.uk)
11:37:04 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:37:09 × Akronymus quits (~Akronymus@85.31.8.180) (Quit: Client closed)
11:37:14 zer0bitz joins (~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi)
11:37:19 Akronymus joins (~Akronymus@85.31.8.180)
11:40:56 × jacks2 quits (~bc8165b6@217.29.117.252) (Quit: http://www.okay.uz/)
11:41:22 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
11:46:31 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
11:46:33 GuestTHU16_1 joins (~GuestTHU1@219.91.230.26)
11:46:52 <GuestTHU16_1> how can the + operator be prefix
11:47:01 <GuestTHU16_1> like + a b
11:47:11 <sshine> (+) a b
11:47:18 <sshine> > (+) 1 2
11:47:20 <lambdabot> 3
11:47:24 <GuestTHU16_1> ok.
11:47:31 × caubert quits (~caubert@136.244.111.235) (Quit: WeeChat 3.2)
11:48:02 <hpc> and for completeness, if you have a "lettery" identifier you can do a `plus` b
11:48:07 <hpc> to infix it
11:48:42 <_________> what about postfix ?
11:48:52 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 268 seconds)
11:49:06 <sshine> they were never that popular
11:49:40 <GuestTHU16_1> Prelude> 3 `plus` 4
11:49:41 <GuestTHU16_1> <interactive>:32:4: error:
11:49:41 <GuestTHU16_1> Variable not in scope: plus :: Integer -> Integer -> t
11:49:54 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:9052:e8ea:d68a:7809)
11:50:22 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
11:50:30 gehmehgeh joins (~user@user/gehmehgeh)
11:50:49 <sshine> :t (":" `isPrefixOf`)
11:50:50 <lambdabot> [Char] -> Bool
11:51:01 <sshine> not exactly postfix, but sort of.
11:51:14 <geekosaur> there's an extension for "postfix" that is pretty limited
11:51:58 <sshine> yeah, I went looking for it, and the first page of search results wasn't even that useful, so I'm guessing people have stopped using it.
11:52:04 <geekosaur> https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/rebindable_syntax.html#postfix-operators
11:52:25 <geekosaur> not sure they ever really used it
11:52:40 <sshine> oh, uhm. yeah.
11:52:52 <geekosaur> (also, since 7.10? that was in 6.6)
11:52:56 Pickchea joins (~private@user/pickchea)
11:54:01 <sshine> > let (!) n = product [1..n] in (5 !)
11:54:02 <lambdabot> 120
11:54:09 caubert joins (~caubert@136.244.111.235)
11:54:13 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:9052:e8ea:d68a:7809) (Ping timeout: 252 seconds)
11:54:32 <_________> > let (+) l = sum l in ([1..5] +)
11:54:34 <lambdabot> 15
11:54:49 <_________> nice
11:56:29 × System123 quits (~System123@net-37-179-171-3.cust.vodafonedsl.it) (Ping timeout: 268 seconds)
11:56:30 <sshine> _________, I've used this more to create more readable function names, e.g. (":" `isPrefixOf`) vs. isPrefixOf ":" (since it looks like "something is prefix of ":", when in fact it is ":" that is prefix of something).
11:57:58 <sshine> _________, so normally you might write x `isPrefixOf` y, but in cases where you only do partial application, rather than e.g. 'any (\y -> x `isPrefixOf` y) ys' or 'any (isPrefixOf x) ys', I prefer 'any (x `isPrefixOf`) ys'.
11:58:46 <sshine> _________, having actual postfix operators like '!' to signify factorial is pretty rarely useful, so you don't really see a bunch of functions grow out of that idea.
11:59:13 × GuestTHU16_1 quits (~GuestTHU1@219.91.230.26) (Quit: Client closed)
11:59:44 <sshine> _________, have you seen the monkey operator? (:[])
11:59:59 <sshine> > let monkey = (:[]) in monkey 5
12:00:00 <lambdabot> [5]
12:00:31 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2.1)
12:01:03 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 265 seconds)
12:01:17 Vajb joins (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi)
12:02:55 chris joins (~chris@81.96.113.213)
12:02:59 chris is now known as Guest3036
12:03:29 <_________> > let (+) = sum, (*) = product in ((([1,2,3] +) [6,7] :) *)
12:03:30 <lambdabot> <hint>:1:14: error: parse error on input ‘,’
12:03:40 <_________> > let (+) = sum in let (*) = product in ((([1,2,3] +) [6,7] :) *)
12:03:42 <lambdabot> error:
12:03:42 <lambdabot> • Could not deduce (Num a0)
12:03:42 <lambdabot> from the context: (Foldable ((->) [a]), Num a1, Num ([a1] -> a),
12:05:15 × max22- quits (~maxime@2a01cb08833598005b81de1e843a31cc.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds)
12:05:56 sheddow joins (~sheddow@84-52-255.245.3p.ntebredband.no)
12:07:08 oxide joins (~lambda@user/oxide)
12:07:22 × Guest3036 quits (~chris@81.96.113.213) (Ping timeout: 252 seconds)
12:08:16 cuz joins (~user@2601:182:cc02:8b0:c414:97d1:1f4d:202f)
12:09:29 × cuz quits (~user@2601:182:cc02:8b0:c414:97d1:1f4d:202f) (Remote host closed the connection)
12:09:52 cuz joins (~user@2601:182:cc02:8b0:c414:97d1:1f4d:202f)
12:11:10 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
12:11:10 × Vajb quits (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
12:11:22 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
12:14:23 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.2.1)
12:16:33 × hololeap quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds)
12:16:39 zer0bitz_ joins (~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi)
12:17:15 hololeap joins (~hololeap@user/hololeap)
12:17:48 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
12:18:38 Vajb joins (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi)
12:18:56 × zer0bitz quits (~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi) (Ping timeout: 265 seconds)
12:23:24 × Vajb quits (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
12:23:57 Vajb joins (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi)
12:25:23 dsrt^ joins (~dsrt@68.101.54.227)
12:26:44 <sshine> > let (┻━┻) = intersperse 'f'; ノಠ益ಠノ = "Python" in (ノಠ益ಠノ ┻━┻)
12:26:45 × Vajb quits (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
12:26:45 <lambdabot> "Pfyftfhfofn"
12:27:20 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
12:28:39 <Hecate> https://www.unicode.org/versions/Unicode14.0.0/ it's out!
12:28:57 jtomas joins (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net)
12:30:01 × neurocyte quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
12:30:42 <sshine> 🥳 𝕪𝕒𝕪!
12:30:55 × dsrt^ quits (~dsrt@68.101.54.227) (Remote host closed the connection)
12:33:06 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
12:34:07 neurocyte joins (~neurocyte@185.117.68.241)
12:34:07 × neurocyte quits (~neurocyte@185.117.68.241) (Changing host)
12:34:07 neurocyte joins (~neurocyte@user/neurocyte)
12:35:33 Vajb joins (~Vajb@85-76-8-0-nat.elisa-mobile.fi)
12:35:58 × Vajb quits (~Vajb@85-76-8-0-nat.elisa-mobile.fi) (Read error: Connection reset by peer)
12:35:59 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
12:36:09 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
12:38:03 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
12:40:20 <sshine> wow, you can sponsor a unicode character: https://www.unicode.org/consortium/adopt-a-character.html
12:42:49 nedh^ joins (~nedh@68.101.54.227)
12:45:06 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
12:46:04 Vajb joins (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi)
12:48:37 × xff0x quits (~xff0x@port-92-195-42-138.dynamic.as20676.net) (Ping timeout: 252 seconds)
12:49:32 juhp joins (~juhp@bb220-255-204-220.singnet.com.sg)
12:53:13 × Vajb quits (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
12:54:01 Vajb joins (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi)
12:54:48 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
12:55:31 xff0x joins (~xff0x@2001:1a81:526d:1c00:6ed0:c2d3:55f8:e793)
12:55:37 × burnsidesLlama quits (~burnsides@dhcp168-022.wadham.ox.ac.uk) (Remote host closed the connection)
12:56:00 Cajun joins (~Cajun@user/cajun)
12:56:05 <Hecate> % scanl1 (+) . map (succ . length) $ [["lol", "mdr", "haha"], ["blah", "bleh"]]
12:56:05 <yahb> Hecate: [4,7]
12:59:34 benin036932301 joins (~benin@183.82.205.89)
12:59:53 <sshine> > ('o':) . pure . chr . foldl1 (\x y -> 10*x+y) . scanl1 (+) . map (succ . length) $ [["lol", "mdr", "haha"], ["blah", "bleh"]]
12:59:54 <lambdabot> "o/"
13:01:09 chris joins (~chris@81.96.113.213)
13:01:12 chris is now known as Guest7647
13:02:38 × AlexNoo quits (~AlexNoo@178.34.162.211) (Quit: Leaving)
13:03:26 × Alex_test quits (~al_test@178.34.162.211) (Quit: ;-)
13:03:33 × AlexZenon quits (~alzenon@178.34.162.211) (Quit: ;-)
13:03:56 ph88 joins (~ph88@ip5f5af6fd.dynamic.kabel-deutschland.de)
13:06:40 × ph88^ quits (~ph88@2a02:8109:9e00:7e5c:c17a:3fe0:849c:9e0a) (Ping timeout: 240 seconds)
13:06:41 × Vajb quits (~Vajb@nbptnppvs5wp2vjps-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
13:06:55 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
13:07:30 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
13:09:31 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
13:09:52 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
13:12:41 × hendursa2 quits (~weechat@user/hendursaga) (Quit: hendursa2)
13:12:57 × jstolarek quits (~jstolarek@ers4.neoplus.adsl.tpnet.pl) (Ping timeout: 268 seconds)
13:13:13 jstolarek joins (~jstolarek@165.231.33.108)
13:13:28 hendursaga joins (~weechat@user/hendursaga)
13:13:59 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
13:14:04 × zer0bitz_ quits (~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi) (Ping timeout: 252 seconds)
13:15:03 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
13:17:28 Lycurgus joins (~juan@98.4.112.204)
13:17:40 × vysn quits (~vysn@user/vysn) (Ping timeout: 268 seconds)
13:18:17 × jstolarek quits (~jstolarek@165.231.33.108) (Ping timeout: 268 seconds)
13:19:42 jokleinn joins (~jokleinn@user/jokleinn)
13:20:04 jstolarek joins (~jstolarek@188.241.156.4)
13:24:42 goepsilongo joins (~goepsilon@2603-7000-ab00-62ed-217f-c4e6-d1e6-03f0.res6.spectrum.com)
13:26:55 burnsidesLlama joins (~burnsides@dhcp168-022.wadham.ox.ac.uk)
13:27:07 AlexZenon joins (~alzenon@178.34.162.211)
13:27:50 × AlexZenon quits (~alzenon@178.34.162.211) (Client Quit)
13:28:09 × hammock quits (~Hammock@2600:1700:19a1:3330::588) (Ping timeout: 268 seconds)
13:28:09 AlexZenon joins (~alzenon@178.34.162.211)
13:28:18 AlexNoo joins (~AlexNoo@178.34.162.211)
13:29:57 Alex_test joins (~al_test@178.34.162.211)
13:30:28 motherfsck joins (~motherfsc@user/motherfsck)
13:31:19 System123 joins (~System123@ec2-52-61-197-79.us-gov-west-1.compute.amazonaws.com)
13:31:50 Sgeo joins (~Sgeo@user/sgeo)
13:32:30 × burnsidesLlama quits (~burnsides@dhcp168-022.wadham.ox.ac.uk) (Ping timeout: 260 seconds)
13:36:27 × jstolarek quits (~jstolarek@188.241.156.4) (Read error: Connection reset by peer)
13:37:06 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
13:39:03 jstolarek joins (~jstolarek@ers4.neoplus.adsl.tpnet.pl)
13:41:21 tito joins (tito@tilde.team)
13:43:23 × Guest7647 quits (~chris@81.96.113.213) (Remote host closed the connection)
13:49:02 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
13:49:23 max22- joins (~maxime@2a01cb0883359800cbea6a523dcdbf78.ipv6.abo.wanadoo.fr)
13:50:14 × jokleinn quits (~jokleinn@user/jokleinn) (Ping timeout: 260 seconds)
13:50:21 <kuribas> We are getting this error on macOs: Undefined symbols for architecture x86_64: > "___darwin_check_fd_set_overflow", referenced from: > _awaitEvent in libHSrts.a(Select.o) > ld: symbol(s) not found for architecture x86_64 > clang: error: linker command failed with exit code 1 (use -v to see invocation) > `gcc' failed in phase `Linker'. (Exit code: 1)
13:53:21 <maerwald> kuribas: https://gitlab.haskell.org/ghc/ghc/-/issues/19950
13:53:43 <maerwald> seems you're not running 8.10.7
13:55:17 <kuribas> ghc?
13:55:27 <maerwald> yeah
13:56:11 <kuribas> 8.10.7
13:56:17 <kuribas> 8.10.6 sorry
13:56:20 <maerwald> yeah
13:56:44 chris joins (~chris@81.96.113.213)
13:56:47 chris is now known as Guest9212
13:57:07 × Guest9212 quits (~chris@81.96.113.213) (Read error: Connection reset by peer)
13:58:37 chris joins (~chris@81.96.113.213)
13:58:41 chris is now known as Guest3568
13:59:43 <kuribas> isn't it risky to run bleeding edge?
13:59:52 <kuribas> this is what I don't like about stack.
14:01:02 <maerwald> kuribas: you can use my stack ghc install hooks :p
14:01:15 <maerwald> but it's not upstreamed
14:01:31 ubert1 joins (~Thunderbi@178.115.48.20.wireless.dyn.drei.com)
14:01:46 juhp_ joins (~juhp@bb220-255-204-220.singnet.com.sg)
14:02:22 × ubert quits (~Thunderbi@178.165.161.81.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
14:02:22 ubert1 is now known as ubert
14:02:47 × juhp_ quits (~juhp@bb220-255-204-220.singnet.com.sg) (Read error: Connection reset by peer)
14:02:49 × jespada quits (~jespada@2803:9800:9842:7a62:e809:3117:30c6:aea3) (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:03:18 sm2n_ is now known as sm2n
14:03:19 × juhp quits (~juhp@bb220-255-204-220.singnet.com.sg) (Read error: Connection reset by peer)
14:03:27 juhp joins (~juhp@bb220-255-204-220.singnet.com.sg)
14:04:05 <maerwald> allows you to provide a shell script that performs installation/discovery of ghc
14:04:08 × System123 quits (~System123@ec2-52-61-197-79.us-gov-west-1.compute.amazonaws.com) (Ping timeout: 268 seconds)
14:04:27 <maerwald> so the shell script gets "need 8.10.6" as input and you can just install 8.10.7 instead
14:04:58 <maerwald> micro version barely matters for dependency resolution anyway
14:06:36 × nedh^ quits (~nedh@68.101.54.227) (Ping timeout: 268 seconds)
14:06:41 <maerwald> https://downloads.haskell.org/~ghcup/unofficial-bindists/stack/2.7.3.1/
14:06:47 <maerwald> example hook https://paste.tomsmeding.com/NI4H4xT3
14:06:58 <maerwald> needs to be placed in ~/.stack/hooks/
14:07:22 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
14:08:35 × oxide quits (~lambda@user/oxide) (Quit: oxide)
14:08:53 <Drew[m]> I want to see if a package can build on a platform it doesn't currently support, but the test suite absolutely cannot be built on this thanks to some dependencies platform. Is it the default behavior of cabal to try to resolve test suite dependencies even if I specifically ask to build just the package library component?
14:09:04 <Drew[m]> Because that's what this package is currently doing
14:09:22 <maerwald> Drew[m]: maybe there's stuff in cabal.project?
14:09:46 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.2.1)
14:10:52 × ph88 quits (~ph88@ip5f5af6fd.dynamic.kabel-deutschland.de) (Ping timeout: 245 seconds)
14:11:10 <Drew[m]> the cabal.project file lists the test suite dependency package that can't be build under "packages"
14:11:53 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
14:11:55 <Drew[m]> Should that matter if I specifically ask to build a specific component of a different package in the project?
14:12:09 <maerwald> all depends
14:12:21 <maerwald> hard to say without seeing the project
14:13:56 <Drew[m]> The project is reflex-dom
14:13:58 <Drew[m]> https://github.com/reflex-frp/reflex-dom
14:14:38 <Drew[m]> From the top level folder I'm trying to execute `cabal build reflex-dom-core:lib:reflex-dom-core -f +use-warp --dry-run`
14:14:59 <Drew[m]> I'm not sure my component identifier syntax is right
14:15:48 <maerwald> `--disable-tests`?
14:17:12 ph88 joins (~ph88@ip5f5af6fd.dynamic.kabel-deutschland.de)
14:18:41 <Drew[m]> As in `cabal build reflex-dom-core:lib:reflex-dom-core -f +use-warp --disable-tests`?
14:18:45 shriekingnoise joins (~shrieking@186.137.144.80)
14:18:47 <maerwald> yeah
14:20:02 × nschoe_ quits (~quassel@178.251.84.79) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
14:20:21 nschoe joins (~quassel@178.251.84.79)
14:20:33 <Drew[m]> I just tried it and it's still failing in dependency resolution, referring to dependencies that don't seem to belong to `reflex-dom-core`'s library
14:20:35 <Drew[m]> https://paste.tomsmeding.com/0YiZEKmR
14:20:56 × Akronymus quits (~Akronymus@85.31.8.180) (Quit: Client closed)
14:21:30 × cuz quits (~user@2601:182:cc02:8b0:c414:97d1:1f4d:202f) (Ping timeout: 260 seconds)
14:22:07 <Drew[m]> So here's a thing, there's a project file: cabal.project-nogtk
14:22:12 <Drew[m]> It turns off some flags
14:22:19 <Drew[m]> If you use it, it works
14:22:39 <maerwald> that file just removes the test stuff from packages
14:22:42 <Drew[m]> What I want to know is how those flags are disabling this dependency
14:23:36 <Drew[m]> So those package dependencies have to be satisfied even if I'm building a different package in the project?
14:23:44 <maerwald> usually not
14:24:02 × Guest3568 quits (~chris@81.96.113.213) (Remote host closed the connection)
14:24:37 × sheddow quits (~sheddow@84-52-255.245.3p.ntebredband.no) (Ping timeout: 256 seconds)
14:24:42 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:854d:ae90:d2a1:51ab)
14:24:48 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
14:24:48 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
14:24:48 wroathe joins (~wroathe@user/wroathe)
14:25:05 <infinisil> A couple days ago I asked for help about a problem where a program would take multiple minutes to complete a very small amount of work, but turning on profiling made it finish instantly, leaving me unable to profile it, merijn was involved in the discussion
14:25:40 jespada joins (~jespada@2803:9800:9842:7a62:95e0:d2b5:ae88:676)
14:25:43 <infinisil> Update for that: It turns out https://hackage.haskell.org/package/concise-0.1.0.1/docs/Control-Lens-Cons-Extras.html was the cause of it, which uses a combination of NOINLINE and rewrite rules
14:26:29 <infinisil> I submitted a fix for the library that uses this here, which has more discussion on this problem: https://github.com/frasertweedale/hs-jose/pull/103
14:29:10 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:854d:ae90:d2a1:51ab) (Ping timeout: 240 seconds)
14:30:06 Arsen is now known as Arsen[test]
14:30:21 Arsen[test] is now known as Arsen
14:30:42 Arsen is now known as Arsen_test[m]
14:30:51 Arsen_test[m] is now known as group
14:30:59 group is now known as Arsen
14:32:40 fendor joins (~fendor@83-131-155-114.adsl.net.t-com.hr)
14:33:26 <Franciman> haskell sux
14:33:36 <Franciman> sorry I had to get a fast answer
14:33:37 <Drew[m]> maerwald: curious! I wish I could figure out why
14:33:40 <Franciman> ok it work
14:33:43 <Franciman> :P
14:34:11 cuz joins (~user@38.140.58.234)
14:36:27 hnOsmium0001 joins (uid453710@id-453710.hampstead.irccloud.com)
14:37:20 nedh^ joins (~nedh@68.101.54.227)
14:38:03 × goepsilongo quits (~goepsilon@2603-7000-ab00-62ed-217f-c4e6-d1e6-03f0.res6.spectrum.com) (Quit: Textual IRC Client: www.textualapp.com)
14:38:30 × jess quits (~jess@libera/staff/jess) ()
14:39:38 chris joins (~chris@81.96.113.213)
14:39:43 chris is now known as Guest5190
14:41:42 xstill joins (~xstill@fimu/xstill)
14:41:45 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
14:42:20 × jlamothe quits (~jlamothe@104.158.48.100) (Quit: leaving)
14:42:48 <xstill> hi, is there any chance downloads.haskell.org/debian will contain bullseye binaries any time soon?
14:43:29 × Guest5190 quits (~chris@81.96.113.213) (Read error: Connection reset by peer)
14:43:45 chris joins (~chris@81.96.113.213)
14:43:49 chris is now known as Guest9509
14:47:54 <kuribas> Franciman: it does... but other language suck more...
14:48:02 <kuribas> maerwaldthanks!
14:49:51 doyougnu joins (~user@c-73-25-202-122.hsd1.or.comcast.net)
14:50:23 × neo1 quits (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 268 seconds)
14:52:01 × theang quits (~theang@2a00:f41:58f0:244b:4742:c02a:6877:e413) (Ping timeout: 268 seconds)
14:52:18 theang joins (~theang@fef109.internetdsl.tpnet.pl)
14:52:40 × Pickchea quits (~private@user/pickchea) (Ping timeout: 260 seconds)
14:54:48 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
14:56:58 × proofofkeags_ quits (~proofofke@97-118-134-2.hlrn.qwest.net) (Ping timeout: 260 seconds)
14:57:24 × Franciman quits (~Franciman@openglass.it) (Remote host closed the connection)
15:00:51 cheater1__ joins (~Username@user/cheater)
15:00:51 × cheater quits (~Username@user/cheater) (Ping timeout: 265 seconds)
15:00:55 cheater1__ is now known as cheater
15:07:27 × Xe quits (~cadey@tailscale/xe) (Quit: WeeChat 3.2)
15:07:27 × Ranhir quits (~Ranhir@157.97.53.139) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
15:07:42 Xe joins (~cadey@tailscale/xe)
15:07:51 shapr hops randomly
15:08:21 Ranhir joins (~Ranhir@157.97.53.139)
15:09:28 × juhp quits (~juhp@bb220-255-204-220.singnet.com.sg) (Quit: juhp)
15:12:46 <sshine> /nick hopr
15:13:50 zmt00 joins (~zmt00@user/zmt00)
15:14:01 Franciman joins (~Franciman@openglass.it)
15:14:25 × jstolarek quits (~jstolarek@ers4.neoplus.adsl.tpnet.pl) (Ping timeout: 252 seconds)
15:16:27 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
15:17:40 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
15:17:55 juhp joins (~juhp@bb220-255-204-220.singnet.com.sg)
15:21:00 × chele quits (~chele@user/chele) (Read error: Connection reset by peer)
15:21:09 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 265 seconds)
15:21:11 chele joins (~chele@user/chele)
15:21:33 ec_ joins (~ec@gateway/tor-sasl/ec)
15:22:09 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:34:06 × fendor quits (~fendor@83-131-155-114.adsl.net.t-com.hr) (Remote host closed the connection)
15:34:28 fendor joins (~fendor@83-131-155-114.adsl.net.t-com.hr)
15:35:00 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:35:01 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
15:35:01 wroathe joins (~wroathe@user/wroathe)
15:35:31 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
15:39:56 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
15:40:00 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
15:42:19 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:854d:ae90:d2a1:51ab)
15:42:25 proofofkeags_ joins (~proofofke@205.209.28.54)
15:43:15 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
15:44:02 zebrag joins (~chris@user/zebrag)
15:46:50 jokleinn joins (~jokleinn@user/jokleinn)
15:48:08 × favonia quits (~favonia@user/favonia) (Ping timeout: 268 seconds)
15:53:50 ec_ joins (~ec@gateway/tor-sasl/ec)
15:54:08 spruit11_ joins (~quassel@2a02:a467:ccd6:1:563:f225:f6bf:7d85)
15:57:36 × spruit11 quits (~quassel@2a02:a467:ccd6:1:8499:aaa7:da86:787a) (Ping timeout: 268 seconds)
15:57:36 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
16:01:38 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Quit: Leaving)
16:01:56 × jokleinn quits (~jokleinn@user/jokleinn) (Quit: WeeChat 3.2)
16:03:47 lbseale joins (~lbseale@user/ep1ctetus)
16:04:58 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
16:05:14 akronymus[m] parts (~akronymus@2001:470:69fc:105::f7be) ()
16:07:40 jokleinn joins (~jokleinn@user/jokleinn)
16:07:52 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
16:07:52 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
16:07:52 wroathe joins (~wroathe@user/wroathe)
16:08:02 × fendor quits (~fendor@83-131-155-114.adsl.net.t-com.hr) (Ping timeout: 265 seconds)
16:10:33 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
16:10:50 slowButPresent joins (~slowButPr@user/slowbutpresent)
16:17:05 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
16:17:28 ec_ joins (~ec@gateway/tor-sasl/ec)
16:18:54 × Guest9509 quits (~chris@81.96.113.213) (Remote host closed the connection)
16:20:16 enicar joins (~enikar@user/enikar)
16:21:55 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 260 seconds)
16:26:02 chris joins (~chris@81.96.113.213)
16:26:02 chris is now known as Guest1324
16:26:42 favonia joins (~favonia@user/favonia)
16:28:48 <Drew[m]> Ok so after doing my own test, it turns out that by default cabal automatically checks the dependencies of all packages in a project when resolving dependencies to build just one
16:29:15 <Drew[m]> And I need to figure out a way to say I don't want that
16:30:16 × Guest1324 quits (~chris@81.96.113.213) (Ping timeout: 252 seconds)
16:37:48 × enicar quits (~enikar@user/enikar) (Quit: WeeChat 3.2.1)
16:38:00 × nschoe quits (~quassel@178.251.84.79) (Ping timeout: 265 seconds)
16:38:17 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:39:44 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
16:40:27 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
16:42:14 fendor joins (~fendor@83-131-155-114.adsl.net.t-com.hr)
16:42:58 hyiltiz joins (~quassel@31.220.5.250)
16:43:45 MQ-17J joins (~MQ-17J@8.21.10.6)
16:44:40 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds)
16:45:44 ec_ joins (~ec@gateway/tor-sasl/ec)
16:46:45 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
16:47:34 × tdammers quits (~tdammers@77.109.72.213.res.static.edpnet.net) (Ping timeout: 260 seconds)
16:48:17 justsomeguy joins (~justsomeg@user/justsomeguy)
16:50:32 × Teacup quits (~teacup@user/teacup) (Quit: Teacup)
16:50:53 × Cajun quits (~Cajun@user/cajun) (Quit: Client closed)
16:53:25 choucavalier joins (~choucaval@peanutbuttervibes.com)
16:54:40 × choucavalier quits (~choucaval@peanutbuttervibes.com) (Changing host)
16:54:40 choucavalier joins (~choucaval@user/choucavalier)
16:56:36 jstolarek joins (~jstolarek@ers4.neoplus.adsl.tpnet.pl)
16:56:57 timCF joins (~timCF@m91-129-108-244.cust.tele2.ee)
16:58:02 × jokleinn quits (~jokleinn@user/jokleinn) (Ping timeout: 268 seconds)
16:59:25 <timCF> Hello! Is there any good combinator libraries for Aeson to transform/compose `Value` AST data? For example I need to apply filter to `Value` in case where it's an object and get new object `Value` where `Null` value fields are removed. Maybe I can use `lens-aeson` for this, but I don't know how exactly
17:00:00 × chele quits (~chele@user/chele) (Remote host closed the connection)
17:00:00 <sm> congrats infinisil
17:00:27 tdammers joins (~tdammers@77.109.72.177.res.static.edpnet.net)
17:01:00 <infinisil> :D
17:02:59 jokleinn joins (~jokleinn@user/jokleinn)
17:04:22 × MQ-17J quits (~MQ-17J@8.21.10.6) (Ping timeout: 260 seconds)
17:04:40 MQ-17J joins (~MQ-17J@8.21.10.6)
17:05:35 econo joins (uid147250@user/econo)
17:07:12 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
17:08:40 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 240 seconds)
17:09:46 × benin036932301 quits (~benin@183.82.205.89) (Read error: Connection reset by peer)
17:10:08 fendor_ joins (~fendor@83-131-155-114.adsl.net.t-com.hr)
17:10:52 × fendor quits (~fendor@83-131-155-114.adsl.net.t-com.hr) (Read error: Connection reset by peer)
17:11:41 <carbolymer> how can I make this work: https://bpa.st/U5FA ?
17:12:09 zebrag joins (~chris@user/zebrag)
17:12:10 azimut_ joins (~azimut@gateway/tor-sasl/azimut)
17:12:19 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
17:12:40 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
17:12:57 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
17:13:05 Teacup joins (~teacup@user/teacup)
17:14:10 × cuz quits (~user@38.140.58.234) (Ping timeout: 240 seconds)
17:15:25 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
17:16:50 <carbolymer> why ghc tries to decude (Exception e10) when there's a constraint on exception from E.try already
17:18:05 <sm> plot twist! "Happily, I am involved with a new build system, the next generation of Buck." --https://neilmitchell.blogspot.com/2021/09/huge-project-build-systems.html
17:18:09 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
17:18:10 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
17:18:10 wroathe joins (~wroathe@user/wroathe)
17:18:33 <geekosaur> carbolymer, that usually means it can't unify e10 with what you expect it to
17:19:00 <carbolymer> yeah, but why, and can I work around that?
17:19:14 <geekosaur> but I'm not familiar with protolude or can-i-haz so I can't help much
17:22:28 × fendor_ quits (~fendor@83-131-155-114.adsl.net.t-com.hr) (Ping timeout: 265 seconds)
17:23:26 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
17:23:57 <sm> incidentally, https://github.com/bazelbuild/starlark looks kind of useful, I wonder if there's any start at a haskell implementation
17:25:24 chris joins (~chris@81.96.113.213)
17:25:27 chris is now known as Guest2044
17:27:15 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
17:27:22 × Guest2044 quits (~chris@81.96.113.213) (Remote host closed the connection)
17:28:06 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2)
17:33:11 Erutuon joins (~Erutuon@user/erutuon)
17:34:18 ec_ joins (~ec@gateway/tor-sasl/ec)
17:38:28 × favonia quits (~favonia@user/favonia) (Ping timeout: 252 seconds)
17:38:40 nschoe joins (~quassel@2a01:e0a:8e:a190:e304:f7fc:fa6b:13a4)
17:38:45 × nschoe quits (~quassel@2a01:e0a:8e:a190:e304:f7fc:fa6b:13a4) (Client Quit)
17:39:01 <sclv> Drew[m]: why are you in that situation to begin with?
17:39:56 <sclv> ah i see
17:40:18 <sclv> so, if the test deps are in test stanzas, and you explicitly disable testing, it won't solve for the test deps
17:42:08 <sclv> otherwise, just change the project file to not include the stuff you don't want to build
17:42:51 chris joins (~chris@81.96.113.213)
17:42:54 chris is now known as Guest2003
17:44:27 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
17:46:15 × jokleinn quits (~jokleinn@user/jokleinn) (Quit: WeeChat 3.2)
17:47:19 × Guest2003 quits (~chris@81.96.113.213) (Ping timeout: 252 seconds)
17:48:02 cuz joins (~user@38.140.58.234)
17:50:17 Cajun joins (~Cajun@user/cajun)
17:51:46 × timCF quits (~timCF@m91-129-108-244.cust.tele2.ee) (Quit: leaving)
17:52:55 × cuz quits (~user@38.140.58.234) (Ping timeout: 265 seconds)
17:55:17 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
17:55:47 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:55:49 <dminuoso> @tell timCF You can work on Value directly, it's just an ADT.
17:55:49 <lambdabot> Consider it noted.
17:57:05 cuz joins (~user@38.140.58.234)
17:59:06 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
18:00:56 favonia joins (~favonia@user/favonia)
18:01:09 timCF joins (~timCF@m91-129-108-244.cust.tele2.ee)
18:03:45 <timCF> Is there some class similar to `Num`, but safe to use with `Natural` numbers? For example subtract method should be something like `(-) :: a -> a -> Either Error a`?
18:04:06 <geekosaur> not currently
18:05:38 <timCF> probably I'll do my own locally in project then :)
18:05:43 lep parts (~lep@94.31.80.176) ()
18:05:52 ec_ joins (~ec@gateway/tor-sasl/ec)
18:06:32 × ubert quits (~Thunderbi@178.115.48.20.wireless.dyn.drei.com) (Remote host closed the connection)
18:06:51 ubert joins (~Thunderbi@178.115.48.20.wireless.dyn.drei.com)
18:07:06 <dminuoso> timCF: Regarding the earlier Value question, you could then write a simple recursive function.
18:10:25 × alx741 quits (~alx741@181.196.68.49) (Ping timeout: 252 seconds)
18:10:41 <timCF> Yeah, already did it) Just thought it could be done "smarter" with some sort of generic lens/prism magic https://github.com/tkachuk-labs/bitfinex-client/blob/3b96cff21cd06a8f1c44e7657a17e6a9ce67d21f/src/BitfinexClient/Util.hs#L26-L35
18:11:08 <dminuoso> Nothing as concise
18:11:59 <dminuoso> You could perhaps do something with Plated?
18:12:18 <dminuoso> If lens-aeson has an instance for that
18:12:37 <dminuoso> Oh it does!
18:13:10 <dminuoso> Though I think it would rather require writing a custom Plated instance
18:13:16 <kuribas> timCF: golfing, are we?
18:14:36 <timCF> kuribas: golfing?
18:14:59 <kuribas> https://en.wikipedia.org/wiki/Code_golf
18:15:20 <carbolymer> geekosaur: I've removed can-i-haz and Protolude for readability, maybe you have any ideas now: https://stackoverflow.com/questions/69213328/lift-io-exception-into-monaderror-with-automatic-mapping
18:15:54 Pickchea joins (~private@user/pickchea)
18:16:14 × ubert quits (~Thunderbi@178.115.48.20.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
18:16:35 <dminuoso> timCF: If at all, it seems `rewrite` or `transformOf` together with `plate` would be the way to go.
18:17:38 <timCF> kuribas: well, seems like I'm not that good in Haskell yet to do golfing)
18:17:46 <dminuoso> timCF: Ah I think I got it.
18:18:12 seventhCrow joins (crow@gateway/vpn/protonvpn/seventhcrow)
18:18:23 <geekosaur> carbolymer, I think multiparameter type classes don't work that way, you really need either functional dependencies or type families to make them work the way you expect
18:18:43 <carbolymer> hmm
18:19:10 lavaman joins (~lavaman@98.38.249.169)
18:19:44 <geekosaur> and just because you have only one instance doesn't mean there can't be others (typeclasses operate under an open world assumption because separate compilation means someone could theoretically add an additional instance later)
18:19:49 <carbolymer> that would enforce only one mapping allowed a -> b in Injection instance
18:19:56 <carbolymer> I guess I can live with that
18:20:15 <geekosaur> and only the linker would know, not the conmpiler
18:20:17 <carbolymer> geekosaur: exactly, I think I start seeing it now
18:20:37 <dminuoso> timCF: If you want this without the explicit recursion, you can use plain `rewrite`
18:21:02 <awpr> carbolymer: the other potential answer is that the error is really more of a warning, and you can turn on `AllowAmbiguousTypes` and `TypeApplications` to use it
18:21:25 <timCF> dminuoso: I'll take a look to what actually `plate` is first I guess) I feel like I'm missing a lot of profit ignoring lens-related stuff "for simplicity" in spite of programming in Haskell for already 2 years
18:21:44 <carbolymer> awpr: is AllowAmbiguousTypes a safe extension to just turn it on and go with it hoping that all the magic will happen?
18:21:58 <kuribas> timCF: simple is better
18:22:07 <awpr> the error is just saying it can't figure out what exception type it should `try` on based on the argument and return types, and call sites will need help in the form of `TypeApplications`
18:22:27 <dminuoso> timCF: So maybe something like `rewrite (\case of Object o -> HM.filter (/= Null) o; Array v -> V.filter (/= Null) v; r -> r ) tree)`
18:22:46 <awpr> I generally don't hesitate to turn on `AllowAmbiguousTypes`; it basically just means "hey, you can't use this without `TypeApplications`, are you sure that's what you wanted?"
18:22:56 × kuribas quits (~user@ptr-25vy0i96fc65i21clnv.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
18:23:04 <carbolymer> awpr: sounds useful
18:23:08 <dminuoso> timCF: Plated is just a typeclass in which you can have a `Traversal' a a` that knows how to extract self-similar children.
18:23:14 rond_ joins (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438)
18:23:19 <dminuoso> Together with a bunch of combinators that let you sort of recursion-style work with that
18:23:37 <dminuoso> Like `rewrite`
18:24:26 <timCF> dminuoso: looks cool, thanks!
18:24:39 alx741 joins (~alx741@181.196.68.9)
18:25:33 <dminuoso> So for instance, to turn a tree of integers into a list, you can just write `universe tree`
18:26:39 <dminuoso> But this is only an almost meaningless example. Plated is very powerful to work with such tree-like data.
18:27:29 chris joins (~chris@81.96.113.213)
18:27:33 chris is now known as Guest3304
18:28:39 × cuz quits (~user@38.140.58.234) (Remote host closed the connection)
18:28:48 cuz joins (~user@38.140.58.234)
18:30:18 <Cajun> `universe tree` sounds deeply metaphorical :P
18:32:04 × Guest3304 quits (~chris@81.96.113.213) (Ping timeout: 265 seconds)
18:34:32 zer0bitz joins (~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi)
18:34:44 × timCF quits (~timCF@m91-129-108-244.cust.tele2.ee) (Quit: leaving)
18:34:54 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.2)
18:35:03 timCF joins (~timCF@m91-129-108-244.cust.tele2.ee)
18:35:17 × timCF quits (~timCF@m91-129-108-244.cust.tele2.ee) (Client Quit)
18:36:10 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
18:36:10 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
18:36:10 wroathe joins (~wroathe@user/wroathe)
18:40:48 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
18:43:06 × vaucouleur quits (~vaucouleu@78.194.70.105) (Read error: Connection reset by peer)
18:43:14 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
18:43:57 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
18:45:36 × rond_ quits (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Quit: Client closed)
18:48:56 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:854d:ae90:d2a1:51ab) (Remote host closed the connection)
18:52:42 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:854d:ae90:d2a1:51ab)
18:53:44 × Franciman quits (~Franciman@openglass.it) (Remote host closed the connection)
18:54:09 ec_ joins (~ec@gateway/tor-sasl/ec)
18:56:22 × nedh^ quits (~nedh@68.101.54.227) (Ping timeout: 260 seconds)
18:59:11 × nvmd quits (~nvmd@user/nvmd) (Read error: Connection reset by peer)
19:01:04 × cheater quits (~Username@user/cheater) (Ping timeout: 265 seconds)
19:01:05 cheater1__ joins (~Username@user/cheater)
19:01:09 cheater1__ is now known as cheater
19:01:14 × ephemient quits (uid407513@id-407513.lymington.irccloud.com) (Quit: Connection closed for inactivity)
19:03:25 nvmd joins (~nvmd@user/nvmd)
19:03:32 × hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection)
19:04:57 hololeap joins (~hololeap@user/hololeap)
19:06:40 × abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection)
19:06:52 × favonia quits (~favonia@user/favonia) (Ping timeout: 265 seconds)
19:09:44 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:09:50 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2.1)
19:12:49 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:854d:ae90:d2a1:51ab) (Remote host closed the connection)
19:13:09 × jtomas quits (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 265 seconds)
19:13:51 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
19:15:38 <awpr> informal opinion-gathering: would you be put off from using a pretty-printing library if its instance for String printed it as a list of Chars? I'm torn on whether to implement the typeclass trickery to special-case Strings among other lists -- it complicates the class a bit, and I'm tempted to leave it out to subtly discourage using String
19:17:14 Lycurgus joins (~juan@98.4.112.204)
19:18:57 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds)
19:20:45 ec_ joins (~ec@gateway/tor-sasl/ec)
19:21:01 jtomas joins (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net)
19:25:40 pavonia joins (~user@user/siracusa)
19:27:20 <dminuoso> I would be, yes.
19:27:48 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:854d:ae90:d2a1:51ab)
19:27:48 <dminuoso> It depends a bit on the ergonmoics of the library
19:29:49 <dminuoso> Actually let me go back and rephrase.
19:29:56 gehmehgeh joins (~user@user/gehmehgeh)
19:30:10 <dminuoso> Personally I dont use typeclass instances much with `prettyprinter`, its mostly custom `ppr*` functions because most things dont have a canonical representation.
19:30:28 <dminuoso> In that sense, having a dedicated pprText and pprString function would probably be fine.
19:30:55 wrengr_away is now known as wrengr
19:31:26 <geekosaur> in the only program I have that does prettyprinting I use custom functions as well
19:33:12 <geekosaur> come to think of it, two programs and the other one uses custom functions as well (DebugEvent in xmonad-contrib)
19:33:53 <awpr> so the main thing it provides is "debug-style" derived instances printing types as mostly-valid-Haskell syntax, along with structured diffing for tests. if you're carefully constructing user-facing output documents, you probably wouldn't use this, unless the "users" are people inspecting test failures or are Haskell developers
19:34:30 <awpr> the present issue is that it'd print String fields in records as lists of Char, for example (but Text as really nicely formatted string literals)
19:34:59 favonia joins (~favonia@user/favonia)
19:35:04 <geekosaur> I'd actually prefer to support both forms
19:35:06 × zer0bitz quits (~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi) (Ping timeout: 260 seconds)
19:35:36 <geekosaur> although admittedly the main reason is things like (Mega)Parsec that use lists when they ought to be using Sets
19:36:10 × tdammers quits (~tdammers@77.109.72.177.res.static.edpnet.net) (Ping timeout: 252 seconds)
19:37:06 <awpr> it'd be even more effort to support both, I'd have to grow a configuration mechanism just for that individual choice
19:37:37 <geekosaur> that's one advantage of ppr* functions though, I can just use the one that fits the purpose
19:38:13 <awpr> yeah, you should use explicit functions if you're hand-crafting documents for well-maintained user-facing output
19:38:37 <geekosaur> come to think of it, String's already going through this with Show because of people who want it to display Unicode "properly"
19:41:10 × kimjetwav quits (~user@2607:fea8:235f:9730:7652:9a19:d3a:6562) (Ping timeout: 260 seconds)
19:42:27 Franciman joins (~Franciman@mx1.fracta.dev)
19:42:40 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
19:43:01 tdidrfyls^ joins (~tdidrfyls@68.101.54.227)
19:43:45 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
19:43:58 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds)
19:47:58 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:854d:ae90:d2a1:51ab) (Remote host closed the connection)
19:48:41 tdammers joins (~tdammers@77.109.72.177.res.static.edpnet.net)
19:50:31 ec_ joins (~ec@gateway/tor-sasl/ec)
19:53:10 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
19:54:26 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Client Quit)
19:55:01 System123 joins (~System123@ec2-52-61-197-79.us-gov-west-1.compute.amazonaws.com)
19:57:40 l4mee joins (~l4mee@93.49.6.163)
19:57:56 mikoto-chan joins (~mikoto-ch@83.137.2.242)
19:58:53 × l4mee quits (~l4mee@93.49.6.163) (Quit: l4mee)
19:59:54 <awpr> hmm, yeah, at the moment I just have it doing decimal escapes the same way Show currently does
20:04:46 × jstolarek quits (~jstolarek@ers4.neoplus.adsl.tpnet.pl) (Ping timeout: 252 seconds)
20:06:08 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine)
20:06:52 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
20:06:53 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
20:06:53 wroathe joins (~wroathe@user/wroathe)
20:06:58 × Gurkenglas quits (~Gurkengla@dslb-002-207-014-195.002.207.pools.vodafone-ip.de) (Ping timeout: 252 seconds)
20:07:08 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
20:08:37 <awpr> it's a bit tricky, since depending on the system locale, the runtime might just blow up if you try to output non-ASCII characters, so if it unconditionally includes those, it'll not work in certain locales, but if it's conditional, you have to do IO to figure out whether it's supported and then plumb that around everywhere
20:09:10 × jtomas quits (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 252 seconds)
20:09:58 <Cajun> well you could do what one of those networking packages does and use `unsafePerformIO` to get an `IORef` instead of an `IO (IORef)` which will be used as a default config every time its requested
20:10:35 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:854d:ae90:d2a1:51ab)
20:11:58 <awpr> yeah, I guess so, but global unsafePerformIOs make me feel a bit dirty. and it's still just a best guess, since what's actually relevant IIUC is the encoding of the particular handle the text will be output to -- which is _probably_ the system locale, but maybe not always
20:12:59 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
20:13:00 sneedsfeed joins (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com)
20:14:23 <sneedsfeed> In imperative programming I rely a lot on adding random little printouts into loops to see whats going on in there. Is there anything even sort of analogous to that when writing recursive functions?
20:14:44 <geekosaur> I don't think the runtime supports per-handle locales (yet?)
20:15:05 <awpr> sneedsfeed: yes, Debug.Trace.trace; it can be a bit subtle understanding when they actually happen if you're not used to lazy evaluation, though
20:15:06 <geekosaur> sneedsfeed, there is Debug.Trace
20:15:37 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine)
20:16:02 <Cajun> you may not always want to fallback to using Debug.Trace unless you really have no idea whats happening, most of the time you can reason about what something does. there are times when its really useful though, i just havent used it much myself
20:16:05 <awpr> geekosaur: hmm, I'll have to read the source
20:16:37 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
20:16:53 <geekosaur> I didn't see anything in System.IO; there might be some lower level stuff in GHC.IO.Handle though
20:17:06 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 260 seconds)
20:17:15 <awpr> there are multiple fields in Handle that look like they're meant to support handle-granularity text encodings
20:17:26 <Cajun> awpr: well you can provide both methods, passing around some manager to each function (this is tarting to sound like Reader though). heres the code i was thinking of: https://paste.tomsmeding.com/o4vzbVzg
20:17:28 <sneedsfeed> Cajun thats probably true.
20:18:14 <awpr> yes, that's possible, it's just that it doesn't actually fix the issue for real
20:18:41 <awpr> so far I've just dodged the issue by sticking to decimal escapes
20:19:48 vysn joins (~vysn@user/vysn)
20:19:59 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
20:20:07 <awpr> seems like the root of the problem is that the way Haskell libraries are currently set up has transparent locale-sensitivity only up to the text encoding level, and not above, with no good story for locale-sensitive /content/ that I'm aware of
20:20:40 <awpr> which basically just means outputting non-ASCII characters is banned unless you're willing to crash on basic locales
20:20:53 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
20:20:59 <awpr> (or explicitly UTF-8 them and output bytes rather than text)
20:21:02 sm uses unsafePerformIO to get info for debug tracing (color support, --debug flag, etc), it works well
20:21:06 chexum joins (~quassel@gateway/tor-sasl/chexum)
20:24:24 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:854d:ae90:d2a1:51ab) (Remote host closed the connection)
20:26:28 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:27:18 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
20:27:42 kimjetwav joins (~user@2607:fea8:235f:9730:162d:fa69:3f15:a6a5)
20:30:43 <awpr> I guess nothing's stopping me from adding a config record, and having the debug utilities infer the config by default
20:31:13 ec_ joins (~ec@gateway/tor-sasl/ec)
20:31:20 <awpr> just concerned it'll open the floodgates to an enormous config record with a bunch of random fields for every type, if I'm not careful of how it's designed
20:35:14 <Cale> awpr: Just be careful about which things need what config, and make types accordingly. Then you might end up with a config record consisting of several other config records, and it's actually enormous at the top level, but gets split up into smaller types quickly.
20:35:39 <awpr> but this is in the context of a typeclass method
20:35:41 <Cale> (but I only read your last few messages, so I might be missing context)
20:35:47 <geekosaur> there's also a Map indexed by Typeable
20:36:05 <sneedsfeed> I just found this. You guys should consider pointing every newby you encounter at this. https://colah.github.io/posts/2015-02-DataList-Illustrated/
20:36:07 <geekosaur> more precisely TypeRep
20:36:32 <awpr> geekosaur: yeah, I tried that approach for overriding individual instances, but decided it was too much and was just complicating things more than I wanted
20:38:31 <awpr> it turns out the locale-sensitive escaping logic would live entirely in renderers and not in the classes, though, so there are finitely many constructs to configure at the point where I'd actually need the configuration, and I can probably get away with zero configuration for the instances
20:43:46 kuribas joins (~user@ptr-25vy0i9fqiblx2l1e59.18120a2.ip6.access.telenet.be)
20:44:26 <kuribas> Are there ways to have multifunctors? Like three or more functors in one type?
20:44:51 <awpr> like Bifunctor for >2?
20:45:13 <kuribas> yeah :)
20:45:20 <kuribas> NFunctor?
20:45:52 <awpr> not aware of one, but you can have standalone functions to map over earlier type parameters
20:46:03 <kuribas> perhaps with newtypes to swap type variables?
20:46:19 <awpr> yeah, that's one approach I played with a while back. it's... okay
20:46:47 <awpr> gets a bit tedious, but IIRC it largely works
20:48:40 × favonia quits (~favonia@user/favonia) (Ping timeout: 268 seconds)
20:49:41 <Cale> kuribas: There is a way, by generalising Functor to be between an arbitrary pair of categories
20:50:10 <awpr> this is an aspect of something I wish we had a better answer for in Haskell -- there are infinitely many variations on functors that we occasionally want, it's a huge pain to write special case libraries for each one, but writing a sufficiently general thing that covers all functors makes use sites so complicated that it just results in getting fed up with all the kind instantiation and doing something else
20:50:47 <ProofTechnique> I'm _certain_ there's a Trifunctor on Hackage somewhere
20:51:01 <awpr> how about Triskaidekafunctor
20:51:10 <Cale> I don't think it's all that big a deal, honestly
20:51:24 <Cale> If you have that many type parameters, you'd probably prefer to name your operations more clearly
20:51:43 <ProofTechnique> ^this
20:51:57 <Cale> fmap3of7 is not very cool
20:52:28 <kuribas> hmm, it's worse, I am thinking about a higher kinded bifunctor now...
20:52:44 <Cale> But yeah, you can just do enough runNat's ;)
20:52:45 <ProofTechnique> Being a Functor is boring. Practically everything is a Functor. Trifunctors are thrice as boring, and who needs that?
20:53:00 <awpr> kuribas: like https://hackage.haskell.org/package/ten-0.1.0.1/docs/Data-Ten-Functor.html#t:Functor10 but Bifunctor?
20:53:04 <kuribas> Cale: how so?
20:53:36 <kuribas> "If you have that many type parameters, you'd probably prefer to name your operations more clearly"
20:54:18 <Cale> https://github.com/ekmett/hask/blob/master/src/Hask/Category.hs#L329
20:54:32 <Cale> kuribas: Because the parameters probably have meaning to you
20:54:46 <kuribas> right, they have
20:55:29 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
20:55:40 <ProofTechnique> "I wrote Dodecafunctor, but I use id in nearly every position"
20:56:00 <Cale> ProofTechnique: seventhOfTwelve
20:56:06 <kuribas> maybe labeled functors?
20:56:41 <Cale> (like first and second for Bifunctor)
20:57:23 <kuribas> For example, I model some sort of subtyping with functors. Like "Device fields", where Device contains command fields, fields are specific to the type of Device.
20:58:21 <kuribas> Or just (Device ()) if I don't care about the special fields.
20:58:29 <ProofTechnique> Questions like these are why we have lenses now
20:58:58 <kuribas> ProofTechnique: that sounds orthogonal.
20:59:32 <kuribas> Well, I guess I don't need the functor instance really...
20:59:39 <kuribas> I can use the LabelOptic instead.
20:59:41 <dsal> Lenses give you named profunctors on arbitrary things.
20:59:44 <awpr> a polymorphic lens or other optic can target whichever type parameter it wants, have a nice name, and give you all the available functionality of the suite of functor-ish instances
20:59:54 <kuribas> yeah true.
21:00:07 jstolarek joins (~jstolarek@ers4.neoplus.adsl.tpnet.pl)
21:00:10 <kuribas> Are there higher rank lenses?
21:00:16 <monochrom> I don't fear seventhOfTwelve. What I fear is there are almost 2^12 siblings of it.
21:00:54 <awpr> kuribas: like `(forall x. m x -> f (n x)) -> s -> f t`?
21:01:15 <kuribas> awpr: yeah
21:01:22 <awpr> ooh I just realized GHC 9.2 makes those not suck
21:01:33 <awpr> I've been tempted to add them to `ten`, but haven't yet
21:02:21 <awpr> I may even have a commented out `Lens10` type alias with a comment like "uh, is this useful?"
21:03:02 zmt00 joins (~zmt00@user/zmt00)
21:03:28 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
21:03:32 <awpr> (background: composing those without quick look impredicativity doesn't work, it'd need a newtype to guard the forall. with quick look, maybe it works)
21:04:10 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
21:04:27 jokleinn joins (~jokleinn@user/jokleinn)
21:05:04 <kuribas> I was just thinking how to model clojure style "data API", where you put all information in data. It seems to map to HKD data. For example you fill a HKD with a parser description. Then use the HKD to "run" each parser to Identity.
21:05:50 <awpr> not familiar with the clojure side of that, but it sure sounds like `traverse10` to me
21:06:14 Lord_of_Life_ is now known as Lord_of_Life
21:06:54 <kuribas> like: https://hackage.haskell.org/package/hkd-0.1/docs/Data-HKD.html
21:07:19 <awpr> yeah, same idea. I like mine better :)
21:08:08 <awpr> in particular I have support for getting access to the constraints that are common to all fields
21:08:21 <dsal> awpr: I'm not smart enough to understand ten. Do you have an explanation for dummies?
21:08:40 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:09:01 <awpr> yeah the docs are still not super friendly to newcomers to the library, I'd like to improve that
21:09:05 <Cajun> how is HKD different from First Class Families?
21:09:19 <Cajun> they seem similar in concept, maybe i just dont understand the idea behind HKD
21:09:28 <dsal> awpr: I guess it's just a type functor. I don't spend too much time there.
21:09:33 <dsal> Whence the name?
21:10:28 <awpr> dsal: yeah, pretty much. in practice I've seen it come up when wanting a lot of variants of the same record type and ways to manipulate them generically, like "MyRecord Parser -> Parser (MyRecord Identity)"
21:10:46 <ProofTechnique> I was gonna say "how about even one example?" 😄 I get HKD well enough to use it in anger (well, barbies, anyway), but I don't even know where to start with ten
21:10:52 <kuribas> awpr: how is it different from HKD?
21:11:07 <awpr> kuribas: exactly the same core idea, but more functionality
21:11:08 <kuribas> awpr: to me it looks like the same think with a different name.
21:11:28 burnsidesLlama joins (~burnsides@dhcp168-022.wadham.ox.ac.uk)
21:12:11 <kuribas> hmm, ok
21:13:47 <kuribas> it's always nice in theory, but the code seems to become hairy quickly.
21:13:56 <kuribas> for example beam.
21:14:32 <ProofTechnique> dsal: Evidently the name comes from its being a functor from the category of objects with one (1) type parameter to the category of objects with zero (0)
21:14:34 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:854d:ae90:d2a1:51ab)
21:14:50 <dsal> ProofTechnique: Ah. Thanks.
21:15:31 <dsal> Needs more abstraction. Next time, call it LilNasFunctorX
21:15:50 <ProofTechnique> Lil Nat Z
21:15:50 <awpr> lol I get the sense I should demote the current description to a category theory section and start over
21:16:49 × burnsidesLlama quits (~burnsides@dhcp168-022.wadham.ox.ac.uk) (Ping timeout: 252 seconds)
21:16:57 <ProofTechnique> I'll see if I can use it next time I write a CLI tool 🙂
21:17:35 <ProofTechnique> Config construction is most of what I've used HKD for, thus far
21:17:39 × jstolarek quits (~jstolarek@ers4.neoplus.adsl.tpnet.pl) (Ping timeout: 268 seconds)
21:17:48 newbie joins (~newbie@80-196-109-198-dynamic.dk.customer.tdc.net)
21:17:51 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds)
21:17:57 <awpr> kuribas: yeah, it can get confusing. I did try to iron out a lot of the scarier issues, but there are still a lot of types and type parameters and quantifiers floating around. it's certainly not functionality for zero complexity cost, it's more on the heavyweight side
21:18:14 <newbie> Hi, I have a question regarding '>>=' of Either. If I want to apply it to a tuple containing Either instead i.e (Either SomeData a, String), how can I lift '>>=' such that it operates on tuples?
21:19:04 <Rembane> :t first (>>=)
21:19:05 <lambdabot> Monad m => (m a, d) -> ((a -> m b) -> m b, d)
21:19:22 <Cajun> :t first
21:19:23 <lambdabot> Arrow a => a b c -> a (b, d) (c, d)
21:19:30 <Rembane> That wasn't the clearest type signature, but it's one way to do it.
21:19:32 <dsal> @hoogle first
21:19:32 <Cajun> i see arrows im scared
21:19:32 <lambdabot> Control.Arrow first :: Arrow a => a b c -> a (b, d) (c, d)
21:19:32 <lambdabot> Data.Bifunctor first :: Bifunctor p => (a -> b) -> p a c -> p b c
21:19:32 <lambdabot> Text.PrettyPrint.Annotated.HughesPJ first :: Doc a -> Doc a -> Doc a
21:19:47 <dsal> The Bifunctor one is what your probably probably thinks of.
21:19:48 <awpr> :t Data.Bifunctor.first -- a less scary one, slightly
21:19:49 <lambdabot> Bifunctor p => (a -> b) -> p a c -> p b c
21:19:56 <Cajun> oh its bifunctor, thats way less scary
21:20:12 <dsal> newbie: You could use regular functor if you swapped the tuple around.
21:20:41 <Rembane> :t swap
21:20:42 <lambdabot> (a, b) -> (b, a)
21:21:03 <dsal> I'd probably try to actually just use it in that direction instead of doing a `. swap`
21:21:33 <newbie> That seems easier than i thought. Thanks guys, i'll try to implement it :)
21:21:41 <ProofTechnique> More descriptive, for sure
21:21:45 × cuz quits (~user@38.140.58.234) (Ping timeout: 268 seconds)
21:22:35 × max22- quits (~maxime@2a01cb0883359800cbea6a523dcdbf78.ipv6.abo.wanadoo.fr) (Quit: Leaving)
21:22:47 × shailangsa quits (~shailangs@host86-186-132-44.range86-186.btcentralplus.com) ()
21:23:58 × mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Ping timeout: 250 seconds)
21:27:06 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
21:28:22 chris joins (~chris@81.96.113.213)
21:28:26 chris is now known as Guest7922
21:29:15 <ldlework> Is "Reflex" react for haskell?
21:29:20 <ldlework> I can't quite tell
21:29:52 <kuribas> rather react is pseudo FRP for javascript.
21:30:11 <ldlework> so Reflex is a generic framework for doing FRP in haskell?
21:30:25 <ldlework> Is it for web-development, or like, more general than that
21:31:04 <kuribas> I am not that familiar with it, but I'd say it's mostly for the web, yes...
21:31:32 ec_ joins (~ec@gateway/tor-sasl/ec)
21:32:40 × Guest7922 quits (~chris@81.96.113.213) (Ping timeout: 240 seconds)
21:33:41 × tdidrfyls^ quits (~tdidrfyls@68.101.54.227) (Ping timeout: 268 seconds)
21:34:21 <sm> lots of reflex packages: https://hackage.haskell.org/packages/search?terms=reflex
21:34:21 <Boarders> is there a nice way to do your own custom errors in a alex+happy parser?
21:34:37 <sm> wow. I guess reflex works
21:36:44 <newbie> Hi again, I could not make it work. I do realize something is very wrong with the type signatures i pass around, just not how to fix it. I have created a pastebin with a minimized problem: https://pastebin.com/Pc8KA4dv
21:37:11 <newbie> Question from before: I have a question regarding '>>=' of Either. If I want to apply it to a tuple containing Either instead i.e (Either SomeData a, String), how can I lift '>>=' such that it operates on tuples?
21:37:26 cuz joins (~user@38.140.58.234)
21:37:29 <newbie> Namely to define ">>=" for Test without patternmatching on Either
21:38:22 <kuribas> newbie: what is you monad doing with those integers?
21:38:25 <kuribas> collecting them?
21:38:59 <newbie> Just collecting them
21:39:12 hexfive joins (~eric@50.35.83.177)
21:39:14 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:39:58 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 252 seconds)
21:40:12 <newbie> I just realize '>>=' for either would never concatenate the integer list, thus it would never work
21:40:20 × hexfive quits (~eric@50.35.83.177) (Client Quit)
21:40:55 <kuribas> then ExceptT SomeData (ReaderT String (WriterT [Integer])) ?
21:41:11 <kuribas> erm Writer, not WriterT
21:41:27 <kuribas> or ExceptT SomeData (ReaderT String ([Integer],))
21:41:51 waleee joins (~waleee@h-98-128-228-119.na.cust.bahnhof.se)
21:42:29 <newbie> Damn okay, that seems way to complicated to me
21:42:58 × cuz quits (~user@38.140.58.234) (Ping timeout: 260 seconds)
21:43:01 <newbie> Is pattern matching in declarations of 'bind' necessarily a bad idea?
21:43:34 <kuribas> newbie: just use GeneralizedNewtypeDeriving.
21:43:42 <kuribas> No need to write any instances.
21:43:46 <ldlework> newbie: is the goal to make a Test Monad where you can compose a bunch of tests together and get some structure with all the results as Eithers
21:44:06 <ldlework> or to short circuit on the first test
21:44:09 <ldlework> that fails
21:44:35 <newbie> It should short-circuit on the first test that fails
21:44:41 <dsal> > Right [1] <> Right [2]
21:44:43 <lambdabot> Right [1]
21:44:46 favonia joins (~favonia@user/favonia)
21:44:59 <dsal> Huh. That's interesting.
21:45:06 <dsal> > Just [1] <> Just [2]
21:45:08 <lambdabot> Just [1,2]
21:45:18 <dsal> Who thought that was a good idea?
21:45:43 <ldlework> dsal: there might be multiple monads
21:45:55 <ldlework> wait no, i'm dumb
21:46:03 <newbie> It's for a school assignment, so the declarations is static. I have made a solution that works using pattern matching in ">>=" declaration of 'Test' , however I just wanted to see if I could utilize monads some more
21:46:23 System12_ joins (~System123@net-37-179-171-3.cust.vodafonedsl.it)
21:46:46 <ldlework> newbie: they have you do haskell at school?
21:46:55 <newbie> Oh yes
21:47:08 <dsal> ldlework: It's surprising when `Maybe` and `Left x` behave differently.
21:47:14 <dsal> Er, `Either x`
21:47:25 <ldlework> newbie: dope
21:47:49 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
21:47:54 × jokleinn quits (~jokleinn@user/jokleinn) (Quit: WeeChat 3.2)
21:48:04 <newbie> We have 3 weeks of Haskell, 3 weeks of Erlang and then an exam where you have to write a pretty big program in both within a week
21:48:59 <kuribas> 3 weeks is very short
21:49:30 × System123 quits (~System123@ec2-52-61-197-79.us-gov-west-1.compute.amazonaws.com) (Ping timeout: 260 seconds)
21:49:47 <ldlework> I'm only like 6 days in :P
21:49:56 <newbie> I wish we had some more weeks ya, Haskell is a language I really have wanted to learn for years
21:50:04 <ldlework> oh, that's the length of the whole program?!
21:50:24 <ldlework> i thought you were saying you had three weeks under your belt
21:50:36 <ldlework> newbie: I think >=> can come into play here
21:50:41 <newbie> Oh no, that is the program/course
21:51:22 × System12_ quits (~System123@net-37-179-171-3.cust.vodafonedsl.it) (Ping timeout: 260 seconds)
21:51:37 <newbie> Got any ideas about how?
21:51:50 × favonia quits (~favonia@user/favonia) (Ping timeout: 260 seconds)
21:52:15 jokleinn joins (~jokleinn@user/jokleinn)
21:52:46 <ldlework> newbie: still thinking about it
21:53:10 × michalz quits (~michalz@185.246.204.61) (Remote host closed the connection)
21:53:19 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
21:53:54 <kuribas> newbie: can you explain the problem?
21:54:00 <ldlework> it kind of feels wierd
21:54:06 <ldlework> because the function is inside the Test Monad
21:54:25 <ldlework> what are the semantics of >>= supposed to be
21:54:41 <ldlework> it feels like the thing desired is some associativity
21:54:57 <ldlework> t1 <> t2 <> t3 == some Either
21:55:05 <kuribas> :t runReaderT . runExceptT
21:55:07 <lambdabot> ExceptT e (ReaderT r m) a -> r -> m (Either e a)
21:55:20 <ldlework> Ah I don't know the Reader monad yet
21:55:34 <ldlework> I should finish HFFP..
21:55:38 <kuribas> substitute m = ([Integer],)
21:55:42 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
21:55:49 <kuribas> that's your monad.
21:56:01 sleym joins (~sleym@195.181.171.237)
21:56:05 <kuribas> Not sure it's the one you need for the problem though...
21:56:34 <kuribas> Also, appending lists is very inefficient.
21:57:31 <ldlework> kuribas: without Reader would it be enough to implement Monoid for Test?
21:57:42 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
21:58:08 <ldlework> run the test, return either a Left failure, or a Right Integer composed with a recursive call to the rest of the tests
21:58:28 × sleym quits (~sleym@195.181.171.237) (Client Quit)
21:59:03 <ldlework> t1 <> t2 == Either (SomeData a) [Integer]
21:59:35 <kuribas> ldlework: I have no idea what this function is supposed to do...
21:59:43 <ldlework> which one
21:59:48 <kuribas> What's SomeData? What's String?
21:59:57 <kuribas> The one from newbie
22:00:00 <ldlework> kuribas: it's in his pastebin
22:00:11 <ldlework> I think SomeData is a catch all for reporting errors
22:00:16 <ldlework> the successes are single integers
22:00:28 <newbie> SomeData is a catch for all reporting errors
22:00:29 <ldlework> the result should either be a Left SomeData a, or a Right [Integer]
22:00:46 <newbie> Test does a computation given the "string input"
22:00:50 <ldlework> so it feels like all you need is monoid
22:01:25 <newbie> And side effects is passed into the [Integer] : 0 = no side effect, 1 = side effect
22:01:34 × jokleinn quits (~jokleinn@user/jokleinn) (Quit: WeeChat 3.2)
22:02:24 ec_ joins (~ec@gateway/tor-sasl/ec)
22:03:01 <kuribas> That sounds more like sequence...
22:03:14 shailangsa joins (~shailangs@host86-186-132-44.range86-186.btcentralplus.com)
22:04:03 <kuribas> :t sequence
22:04:04 <lambdabot> (Traversable t, Monad m) => t (m a) -> m (t a)
22:04:54 favonia joins (~favonia@user/favonia)
22:04:58 <kuribas> you run all the tests, and collect the errors.
22:05:27 <kuribas> newbie's description isn't very clear...
22:05:35 <kuribas> Why does he need monad here?
22:05:35 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:05:48 <kuribas> Does the result of one test depends on the other test?
22:05:55 <monochrom> This is a school assignment right? Could we see the verbatim school assignment, not your interpretation?
22:06:15 <monochrom> Because my data shows that students always misinterpret everything on the assignment handout.
22:06:30 <monochrom> Or at least those students who actually need help.
22:07:11 <newbie> It is my bad, I tried to obfuscate the types and assignment since one of my teachers is admin in here
22:07:40 <newbie> I'll try to come up with a better explanation, 1 sec
22:08:05 <geekosaur> heh
22:08:17 <monochrom> Oh, I don't think they will mind you asking, as long as the answerers, in turn, are careful about what help to provide.
22:08:23 <monochrom> err
22:08:31 <monochrom> nah, no typo.
22:11:35 <ProofTechnique> I barely did my own homework, I'm not about to start giving away answers for other people's 😄
22:11:42 <monochrom> haha
22:11:47 × OscarH quits (~OscarH@054449d6.skybroadband.com) (Ping timeout: 245 seconds)
22:11:59 <hpc> irc is the original proof of work protocol
22:13:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
22:13:53 slowButPresent joins (~slowButPr@user/slowbutpresent)
22:14:38 × Erutuon quits (~Erutuon@user/erutuon) (Quit: WeeChat 2.8)
22:16:16 <newbie> I created a formulation more 1:1 with my assignment
22:16:17 <newbie> https://pastebin.com/KPZQDeyN
22:17:03 <newbie> Oh lord, bad formatting. This one is better https://pastebin.com/JHKrCSHJ
22:17:09 wroathe joins (~wroathe@c-75-72-98-163.hsd1.mn.comcast.net)
22:17:09 × wroathe quits (~wroathe@c-75-72-98-163.hsd1.mn.comcast.net) (Changing host)
22:17:09 wroathe joins (~wroathe@user/wroathe)
22:18:02 <newbie> I have included my working solution using pattern matching - however I wish to avoid that somehow since it seems kinda un-Haskell'y
22:18:27 <kuribas> err, what is unhaskelly about it?
22:18:44 <awpr> :t first
22:18:45 <Cajun> i find guards to be more non-idiomatic than pattern matching
22:18:45 <lambdabot> Arrow a => a b c -> a (b, d) (c, d)
22:18:48 <awpr> :t fst
22:18:49 <lambdabot> (a, b) -> a
22:18:50 <monochrom> I bet it means "writing code by hand".
22:18:59 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:18:59 × seventhCrow quits (crow@gateway/vpn/protonvpn/seventhcrow) (Remote host closed the connection)
22:19:25 seventhCrow joins (crow@gateway/vpn/protonvpn/seventhcrow)
22:19:33 <newbie> My teacher seems to want us to utilize Monads in every possible case
22:20:01 <monochrom> Well that's one of the possible misinterpretations I was talking about.
22:20:44 <monochrom> I completely never worried about how you changed type names away from the original assignment. I'm sure you didn't goof that part.
22:21:10 × favonia quits (~favonia@user/favonia) (Ping timeout: 252 seconds)
22:21:10 <monochrom> But what your actual job is, every student who seek help always misinterpret that.
22:22:40 <monochrom> In particular since the tuple order is (Either SomeError a, [String]) rather than ([String], Either SomeError a), you will not be able to "utilize Monads" to the fullest extent.
22:22:55 <monochrom> s/you will not/no one will/
22:23:39 <awpr> it almost looks like it's designed to force you to implement it directly instead of with easy DerivingVia trickery
22:24:17 <awpr> ...although maybe if a student knows to use DerivingVia and what via type would get the right result, they should be able to do that :)
22:24:55 <monochrom> Concretely, there are two points on why the not-working version is not working.
22:25:33 <monochrom> "f (first t)" is a type error after you find out correctly the type of t. It doesn't fit there.
22:25:52 <newbie> I see, thank you guys. It is still somewhat hard to comprehend Haskell within the first week of learning it, which is why I wanted to find out if I could do something smarter than what I did
22:26:17 <kuribas> newbie: I don't think you're supposed to do something smart.
22:26:23 <ProofTechnique> (I'm mostly just mystified by the lack of Functor and Applicative instances)
22:26:27 <monochrom> And if you look at the working version, you find that you don't unconditionally do "runTest (f whatever)". You do it only under one condition.
22:26:48 <monochrom> In the not-working version, you're doing it unconditionally.
22:27:08 <awpr> never hurts to learn by practicing though, even if the assignment is perfectly content with being implemented by direct pattern matching
22:27:45 <newbie> The conditional thing actually makes sense
22:27:50 <kuribas> awpr: it hurts if they try to do advanced stuff, when they don't grasp the simple stuff.
22:28:04 <kuribas> Doing pattern matching is fine.
22:28:17 jokleinn joins (~jokleinn@user/jokleinn)
22:28:28 <awpr> depends on what "hurts" means. "my brain hurts" maybe, but if they figure it out after a few hours of trying by choice / for fun, then that's learning
22:28:30 <newbie> awpr: Exactly: I already have a working solution for the assignment, so trying to explore other options and learn from that is very nice
22:29:43 <ProofTechnique> The only stylistic thing you _could_ do (and you definitely don't _need_ to) is to reorder the cases and replace your `(Left a, x) -> (Left a, x)` with something like `err -> err`, since you don't need to inspect or do anything with any of the components
22:30:01 <newbie> At least that is how I learn. Next time I experience a similar problem I will not spend hours wondering about it
22:30:30 <newbie> ProofTechnique: Oh ya ofc, thanks : )
22:31:43 <kuribas> newbie: well, the short way would be to use the monad stack.
22:32:36 <ProofTechnique> Simply replace all this completely readable pattern matching with an inscrutable transformer stack!
22:33:00 <ProofTechnique> That'll show the TA what's what :D
22:33:59 <kuribas> ProofTechnique: he wanted to know what's after the manual implementation :-)
22:34:28 <newbie> I do not know what that is lol
22:35:05 <kuribas> newbie: composition of monads.
22:35:19 <monochrom> They just mean there is a way to refactor Env -> (Either SomeError a, [String]) into 3 pieces, and then it won't suck.
22:35:54 <kuribas> well, then I can be lazy, and let the compiler infer the instances.
22:36:03 <newbie> So a monad stack is utilizing MonadTransformers?
22:36:09 <kuribas> yes
22:36:49 <kuribas> you "stack" the monad transformers on top of each other, hence "monad stack".
22:36:59 <monochrom> My POV is that if you do that, there are 2 annoying newtype wrappers that get into the way, it will still be ugly.
22:37:10 <kuribas> monochrom: coerce?
22:37:26 <newbie> Ah nice, makes sense
22:37:34 <monochrom> Ugh do you teach coerce in a course? Any course?
22:37:36 <ProofTechnique> If you want the compiler to write code for you, just ask the nearest Simon to do it instead
22:37:44 <newbie> I think I have to work a little more with monads before utilizing Monad Transformers tho
22:37:52 <kuribas> monochrom: of course not
22:38:51 <ProofTechnique> Oh, that reminds me: Seeing as it's school season again, we should get a list of active courses and their problem sets so we can get ahead of the questions :)
22:39:42 pfurla_ is now known as pfurla
22:40:19 <ProofTechnique> Professors of IRC, post your syllabus so we can prepare maximally cryptic pointfree solutions to homework questions
22:40:31 <newbie> :D
22:40:34 <monochrom> haha
22:41:01 <monochrom> I don't think pointfree is all that hot any more.
22:41:02 <awpr> we can insert 0-width spaces to fingerprint our solutions
22:41:12 <geekosaur> ContT
22:41:15 <monochrom> The rage is with either linear types or type-level tricks.
22:41:19 <hpc> zygohistomorphic prepromorphisms?
22:41:50 <ldlework> i usually let hlint eta reduce my stuff
22:42:01 <ldlework> dunno if it's a good habit yet
22:42:32 <dsal> hlint has some good suggestions and some really weird ones.
22:42:36 <monochrom> There was once I inserted or delete spaces or puntuations to fingerprint my solutions.
22:42:41 <dsal> The trick is to find two people who can agree on either of those categories.
22:43:16 <monochrom> I had 6 TAs, 1 of them was leaking my solution to help students cheat, I wanted to find out who.
22:43:16 <awpr> "use operator sections" on alphanumeric names is a particularly weird one
22:43:20 <ProofTechnique> "It's very simple. Just start with `data family Homework a` ..."
22:44:14 <monochrom> So when I sent solutions to TAs for preparation, each TA received a different addition or deletion of spaces or puntuations.
22:44:16 <ldlework> awpr: do you ever do that yourself?
22:44:25 <ldlework> sometimes I have done (`foo` val)
22:44:25 <dsal> I do that some sometimes.
22:44:47 <awpr> if HLint bugs me about it I'll generally just do it, but stream of consciousness I tend to end up writing `flip foo val`
22:44:52 <monochrom> So when the cheating student submitted my solution obtained through a TA, I was able to identify the TA.
22:44:53 <dsal> hlint author hates flip
22:45:09 <monochrom> The students and the TA were successfully convicted.
22:45:10 <ProofTechnique> Those are some bush league cheaters, sheesh. Imagine copying and pasting like a rube :/
22:45:45 <awpr> sounds like some old spy story where an agency intentionally leaked subtly different information to their agents to find out who was leaking
22:45:52 <ldlework> i think sectioning is cool, because flipping is like a "natural need" based on the nature of what we're doing
22:45:58 <monochrom> awpr, I think "map (`mod` 7) [a,b,c]" is fairly OK.
22:46:02 <ldlework> so it's nice to have a tiny sugar for it
22:46:17 <ldlework> yeah that
22:46:25 × kuribas quits (~user@ptr-25vy0i9fqiblx2l1e59.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
22:46:27 <awpr> monochrom: yeah, it's perfectly fine IMO, just not sure I see the need to have a linter forbid the alternative for all prefix functions
22:46:49 <monochrom> all (`elem` ['a'..'z']) mystring
22:46:56 <ldlework> is hlint configurable in that sense?
22:46:57 <monochrom> at which point it read like English
22:46:59 <ldlework> like eslint
22:47:04 <monochrom> at which point it read like COBOL, too
22:47:09 hyiltiz joins (~quassel@31.220.5.250)
22:47:19 × newbie quits (~newbie@80-196-109-198-dynamic.dk.customer.tdc.net) (Remote host closed the connection)
22:47:20 <ProofTechnique> flip is a subtle poison. I use it, too, but it gets out of hand so fast if you let it :D
22:47:23 <awpr> yeah, those uses and plenty of others do look better than with flip, IMO
22:47:44 <monochrom> Oh yeah, hlint is opinion, not linter. False advertising.
22:48:19 <monochrom> "map (\x -> mod x 7)" is fine. Everyone does not have to code like a smart*ss.
22:48:40 <ldlework> i have an irrational aversion to haskell's lambdas
22:49:11 <ProofTechnique> 80% of my interaction with hlint is idly writing `fmap foo`, seeing it's not the shape I want, sticking `sequence .` on the front and being chided for forgetting that every single problem reduces to `traverse`
22:49:15 <ldlework> for some reason I wish you could either `x -> f x` or `(x, y) -> f x y`
22:49:41 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
22:49:49 <awpr> backslash is a lambda letter with a missing leg
22:50:00 <monochrom> You will want |->, which is what mathematicians do.
22:50:06 <ldlework> yeah but the parser isn't strong enough to not require parens everywhere
22:50:14 <ldlework> or grammar or whatever
22:50:20 <ProofTechnique> Turn on UnicodeSyntax and ensure that no one will ever work with you. Problem solved
22:50:25 <ldlework> haha
22:50:30 <monochrom> Why do you have an irrational aversion to parentheses?
22:50:42 <awpr> time for Lisp exposure therapy
22:50:42 <ldlework> monochrom: just those ones, with the \ it just gets noisy
22:50:49 <ldlework> i come from a lisp background!
22:50:49 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
22:51:02 <ldlework> well, i mean, i have lots of lisp experience!
22:51:07 <monochrom> "map ((x,y) |-> f x y)" is fine.
22:51:19 <ldlework> afterall, it is an irrational aversion
22:51:21 <monochrom> "map (x,y) |-> f x y" is the confusing one. You need parentheses.
22:51:42 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
22:51:54 <ProofTechnique> Be a monster and turn on BlockArguments just for `map do \(x, y) -> f x y`
22:52:34 <awpr> from a parsing perspective, it might be helpful to have the lambda up front to avoid parsing as an expression and then backtracking. I don't remember if patterns have a separate grammar from expressions, though -- seems like they should with ViewPatterns, AsPatterns, etc.
22:52:40 <dsal> Agda manages to let you just use λ
22:53:02 <ProofTechnique> Sure, but it's spelled \Gl, which is a lot
22:53:08 <ldlework> be like python and just type `lambda` everywhere
22:53:18 <monochrom> patterns have to have a separate grammar from expressions.
22:53:24 <dsal> I use λ as a parameter in a thing that uses AWS lambda.
22:53:30 <monochrom> "f * g" is an expression, but not a pattern.
22:53:33 <ldlework> nerd
22:54:09 <awpr> I mean, it could parse as a pattern and get rejected by some sanity check, if you really wanted to unify them. but yeah, I agree they should be separate
22:55:24 <monochrom> But yeah language designers try to stay within LALR(k) or something for parser efficiency.
22:55:30 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
22:55:46 <ProofTechnique> The sanity check that rejects it is having a separate grammar :)
22:56:24 <monochrom> which is arguably silly for a language that goes on to do exponential-time type inference.
22:56:48 <monochrom> Cubic-time parsing is nothing compared to type inference.
22:57:33 <awpr> even worse is GHC.Generics generating pathological cases for type inference to deal with :)
22:57:42 <awpr> or rather DeriveGeneric
22:58:02 <ProofTechnique> I would hope the n is quite a bit smaller in the type inference case than in the parsing case, but then I remember deriving chicanery
23:02:37 ec_ joins (~ec@gateway/tor-sasl/ec)
23:04:46 <ldlework> anyone know how to use time in hylogen/hylide?
23:05:34 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
23:05:54 <ldlework> nm just got it working
23:07:21 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:07:21 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
23:07:21 wroathe joins (~wroathe@user/wroathe)
23:07:30 <ProofTechnique> I have never seen that library before, but it looks very cool
23:10:32 aegon joins (~mike@174.127.249.180)
23:11:13 <aegon> is do notation left or right associative in desugaring? bind and >> are left but do is right or am i wrong about right and right is left o_o
23:12:06 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 260 seconds)
23:12:08 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
23:12:40 <awpr> seems effectively right-associative, in that the stuff after a do-statement is all contained inside the lambda that's given to the first >>=
23:13:32 <ldlework> Where `c` is a `Vec4 a a a a` I wonder how to translate `fract(c.xxxw + K.xyzw)` into hylogen
23:13:48 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
23:13:50 <awpr> the left associativity of >>= is a different matter -- it controls what happens when you write `x >>= f >>= g`, namely that it's the only associativity that typechecks that expression
23:13:56 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:13:56 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
23:13:56 wroathe joins (~wroathe@user/wroathe)
23:14:15 <ldlework> aka swizzling
23:14:24 mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
23:14:37 <awpr> meanwhile if you have unparenthesized lambdas, associativity doesn't come into play, it's just the parsing of the lambda eating the rest of the expression
23:15:06 <aegon> awpr: thats the source of a bunch of accidently quadradic perf problems if i'm understanding hte reading correct though
23:15:55 <awpr> having left-associated binds? yeah, it can be slower for some monads, but just moving the parens around doesn't type-check anymore
23:17:03 <aegon> ldlework: i'm just seeing hylogen but it looks like there are a bunch of swizzle funcs already defined here https://hackage.haskell.org/package/hylogen-0.1.5.1/docs/Hylogen-Types-Vec.html
23:17:10 <ldlework> i just found those!
23:17:13 <ldlework> thank you aegon
23:17:22 <aegon> np!
23:18:27 <aegon> awpr: thanks for the insight, gonna play around with paren places in ghci to see more what you mean
23:19:10 <awpr> `x >>= f >>= g` <-> `x >>= (f >=> g)`
23:19:43 <aegon> :t (>=>)
23:19:44 <lambdabot> Monad m => (a -> m b) -> (b -> m c) -> a -> m c
23:19:53 <awpr> <-> `x >>= \y -> f y >>= g`
23:20:49 <awpr> tbh I never actually thought about successive >>=s being a potential performance issue until now. will have to keep that in mind and remember to use the fish operator version
23:23:27 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
23:23:44 × xsperry quits (~as@user/xsperry) (Remote host closed the connection)
23:24:08 <aegon> i haven't run into anyone suggesting (>=>) in the posts as a way to guard against it, thats kinda neat
23:27:47 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
23:30:41 retroid_ joins (~retro@176.255.22.194)
23:31:08 <ProofTechnique> How does that get rid of binds?
23:31:30 <awpr> it right-associates them so you don't repeatedly re-traverse the same structure you just built
23:31:37 × retro_ quits (~retro@176.255.22.194) (Ping timeout: 252 seconds)
23:32:16 <awpr> I think the docs of `Codensity` in `kan-extensions` describe the issue pretty well
23:32:42 <ProofTechnique> I've only ever seen this bind performance thing come up in the context of free monads, but I'll go read kan-extensions for the details :)
23:33:53 ec_ joins (~ec@gateway/tor-sasl/ec)
23:34:20 <ProofTechnique> Oh, lol, the linked paper is exactly "Asymptotic Improvement of Computations over Free Monads" :D
23:36:36 × ec_ quits (~ec@gateway/tor-sasl/ec) (Client Quit)
23:38:21 <ProofTechnique> Oh, gosh, GHC 6.6. I think 6.8.3 was the first GHC I used. The years do fly by
23:38:23 <monochrom> Yeah it's mainly for free monads that are coded up as an ADT.
23:38:47 <ldlework> Looks like Hylogen is abandoned and it only has minimal support. Dang!
23:38:50 chris joins (~chris@81.96.113.213)
23:38:54 chris is now known as Guest640
23:39:00 <monochrom> But even then I am skeptical about how often it hurts. It is not like you have left recursion all that often.
23:39:42 <ldlework> my dreams of fast game-of-life in haskell are dying ^_^
23:40:01 <ProofTechnique> Revive it!
23:40:28 <ProofTechnique> I'm very much looking forward to delimited continuations to happen so I can try out eff without Herculean effort
23:41:05 tdidrfyls^ joins (~tdidrfyls@68.101.54.227)
23:41:10 <ProofTechnique> Polysemy is still very nice, but eff has that sports car sheen
23:42:34 × MQ-17J quits (~MQ-17J@8.21.10.6) (Ping timeout: 252 seconds)
23:45:22 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Read error: Connection reset by peer)
23:45:44 geekosaur joins (~geekosaur@xmonad/geekosaur)
23:46:39 <ldlework> https://github.com/jaredloomis/andromeda
23:46:43 <ldlework> this library isn't on hackage
23:46:46 <ldlework> how do i install it?
23:48:10 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds)
23:49:55 System123 joins (~System123@net-37-179-171-3.cust.vodafonedsl.it)
23:50:04 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
23:50:04 allbery_b joins (~geekosaur@xmonad/geekosaur)
23:50:07 allbery_b is now known as geekosaur
23:50:29 <aegon> ldlework: with stack you specify the git repo as an external source in your stack.yaml then add the dependency to your package.yaml, with cabal you...
23:51:05 <geekosaur> you can also download it and use "cabal install" without naming a package, usually
23:51:13 <ProofTechnique> https://cabal.readthedocs.io/en/3.4/cabal-project.html#specifying-packages-from-remote-version-control-locations
23:51:16 <ldlework> i'm using NixOS and the only good info I can find is using cabal
23:51:24 <geekosaur> from the directory with the cabal file (or cabal.project file)
23:52:03 <ProofTechnique> Idlework: Are you looking to install it in your global package set, or in a project shell? Are you using haskell.nix?
23:52:33 <aegon> ldlework: https://cabal.readthedocs.io/en/latest/cabal-project.html#specifying-packages-from-remote-version-control-locations
23:52:37 <ProofTechnique> Essentially you just want to write an overlay (or maybe the fancy thing is flakes now) to override `haskellPackages` and add it to the set
23:53:01 <ProofTechnique> How to do that nicely depends a little bit on your setup
23:55:25 × mikoto-chan quits (~mikoto-ch@83.137.2.242) (Ping timeout: 265 seconds)
23:56:52 × System123 quits (~System123@net-37-179-171-3.cust.vodafonedsl.it) (Ping timeout: 265 seconds)
23:57:10 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
23:59:04 justsomeguy joins (~justsomeg@user/justsomeguy)
23:59:40 <ldlework> ProofTechnique: here is the repo I'm working with https://github.com/dustinlacewell/andromeda-hs

All times are in UTC on 2021-09-16.