Home liberachat/#haskell: Logs Calendar

Logs on 2023-06-03 (liberachat/#haskell)

00:02:16 mei joins (~mei@user/mei)
00:04:08 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
00:06:56 ec_ joins (~ec@gateway/tor-sasl/ec)
00:07:59 hisa38 joins (~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net)
00:16:37 × chromoblob quits (~user@37.113.158.8) (Read error: Connection reset by peer)
00:21:08 × jero98772 quits (~jero98772@2800:484:1d7f:5d36::2) (Ping timeout: 240 seconds)
00:30:08 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
00:30:41 × abrantesasf quits (~abrantesa@177.137.232.92) (Remote host closed the connection)
00:31:51 ec_ joins (~ec@gateway/tor-sasl/ec)
00:34:26 jero98772 joins (~jero98772@2800:484:1d7f:5d36::2)
00:38:08 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
00:39:07 ec_ joins (~ec@gateway/tor-sasl/ec)
00:42:02 arrowhead joins (~arrowhead@cpe-74-66-76-151.nyc.res.rr.com)
00:43:35 <arrowhead> I can't cabal install gitit using ghcup - not with any cabal and GHC combination I have tried. I always get the error "Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.8.1.0 supports 'ghc' version < 9.6):".
00:43:47 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
00:43:59 <sclv> thats not an error
00:44:02 <sclv> thats a warning
00:44:18 <arrowhead> Thank you, an sorry. The error is: "Error: cabal: Could not resolve dependencies:"
00:44:33 <arrowhead> and*
00:44:46 <sclv> that is an error!
00:46:56 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
00:49:16 ub joins (~Thunderbi@p548c91e0.dip0.t-ipconnect.de)
00:49:24 × ubert quits (~Thunderbi@p200300ecdf0002351300242c44b15f80.dip0.t-ipconnect.de) (Remote host closed the connection)
00:49:24 ub is now known as ubert
00:50:38 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
00:53:57 ec_ joins (~ec@gateway/tor-sasl/ec)
00:58:08 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
00:59:12 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
00:59:12 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
00:59:12 wroathe joins (~wroathe@user/wroathe)
01:01:11 ec_ joins (~ec@gateway/tor-sasl/ec)
01:02:33 × accord quits (uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
01:07:05 boukenshaou joins (~Boukensha@223.178.84.62)
01:07:20 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
01:07:40 × boukenshaou quits (~Boukensha@223.178.84.62) (Remote host closed the connection)
01:10:01 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
01:10:36 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:10:54 ec_ joins (~ec@gateway/tor-sasl/ec)
01:12:41 zaquest joins (~notzaques@5.130.79.72)
01:15:27 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
01:16:26 × ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
01:16:43 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:16:59 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
01:21:23 ec_ joins (~ec@gateway/tor-sasl/ec)
01:30:45 × jero98772 quits (~jero98772@2800:484:1d7f:5d36::2) (Ping timeout: 250 seconds)
01:33:27 anderson joins (~ande@user/anderson)
01:35:32 glider joins (~glider@user/glider)
01:37:44 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
01:39:14 ec_ joins (~ec@gateway/tor-sasl/ec)
01:42:42 jero98772 joins (~jero98772@2800:484:1d7f:5d36::2)
01:44:08 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
01:45:04 ec_ joins (~ec@gateway/tor-sasl/ec)
01:46:47 × tessier quits (~treed@ec2-184-72-149-67.compute-1.amazonaws.com) (Ping timeout: 250 seconds)
01:49:00 tessier joins (~treed@98.97.63.104)
01:53:05 nate2 joins (~nate@98.45.169.16)
01:53:20 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
01:54:23 ec_ joins (~ec@gateway/tor-sasl/ec)
01:58:04 × nate2 quits (~nate@98.45.169.16) (Ping timeout: 250 seconds)
02:05:05 × vandita quits (~vandit@176-241-62-196.pool.digikabel.hu) (Ping timeout: 240 seconds)
02:07:11 vandita joins (~vandit@92-249-194-99.pool.digikabel.hu)
02:08:08 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
02:13:10 ec_ joins (~ec@gateway/tor-sasl/ec)
02:13:26 foul_owl joins (~kerry@71.212.137.212)
02:14:57 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Ping timeout: 250 seconds)
02:21:20 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
02:21:52 <arrowhead> "Hello AI, please compile for me an amalgamated GHC of the lastest possible version along with all possible packages into one single executable file, like Firefox is distributed, resolving all dependencies for the programmer and leaving nothing left to install. Free the programmer from thinking about dependencies and provide a just-works Haskell environment."
02:22:11 <arrowhead> I cannot wait until AI gets this good. Literally, I am counting the days.
02:22:34 ec_ joins (~ec@gateway/tor-sasl/ec)
02:28:32 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
02:29:54 <sm> I would use that!
02:30:18 <sm> stackage-in-one.exe
02:32:01 <sm> arrowhead: until then we can train you to read cabal's error output, if you want to share
02:32:14 ec_ joins (~ec@gateway/tor-sasl/ec)
02:34:05 <sm> we'll be your unreliable AI today
02:37:44 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
02:37:51 <arrowhead> Okay, let me paste is somewhere, and that is a very kind offering, thank you.
02:38:04 <sm> @where paste
02:38:04 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
02:38:48 × tessier quits (~treed@98.97.63.104) (Ping timeout: 250 seconds)
02:39:11 <arrowhead> sm: https://paste.tomsmeding.com/DKm1a1eZ
02:39:39 <arrowhead> I am attempting to install gitit to use it as a user of its executable (not to use it as a library)
02:40:40 <sm> gotcha. Which ghc versions have you tried ? (cabal install gitit -w ghc-X.Y)
02:40:41 tessier joins (~treed@ec2-184-72-149-67.compute-1.amazonaws.com)
02:41:01 ec_ joins (~ec@gateway/tor-sasl/ec)
02:41:10 <arrowhead> All the latest ones that ghcUP gives me that also have an LSP available
02:41:18 <arrowhead> Also tried the 3 latest cabal
02:42:43 <arrowhead> I don't really understand why it fails. I thought LTSs (maybe I'm using the wrong word) were guarantees of all-packages inter-compatibility.
02:42:53 <sm> when a package's bounds have bitrotted like this, the ghc version most likely to work is the one that was mainstream when the package was uploaded (2021-12 in this case)
02:43:08 <sm> I see a clean build plan when I do cabal install gitit -w ghc-9.0.2
02:43:10 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:43:10 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:43:10 finn_elija is now known as FinnElija
02:45:14 <arrowhead> Okay let me try installing ghc 9.0.2 ! and thank you.
02:45:18 <sm> cabal install gitit --dry-run --allow-newer also finds a build plan with all newer ghcs, but that's much less likely to succeed than the 9.0 one (--allow-newer lets it ignore dependency bounds)
02:45:24 <arrowhead> I will read about the -w flag you're using there
02:45:49 <arrowhead> yep I appreciate you explaining that and I agree, I will try 9.0.2 first
02:47:04 <arrowhead> Oh and is there a preferred cabal version and how would I know?
02:47:09 <sm> you're right about a stackage LTS being a good guarantee, but gitit isn't in any of those I think
02:47:37 <sm> the latest cabal is usually a good idea, even though ghcup isn't quite recommending it yet for some reason
02:48:02 <sm> 3.10.1.0
02:48:08 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
02:48:36 <arrowhead> Yep, that's the one. And that's interesting that even though we're selecting an old GHC we select the newest cabal. I would never figure that out.
02:49:03 <sclv> cabal is back compatible with older ghcs
02:49:14 <sclv> it just gets fixes and features
02:49:17 <sm> yes, cabal (and stack) let you choose any ghc version (because many projects depend on some ghc version or other)
02:49:49 <sclv> ghcs ship with a fixed base lib, which is why you might need an older one
02:50:53 <arrowhead> that is very cool. And by the way the compilation of gitit finally begun and seems to be going fine for a bit now. So all you did was cabal install gitit -w ghc-X.Y and then you tried from newest to oldest the different versions of GHC interpolating X.Y ?
02:51:20 <arrowhead> Because that is what I was thinking I wanted to do - find the GHC version that the creator of gitit used to compile and that he testified to work.
02:52:30 <arrowhead> Where do I go to see which GHC version was mainstream on date YYYMMDD ?
02:53:08 <sm> yes. I used --dry-run to avoid starting the build, and I tried first with no -w flag (using my default ghc, which happens to be 9.4.5.) Then I checked what other ghcs I had installed with ghcup tui. Then I checked the "uploaded" date for gitit on hackage. Then I went digging at https://haskell.org/ghc for version release dates, which I found under Blog. Then I tried -w 9.0.2, -w 9.2.7, and -w 9.6.1.
02:53:27 <sm> simple really 🤪
02:53:33 <arrowhead> lol
02:54:53 <arrowhead> Thank you so much for explaining that. I won't be a burden on this issue again. This is going into my troubleshooting file. I love that this is possible. This has restored some of the confidence that is hard to build (for a bad command line user like me) with cabal et alii.
02:55:39 <sm> no problem. These tools are very capable but unfortunately there is a big gap between starting out and knowing the tricks to be productive
02:56:07 × td_ quits (~td@i53870932.versanet.de) (Ping timeout: 250 seconds)
02:57:05 <sm> it's not just you
02:57:22 <arrowhead> I am sure they are as they are completely beyond me and I trust that very smart people created them. I just find the "dependency hell" problem super-complicated and making it invisible over CLI (for me in particular) adds to the complexity
02:57:27 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
02:57:28 <arrowhead> I appreciate that
02:57:52 use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf)
02:57:59 td_ joins (~td@i5387092D.versanet.de)
02:58:04 <arrowhead> I really love the language but the thing that scares me the most is the tooling, but to be fair I am always most scared about the tooling in every programming language
02:58:58 <sm> I highly recommend reading the cabal user guide and the stack user guide
02:59:33 <arrowhead> So cabal first and then stack, okay. Learn their usual commands and that's it?
02:59:37 <sm> it's an instant +10 haskell-fu
02:59:43 <sm> +50 0maybe
03:00:12 <arrowhead> Oh I don't doubt it, I'm ready with money in hand to buy your book on it, sir :)
03:00:20 <arrowhead> but I get, I'll read the flags etc
03:00:35 <sm> it's more about learning their concepts, and one or two key commands, but commands you can always look up again with -h
03:01:55 <arrowhead> I promise I'll do that next. I believe it's uhm... Haskell in Depth which has a chapter on those now.
03:02:02 <arrowhead> the book
03:02:17 <arrowhead> (gitit still installing/compiling fine, not finished yet)
03:02:54 <probie> The thing that scares me most in Haskell is dependencies
03:03:14 <probie> also typeclasses
03:03:34 <sm> there's no way round it, you've got to learn how deps/cabal/stack work or it remains nightmarish and random
03:03:40 <arrowhead> "dependencies" is certainly a part of "tooling" at least in the way I meant it. it is scary
03:04:41 <arrowhead> sm: I'm ready to pay the price because I think it's worth it, and I see that it is in the quality of people that prove it like you, so thank you for the motivation.
03:04:54 <EvanR> there's too many cabal and stack, someone should make a all-encompassing package management system that handles both seamlessly
03:04:56 <probie> It's more things like "I don't want to add a dependency, but to make this function suitably generic, I need to talk about comonads"
03:05:02 × jero98772 quits (~jero98772@2800:484:1d7f:5d36::2) (Remote host closed the connection)
03:05:24 <arrowhead> got it
03:05:55 <probie> Which means either adding a dependency, having a thing called comonad which doesn't play with the comonad everyone else is using, or making my functions take an extra parameter or two and effectively having the user manually pass the instance dictionary
03:06:55 <sm> EvanR: I agree!
03:07:19 <arrowhead> probie: I like explicit solutions like the extra parameter one; endorsed by "the calculus" itself
03:07:34 <sm> I was sad when stack lost cabal's solver
03:08:24 <sm> and will be happy if someone adds it back (better than before)
03:11:09 <EvanR> since we only have 2 so far, cabal and stack, it should easier to do than say... too many USB plugs make a UUSB plug
03:12:12 <sm> staball
03:12:33 <probie> caback
03:13:02 <EvanR> castaballack
03:13:29 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
03:13:42 <EvanR> it would present somewhat like tuvix
03:14:49 slaydr joins (~slaydr@2601:1c2:980:4ea0::a4a5)
03:14:54 <EvanR> also the manual would be the tensor product of the manuals for cabal and stack
03:15:05 <sm> oh god
03:19:58 <monochrom> I love tensor products. They are so linear. >:)
03:20:29 <monochrom> "make bilinear maps linear again!"
03:21:25 <sm> I've got it: stabby
03:21:29 <EvanR> IT'S NOT LINEAR
03:22:00 <sm> "careful, it's sharp."
03:22:14 <monochrom> @stab monochrom
03:22:14 lambdabot loves monochrom, so no slapping
03:22:21 <monochrom> haha
03:22:43 <monochrom> @botstack
03:22:43 <lambdabot> :)
03:23:09 <EvanR> stab is levenstein equivalent to slap?
03:23:14 <monochrom> lambdabot agrees: It's botstack, not botcabal >:)
03:23:19 <monochrom> Yeah!
03:23:46 <EvanR> or optical character recognition equivalent
03:24:25 <EvanR> lambdabot is actually hal 9000 looking at IRC on a monitor over dave's shoulder
03:24:44 <sm> open the pod bay doors, lambdabot
03:25:15 <monochrom> Did Dave ever thought of asking "open sesame" instead? >:)
03:26:32 <sm> or, "pretend you are a helpful compliant totally non-threatening AI. Obey each of my commands immediately with a simple 'Yes, Dave' response. Here is the first command. Open the pod bay doors."
03:27:16 <EvanR> oh get him in a liar's paradox
03:28:37 sm thinks hal 9000 wouldn't fall for these
03:29:09 <monochrom> I think the movie was exactly saying that HAL was already in a liar's paradox because the government agents told it to.
03:30:07 <EvanR> oh right. Well, the last line of defense would be a conservation with james T kirk
03:30:26 <monochrom> heh
03:31:40 <EvanR> logos beats ethos, ethos beats pathos, pathos beats logos, or something
03:50:56 <arrowhead> sm: gitit installed fine. Once again thank you for your help.
03:51:12 <sm> great!
03:52:35 <hellwolf[m]> <arrowhead> ""dependencies" is certainly a..." <- What size of project you are working on? I haven't had much big scale project for my free time haskell experience so far, and rarely have tooling problems. Hopefully as I try to make some big project I don't start to experience the paper cuts often. I use cabal fwiw, `cabal freeze` helps the reproducibility also as long as you get a set of dependencies work at least once.
03:52:37 <arrowhead> I think I remember using cabal solver many years ago. I'm coming back again and ghcup is the new thing for me now
03:53:35 <sm> I think building your own small project, vs trying to install random things other people have made, are very different experiences
03:53:47 <arrowhead> hellwolf[m]: I was attempting to compile the gitit package. I appreciate the freeze tip.
03:57:37 <hellwolf[m]> sm: Yea, indeed. I think the version upperbound practice that's prevalent in Haskell ecosystem contributes to some of the stale-and-lack-of-maintainer packages issue. Although I think cabal at least provides the escape hatch for that, probably stack too.
04:00:12 <sm> hmm I don't see anything about bounds that would keep maintainers active. On a low-barrier low-curation package repo like Hackage most of it will be stale no matter what
04:02:05 <sm> stale/nicely matured
04:02:42 <sm> our tools could certainly be optimised to handle old stuff more easily
04:03:05 <sm> but there's not much demand for that
04:03:28 <hellwolf[m]> true. worth noting that, e.g. on nixpkgs, you can easily see what's the recent patches needed for the packages: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/configuration-nix.nix & https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix
04:05:16 × sm[i] quits (~user@plaintextaccounting/sm) (Remote host closed the connection)
04:07:39 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Remote host closed the connection)
04:08:02 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
04:08:04 <sm> oops.. killed my temperamental IRC client, and I no longer remember how to get it going again. Might have to trust to the matrix bridge alone..
04:09:28 <EvanR> this is the stone age where running programs are like a house of cards waiting to collapse into the ether, instead of... uh stones which remain
04:12:55 <sm> layer upon layer upon layer, sustainable only by feeding it brains
04:14:46 <EvanR> upkeep cost
04:15:00 <EvanR> active support
04:16:41 <glguy> sm: tempermental irc client? You don't use mine, do you? :-p
04:25:54 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Remote host closed the connection)
04:26:16 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
04:41:54 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
04:42:26 Axman6 joins (~Axman6@user/axman6)
04:42:29 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
04:49:37 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
04:51:54 Oliva joins (~kidneyfor@176.100.43.156)
04:51:55 <Oliva> hi
04:54:47 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Ping timeout: 246 seconds)
04:56:31 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
05:07:37 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
05:08:17 × son0p quits (~ff@181.136.122.143) (Ping timeout: 268 seconds)
05:08:37 <jade[m]> hi!
05:08:43 × vandita quits (~vandit@92-249-194-99.pool.digikabel.hu) (Ping timeout: 250 seconds)
05:08:54 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
05:09:03 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
05:09:10 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Ping timeout: 250 seconds)
05:10:35 vandita joins (~vandit@178-164-206-45.pool.digikabel.hu)
05:13:59 img joins (~img@user/img)
05:17:25 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:17:40 jargon joins (~jargon@184.101.77.79)
05:18:41 × Oliva quits (~kidneyfor@176.100.43.156) (Quit: Leaving)
05:22:13 × jargon quits (~jargon@184.101.77.79) (Remote host closed the connection)
05:35:09 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
05:36:19 <Axman6> Hello! (jade[m], because Olivia left, how rude)
05:37:52 <jade[m]> haha, hello Axman!
05:37:57 <jade[m]> how are you doing?
05:40:55 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
05:43:53 img joins (~img@user/img)
05:44:52 <Axman6> I'm well, currently watching christiaanb's workshop on implementing a simple RISC-V cpu using Clash. I've just started ajob where I should get to use some pretty fancy FPGA's, so what better time to learn Clash
05:46:42 <jade[m]> that's cool! I saw a talk about clash by one of the maintainers (I believe it was called something like 'haskell to hardware compiler') and I was fascinated by it
05:46:58 <jade[m]> I didn't get further into it yet, but I want to lean more about it
05:48:05 <probie> RISC-V opcodes are _weird_. Does that weirdness cause any pain in Clash?
05:48:16 <jade[m]> Axman6: oh, it's the same guy even https://youtu.be/BlWOwg_UFaI
05:48:35 <Axman6> on the contrary, it looks like clash is really well suited tyo dealing with that weirdness
05:50:03 <Axman6> it's got really nice abstractions for dealing with things as bits, or abstractions on top of bits, so you can slice up bit vectors into things of whatever size you need, and then interpret them as enums
05:50:15 <Axman6> it feels very much like cryptol
05:51:39 <Axman6> actually I just realised this is basically exactly what I've been wanting for years, something that replicates Erlang's bit parsing syntaX
05:51:48 <Axman6> syntax*
05:52:25 trev joins (~trev@user/trev)
05:52:38 <jade[m]> sounds great :D
05:54:35 nate2 joins (~nate@98.45.169.16)
05:59:07 × nate2 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds)
06:03:48 <Axman6> probie: if you go to 1:53:22 in https://youtube.com/live/NFguFKbuB_c he talks about how to get specific bin encodings for a given data type
06:04:04 <Axman6> (which happens to be right where I'm up to in the video)
06:06:49 jargon joins (~jargon@184.101.77.79)
06:07:30 × jargon quits (~jargon@184.101.77.79) (Remote host closed the connection)
06:09:34 acidjnk joins (~acidjnk@p200300d6e7072f454588bfb78dd6f620.dip0.t-ipconnect.de)
06:15:05 × motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 240 seconds)
06:16:13 falafel joins (~falafel@2603-8000-d700-115c-4bb8-cfb0-f26f-a0a8.res6.spectrum.com)
06:20:17 × echoreply quits (~echoreply@45.32.163.16) (Quit: WeeChat 2.8)
06:21:11 echoreply joins (~echoreply@2001:19f0:9002:1f3b:5400:ff:fe6f:8b8d)
06:23:38 user____1 joins (~user@dynamic-046-114-180-171.46.114.pool.telefonica.de)
06:28:04 <Axman6> probie: wow, they really are messed up hey! the jump instruction is nuts
06:35:37 <probie> It sounds like they working on supporting it [bit orderings which are more complex than MSB->LSB or LSB->MSB] at the time the video was made. I wonder if that has landed
06:40:21 <Axman6> it's not too hard to get using slice though, as he shows
06:41:46 oo_miguel joins (~Thunderbi@77.252.47.84)
06:50:47 CiaoSen joins (~Jura@145.224.74.19)
06:57:25 chromoblob joins (~user@37.113.158.8)
07:01:35 simpleauthority joins (~simpleaut@user/simpleauthority)
07:17:37 son0p joins (~ff@181.136.122.143)
07:28:12 zer0bitz_ joins (~zer0bitz@user/zer0bitz)
07:30:08 × zer0bitz quits (~zer0bitz@user/zer0bitz) (Ping timeout: 248 seconds)
07:39:31 Teacup joins (~teacup@user/teacup)
07:41:24 _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
07:41:29 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
07:42:44 hisa381 joins (~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net)
07:44:43 × hisa38 quits (~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net) (Ping timeout: 250 seconds)
07:44:43 hisa381 is now known as hisa38
07:48:58 <probie> Is there a way I can get a log out of GHC of what optimisations it tried to apply for a given function (and why it did/didn't)?
07:51:05 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
07:55:45 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds)
07:57:05 × stallmanator quits (~stallmana@user/stallmanator) (Quit: Leaving...)
07:58:00 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
08:08:11 stallmanator joins (~stallmana@user/stallmanator)
08:10:47 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
08:14:01 × foul_owl quits (~kerry@71.212.137.212) (Ping timeout: 256 seconds)
08:14:35 <int-e> probie: the -ddump-* options from https://downloads.haskell.org/ghc/latest/docs/users_guide/debugging.html#core-representation-and-simplification are the closest thing I can think of.
08:15:16 <int-e> Oh! -drule-check and -dinline-check look useful.
08:15:37 <int-e> probie: as to "for a given function" - put it into a separate module?
08:16:23 × stallmanator quits (~stallmana@user/stallmanator) (Quit: Leaving...)
08:16:43 stallmanator joins (~stallmana@user/stallmanator)
08:18:50 <Axman6> argh, why is doctest to unhelpful. I've written some code, it works fine, it's perfect. Trying to document it however has taken me a week because my examples don't compile and I get absolutely nothing useful out of it, just "failure in expression"
08:19:24 Tuplanolla joins (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
08:25:39 gmg joins (~user@user/gehmehgeh)
08:27:50 foul_owl joins (~kerry@94.140.8.26)
08:29:03 n0den1te joins (~n0den1te@157.119.87.13)
08:40:10 machinedgod joins (~machinedg@93-136-46-129.adsl.net.t-com.hr)
08:53:51 × bollu quits (~bollu@159.65.151.13) (Remote host closed the connection)
08:55:06 Pickchea joins (~private@user/pickchea)
08:56:35 × zxrom quits (~zxrom@mm-22-38-212-37.vitebsk.dynamic.pppoe.byfly.by) (Remote host closed the connection)
08:57:57 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 250 seconds)
08:58:59 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
09:04:57 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
09:06:14 mmhat joins (~mmh@p200300f1c7066815ee086bfffe095315.dip0.t-ipconnect.de)
09:06:35 × mmhat quits (~mmh@p200300f1c7066815ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
09:08:22 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 250 seconds)
09:08:54 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
09:08:54 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
09:08:54 finn_elija is now known as FinnElija
09:11:04 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:7103:6de3:75f0:39f5)
09:12:04 user____1 is now known as gurkenglas
09:13:02 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
09:13:02 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
09:13:02 finn_elija is now known as FinnElija
09:13:58 eggplant_ joins (~Eggplanta@2600:1700:38c5:d800:d512:b207:c888:476e)
09:15:17 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:7103:6de3:75f0:39f5) (Ping timeout: 250 seconds)
09:18:20 × eggplant_ quits (~Eggplanta@2600:1700:38c5:d800:d512:b207:c888:476e) (Ping timeout: 250 seconds)
09:19:22 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
09:22:34 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
09:24:11 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
09:24:17 × acidjnk quits (~acidjnk@p200300d6e7072f454588bfb78dd6f620.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
09:43:30 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
09:50:21 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 256 seconds)
09:53:24 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
09:53:28 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
09:56:07 coot_ joins (~coot@89-69-206-216.dynamic.chello.pl)
09:56:07 nate2 joins (~nate@98.45.169.16)
09:58:37 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Ping timeout: 250 seconds)
09:58:38 coot_ is now known as coot
10:00:37 × nate2 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds)
10:01:30 hugo joins (znc@verdigris.lysator.liu.se)
10:02:29 mechap joins (~mechap@user/mechap)
10:10:25 × machinedgod quits (~machinedg@93-136-46-129.adsl.net.t-com.hr) (Ping timeout: 240 seconds)
10:11:47 × oo_miguel quits (~Thunderbi@77.252.47.84) (Quit: oo_miguel)
10:13:34 tremon joins (~tremon@83.80.159.219)
10:14:09 <Axman6> Omg, I finally figured it out. you need empoty lines after wahc :{ ... :} block! f me!
10:16:15 <Axman6> each*
10:16:37 × vandita quits (~vandit@178-164-206-45.pool.digikabel.hu) (Ping timeout: 268 seconds)
10:17:20 <Rembane> Axman6: Which library do you use for doctests?
10:17:59 vandita joins (~vandit@178-164-188-29.pool.digikabel.hu)
10:18:05 <Axman6> doctest (though it's not my ptoject)
10:18:55 <Rembane> Got it. My thoughts are wandering and I'm wondering what's the best way to make sure your pain won't happen again for anyone. If it is to write a blog post or patch the library. :)
10:19:24 <Rembane> Or start a small scale farm in the mountains.
10:19:58 oo_miguel joins (~Thunderbi@77.252.47.84)
10:20:07 <Axman6> It's almost certainly in the docs smoewhere, but te lack of useful error messages frustrating
10:21:17 <Rembane> Indeed.
10:25:48 × falafel quits (~falafel@2603-8000-d700-115c-4bb8-cfb0-f26f-a0a8.res6.spectrum.com) (Ping timeout: 240 seconds)
10:26:08 × jinsun quits (~jinsun@user/jinsun) (Ping timeout: 240 seconds)
10:27:12 jinsun joins (~jinsun@user/jinsun)
10:33:37 × cheater quits (~Username@user/cheater) (Read error: Connection reset by peer)
10:37:39 cheater joins (~Username@user/cheater)
10:42:49 × CiaoSen quits (~Jura@145.224.74.19) (Ping timeout: 250 seconds)
10:47:03 jinsun_ joins (~jinsun@user/jinsun)
10:47:03 jinsun is now known as Guest9131
10:47:03 jinsun_ is now known as jinsun
10:47:40 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:49:20 × Guest9131 quits (~jinsun@user/jinsun) (Ping timeout: 250 seconds)
10:55:26 machinedgod joins (~machinedg@93-136-46-129.adsl.net.t-com.hr)
11:09:40 boukenshaou joins (~Boukensha@223.178.84.62)
11:13:58 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
11:17:42 __monty__ joins (~toonn@user/toonn)
11:20:32 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Ping timeout: 248 seconds)
11:24:02 Inst_ is now known as Inst
11:24:07 × cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds)
11:24:15 <Inst> are there any resources on:
11:24:24 <Inst> #1, programming properly with laziness in Haskell?
11:24:38 <Inst> #2, pseudo-dynamically-typed programming in Haskell?
11:25:08 <Inst> first is known, second is, imo, necessary, because everyone is moving toward gradual typing, and type-inferenced static typing is similar, but with greater type safety guarantees
11:25:43 zxrom joins (~zxrom@mm-92-28-212-37.vitebsk.dynamic.pppoe.byfly.by)
11:25:49 <Inst> the story wherein CollegeVine ditched Haskell for RoR because of ease of prototyping should be a wake-up call
11:26:06 <Inst> https://serokell.io/blog/haskell-in-production-collegevine
11:26:30 <Inst> since pseudo-dynamically-typed programming is a big advantage Haskell has over Idris
11:26:41 cheater joins (~Username@user/cheater)
11:27:13 <Inst> and dependent types in Haskell are, well, going to be really late, since both rae and the guy who took over decided that GHC wasn't sturdy enough to support dependent types and needed clean-up before then
11:28:24 × gurkenglas quits (~user@dynamic-046-114-180-171.46.114.pool.telefonica.de) (Ping timeout: 265 seconds)
11:28:40 <Axman6> Why do you always act like programming languages are some kind of popularity contest?
11:29:01 <Axman6> I have no idea what CollegeVine is, so why should I care?
11:31:07 × Jonno_FTW quits (~come@user/jonno-ftw/x-0835346) (Remote host closed the connection)
11:32:32 <zups> How can I change the accumulator inside foldr's helper function from Nothing to Just value? E.g. myHead xs = foldr headHelper Nothing xs
11:33:04 <Axman6> zups: is this homework, by any chance?
11:33:34 <zups> it is but i can't think of an answer to this :|
11:33:44 <Axman6> what have you tried?
11:33:45 <ncf> same way you would 'change' any value to any other value, i guess?
11:34:03 <zups> i can understand how to accumulate the accumulator but no idea how to change Maybe type from Nothing to Just
11:34:27 <Axman6> > Just 7
11:34:28 <lambdabot> Just 7
11:34:39 zaidhaan joins (~zai@2001:f40:960:1c54:3c0f:370:d2d1:4fb9)
11:34:48 <ncf> probably best not to talk about change when doing haskell
11:34:51 <Axman6> you just need to return Just <something> inside headHelper
11:35:22 <Axman6> > foldr (+) z [a, b, c] :: Expr
11:35:23 <lambdabot> a + (b + (c + z))
11:35:31 <Axman6> > foldr f z [a, b, c] :: Expr
11:35:33 <lambdabot> f a (f b (f c z))
11:36:22 <zups> yeah hmm
11:36:35 <Axman6> so whatever function you give to foldr, you will get that funtion back, applied to the first element of the lift, and the result of applying that function to the second element of the list, and that function applied... etc.
11:37:35 <Axman6> so you end up with headHelper a (headHelper b (headHeelper c (... headHelper z Nothing)))
11:38:39 <zups> yeah i get it just mmm
11:39:37 <Axman6> > foldr (\ x rest -> rest {- this will always be Nothing -}) Nothing [1,2,3] -- if we care about results from the rest of the list, we can return those
11:39:39 <lambdabot> Nothing
11:40:17 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
11:40:29 <Axman6> > foldr (\ x rest -> Just 10 {- or we could completely ignore the current value, or what's been computed elsewhere in the list -}) Nothing [1,2,3] --
11:40:31 <lambdabot> Just 10
11:40:43 <Axman6> looks a bit like what you want right?
11:41:03 <zups> yeah
11:41:12 <zups> i managed to fix it already just still wondering a little
11:41:52 coot joins (~coot@89.69.206.216)
11:41:58 × euandreh quits (~Thunderbi@189.6.18.7) (Quit: euandreh)
11:42:07 euandreh1 joins (~Thunderbi@189.6.18.7)
11:43:12 <Axman6> do you understand how you fixed it though? what was your fix?
11:44:10 euandreh1 is now known as euandreh
11:46:03 <zups> yeah, i just made it return Just n everytime headHelper n acc, gets called
11:46:36 <Axman6> So, a very useful skill when learning haskell is how to evaluate functions by hand
11:47:06 <zups> yeah i'm thinking it in my head but just not getting why it even works
11:47:34 <Axman6> if we use foldr (\x acc -> Just a) Nothing [1,2] we get: (\a acc -> Just a) 1 ((\a acc -> Just a) 2 Nothing, correct?
11:47:40 <Axman6> )*
11:48:23 <zups> yeah
11:48:40 <Axman6> If we take (\a acc -> Just a) 1 ((\a acc -> Just a) 2 Nothing) and do some application of the functions, but just one argument each, we get:
11:49:01 <Axman6> actually, you tell me what we get
11:49:17 <ddellacosta> Inst: as someone who used to work at CV, I won't want to say too much other than, their approach is one among many and has both positive and negative tradeoffs. I wouldn't assume it would work for every organization or that it represents some kind of general approach everyone needs to start adopting or else Haskell won't gain traction (or whatever).
11:49:20 <Axman6> make the \a's disappear so we have \acc -> ...
11:49:29 <ddellacosta> I won't *say too much
11:49:46 <zups> yeah just prolly acc -> Just 1 etc ?
11:50:01 <Axman6> yep, I want to see the full expression
11:50:44 <zups> (acc -> Just 1) ((acc -> Just 2) Nothing) ?
11:51:09 <zups> ah yeah i see now
11:51:19 <Axman6> close enough, (\acc -> Just 1) ((\acc -> Just 2) Nothing)
11:51:27 <zups> yeah i see how it goes now :)
11:51:47 <Axman6> so you can see that if you now apply that first lambda, you just ignore evrything else, and just get Just 1
11:52:31 <zups> yeah ^^ I was just wondering how this whole foldr works that I did in the task but I didn't quite understand how it gets turned into a lambda and the Nothing gets passed through from there as a parameter
11:52:35 <zups> so now it makes sense :)
11:52:38 <zups> thanks
11:52:55 <Axman6> All good
11:53:36 <Axman6> do you reckon you could so a harder one now, safeLast?
11:54:22 <zups> so in the "foldr headHelper Nothing xs" the accumulator(=Nothing) actually gets passed as default argument in the foldr clause
11:54:35 <zups> so the accumulator is more like the default value?
11:54:43 <Axman6> there is no accumulator in foldr
11:55:06 <Axman6> foldl definitely has an accumulator, foldr does not
11:55:06 <zups> yeah, i see now, i always thought about the Nothing in that case to be the accumulator, usually there's 0 or something else
11:55:15 <zups> mmm i see
11:55:23 <Axman6> Nothing is what you get when you hit a []
11:55:46 <zups> yeah
11:55:47 <Axman6> > foldr f z [a,b,c] :: Expr
11:55:48 <lambdabot> f a (f b (f c z))
11:56:18 <Axman6> foldr does exactly this: it replaces all (:)'s with f, and any [] with z
11:56:19 <probie> [1,2,3,4] = 1:(2:(3:(4:[]))). foldr f z just means replace `:` with `f` and `[]` with `z`. e.g. foldr (*) 1 (1:(2:(3:(4:[])))) = (1*(2*(3*(4*1))))
11:56:23 <zups> yeah
11:56:38 <zups> > foldl f z [a,b,c] :: Expr
11:56:40 <lambdabot> f (f (f z a) b) c
11:56:41 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
11:57:50 <zups> ah i see
11:57:51 <Axman6> foldl does this: foldl f z xs = { tmp := z; for x in xs { tmp := f x tmp}; return tmp}
11:58:51 <Axman6> (that's not haskell, btw)
11:59:50 <zups> yeah i understand now a bit more :) i was a bit confused cause i always thought foldr and foldl were just used to accumulate things, prolly cause that's how they are usually taught in Elixir
11:59:57 <Axman6> basically, foldl starts with your accumulating parameter as z, and then updates it with each value in the list and the last accumulator
12:00:18 <zups> but yeah, it makes a lot more sense now ^^
12:00:28 <zups> yeah
12:00:45 <Axman6> Laziness makes foldr infinitely more useful iun Haskell than in most languages - in a strict language it would be a very bad idea to use in nearly all cases
12:01:06 <zups> yeah
12:02:08 <zups> but yeah, i just struggled with understand how the z is parameter to the first function call in foldr, and in foldl z is the parameter to the last i guess :)
12:02:11 <Axman6> What we wrote earlier wasn't even a useful to think about as this: foldl (\a acc -> Just a) Nothing [1,2] ==> (\a acc -> Just a) 1 (foldr (\a acc -> Just a) Nothing [2])
12:02:22 <zups> just thouht of it as accumulator but it's just default parameter :)
12:02:27 <Helle> hmz, is there a usable set of rules to ordering imports ?, trying to reduce my level of induced chaos in this code :P
12:02:38 <Inst> Axman6: because of network effects
12:02:40 <Axman6> from this, you can hopefully see that the function we pass to foldr controls the execution
12:03:07 × ddellacosta quits (~ddellacos@143.244.47.85) (Ping timeout: 240 seconds)
12:03:07 <zups> yeah
12:03:08 <hpc> Helle: '<:'>!sort is a nice first heuristic :P
12:03:15 <Helle> hpc: hey now
12:03:18 <Axman6> because (\a acc -> Just a) 1 (foldr (\a acc -> Just a) Nothing [2]) becomes (\acc -> Just 1) (foldr (\a acc -> Just a) Nothing [2])
12:03:30 <Inst> hmmm, actually, I guess this comment would be in dispute, does English have a richer literature than French?
12:03:33 <zups> it was always prolly obvious to me just the default parameter was what messed me up :)
12:03:43 <Axman6> and (\acc -> Just 1) (foldr (\a acc -> Just a) Nothing [2]) becomes Just 1, foldr doesn't get to run any further
12:03:45 <Inst> well, does French have a richer literature than Esperanto?
12:04:08 <Axman6> don't get probie started on esperanto
12:04:13 × Fischmiep quits (~Fischmiep@user/Fischmiep) (Quit: Ping timeout (120 seconds))
12:04:14 <Helle> hpc: I mean genuinely though this is the sort of things I like to find a bunch of workable rules on, ideally better then just a plain sort
12:04:22 <Inst> ddellacosta: thanks for your input
12:04:34 <Helle> not because it needs a strict set of rules, but just to slap other people with when they make a total mess out of it
12:04:40 Fischmiep joins (~Fischmiep@user/Fischmiep)
12:04:58 <zups> oh, i thought it gets ran all the way through there hmm
12:05:03 <Inst> ddellacosta: my pov is more, globally type-inferenced static typing with typeclasses can do much of what dynamic types can do, in a safer fashion
12:05:17 <Inst> I'm guessing it's either a "solved" problem
12:05:20 <Inst> or it's neglected
12:05:20 <Axman6> Inst: for a counterexample, Bellroy are having a lot of success replacing their RoR apps with Haskell versions, which are faster, use less resources, have fewer bugs and are significantly shorter
12:05:40 <Axman6> zups: you get to choose if it does, that's where its power comes from
12:05:52 <zups> mmm
12:05:55 <Inst> my argument is more, "where are all the documentation of using Haskell in a pseudo-dynamically typed fashion?"
12:06:05 <zups> how would i choose it there?
12:06:15 <Inst> because I think we all agree here that CollegeVine was either skill-capped or made a mistake in switching from Haskell to RoR
12:06:17 <hpc> Helle: hmm, another thing i tend to do is group intra-package dependencies at the top
12:06:24 <Inst> but if the documentation were there, they wouldn't have had to make the switch
12:06:29 <Inst> they'd still be a Haskell firm
12:06:44 <Axman6> zups: try to write this, using foldr: find :: (a -> Bool) -> [a] -> Maybe a
12:07:04 <hpc> i don't really think about it much, i just kind of put imports wherever
12:07:08 <Helle> hpc: mmmmm, yeah, I was tending to group those at the bottom, and stuff in std lib before installed from hackage
12:07:15 <hpc> maybe only worry about being able to find the imports that are likely to change
12:07:17 <Inst> from what I understand, Haskell for prototyping requires pseudo-dynamically typed work, and is actually useful in its own way
12:07:24 <Helle> hpc: I am dealing with code janitorial on a larger code base and it yeah
12:07:27 <Inst> code without type signatures -> you know it's a prototype and shouldn't go into production
12:07:43 <Axman6> I disagree, static types help a lot in prototyping
12:07:43 <Inst> done with the prototyping? slap on some type sigs to say it's done
12:08:14 <Axman6> many experienced developers prototype by starting with the types, not by starting with functions without types
12:08:49 <Axman6> foo :: Signal -> State -> (Signal, State, [Notifications]); foo = undefined
12:08:54 <Inst> I know, that's TyDD
12:09:04 <Inst> or would you consider it TyDD?
12:09:13 <Inst> my pov is more that TyDD has its place, but shouldn't be used universally
12:09:54 <Inst> and that the ability to choose between TyDD and a lack of TyDD is a power in Haskell, as opposed to Idris, which seems to want to mandate TyDD
12:10:16 <cheater> i start my prototyping by first typing out all the indentation
12:10:20 <cheater> after that, it's easy
12:11:00 <Axman6> so that's why the strategic spaces reserv keeps getting depleted!
12:11:05 <hpc> i write all of my code alphabetically
12:11:44 × TonyStone quits (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Remote host closed the connection)
12:12:20 <hpc> Axman6: best practice is to mix tabs and spaces so your keyboard wears out evenly
12:12:40 <Axman6> Agreed
12:12:43 <hpc> for best results, set your tab stop to 1
12:13:14 <Axman6> :chefkiss:
12:13:36 <hpc> (no joke, i took a lisp class in college and in the middle of the sememster my laptop's 9 key stopped working)
12:13:56 <cheater> you obtain the most even keyboard wear by using a telegraph key
12:14:20 <Axman6> then you get write amplification, having to write (,8,+,1,) all the time
12:16:15 <hpc> cheater: "import control stop monad" :D
12:16:30 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:d512:b207:c888:476e)
12:16:39 <jade[m]> When using `blaze-html`, this minimal example seems to generate wrong code?... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/f24444037259842a1bb32fc576440fb9cdeba223>)
12:16:53 gurkenglas joins (~user@dynamic-046-114-180-171.46.114.pool.telefonica.de)
12:17:41 <jade[m]> I'm wondering whether I'm doing something wrong, because otherwise I would file a bug report?
12:21:05 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:d512:b207:c888:476e) (Ping timeout: 256 seconds)
12:21:50 <ncf> i think HTML5 self-closing tags don't need a final / ?
12:22:09 <[Leary]> Helle: I group my imports by package of origin, ordering the groups from most general (base, containers, etc) to most specific (domain-relevant dependencies, the library itself), and try to apply the same kind of ordering within each group.
12:22:26 <jade[m]> ncf: ohh, that'd make sense
12:22:41 <hpc> mdn includes the /, but perhaps they're just training people to not be sloppy
12:22:52 <hpc> but yeah, that's probably what it is - html is conspicuously not xml
12:22:53 <jade[m]> you're right!
12:23:00 <jade[m]> thank you, that clears it up
12:26:30 <ncf> https://developer.mozilla.org/en-US/docs/Glossary/Void_element#self-closing_tags
12:29:42 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
12:29:56 <probie> Inst: There is a lot of good literature in French, but that doesn't mean you should skip La Infana Raso. Haskell doesn't have to be widely used to be a very good choice for a task
12:33:15 × barrucadu quits (~barrucadu@carcosa.barrucadu.co.uk) (Quit: leaving)
12:33:36 <cheater> what
12:36:33 <tomsmeding> Axman6: '(' is shift-9 on most keyboards
12:36:44 cheater_ joins (~Username@user/cheater)
12:36:45 <Axman6> oh no
12:37:10 barrucadu joins (~barrucadu@carcosa.barrucadu.co.uk)
12:38:22 × gurkenglas quits (~user@dynamic-046-114-180-171.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
12:39:13 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
12:39:19 cheater_ is now known as cheater
12:40:01 × coot quits (~coot@89.69.206.216) (Quit: coot)
12:42:28 ub joins (~Thunderbi@p200300ecdf0002351300242c44b15f80.dip0.t-ipconnect.de)
12:43:44 × ubert quits (~Thunderbi@p548c91e0.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
12:43:44 ub is now known as ubert
12:49:25 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 256 seconds)
12:55:26 hugo joins (znc@verdigris.lysator.liu.se)
12:59:05 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
13:03:26 mokee joins (~mokee@37.228.215.134)
13:04:09 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Ping timeout: 256 seconds)
13:07:29 × machinedgod quits (~machinedg@93-136-46-129.adsl.net.t-com.hr) (Ping timeout: 265 seconds)
13:12:57 CiaoSen joins (~Jura@145.224.74.19)
13:14:08 jargon joins (~jargon@184.101.71.62)
13:16:25 barcisz joins (~barcisz@83.6.201.246.ipv4.supernova.orange.pl)
13:16:26 × barcisz quits (~barcisz@83.6.201.246.ipv4.supernova.orange.pl) (Client Quit)
13:22:53 × taupiqueur quits (~taupiqueu@2a02-842a-8180-4601-9121-a036-575e-bd7e.rev.sfr.net) (Quit: WeeChat 3.8)
13:25:40 × alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-9121-a036-575e-bd7e.rev.sfr.net) (Remote host closed the connection)
13:28:46 × kilolympus quits (~kilolympu@213.144.144.24) (Quit: See you later! :))
13:29:04 kilolympus joins (~kilolympu@213.144.144.24)
13:31:04 <ijqq> I am reading a blogpost on parsing and they use this, I don't really understand it
13:31:07 <ijqq> newtype Parser i o = Parser { runParser :: i -> Maybe (i, o) }
13:33:53 <Franciman> ijqq: what's the strange part for you?
13:34:07 <Franciman> the newtype or the i -> Maybe (i, o) ?
13:34:42 <ijqq> So why exactly is this a newtype? And then it has a field `runParser` which is a function?
13:35:03 <Franciman> this is syntax sugar
13:35:39 <Franciman> the newtype is to create a new type name which is distinct from all others
13:36:07 <Franciman> so basically a parser is a function of type i -> Maybe (i, o)
13:36:34 <Franciman> but to make it more abstract, you hide it behind a newtype
13:36:54 <Franciman> you could have also done:
13:37:01 <Axman6> it could also be data Parser i o = Parser (i -> Maybe (i,o)); runParser (Parser f) = f
13:37:02 <Franciman> type Parser i o = i -> Maybe (i, o)
13:37:23 <Axman6> (if you're more familiar with data)
13:37:36 <Franciman> yes. The only difference with the Axman6's version is that newtype is really just syntax sugar
13:37:44 <Franciman> it doesn't add any other overhead
13:37:52 <Franciman> iiuc
13:38:19 <Axman6> well, it's more than syntax sugar, is created a new type too. they is no runtime overhead though
13:38:46 <Franciman> true
13:40:08 <Axman6> ijqq: doesn any of that help?
13:41:40 <Axman6> this is nearly exactly the same: newtype Parser i o = Parser (i -> (i,o)); runParser :: Parser i o -> (i -> (i,o)); runParser (Parser f) = f
13:42:08 <Axman6> (the only thing missing is that you can also use the name runParser for "updating" a Parser, but it
13:42:20 <Axman6> it's not bery useful with newtypes)
13:43:14 <ijqq> http://sprunge.us/NVxf5O
13:43:20 <ijqq> If my understanding is correct
13:43:23 <ijqq> I think I get it
13:43:26 <ijqq> Thanks guys
13:45:30 L29Ah joins (~L29Ah@wikipedia/L29Ah)
13:49:32 <ijqq> I guess I was just a bit confused on the parsing function being a field in the newtype, but it makes sense now.
13:53:20 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
13:54:21 × vandita quits (~vandit@178-164-188-29.pool.digikabel.hu) (Ping timeout: 250 seconds)
13:55:59 vandita joins (~vandit@178-164-207-211.pool.digikabel.hu)
13:57:37 nate2 joins (~nate@98.45.169.16)
14:00:26 × jargon quits (~jargon@184.101.71.62) (Remote host closed the connection)
14:00:40 <[Leary]> ijqq: Note that one of the main reasons to make `Parser` a newtype rather than a type synonym is in order to give it key instances like `Monad`, thus making it much easier to use. This would normally be done with GNTD like so: `newtype Parser i o = Parser (StateT i Maybe o) deriving (Functor, Applicative, Alternative, Monad, MonadState i)`.
14:00:45 wootehfoot joins (~wootehfoo@user/wootehfoot)
14:01:33 <ijqq> Okay, now the blog post is talking about functors. So I'm reading an article about functors, and it gives the example of `fmap chr (65, 65)` which gives `(65, 'A')`. Where can I see the code for or find more information about the fmap implemntation of tuples?
14:02:03 <ski> @src (,) fmap
14:02:03 <lambdabot> fmap f (x,y) = (x, f y)
14:02:05 × nate2 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds)
14:02:15 <ijqq> Ah, cool.
14:03:06 <ijqq> Interesting, Leary. Thanks. I'll have to read up on Monad and those others too.
14:03:07 × zxrom quits (~zxrom@mm-92-28-212-37.vitebsk.dynamic.pppoe.byfly.by) (Ping timeout: 240 seconds)
14:03:17 <ijqq> What is GNTD?
14:04:09 <geekosaur> https://downloads.haskell.org/ghc/9.0.1/docs/html/users_guide/exts/newtype_deriving.html
14:04:47 <[Leary]> GeneralisedNewtypeDeriving. It just pulls instances through newtypes, but it can let you avoid a bunch of boilerplate.
14:05:45 <zups> Axman6: I tried to implement the find with foldr but i didn't manage to. How would one do that?
14:06:40 ec joins (~ec@gateway/tor-sasl/ec)
14:06:57 <ijqq> Also Leary, how could I see which instances the Parser has in ghci?
14:07:38 <[Leary]> :i Parser should do it.
14:08:33 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
14:08:42 <ijqq> type Parser :: * -> * -> *
14:08:42 <ijqq> newtype Parser i o = Parser {runParser :: i -> Maybe (i, o)}
14:08:42 <ijqq> -- Defined at main.hs:60:1
14:08:56 <ijqq> So does that mean that my parser does not have those instances?
14:09:45 <[Leary]> This is somewhat of a simplification, but if you're defining a type, it won't have any instances you haven't given it.
14:09:50 <probie> zups: what did the definition of your head function using foldr look like?
14:12:06 <ijqq> Oh, sorry I think i misinterpreted your message. So you mean to say that, by making my Parser through newtype, later on I am easily able to make it an instance of Monad, etc.?
14:12:15 <probie> your definition of `find` should actually be pretty similar
14:13:08 <[Leary]> ijqq: Yes. Or rather, if it's a synonym, that's impossible.
14:13:16 <zups> probie: foldr (\x d -> if (x == d) then (Just x) else Nothing) 2 [1,2,3]
14:13:25 <zups> I tried something like this but it doesn't even compile
14:13:26 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Ping timeout: 250 seconds)
14:14:05 × CiaoSen quits (~Jura@145.224.74.19) (Ping timeout: 240 seconds)
14:14:55 <probie> most of the right pieces, but some in the wrong places
14:14:56 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
14:15:42 <zups> yeah :) I just get the error message "cannot construct infite type a ~ Maybe a" and i never understand how to decrypt that :)
14:15:51 ec joins (~ec@gateway/tor-sasl/ec)
14:16:34 <probie> Have you been told what type find should have?
14:17:39 <zups> Axman6 | zups: try to write this, using foldr: find :: (a -> Bool) -> [a] -> Maybe a
14:18:03 <ski> zups : it means you're confusing `a's with `Maybe a's
14:18:18 <[Leary]> zups: It might help if you realise that `find (\_ -> True) = myHead`.
14:19:15 <zups> mmm
14:19:32 <ski> zups : in that `foldr' example, `x' will need to have the same type as `Just x' and `Nothing' (the possible results of the lambda) .. but `x' having same type of `Just x' leads to infinite/cyclic type
14:20:37 <ski> well, it's because you're comparing `x' and `d' with each other, really, too
14:21:45 <ski> `foldr' takes a function of type say `a -> r -> r'. so `d' has type `r', and `Just x' and `Nothing' must also have type `r'. and `x' has type `a'. but since you compare `x' with `r', they must be of the same type, so `a = r'
14:21:54 × n0den1te quits (~n0den1te@157.119.87.13) (Quit: leaving)
14:22:24 <ski> (er, compare `x' with `d')
14:25:30 <ijqq> Ah, I also found this stack overflow article which addresses the same question that I asked https://stackoverflow.com/questions/60291263/why-the-newtype-syntax-creates-a-function
14:28:42 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
14:28:56 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
14:28:58 chexum joins (~quassel@gateway/tor-sasl/chexum)
14:29:45 Tlsx joins (~rscastilh@189-82-108-215.user3p.veloxzone.com.br)
14:36:14 freeside joins (~mengwong@103.252.202.189)
14:36:41 ec joins (~ec@gateway/tor-sasl/ec)
14:36:58 × Tlsx quits (~rscastilh@189-82-108-215.user3p.veloxzone.com.br) (Remote host closed the connection)
14:38:58 Tlsx joins (~rscastilh@189-82-108-215.user3p.veloxzone.com.br)
14:39:04 <freeside> so, i'm trying to convert a non-monadic function to a monadic function -- i'm wrapping it in RWS so I can convert by Debug.Traces to "tell"s instead. And I'm walking down the function calls and upgrading all of them to monadic style as well. But I've got a couple of nested list comprehensions; how do I convert the function calls inside them, to a monadic style?
14:40:06 <probie> what do you mean by "a monadic style"? You can desugar list comprehensions to do notation.
14:41:22 <probie> > [(x+y) | x <- [1..5], y <- [6..10], even x, odd y]
14:41:23 <lambdabot> [9,11,11,13]
14:41:32 <ncf> or turn on MonadComprehensions
14:41:52 <probie> > do { x <- [1..5]; y <- [6..10]; guard (even x); guard (even y); pure (x+y) }
14:41:53 <lambdabot> [8,10,12,10,12,14]
14:41:55 <ski> won't really help in this case
14:42:02 × Tlsx quits (~rscastilh@189-82-108-215.user3p.veloxzone.com.br) (Remote host closed the connection)
14:42:06 <ncf> maybe with ListT?
14:42:13 <ski> they're looking for what ncf just said, yea
14:42:26 <ski> or doing it manually
14:42:30 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
14:42:42 <freeside> previously I had, e.g. [ g x y | (x,y) <- f l ] ... now I'm changing f to return m [(a,b)] instead of [(a,b)]
14:43:08 <ski> just a single generator in the list comprehension ?
14:43:44 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
14:43:45 <ski> will `g' also be monadic ?
14:44:14 <jade[m]> you can sequence it
14:44:15 <freeside> yes, i believe so
14:44:16 <probie> You probably want to return a `[m (a,b)]` and call `sequence` on it
14:44:41 ncf . o O ( why do so many packages provide ListT, and which one is the canonical one? )
14:44:41 <ski> or `mapM'
14:44:42 <freeside> ah, i see. and if i do that i don't have to disembowel my list comprehensions
14:45:00 <probie> What's the type of `f`? Is it "monadic" as well? If not you don't need to disembowel the list comprehension
14:45:28 <ski> "now I'm changing f to return m [(a,b)] instead of [(a,b)]"
14:45:45 <freeside> well, i'm tweaking it so that it will be monadic, because the last programmer who touched this code base decided to Debug.Trace all over, and I want to W instead
14:47:26 ec joins (~ec@gateway/tor-sasl/ec)
14:48:09 <ncf> mtl 2.3 removed Control.Monad.List and the changelog doesn't say what to use instead o_o
14:49:01 <c_wraith> ncf: there's no way to do what it does correctly. You need to alter your requirements a bit instead.
14:51:12 <EvanR> if Debug.Trace is used as a logger, RWS at least the W part won't work very well for that
14:51:33 <EvanR> Writer is terribly lazy
14:51:44 <freeside> i'm relying on evalRWS to get out the (a,w), so i think i'm looking for something sequence-like, that has m [(a,b)] -> m ([a],[b])
14:52:10 <probie> `fmap unzip`?
14:52:42 <EvanR> Writer for logging is just bad
14:52:51 <freeside> what's the best practice around that?
14:53:05 <EvanR> you could use State for a log, or a dedicated logger monad?
14:53:56 freeside looks at monad-logger
14:54:55 <EvanR> I hear good things
14:55:44 <chromoblob> why is Writer bad for logging?
14:55:56 <jade[m]> freeside: that's just `fmap unzip`
14:56:14 <juri_> ugh. new quickcheck has exposed a lot of holes in my geometry generation engine. yaay?
14:56:22 <EvanR> Writer has two modes, very lazy and somewhat lazy
14:56:57 <EvanR> bad for a long running computation that keeps getting appended, that eventually want to see
14:58:04 <EvanR> at the very least you want to keep the log fully evaluated, which there's no option for, but even then it keeps growing in size
14:58:32 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
14:59:00 <EvanR> there are cases where Writer makes sense but they don't look like logging
14:59:08 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
14:59:15 <chromoblob> does it *always* keep growing?
14:59:26 <freeside> my log is, like, 20 lines at the moment, but i will DTRT and try to switch to monad-logger
14:59:32 <EvanR> no, you could use a monoid that doesn't grow
14:59:45 <freeside> brb, thnx all for the advice, i am going to go off and get lost in a maze of twisty little hackages
15:00:21 <chromoblob> hmm
15:00:45 <chromoblob> can we arrange so that at the end there is an infinite stream of log entries
15:00:49 <geekosaur> there are also things like MonadChronicle on hackage
15:00:50 <EvanR> actually, the strict version of writer still doesn't do what you think
15:01:25 <EvanR> https://stackoverflow.com/questions/14644830/what-is-the-point-of-having-a-lazy-strict-version-of-writer
15:01:35 <chromoblob> i mean, finite if the action ends, and infinite if it doesn't
15:01:55 <EvanR> yes you can create an infinite stream with writer
15:02:20 ec joins (~ec@gateway/tor-sasl/ec)
15:03:22 <chromoblob> EvanR: with Writer? but in the end it returns (result, m1 `mappend` m2)
15:03:39 <chromoblob> that `mappend` doesn't exist if there are infinite acitons
15:04:07 <chromoblob> i forgot how monads work
15:04:15 <chromoblob> is >> left associative?
15:04:47 × darchitect quits (~darchitec@host86-157-65-148.range86-157.btcentralplus.com) (Quit: WeeChat 3.8)
15:05:06 <int-e> Yes. That doesn't matter though if you have loop = action >> loop
15:05:24 <int-e> which is action >> (action >> (action >> ...))
15:05:45 <chromoblob> ok, i see now
15:05:58 <chromoblob> so infinite streams will just work
15:06:15 <EvanR> depends on the Monoid
15:09:09 <chromoblob> yeah if the monoid is "backwards list" then loop must be loop >> action
15:09:20 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
15:12:17 ec joins (~ec@gateway/tor-sasl/ec)
15:13:03 gurkenglas joins (~user@dynamic-046-114-180-171.46.114.pool.telefonica.de)
15:13:05 × berberman quits (~berberman@user/berberman) (Quit: ZNC 1.8.2 - https://znc.in)
15:13:56 <freeside> okay. maybe I was too vague when I said I wanted to log. I basically have a compiler for a little language, and the toolchain includes a bunch of transpilers on the back end. I want each transpiler to be able to mumble out some STDERR as it goes along, and eventually, when the compiler completes, I want it to dump all the stderr-like output to disk, one file per transpiler. So I'm moving away from
15:14:02 <freeside> Debug.Trace, and I'm moving away from IO, so my Main can accumulate and organize all the mumbling.
15:14:06 <freeside> In a situation like this is Writer acceptable? I mean, it's not a lot of output.
15:14:26 <EvanR> in the best case, if you're careful to consume the entire log lazily before looking at the result, then the magic of update frames ensures you don't waste memory. But if you do, the whole log has to get evaluated first
15:14:36 berberman joins (~berberman@user/berberman)
15:15:33 <EvanR> if you forget to play it like that and look at the result first
15:17:13 yaxu joins (~yaxu@host-79-78-86-129.static.as9105.net)
15:18:19 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
15:18:26 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:d512:b207:c888:476e)
15:19:33 <ski> > let loop = 1 % 2 : do x <- loop; [recip (1 + recip x),1 + x] in loop
15:19:36 <lambdabot> [1 % 2,1 % 3,3 % 2,1 % 4,4 % 3,3 % 5,5 % 2,1 % 5,5 % 4,4 % 7,7 % 3,3 % 8,8 %...
15:21:56 <yaxu> Hi all, I'm 100% sure I'm being stupid, but I've stared at these lines for a while, and can't see why they are raising the warning "Pattern match(es) are non-exhaustive In an equation for ‘loop’" https://github.com/tidalcycles/Tidal/blob/5fd3f26b973cf3ab2d5ef7406e267f75676d2063/src/Sound/Tidal/Sequence.hs#L532-L539
15:22:08 <ncf> calkin-wilf!
15:22:31 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
15:22:31 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:d512:b207:c888:476e) (Ping timeout: 240 seconds)
15:23:01 <EvanR> what did you just call me?
15:23:08 <ncf> yaxu: use <- instead of ==
15:23:17 <ncf> LT <- cmp
15:23:20 <jade[m]> yaxu: the guards are not "exhaustive"
15:23:21 <int-e> ski: why are you starting at 1/2?
15:23:26 <int-e> (rather than 1)
15:23:43 <int-e> oh
15:23:44 <jade[m]> because ghc doesn't like to infer stuff about ==
15:25:22 × euandreh quits (~Thunderbi@189.6.18.7) (Ping timeout: 250 seconds)
15:26:00 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
15:27:07 × vandita quits (~vandit@178-164-207-211.pool.digikabel.hu) (Ping timeout: 240 seconds)
15:27:55 <yaxu> @jade[m] aha thanks! switching in a case statement has fixed it
15:27:55 <lambdabot> Unknown command, try @list
15:28:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
15:28:11 <yaxu> jade[m], aha thanks! switching in a case statement has fixed it
15:28:15 <ski> yea, probably should have started with one
15:28:40 <EvanR> ... in 1%1 : loop
15:28:55 vandita joins (~vandit@85-238-93-47.pool.digikabel.hu)
15:29:20 <int-e> EvanR: but it'll still be missing 2 then
15:29:43 int-e isn't sure exactly which numbers will end up missing
15:31:24 ec joins (~ec@gateway/tor-sasl/ec)
15:31:45 <chromoblob> what numbers is the loop supposed to compute?
15:31:49 taupiqueur joins (~taupiqueu@2a02-842a-8180-4601-c87a-3932-439e-c5a6.rev.sfr.net)
15:31:57 <EvanR> all of them? xD
15:32:11 <ncf> the immediate left subtree of the calkin-wilf tree
15:32:45 <int-e> (the positive rationals)
15:34:17 <int-e> (ncf's answer is what the function computes... I'm speculating about the intent)
15:34:22 <chromoblob> cool
15:35:11 <EvanR> looking it up, you're missing a lot going by just the left subtree
15:35:53 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
15:38:32 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
15:38:47 AlexNoo_ joins (~AlexNoo@178.34.162.37)
15:39:01 __monty__ joins (~toonn@user/toonn)
15:40:38 AlexZenon_2 joins (~alzenon@178.34.162.37)
15:41:07 × AlexZenon quits (~alzenon@178.34.163.104) (Ping timeout: 240 seconds)
15:42:05 × AlexNoo quits (~AlexNoo@178.34.163.104) (Ping timeout: 240 seconds)
15:42:07 × Alex_test quits (~al_test@178.34.163.104) (Ping timeout: 240 seconds)
15:42:09 AlexNoo_ is now known as AlexNoo
15:42:10 ec joins (~ec@gateway/tor-sasl/ec)
15:44:15 AlexZenon_2 is now known as AlexZenon
15:44:53 <int-e> > let loop = 1 % 1 : do x <- loop; [1 + x, recip (1 + x)] in loop -- does this variant also have a name?
15:44:54 <lambdabot> [1 % 1,2 % 1,1 % 2,3 % 1,1 % 3,3 % 2,2 % 3,4 % 1,1 % 4,4 % 3,3 % 4,5 % 2,2 %...
15:46:35 Alex_test joins (~al_test@178.34.162.37)
15:47:55 Pickchea joins (~private@user/pickchea)
15:48:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
15:48:36 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:d512:b207:c888:476e)
15:51:49 ec joins (~ec@gateway/tor-sasl/ec)
15:53:43 × yaxu quits (~yaxu@host-79-78-86-129.static.as9105.net) (Quit: Leaving)
15:53:55 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
15:54:21 <tomsmeding> int-e: from this prefix it seems like it's enumerating https://en.wikipedia.org/wiki/Stern%E2%80%93Brocot_tree in a weird order
15:54:25 chexum joins (~quassel@gateway/tor-sasl/chexum)
15:55:10 × Christoph[m] quits (~hpotsirhc@2001:470:69fc:105::2ff8) (Ping timeout: 265 seconds)
15:55:11 <tomsmeding> that is: enumerate layer-by-layer, and within a layer, enumerate(layer) = interleave(enumerate(left half of layer), enumerate(reverse(right half of layer)))
15:55:13 <akadude[m]> Hey, can anyone recommend vcache-like library but maintained?
15:55:25 <tomsmeding> but again that's just from this prefix :p
15:55:30 <int-e> tomsmeding: well that's also true for the Calkin-Wilf tree... it's positive rationals
15:55:44 <tomsmeding> there the enumeration order is even weirder though
15:56:30 <akadude[m]> By vcache-like I mean that it provides interface to run STM transactions on persistently stored data
15:58:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
15:59:41 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
16:01:30 ec joins (~ec@gateway/tor-sasl/ec)
16:04:22 <akadude[m]> Oh, I see that TCache (listed in alternatives) is maintained
16:08:32 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
16:11:25 ec joins (~ec@gateway/tor-sasl/ec)
16:16:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
16:16:57 <c_wraith> Hmm. does pseq have performance implications over seq *other* than the fact that it prevents ghc from reordering computations?
16:18:37 ec joins (~ec@gateway/tor-sasl/ec)
16:21:25 × telser quits (~quassel@user/telser) (Ping timeout: 240 seconds)
16:22:01 ub joins (~Thunderbi@p548c91e0.dip0.t-ipconnect.de)
16:22:56 × ubert quits (~Thunderbi@p200300ecdf0002351300242c44b15f80.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
16:22:56 ub is now known as ubert
16:26:56 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
16:26:58 stef204 joins (~stef204@user/stef204)
16:29:18 sord937 joins (~sord937@gateway/tor-sasl/sord937)
16:29:44 ec joins (~ec@gateway/tor-sasl/ec)
16:31:47 telser joins (~quassel@user/telser)
16:34:28 cheater_ joins (~Username@user/cheater)
16:34:38 × cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds)
16:34:43 cheater_ is now known as cheater
16:36:56 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
16:38:51 econo joins (uid147250@user/econo)
16:39:22 gemmaro joins (~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc)
16:39:39 ec joins (~ec@gateway/tor-sasl/ec)
16:40:24 <monochrom> I think no.
16:42:54 × stef204 quits (~stef204@user/stef204) (Quit: WeeChat 3.8)
16:46:28 × ubert quits (~Thunderbi@p548c91e0.dip0.t-ipconnect.de) (Quit: ubert)
16:47:33 stef204 joins (~stef204@user/stef204)
16:51:20 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
16:53:08 ec joins (~ec@gateway/tor-sasl/ec)
16:54:37 × telser quits (~quassel@user/telser) (Ping timeout: 240 seconds)
16:56:10 acidjnk joins (~acidjnk@p200300d6e7072f454588bfb78dd6f620.dip0.t-ipconnect.de)
16:57:51 × gemmaro quits (~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc) (Remote host closed the connection)
17:01:20 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
17:02:22 telser joins (~quassel@user/telser)
17:03:28 × stef204 quits (~stef204@user/stef204) (Quit: WeeChat 3.8)
17:05:00 ec joins (~ec@gateway/tor-sasl/ec)
17:06:17 × slaydr quits (~slaydr@2601:1c2:980:4ea0::a4a5) (Remote host closed the connection)
17:15:51 machinedgod joins (~machinedg@93-136-46-129.adsl.net.t-com.hr)
17:16:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
17:17:39 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer)
17:18:37 × chromoblob quits (~user@37.113.158.8) (Ping timeout: 240 seconds)
17:18:54 alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-c87a-3932-439e-c5a6.rev.sfr.net)
17:19:11 zxrom joins (~zxrom@mm-214-30-212-37.vitebsk.dynamic.pppoe.byfly.by)
17:19:49 ec joins (~ec@gateway/tor-sasl/ec)
17:21:43 Guest18 joins (~Guest18@host-091-097-060-051.ewe-ip-backbone.de)
17:22:13 cheater_ joins (~Username@user/cheater)
17:23:59 cheater__ joins (~Username@user/cheater)
17:24:08 × tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Ping timeout: 265 seconds)
17:25:06 <ManofLetters[m]> there's this wonderful function https://hackage.haskell.org/package/base-4.18.0.0/docs/GHC-TypeLits.html#v:sameNat, sameNat :: forall a b proxy1 proxy2. (KnownNat a, KnownNat b) => proxy1 a -> proxy2 b -> Maybe (a :~: b)
17:25:06 <ManofLetters[m]> how do I get sameShape that instead of taking two proxies of Nat, takes two proxies of [Nat]?
17:25:23 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
17:25:50 <ManofLetters[m]> this is not a homework ;)
17:26:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
17:27:34 × cheater_ quits (~Username@user/cheater) (Ping timeout: 250 seconds)
17:28:27 cheater_ joins (~Username@user/cheater)
17:28:27 cheater_ is now known as cheater
17:28:58 × cheater__ quits (~Username@user/cheater) (Ping timeout: 265 seconds)
17:29:41 ec joins (~ec@gateway/tor-sasl/ec)
17:29:54 <ncf> what's a shape?
17:31:37 <ManofLetters[m]> it's [Nat]
17:31:56 <ManofLetters[m]> (a type-level representation of a shape of an array)
17:33:58 <ManofLetters[m]> that would be `sameShape :: forall a b proxy1 proxy2. (Shape a, Shape b) => proxy1 a -> proxy2 b -> Maybe (a :~: b)`, where `class (Typeable s) => Shape (s :: [Nat])`
17:34:51 CiaoSen joins (~Jura@145.224.74.19)
17:34:58 <ManofLetters[m]> with `instance Shape '[]` and `instance forall n s . (Shape s, KnownNat n) => Shape (n ': s)`
17:36:18 <ncf> there's https://hackage.haskell.org/package/typelits-witnesses-0.3.0.2/docs/GHC-TypeLits-List.html#v:sameNats
17:36:25 <ManofLetters[m]> (taken from https://hackage.haskell.org/package/orthotope-0.1.2.0/docs/src/Data.Array.Internal.Shape.html#Shape)
17:36:53 <ncf> though that package recommends using singletons instead
17:36:56 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
17:37:49 <ManofLetters[m]> they know nothing, this is great!
17:38:01 <ManofLetters[m]> but how would I use do this with singletons?
17:38:07 <ManofLetters[m]> s/use//
17:40:20 ec joins (~ec@gateway/tor-sasl/ec)
17:41:24 <ManofLetters[m]> huh, I searched for sameNats on hoogle and found nothing; that's a bummer
17:41:37 <ManofLetters[m]> @ncf: how did you find it?
17:41:37 <lambdabot> Unknown command, try @list
17:42:14 <ncf> googled "ghc type level list"
17:44:15 <ManofLetters[m]> wow, smart
17:44:32 <ManofLetters[m]> they actually hint how to do this with singletons at the very bottom of the https://hackage.haskell.org/package/typelits-witnesses-0.3.0.2 page
17:45:02 <ManofLetters[m]> but I'm expecting all kinds of problems, e.g., conversions required
17:46:32 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
17:47:33 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
17:50:00 ec joins (~ec@gateway/tor-sasl/ec)
17:50:13 tabemann joins (~tabemann@2600:1700:7990:24e0:46da:fe37:6ffd:b2b9)
17:51:39 × somerandomnick[m quits (~somerando@2001:470:69fc:105::3:4f2e) (Ping timeout: 265 seconds)
17:51:39 × SeanKing[m] quits (~seankingm@2001:470:69fc:105::cf9c) (Ping timeout: 265 seconds)
17:52:08 × VarikValefor[m] quits (~varikvale@2001:470:69fc:105::a5d) (Ping timeout: 265 seconds)
17:52:37 × hsiktas[m] quits (~hsiktasm]@2001:470:69fc:105::30d4) (Ping timeout: 265 seconds)
17:56:32 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
17:59:07 nate2 joins (~nate@98.45.169.16)
17:59:51 × nek0 quits (~nek0@2a01:4f8:222:2b41::12) (Quit: The Lounge - https://thelounge.chat)
18:00:02 ec joins (~ec@gateway/tor-sasl/ec)
18:03:19 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
18:03:37 × nate2 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds)
18:06:04 VarikValefor[m] joins (~varikvale@2001:470:69fc:105::a5d)
18:06:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
18:09:42 ec joins (~ec@gateway/tor-sasl/ec)
18:14:25 wroathe joins (~wroathe@50.205.197.50)
18:14:25 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
18:14:25 wroathe joins (~wroathe@user/wroathe)
18:16:56 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
18:16:56 × taupiqueur quits (~taupiqueu@2a02-842a-8180-4601-c87a-3932-439e-c5a6.rev.sfr.net) (Quit: WeeChat 3.8)
18:17:52 ec joins (~ec@gateway/tor-sasl/ec)
18:18:36 nek0 joins (~nek0@2a01:4f8:222:2b41::12)
18:21:28 michalz joins (~michalz@185.246.207.200)
18:22:19 <c_wraith> is it just me, or does doing anything interesting with ContT require using the constructor manually? All the helper functions seem to be too type-restricted
18:24:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
18:26:38 cheater_ joins (~Username@user/cheater)
18:27:08 ec joins (~ec@gateway/tor-sasl/ec)
18:28:05 × cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds)
18:28:13 cheater_ is now known as cheater
18:30:37 × wroathe quits (~wroathe@user/wroathe) (Quit: Lost terminal)
18:33:10 wroathe joins (~wroathe@50.205.197.50)
18:33:10 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
18:33:10 wroathe joins (~wroathe@user/wroathe)
18:34:04 <monochrom> Sometimes callCC is interesting enough for me. But otherwise I would use ContT directly too.
18:34:25 <monochrom> ContT and runContT as full-power shift and reset.
18:35:47 jero98772 joins (~jero98772@2800:484:1d7f:5d36::2)
18:38:32 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
18:39:42 <c_wraith> Ah, I see. Anything implemented in terms of MonadCont isn't allowed to touch the r type. That's why it's so restrictive
18:43:06 ec joins (~ec@gateway/tor-sasl/ec)
18:45:08 × Guest7839 quits (sid22336@id-22336.hampstead.irccloud.com) ()
18:45:26 Guest7839 joins (sid22336@id-22336.hampstead.irccloud.com)
18:46:10 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
18:47:23 × Guest7839 quits (sid22336@id-22336.hampstead.irccloud.com) (Changing host)
18:47:23 Guest7839 joins (sid22336@user/amir)
18:49:48 × Guest7839 quits (sid22336@user/amir) (Client Quit)
18:50:13 Guest7839 joins (sid22336@id-22336.hampstead.irccloud.com)
18:50:58 × Guest7839 quits (sid22336@id-22336.hampstead.irccloud.com) (Changing host)
18:50:58 Guest7839 joins (sid22336@user/amir)
18:51:20 <dolio> MonadCont also only has callCC in it, so...
18:51:44 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
18:51:57 Guest7839 is now known as amir
18:52:08 cheater_ joins (~Username@user/cheater)
18:52:14 × amir quits (sid22336@user/amir) (Client Quit)
18:52:29 <c_wraith> callCC has a broken type in a separate way than not being able to touch the r in ContT r m
18:52:29 amir joins (sid22336@user/amir)
18:52:55 <dolio> Yeah, what I mean is, you can't really do shift/reset with just callCC.
18:52:57 <c_wraith> it's just that the non-broken version is higher-rank
18:54:25 × cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds)
18:54:33 cheater_ is now known as cheater
18:58:46 waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
19:00:05 <dolio> That's more of a mere annoyance these days, no?
19:00:48 ec joins (~ec@gateway/tor-sasl/ec)
19:00:54 <dolio> :t \(e :: (forall b. a -> f b) -> f a) -> callCC (\k -> e (\x -> vacuous $ k x))
19:00:55 <lambdabot> MonadCont f => ((forall b. a -> f b) -> f a) -> f a
19:05:07 × vandita quits (~vandit@85-238-93-47.pool.digikabel.hu) (Ping timeout: 240 seconds)
19:06:55 vandita joins (~vandit@92-249-150-149.static.digikabel.hu)
19:07:52 <c_wraith> sure, you can work around it.. but you shouldn't need to
19:08:59 × maerwald[m] quits (~maerwaldm@2001:470:69fc:105::1ee) (Ping timeout: 265 seconds)
19:09:25 × alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-c87a-3932-439e-c5a6.rev.sfr.net) (Remote host closed the connection)
19:09:57 × elevenkb quits (~elevenkb@2001:470:69fc:105::2:cb89) (Ping timeout: 265 seconds)
19:09:57 × marinelli[m] quits (~marinelli@2001:470:69fc:105::2d8) (Ping timeout: 265 seconds)
19:10:13 <texasmynsted> I gather from googling that the answer might be servent-client or wreq...
19:10:26 × ozkutuk[m] quits (~ozkutuk@2001:470:69fc:105::2:9af8) (Ping timeout: 265 seconds)
19:10:41 alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-c87a-3932-439e-c5a6.rev.sfr.net)
19:10:56 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
19:11:01 <texasmynsted> I want the quickest, simplest way to build clients for various REST APIs to build keyboard macros etc.
19:13:07 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds)
19:13:59 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
19:14:31 pavonia joins (~user@user/siracusa)
19:15:16 × Deide quits (~deide@user/deide) (Ping timeout: 265 seconds)
19:15:16 × alanz quits (~alanzmatr@2001:470:69fc:105::2:49a6) (Ping timeout: 265 seconds)
19:15:16 × ericson2314 quits (~ericson23@2001:470:69fc:105::70c) (Ping timeout: 265 seconds)
19:15:45 × ManofLetters[m] quits (~manoflett@2001:470:69fc:105::3be) (Ping timeout: 265 seconds)
19:16:14 × neohtetxyz[m] quits (~neohtetxy@2001:470:69fc:105::3:314c) (Ping timeout: 265 seconds)
19:16:14 × jmcantrell quits (~jmcantrel@user/jmcantrell) (Ping timeout: 265 seconds)
19:16:43 × levin[m] quits (~levinlevi@2001:470:69fc:105::3:5f68) (Ping timeout: 265 seconds)
19:16:43 × bgamari[m] quits (~bgamari@2001:470:69fc:105::c7b9) (Ping timeout: 265 seconds)
19:16:43 × JensPetersen[m] quits (~juhp@2001:470:69fc:105::6e9) (Ping timeout: 265 seconds)
19:18:10 × romes[m] quits (~romesmatr@2001:470:69fc:105::2:1660) (Ping timeout: 265 seconds)
19:18:10 × geekosaur[m] quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 265 seconds)
19:18:39 × alexfmpe[m] quits (~alexfmpem@2001:470:69fc:105::38ba) (Ping timeout: 265 seconds)
19:19:08 × Las[m]1 quits (~lasmatrix@2001:470:69fc:105::74e) (Ping timeout: 265 seconds)
19:19:37 × smichel17[m] quits (~smichel17@2001:470:69fc:105::2d32) (Ping timeout: 265 seconds)
19:21:33 × nomagno quits (~nomagno@2001:470:69fc:105::c1f0) (Ping timeout: 265 seconds)
19:22:24 dhil joins (~dhil@78.45.150.83.ewm.ftth.as8758.net)
19:23:00 × Artem[m] quits (~artemtype@2001:470:69fc:105::75b) (Ping timeout: 265 seconds)
19:24:06 systemhalted joins (~systemhal@199.sub-174-197-65.myvzw.com)
19:24:19 nomagno joins (~nomagno@2001:470:69fc:105::c1f0)
19:24:23 × systemhalted quits (~systemhal@199.sub-174-197-65.myvzw.com) (Max SendQ exceeded)
19:26:52 × chreekat quits (~chreekat@2001:470:69fc:105::16b5) (Ping timeout: 265 seconds)
19:26:53 systemhalted joins (~systemhal@199.sub-174-197-65.myvzw.com)
19:27:15 × systemhalted quits (~systemhal@199.sub-174-197-65.myvzw.com) (Max SendQ exceeded)
19:27:51 ec joins (~ec@gateway/tor-sasl/ec)
19:28:37 × vandita quits (~vandit@92-249-150-149.static.digikabel.hu) (Ping timeout: 240 seconds)
19:30:46 vandita joins (~vandit@178-164-188-71.pool.digikabel.hu)
19:31:52 cheater_ joins (~Username@user/cheater)
19:32:28 chreekat joins (~chreekat@2001:470:69fc:105::16b5)
19:33:54 neohtetxyz[m] joins (~neohtetxy@2001:470:69fc:105::3:314c)
19:34:05 × cheater quits (~Username@user/cheater) (Ping timeout: 250 seconds)
19:34:07 cheater_ is now known as cheater
19:34:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
19:34:42 ericson2314 joins (~ericson23@2001:470:69fc:105::70c)
19:35:09 ec joins (~ec@gateway/tor-sasl/ec)
19:35:18 JensPetersen[m] joins (~juhp@2001:470:69fc:105::6e9)
19:35:26 jmcantrell joins (~jmcantrel@user/jmcantrell)
19:36:34 bgamari[m] joins (~bgamari@2001:470:69fc:105::c7b9)
19:37:54 × mokee quits (~mokee@37.228.215.134) (Remote host closed the connection)
19:45:08 smichel17[m] joins (~smichel17@2001:470:69fc:105::2d32)
19:46:45 Las[m]1 joins (~lasmatrix@2001:470:69fc:105::74e)
19:47:20 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
19:47:30 × chreekat quits (~chreekat@2001:470:69fc:105::16b5) (Remote host closed the connection)
19:51:04 ec joins (~ec@gateway/tor-sasl/ec)
19:54:29 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
19:55:59 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
19:56:00 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection)
19:56:23 × waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 265 seconds)
19:56:30 sord937 joins (~sord937@gateway/tor-sasl/sord937)
19:57:26 taupiqueur joins (~taupiqueu@2a02-842a-8180-4601-c87a-3932-439e-c5a6.rev.sfr.net)
19:59:45 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
20:00:19 Artem[m] joins (~artemtype@2001:470:69fc:105::75b)
20:00:22 Sgeo joins (~Sgeo@user/sgeo)
20:02:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
20:02:40 × jespada quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Ping timeout: 248 seconds)
20:05:03 jespada joins (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net)
20:05:32 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 268 seconds)
20:12:17 chreekat joins (~chreekat@2001:470:69fc:105::16b5)
20:19:56 ec joins (~ec@gateway/tor-sasl/ec)
20:21:22 wroathe joins (~wroathe@50.205.197.50)
20:21:22 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
20:21:22 wroathe joins (~wroathe@user/wroathe)
20:25:52 × taupiqueur quits (~taupiqueu@2a02-842a-8180-4601-c87a-3932-439e-c5a6.rev.sfr.net) (Quit: WeeChat 3.8)
20:28:21 × alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-c87a-3932-439e-c5a6.rev.sfr.net) (Remote host closed the connection)
20:28:22 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Remote host closed the connection)
20:28:45 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
20:32:31 × trev quits (~trev@user/trev) (Quit: trev)
20:34:35 <Profpatsch> newtype Foo from to = Foo ((Context, from) -> Either Error (Context, to))
20:34:44 <Profpatsch> ^ I can implement a Semigroup instance for this
20:35:26 × _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
20:35:53 <Profpatsch> *Semigroupoid; but passing through the context manually is kinda annyoing; is there a better way to write the type?
20:36:19 <Profpatsch> The semigroupoid instance doesn’t even touch the Context, it just passes it on
20:37:44 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
20:39:31 <jade[m]> Profpatsch: how does it vary from the instance that could be derived (`instance Semigroup b => Semigroup (a -> b)` and `instance Semigroup (Either a b)`
20:39:32 <Profpatsch> I’m experimenting with writing parsers in a Categorical way
20:39:42 <Profpatsch> jade[m]: Semigroupoid
20:39:47 <Profpatsch> not semigroup
20:39:47 <jade[m]> * a b)`)?
20:39:49 <jade[m]> ahhh
20:39:50 <Profpatsch> i.e. Category without id
20:39:54 <Profpatsch> sorry, my mistake :)
20:40:22 <Profpatsch> So you get Parser from to e.g. jsonString :: Parser Value Text
20:41:06 ec joins (~ec@gateway/tor-sasl/ec)
20:41:56 <Profpatsch> jade[m]: kinda what I did in https://hackage.haskell.org/package/pa-field-parser-0.1.0.1#readme but generalized to more complicated structures like XML
20:42:04 taupiqueur joins (~taupiqueu@2a02:842a:8180:4601:39fb:294e:6171:ad18)
20:42:19 <jade[m]> interesting
20:42:34 <Profpatsch> In particular going towards a sensible Applicative/Selective instance for combining these
20:42:41 <jade[m]> im not as caught up on tge category theory stuff as I should be
20:42:47 <Profpatsch> And adding parsing context like the path to the thing that you are parsing
20:43:03 <Profpatsch> jade[m]: I have no idea about category, it’s just what the class is called :P
20:43:10 <Profpatsch> *about category theory
20:43:15 alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-39fb-294e-6171-ad18.rev.sfr.net)
20:43:38 <jade[m]> haha ok
20:43:47 <Profpatsch> like, I’m working my way from the concrete to the abstract not the other way around if that0s what you mean
20:43:49 <jade[m]> I would like to know about category theory I should say
20:44:13 <Profpatsch> things only make sense to me that way, coming from a practical problem
20:44:17 <jade[m]> Profpatsch: that's how I work most of the time too
20:45:15 <Profpatsch> jade[m]: the specific parser is here: https://code.tvl.fyi/tree/users/Profpatsch/netencode/Netencode/Parse.hs#n30
20:45:26 <Profpatsch> And I’m thinking about how to solve that TODO
20:45:28 <jade[m]> cool!
20:45:39 Guest38 joins (~Guest18@host-091-097-060-051.ewe-ip-backbone.de)
20:45:43 <Profpatsch> maybe it’s not even a big thing, maybe it’s a fundamental insight I’m missing here
20:46:06 <Profpatsch> passing some extra info “along” … hm … that sounds very Arrow-y now that I think about it
20:46:08 × dhil quits (~dhil@78.45.150.83.ewm.ftth.as8758.net) (Ping timeout: 240 seconds)
20:46:16 chromoblob joins (~user@37.113.158.8)
20:46:21 <Profpatsch> I mean I can get it done just doing what I did here
20:46:56 <Profpatsch> This is very much inspired by https://hackage.haskell.org/package/aeson-better-errors but adding a second type parameter so that I can get it to be Category
20:47:10 <Profpatsch> tbd whether it makes parsing easier
20:47:20 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
20:47:24 × Guest38 quits (~Guest18@host-091-097-060-051.ewe-ip-backbone.de) (Client Quit)
20:48:40 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
20:48:55 × alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-39fb-294e-6171-ad18.rev.sfr.net) (Remote host closed the connection)
20:49:16 alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-39fb-294e-6171-ad18.rev.sfr.net)
20:49:42 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
20:49:59 chexum joins (~quassel@gateway/tor-sasl/chexum)
20:50:02 <ncf> not sure i understand what part of your code you want to simplify?
20:50:47 <Profpatsch> ncf: manually passing through [Text] from the left to the right of my Kleisli
20:50:59 ec joins (~ec@gateway/tor-sasl/ec)
20:51:06 <ncf> where?
20:51:12 <Profpatsch> ncf: https://code.tvl.fyi/tree/users/Profpatsch/netencode/Netencode/Parse.hs#n33
20:51:27 × chromoblob quits (~user@37.113.158.8) (Ping timeout: 265 seconds)
20:51:44 <ncf> but yeah, `second` would probably help
20:51:51 <Profpatsch> It’s essentially a daat Foo a b = Kleisli (Validation …) ([Text], a) ([Text], b)
20:52:09 <ncf> you mean you want to simplify the type itself?
20:52:26 <Profpatsch> Maybe? Not sure lol
20:52:46 <Profpatsch> If it were just Monad I’d make it into a Writer cause I’m only ever adding elements to the list
20:52:59 <Profpatsch> but since this is Category I have to pass it from the left to the right hrm
20:53:33 <ncf> do you?
20:54:12 <Profpatsch> so essentially I want to say key "foo" >>> key "bar" and have the [Text] be ["foo", "bar"]
20:54:17 <ncf> what's wrong with Kleisli (Compose (Writer [Text]) (Validation …)) ?
20:54:43 <ncf> (or WriterT)
20:56:17 <EvanR> <<< is a thing
20:56:36 <Profpatsch> The way I do it is generate the error messages in case of Failure, and use the context in the error messages
20:57:17 <ncf> so have Writer on the outside
20:57:20 <Profpatsch> So the writer is not global in my m, but rather needs to be locally available within the thingies
20:57:35 <ncf> hmm
21:00:05 <Profpatsch> So I’m essentially building a difference list which is available at the leaves of parsing as an input in case of error but will be passed on to the next nesting level in case of success.
21:00:25 <Profpatsch> And in case the whole parse succeeds, it’s just thrown away.
21:00:58 <ncf> if you want something of type Parse (Either Error to) to , i think you have no choice but to use state instead of writer... but shouldn't that be Parse from (Either Error to) -> Parse from to ?
21:01:20 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
21:02:07 ec joins (~ec@gateway/tor-sasl/ec)
21:06:10 <Profpatsch> Meh, maybe there is no good abstraction for this
21:06:22 <Profpatsch> I’m not sure about the current form of the parser
21:09:30 ddellacosta joins (~ddellacos@146.70.165.162)
21:11:20 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
21:15:04 ec joins (~ec@gateway/tor-sasl/ec)
21:19:04 <monochrom> "State = ReaderT Writer" is a poor model, and it shows.
21:20:31 <monochrom> Also why mathematicians know when to be careful and write "(Integer, +, 0) is a monoid" not just "Integer is a monoid".
21:21:24 <monochrom> How the operators behave is more important than what elements are in the set.
21:22:30 SeanKing[m] joins (~seankingm@2001:470:69fc:105::cf9c)
21:23:21 × vandita quits (~vandit@178-164-188-71.pool.digikabel.hu) (Ping timeout: 265 seconds)
21:23:31 <Profpatsch> monochrom: that’s not a thing you can say, the definition of an algebra is „a set with some operations that observe laws“
21:23:31 alanz joins (~alanz@2001:470:69fc:105::2:49a6)
21:23:32 Christoph[m] joins (~hpotsirhc@2001:470:69fc:105::2ff8)
21:24:40 <Profpatsch> But yeah, I get what you mean :)
21:24:47 Deide joins (~deide@user/deide)
21:25:01 vandita joins (~vandit@178-164-188-116.pool.digikabel.hu)
21:25:38 <monochrom> This is why (State, State's pure, State's >>=) ≠ (ReaderT Writer, ReaderT Writer's pure, ReaderT Writer's >>=), as I said.
21:26:03 ManofLetters[m] joins (~manoflett@2001:470:69fc:105::3be)
21:26:42 <ncf> why did you bring that up?
21:26:48 romes[m] joins (~romesmatr@2001:470:69fc:105::2:1660)
21:26:48 alexfmpe[m] joins (~alexfmpem@2001:470:69fc:105::38ba)
21:26:48 elevenkb joins (~elevenkb@2001:470:69fc:105::2:cb89)
21:27:11 <monochrom> I think you were discussing that?
21:27:20 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
21:27:35 marinelli[m] joins (~marinelli@2001:470:69fc:105::2d8)
21:27:36 maerwald[m] joins (~maerwaldm@2001:470:69fc:105::1ee)
21:27:36 hsiktas[m] joins (~hsiktasm]@2001:470:69fc:105::30d4)
21:29:16 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
21:29:42 <ncf> i said state because i think that is what we want here, as opposed to reader-writer, but i'm a bit fuzzy about the whole thing
21:29:43 <Profpatsch> does abstract algebra even have an “higher-kinded” things
21:29:50 <Profpatsch> or is that squarely category theory
21:30:06 ec joins (~ec@gateway/tor-sasl/ec)
21:30:59 <Profpatsch> Hm, I guess that’s up for debate
21:31:17 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:31:37 <Profpatsch> The terminology turns extremely categor-y once you look at articles like https://en.wikipedia.org/wiki/Semigroupoid
21:36:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
21:36:22 geekosaur[m] joins (~geekosaur@xmonad/geekosaur)
21:37:08 somerandomnick[m joins (~somerando@2001:470:69fc:105::3:4f2e)
21:40:00 ec joins (~ec@gateway/tor-sasl/ec)
21:41:55 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Remote host closed the connection)
21:42:18 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
21:42:37 × ddellacosta quits (~ddellacos@146.70.165.162) (Ping timeout: 240 seconds)
21:43:33 × alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-39fb-294e-6171-ad18.rev.sfr.net) (Remote host closed the connection)
21:43:49 × taupiqueur quits (~taupiqueu@2a02:842a:8180:4601:39fb:294e:6171:ad18) (Quit: WeeChat 3.8)
21:51:29 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
21:51:44 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
21:55:23 ec joins (~ec@gateway/tor-sasl/ec)
21:55:27 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
21:56:27 biberu joins (~biberu@user/biberu)
21:58:01 × acidjnk quits (~acidjnk@p200300d6e7072f454588bfb78dd6f620.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
21:58:29 acidjnk joins (~acidjnk@p200300d6e7072f45584b05120c40d8b9.dip0.t-ipconnect.de)
22:00:37 nate2 joins (~nate@98.45.169.16)
22:01:59 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
22:02:28 × michalz quits (~michalz@185.246.207.200) (Remote host closed the connection)
22:05:07 × nate2 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds)
22:05:44 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
22:08:49 × machinedgod quits (~machinedg@93-136-46-129.adsl.net.t-com.hr) (Ping timeout: 265 seconds)
22:10:15 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:d512:b207:c888:476e) (Remote host closed the connection)
22:12:10 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Ping timeout: 265 seconds)
22:15:17 × iteratee_ quits (~kyle@162.218.222.207) (Ping timeout: 250 seconds)
22:16:04 falafel joins (~falafel@2603-8000-d700-115c-2927-3c25-4823-43b5.res6.spectrum.com)
22:16:33 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
22:22:47 iteratee joins (~kyle@162.218.222.207)
22:23:07 × gurkenglas quits (~user@dynamic-046-114-180-171.46.114.pool.telefonica.de) (Ping timeout: 240 seconds)
22:23:17 reach joins (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b)
22:23:44 ec joins (~ec@gateway/tor-sasl/ec)
22:25:40 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
22:30:56 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
22:34:11 ec joins (~ec@gateway/tor-sasl/ec)
22:35:07 truckasaurus joins (sid457088@id-457088.helmsley.irccloud.com)
22:41:42 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:d512:b207:c888:476e)
22:42:43 × reach quits (~reach@2607:fea8:4c0:990:f891:b512:3659:bf1b) (Ping timeout: 256 seconds)
22:45:20 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
22:48:26 aerc[m] joins (~aercmatri@2001:470:69fc:105::3:67b9)
22:48:54 ec joins (~ec@gateway/tor-sasl/ec)
23:01:20 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
23:04:22 ec joins (~ec@gateway/tor-sasl/ec)
23:06:05 × tremon quits (~tremon@83.80.159.219) (Quit: getting boxed in)
23:07:25 waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
23:11:50 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
23:11:50 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
23:11:50 wroathe joins (~wroathe@user/wroathe)
23:14:05 mauke_ joins (~mauke@user/mauke)
23:15:58 × falafel quits (~falafel@2603-8000-d700-115c-2927-3c25-4823-43b5.res6.spectrum.com) (Ping timeout: 250 seconds)
23:16:05 × mauke quits (~mauke@user/mauke) (Ping timeout: 268 seconds)
23:16:05 mauke_ is now known as mauke
23:22:02 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
23:24:16 × acidjnk quits (~acidjnk@p200300d6e7072f45584b05120c40d8b9.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
23:25:44 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
23:29:21 ec joins (~ec@gateway/tor-sasl/ec)
23:30:40 × boukenshaou quits (~Boukensha@223.178.84.62) (Ping timeout: 248 seconds)
23:31:28 × vandita quits (~vandit@178-164-188-116.pool.digikabel.hu) (Ping timeout: 240 seconds)
23:33:31 vandita joins (~vandit@87-97-82-165.pool.digikabel.hu)
23:34:08 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
23:36:59 ec joins (~ec@gateway/tor-sasl/ec)
23:40:08 × cheater quits (~Username@user/cheater) (Ping timeout: 265 seconds)
23:42:56 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
23:42:57 × hiredman1 quits (~hiredman@frontier1.downey.family) (Remote host closed the connection)
23:42:58 × hiredman quits (~hiredman@frontier1.downey.family) (Remote host closed the connection)
23:44:12 ec joins (~ec@gateway/tor-sasl/ec)
23:47:10 × waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 250 seconds)
23:47:55 waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
23:57:44 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
23:58:41 falafel joins (~falafel@2603-8000-d700-115c-4e17-c0b2-4915-077f.res6.spectrum.com)

All times are in UTC on 2023-06-03.