2022/02/06

2022-02-06 00:03:38 +0100gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2022-02-06 00:03:48 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-02-06 00:03:48 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-02-06 00:03:48 +0100wroathe(~wroathe@user/wroathe)
2022-02-06 00:04:03 +0100 <janus> hololeap: i can't pull in your PR since I am not a maintainer of happstack-server :P i am just interested
2022-02-06 00:04:17 +0100 <janus> stepcut (jeremy shaw) is the maintainer
2022-02-06 00:04:33 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
2022-02-06 00:05:25 +0100 <Inst[m]> <hololeap> "for instance, some knuckleheads..." <- i'm guessing to learn type-level programming, prolog etc might be a better choice?
2022-02-06 00:05:45 +0100 <Inst[m]> as opposed to idris, agda, scala?
2022-02-06 00:07:08 +0100segfaultfizzbuzz(~rustisafu@2602:306:cd3c:9350:3911:f302:476a:5d4c) (Quit: Leaving)
2022-02-06 00:07:09 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-02-06 00:07:15 +0100 <geekosaur> prolog's not really type level programming. neither is scala. if you're becoming comfortable with haskell then idris may be of interest
2022-02-06 00:07:25 +0100 <geekosaur> but there is no one way to approach type systems
2022-02-06 00:07:33 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl)
2022-02-06 00:08:06 +0100tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-02-06 00:08:09 +0100 <geekosaur> just as there's no one "type system"
2022-02-06 00:09:06 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-02-06 00:09:18 +0100 <Inst[m]> i'm just looking for the high ground, it's the primary argument for my interest in haskell
2022-02-06 00:09:24 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-02-06 00:09:33 +0100 <geekosaur> I don't understand "high ground"
2022-02-06 00:09:51 +0100emad(~emad@156.214.198.176) (Quit: Leaving)
2022-02-06 00:10:05 +0100 <Inst[m]> i.e, have the most sophisticated abstractions, so even if i don't end up using the language,everything else is now easy
2022-02-06 00:10:15 +0100emf(~emf@2620:10d:c090:400::5:ab3f)
2022-02-06 00:10:23 +0100 <Inst[m]> apparently Abstract Data Types can be used to implement quotient types
2022-02-06 00:10:32 +0100 <Inst[m]> which are dual to dependent types, apparently
2022-02-06 00:12:19 +0100xff0x(~xff0x@2001:1a81:525e:1300:ccb2:578e:6a32:bac8) (Ping timeout: 250 seconds)
2022-02-06 00:12:38 +0100 <hololeap> hm, homotopy type theory? :p
2022-02-06 00:12:56 +0100 <Inst[m]> not something i'm familiar with, so monochrom's claim is correct
2022-02-06 00:13:03 +0100 <Inst[m]> i'm just rushing to try to get a basic understanding of everything hard
2022-02-06 00:13:06 +0100xff0x(~xff0x@2001:1a81:525e:1300:8c6b:7d96:3a83:c2cd)
2022-02-06 00:13:12 +0100 <hololeap> I'm not familiar with it either... not very many people are
2022-02-06 00:14:07 +0100 <hololeap> from what I understand it's like a crazy mix of topology and type theory, and I don't know either of those :p
2022-02-06 00:15:28 +0100geekosaurknows a very little bit of both and assumes he'd be completely lost if he tried to poke at HoTT
2022-02-06 00:15:49 +0100 <geekosaur> s/both/either/ perhaps
2022-02-06 00:16:10 +0100zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-02-06 00:16:22 +0100 <sclv> geekosaur: you'd be surprised!
2022-02-06 00:16:41 +0100 <hololeap> Inst[m]: if you're looking for more accessible theory, you might be interested in bartosz milewski's stuff
2022-02-06 00:17:05 +0100 <Inst[m]> oh wait
2022-02-06 00:17:05 +0100 <Inst[m]> https://homotopytypetheory.org/book/
2022-02-06 00:17:13 +0100 <Inst[m]> is this the stuff that's purportedly unreadable even with a PhD?
2022-02-06 00:17:29 +0100 <sclv> its accessible if you go slowly
2022-02-06 00:17:43 +0100 <geekosaur> "a" Ph.D.? I'd imagine it depends on which
2022-02-06 00:17:49 +0100 <sclv> it doesn't make programming haskell easier though. its just really neat math!
2022-02-06 00:18:08 +0100 <geekosaur> so not so different from CT in that regard?
2022-02-06 00:18:17 +0100 <sclv> arguably, yes :-)
2022-02-06 00:18:34 +0100 <monochrom> OOP used to be a PhD thing, too.
2022-02-06 00:19:15 +0100 <sclv> considering fancier abstractions are more "advanced" is not a good approach, in my experience
2022-02-06 00:19:21 +0100 <sclv> they just let you do different things
2022-02-06 00:19:26 +0100 <monochrom> 400 years ago, only PhDs were taught the quadratic formula.
2022-02-06 00:19:34 +0100 <sclv> and they don't substitute for knowing the details of the specific things they abstract
2022-02-06 00:19:56 +0100 <Hecate> < monochrom> OOP used to be a PhD thing, too. // And then Java brought it to the masses by deforming it beyond recognition
2022-02-06 00:19:59 +0100 <Hecate> :D
2022-02-06 00:20:15 +0100 <sclv> i.e. you can formulate group theory as a special case of category theory. but just because a group can be presented as a category doesn't mean that knowing a textbook full of category theory helps you understand the classification of finite simple groups
2022-02-06 00:20:32 +0100 <sclv> it helps with some things for sure, but its no substitute!
2022-02-06 00:21:02 +0100 <monochrom> The deformation also took a few PhDs and research papers to truly understand, too.
2022-02-06 00:21:28 +0100 <monochrom> Not to mention the multiple engineering-inclined PhDs to make Java run faster.
2022-02-06 00:21:36 +0100 <monochrom> or run with less memory
2022-02-06 00:21:44 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net)
2022-02-06 00:24:10 +0100perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2022-02-06 00:24:25 +0100 <monochrom> And recall that it took Wadler, not some software "engineer", to figure out Java Generics.
2022-02-06 00:25:13 +0100 <ski> Hecate : yea, it's what usually happens
2022-02-06 00:26:33 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2022-02-06 00:26:55 +0100 <ski> Inst[m] : some parts of Prolog (or logic programming in general) is helpful for understanding type systems, sure. also, it helps round out your understanding of different programming paradigms
2022-02-06 00:27:12 +0100 <ski> (Prolog is dynamically typed, btw)
2022-02-06 00:27:19 +0100 <monochrom> Just 50 years ago, replacing goto by loops and if-then-else was an "impractical academic pipe dream".
2022-02-06 00:27:45 +0100skiidly ponders the invention of the subroutine
2022-02-06 00:27:47 +0100 <monochrom> (look for "Dijkstra structured programming")
2022-02-06 00:27:52 +0100zebrag(~chris@user/zebrag)
2022-02-06 00:29:08 +0100 <maerwald> monochrom: I had an odd moment yesterday while coding bash and I wished it had goto
2022-02-06 00:30:19 +0100 <monochrom> Which one do you prefer? An exception system. BASIC's "on error goto".
2022-02-06 00:30:27 +0100 <sprout_> goto is useful
2022-02-06 00:30:45 +0100 <sprout_> I think you want both
2022-02-06 00:30:46 +0100 <monochrom> Between a rock and a hard place :)
2022-02-06 00:31:12 +0100 <sprout_> I have it in my lexer (I think that's the only place) but also in my bytecode
2022-02-06 00:31:13 +0100 <maerwald> programming is a conspiracy to make us forget goto
2022-02-06 00:31:54 +0100 <sprout_> both do (naive) pattern matching so I guess goto naturally arises there
2022-02-06 00:32:08 +0100 <sprout_> or rather, conditional jumps
2022-02-06 00:33:27 +0100 <ski> The term "flexibility" is usually used to denote the existence of a range of choices available to a programmer or implementor -- the more choices, the greater the flexibility. Flexibility is sometimes referred to as "generality". Because it is frequently presented in the desirable terms, "delaying binding of virtual objects to their realizations,"
2022-02-06 00:33:40 +0100 <ski> increased flexibility has generally been considered a fatted calf of great succulence, sought voraciously and in the hope that the increased complexity that invariably attends it can be kept under control. In recent years, the wisdom of this quest has been called into question, for flexibility without discipline appears contrary to the plans of the god of reliability.
2022-02-06 00:33:50 +0100 <ski> (An automobile with independent steering mechanisms for both front wheels is more flexible but less disciplined than an ordinary one. It is mainly of metaphysical interest, offensive to the god of safe highways.)
2022-02-06 00:33:54 +0100 <ski> -- "Sacrificing the calf of flexibility on the altar of reliability",Peter J. Denning,1976,<http://dl.acm.org/ft_gateway.cfm?id=807704&type=pdf>
2022-02-06 00:34:56 +0100 <monochrom> OTOH independent steering for all 4 wheels is actually useful.
2022-02-06 00:35:18 +0100 <ski> if they're all coordinated with each other in an intelligent way :)
2022-02-06 00:35:37 +0100 <monochrom> One of those times when the middle ground is worse than both extremes.
2022-02-06 00:35:51 +0100 <Inst[m]> iirc, yes, byd, parallel parking via computer
2022-02-06 00:36:00 +0100 <Inst[m]> they were promising a car like that a while back
2022-02-06 00:36:05 +0100 <ski> the (short, three pages) paper goes on to talk about reliability, correctness, flexibility, mentioning patterns in the past like assembly vs. high-level (like BCPL,C), batch vs. interactive, relational vs. network, &c.
2022-02-06 00:36:06 +0100 <Inst[m]> can i ask a question about how haskell-built .exes work?
2022-02-06 00:36:17 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-02-06 00:36:29 +0100 <Inst[m]> don't ask to ask
2022-02-06 00:36:34 +0100 <monochrom> The Freedom Convoy demands independent steering of all 18 wheels! >:)
2022-02-06 00:36:56 +0100 <geekosaur> at what level? the high level view is https://en.wikipedia.org/wiki/Graph_reduction
2022-02-06 00:37:06 +0100 <Inst[m]> i'll just put it out there: haskell built exes are independent of path variables, right? especially if it's just a simple program made out of a few putStrLn and getChars, right?
2022-02-06 00:37:37 +0100deadmarshal(~deadmarsh@95.38.114.160)
2022-02-06 00:37:39 +0100 <geekosaur> the low level view of that is https://www.microsoft.com/en-us/research/wp-content/uploads/1992/04/spineless-tagless-gmachine.pdf
2022-02-06 00:38:33 +0100 <geekosaur> they're independent if they don't use data files and don't use ghc-api (which is more or less all of ghc linked into your program and requires its whole installation to be available)
2022-02-06 00:39:01 +0100 <Inst[m]> define data-files
2022-02-06 00:39:03 +0100 <geekosaur> even if it uses data files you have some control over it, although I haven't looked at recent versions of how that works
2022-02-06 00:39:17 +0100 <Inst[m]> primitive ghc "filename" of crap simple program
2022-02-06 00:39:41 +0100 <Inst[m]> only module used is system.io and only extension is strict
2022-02-06 00:39:49 +0100 <geekosaur> then you don't care
2022-02-06 00:40:22 +0100 <geekosaur> no pathnames and you can just copy the exe around (although I don't know offhand what dlls it might require)
2022-02-06 00:40:29 +0100 <geekosaur> <-- not really a windows person
2022-02-06 00:40:38 +0100 <Inst[m]> files generated were .hi, .hs, .o, .exe
2022-02-06 00:40:48 +0100 <geekosaur> I know on unixlikes the default is to link statically so a program is pretty much self-contained
2022-02-06 00:40:56 +0100 <hololeap> anyone have a clue what this `-i` is doing here in doctest? https://github.com/dhall-lang/dhall-haskell/blob/master/dhall/doctest/Main.hs#L51
2022-02-06 00:41:00 +0100 <Inst[m]> i guess winio is effectively a black art
2022-02-06 00:41:09 +0100machinedgod(~machinedg@24.105.81.50) (Ping timeout: 250 seconds)
2022-02-06 00:41:13 +0100 <monochrom> By default GHC on Windows is even more static than GHC on Linux.
2022-02-06 00:41:19 +0100 <geekosaur> the .hi and .o files are intermediates you probably don't need to hold on to
2022-02-06 00:41:38 +0100 <Inst[m]> so, if the file was compiled while winio was still returning the expected behavior
2022-02-06 00:41:46 +0100 <geekosaur> if you have multiple source files then you might want to keep them in your dev environment to save on recompiling everything when you only change one file
2022-02-06 00:41:50 +0100 <Inst[m]> i should go badger the #powershell folks some more
2022-02-06 00:42:11 +0100deadmarshal(~deadmarsh@95.38.114.160) (Ping timeout: 256 seconds)
2022-02-06 00:43:45 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-02-06 00:43:48 +0100 <geekosaur> hololeap, it's a module include path. you'd have to ask the Dhall dev(s) for more detail than the comment
2022-02-06 00:43:59 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-02-06 00:45:55 +0100 <geekosaur> Inst[m], I don't know what dependencies the ghc RTS has on Windows. Said dependencies might include registry entries or something in msys2 which might now be confused because installing HP installed a separate msys2 which might have been left around
2022-02-06 00:46:15 +0100 <geekosaur> and I'd expect mixing things between different msys2 installations to cause problems
2022-02-06 00:46:23 +0100 <Inst[m]> thanks for trying
2022-02-06 00:46:24 +0100 <geekosaur> that said, I'm just guessing
2022-02-06 00:46:30 +0100 <maerwald> someone once said we should have one msys2 per GHC xD
2022-02-06 00:46:31 +0100 <Inst[m]> possible it's the different msys2 that might have created the issue
2022-02-06 00:47:54 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2022-02-06 00:48:25 +0100kaph(~kaph@net-2-47-208-144.cust.vodafonedsl.it) (Ping timeout: 256 seconds)
2022-02-06 00:52:54 +0100 <hololeap> geekosaur: thanks. do you know if this is documented anywhere? I can't seem to find it.
2022-02-06 00:54:08 +0100 <geekosaur> it appears to be using (passing on?) ghc options so https://downloads.haskell.org/ghc/latest/docs/html/users_guide/flags.html#finding-imports
2022-02-06 00:55:33 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Ping timeout: 276 seconds)
2022-02-06 01:00:05 +0100 <geekosaur> and there's even an example usage of doctest which uses -i that way (toward the end of https://hackage.haskell.org/package/doctest readme)
2022-02-06 01:02:35 +0100 <hololeap> geekosaur: oh, thanks. interesting that the github readme doesn't include that
2022-02-06 01:03:15 +0100 <geekosaur> which github readme? I pulled it from doctest's, since it's running doctest as a function instead of a program
2022-02-06 01:03:34 +0100 <geekosaur> shortly above "Doctest in the wild"
2022-02-06 01:04:02 +0100 <hololeap> https://github.com/sol/doctest#readme
2022-02-06 01:04:22 +0100 <hololeap> I just did a CTRL+F search for "-i" and didn't see anything that looked relevant
2022-02-06 01:07:40 +0100tromp(~textual@dhcp-077-249-230-040.chello.nl)
2022-02-06 01:09:27 +0100 <geekosaur> interesting. yep, looks like thta whole subsection is missing from the github readme
2022-02-06 01:10:20 +0100tromp(~textual@dhcp-077-249-230-040.chello.nl) (Client Quit)
2022-02-06 01:14:34 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-02-06 01:16:17 +0100machinedgod(~machinedg@24.105.81.50)
2022-02-06 01:20:11 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-02-06 01:23:45 +0100chenqisu1(~chenqisu1@183.217.200.249)
2022-02-06 01:28:19 +0100kaph(~kaph@net-2-47-208-144.cust.vodafonedsl.it)
2022-02-06 01:29:19 +0100Tuplanolla(~Tuplanoll@91-159-68-166.elisa-laajakaista.fi) (Quit: Leaving.)
2022-02-06 01:40:20 +0100unyu(~pyon@user/pyon)
2022-02-06 01:46:07 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) (Remote host closed the connection)
2022-02-06 01:57:24 +0100 <Inst[m]> btw
2022-02-06 01:57:28 +0100 <Inst[m]> if anyone wants to see how bizarre my current winio behavior is:
2022-02-06 01:57:29 +0100 <Inst[m]> https://pastebin.com/8G6WD6MU
2022-02-06 01:58:41 +0100 <geekosaur> that's multiple ghci-s running in the same terminal
2022-02-06 01:58:56 +0100 <geekosaur> not supposed to happen these days, but…
2022-02-06 01:59:44 +0100 <geekosaur> check the taks manager and kill all ghci or ghc processes you find running, then try again
2022-02-06 01:59:48 +0100 <geekosaur> *task
2022-02-06 02:01:51 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 256 seconds)
2022-02-06 02:03:39 +0100jao(~jao@68.235.43.173)
2022-02-06 02:05:14 +0100 <Inst[m]> yeah, i know
2022-02-06 02:05:15 +0100 <Inst[m]> it's insane
2022-02-06 02:06:02 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Remote host closed the connection)
2022-02-06 02:06:34 +0100burnsidesLlama(~burnsides@client-8-65.eduroam.oxuni.org.uk)
2022-02-06 02:07:03 +0100etale(~user@2600:8802:2105:7100:721c:e7ff:feda:ed41) (Quit: ERC (IRC client for Emacs 27.1))
2022-02-06 02:10:34 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4)
2022-02-06 02:10:55 +0100burnsidesLlama(~burnsides@client-8-65.eduroam.oxuni.org.uk) (Ping timeout: 256 seconds)
2022-02-06 02:11:13 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-02-06 02:14:18 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972)
2022-02-06 02:14:29 +0100 <romesrf> o/
2022-02-06 02:17:20 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-02-06 02:18:56 +0100etale(~user@2600:8802:2105:7100:721c:e7ff:feda:ed41)
2022-02-06 02:19:15 +0100etale(~user@2600:8802:2105:7100:721c:e7ff:feda:ed41) ()
2022-02-06 02:20:38 +0100etale(~user@2600:8802:2105:7100:721c:e7ff:feda:ed41)
2022-02-06 02:21:01 +0100etale(~user@2600:8802:2105:7100:721c:e7ff:feda:ed41) ()
2022-02-06 02:22:03 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622)
2022-02-06 02:28:37 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972) (Ping timeout: 240 seconds)
2022-02-06 02:33:12 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl)
2022-02-06 02:36:06 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-02-06 02:36:23 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-02-06 02:58:25 +0100ellie(~ellie@user/ellie)
2022-02-06 03:02:31 +0100xsperry(~xs@user/xsperry) (Remote host closed the connection)
2022-02-06 03:05:06 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-02-06 03:05:24 +0100jonathanx_(~jonathan@h-178-174-176-109.a357.priv.bahnhof.se)
2022-02-06 03:05:40 +0100leungbk(~brian@cpe-142-129-149-172.socal.res.rr.com) (Quit: Lost terminal)
2022-02-06 03:07:01 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-02-06 03:14:37 +0100vglfr(~vglfr@coupling.penchant.volia.net) (Ping timeout: 256 seconds)
2022-02-06 03:17:35 +0100califax-(~califax@user/califx)
2022-02-06 03:18:11 +0100vglfr(~vglfr@coupling.penchant.volia.net)
2022-02-06 03:21:09 +0100califax(~califax@user/califx) (Ping timeout: 276 seconds)
2022-02-06 03:21:09 +0100califax-califax
2022-02-06 03:26:51 +0100waleee(~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 256 seconds)
2022-02-06 03:27:28 +0100jao(~jao@68.235.43.173) (Remote host closed the connection)
2022-02-06 03:28:40 +0100d34df00d(~d34df00d@2600:1700:8c60:3a10::48)
2022-02-06 03:28:55 +0100 <d34df00d> Hi!
2022-02-06 03:29:01 +0100 <d34df00d> Exceptions question!
2022-02-06 03:29:54 +0100 <d34df00d> Supose I write a server thread that `forever` reads a line from a socket and does something with it. If the line fails to be read, or if the handler throws an exception, I want to log it, ignore it and run the handler on the next lines.
2022-02-06 03:30:22 +0100 <d34df00d> But I don't want to ignore things I shouldn't ignore, like killing the thread.
2022-02-06 03:30:40 +0100 <d34df00d> How to write this "ignore any exception except the ones that shouldn't be ignored"?
2022-02-06 03:31:43 +0100 <d34df00d> What comes to mind is having more specific handlers for AsyncException/SomeAsyncException which rethrow, and log/ignore the rest.
2022-02-06 03:32:45 +0100mmhat(~mmh@55d44844.access.ecotel.net) (Ping timeout: 256 seconds)
2022-02-06 03:33:07 +0100rusrushal13(~rusrushal@2409:4056:108:9c3b:d7fd:94d2:1ba2:efdd)
2022-02-06 03:33:21 +0100 <d34df00d> But I'm not sure if that's right.
2022-02-06 03:36:17 +0100xff0x(~xff0x@2001:1a81:525e:1300:8c6b:7d96:3a83:c2cd) (Ping timeout: 240 seconds)
2022-02-06 03:36:18 +0100 <ski> d34df00d : maybe define your own kind of exception, and catch only that ?
2022-02-06 03:37:00 +0100 <d34df00d> ski: I want to also be able to catch whatever non-total Prelude functions throw, or maybe some arbitrary third-party library throws.
2022-02-06 03:37:19 +0100 <ski> (or if you can quantify exactly which exceptions you want to catch, do that)
2022-02-06 03:38:04 +0100 <d34df00d> I don't really know in advance.
2022-02-06 03:38:17 +0100xff0x(~xff0x@2001:1a81:52c7:8c00:1f7f:998e:5249:4548)
2022-02-06 03:38:22 +0100 <d34df00d> Think of it as really "a catch-all exception handler at the top of a server loop".
2022-02-06 03:38:45 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
2022-02-06 03:39:35 +0100 <ski> @wiki Error vs. Exception
2022-02-06 03:39:35 +0100 <lambdabot> https://wiki.haskell.org/Error_vs._Exception
2022-02-06 03:39:57 +0100alp(~alp@user/alp) (Ping timeout: 240 seconds)
2022-02-06 03:40:07 +0100 <ski> @hoogle catchJust
2022-02-06 03:40:07 +0100 <lambdabot> Control.Exception catchJust :: Exception e => (e -> Maybe b) -> IO a -> (b -> IO a) -> IO a
2022-02-06 03:40:07 +0100 <lambdabot> Control.Exception.Base catchJust :: Exception e => (e -> Maybe b) -> IO a -> (b -> IO a) -> IO a
2022-02-06 03:40:07 +0100 <lambdabot> Control.Monad.Catch catchJust :: (MonadCatch m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m a
2022-02-06 03:40:24 +0100 <ski> if you know which exceptions you don't want to catch, you could opt out of those, using ^
2022-02-06 03:41:29 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
2022-02-06 03:41:30 +0100 <d34df00d> That makes sense. What things I don't want to catch, though? I know about AsyncException, but is there anything else?
2022-02-06 03:42:57 +0100wombat875(~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Ping timeout: 256 seconds)
2022-02-06 03:44:12 +0100x_kuru(~xkuru@user/xkuru) (Read error: Connection reset by peer)
2022-02-06 03:45:02 +0100wombat875(~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net)
2022-02-06 03:52:29 +0100harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
2022-02-06 03:58:50 +0100xsperry(~xs@user/xsperry)
2022-02-06 04:01:34 +0100lavaman(~lavaman@98.38.249.169)
2022-02-06 04:02:14 +0100 <jackdk> better to catch only the things you know you want. The easiest way to do this is to never write anything that throws, and propagate your errors with constructs like ExceptT. If you use library functions that can throw, immediately wrap the exceptions you care about into Either or Maybe
2022-02-06 04:03:55 +0100machinedgod(~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
2022-02-06 04:05:37 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 256 seconds)
2022-02-06 04:06:11 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
2022-02-06 04:06:59 +0100cuz`(~user@50.226.229.246) (Ping timeout: 256 seconds)
2022-02-06 04:09:34 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-02-06 04:09:36 +0100jonathanx_(~jonathan@h-178-174-176-109.a357.priv.bahnhof.se) (Remote host closed the connection)
2022-02-06 04:09:53 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-02-06 04:10:32 +0100oscurochu(~oscurochu@097-096-050-227.res.spectrum.com)
2022-02-06 04:10:44 +0100dajoer(~david@user/gvx)
2022-02-06 04:10:46 +0100rusrushal13(~rusrushal@2409:4056:108:9c3b:d7fd:94d2:1ba2:efdd) (Quit: Client closed)
2022-02-06 04:16:45 +0100Inst(~delicacie@2601:6c4:4080:3f80:9d25:f887:d801:3464)
2022-02-06 04:17:14 +0100 <Inst> btw
2022-02-06 04:17:34 +0100 <Inst> who was asking about N+k patterns?
2022-02-06 04:17:58 +0100 <Inst> it's still doable, just do nested function definitions, i.e, you use a where pattern
2022-02-06 04:18:11 +0100 <Inst> but i think it was already discussed the last time
2022-02-06 04:18:41 +0100 <Inst> fun (n+k) = .... is now fun n = iFun (n+k) where iFun = ....
2022-02-06 04:23:59 +0100rembo10(~rembo10@remulis.com) (Quit: ZNC 1.8.2 - https://znc.in)
2022-02-06 04:24:53 +0100rembo10(~rembo10@remulis.com)
2022-02-06 04:25:17 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 240 seconds)
2022-02-06 04:25:37 +0100k8yun(~k8yun@198-48-158-40.cpe.pppoe.ca)
2022-02-06 04:25:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-02-06 04:25:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-02-06 04:25:51 +0100wroathe(~wroathe@user/wroathe)
2022-02-06 04:26:35 +0100chenqisu1(~chenqisu1@183.217.200.249) (Ping timeout: 256 seconds)
2022-02-06 04:35:09 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2022-02-06 04:35:10 +0100allbery_b(~geekosaur@xmonad/geekosaur)
2022-02-06 04:35:13 +0100allbery_bgeekosaur
2022-02-06 04:35:55 +0100ProfSimm(~ProfSimm@87.227.196.109) (Remote host closed the connection)
2022-02-06 04:37:16 +0100jao(~jao@68.235.43.173)
2022-02-06 04:37:35 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-02-06 04:37:52 +0100pie_(~pie_bnc@user/pie/x-2818909) (Quit: pie_)
2022-02-06 04:39:37 +0100td_(~td@muedsl-82-207-238-241.citykom.de) (Ping timeout: 256 seconds)
2022-02-06 04:41:28 +0100pie_(~pie_bnc@user/pie/x-2818909)
2022-02-06 04:41:33 +0100td_(~td@muedsl-82-207-238-099.citykom.de)
2022-02-06 04:41:37 +0100Inst(~delicacie@2601:6c4:4080:3f80:9d25:f887:d801:3464) (Ping timeout: 240 seconds)
2022-02-06 04:43:09 +0100 <ski> Inst[m] : that's, almost, the opposite
2022-02-06 04:44:01 +0100 <ski> (almost, because an n+k pattern only matches non-negatives)
2022-02-06 04:44:38 +0100cuz`(~user@50.226.229.246)
2022-02-06 04:49:15 +0100cuz`(~user@50.226.229.246) (Ping timeout: 256 seconds)
2022-02-06 04:52:11 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-02-06 04:52:27 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-02-06 04:54:41 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-02-06 04:56:50 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 05:03:08 +0100dyeplexer(~dyeplexer@user/dyeplexer)
2022-02-06 05:03:55 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl)
2022-02-06 05:17:34 +0100Inst(~delicacie@2601:6c4:4080:3f80:65d0:53d1:d25a:5705)
2022-02-06 05:23:57 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-02-06 05:26:10 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 05:27:11 +0100fef(~thedawn@user/thedawn)
2022-02-06 05:29:46 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 250 seconds)
2022-02-06 05:37:59 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-02-06 05:42:43 +0100Akiva(~Akiva@user/Akiva)
2022-02-06 05:42:58 +0100Erutuon(~Erutuon@user/erutuon)
2022-02-06 05:46:48 +0100deadmarshal(~deadmarsh@95.38.114.160)
2022-02-06 05:49:17 +0100LiaoTao_(~LiaoTao@gateway/tor-sasl/liaotao)
2022-02-06 05:49:21 +0100LiaoTao(~LiaoTao@gateway/tor-sasl/liaotao) (Ping timeout: 276 seconds)
2022-02-06 05:49:45 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-02-06 05:50:48 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-02-06 05:55:57 +0100emf(~emf@2620:10d:c090:400::5:ab3f) (Ping timeout: 240 seconds)
2022-02-06 05:57:36 +0100emf(~emf@2620:10d:c090:400::5:ab3f)
2022-02-06 05:58:28 +0100gaff(~gaff@49.207.221.138)
2022-02-06 06:02:28 +0100Sgeo(~Sgeo@user/sgeo)
2022-02-06 06:05:36 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
2022-02-06 06:10:22 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-02-06 06:10:22 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-02-06 06:10:22 +0100wroathe(~wroathe@user/wroathe)
2022-02-06 06:13:41 +0100jao(~jao@68.235.43.173) (Ping timeout: 256 seconds)
2022-02-06 06:25:01 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-02-06 06:30:49 +0100ld86(~ld86@host86-151-221-50.range86-151.btcentralplus.com)
2022-02-06 06:31:02 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-02-06 06:32:22 +0100ld86(~ld86@host86-151-221-50.range86-151.btcentralplus.com) (Client Quit)
2022-02-06 06:34:41 +0100meer(~delicacie@2601:6c4:4080:3f80:99ec:65c9:5423:af7b)
2022-02-06 06:36:17 +0100Inst(~delicacie@2601:6c4:4080:3f80:65d0:53d1:d25a:5705) (Ping timeout: 240 seconds)
2022-02-06 06:36:41 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-02-06 06:38:30 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 06:40:17 +0100chenqisu1(~chenqisu1@183.217.200.249)
2022-02-06 06:42:17 +0100etale(~user@2600:8802:2105:7100:721c:e7ff:feda:ed41)
2022-02-06 06:42:42 +0100etale(~user@2600:8802:2105:7100:721c:e7ff:feda:ed41) (Client Quit)
2022-02-06 06:44:40 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-02-06 06:47:51 +0100zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-02-06 06:49:09 +0100deadmarshal(~deadmarsh@95.38.114.160) (Ping timeout: 256 seconds)
2022-02-06 06:53:37 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-02-06 06:54:05 +0100 <meer> `/join #powershell
2022-02-06 06:54:11 +0100meerInst
2022-02-06 06:54:49 +0100pierrot(~pi@user/pierrot) (Read error: Connection reset by peer)
2022-02-06 06:55:50 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 06:55:59 +0100pierrot(~pi@user/pierrot)
2022-02-06 07:01:40 +0100Jing(~hedgehog@240e:390:7c53:a7e1:d8d5:ad63:210:577a)
2022-02-06 07:04:27 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-02-06 07:06:13 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 07:11:04 +0100little_mac(~little_ma@2601:410:4300:3ce0:a45b:6ac9:43c1:2d7f) (Remote host closed the connection)
2022-02-06 07:11:19 +0100akegalj(~akegalj@93-138-103-111.adsl.net.t-com.hr)
2022-02-06 07:16:38 +0100gaff(~gaff@49.207.221.138) (Remote host closed the connection)
2022-02-06 07:18:17 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-02-06 07:20:05 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net)
2022-02-06 07:20:33 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 07:22:20 +0100deadmarshal(~deadmarsh@95.38.114.160)
2022-02-06 07:22:51 +0100glguy(x@libera/staff/glguy)
2022-02-06 07:23:18 +0100Everything(~Everythin@37.115.210.35)
2022-02-06 07:24:17 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
2022-02-06 07:24:36 +0100CiaoSen(~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2022-02-06 07:25:19 +0100mbuf(~Shakthi@122.178.180.184)
2022-02-06 07:34:29 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl)
2022-02-06 07:43:04 +0100slowButPresent(~slowButPr@user/slowbutpresent) (Quit: leaving)
2022-02-06 07:49:19 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2022-02-06 07:49:43 +0100geekosaur(~geekosaur@xmonad/geekosaur)
2022-02-06 07:49:56 +0100gaff(~gaff@49.207.223.219)
2022-02-06 07:52:24 +0100perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4)
2022-02-06 07:52:40 +0100perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2022-02-06 07:52:51 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-02-06 07:54:53 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 07:55:50 +0100gaff(~gaff@49.207.223.219) (Remote host closed the connection)
2022-02-06 07:57:11 +0100gaff(~gaff@49.207.223.219)
2022-02-06 07:57:27 +0100kaph(~kaph@net-2-47-208-144.cust.vodafonedsl.it) (Read error: Connection reset by peer)
2022-02-06 08:02:58 +0100lavaman(~lavaman@98.38.249.169)
2022-02-06 08:05:21 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-02-06 08:07:17 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
2022-02-06 08:07:58 +0100gaff(~gaff@49.207.223.219) (Quit: Bye ...)
2022-02-06 08:08:17 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-02-06 08:09:20 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-02-06 08:11:19 +0100alfonsox(~quassel@103.87.57.95)
2022-02-06 08:14:37 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-02-06 08:17:33 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 08:19:31 +0100tromp(~textual@dhcp-077-249-230-040.chello.nl)
2022-02-06 08:21:25 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
2022-02-06 08:26:56 +0100fendor(~fendor@178.115.78.100.wireless.dyn.drei.com)
2022-02-06 08:27:00 +0100thebnq(~bnq@herrokitty.com) (Remote host closed the connection)
2022-02-06 08:27:11 +0100gehmehgeh(~user@user/gehmehgeh)
2022-02-06 08:40:06 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-02-06 08:40:28 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-02-06 08:45:17 +0100thebnq(~bnq@66-37-19-52.phx.onelemur.com)
2022-02-06 08:45:25 +0100thebnq(~bnq@66-37-19-52.phx.onelemur.com) (Remote host closed the connection)
2022-02-06 08:47:27 +0100thebnq(~bnq@66-37-19-52.phx.onelemur.com)
2022-02-06 08:49:32 +0100mikoto-chan(~mikoto-ch@213.177.151.239)
2022-02-06 08:53:21 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2022-02-06 08:57:07 +0100mikoto-chan(~mikoto-ch@213.177.151.239) (Ping timeout: 256 seconds)
2022-02-06 09:10:13 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-02-06 09:10:13 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-02-06 09:10:13 +0100wroathe(~wroathe@user/wroathe)
2022-02-06 09:10:31 +0100Tuplanolla(~Tuplanoll@91-159-68-166.elisa-laajakaista.fi)
2022-02-06 09:10:39 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972)
2022-02-06 09:11:44 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) (Remote host closed the connection)
2022-02-06 09:12:11 +0100akegalj(~akegalj@93-138-103-111.adsl.net.t-com.hr) (Remote host closed the connection)
2022-02-06 09:15:21 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-02-06 09:15:31 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972) (Ping timeout: 250 seconds)
2022-02-06 09:25:15 +0100mikoto-chan(~mikoto-ch@213.177.151.239)
2022-02-06 09:25:59 +0100`2jt(~jtomas@130.red-88-22-46.staticip.rima-tde.net)
2022-02-06 09:28:47 +0100enoch(~enochthec@115-188-140-207-vdsl.sparkbb.co.nz)
2022-02-06 09:28:47 +0100enoch(~enochthec@115-188-140-207-vdsl.sparkbb.co.nz) (Changing host)
2022-02-06 09:28:47 +0100enoch(~enochthec@user/enochthechronoco)
2022-02-06 09:30:37 +0100Inst(~delicacie@2601:6c4:4080:3f80:99ec:65c9:5423:af7b) (Ping timeout: 240 seconds)
2022-02-06 09:32:52 +0100`2jt(~jtomas@130.red-88-22-46.staticip.rima-tde.net) (Ping timeout: 250 seconds)
2022-02-06 09:34:57 +0100`2jt(~jtomas@130.red-88-22-46.staticip.rima-tde.net)
2022-02-06 09:35:46 +0100enoch(~enochthec@user/enochthechronoco) (Quit: Igloo IRC: https://iglooirc.com)
2022-02-06 09:41:33 +0100 <absentia> is `fromEnum` known to be poorly performant?
2022-02-06 09:42:08 +0100 <sm> is it practical to build static binaries with stack yet ?
2022-02-06 09:42:46 +0100xkuru(~xkuru@user/xkuru)
2022-02-06 09:53:33 +0100k8yun(~k8yun@198-48-158-40.cpe.pppoe.ca) (Ping timeout: 256 seconds)
2022-02-06 09:58:26 +0100 <sm> does anyone know what this yesod / aeson error is about ? https://paste.tomsmeding.com/B9qeYo3n/raw/1 . Here's the yesod code, how did calling M.lookup on an Object ever work ? M is Data.HashMap.Strict
2022-02-06 09:58:27 +0100smsent a haskell code block: https://libera.ems.host/_matrix/media/r0/download/libera.chat/21fc49443d4049b795911dbe3627a3bd2908…
2022-02-06 09:58:55 +0100 <vaibhavsagar[m]> It works if you use the latest Aeson
2022-02-06 09:59:23 +0100 <vaibhavsagar[m]> Since they changed the default to be `Map` instead of `HashMap`
2022-02-06 10:00:41 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl)
2022-02-06 10:00:43 +0100 <sm> vaibhavsagar: thanks! so yesod should be requiring aeson >= ... 2.0.1.0 ?
2022-02-06 10:00:56 +0100 <sm> https://hackage.haskell.org/package/aeson-2.0.3.0/changelog is not super informative
2022-02-06 10:01:22 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Remote host closed the connection)
2022-02-06 10:01:59 +0100 <vaibhavsagar[m]> > Make `ordered-keymap` on by default
2022-02-06 10:02:00 +0100 <lambdabot> <hint>:1:14: error: parse error on input ‘-’
2022-02-06 10:02:11 +0100 <vaibhavsagar[m]> You're right that it's not informative
2022-02-06 10:02:49 +0100 <vaibhavsagar[m]> I made a bunch of noise when I learned about it but everyone mostly quietly adapted
2022-02-06 10:03:55 +0100 <sm> actually this error comes when building with aeson 2.0.3.0 (latest)
2022-02-06 10:04:34 +0100 <sm> yesod probably needs aeson < 2.0.1.0 then
2022-02-06 10:04:57 +0100 <sm> thanks for making noise. Normally I am insulated from these things by stackage
2022-02-06 10:06:42 +0100Erutuon(~Erutuon@user/erutuon)
2022-02-06 10:07:24 +0100max22-(~maxime@2a01cb0883359800496a3dbe523e6e7d.ipv6.abo.wanadoo.fr)
2022-02-06 10:10:09 +0100smwonders why aeson did that. Usually I see the reverse change
2022-02-06 10:11:03 +0100 <c_wraith> It guaranteed it would perform well no matter what inputs it receives
2022-02-06 10:11:30 +0100 <c_wraith> unordered-containers has had some cases pop up where behavior can be forced to O(n^2)
2022-02-06 10:12:02 +0100 <sm> interesting
2022-02-06 10:12:10 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:1dc4:f5c4:a458:81)
2022-02-06 10:12:18 +0100 <c_wraith> hashing is not the magic bullet people seem to think it is
2022-02-06 10:16:37 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:1dc4:f5c4:a458:81) (Ping timeout: 250 seconds)
2022-02-06 10:18:17 +0100 <Rembane> It's still fun though. Python had similar problems in their hashing algorithms some years ago. They solved it by adding a random salt for every Python interpreter session.
2022-02-06 10:25:57 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972)
2022-02-06 10:29:38 +0100`2jt(~jtomas@130.red-88-22-46.staticip.rima-tde.net) (Ping timeout: 250 seconds)
2022-02-06 10:31:17 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972) (Ping timeout: 256 seconds)
2022-02-06 10:32:42 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2022-02-06 10:34:33 +0100fr33domlover(~fr33@31.210.181.138)
2022-02-06 10:35:36 +0100mc47(~mc47@xmonad/TheMC47)
2022-02-06 10:37:22 +0100 <jackdk> aeson-2.0 has the new KeyMap type, so if you code to that interface you code should be portable between KeyMap = HashMap and KeyMap = Map. In theory.
2022-02-06 10:38:53 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-02-06 10:40:52 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 10:41:18 +0100Inst(~delicacie@c-98-208-218-119.hsd1.fl.comcast.net)
2022-02-06 10:46:54 +0100pavonia(~user@user/siracusa) (Quit: Bye!)
2022-02-06 10:47:57 +0100_ht(~quassel@231-169-21-31.ftth.glasoperator.nl)
2022-02-06 10:53:16 +0100 <sm> yes that was it, current yesod needs aeson < 2
2022-02-06 10:59:43 +0100chir4gm(~chirag@user/chir4gm)
2022-02-06 10:59:54 +0100 <chir4gm> How do I modify the search path for ghc
2022-02-06 10:59:56 +0100 <chir4gm> ?
2022-02-06 11:00:39 +0100 <chir4gm> I am trying to build a package from source (I don't know any haskell), and I can't seem to get ghc to find the libraries installed in /usr/lib
2022-02-06 11:00:48 +0100 <chir4gm> I am on arch, if that is of any relevance
2022-02-06 11:01:47 +0100Inst(~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds)
2022-02-06 11:03:32 +0100Everything(~Everythin@37.115.210.35) (Quit: leaving)
2022-02-06 11:04:09 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-02-06 11:06:00 +0100 <chir4gm> guys?
2022-02-06 11:08:57 +0100 <Rembane> chir4gm: Do you need to recompile the package all the time or will a binary suffice? Because if you can get a binary and use it it's probably easier than the alternatives.
2022-02-06 11:09:14 +0100 <chir4gm> I can't really
2022-02-06 11:09:21 +0100 <chir4gm> I do need to compile it from source
2022-02-06 11:09:38 +0100 <chir4gm> Is there any way to modify ghc'c search path?
2022-02-06 11:09:43 +0100 <chir4gm> *ghc's
2022-02-06 11:09:57 +0100fr33domlover(~fr33@31.210.181.138) (Ping timeout: 240 seconds)
2022-02-06 11:13:09 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-02-06 11:14:06 +0100 <Rembane> Cool, then I recommend you to uninstall ghc and all other Haskell related packages. And then install stack using the instructions on stackage.org and compile the project with stack. Does the project have a stack.yml file?
2022-02-06 11:15:04 +0100 <ephemient> either use stack or ghc+cabal from ghcup; system ghc and libraries are generally not recommended for building anything other than the distro's own packages
2022-02-06 11:16:13 +0100 <ephemient> archlinux in particular only provides dynamic libraries but because the ABI isn't stable, anything you build with the system's packages will break on every upgrade
2022-02-06 11:17:58 +0100 <absentia> keep your local pacman tree free of as much haskell as possible
2022-02-06 11:18:04 +0100 <absentia> it is poorly maintained and hellish during upgrades
2022-02-06 11:19:51 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Remote host closed the connection)
2022-02-06 11:20:23 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2022-02-06 11:21:00 +0100 <ephemient> I don't know if "poorly maintained" is fair, afaik they have automation to convert cabal versions to pacman build files automatically and that generally works. but it's only usable for archlinux's own packages because everything gets revbumped at once
2022-02-06 11:21:32 +0100 <ephemient> chir4gm: tl;dr if you're on archlinux, do *not* build your own haskell binaries using the system's haskell packages
2022-02-06 11:21:51 +0100 <chir4gm> https://github.com/B-Lang-org/bsc
2022-02-06 11:21:57 +0100 <chir4gm> This is what I am trying to build
2022-02-06 11:22:03 +0100 <chir4gm> the aur package fails
2022-02-06 11:22:12 +0100 <chir4gm> So, what do I do here?
2022-02-06 11:24:29 +0100burnside_(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2022-02-06 11:24:36 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Remote host closed the connection)
2022-02-06 11:24:44 +0100jlamothe(~jlamothe@198.251.61.229) (Quit: leaving)
2022-02-06 11:25:03 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-02-06 11:25:22 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-02-06 11:25:33 +0100 <ephemient> https://github.com/B-Lang-org/bsc/blob/main/INSTALL.md has some info about using ghcup/cabal, but it's trying to use the pre-v2 world…
2022-02-06 11:26:07 +0100 <ephemient> but it should basically work
2022-02-06 11:27:30 +0100 <ephemient> I feel like the whole project is crazy for using its own recursive Makefile-based build instead of cabal, but that's not something you're gonna be able to fix yourself
2022-02-06 11:30:55 +0100ardell(~ardell@user/ardell)
2022-02-06 11:31:41 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972)
2022-02-06 11:34:16 +0100Everything(~Everythin@37.115.210.35)
2022-02-06 11:35:46 +0100Everything(~Everythin@37.115.210.35) ()
2022-02-06 11:36:21 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972) (Ping timeout: 250 seconds)
2022-02-06 11:36:57 +0100jlamothe(~jlamothe@198.251.61.229)
2022-02-06 11:37:57 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972)
2022-02-06 11:42:47 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972) (Ping timeout: 252 seconds)
2022-02-06 11:42:54 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 260 seconds)
2022-02-06 11:45:52 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-02-06 11:48:34 +0100MajorBiscuit(~MajorBisc@86-88-79-148.fixed.kpn.net)
2022-02-06 11:55:30 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-02-06 11:55:58 +0100Vajb(~Vajb@2001:999:274:c862:3b86:e1e1:5bff:355e)
2022-02-06 11:56:26 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2022-02-06 11:56:43 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972)
2022-02-06 11:56:57 +0100Hildegunst(~luc@80.248.12.109.rev.sfr.net)
2022-02-06 11:57:39 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
2022-02-06 11:57:44 +0100Lord_of_Life_Lord_of_Life
2022-02-06 11:58:58 +0100Erutuon(~Erutuon@user/erutuon)
2022-02-06 11:59:36 +0100__monty__(~toonn@user/toonn)
2022-02-06 11:59:55 +0100amk(~amk@109.255.169.126) (Ping timeout: 256 seconds)
2022-02-06 12:00:23 +0100Vajb(~Vajb@2001:999:274:c862:3b86:e1e1:5bff:355e) (Ping timeout: 250 seconds)
2022-02-06 12:00:26 +0100amk(~amk@109.255.169.126)
2022-02-06 12:01:05 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-02-06 12:09:25 +0100fef(~thedawn@user/thedawn) (Quit: Leaving)
2022-02-06 12:09:32 +0100Erutuon(~Erutuon@user/erutuon) (Quit: WeeChat 2.8)
2022-02-06 12:18:11 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-02-06 12:20:31 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-02-06 12:22:44 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-02-06 12:23:47 +0100Vajb(~Vajb@2001:999:274:c862:3b86:e1e1:5bff:355e)
2022-02-06 12:25:38 +0100Vajb(~Vajb@2001:999:274:c862:3b86:e1e1:5bff:355e) (Read error: Connection reset by peer)
2022-02-06 12:25:46 +0100oscurochu(~oscurochu@097-096-050-227.res.spectrum.com) (Remote host closed the connection)
2022-02-06 12:25:56 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-02-06 12:27:43 +0100tdammers(~tdammers@77.109.72.177.res.static.edpnet.net) (Quit: WeeChat 3.0)
2022-02-06 12:27:44 +0100CHUD(~CHUD@dhcp6353.kent.ac.uk)
2022-02-06 12:29:09 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972) (Ping timeout: 256 seconds)
2022-02-06 12:31:32 +0100econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-02-06 12:32:18 +0100rtsn(~nstr@user/rtsn)
2022-02-06 12:40:26 +0100MochizukisLastTh(~Mochizuki@112-68-46-13f1.osk2.eonet.ne.jp)
2022-02-06 12:41:03 +0100_xor(~xor@dsl-50-5-233-169.fuse.net) (Ping timeout: 256 seconds)
2022-02-06 12:42:52 +0100_xor(~xor@dsl-50-5-233-169.fuse.net)
2022-02-06 12:43:41 +0100`2jt(~jtomas@130.red-88-22-46.staticip.rima-tde.net)
2022-02-06 12:55:07 +0100MajorBiscuit(~MajorBisc@86-88-79-148.fixed.kpn.net) (Ping timeout: 256 seconds)
2022-02-06 12:56:21 +0100oscuroch_(~oscurochu@097-096-050-227.res.spectrum.com)
2022-02-06 12:57:36 +0100Inst(~delicacie@2601:6c4:4080:3f80:c32:f815:8539:fe9a)
2022-02-06 13:00:21 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972)
2022-02-06 13:00:37 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl)
2022-02-06 13:02:04 +0100CHUD(~CHUD@dhcp6353.kent.ac.uk) (Remote host closed the connection)
2022-02-06 13:03:08 +0100mbuf(~Shakthi@122.178.180.184) (Quit: Leaving)
2022-02-06 13:06:03 +0100max22-(~maxime@2a01cb0883359800496a3dbe523e6e7d.ipv6.abo.wanadoo.fr) (Ping timeout: 250 seconds)
2022-02-06 13:09:01 +0100chenqisu1(~chenqisu1@183.217.200.249) (Quit: Leaving)
2022-02-06 13:09:17 +0100Akiva(~Akiva@user/Akiva) (Ping timeout: 256 seconds)
2022-02-06 13:09:22 +0100RFV(~Thunderbi@187.red-88-13-186.dynamicip.rima-tde.net)
2022-02-06 13:10:58 +0100burnside_(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Remote host closed the connection)
2022-02-06 13:10:59 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-02-06 13:11:30 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2022-02-06 13:12:20 +0100CHUD(~CHUD@dhcp6353.kent.ac.uk)
2022-02-06 13:12:48 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 13:15:23 +0100CHUD(~CHUD@dhcp6353.kent.ac.uk) (Remote host closed the connection)
2022-02-06 13:15:45 +0100CHUD(~CHUD@dhcp6353.kent.ac.uk)
2022-02-06 13:16:11 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
2022-02-06 13:16:22 +0100oem22(xyz@151.30.129.165)
2022-02-06 13:17:33 +0100cynomys(~cynomys@user/cynomys) (Ping timeout: 256 seconds)
2022-02-06 13:21:05 +0100oem22(xyz@151.30.129.165) (Quit: Going offline, see ya! (www.adiirc.com))
2022-02-06 13:21:50 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972) (Ping timeout: 260 seconds)
2022-02-06 13:22:37 +0100oscuroch_(~oscurochu@097-096-050-227.res.spectrum.com) (Ping timeout: 240 seconds)
2022-02-06 13:25:48 +0100hololeap(~hololeap@user/hololeap) (Remote host closed the connection)
2022-02-06 13:27:11 +0100hololeap(~hololeap@user/hololeap)
2022-02-06 13:27:45 +0100jespada(~jespada@87.74.36.188) (Ping timeout: 256 seconds)
2022-02-06 13:28:42 +0100oem(Username@151.30.129.165)
2022-02-06 13:29:20 +0100CHUD(~CHUD@dhcp6353.kent.ac.uk) (Quit: Client closed)
2022-02-06 13:29:32 +0100oem(Username@151.30.129.165) (Client Quit)
2022-02-06 13:30:07 +0100 <absentia> `type Foo = Int; type Bar = Char; data Foobar = Foobar Foo Bar deriving (Eq, Read, Show)
2022-02-06 13:30:17 +0100emf(~emf@2620:10d:c090:400::5:ab3f) (Ping timeout: 240 seconds)
2022-02-06 13:30:17 +0100jespada(~jespada@87.74.36.188)
2022-02-06 13:30:25 +0100 <absentia> `f (Foobar f b) = (f - 1, fromEnum b - 97)`
2022-02-06 13:30:38 +0100 <absentia> does anything stick out here as to why this may perform poorly
2022-02-06 13:31:19 +0100RFV(~Thunderbi@187.red-88-13-186.dynamicip.rima-tde.net) (Quit: RFV)
2022-02-06 13:31:35 +0100 <absentia> profiling reveals i'm spending a lot of time in `f`, not sure if it's because the implementation is poor or if I'm just hammering it that often
2022-02-06 13:32:42 +0100emf(~emf@163.114.132.4)
2022-02-06 13:32:44 +0100 <absentia> that should probably be `f (Foobar foo bar) = (foo - 1, fromEnum bar - 97)`
2022-02-06 13:33:30 +0100 <Rembane> absentia: What's the bigger algorithm? Something Fibonacci-series-definition like?
2022-02-06 13:33:47 +0100MajorBiscuit(~MajorBisc@86-88-79-148.fixed.kpn.net)
2022-02-06 13:34:35 +0100 <absentia> Rembane: this is a utility function for converting between different systems of indexing into a bitboard
2022-02-06 13:34:45 +0100 <absentia> probably i should just use one representation
2022-02-06 13:34:47 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-02-06 13:34:51 +0100 <maerwald> ephemient: I don't think it's crazy
2022-02-06 13:34:54 +0100 <absentia> because it's used everywhere
2022-02-06 13:35:24 +0100 <absentia> is `fromEnum` known to be slow? or tuple construction?
2022-02-06 13:35:35 +0100 <absentia> i find haskell performance baffling to reason about
2022-02-06 13:37:10 +0100 <Rembane> absentia: Got it. Then it shouldn't be that slow. How many times is the function called?
2022-02-06 13:38:00 +0100 <maerwald> ephemient: afair it's also possible to make it work with v2-install
2022-02-06 13:39:11 +0100 <ephemient> yeah you can get cabal to write an env file right?
2022-02-06 13:40:16 +0100 <absentia> Rembane: tens of millions of times
2022-02-06 13:40:27 +0100absentiashrugs
2022-02-06 13:40:49 +0100 <absentia> going by the "entries" in a `stack test --profile` generated `.prof`
2022-02-06 13:40:57 +0100 <absentia> 14% of time spent here
2022-02-06 13:41:30 +0100whatsupdoc(uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2022-02-06 13:41:50 +0100 <absentia> those tens of millions of calls/entries are only 10% of all entries
2022-02-06 13:43:03 +0100 <absentia> `fromEnum` for `Char` appears to just be `ord`
2022-02-06 13:43:08 +0100 <absentia> which I can't imagine being slow, but...
2022-02-06 13:43:38 +0100 <absentia> wish I could get deeper call trees in the profile
2022-02-06 13:44:21 +0100 <Rembane> absentia: It could be slow if laziness bites you. Laziness is hard to reason about though so I usually fail at that reasoning. What happens if you replace the tuple with a custom data type using bang patterns? Do things go faster?
2022-02-06 13:44:53 +0100absentiagoogles for a bang patterns refresher
2022-02-06 13:45:04 +0100 <absentia> never had to actually optimize haskell or care about laziness before so here goes
2022-02-06 13:45:24 +0100 <absentia> oh god, the lack of night mode
2022-02-06 13:45:26 +0100 <absentia> it burns!
2022-02-06 13:46:34 +0100Rembanehands absentia sun glasses
2022-02-06 13:47:56 +0100 <absentia> > eliminating thunks from an inner loop
2022-02-06 13:47:58 +0100 <lambdabot> error:
2022-02-06 13:47:58 +0100 <lambdabot> Variable not in scope:
2022-02-06 13:47:58 +0100 <lambdabot> eliminating
2022-02-06 13:47:58 +0100 <absentia> sounds right
2022-02-06 13:48:05 +0100 <absentia> bad lambdabot :|
2022-02-06 13:50:26 +0100 <Andrew> > (\x -> x x)(\x -> x x)
2022-02-06 13:50:28 +0100 <lambdabot> error:
2022-02-06 13:50:28 +0100 <lambdabot> • Occurs check: cannot construct the infinite type: t0 ~ t0 -> t
2022-02-06 13:50:28 +0100 <lambdabot> • In the first argument of ‘x’, namely ‘x’
2022-02-06 13:54:24 +0100 <maerwald> ephemient: I just checked the link... there are instructions for v2-install already
2022-02-06 13:54:43 +0100deadmarshal(~deadmarsh@95.38.114.160) (Ping timeout: 256 seconds)
2022-02-06 13:56:38 +0100 <absentia> Rembane: wew, even without a custom data type and just using BangPatterns (as in `f (Foobar !f !b)`) resulted in over 50% speedup
2022-02-06 13:56:57 +0100deadmarshal(~deadmarsh@95.38.112.249)
2022-02-06 13:57:00 +0100 <absentia> less alloc too, which I guess is because of the smaller number of thunks in memory?
2022-02-06 13:57:24 +0100 <absentia> 1s wall clock speedup
2022-02-06 13:57:29 +0100 <Rembane> absentia: Sweet! Yes, not as much bookkeeping is needed. Thunks are lightweight, but there is some process around them.
2022-02-06 13:58:01 +0100 <Rembane> absentia: Also, tuples are lazy, which I forgot to mention.
2022-02-06 13:58:17 +0100 <absentia> I was just googling for strict tuples
2022-02-06 13:58:24 +0100 <absentia> because I'm still noticing 20% of alloc coming from that fn
2022-02-06 14:06:31 +0100 <maerwald> that looks like StrictData may help already
2022-02-06 14:06:58 +0100 <maerwald> as in `Foobar !f !b` indicates that
2022-02-06 14:07:34 +0100 <maerwald> despite people here rambling about that extension
2022-02-06 14:09:09 +0100CHUD(~CHUD@dhcp636F.kent.ac.uk)
2022-02-06 14:09:22 +0100fr33domlover(~fr33@31.210.181.138)
2022-02-06 14:13:38 +0100yauhsie__(~yauhsien@61-231-25-133.dynamic-ip.hinet.net)
2022-02-06 14:15:47 +0100 <absentia> Rembane: daaaaaaaaamn, that function has now fallen off the top cost centre summary
2022-02-06 14:15:53 +0100 <absentia> by converting everything to Data.Strict.Tuple
2022-02-06 14:15:57 +0100 <absentia> thanks very much for the help
2022-02-06 14:16:17 +0100 <absentia> that's another 1s of wall time shaved off this suite
2022-02-06 14:16:58 +0100machinedgod(~machinedg@24.105.81.50)
2022-02-06 14:17:37 +0100fr33domlover(~fr33@31.210.181.138) (Ping timeout: 256 seconds)
2022-02-06 14:19:13 +0100 <Rembane> absentia: Awesome! :D No worries.
2022-02-06 14:23:21 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2022-02-06 14:25:32 +0100x_kuru(~xkuru@user/xkuru)
2022-02-06 14:26:57 +0100xkuru(~xkuru@user/xkuru) (Ping timeout: 240 seconds)
2022-02-06 14:28:28 +0100burnside_(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2022-02-06 14:28:57 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
2022-02-06 14:30:07 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-02-06 14:30:25 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-02-06 14:30:45 +0100fr33domlover(~fr33@31.210.181.138)
2022-02-06 14:38:41 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972)
2022-02-06 14:41:02 +0100RFV(~Thunderbi@187.red-88-13-186.dynamicip.rima-tde.net)
2022-02-06 14:43:58 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972) (Ping timeout: 260 seconds)
2022-02-06 14:45:51 +0100CHUD(~CHUD@dhcp636F.kent.ac.uk) (Quit: Client closed)
2022-02-06 14:58:37 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-02-06 14:59:01 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-02-06 14:59:14 +0100ardell(~ardell@user/ardell) (Quit: Konversation terminated!)
2022-02-06 14:59:57 +0100dibblego(~dibblego@haskell/developer/dibblego) (Ping timeout: 240 seconds)
2022-02-06 15:03:37 +0100shailangsa(~shailangs@host86-185-98-37.range86-185.btcentralplus.com) (Remote host closed the connection)
2022-02-06 15:13:02 +0100RFV1(~Thunderbi@187.red-88-13-186.dynamicip.rima-tde.net)
2022-02-06 15:13:57 +0100mstksg(~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 256 seconds)
2022-02-06 15:14:30 +0100Hildegunst(~luc@80.248.12.109.rev.sfr.net) (Quit: leaving)
2022-02-06 15:14:31 +0100MajorBiscuit(~MajorBisc@86-88-79-148.fixed.kpn.net) (Ping timeout: 256 seconds)
2022-02-06 15:15:39 +0100mstksg(~jle`@cpe-23-240-75-236.socal.res.rr.com)
2022-02-06 15:15:42 +0100RFV(~Thunderbi@187.red-88-13-186.dynamicip.rima-tde.net) (Ping timeout: 260 seconds)
2022-02-06 15:15:42 +0100RFV1RFV
2022-02-06 15:16:31 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:1dc4:f5c4:a458:81)
2022-02-06 15:16:40 +0100fr33domlover(~fr33@31.210.181.138) (Quit: fr33domlover)
2022-02-06 15:17:54 +0100yauhsie__(~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-02-06 15:19:35 +0100ec(~ec@gateway/tor-sasl/ec)
2022-02-06 15:20:50 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:1dc4:f5c4:a458:81) (Ping timeout: 250 seconds)
2022-02-06 15:24:18 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net)
2022-02-06 15:26:35 +0100tatarqa(~kli@ip-89-177-122-45.net.upcbroadband.cz)
2022-02-06 15:27:27 +0100 <absentia> now if only i could optimize docker container size
2022-02-06 15:27:34 +0100 <absentia> my god stack builder images are enormous
2022-02-06 15:27:36 +0100 <absentia> almost 5 gb!
2022-02-06 15:27:46 +0100 <Hecate> yes
2022-02-06 15:27:47 +0100 <absentia> s/container/image
2022-02-06 15:28:09 +0100 <absentia> they won't even build on my container provider
2022-02-06 15:28:13 +0100 <absentia> runs out of memory
2022-02-06 15:28:26 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com)
2022-02-06 15:29:14 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
2022-02-06 15:31:26 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2022-02-06 15:31:26 +0100allbery_b(~geekosaur@xmonad/geekosaur)
2022-02-06 15:31:27 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl)
2022-02-06 15:31:29 +0100allbery_bgeekosaur
2022-02-06 15:33:30 +0100RFV(~Thunderbi@187.red-88-13-186.dynamicip.rima-tde.net) (Quit: RFV)
2022-02-06 15:36:27 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-02-06 15:44:11 +0100n3rdy1(~n3rdy1@2600:1700:4570:3480::41)
2022-02-06 15:46:17 +0100mvk(~mvk@2607:fea8:5cdc:bf00::80f1) (Ping timeout: 240 seconds)
2022-02-06 15:52:00 +0100dajoer(~david@user/gvx) (Quit: leaving)
2022-02-06 16:00:54 +0100CHUD(~CHUD@dhcp636F.kent.ac.uk)
2022-02-06 16:05:27 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds)
2022-02-06 16:10:58 +0100dibblego(~dibblego@122-199-1-30.ip4.superloop.com)
2022-02-06 16:10:58 +0100dibblego(~dibblego@122-199-1-30.ip4.superloop.com) (Changing host)
2022-02-06 16:10:58 +0100dibblego(~dibblego@haskell/developer/dibblego)
2022-02-06 16:16:55 +0100EvanR(~EvanR@user/evanr) (Remote host closed the connection)
2022-02-06 16:17:14 +0100EvanR(~EvanR@user/evanr)
2022-02-06 16:20:57 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-02-06 16:23:11 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 16:24:08 +0100ardell(~ardell@user/ardell)
2022-02-06 16:25:04 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net)
2022-02-06 16:29:53 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2022-02-06 16:31:16 +0100shapr(~user@pool-173-73-44-186.washdc.fios.verizon.net)
2022-02-06 16:31:17 +0100n3rdy1(~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 240 seconds)
2022-02-06 16:33:29 +0100slit13(~slit13@2a02:2f0b:b50c:7e00:3ffb:8f5b:b927:cbd9)
2022-02-06 16:34:39 +0100slit13(~slit13@2a02:2f0b:b50c:7e00:3ffb:8f5b:b927:cbd9) (Client Quit)
2022-02-06 16:35:27 +0100wyrd_(~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds)
2022-02-06 16:40:08 +0100 <maerwald> absentia: unpacked
2022-02-06 16:40:53 +0100 <maerwald> ~2GB of those will be from GHC
2022-02-06 16:44:17 +0100n3rdy1(~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293)
2022-02-06 16:46:17 +0100xff0x(~xff0x@2001:1a81:52c7:8c00:1f7f:998e:5249:4548) (Ping timeout: 240 seconds)
2022-02-06 16:46:36 +0100mvk(~mvk@2607:fea8:5cdc:bf00::80f1)
2022-02-06 16:47:28 +0100xff0x(~xff0x@2001:1a81:52c7:8c00:f773:af87:1684:89e3)
2022-02-06 16:53:06 +0100jao(~jao@static-68-235-44-10.cust.tzulo.com)
2022-02-06 16:55:05 +0100CiaoSen(~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-02-06 16:56:07 +0100 <DigitalKiwi> https://grahamc.com/blog/nix-and-layered-docker-images
2022-02-06 16:57:34 +0100 <DigitalKiwi> Zhttps://christine.website/blog/i-was-wrong-about-nix-2020-02-10
2022-02-06 16:58:43 +0100 <albet70> what's the point to make a new type? like newtype StateRefT s m a = StateRefT (ReaderT (IORef s) m a), just use ReaderT (IORef s) m a isn't enough?
2022-02-06 16:58:56 +0100Andrew(~andrew@user/AndrewYu) (Quit: Leaving)
2022-02-06 16:59:14 +0100Andrew(~andrew@user/AndrewYu)
2022-02-06 16:59:56 +0100Andrew(~andrew@user/AndrewYu) (Client Quit)
2022-02-06 17:00:08 +0100Andrew(Andrew@user/AndrewYu)
2022-02-06 17:00:21 +0100 <sshine> albet70, 1) to make your abstraction opaque, 2) to avoid the type class instances of what it aliases to, and consequently, so you can give it new type class instances without having them propagate back to the type they alias.
2022-02-06 17:00:25 +0100Topik[m](~topikmatr@2001:470:69fc:105::a082) (Quit: You have been kicked for being idle)
2022-02-06 17:00:49 +0100ardell(~ardell@user/ardell) (Quit: Konversation terminated!)
2022-02-06 17:03:12 +0100 <sshine> albet70, for example: https://hackage.haskell.org/package/base-4.16.0.0/docs/Data-Monoid.html#t:Product
2022-02-06 17:04:13 +0100 <sshine> albet70, you could say 'instance Monoid Int where ...', but this isn't the only well-defined Monoid instance on Int. so you invent a wrapper for that particular instance.
2022-02-06 17:04:44 +0100 <sshine> albet70, I guess in your case, it is mostly to make the abstraction opaque.
2022-02-06 17:05:52 +0100 <albet70> "🟢 sshine :albet70, I guess in your case, it is mostly to make the abstraction opaque.", but abstraction opaque just make people not easy to read
2022-02-06 17:06:13 +0100 <sshine> i.e. hide the implementation. not sure it's always preferrable. some people have that in an .Internal module so that you can refer to the ReaderT without the wrapper, but not make a commitment to that implementation in front of all who rely on the package.
2022-02-06 17:06:43 +0100 <sshine> albet70, not just. also makes people not start to rely on the implementation in ways you don't want.
2022-02-06 17:11:14 +0100 <albet70> sshine, newtype CoroutineT r m a = CoroutineT {runCoroutineT' :: ContT r (StateT [CoroutineT r m ()] m) a} this type is too difficult to understand
2022-02-06 17:12:22 +0100 <albet70> just ContT r (StateT [ContT r m ()] m) a isn't enough?
2022-02-06 17:12:31 +0100 <geekosaur> that's not because it's a newtype, it's because Cont is your favorite nightmare come to life
2022-02-06 17:13:18 +0100 <albet70> I don't know how the people make this non-readable type
2022-02-06 17:14:18 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-02-06 17:14:40 +0100 <albet70> and it's a recursive type?
2022-02-06 17:15:03 +0100_xor(~xor@dsl-50-5-233-169.fuse.net) (Read error: Connection reset by peer)
2022-02-06 17:15:10 +0100 <albet70> haskell support recursive type?
2022-02-06 17:15:43 +0100 <geekosaur> sure. I mean, list is a recursive type
2022-02-06 17:15:56 +0100 <vaibhavsagar[m]> yes
2022-02-06 17:15:58 +0100 <geekosaur> Trees are recursive types
2022-02-06 17:16:17 +0100 <albet70> "geekosaur :sure. I mean, list is a recursive type", what's the function type when the function returns itself?
2022-02-06 17:16:56 +0100 <geekosaur> data List a = Nil | Cons a (List a) -- with base case, even
2022-02-06 17:17:09 +0100 <vaibhavsagar[m]> for lists, an example is `tail`, which has the type signature `[a] -> [a]`
2022-02-06 17:17:29 +0100_xor(~xor@dsl-50-5-233-169.fuse.net)
2022-02-06 17:17:35 +0100 <geekosaur> the base case for the `CoroutineT` type is an empty list of recursive `CoroutineT`s
2022-02-06 17:18:15 +0100 <absentia> a tree of coroutine transformers?
2022-02-06 17:18:17 +0100 <absentia> welcome to hell
2022-02-06 17:18:35 +0100 <geekosaur> hencemy initial comment about nightmares
2022-02-06 17:19:24 +0100 <albet70> "geekosaur :the base case for the `CoroutineT` type is an empty list of recursive `CoroutineT`s", it doesn't say the m is []
2022-02-06 17:19:48 +0100 <geekosaur> it doesn't have to, it says it's a list. lists can be empty
2022-02-06 17:19:48 +0100 <absentia> albet70: `m` is a type-level variable, `[]` is a term-level constructor
2022-02-06 17:19:50 +0100 <albet70> oh, the whole CoroutineT is []
2022-02-06 17:19:54 +0100 <geekosaur> it didn't say it's a NonEmpty
2022-02-06 17:21:14 +0100 <albet70> so recursive type with a base case can be expressed in haskell, right?
2022-02-06 17:21:21 +0100 <absentia> absolutely
2022-02-06 17:21:34 +0100 <geekosaur> yes. as can recursive types with no base case (this is often used for streams)
2022-02-06 17:21:40 +0100 <albet70> function return itself doesn't have a base case, can't it?
2022-02-06 17:24:20 +0100 <geekosaur> I don't understand the question, sorry
2022-02-06 17:25:20 +0100 <albet70> if a function return itself, could it be expressed?
2022-02-06 17:25:37 +0100 <ski> "the base case for the `CoroutineT` type is an empty list of recursive `CoroutineT`s" -- no, the list doesn't occur covariantly/positively
2022-02-06 17:25:59 +0100 <ski> albet70 : with a recursive type, sure
2022-02-06 17:26:51 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-02-06 17:27:01 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972)
2022-02-06 17:27:34 +0100 <albet70> "🟢 ski :albet70 : with a recursive type, sure", in js, f = _ => f, what's its type?
2022-02-06 17:28:09 +0100 <ski> albet70 : `result where result = a -> result'
2022-02-06 17:28:29 +0100 <albet70> f _ = f
2022-02-06 17:28:38 +0100 <ski> you can try this, in `ocaml -rectypes', it allows cyclic types (equi-recursive types)
2022-02-06 17:28:47 +0100 <ski> newtype Munch a = MkMunch (a -> Munch a)
2022-02-06 17:28:53 +0100 <ski> munch :: a -> Munch a
2022-02-06 17:29:01 +0100 <ski> munch _ = MkMunch munch
2022-02-06 17:29:22 +0100 <albet70> fixed point...
2022-02-06 17:31:30 +0100 <ski> "a tree of coroutine transformers?" -- no. a coroutine action is a function that accepts a list of coroutine actions, and produces a new such list, together with a result value
2022-02-06 17:31:31 +0100 <albet70> then what value has this type?
2022-02-06 17:31:43 +0100 <ski> which type ?
2022-02-06 17:31:50 +0100 <albet70> "ski : newtype Munch a = MkMunch (a -> Munch a)", this
2022-02-06 17:32:02 +0100 <ski> e.g. `MkMunch munch' has type `Munch a'
2022-02-06 17:33:03 +0100 <ski> you could say `fix (MkMunch . const)', if you prefer
2022-02-06 17:33:39 +0100 <ski> of course, `Munch a' is a pretty useless type ..
2022-02-06 17:34:13 +0100 <ski> (i guess you could define `Munch a -> [a] -> b')
2022-02-06 17:34:26 +0100 <ski> (or s/[a]/Stream a/)
2022-02-06 17:35:23 +0100Null_A(~null_a@2601:645:8700:2290:dcf9:b60:3266:d217)
2022-02-06 17:36:30 +0100 <albet70> ski what do u think what's the benefit to make a new type to wrap? like newtype StateRefT s m a = StateRefT (ReaderT (IORef s) m a), just use ReaderT (IORef s) m a isn't enough?
2022-02-06 17:37:39 +0100 <ski> for base case for `CoroutineT r m a', you'll be provided already with a list of coroutines. so, you could simply return those, or ignore them (returning an empty list). but it's not just "empty list" is *the* base case, since you're always provided with such a list. you could reverse the list, e.g. ..
2022-02-06 17:38:21 +0100 <ski> albet70 : i think sshine already answered that
2022-02-06 17:39:00 +0100 <albet70> yes...
2022-02-06 17:39:01 +0100 <ski> (i was about to answer at the time, but sshine already covered it well)
2022-02-06 17:43:24 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 250 seconds)
2022-02-06 17:48:35 +0100zebrag(~chris@user/zebrag)
2022-02-06 17:50:17 +0100CiaoSen(~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2022-02-06 17:51:06 +0100romesrf(~romes@2001:8a0:dd9e:2c00:fd1b:fa:a17:a972) (Quit: WeeChat 3.4)
2022-02-06 17:51:49 +0100CHUD(~CHUD@dhcp636F.kent.ac.uk) (Remote host closed the connection)
2022-02-06 17:51:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-02-06 17:51:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-02-06 17:51:51 +0100wroathe(~wroathe@user/wroathe)
2022-02-06 17:54:37 +0100alfonsox(~quassel@103.87.57.95) (Remote host closed the connection)
2022-02-06 17:55:59 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-02-06 17:56:55 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-02-06 18:01:52 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl)
2022-02-06 18:02:16 +0100slowButPresent(~slowButPr@user/slowbutpresent)
2022-02-06 18:03:21 +0100 <sshine> > let f x = f in f 0
2022-02-06 18:03:22 +0100 <lambdabot> error:
2022-02-06 18:03:22 +0100 <lambdabot> • Occurs check: cannot construct the infinite type: t1 ~ p0 -> t1
2022-02-06 18:03:22 +0100 <lambdabot> • In the expression: let f x = f in f 0
2022-02-06 18:03:42 +0100 <sshine> albet70, so that's something you can't do.
2022-02-06 18:04:40 +0100 <sshine> albet70, this function would have the type 'a -> (a -> (a -> ...))'
2022-02-06 18:04:55 +0100 <sshine> albet70, but as long as it recurses on its values, that's fine :)
2022-02-06 18:04:55 +0100 <ski> <ski> albet70 : `result where result = a -> result'
2022-02-06 18:05:13 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-02-06 18:05:13 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-02-06 18:05:13 +0100wroathe(~wroathe@user/wroathe)
2022-02-06 18:08:19 +0100Alex_test(~al_test@94.233.241.94) (Quit: ;-)
2022-02-06 18:08:32 +0100AlexZenon(~alzenon@94.233.241.94) (Quit: ;-)
2022-02-06 18:08:41 +0100AlexNoo(~AlexNoo@94.233.241.94) (Quit: Leaving)
2022-02-06 18:09:03 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
2022-02-06 18:11:10 +0100derelict(derelict@user/derelict) (Quit: bye)
2022-02-06 18:11:44 +0100derelict(derelict@user/derelict)
2022-02-06 18:12:45 +0100econo(uid147250@user/econo)
2022-02-06 18:14:33 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net)
2022-02-06 18:19:02 +0100texasmynsted(~texasmyns@99.96.221.112)
2022-02-06 18:19:20 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:1dc4:f5c4:a458:81)
2022-02-06 18:19:35 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2022-02-06 18:20:00 +0100 <texasmynsted> I have been looking around hackage... I tried jacinda, which is fun, but I am still looking for awk alternatives for parsing whole files.
2022-02-06 18:20:23 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-02-06 18:21:06 +0100 <texasmynsted> I have files in various formats that I am looking for a handful of items. I think the next thing I will try is `replace-megaparsec`.
2022-02-06 18:21:21 +0100 <texasmynsted> What would you suggest I take a look at?
2022-02-06 18:21:44 +0100cosimone(~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
2022-02-06 18:21:45 +0100 <texasmynsted> Oh one of my key criteria is zero regular expresions.
2022-02-06 18:22:29 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 18:22:53 +0100 <texasmynsted> Jacinda is fun but does use regular expressions. I think there must be (many) raw Haskell solutions?
2022-02-06 18:23:51 +0100cuz`(~user@23-30-167-57-static.hfc.comcastbusiness.net)
2022-02-06 18:23:51 +0100MajorBiscuit(~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e)
2022-02-06 18:30:34 +0100 <hololeap> texasmynsted: what about just megaparsec?
2022-02-06 18:31:38 +0100little_mac(~little_ma@2601:410:4300:3ce0:8900:f68f:743:8461)
2022-02-06 18:32:19 +0100 <hololeap> the thing about parser combinators is that you can break the parsing down into small pieces and then recombine them. it's a really nice interface IMO.
2022-02-06 18:33:39 +0100 <hololeap> megaparsec is good for whole files, attoparsec is probably better for parsing streams
2022-02-06 18:34:55 +0100Null_A(~null_a@2601:645:8700:2290:dcf9:b60:3266:d217) (Remote host closed the connection)
2022-02-06 18:35:32 +0100fef(~thedawn@user/thedawn)
2022-02-06 18:35:41 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-02-06 18:37:59 +0100Null_A(~null_a@c-98-210-133-39.hsd1.ca.comcast.net)
2022-02-06 18:38:49 +0100 <absentia> why megaparsec over parsec?
2022-02-06 18:39:06 +0100 <absentia> is one not galaxy scale enough?
2022-02-06 18:40:02 +0100 <absentia> we only produce interstellar certified software
2022-02-06 18:41:25 +0100 <hololeap> from what I've read, megaparsec is faster. it is more flexible with what types it can handle. tbh, I haven't used parsec in a while, so I could be off-base here, but it seems to me megaparsec supercedes parsec
2022-02-06 18:41:47 +0100 <absentia> i see
2022-02-06 18:42:31 +0100 <hololeap> https://hackage.haskell.org/package/megaparsec#megaparsec-vs-parsec
2022-02-06 18:42:53 +0100 <absentia> > more powerful combinators
2022-02-06 18:42:54 +0100 <lambdabot> error:
2022-02-06 18:42:54 +0100 <lambdabot> • Variable not in scope: more :: t0 -> t1 -> t
2022-02-06 18:42:54 +0100 <lambdabot> • Perhaps you meant ‘mode’ (imported from Text.PrettyPrint.HughesPJ)erro...
2022-02-06 18:43:01 +0100 <absentia> that's saying quite a lot, parsec is already choc full of them
2022-02-06 18:43:14 +0100max22-(~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr)
2022-02-06 18:47:45 +0100Null_A(~null_a@c-98-210-133-39.hsd1.ca.comcast.net) (Remote host closed the connection)
2022-02-06 18:48:47 +0100maxime_(~maxime@2a01cb08833598006800cd803015c082.ipv6.abo.wanadoo.fr)
2022-02-06 18:50:34 +0100Null_A(~null_a@2601:645:8700:2290:dcf9:b60:3266:d217)
2022-02-06 18:51:19 +0100max22-(~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Ping timeout: 256 seconds)
2022-02-06 18:51:34 +0100k8yun(~k8yun@198-48-158-40.cpe.pppoe.ca)
2022-02-06 18:52:44 +0100tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2022-02-06 18:54:29 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-02-06 18:54:38 +0100CiaoSen(~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-02-06 18:54:57 +0100emf(~emf@163.114.132.4) (Ping timeout: 240 seconds)
2022-02-06 18:57:03 +0100k8yun_(~k8yun@198-48-158-40.cpe.pppoe.ca)
2022-02-06 18:57:15 +0100emf(~emf@2620:10d:c090:400::5:ab3f)
2022-02-06 18:57:42 +0100zincy(~zincy@host86-151-99-97.range86-151.btcentralplus.com)
2022-02-06 19:00:20 +0100Null_A(~null_a@2601:645:8700:2290:dcf9:b60:3266:d217) (Remote host closed the connection)
2022-02-06 19:00:37 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 240 seconds)
2022-02-06 19:00:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-02-06 19:00:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-02-06 19:00:51 +0100wroathe(~wroathe@user/wroathe)
2022-02-06 19:00:57 +0100k8yun(~k8yun@198-48-158-40.cpe.pppoe.ca) (Ping timeout: 256 seconds)
2022-02-06 19:05:29 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-02-06 19:06:06 +0100waleee(~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
2022-02-06 19:06:53 +0100cuz`(~user@23-30-167-57-static.hfc.comcastbusiness.net) (Read error: Connection reset by peer)
2022-02-06 19:06:54 +0100k8yun__(~k8yun@24.244.29.99)
2022-02-06 19:09:57 +0100MajorBiscuit(~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e) (Ping timeout: 240 seconds)
2022-02-06 19:10:29 +0100k8yun_(~k8yun@198-48-158-40.cpe.pppoe.ca) (Ping timeout: 250 seconds)
2022-02-06 19:12:03 +0100mc47(~mc47@xmonad/TheMC47)
2022-02-06 19:15:20 +0100flinner(~flinner__@2001:16a2:7826:a700:3836:77fb:c833:2a56)
2022-02-06 19:15:20 +0100flinner(~flinner__@2001:16a2:7826:a700:3836:77fb:c833:2a56) (Changing host)
2022-02-06 19:15:20 +0100flinner(~flinner__@user/flinner)
2022-02-06 19:15:37 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-02-06 19:17:51 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 19:17:52 +0100Jing(~hedgehog@240e:390:7c53:a7e1:d8d5:ad63:210:577a) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-02-06 19:18:11 +0100mikoto-chan(~mikoto-ch@213.177.151.239) (Ping timeout: 256 seconds)
2022-02-06 19:18:51 +0100`2jt(~jtomas@130.red-88-22-46.staticip.rima-tde.net) (Ping timeout: 256 seconds)
2022-02-06 19:19:39 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-02-06 19:20:37 +0100mikoto-chan(~mikoto-ch@213.177.151.239)
2022-02-06 19:21:29 +0100zmt00(~zmt00@user/zmt00) (Ping timeout: 252 seconds)
2022-02-06 19:22:04 +0100zincy(~zincy@host86-151-99-97.range86-151.btcentralplus.com) (Remote host closed the connection)
2022-02-06 19:22:25 +0100zmt00(~zmt00@user/zmt00)
2022-02-06 19:23:16 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 245 seconds)
2022-02-06 19:24:11 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 19:24:42 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-02-06 19:25:45 +0100fef(~thedawn@user/thedawn) (Ping timeout: 276 seconds)
2022-02-06 19:25:56 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-02-06 19:26:02 +0100dyeplexer(~dyeplexer@user/dyeplexer) (Remote host closed the connection)
2022-02-06 19:27:42 +0100alMalsamo(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 276 seconds)
2022-02-06 19:30:06 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Remote host closed the connection)
2022-02-06 19:30:41 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 19:31:26 +0100 <texasmynsted> okay, I will also try just Megaparsec for the whole file. The problem I see is that while they data I am looking for will always be in the file, it may not always be in the same place.
2022-02-06 19:32:07 +0100 <texasmynsted> Maybe that does not matter.
2022-02-06 19:33:24 +0100alMalsamo(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-02-06 19:36:00 +0100 <texasmynsted> as for the parsec flavours, I just picked megaparsec to eliminate one choice, heh.
2022-02-06 19:36:19 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-02-06 19:37:26 +0100 <sm> good choice
2022-02-06 19:37:35 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 19:37:58 +0100 <sm> don't neglect its excellent docs
2022-02-06 19:39:05 +0100 <texasmynsted> I just wish I could find a page somewhere with a kind of hello-world for parsing an entire "unstructured" file.
2022-02-06 19:39:06 +0100 <sm> and, be patient: parser combinators are easy to get started with but it takes a little while to learn how to use them effectively for larger parsers
2022-02-06 19:39:40 +0100 <texasmynsted> my use case is a replacement for awk
2022-02-06 19:40:03 +0100 <texasmynsted> Quickly search through a file looking for the 3-5 things I need.
2022-02-06 19:40:12 +0100 <sm> do you want to build one, or just use one ? does it have to be written in haskell ?
2022-02-06 19:41:38 +0100 <sm> did you see https://hackage.haskell.org/package/haskell-awk and https://hackage.haskell.org/package/hwk ?
2022-02-06 19:41:42 +0100 <texasmynsted> I would use one but _reason_ I am doing it is that I want to avoid regular expressions, and leverage/learn/keep-skills-sharp FP techniques
2022-02-06 19:42:13 +0100 <texasmynsted> oh yeah... Let me check that out.
2022-02-06 19:42:47 +0100zincy(~zincy@2a00:23c8:970c:4801:68f0:cbbd:5b77:19e4)
2022-02-06 19:43:33 +0100 <texasmynsted> :-)
2022-02-06 19:43:47 +0100 <texasmynsted> That might be just the thing for this use case.
2022-02-06 19:43:50 +0100 <texasmynsted> Thank you
2022-02-06 19:43:56 +0100 <sm> np
2022-02-06 19:44:05 +0100 <sshine> absentia, one thing I like about Megaparsec (there's more than one thing) is Mark's redesign of makeExprParser: https://hackage.haskell.org/package/parser-combinators-1.3.0/docs/Control-Monad-Combinators-Expr.h…
2022-02-06 19:44:48 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:1dc4:f5c4:a458:81) (Remote host closed the connection)
2022-02-06 19:46:25 +0100 <hololeap> texasmynsted: for parsing a file where the structure may be rearranged, the chioce function (aka asum) is what you want to use
2022-02-06 19:46:52 +0100 <hololeap> *choice
2022-02-06 19:47:02 +0100 <texasmynsted> asum? is that a megaparsec thing.
2022-02-06 19:47:15 +0100 <ski> @index asum
2022-02-06 19:47:15 +0100 <lambdabot> Data.Foldable
2022-02-06 19:47:39 +0100 <hololeap> no, it's an Alternative thing. choice is from parser-combinators
2022-02-06 19:47:41 +0100 <ski> @type asum
2022-02-06 19:47:42 +0100 <lambdabot> (Foldable t, Alternative f) => t (f a) -> f a
2022-02-06 19:48:10 +0100 <texasmynsted> oh :-)
2022-02-06 19:48:14 +0100 <hololeap> choice is just a different (better IMO) name for asum
2022-02-06 19:48:21 +0100 <texasmynsted> I see Mark mentions it here also -> https://markkarpov.com/tutorial/megaparsec.html
2022-02-06 19:48:53 +0100 <ski> @type foldr (<|>) empty
2022-02-06 19:48:54 +0100 <lambdabot> (Foldable t, Alternative f) => t (f a) -> f a
2022-02-06 19:49:33 +0100 <texasmynsted> ooh I see
2022-02-06 19:49:52 +0100 <hololeap> texasmynsted: if you give me an example of some input and what you want to extract, I can show you an example of how to parse it with megaparsec
2022-02-06 19:50:05 +0100 <texasmynsted> Okay, I suppose parsing an unstructured file should be no big deal then
2022-02-06 19:50:05 +0100 <ski> `choice' is more specific to a particular way of thinking about `Alternative'
2022-02-06 19:51:24 +0100 <texasmynsted> "BILLING PERIOD" and "Total:" and "Date:"
2022-02-06 19:52:34 +0100ski'sn't sure what "unstructured" would mean, in this context
2022-02-06 19:53:52 +0100 <texasmynsted> What I mean is that these are PDF files that I scrape the text out of. They are largely handwritten so while one person may use the same field names, they may not always be in the same place.
2022-02-06 19:54:03 +0100 <texasmynsted> There might be comments, descriptions, questions, etc.
2022-02-06 19:54:43 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-02-06 19:54:52 +0100 <hololeap> is there any structure to what the "BILLING PERIOD" format is, for example?
2022-02-06 19:54:59 +0100 <texasmynsted> There is no enforced semantics; these are not JSON, YAML, CSV, XML, etc.
2022-02-06 19:55:38 +0100 <texasmynsted> The billing period is plain text after the key "BILLING PERIOD" in all caps.
2022-02-06 19:55:55 +0100 <texasmynsted> It is the rest of the line
2022-02-06 19:55:57 +0100 <ski> mhm
2022-02-06 19:56:25 +0100 <texasmynsted> This flexibility makes this more . . . fun
2022-02-06 19:57:07 +0100 <hololeap> ok, but is the plain text billing period format consistent, or can it be anything?
2022-02-06 19:57:11 +0100 <texasmynsted> another piece of this is there are many sources of these documents. Each source has the same key fields but they are described differently.
2022-02-06 19:57:49 +0100 <texasmynsted> So once I build a parser for one source, I will need to build another one for the second source, and so on.
2022-02-06 19:58:33 +0100 <texasmynsted> I have another problem like this that I want to prime myself to solve. The other problem is like this but far more complicated.
2022-02-06 19:59:16 +0100 <texasmynsted> Using a parser combinator lib I should be able to re-use some of my work from prior parsers. (I would hope.)
2022-02-06 20:01:17 +0100 <texasmynsted> hololeap: it can be anything.
2022-02-06 20:01:40 +0100 <texasmynsted> Mostly it is like Jan 1 - Jan 15
2022-02-06 20:02:00 +0100 <texasmynsted> For my purposes, this is fine.
2022-02-06 20:02:15 +0100 <texasmynsted> So long as I capture it, I am good.
2022-02-06 20:03:05 +0100 <texasmynsted> I am going to populate a CSV with the data. It is fine for this if the fields are not machine readable.
2022-02-06 20:03:26 +0100 <texasmynsted> Just the right data in the right place, most of the time.
2022-02-06 20:05:24 +0100gehmehgeh(~user@user/gehmehgeh) (Ping timeout: 276 seconds)
2022-02-06 20:06:07 +0100gehmehgeh(~user@user/gehmehgeh)
2022-02-06 20:08:57 +0100deadmarshal(~deadmarsh@95.38.112.249) (Ping timeout: 240 seconds)
2022-02-06 20:12:05 +0100Sgeo(~Sgeo@user/sgeo)
2022-02-06 20:12:41 +0100Null_A(~null_a@2601:645:8700:2290:dcf9:b60:3266:d217)
2022-02-06 20:14:52 +0100_xor(~xor@dsl-50-5-233-169.fuse.net) (Read error: Connection reset by peer)
2022-02-06 20:19:42 +0100_xor(~xor@dsl-50-5-233-169.fuse.net)
2022-02-06 20:21:59 +0100ProfSimm(~ProfSimm@87.227.196.109)
2022-02-06 20:26:45 +0100eugen[m](~eugenrahr@2001:470:69fc:105::1:a153) ()
2022-02-06 20:30:15 +0100AlexNoo(~AlexNoo@94.233.241.94)
2022-02-06 20:30:20 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:1dc4:f5c4:a458:81)
2022-02-06 20:31:17 +0100 <energizer> if i have a B of As and I want an A of Bs, like list of tuples -> tuple of lists, is there a name for that operation in general?
2022-02-06 20:32:03 +0100Topsi(~Tobias@dyndsl-095-033-093-001.ewe-ip-backbone.de)
2022-02-06 20:32:12 +0100`2jt(~jtomas@130.red-88-22-46.staticip.rima-tde.net)
2022-02-06 20:32:39 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl)
2022-02-06 20:33:45 +0100 <monochrom> traverse comes close but it comes with conditions.
2022-02-06 20:33:49 +0100 <monochrom> @type traverse
2022-02-06 20:33:50 +0100 <lambdabot> (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
2022-02-06 20:33:55 +0100 <monochrom> Err, sequence
2022-02-06 20:33:56 +0100 <awpr> traverse or distribute, depending on whether you want to stitch together many of the inner type or extract many "slices" from the outer type. caveat: "lists of tuple*s*" doesn't fit well into either of these
2022-02-06 20:34:00 +0100 <monochrom> @type sequence
2022-02-06 20:34:00 +0100 <lambdabot> (Traversable t, Monad m) => t (m a) -> m (t a)
2022-02-06 20:34:08 +0100 <awpr> err, sequence or distribute :D
2022-02-06 20:35:55 +0100 <hololeap> texasmynsted: this is what I came up with. I haven't tested it: https://dpaste.com/CQC3SHWGK
2022-02-06 20:35:55 +0100 <energizer> @type distribute
2022-02-06 20:35:56 +0100 <lambdabot> error:
2022-02-06 20:35:56 +0100 <lambdabot> • Variable not in scope: distribute
2022-02-06 20:35:57 +0100 <lambdabot> • Perhaps you meant ‘distrib’ (imported from Control.Lens)
2022-02-06 20:36:25 +0100 <energizer> @type distrib
2022-02-06 20:36:26 +0100 <lambdabot> (Conjoined p, Functor f) => p a b -> p (f a) (f b)
2022-02-06 20:36:48 +0100 <energizer> that doesnt look related
2022-02-06 20:36:51 +0100 <awpr> "lists of tuples" specifically in the form of `[(a, b)]` and `([a], [b])` is actually unzip, which doesn't map to either of them
2022-02-06 20:36:59 +0100k8yun__(~k8yun@24.244.29.99) (Quit: Leaving)
2022-02-06 20:37:11 +0100 <awpr> it's not; https://hackage.haskell.org/package/distributive-0.6.2.1/docs/Data-Distributive.html#t:Distributive
2022-02-06 20:39:30 +0100 <awpr> `sequence` is like: iterate through the outer structure according to `Traversable`, and glue together all the inner structures according to their `Applicative`
2022-02-06 20:39:30 +0100 <awpr> `distribute` is like: create a version of the inner structure from thin air by its `Distributive`, and populate it by extracting slices of the outer structure with its `Functor`
2022-02-06 20:40:38 +0100flinner(~flinner__@user/flinner) (Ping timeout: 250 seconds)
2022-02-06 20:41:05 +0100 <awpr> you can turn the list-of-tuples thing into something Distributive-shaped by using `data Pair a = Pair a a` instead, and then `distribute :: [Pair a] -> Pair [a]`
2022-02-06 20:43:19 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2022-02-06 20:44:11 +0100 <texasmynsted> hololeap: Thank you!
2022-02-06 20:45:10 +0100geekosaur(~geekosaur@xmonad/geekosaur)
2022-02-06 20:45:26 +0100 <texasmynsted> That really helps. I will try this out. One bit I found is that there is a large variation on the amount of whitespace between the key, like "Total:", and the value.
2022-02-06 20:46:17 +0100 <texasmynsted> I see you throw out a space with _ <- space.
2022-02-06 20:48:49 +0100 <texasmynsted> So I will simply need to find a way to ignore any number of spaces. This is fairly simple to describe with regexp. I will checkout skipManyTill and your `takeUntilEOL`.
2022-02-06 20:49:45 +0100 <sshine> texasmynsted, is this Parsec, Megaparsec, or something third?
2022-02-06 20:50:39 +0100 <monochrom> "many space" throws out a lot of spaces. "some space" too.
2022-02-06 20:51:34 +0100 <monochrom> But I thought you didn't want regexes.
2022-02-06 20:51:36 +0100 <texasmynsted> Megaparsec
2022-02-06 20:51:38 +0100Sqaure(~a@user/square) (Leaving)
2022-02-06 20:51:51 +0100 <texasmynsted> I do not want regexes
2022-02-06 20:53:33 +0100 <hololeap> texasmynsted: space from Text.Megaparsec.Char throws out any number of spaces
2022-02-06 20:53:44 +0100alp(~alp@user/alp)
2022-02-06 20:54:00 +0100 <texasmynsted> I see --> https://hackage.haskell.org/package/base-4.16.0.0/docs/Control-Applicative.html#v:some
2022-02-06 20:54:05 +0100 <hololeap> > Skip zero or more white space characters.
2022-02-06 20:54:20 +0100 <texasmynsted> hololeap: Oh okay.
2022-02-06 20:54:53 +0100 <texasmynsted> :-) This looks like it is going to a great learning experience! Thank you!
2022-02-06 20:55:30 +0100 <hololeap> well, it doesn't throw it out normally, but it does when you use `_ <- space`
2022-02-06 20:55:47 +0100 <texasmynsted> got it
2022-02-06 20:55:55 +0100AlexZenon(~alzenon@94.233.241.94)
2022-02-06 20:56:00 +0100 <texasmynsted> It is capturing it to the hole
2022-02-06 20:56:00 +0100Alex_test(~al_test@94.233.241.94)
2022-02-06 20:56:02 +0100 <texasmynsted> _
2022-02-06 20:56:10 +0100 <hololeap> oh wait... no it _does_ throw it out
2022-02-06 20:56:21 +0100 <hololeap> so `_ <- space` is unnecessary
2022-02-06 20:56:23 +0100 <hololeap> https://hackage.haskell.org/package/megaparsec-9.2.0/docs/Text-Megaparsec-Char.html#v:space
2022-02-06 20:56:39 +0100 <hololeap> it could just be `space`
2022-02-06 20:56:54 +0100 <hololeap> either way works
2022-02-06 20:56:55 +0100 <texasmynsted> :-) Cool!
2022-02-06 20:56:59 +0100 <absentia> @type (>>=)
2022-02-06 20:57:00 +0100 <lambdabot> Monad m => m a -> (a -> m b) -> m b
2022-02-06 20:57:03 +0100 <absentia> @type (>>)
2022-02-06 20:57:03 +0100 <lambdabot> Monad m => m a -> m b -> m b
2022-02-06 20:57:16 +0100 <monochrom> "_ <-" is probably written by people who turn on -Wall -Werror
2022-02-06 20:57:20 +0100 <absentia> notice in the continuation how the value of type `a` is not provided
2022-02-06 20:57:29 +0100 <absentia> you just throw away the result of the previous monadic action
2022-02-06 20:57:51 +0100 <hololeap> monochrom: -Wall is how I got into that habit :)
2022-02-06 20:57:59 +0100 <absentia> why is that -Wall
2022-02-06 20:58:26 +0100 <absentia> you're not binding the monadic value which might be a typo?
2022-02-06 20:58:35 +0100hyiltiz(~quassel@31.220.5.250) (Ping timeout: 256 seconds)
2022-02-06 20:59:57 +0100 <absentia> i clearly did not read the previous discussion
2022-02-06 21:01:29 +0100shailangsa(~shailangs@host86-185-98-37.range86-185.btcentralplus.com)
2022-02-06 21:03:03 +0100hyiltiz(~quassel@31.220.5.250)
2022-02-06 21:03:34 +0100 <hololeap> absentia: https://downloads.haskell.org/ghc/8.10.6/docs/html/users_guide/using-warnings.html#ghc-flag--Wunus…
2022-02-06 21:03:50 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 260 seconds)
2022-02-06 21:04:19 +0100 <absentia> hololeap: thanks, figured it would be something like that
2022-02-06 21:04:20 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net)
2022-02-06 21:04:36 +0100 <hololeap> but I guess it's not actually in -Wall, at least not in this version of GHC
2022-02-06 21:04:44 +0100absentiachecks his compiler flags
2022-02-06 21:05:05 +0100 <absentia> hmmmm
2022-02-06 21:05:23 +0100juhp(~juhp@128.106.188.82) (Ping timeout: 256 seconds)
2022-02-06 21:05:46 +0100alp(~alp@user/alp) (Ping timeout: 245 seconds)
2022-02-06 21:05:55 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 21:06:31 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-02-06 21:06:42 +0100juhp(~juhp@128.106.188.82)
2022-02-06 21:07:04 +0100zincy(~zincy@2a00:23c8:970c:4801:68f0:cbbd:5b77:19e4) (Remote host closed the connection)
2022-02-06 21:07:06 +0100 <hololeap> often times I'll use -Weverything and then disable warnings I don't want, ala https://medium.com/mercury-bank/enable-all-the-warnings-a0517bc081c3
2022-02-06 21:08:41 +0100yauhsien(~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2022-02-06 21:08:53 +0100 <absentia> I have negative ints out of unsigned range warnings
2022-02-06 21:08:58 +0100 <absentia> I can't remember if these are mistakes or evil bit sorcery
2022-02-06 21:15:48 +0100 <energizer> awpr: is it fair to say, in the language of "data-oriented design", distribute is like array of struct -> struct of array and sequence is like struct of array -> array of struct
2022-02-06 21:17:10 +0100 <absentia> @type sequence
2022-02-06 21:17:11 +0100 <lambdabot> (Traversable t, Monad m) => t (m a) -> m (t a)
2022-02-06 21:17:24 +0100 <absentia> energizer: in some sense yes you are inverting the structure
2022-02-06 21:17:34 +0100 <absentia> but you need not fix yourself to `struct` or `array`
2022-02-06 21:17:37 +0100 <hololeap> distribute needs the inner functor to be Distributive, which means it has to be isomorphic to (Reader r)
2022-02-06 21:17:49 +0100 <absentia> anything traversable and monadic
2022-02-06 21:18:26 +0100 <absentia> "i have a structure of monadic actions. traverse the entire structure, execute each action, and give me a monadic action that returns a structure of the results"
2022-02-06 21:18:39 +0100Akiva(~Akiva@user/Akiva)
2022-02-06 21:19:10 +0100 <monochrom> And Reader r is isomorphic to "arrays with index type r" :)
2022-02-06 21:19:12 +0100 <awpr> as other people have said, that drops all the generality of both functions and reduces them to one; but beyond that, that's only true if "array" and "struct" mean the same thing and "distribute" and "traverse" turn out to be the same function
2022-02-06 21:19:30 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
2022-02-06 21:19:43 +0100 <hololeap> in practice Distributive usually means something with a single constructor and a single type variable, like Identity, Sum, Product, etc
2022-02-06 21:19:44 +0100 <monochrom> https://link.springer.com/chapter/10.1007/978-3-662-54434-1_21
2022-02-06 21:20:15 +0100 <awpr> ("struct" -> would have to have all fields of the same type; and "array" would have to be fixed-length with the zip-style Applicative instance)
2022-02-06 21:21:06 +0100 <absentia> (if it helps think of "monadic action" as "computation")
2022-02-06 21:21:20 +0100 <absentia> a serial computation, a parallel computation, a non-determinstic computation...
2022-02-06 21:21:30 +0100 <awpr> more generally structs with diverse field types would not be applicable to either sequenceA or distribute, and sequenceA would take variable-length lists to their cartesian products
2022-02-06 21:21:36 +0100 <EvanR> does any of this have to do with representable functors... I should learn what representable functors are about
2022-02-06 21:21:41 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-02-06 21:22:04 +0100 <awpr> yes, Distributive and Representable are different expressions of the same concept
2022-02-06 21:22:10 +0100 <hololeap> yeah "isomorphic to (Reader r)" is the definition of a representable functor
2022-02-06 21:22:20 +0100 <energizer> "Categorically every Distributive functor is actually a right adjoint, and so it must be Representable endofunctor and preserve all limits. This is a fancy way of saying it is isomorphic to (->) x for some x."
2022-02-06 21:22:24 +0100zincy(~zincy@2a00:23c8:970c:4801:68f0:cbbd:5b77:19e4)
2022-02-06 21:22:36 +0100 <monochrom> Yes. F is representable iff there is an object r such that there is natural isomorphism between F and Reader r.
2022-02-06 21:23:44 +0100 <hololeap> ^ precise
2022-02-06 21:24:02 +0100 <EvanR> I see
2022-02-06 21:24:15 +0100 <monochrom> And the people who say "Naperian" instead will say that r is the logarithm of F because r->x is like x^r and you're looking at "F(x) = x^r, I want to find r".
2022-02-06 21:24:35 +0100 <EvanR> I see
2022-02-06 21:26:11 +0100 <EvanR> sum types, product types, exponential types, log types xD
2022-02-06 21:26:23 +0100 <monochrom> Now see my link to the nice Gibbons paper that uses this and Traversable to explain APL :)
2022-02-06 21:26:39 +0100 <EvanR> I saw the naperian functors papers a while back was cool
2022-02-06 21:26:48 +0100 <EvanR> didn't know how it linked into anything I already knew, until now
2022-02-06 21:26:56 +0100 <awpr> incidentally the "Naperian" presentation is the one that lets you use it as "struct-of-vectors" -> "vector-of-structs"
2022-02-06 21:27:40 +0100 <EvanR> *so basically it's just a container* hides
2022-02-06 21:28:18 +0100 <awpr> statically-shaped container (not necessarily finite) is actually a pretty good intuition for Representables IMO
2022-02-06 21:28:51 +0100 <EvanR> (also, r -> _ considered as a container, if it didn't already make sense, this is how it makes sense)
2022-02-06 21:29:10 +0100PokeyCat(~PokeyCat@cpe-24-55-0-112.austin.res.rr.com)
2022-02-06 21:29:31 +0100 <monochrom> I go the last step and say <monochrom> And Reader r is isomorphic to "arrays with index type r" :)
2022-02-06 21:29:47 +0100 <monochrom> array. Accept no substitute!
2022-02-06 21:30:18 +0100 <hololeap> well, arrays with a known size
2022-02-06 21:30:29 +0100 <EvanR> before it's an array, you must choose an embedding of r into the euclidean plane
2022-02-06 21:30:40 +0100 <EvanR> so we know how to arrange stuff in space
2022-02-06 21:31:00 +0100 <EvanR> make sure it's a horizontal arrangement
2022-02-06 21:32:01 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-02-06 21:32:01 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-02-06 21:32:01 +0100wroathe(~wroathe@user/wroathe)
2022-02-06 21:32:26 +0100 <hololeap> % :t tablulate -- this is the tricky one which requires the structure to be fixed
2022-02-06 21:32:26 +0100 <yahb> hololeap: ; <interactive>:1:1: error:; * Variable not in scope: tablulate; * Perhaps you meant one of these: `tabulate' (imported from Data.Functor.Rep), `Q.tabulate' (imported from Test.QuickCheck), `gtabulate' (imported from Data.Functor.Rep)
2022-02-06 21:32:34 +0100 <EvanR> (I mean, how else do you comprehend an array. O(1) performance? xD)
2022-02-06 21:32:42 +0100 <hololeap> % :m + Data.Functor.Rep
2022-02-06 21:32:42 +0100 <yahb> hololeap:
2022-02-06 21:32:48 +0100 <hololeap> % :t tablulate
2022-02-06 21:32:48 +0100 <yahb> hololeap: ; <interactive>:1:1: error:; * Variable not in scope: tablulate; * Perhaps you meant one of these: `tabulate' (imported from Data.Functor.Rep), `Q.tabulate' (imported from Test.QuickCheck), `gtabulate' (imported from Data.Functor.Rep)
2022-02-06 21:33:01 +0100 <awpr> https://en.wikipedia.org/wiki/Container_(type_theory) even goes as far as to say a container is a sum type of many Representables, if you reorganize the concepts slightly
2022-02-06 21:33:05 +0100 <hololeap> % :t tabulate -- derp
2022-02-06 21:33:05 +0100 <yahb> hololeap: Representable f => (Rep f -> a) -> f a
2022-02-06 21:34:08 +0100taylorswift2018(~taylorswi@115-188-158-33-fibre.sparkbb.co.nz)
2022-02-06 21:34:52 +0100Sqaure(~a@user/square)
2022-02-06 21:35:26 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:1dc4:f5c4:a458:81) (Remote host closed the connection)
2022-02-06 21:36:05 +0100Pirate18(~Pirate18@72-46-55-28.lnk.ne.static.allophone.net)
2022-02-06 21:36:47 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-02-06 21:37:47 +0100Topsi(~Tobias@dyndsl-095-033-093-001.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2022-02-06 21:39:15 +0100PokeyCat(~PokeyCat@cpe-24-55-0-112.austin.res.rr.com) (Remote host closed the connection)
2022-02-06 21:39:35 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:1dc4:f5c4:a458:81)
2022-02-06 21:39:35 +0100cynomys(~cynomys@user/cynomys)
2022-02-06 21:40:05 +0100whatsupdoc(uid509081@id-509081.hampstead.irccloud.com)
2022-02-06 21:40:56 +0100 <EvanR> a perfect binary tree is an array of size 2^n, programmers think the second one is more concrete, but the first one is how RAM is constructed xD
2022-02-06 21:42:00 +0100 <monochrom> If you relax from binary to a hardware-dependent base then yes.
2022-02-06 21:42:27 +0100 <EvanR> or maybe mixed base
2022-02-06 21:43:11 +0100 <monochrom> And yes they even have the term "linear address model". The irony that this is just a model and nowhere near the bare "metal" is totally lost.
2022-02-06 21:43:30 +0100 <[exa]> o blocks, o caches
2022-02-06 21:44:05 +0100 <monochrom> And the irony that semiconductors are nowhere near metal is also totally lost.
2022-02-06 21:44:14 +0100 <EvanR> lol
2022-02-06 21:44:15 +0100 <[exa]> o silicon
2022-02-06 21:44:22 +0100Erutuon(~Erutuon@user/erutuon)
2022-02-06 21:44:41 +0100 <monochrom> Shows you how much programmers are living in their own reality distortion fields.
2022-02-06 21:44:46 +0100 <Rembane> Are semiconductors more like porcelain?
2022-02-06 21:44:47 +0100 <EvanR> shiny https://en.wikipedia.org/wiki/Silicon#/media/File:SiliconCroda.jpg
2022-02-06 21:46:26 +0100 <EvanR> it's also literally "near metal" (aluminum) on the periodic table
2022-02-06 21:46:32 +0100 <monochrom> If you go back to the 1940s of using relays for logic gates, now that would be honest about "bare metal".
2022-02-06 21:47:25 +0100 <monochrom> Now see Shannon's nice Msc thesis on thinking in terms of logic gates in the first place! https://www.cs.virginia.edu/~evans/greatworks/shannon38.pdf
2022-02-06 21:50:15 +0100 <dolio> This is such a ridiculous complaint.
2022-02-06 21:50:17 +0100emf(~emf@2620:10d:c090:400::5:ab3f) (Ping timeout: 240 seconds)
2022-02-06 21:51:03 +0100_ht(~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
2022-02-06 21:51:42 +0100emf(~emf@2620:10d:c090:400::5:ab3f)
2022-02-06 21:56:10 +0100Hash(~Hash@hashsecurity.org)
2022-02-06 21:58:40 +0100deadmarshal(~deadmarsh@95.38.112.249)
2022-02-06 22:01:13 +0100pavonia(~user@user/siracusa)
2022-02-06 22:02:37 +0100xff0x(~xff0x@2001:1a81:52c7:8c00:f773:af87:1684:89e3) (Ping timeout: 240 seconds)
2022-02-06 22:03:05 +0100deadmarshal(~deadmarsh@95.38.112.249) (Ping timeout: 256 seconds)
2022-02-06 22:03:41 +0100xff0x(~xff0x@2001:1a81:52c7:8c00:38b7:f9c0:eacd:8def)
2022-02-06 22:05:22 +0100lavaman(~lavaman@98.38.249.169)
2022-02-06 22:09:29 +0100shreyasminocha(51fdc93eda@user/shreyasminocha)
2022-02-06 22:17:58 +0100cjb(~cjb@user/cjb)
2022-02-06 22:18:08 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 250 seconds)
2022-02-06 22:20:16 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 22:20:27 +0100lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2022-02-06 22:23:17 +0100mikoto-chan(~mikoto-ch@213.177.151.239) (Ping timeout: 240 seconds)
2022-02-06 22:28:26 +0100 <EvanR> This sentence is such a ridiculous complaint
2022-02-06 22:29:44 +0100Null_A(~null_a@2601:645:8700:2290:dcf9:b60:3266:d217) (Remote host closed the connection)
2022-02-06 22:32:02 +0100wyrd(~wyrd@gateway/tor-sasl/wyrd)
2022-02-06 22:36:49 +0100sheb(~sheb@31.223.228.71)
2022-02-06 22:38:18 +0100 <d34df00d> This sentence is false.
2022-02-06 22:41:39 +0100Constraintegic(~thomasbul@2001:a61:1366:3201:de74:893f:6e5d:3ce1)
2022-02-06 22:42:35 +0100zer0bitz(~zer0bitz@2001:2003:f74d:b800:90d6:f3c8:741b:677a) (Ping timeout: 250 seconds)
2022-02-06 22:43:16 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 250 seconds)
2022-02-06 22:45:22 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 22:47:48 +0100cosimone(~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection)
2022-02-06 22:48:50 +0100cosimone(~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
2022-02-06 22:49:45 +0100lavaman(~lavaman@98.38.249.169)
2022-02-06 22:49:49 +0100lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2022-02-06 22:50:22 +0100lavaman(~lavaman@98.38.249.169)
2022-02-06 22:51:01 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-02-06 22:51:41 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 22:53:37 +0100Constraintegic(~thomasbul@2001:a61:1366:3201:de74:893f:6e5d:3ce1) (Quit: Leaving)
2022-02-06 22:54:31 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds)
2022-02-06 22:54:37 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-02-06 22:54:55 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-02-06 22:54:58 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 250 seconds)
2022-02-06 22:55:41 +0100 <Pirate18> I've got an expensive Rand StdGen A and want to generate a large # of As from it, preferably concurrently. What would be the best way to do that? Right now I spawn numCapabilities threads that repeatedly generate one (using runRand) and pass it to a single consumer thread with an MVar.
2022-02-06 22:56:19 +0100 <wavemode> why's it so expensive
2022-02-06 22:56:50 +0100 <Pirate18> It's a monte-carlo simulation that runs several thousand steps to produce a result
2022-02-06 22:59:48 +0100 <hololeap> so is each step of the StdGen getting salted with this expensive computation, or the computation just used to initialize it?
2022-02-06 23:01:54 +0100CiaoSen(~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2022-02-06 23:02:09 +0100 <Pirate18> Right now I call newStdGen once per thread, and thread that StdGen through each iteration. Getting a new StdGen each time (with evalRandIO instead of runRand) ended up being slower.
2022-02-06 23:02:14 +0100 <ski> Pirate18 : you're `split'ting at time of spawn ?
2022-02-06 23:02:20 +0100 <ski> oh, `newStdGen'
2022-02-06 23:02:38 +0100 <Pirate18> effectively the same I think
2022-02-06 23:02:54 +0100 <ski> well, `newStdGen' mutates the global `StdGen'
2022-02-06 23:03:07 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl)
2022-02-06 23:03:08 +0100 <ski> so, perhaps if you only did `newStdGen' once ?
2022-02-06 23:03:40 +0100 <hololeap> mutating the global StdGen probably isn't a bad thing
2022-02-06 23:03:45 +0100 <Pirate18> I could but I'm only calling newStdGen once per thread so that's not going to be the bottleneck
2022-02-06 23:04:14 +0100 <ski> oh right, only `numCapabilities' threads
2022-02-06 23:04:52 +0100 <hololeap> I don't know if there is a better approach than what you're doing, Pirate18
2022-02-06 23:05:41 +0100 <EvanR> calling newStdGen once per number doesn't sound right
2022-02-06 23:05:57 +0100fendor(~fendor@178.115.78.100.wireless.dyn.drei.com) (Remote host closed the connection)
2022-02-06 23:06:22 +0100 <EvanR> nvm, once per capability
2022-02-06 23:07:05 +0100`2jt(~jtomas@130.red-88-22-46.staticip.rima-tde.net) (Ping timeout: 250 seconds)
2022-02-06 23:07:07 +0100 <Pirate18> OK. I've made/fixed a few dumb mistakes so far (like not cleaning up the worker threads) so wanted to double-check I wasn't missing a library that made it simple, in addition to anything that would speed it up of course.
2022-02-06 23:07:25 +0100 <Pirate18> Thanks for the help
2022-02-06 23:07:31 +0100jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-02-06 23:07:34 +0100jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-02-06 23:07:37 +0100 <hololeap> you could use the stuff in the parallel package
2022-02-06 23:07:42 +0100 <EvanR> I hear the stdgen rng from base isn't the highest performance RNG in the world
2022-02-06 23:07:53 +0100 <EvanR> there are many to choose from on hackage
2022-02-06 23:08:10 +0100 <monochrom> base doesn't have it (or any random story) any more.
2022-02-06 23:08:19 +0100 <EvanR> orly
2022-02-06 23:08:29 +0100 <monochrom> The random package uses the splixmix package, which is pretty fast.
2022-02-06 23:08:43 +0100 <monochrom> err splitmix
2022-02-06 23:08:51 +0100 <wavemode> how are the worker threads passing the numbers to the consumer thread? a concurrent queue might be the best way
2022-02-06 23:09:27 +0100 <hololeap> they probably each just generate N numbers as a batch job
2022-02-06 23:09:32 +0100 <Pirate18> Just an MVar right now because the consumer is much faster than all the producers, I haven't benchmarked a queue against it yet though.
2022-02-06 23:11:05 +0100 <Pirate18> Alright I've got a few things to benchmark now, thanks!
2022-02-06 23:11:58 +0100wyrd(~wyrd@gateway/tor-sasl/wyrd) (Remote host closed the connection)
2022-02-06 23:12:06 +0100wyrd(~wyrd@gateway/tor-sasl/wyrd)
2022-02-06 23:13:52 +0100 <EvanR> N threads are producing random numbers in parallel and pushing to the same MVar, where 1 thread is taking and using them? Interesting, I guess if they are properly random the result is also random
2022-02-06 23:14:15 +0100zincy(~zincy@2a00:23c8:970c:4801:68f0:cbbd:5b77:19e4) (Remote host closed the connection)
2022-02-06 23:14:44 +0100 <EvanR> it's not obvious how to show that doing that is still random, to me
2022-02-06 23:15:54 +0100 <EvanR> N rngs + the "randomness" of the scheduler...
2022-02-06 23:15:57 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 250 seconds)
2022-02-06 23:17:09 +0100 <hololeap> if you start with a random value and iterate it through a PRNG N times, does it lose its randomness at some point?
2022-02-06 23:17:52 +0100 <monochrom> No, but you hit periodicity at some point.
2022-02-06 23:18:04 +0100 <EvanR> meaning, a random seed
2022-02-06 23:18:18 +0100 <monochrom> Oh wait you mean something else.
2022-02-06 23:18:39 +0100 <EvanR> iterate *it* through an RNG = just run the RNG?
2022-02-06 23:19:34 +0100 <monochrom> This is why most PRNGs don't let you really do that. The seed type is usually much wider than the output type.
2022-02-06 23:19:47 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:1dc4:f5c4:a458:81) (Remote host closed the connection)
2022-02-06 23:20:04 +0100 <EvanR> the state type
2022-02-06 23:20:12 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-02-06 23:20:12 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-02-06 23:20:12 +0100wroathe(~wroathe@user/wroathe)
2022-02-06 23:21:06 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection)
2022-02-06 23:24:57 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 240 seconds)
2022-02-06 23:25:27 +0100 <EvanR> all numbers are equally random, but something about macrovariable values correspond to different number of microstates
2022-02-06 23:25:28 +0100cosimone(~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection)
2022-02-06 23:26:06 +0100cosimone(~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
2022-02-06 23:26:10 +0100xff0x(~xff0x@2001:1a81:52c7:8c00:38b7:f9c0:eacd:8def) (Ping timeout: 260 seconds)
2022-02-06 23:26:53 +0100xff0x(~xff0x@2001:1a81:52c7:8c00:e8ce:cafa:8529:c63a)
2022-02-06 23:28:45 +0100gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2022-02-06 23:35:03 +0100monaaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-02-06 23:35:13 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-02-06 23:37:09 +0100merijn(~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-02-06 23:37:15 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2022-02-06 23:37:44 +0100RFV(~Thunderbi@187.red-88-13-186.dynamicip.rima-tde.net)
2022-02-06 23:37:48 +0100burnside_(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Remote host closed the connection)
2022-02-06 23:38:21 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2022-02-06 23:40:21 +0100RFV(~Thunderbi@187.red-88-13-186.dynamicip.rima-tde.net) (Client Quit)
2022-02-06 23:41:19 +0100cosimone(~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection)
2022-02-06 23:42:17 +0100burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Ping timeout: 240 seconds)
2022-02-06 23:47:10 +0100oscurochu(~oscurochu@097-096-050-227.res.spectrum.com)
2022-02-06 23:50:00 +0100xcmw(~textual@071-087-004-073.biz.spectrum.com)
2022-02-06 23:50:16 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2022-02-06 23:57:33 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
2022-02-06 23:59:25 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)