2022/10/12

2022-10-12 00:02:04 +0200yvan-sraka(~yvan-srak@2a01:c22:ac1f:9c00:1306:3abb:2386:5c1b)
2022-10-12 00:05:09 +0200 <Axman6> EvanR: fast FFT using lists: https://hackage.haskell.org/package/pure-fft-0.2.0/docs/Numeric-FFT.html
2022-10-12 00:05:33 +0200 <Axman6> well, FFT using lists anyway, no idea if it's fast
2022-10-12 00:07:02 +0200 <hpc> fast just means what algorithm it is
2022-10-12 00:07:13 +0200 <hpc> like quicksort
2022-10-12 00:07:35 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 244 seconds)
2022-10-12 00:08:41 +0200leungbk(~user@cpe-142-129-149-172.socal.res.rr.com)
2022-10-12 00:11:31 +0200ph88(~ph88@2a02:8109:9e00:71d0:5ba:5f3b:8b59:3371) (Ping timeout: 260 seconds)
2022-10-12 00:12:16 +0200infinity0(~infinity0@185.112.146.113) (Remote host closed the connection)
2022-10-12 00:15:29 +0200infinity0(~infinity0@185.112.146.113)
2022-10-12 00:16:05 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 00:16:37 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de) (Remote host closed the connection)
2022-10-12 00:17:09 +0200infinity0(~infinity0@185.112.146.113) (Remote host closed the connection)
2022-10-12 00:18:18 +0200yvan-sraka(~yvan-srak@2a01:c22:ac1f:9c00:1306:3abb:2386:5c1b) (Remote host closed the connection)
2022-10-12 00:18:32 +0200vorpuni(~pvorp@2001:861:3881:c690:6a24:2212:7415:f659) (Remote host closed the connection)
2022-10-12 00:19:03 +0200infinity0(~infinity0@185.112.146.113)
2022-10-12 00:19:52 +0200chele(~chele@user/chele) (Remote host closed the connection)
2022-10-12 00:22:30 +0200yvan-sraka(~yvan-srak@2a01:c22:ac1f:9c00:1306:3abb:2386:5c1b)
2022-10-12 00:23:34 +0200 <janus> drlkf: could you post an example of the output with a sample of expected input, and their types
2022-10-12 00:24:38 +0200 <janus> drlkf: you can make a function that takes an aeson Parser of a list and extracts the n'th value, i think
2022-10-12 00:24:55 +0200 <janus> drlkf: should be a one-liner
2022-10-12 00:26:06 +0200alecs(~alecs@151.34.71.118) (Ping timeout: 260 seconds)
2022-10-12 00:27:46 +0200Feuermagier(~Feuermagi@user/feuermagier) (Remote host closed the connection)
2022-10-12 00:36:26 +0200yvan-sraka(~yvan-srak@2a01:c22:ac1f:9c00:1306:3abb:2386:5c1b) (Remote host closed the connection)
2022-10-12 00:37:25 +0200chomwitt(~chomwitt@2a02:587:dc0c:c200:9e04:2be9:6643:df78) (Ping timeout: 268 seconds)
2022-10-12 00:37:56 +0200thyriaen(~thyriaen@2a01:aea0:dd4:463c:6245:cbff:fe9f:48b1) (Remote host closed the connection)
2022-10-12 00:38:33 +0200 <monochrom> immutable list quicksort : "is that really quicksort?" :: list fft : "is that really fft?" >:)
2022-10-12 00:40:23 +0200 <FlaminWalrus> hpc: apparently, List and Array have vastly different algorithmics for ordered container operations, so it's not unreasonable to expect it to affect things
2022-10-12 00:43:21 +0200 <hpc> speaking of, i was looking at the lagrange transform over the weekend and that's some crazy stuff
2022-10-12 00:43:23 +0200ec(~ec@gateway/tor-sasl/ec)
2022-10-12 00:43:55 +0200 <FlaminWalrus> Laplace? Legendre?
2022-10-12 00:44:03 +0200 <hpc> er, laplace
2022-10-12 00:45:05 +0200 <FlaminWalrus> Gotcha, yeah it's easy to think of it as substituting an imaginary variable $s$ for $i\omega$ in the FT, where $\omega$ is usually real
2022-10-12 00:45:05 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-10-12 00:45:17 +0200 <FlaminWalrus> Has similar mathematical advantages, transforming calculus to algebra and all that
2022-10-12 00:45:59 +0200 <FlaminWalrus> At the same time, not as nice for high-level functional analysis as the FT
2022-10-12 00:46:06 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-10-12 00:46:23 +0200 <hpc> the part that sold me on it was how it helps with differential equations
2022-10-12 00:46:40 +0200 <FlaminWalrus> Used a lot in circuit analysis where you have a very large problem of a very specific type; it can be faster numerically
2022-10-12 00:47:02 +0200 <hpc> since exponentials and sines both have themselves in their derivatives, and those are the real/imaginary axes of the laplace transform
2022-10-12 00:47:36 +0200Franciman(~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
2022-10-12 00:48:45 +0200 <FlaminWalrus> This could be cool or mean absolutely nothing to you, but an old professor told me about a construction of _field_ isomorphisms between integer-indexed sequences, meromorphic functions, and a direct limit of Banach spaces of real-valued functions
2022-10-12 00:48:49 +0200 <hpc> so you can use it to characterize something governed by differential equations the same way you would use fourier transform to analyze a sound wave
2022-10-12 00:48:50 +0200 <EvanR> Axman6, we already had "fft using list", FlaminWalrus posted one which started the whole discussion xD
2022-10-12 00:49:04 +0200 <EvanR> a discussion on how to make it fast
2022-10-12 00:49:31 +0200 <FlaminWalrus> The last isomorphism is an asymptotic version of the Laplace transform, that allows you to use it when the integrals don't converge
2022-10-12 00:49:38 +0200 <EvanR> ok the issue was memory
2022-10-12 00:49:48 +0200 <FlaminWalrus> (it also wasn't fast lol)
2022-10-12 00:49:56 +0200 <hpc> heh
2022-10-12 00:50:23 +0200 <FlaminWalrus> Took about 30sec to compute a PSD estimate on 400 numbers
2022-10-12 00:50:32 +0200 <FlaminWalrus> s/400/4000
2022-10-12 00:51:56 +0200 <FlaminWalrus> Another cool thing about transforms: the uncertainty principle in quantum mechanics is a _special case_ of the uncertainty principle for (discrete) Fourier transforms, where there's a tradeoff between resolution in frequency and amplitude
2022-10-12 00:52:09 +0200 <FlaminWalrus> Position and momentum are Fourier-conjugate quantities
2022-10-12 00:52:34 +0200 <monochrom> Tip for Laplace transforms: Do not find the Laplace transforms of sin and cos separately, do a BOGO deal: find the Laplace transform of exp(i*t) then the real part is for cos and the imag part is for sin.
2022-10-12 00:54:00 +0200 <FlaminWalrus> Is there some sort of functor instance to lift List functions through Array?
2022-10-12 00:55:14 +0200 <monochrom> No. But if you use the vector library package, it has a lot of list-inspired functions.
2022-10-12 00:55:26 +0200 <dolio> The one Axman6 linked doesn't appear to fall into the same trap.
2022-10-12 00:56:18 +0200 <EvanR> Vector and Array i are Functors
2022-10-12 00:56:26 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds)
2022-10-12 00:56:43 +0200 <EvanR> though Vector seems to have more utility functions
2022-10-12 00:56:49 +0200 <EvanR> beyond mapping
2022-10-12 00:57:19 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-10-12 00:57:42 +0200 <Axman6> I remember being amazed by the pure-fft implementation years ago, then realising I could make it faster.. I forgot how, I may have submitted a PR, but the author has disappeared a long time ago :(
2022-10-12 00:57:48 +0200 <dolio> I.E. it is zipping lists, not doing nested loops that index into a large list.
2022-10-12 00:58:20 +0200 <EvanR> Vector and Array i are also Foldable, so mapping and folding are covered at least
2022-10-12 00:58:43 +0200 <FlaminWalrus> EvanR: *literally everything* is a functor apparently, if you think about it hard enough. Continuity is a functor from Top to Poset
2022-10-12 00:59:34 +0200 <FlaminWalrus> These guys are committed to that crusade: https://ncatlab.org/nlab/show/HomePage
2022-10-12 01:03:32 +0200 <monochrom> Wait is that just a forgetful functor that forgets the points and retains only how a lattice of open sets is a poset?
2022-10-12 01:04:01 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2022-10-12 01:06:22 +0200 <FlaminWalrus> Continuity means preimage of open sets is open; it's contravariant, and maps f: X → Y between topological spaces to the induced map of the lattice of the topologies of Y and X under open set inclusion f': Y → X that maps open sets of Y to their (open) preimages
2022-10-12 01:06:40 +0200mikoto-chan(~mikoto-ch@193.185.223.3)
2022-10-12 01:06:42 +0200 <FlaminWalrus> Friend told me that one as a joke once
2022-10-12 01:07:31 +0200libertyprime(~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) (Ping timeout: 260 seconds)
2022-10-12 01:07:40 +0200 <FlaminWalrus> (I think it does essentially forget the points, but the topological information about f is encoded in f')
2022-10-12 01:07:49 +0200Tuplanolla(~Tuplanoll@91-159-69-34.elisa-laajakaista.fi) (Ping timeout: 252 seconds)
2022-10-12 01:09:02 +0200sayola(~sayola@dslb-088-064-186-217.088.064.pools.vodafone-ip.de) (Read error: Connection reset by peer)
2022-10-12 01:09:38 +0200 <dolio> That one is particularly trivial in some settings. You define the algebras that are open sets, and what kind of maps between them are valid, and then the spaces are just the opposite category.
2022-10-12 01:09:39 +0200acidjnk(~acidjnk@p200300d6e7137a811112d37158fd9527.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2022-10-12 01:09:47 +0200jmorris(uid537181@id-537181.uxbridge.irccloud.com)
2022-10-12 01:11:34 +0200 <dolio> Axman6: Was your trick to not re-calculate the length over and over?
2022-10-12 01:13:26 +0200 <Axman6> possibly - and I think it was doing too much work to interleve/deinterleve the lists, but I haven;t looked at the code for avery long time...
2022-10-12 01:14:58 +0200 <FlaminWalrus> dolio: it's basically a circular definition—arrows in Top are continuous _a priori,_ so trying to define continuity using them is sure to end in disaster
2022-10-12 01:15:07 +0200 <FlaminWalrus> Hence the "joke"
2022-10-12 01:16:15 +0200inversed(~inversed@90.209.137.56) (Ping timeout: 252 seconds)
2022-10-12 01:17:50 +0200Franciman(~Franciman@mx1.fracta.dev)
2022-10-12 01:19:34 +0200libertyprime(~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz)
2022-10-12 01:19:48 +0200 <dolio> In locale theory, you start by defining "frames," which are complete, distributive lattices. Then you say what a frame homomorphism is, which I think is just the obvious homomorphism for such lattices. Then the category of locales is the opposite of the category of frames. So, every frame gives a locale, and a continuous map from local X to locale Y is a frame homomorphism from Y to X.
2022-10-12 01:20:58 +0200c209e6dc-4d76-47(~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
2022-10-12 01:21:46 +0200 <EvanR> continuity is really a placeholder for "what we care about here"
2022-10-12 01:23:00 +0200c209e6dc-4d76-47(~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Client Quit)
2022-10-12 01:23:12 +0200mvk(~mvk@2607:fea8:5ce3:8500::a80f) (Ping timeout: 264 seconds)
2022-10-12 01:23:13 +0200 <dolio> I think you are encouraged to think of the frame as the opens of the locale, though, rather than them being exactly the same thing.
2022-10-12 01:24:39 +0200 <dolio> Then points are a derived notion, and there are some non-trivial locales without any (global) points.
2022-10-12 01:26:25 +0200inversed(~inversed@90.209.137.56)
2022-10-12 01:27:31 +0200 <FlaminWalrus> Since we're talking categories, I thought I'd drop this: https://arxiv.org/abs/cs/0404056 is a really cool paper that showcases the utility of the point of view; researchers noticed an isomorphism between the categorical description of quantum information and the categorical description of linear logic, allowing them to translate almost directly the lambda calculi in use for studying the latter
2022-10-12 01:28:19 +0200 <FlaminWalrus> Thinking of quantum advantage in terms of O(1) linear term pruning is a really nice perspective
2022-10-12 01:29:11 +0200 <EvanR> so you want to write quantum hello world. Let me first introduce you to some category theory
2022-10-12 01:29:48 +0200 <Axman6> https://hackage.haskell.org/package/QIO relevant?
2022-10-12 01:30:06 +0200 <FlaminWalrus> Is this #haskell or not? I'd think that's what Jones and the gang tried to do with classical computation :)
2022-10-12 01:30:38 +0200 <EvanR> what is going on with that fonts capital Q
2022-10-12 01:31:06 +0200 <EvanR> that's hipster as hell
2022-10-12 01:31:16 +0200 <monochrom> Indeed sometimes I enjoy pointfree topology, yes. :)
2022-10-12 01:31:19 +0200 <Axman6> This is Haskell, we _are_ hipster as hell
2022-10-12 01:31:29 +0200 <EvanR> haskster
2022-10-12 01:34:07 +0200 <Axman6> > enumFrom ()
2022-10-12 01:34:09 +0200 <lambdabot> [()]
2022-10-12 01:34:23 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 244 seconds)
2022-10-12 01:36:30 +0200 <EvanR> does QIO require IO...
2022-10-12 01:36:39 +0200 <Axman6> maybe
2022-10-12 01:36:39 +0200gentauro(~gentauro@user/gentauro) (Read error: Connection reset by peer)
2022-10-12 01:37:34 +0200 <EvanR> ah no, you can run it in a probability monad
2022-10-12 01:37:46 +0200 <FlaminWalrus> newtype UniverseSplitter deriving Monad...
2022-10-12 01:37:48 +0200 <Axman6> perhaps
2022-10-12 01:37:54 +0200 <EvanR> oh I see what you did there
2022-10-12 01:39:09 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 01:42:44 +0200gentauro(~gentauro@user/gentauro)
2022-10-12 01:43:34 +0200allbery_b(~geekosaur@xmonad/geekosaur)
2022-10-12 01:43:34 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2022-10-12 01:43:37 +0200allbery_bgeekosaur
2022-10-12 01:44:07 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-12 01:54:05 +0200johnjaye(~pi@173.209.64.74)
2022-10-12 01:54:36 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 01:56:44 +0200 <hpc> FlaminWalrus: finally i can bake an apple pie
2022-10-12 02:00:44 +0200loras(~loras@c-73-139-125-125.hsd1.fl.comcast.net)
2022-10-12 02:01:57 +0200 <monochrom> You come across as starting from first principles and using Laplace analysis to reconstruct the wave function of the whole universe and finally you're done and it contains an apple pie. :)
2022-10-12 02:03:36 +0200 <hpc> just as carl sagan predicted
2022-10-12 02:03:44 +0200 <monochrom> APFFP >:)
2022-10-12 02:04:19 +0200 <monochrom> Chapter 1 teaches you Calculus. Literally. >:)
2022-10-12 02:05:02 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-10-12 02:05:04 +0200 <monochrom> #apple-pie-beginners
2022-10-12 02:05:16 +0200DDR(~DDR@2604:3d08:4c7f:8250:8f0b:51dd:a01f:4b3f)
2022-10-12 02:09:39 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Client Quit)
2022-10-12 02:14:06 +0200dsrt^(~dsrt@c-76-17-6-165.hsd1.ga.comcast.net)
2022-10-12 02:14:31 +0200mvk(~mvk@2607:fea8:5ce3:8500::a80f)
2022-10-12 02:16:01 +0200burnsidesLlama(~burnsides@192.76.8.86)
2022-10-12 02:20:17 +0200zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2022-10-12 02:21:16 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b)
2022-10-12 02:22:15 +0200thegeekinside(~thegeekin@189.180.7.159)
2022-10-12 02:24:30 +0200raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 244 seconds)
2022-10-12 02:25:32 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b) (Ping timeout: 244 seconds)
2022-10-12 02:30:27 +0200wroathe(~wroathe@206.55.188.8)
2022-10-12 02:30:27 +0200wroathe(~wroathe@206.55.188.8) (Changing host)
2022-10-12 02:30:27 +0200wroathe(~wroathe@user/wroathe)
2022-10-12 02:31:20 +0200zaquest(~notzaques@5.130.79.72)
2022-10-12 02:36:53 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 258 seconds)
2022-10-12 02:47:40 +0200nate1(~nate@98.45.169.16)
2022-10-12 02:48:40 +0200 <talismanick> /JOIN #apple-pie-beginners
2022-10-12 02:52:24 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer)
2022-10-12 02:52:28 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-10-12 02:52:31 +0200nate1(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-10-12 02:53:55 +0200jinsun(~jinsun@user/jinsun)
2022-10-12 02:57:22 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-10-12 02:58:30 +0200 <FlaminWalrus> Attempt 2 is better, but still terrible: I got partial results processing a million lines. https://paste.tomsmeding.com/j0jwBkg4
2022-10-12 02:59:07 +0200 <FlaminWalrus> I couldn't figure out the ByteString parsing; is the parsing monad not included?
2022-10-12 02:59:30 +0200 <Axman6> chunksOf looks very inefficient to me
2022-10-12 02:59:54 +0200 <Axman6> can't you just slice the input vector?
2022-10-12 03:00:12 +0200 <FlaminWalrus> Valid point
2022-10-12 03:00:18 +0200 <Axman6> like, I'm pretty sure that's O(n^20
2022-10-12 03:00:26 +0200 <Axman6> O(n^2)*
2022-10-12 03:00:47 +0200 <FlaminWalrus> Lmao I wouldn't put it past me to write something like the first
2022-10-12 03:01:20 +0200beteigeuze1(~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df)
2022-10-12 03:01:22 +0200 <FlaminWalrus> I had forgotten about list comps, which would have been the only advantage of doing this with List; this is despite knowing y'all invented them
2022-10-12 03:01:33 +0200 <Axman6> using generate and slice it should be significantly more efficient
2022-10-12 03:02:23 +0200beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 268 seconds)
2022-10-12 03:02:23 +0200beteigeuze1beteigeuze
2022-10-12 03:03:11 +0200jargon(~jargon@184.101.208.112)
2022-10-12 03:03:13 +0200 <Axman6> also, as a style thing, we generally wouldn't hide Prelude functions like map, but instead import Vector qualified as V and use V.map
2022-10-12 03:04:37 +0200 <geekosaur> this is also more extensible, because for example Map also reuses some names, so you would have problems if you later started to use them in your code. importing qualified works better
2022-10-12 03:05:31 +0200 <Axman6> also, map f (generate n id) is just generate n f
2022-10-12 03:05:54 +0200 <Axman6> and will make the code look a lot nicer: generate n $ \k -> ...
2022-10-12 03:06:01 +0200 <Axman6> no need to extra brackets
2022-10-12 03:08:02 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-10-12 03:11:21 +0200andreabedini(~andreabed@8s8kj681vht2qj3xkwc5.ip6.superloop.com)
2022-10-12 03:12:02 +0200 <FlaminWalrus> I can translate j so that the other list is generate n id...I don't suppose there's a corresponding form for foldl' though?
2022-10-12 03:12:28 +0200 <FlaminWalrus> Or is there a way to make sum + map strict?
2022-10-12 03:13:28 +0200 <Axman6> I don't understand the question
2022-10-12 03:15:41 +0200 <Axman6> FlaminWalrus: sublength = (floor (fromIntegral n / fromIntegral samples)) is just sublength = n `div` samples, no?
2022-10-12 03:15:43 +0200 <FlaminWalrus> Sorry. That was somewhere between thinking out loud and asking; in both functions I foldl' over what is, in essence, (generate n id), so I was wondering how one would apply the refactoring to that
2022-10-12 03:16:18 +0200jargon(~jargon@184.101.208.112) (*.net *.split)
2022-10-12 03:16:18 +0200wroathe(~wroathe@user/wroathe) (*.net *.split)
2022-10-12 03:16:18 +0200burnsidesLlama(~burnsides@192.76.8.86) (*.net *.split)
2022-10-12 03:16:18 +0200mvk(~mvk@2607:fea8:5ce3:8500::a80f) (*.net *.split)
2022-10-12 03:16:18 +0200DDR(~DDR@2604:3d08:4c7f:8250:8f0b:51dd:a01f:4b3f) (*.net *.split)
2022-10-12 03:16:18 +0200inversed(~inversed@90.209.137.56) (*.net *.split)
2022-10-12 03:16:18 +0200libertyprime(~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) (*.net *.split)
2022-10-12 03:16:18 +0200leungbk(~user@cpe-142-129-149-172.socal.res.rr.com) (*.net *.split)
2022-10-12 03:16:18 +0200ubert(~Thunderbi@77.119.214.60.wireless.dyn.drei.com) (*.net *.split)
2022-10-12 03:16:18 +0200zxrom(~zxrom@mm-232-14-212-37.vitebsk.dynamic.pppoe.byfly.by) (*.net *.split)
2022-10-12 03:16:18 +0200Natch(~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (*.net *.split)
2022-10-12 03:16:18 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (*.net *.split)
2022-10-12 03:16:18 +0200AlexZenon(~alzenon@178.34.161.92) (*.net *.split)
2022-10-12 03:16:18 +0200econo(uid147250@user/econo) (*.net *.split)
2022-10-12 03:16:18 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net) (*.net *.split)
2022-10-12 03:16:18 +0200dolio(~dolio@130.44.130.54) (*.net *.split)
2022-10-12 03:16:18 +0200Ristovski(~Ristovski@hellomouse/perf/ristovski) (*.net *.split)
2022-10-12 03:16:18 +0200tcard_(~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9) (*.net *.split)
2022-10-12 03:16:18 +0200yuzhao(~yuzhao@36.112.45.72) (*.net *.split)
2022-10-12 03:16:18 +0200cyphase(~cyphase@user/cyphase) (*.net *.split)
2022-10-12 03:16:18 +0200lottaquestions_(~nick@2607:fa49:503e:7100:a9a5:f580:1f2d:9d23) (*.net *.split)
2022-10-12 03:16:18 +0200dcoutts__(~duncan@host86-163-164-210.range86-163.btcentralplus.com) (*.net *.split)
2022-10-12 03:16:18 +0200finsternis(~X@23.226.237.192) (*.net *.split)
2022-10-12 03:16:18 +0200TonyStone(~TonyStone@cpe-74-76-51-197.nycap.res.rr.com) (*.net *.split)
2022-10-12 03:16:18 +0200L29Ah(~L29Ah@wikipedia/L29Ah) (*.net *.split)
2022-10-12 03:16:18 +0200kaskal(~kaskal@2001:4bb8:2dc:7b0e:55ee:692c:e44d:a4b0) (*.net *.split)
2022-10-12 03:16:18 +0200DigitalKiwi(~kiwi@137.184.156.191) (*.net *.split)
2022-10-12 03:16:18 +0200megaTherion(~therion@unix.io) (*.net *.split)
2022-10-12 03:16:18 +0200gff_(~gff@user/gff) (*.net *.split)
2022-10-12 03:16:18 +0200piele(~piele@tbonesteak.creativeserver.net) (*.net *.split)
2022-10-12 03:16:18 +0200ddb(~ddb@tilde.club) (*.net *.split)
2022-10-12 03:16:18 +0200Hafydd(jc@user/hafydd) (*.net *.split)
2022-10-12 03:16:18 +0200ajb(~ajb@mimas.whatbox.ca) (*.net *.split)
2022-10-12 03:16:18 +0200Ankhers(e99e97ef8e@2604:bf00:561:2000::2a2) (*.net *.split)
2022-10-12 03:16:18 +0200haasn(~nand@haasn.dev) (*.net *.split)
2022-10-12 03:16:18 +0200bjobjo(~bjobjo@user/bjobjo) (*.net *.split)
2022-10-12 03:16:18 +0200Vq(~vq@90-227-195-41-no77.tbcn.telia.com) (*.net *.split)
2022-10-12 03:16:18 +0200wrengr(~wrengr@201.59.83.34.bc.googleusercontent.com) (*.net *.split)
2022-10-12 03:16:18 +0200cpli(77fc530071@2604:bf00:561:2000::252) (*.net *.split)
2022-10-12 03:16:18 +0200fvr(ef3e56ca8b@2604:bf00:561:2000::3c4) (*.net *.split)
2022-10-12 03:16:18 +0200samhh(7569f027cf@2604:bf00:561:2000::e4) (*.net *.split)
2022-10-12 03:16:18 +0200natto(~natto@140.238.225.67) (*.net *.split)
2022-10-12 03:16:18 +0200ell(~ellie@user/ellie) (*.net *.split)
2022-10-12 03:16:18 +0200Inoperable(~PLAYER_1@fancydata.science) (*.net *.split)
2022-10-12 03:16:18 +0200tv(~tv@user/tv) (*.net *.split)
2022-10-12 03:16:18 +0200cross(~cross@spitfire.i.gajendra.net) (*.net *.split)
2022-10-12 03:16:18 +0200nurupo(~nurupo.ga@user/nurupo) (*.net *.split)
2022-10-12 03:16:18 +0200farn(~farn@2a03:4000:7:3cd:d4ab:85ff:feeb:f505) (*.net *.split)
2022-10-12 03:16:18 +0200kronicmage(user88019@neotame.csclub.uwaterloo.ca) (*.net *.split)
2022-10-12 03:16:18 +0200iphy(sid67735@id-67735.lymington.irccloud.com) (*.net *.split)
2022-10-12 03:16:18 +0200jimki(~jmaki@gazorpazorp.fixme.fi) (*.net *.split)
2022-10-12 03:16:18 +0200lyxia(~lyxia@poisson.chat) (*.net *.split)
2022-10-12 03:16:18 +0200Guest585(~mike@user/feetwind) (*.net *.split)
2022-10-12 03:16:18 +0200yahb2(~yahb2@2a01:4f8:c0c:5c7b::2) (*.net *.split)
2022-10-12 03:16:18 +0200lieven(~mal@ns2.wyrd.be) (*.net *.split)
2022-10-12 03:16:24 +0200comerijn(~dr_merijn@86-86-29-250.fixed.kpn.net)
2022-10-12 03:16:26 +0200ajb(~ajb@mimas.whatbox.ca)
2022-10-12 03:16:28 +0200megaTherion(~therion@unix.io)
2022-10-12 03:16:28 +0200iphy_(sid67735@id-67735.lymington.irccloud.com)
2022-10-12 03:16:31 +0200econo(uid147250@user/econo)
2022-10-12 03:16:31 +0200Vq_(~vq@90-227-195-41-no77.tbcn.telia.com)
2022-10-12 03:16:33 +0200kronicmage(user73954@neotame.csclub.uwaterloo.ca)
2022-10-12 03:16:35 +0200lyxia(~lyxia@poisson.chat)
2022-10-12 03:16:37 +0200kaskal(~kaskal@2001:4bb8:2dc:7b0e:55ee:692c:e44d:a4b0)
2022-10-12 03:16:38 +0200zxrom(~zxrom@mm-232-14-212-37.vitebsk.dynamic.pppoe.byfly.by)
2022-10-12 03:16:39 +0200bjobjo(~bjobjo@user/bjobjo)
2022-10-12 03:16:39 +0200dcoutts__(~duncan@host86-163-164-210.range86-163.btcentralplus.com)
2022-10-12 03:16:40 +0200finsternis(~X@23.226.237.192)
2022-10-12 03:16:40 +0200AlexZenon(~alzenon@178.34.161.92)
2022-10-12 03:16:43 +0200nurupo_(~nurupo.ga@user/nurupo)
2022-10-12 03:16:47 +0200jargon(~jargon@184.101.208.112)
2022-10-12 03:16:47 +0200yahb2(~yahb2@2a01:4f8:c0c:5c7b::2)
2022-10-12 03:16:48 +0200Guest585(~mike@user/feetwind)
2022-10-12 03:16:50 +0200ell(~ellie@user/ellie)
2022-10-12 03:16:51 +0200lieven(~mal@ns2.wyrd.be)
2022-10-12 03:16:52 +0200Hafydd(~Hafydd@2001:41d0:305:2100::31aa)
2022-10-12 03:16:53 +0200Hafydd(~Hafydd@2001:41d0:305:2100::31aa) (Signing in (Hafydd))
2022-10-12 03:16:53 +0200Hafydd(~Hafydd@user/hafydd)
2022-10-12 03:16:54 +0200Ristovski(~Ristovski@hellomouse/perf/ristovski)
2022-10-12 03:16:54 +0200cyphase(~cyphase@user/cyphase)
2022-10-12 03:16:55 +0200ddb(~ddb@tilde.club)
2022-10-12 03:17:00 +0200inversed(~inversed@90.209.137.56)
2022-10-12 03:17:29 +0200gff_(~gff@75-174-112-159.boid.qwest.net)
2022-10-12 03:17:35 +0200gff_(~gff@75-174-112-159.boid.qwest.net) (Signing in (gff_))
2022-10-12 03:17:35 +0200gff_(~gff@user/gff)
2022-10-12 03:17:49 +0200farn(~farn@2a03:4000:7:3cd:d4ab:85ff:feeb:f505)
2022-10-12 03:17:54 +0200haasn(~nand@haasn.dev)
2022-10-12 03:18:00 +0200tv(~tv@user/tv)
2022-10-12 03:18:09 +0200natto(~natto@140.238.225.67)
2022-10-12 03:18:11 +0200Inoperable(~PLAYER_1@51.91.123.222)
2022-10-12 03:18:35 +0200DigitalKiwi(~kiwi@2604:a880:400:d0::1ca0:e001)
2022-10-12 03:18:58 +0200dolio(~dolio@130.44.130.54)
2022-10-12 03:19:17 +0200xff0x(~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 265 seconds)
2022-10-12 03:19:27 +0200cpli(77fc530071@2604:bf00:561:2000::252)
2022-10-12 03:19:52 +0200 <monochrom> sum . map f = foldl' (\a x -> a + f x)
2022-10-12 03:19:53 +0200nurupo_nurupo
2022-10-12 03:20:11 +0200 <monochrom> err, sum . map f = foldl' (\a x -> a + f x) 0
2022-10-12 03:20:19 +0200samhh(7569f027cf@2604:bf00:561:2000::e4)
2022-10-12 03:20:39 +0200piele(~piele@tbonesteak.creativeserver.net)
2022-10-12 03:20:40 +0200Ankhers(e99e97ef8e@2604:bf00:561:2000::2a2)
2022-10-12 03:21:12 +0200fvr(ef3e56ca8b@2604:bf00:561:2000::3c4)
2022-10-12 03:21:20 +0200yuzhao(~yuzhao@36.112.45.72)
2022-10-12 03:21:26 +0200jimki(~jmaki@gazorpazorp.fixme.fi)
2022-10-12 03:21:32 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-12 03:21:32 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-12 03:21:32 +0200wroathe(~wroathe@user/wroathe)
2022-10-12 03:21:32 +0200libertyprime(~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz)
2022-10-12 03:21:37 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-10-12 03:21:38 +0200wrengr(~wrengr@201.59.83.34.bc.googleusercontent.com)
2022-10-12 03:21:39 +0200Natch(~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se)
2022-10-12 03:21:44 +0200cross(~cross@spitfire.i.gajendra.net)
2022-10-12 03:24:41 +0200ubert(~Thunderbi@77.119.214.60.wireless.dyn.drei.com)
2022-10-12 03:25:18 +0200 <FlaminWalrus> including strictness concerns?
2022-10-12 03:26:19 +0200 <monochrom> I have already used foldl'
2022-10-12 03:28:31 +0200 <EvanR> foldl' is strict foldl
2022-10-12 03:37:10 +0200mikoto-chan(~mikoto-ch@193.185.223.3) (Ping timeout: 265 seconds)
2022-10-12 03:42:28 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 268 seconds)
2022-10-12 03:43:05 +0200raym(~aritra@user/raym) (Ping timeout: 268 seconds)
2022-10-12 03:43:22 +0200redmp(~redmp@mobile-166-137-177-036.mycingular.net)
2022-10-12 03:44:47 +0200mcglk(~mcglk@131.191.49.120) (Read error: Connection reset by peer)
2022-10-12 03:45:14 +0200mcglk(~mcglk@131.191.49.120)
2022-10-12 03:48:15 +0200beteigeuze(~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df) (Ping timeout: 250 seconds)
2022-10-12 03:48:53 +0200raym(~aritra@user/raym)
2022-10-12 03:49:12 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-10-12 03:52:38 +0200mikoto-chan(~mikoto-ch@193.185.223.3)
2022-10-12 03:54:17 +0200yuzhao(~yuzhao@36.112.45.72) (Ping timeout: 252 seconds)
2022-10-12 03:55:49 +0200nate1(~nate@98.45.169.16)
2022-10-12 03:55:54 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2022-10-12 03:59:46 +0200redmp(~redmp@mobile-166-137-177-036.mycingular.net) (Ping timeout: 268 seconds)
2022-10-12 04:00:49 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: Lost terminal)
2022-10-12 04:01:19 +0200redmp(~redmp@mobile-166-137-177-036.mycingular.net)
2022-10-12 04:02:49 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-10-12 04:09:42 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b)
2022-10-12 04:23:37 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-12 04:30:39 +0200Franciman(~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
2022-10-12 04:31:13 +0200nate1(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-12 04:38:28 +0200jmorris(uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-10-12 04:41:52 +0200frost(~frost@user/frost)
2022-10-12 04:46:07 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 04:48:32 +0200mzan(~quassel@mail.asterisell.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-10-12 04:49:34 +0200mzan(~quassel@mail.asterisell.com)
2022-10-12 04:50:39 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 250 seconds)
2022-10-12 04:55:23 +0200razetime(~quassel@117.193.1.101)
2022-10-12 04:56:40 +0200jero98772(~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
2022-10-12 04:57:43 +0200td_(~td@94.134.91.197) (Ping timeout: 252 seconds)
2022-10-12 04:59:28 +0200td_(~td@94.134.91.145)
2022-10-12 05:00:01 +0200haasn(~nand@haasn.dev) (Quit: ZNC 1.7.5+deb4 - https://znc.in)
2022-10-12 05:01:19 +0200haasn(~nand@haasn.dev)
2022-10-12 05:06:23 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-10-12 05:10:39 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-10-12 05:10:39 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 05:14:36 +0200nate1(~nate@98.45.169.16)
2022-10-12 05:17:52 +0200Franciman(~Franciman@mx1.fracta.dev)
2022-10-12 05:19:56 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-10-12 05:21:08 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-10-12 05:23:01 +0200nate1(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-10-12 05:31:23 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 250 seconds)
2022-10-12 05:32:12 +0200redmp(~redmp@mobile-166-137-177-036.mycingular.net) (Ping timeout: 264 seconds)
2022-10-12 05:35:46 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-10-12 05:36:03 +0200talismanick(~talismani@2601:200:c100:c9e0::1b0b) (Ping timeout: 248 seconds)
2022-10-12 05:37:17 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-10-12 05:42:10 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Client Quit)
2022-10-12 05:44:12 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-10-12 05:47:51 +0200talismanick(~talismani@2601:200:c100:c9e0::1b0b)
2022-10-12 05:48:51 +0200razetime(~quassel@117.193.1.101) (Ping timeout: 248 seconds)
2022-10-12 05:53:21 +0200talismanick(~talismani@2601:200:c100:c9e0::1b0b) (Ping timeout: 268 seconds)
2022-10-12 05:54:28 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-12 05:56:07 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 05:56:07 +0200Vajb(~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57) (Read error: Connection reset by peer)
2022-10-12 05:56:15 +0200Vajb(~Vajb@85-76-75-28-nat.elisa-mobile.fi)
2022-10-12 05:57:47 +0200Square(~a@user/square) (Ping timeout: 255 seconds)
2022-10-12 06:02:04 +0200Square(~a@user/square)
2022-10-12 06:02:59 +0200alecs(~alecs@host-62-211-49-5.pool62211.interbusiness.it)
2022-10-12 06:03:02 +0200nate1(~nate@98.45.169.16)
2022-10-12 06:03:38 +0200extratail(~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a) (Ping timeout: 268 seconds)
2022-10-12 06:06:50 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-10-12 06:09:00 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-10-12 06:09:53 +0200nate1(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-12 06:10:59 +0200jargon(~jargon@184.101.208.112) (Remote host closed the connection)
2022-10-12 06:13:32 +0200extratail(~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a)
2022-10-12 06:15:34 +0200mbuf(~Shakthi@49.205.87.152)
2022-10-12 06:18:36 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 265 seconds)
2022-10-12 06:19:41 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-10-12 06:20:18 +0200 <Clinton[m]> Is there a class which is `MonadError` but without `catchError` and without the functional dependency?
2022-10-12 06:20:48 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-10-12 06:20:48 +0200mbuf(~Shakthi@49.205.87.152) (Ping timeout: 264 seconds)
2022-10-12 06:20:54 +0200 <Clinton[m]> (I could write one myself but I'd rather avoid reinventing the wheel)
2022-10-12 06:21:18 +0200mbuf(~Shakthi@49.205.87.152)
2022-10-12 06:22:12 +0200 <Clinton[m]> I've noticed purescript has this:
2022-10-12 06:22:12 +0200 <Clinton[m]> https://github.com/purescript/purescript-transformers/pull/91/files/9eb6543f36cec807e202d9e35b02f0…
2022-10-12 06:23:34 +0200 <Clinton[m]> But all the versions of `MonadThrow` I can fine on Haskell do not have `e` as part of the type parameters. They force `e = Exception`.
2022-10-12 06:26:45 +0200zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-10-12 06:26:57 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Read error: Connection reset by peer)
2022-10-12 06:27:38 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2022-10-12 06:30:38 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-10-12 06:32:18 +0200 <Clinton[m]> I basically want this:... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/2c17d5f452458de4774b9434a3103d80ecf4…>)
2022-10-12 06:33:54 +0200 <Clinton[m]> * Basically, instead of the current MonadThrow... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/e2b389b66b936e66a0ec6dcf49cd882a88a2…>)
2022-10-12 06:37:16 +0200razetime(~quassel@117.193.1.101)
2022-10-12 06:43:48 +0200redmp(~redmp@mobile-166-137-177-036.mycingular.net)
2022-10-12 06:46:38 +0200JimL(~quassel@89-162-2-132.fiber.signal.no) (Ping timeout: 265 seconds)
2022-10-12 06:55:23 +0200_xor(~xor@74.215.182.83)
2022-10-12 06:55:46 +0200bjobjo(~bjobjo@user/bjobjo) (Ping timeout: 260 seconds)
2022-10-12 06:56:03 +0200extratail(~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a) (Ping timeout: 268 seconds)
2022-10-12 06:57:29 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-12 06:57:29 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-12 06:57:29 +0200wroathe(~wroathe@user/wroathe)
2022-10-12 06:57:41 +0200 <EvanR> did pure script reverse the arrow on class definition syntax... jeez
2022-10-12 06:58:38 +0200 <EvanR> I guess it's a good way to know you're in purescript
2022-10-12 06:59:04 +0200 <davean> Clinton[m]: I think you're thinking something like https://hackage.haskell.org/package/mtl-2.2.2/docs/Control-Monad-Except.html ? Because thats very different than MonadThrow stuff.
2022-10-12 06:59:25 +0200 <davean> Haskell has a whole second exception thing thats less ... that
2022-10-12 07:03:23 +0200extratail(~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a)
2022-10-12 07:15:35 +0200YoungFrog(~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be) (Ping timeout: 252 seconds)
2022-10-12 07:16:10 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-10-12 07:17:28 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-10-12 07:18:16 +0200nate1(~nate@98.45.169.16)
2022-10-12 07:18:31 +0200razetime(~quassel@117.193.1.101) (Ping timeout: 252 seconds)
2022-10-12 07:20:28 +0200YoungFrog(~youngfrog@2a02:a03f:ca07:f900:e5a1:b41c:7001:1951)
2022-10-12 07:21:07 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-12 07:22:53 +0200nate1(~nate@98.45.169.16) (Ping timeout: 265 seconds)
2022-10-12 07:25:23 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 248 seconds)
2022-10-12 07:26:31 +0200chomwitt(~chomwitt@2a02:587:dc0c:c200:5b5:50e2:356d:c45b)
2022-10-12 07:26:35 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2022-10-12 07:26:43 +0200 <ski> @type let chunksOf :: Int -> Data.Vector.Vector a -> Data.Vector.Vector (Data.Vector.Vector a); chunksOf m v0 | r == 0 = Data.Vector.generate q (\i -> Data.Vector.slice (q*i) m v0) | otherwise = Data.Vector.snoc (Data.Vector.generate q (\i -> Data.Vector.slice (q*i) m v0)) (Data.Vector.slice (q*m) r v0) where n = Data.Vector.length v0; (q,r) = n `divMod` m in chunksOf
2022-10-12 07:26:44 +0200 <lambdabot> Int -> Data.Vector.Vector a -> Data.Vector.Vector (Data.Vector.Vector a)
2022-10-12 07:27:24 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 264 seconds)
2022-10-12 07:28:58 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-10-12 07:29:07 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-10-12 07:31:00 +0200zxrom(~zxrom@mm-232-14-212-37.vitebsk.dynamic.pppoe.byfly.by) (Quit: Leaving)
2022-10-12 07:31:26 +0200zxrom(~zxrom@mm-232-14-212-37.vitebsk.dynamic.pppoe.byfly.by)
2022-10-12 07:32:12 +0200Kaiepi(~Kaiepi@142.68.249.28) (Ping timeout: 264 seconds)
2022-10-12 07:32:21 +0200 <ski> EvanR : well, evidently they took the view that the class implies its superclasses (rather than the superclasses being presuppositions of the class)
2022-10-12 07:33:24 +0200qrpnxz(~qrpnxz@fsf/member/qrpnxz) (Ping timeout: 264 seconds)
2022-10-12 07:34:04 +0200 <ski> (btw, fwiw, imho it would have been better if the instance head syntactically preceded the instance body (the constraints) .. like Prolog rules. perhaps also for classes and superclasses (?))
2022-10-12 07:34:50 +0200qrpnxz(~qrpnxz@fsf/member/qrpnxz)
2022-10-12 07:36:30 +0200alecs(~alecs@host-62-211-49-5.pool62211.interbusiness.it) (Quit: WeeChat 3.6)
2022-10-12 07:37:57 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-10-12 07:44:35 +0200Natch(~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Remote host closed the connection)
2022-10-12 07:44:43 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-12 07:45:08 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-12 07:47:28 +0200razetime(~quassel@117.193.1.101)
2022-10-12 07:52:20 +0200redmp(~redmp@mobile-166-137-177-036.mycingular.net) (Quit: leaving)
2022-10-12 07:55:41 +0200YoungFrawg(~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be)
2022-10-12 07:55:51 +0200YoungFrog(~youngfrog@2a02:a03f:ca07:f900:e5a1:b41c:7001:1951) (Ping timeout: 268 seconds)
2022-10-12 07:56:45 +0200YoungFrawgYoungFrog
2022-10-12 08:04:12 +0200talismanick(~talismani@2601:200:c100:c9e0::1b0b)
2022-10-12 08:04:47 +0200mikoto-chan(~mikoto-ch@193.185.223.3) (Ping timeout: 250 seconds)
2022-10-12 08:06:15 +0200 <talismanick> Tangential to FlaminWalrus 's earlier line of questioning, if I wanted to numerically compute with APL-style rank polymorphism (but in Haskell), would it be better to study HMatrix or Repa first?
2022-10-12 08:07:03 +0200 <talismanick> (Tangential because treating data in terms of aggregates with "shape" can lend itself to algebraic clarity without sacrificing performance)
2022-10-12 08:13:13 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-12 08:14:15 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 08:15:50 +0200 <Axman6> without understanding most of the question that does sound like more Repa than HMatrix to me
2022-10-12 08:16:06 +0200kenran(~user@user/kenran)
2022-10-12 08:19:01 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-12 08:22:53 +0200 <kaol> Has nub ever required for the list to be sorted? A coworker used it without sort first and I was about to remark about that but when I checked the docs it had no such requirement.
2022-10-12 08:24:16 +0200 <Axman6> nope, it's never needed it, it has a very simple (and slow) implementation
2022-10-12 08:24:37 +0200 <Axman6> @src nub
2022-10-12 08:24:37 +0200 <lambdabot> nub = nubBy (==)
2022-10-12 08:24:37 +0200 <lambdabot> --OR
2022-10-12 08:24:38 +0200 <lambdabot> nub l = go l []
2022-10-12 08:24:38 +0200 <lambdabot> where go [] _ = []
2022-10-12 08:24:38 +0200 <lambdabot> go (x:xs) ls
2022-10-12 08:24:40 +0200 <lambdabot> | x `elem` ls = go xs ls
2022-10-12 08:24:41 +0200 <lambdabot> | otherwise = x : go xs (x:ls)
2022-10-12 08:25:33 +0200 <Axman6> hmm, the implementation I was thinking about was: nub [] = []; nub (x:xs) = x : nub (filter (/=x) xs)
2022-10-12 08:26:42 +0200 <kaol> O(n^2). I suppose I assumed that at some point since it'd be O(n) for the sorted case.
2022-10-12 08:27:31 +0200mncheck(~mncheck@193.224.205.254)
2022-10-12 08:29:56 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-12 08:34:05 +0200 <jackdk> @src group
2022-10-12 08:34:05 +0200 <lambdabot> group = groupBy (==)
2022-10-12 08:34:11 +0200 <jackdk> @src groupBy
2022-10-12 08:34:11 +0200 <lambdabot> groupBy _ [] = []
2022-10-12 08:34:11 +0200 <lambdabot> groupBy eq (x:xs) = (x:ys) : groupBy eq zs
2022-10-12 08:34:12 +0200 <lambdabot> where (ys, zs) = span (eq x) xs
2022-10-12 08:34:44 +0200 <ski> @src nubBy
2022-10-12 08:34:44 +0200 <lambdabot> nubBy eq [] = []
2022-10-12 08:34:45 +0200 <lambdabot> nubBy eq (x:xs) = x : nubBy eq (filter (\ y -> not (eq x y)) xs)
2022-10-12 08:34:50 +0200 <jackdk> kaol, group needs sorting first if you want to group all occurrences of something within a list. Maybe that's what you're thinking of?
2022-10-12 08:35:19 +0200 <ski> @hoogle nubSort
2022-10-12 08:35:20 +0200 <lambdabot> Data.List.Extra nubSort :: Ord a => [a] -> [a]
2022-10-12 08:35:20 +0200 <lambdabot> Extra nubSort :: Ord a => [a] -> [a]
2022-10-12 08:35:20 +0200 <lambdabot> Data.List.Ordered nubSort :: Ord a => [a] -> [a]
2022-10-12 08:35:22 +0200 <ski> @hoogle nubOrd
2022-10-12 08:35:22 +0200 <lambdabot> Data.Containers.ListUtils nubOrd :: Ord a => [a] -> [a]
2022-10-12 08:35:22 +0200 <lambdabot> Data.List.Extra nubOrd :: Ord a => [a] -> [a]
2022-10-12 08:35:23 +0200 <lambdabot> Data.List.NonEmpty.Extra nubOrd :: Ord a => NonEmpty a -> NonEmpty a
2022-10-12 08:35:37 +0200 <jackdk> @hoogle ordNub
2022-10-12 08:35:38 +0200 <lambdabot> Distribution.Simple.Utils ordNub :: Ord a => [a] -> [a]
2022-10-12 08:35:38 +0200 <lambdabot> Distribution.Utils.Generic ordNub :: Ord a => [a] -> [a]
2022-10-12 08:35:38 +0200 <lambdabot> Protolude ordNub :: Ord a => [a] -> [a]
2022-10-12 08:36:09 +0200 <jackdk> https://hackage.haskell.org/package/discrimination-0.4.1/docs/Data-Discrimination.html#v:nub
2022-10-12 08:37:03 +0200 <ski> > group "mississippi"
2022-10-12 08:37:04 +0200 <lambdabot> ["m","i","ss","i","ss","i","pp","i"]
2022-10-12 08:38:52 +0200 <ski> @hoogle sortNub
2022-10-12 08:38:52 +0200 <lambdabot> Relude.Nub sortNub :: Ord a => [a] -> [a]
2022-10-12 08:38:53 +0200 <lambdabot> Universum.Nub sortNub :: Ord a => [a] -> [a]
2022-10-12 08:38:53 +0200 <lambdabot> Language.Fixpoint.Misc sortNub :: Ord a => [a] -> [a]
2022-10-12 08:38:54 +0200 <ski> heh
2022-10-12 08:39:55 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-10-12 08:40:50 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 08:42:44 +0200dolio(~dolio@130.44.130.54) (*.net *.split)
2022-10-12 08:42:44 +0200Inoperable(~PLAYER_1@51.91.123.222) (*.net *.split)
2022-10-12 08:42:44 +0200thegeekinside(~thegeekin@189.180.7.159) (*.net *.split)
2022-10-12 08:42:44 +0200loras(~loras@c-73-139-125-125.hsd1.fl.comcast.net) (*.net *.split)
2022-10-12 08:42:44 +0200dsrt^(~dsrt@c-76-17-6-165.hsd1.ga.comcast.net) (*.net *.split)
2022-10-12 08:42:44 +0200codaraxis__(~codaraxis@user/codaraxis) (*.net *.split)
2022-10-12 08:42:44 +0200jbayardo(~jbayardo@20.83.116.49) (*.net *.split)
2022-10-12 08:42:44 +0200shapr(~user@68.54.166.125) (*.net *.split)
2022-10-12 08:42:44 +0200jmd_(~jmdaemon@user/jmdaemon) (*.net *.split)
2022-10-12 08:42:44 +0200son0p(~ff@181.136.122.143) (*.net *.split)
2022-10-12 08:42:44 +0200mjs2600(~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (*.net *.split)
2022-10-12 08:42:44 +0200nshepperd2(~nshepperd@li364-218.members.linode.com) (*.net *.split)
2022-10-12 08:42:44 +0200ozkutuk(~ozkutuk@176.240.173.153) (*.net *.split)
2022-10-12 08:42:44 +0200adium(adium@user/adium) (*.net *.split)
2022-10-12 08:42:44 +0200arahael(~arahael@210.185.98.153) (*.net *.split)
2022-10-12 08:42:44 +0200tomboy64(~tomboy64@user/tomboy64) (*.net *.split)
2022-10-12 08:42:44 +0200eL_Bart0(eL_Bart0@dietunichtguten.org) (*.net *.split)
2022-10-12 08:42:45 +0200Ram-Z(~Ram-Z@li1814-254.members.linode.com) (*.net *.split)
2022-10-12 08:42:45 +0200potash(~foghorn@user/foghorn) (*.net *.split)
2022-10-12 08:42:45 +0200pragma-(~chaos@user/pragmatic-chaos) (*.net *.split)
2022-10-12 08:42:45 +0200Igloo(~ian@matrix.chaos.earth.li) (*.net *.split)
2022-10-12 08:42:45 +0200oldsk00l(~znc@ec2-13-40-82-74.eu-west-2.compute.amazonaws.com) (*.net *.split)
2022-10-12 08:42:45 +0200m5zs7k(aquares@web10.mydevil.net) (*.net *.split)
2022-10-12 08:42:45 +0200Unode(~Unode@194.94.44.220) (*.net *.split)
2022-10-12 08:42:45 +0200bgamari(~bgamari@64.223.130.138) (*.net *.split)
2022-10-12 08:42:45 +0200davean(~davean@davean.sciesnet.net) (*.net *.split)
2022-10-12 08:42:45 +0200ystael(~ystael@user/ystael) (*.net *.split)
2022-10-12 08:42:45 +0200[Leary](~Leary]@user/Leary/x-0910699) (*.net *.split)
2022-10-12 08:42:45 +0200cods(~fred@82-65-232-44.subs.proxad.net) (*.net *.split)
2022-10-12 08:42:45 +0200Ranhir(~Ranhir@157.97.53.139) (*.net *.split)
2022-10-12 08:42:45 +0200Katarushisu(~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (*.net *.split)
2022-10-12 08:42:45 +0200zzz(~z@user/zero) (*.net *.split)
2022-10-12 08:42:45 +0200glguy(~glguy@libera/staff-emeritus/glguy) (*.net *.split)
2022-10-12 08:42:45 +0200joeyh(~joeyh@kitenet.net) (*.net *.split)
2022-10-12 08:42:45 +0200mesaoptimizer(apotheosis@user/PapuaHardyNet) (*.net *.split)
2022-10-12 08:42:45 +0200WarzoneCommand(~Frank@77-162-168-71.fixed.kpn.net) (*.net *.split)
2022-10-12 08:42:45 +0200Logio(em@kapsi.fi) (*.net *.split)
2022-10-12 08:42:45 +0200auri(~auri@fsf/member/auri) (*.net *.split)
2022-10-12 08:42:45 +0200asm(~alexander@user/asm) (*.net *.split)
2022-10-12 08:42:45 +0200res0nat0r084490(~Fletch@dia.whatbox.ca) (*.net *.split)
2022-10-12 08:42:45 +0200Maja(~quassel@178-37-215-128.adsl.inetia.pl) (*.net *.split)
2022-10-12 08:42:45 +0200haskl(~haskl@user/haskl) (*.net *.split)
2022-10-12 08:42:45 +0200GoldsteinQ(~goldstein@goldstein.rs) (*.net *.split)
2022-10-12 08:42:45 +0200zachel(~zachel@user/zachel) (*.net *.split)
2022-10-12 08:42:45 +0200aweinstock(~aweinstoc@cpe-74-76-189-75.nycap.res.rr.com) (*.net *.split)
2022-10-12 08:42:45 +0200wagle(~wagle@quassel.wagle.io) (*.net *.split)
2022-10-12 08:42:45 +0200lambdabot(~lambdabot@haskell/bot/lambdabot) (*.net *.split)
2022-10-12 08:42:45 +0200int-e(~noone@int-e.eu) (*.net *.split)
2022-10-12 08:42:45 +0200taeaad(~taeaad@user/taeaad) (*.net *.split)
2022-10-12 08:42:46 +0200TheCoffeMaker(~TheCoffeM@user/thecoffemaker) (*.net *.split)
2022-10-12 08:42:46 +0200Zemyla(~ec2-user@ec2-54-80-174-150.compute-1.amazonaws.com) (*.net *.split)
2022-10-12 08:42:51 +0200ian_(~ian@matrix.chaos.earth.li)
2022-10-12 08:42:53 +0200joeyh(joeyh@2600:3c03::f03c:91ff:fe73:b0d2)
2022-10-12 08:42:54 +0200shapr(~user@68.54.166.125)
2022-10-12 08:42:54 +0200lambdabot(~lambdabot@silicon.int-e.eu)
2022-10-12 08:42:54 +0200eL_Bart0-(eL_Bart0@dietunichtguten.org)
2022-10-12 08:42:55 +0200aweinstock(~aweinstoc@cpe-74-76-189-75.nycap.res.rr.com)
2022-10-12 08:42:58 +0200res0nat0r084490(~Fletch@dia.whatbox.ca)
2022-10-12 08:42:58 +0200WarzoneCommand(~Frank@77-162-168-71.fixed.kpn.net)
2022-10-12 08:42:59 +0200mjs2600(~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
2022-10-12 08:43:00 +0200dsrt^(~dsrt@c-76-17-6-165.hsd1.ga.comcast.net)
2022-10-12 08:43:02 +0200bgamari(~bgamari@64.223.130.138)
2022-10-12 08:43:05 +0200lambdabot(~lambdabot@silicon.int-e.eu) (Changing host)
2022-10-12 08:43:05 +0200lambdabot(~lambdabot@haskell/bot/lambdabot)
2022-10-12 08:43:06 +0200asm(~alexander@burner.asm89.io)
2022-10-12 08:43:11 +0200jbayardo(~jbayardo@20.83.116.49)
2022-10-12 08:43:11 +0200Ranhir(~Ranhir@157.97.53.139)
2022-10-12 08:43:20 +0200zachel(~zachel@user/zachel)
2022-10-12 08:43:27 +0200Maja(~quassel@178-37-215-128.adsl.inetia.pl)
2022-10-12 08:43:37 +0200tomboy64(~tomboy64@37.120.27.183)
2022-10-12 08:44:02 +0200potash(~foghorn@94-225-47-8.access.telenet.be)
2022-10-12 08:44:09 +0200tomboy64(~tomboy64@37.120.27.183) (Changing host)
2022-10-12 08:44:09 +0200tomboy64(~tomboy64@user/tomboy64)
2022-10-12 08:44:16 +0200potash(~foghorn@94-225-47-8.access.telenet.be) (Changing host)
2022-10-12 08:44:16 +0200potash(~foghorn@user/foghorn)
2022-10-12 08:44:25 +0200Unode(~Unode@194.94.44.220)
2022-10-12 08:44:29 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:a1ca:b5f2:64f1:4de6)
2022-10-12 08:44:30 +0200[Leary](~Leary]@user/Leary/x-0910699)
2022-10-12 08:44:34 +0200codaraxis(~codaraxis@user/codaraxis)
2022-10-12 08:44:41 +0200thegeekinside(~thegeekin@189.180.7.159)
2022-10-12 08:44:43 +0200haskl(~haskl@user/haskl)
2022-10-12 08:44:52 +0200TheCoffeMaker(~TheCoffeM@200.126.129.149)
2022-10-12 08:44:55 +0200glguy(~glguy@libera/staff-emeritus/glguy)
2022-10-12 08:44:57 +0200Ram-Z(~Ram-Z@li1814-254.members.linode.com)
2022-10-12 08:44:58 +0200TheCoffeMaker(~TheCoffeM@200.126.129.149) (Changing host)
2022-10-12 08:44:58 +0200TheCoffeMaker(~TheCoffeM@user/thecoffemaker)
2022-10-12 08:45:04 +0200zero(~z@user/zero)
2022-10-12 08:45:09 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-10-12 08:45:17 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2022-10-12 08:45:20 +0200wagle(~wagle@quassel.wagle.io)
2022-10-12 08:45:29 +0200dolio(~dolio@130.44.130.54)
2022-10-12 08:45:32 +0200m5zs7k(aquares@web10.mydevil.net)
2022-10-12 08:45:36 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-10-12 08:45:40 +0200GoldsteinQ(~goldstein@goldstein.rs)
2022-10-12 08:45:53 +0200davean(~davean@davean.sciesnet.net)
2022-10-12 08:45:56 +0200adium(adium@user/adium)
2022-10-12 08:46:07 +0200taeaad(~taeaad@user/taeaad)
2022-10-12 08:46:10 +0200pragma-(~chaos@user/pragmatic-chaos)
2022-10-12 08:46:13 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-10-12 08:46:16 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-10-12 08:47:09 +0200auri(~auri@fsf/member/auri)
2022-10-12 08:47:33 +0200oldsk00l(~znc@ec2-13-40-82-74.eu-west-2.compute.amazonaws.com)
2022-10-12 08:47:37 +0200troydm(~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 252 seconds)
2022-10-12 08:47:40 +0200 <Axman6> kaol: also worth keeping in mind that nub only required Eq, not Ord, so the idea of sorting doesn't make much sense
2022-10-12 08:47:53 +0200int-e(~noone@int-e.eu)
2022-10-12 08:47:53 +0200Logio(em@kapsi.fi)
2022-10-12 08:47:56 +0200cods(~fred@82-65-232-44.subs.proxad.net)
2022-10-12 08:48:00 +0200 <Axman6> you could require that equal elements were grouped though
2022-10-12 08:48:01 +0200Zemyla(~ec2-user@ec2-54-80-174-150.compute-1.amazonaws.com)
2022-10-12 08:48:10 +0200ystael(~ystael@user/ystael)
2022-10-12 08:48:44 +0200 <dminuoso> Well, the reason why good implementations will demand Ord, is because they can use a Set internally.
2022-10-12 08:49:01 +0200 <dminuoso> "good" with respect to an unknown, unordered input of course.
2022-10-12 08:49:27 +0200 <Axman6> should be using the discrimination package anyway - give me that O(n) nub please
2022-10-12 08:50:52 +0200 <dminuoso> I would be interested in benchmarks about discrimination. How costly is its constant factor? What about locality of reference? How much extra memory indirections do you pay for.
2022-10-12 08:51:02 +0200Inoperable(~PLAYER_1@fancydata.science)
2022-10-12 08:52:02 +0200 <dminuoso> Worst time complexity is usually not the biggest concern you have. Often, with real world data, an algorithm with poorer complexity can perform better due to good cache performance for instance.
2022-10-12 08:52:11 +0200thegeekinside(~thegeekin@189.180.7.159) (Ping timeout: 268 seconds)
2022-10-12 08:55:02 +0200 <ski> hm, what if one only wants to merge adjacent duplicates ? anyone named the obvious wrapper around `group' ?
2022-10-12 08:55:37 +0200 <dminuoso> ski: how would "aaa" and "aaaa" be grouped?
2022-10-12 08:55:39 +0200 <Axman6> map head . group?
2022-10-12 08:55:45 +0200 <ski> yes
2022-10-12 08:56:42 +0200 <ski> @type map (head &&& length) . group -- and this related one, i suppose
2022-10-12 08:56:43 +0200 <lambdabot> Eq a => [a] -> [(a, Int)]
2022-10-12 08:57:10 +0200 <dminuoso> I use that particular one in an IPv6 pretty printing algorithm :)
2022-10-12 08:57:29 +0200ski. o O ( free idempotent monoid )
2022-10-12 08:58:22 +0200 <dminuoso> Though I wrote it as a handwritten unrolled loop, as it peformed better
2022-10-12 08:58:52 +0200zeenk(~zeenk@2a02:2f04:a20a:3e00:5712:52b0:ca1d:bc63)
2022-10-12 08:58:54 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 264 seconds)
2022-10-12 08:59:05 +0200 <dminuoso> well not unrolled.
2022-10-12 08:59:21 +0200 <ski> fused
2022-10-12 08:59:41 +0200acidjnk(~acidjnk@p200300d6e7137a811112d37158fd9527.dip0.t-ipconnect.de)
2022-10-12 09:00:06 +0200dsrt^(~dsrt@c-76-17-6-165.hsd1.ga.comcast.net) (Remote host closed the connection)
2022-10-12 09:00:22 +0200 <dminuoso> Lately I have begun applying expected optimizations by hand, rather than relying on GHC to do it for me.
2022-10-12 09:00:28 +0200 <ski> one wants to remove repetition of elements, in IPv6 ?
2022-10-12 09:00:52 +0200echoreply(~echoreply@45.32.163.16) (Quit: WeeChat 2.8)
2022-10-12 09:01:01 +0200 <dminuoso> Yes, see [RFC5952 Section 4.2.2](https://tools.ietf.org/html/rfc5952#section-4.2.2) and [RFC5952 Section 5](https://tools.ietf.org/html/rfc5952#section-5)
2022-10-12 09:01:08 +0200ski. o O ( counboxed sums )
2022-10-12 09:01:21 +0200echoreply(~echoreply@45.32.163.16)
2022-10-12 09:01:39 +0200cfricke(~cfricke@user/cfricke)
2022-10-12 09:01:54 +0200 <dminuoso> So you cound the find the largest consecutive word16s, and that is going to be represented as ::
2022-10-12 09:02:02 +0200 <dminuoso> s/cound the//
2022-10-12 09:03:09 +0200nshepperd2(nshepperd@2600:3c03::f03c:92ff:fe28:92c9)
2022-10-12 09:05:50 +0200 <ski> hm, so merging repeated `0's
2022-10-12 09:06:15 +0200 <dminuoso> Yes, but only the largest occurence of repeated `0's.
2022-10-12 09:06:25 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 09:06:29 +0200 <dminuoso> Otherwise the representation would be ambiguous obviously
2022-10-12 09:06:47 +0200 <ski> (reminds me vaguely of representing a partition with finite support .. perhaps by transpositions)
2022-10-12 09:07:10 +0200skinods
2022-10-12 09:07:44 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-10-12 09:08:14 +0200 <ski> @type \f n g -> fmap f (Data.Vector.generate n g)
2022-10-12 09:08:15 +0200 <lambdabot> (a -> b) -> Int -> (Int -> a) -> Data.Vector.Vector b
2022-10-12 09:08:21 +0200 <ski> @type \f n g -> Data.Vector.generate n (f . g)
2022-10-12 09:08:22 +0200 <lambdabot> (b -> a) -> Int -> (Int -> b) -> Data.Vector.Vector a
2022-10-12 09:08:35 +0200 <dminuoso> What is interesting, is that only in IPv6 the representation is actually standardized. In IPv4, most implementations support a large variety of legacy artifacts of many old systems.
2022-10-12 09:08:40 +0200 <ski> @type \n -> PamfPilfRewol (Data.Vector.generate n)
2022-10-12 09:08:41 +0200 <lambdabot> Int -> Yoneda Data.Vector.Vector Int
2022-10-12 09:08:50 +0200 <ski> @type \f n -> fmap f (PamfPilfRewol (Data.Vector.generate n))
2022-10-12 09:08:51 +0200 <lambdabot> (Int -> b) -> Int -> Yoneda Data.Vector.Vector b
2022-10-12 09:08:55 +0200 <ski> @type \f n -> PamfPilfRewol (Data.Vector.generate n . (. f))
2022-10-12 09:08:56 +0200 <lambdabot> (Int -> a) -> Int -> Yoneda Data.Vector.Vector a
2022-10-12 09:09:13 +0200 <dminuoso> 3232271615 is for example in most implementations considered a valid IPv4 address representation, and accepted by most generic parsers. :)
2022-10-12 09:09:36 +0200 <ski> (the middle one generates a yoneda-ed vector of indices, which you can then map over)
2022-10-12 09:09:38 +0200 <dminuoso> Or 192.11046143 even
2022-10-12 09:10:15 +0200 <Axman6> wtf is PamfPilfRewol
2022-10-12 09:10:16 +0200 <ski> hm
2022-10-12 09:11:05 +0200 <dminuoso> :k PamfPilfRewol
2022-10-12 09:11:06 +0200 <lambdabot> (forall b. (a -> b) -> f b) -> Yoneda f a
2022-10-12 09:11:47 +0200 <dminuoso> Your best bet is to probably ripgrep through the entirety of hackage packages?
2022-10-12 09:12:52 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 246 seconds)
2022-10-12 09:17:03 +0200 <ski> > (concat . map ((\(x:xs) -> toUpper x : map toLower xs) . reverse) . unfoldr (\case [] -> Nothing; x:xs | isUpper x -> Just (first (x:) (span (not . isUpper) xs)) | otherwise -> Just (break isUpper xs))) "PamfPilfRewol"
2022-10-12 09:17:04 +0200 <lambdabot> "FmapFlipLower"
2022-10-12 09:17:46 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-12 09:19:39 +0200 <ski> using
2022-10-12 09:19:44 +0200 <ski> data CoYoneda f b = forall a. FMapLift (a -> b) (f a)
2022-10-12 09:19:50 +0200 <ski> @type FMapLift
2022-10-12 09:19:51 +0200 <lambdabot> (a -> b) -> f a -> CoYoneda f b
2022-10-12 09:19:53 +0200 <ski> @type (. liftCoYoneda) . fmap
2022-10-12 09:19:54 +0200 <lambdabot> (a -> b) -> f a -> CoYoneda f b
2022-10-12 09:19:55 +0200 <ski> and
2022-10-12 09:20:02 +0200 <ski> newtype Yoneda f a = PamfPilfRewol {lowerFlipFmap :: forall b. (a -> b) -> f b}
2022-10-12 09:20:07 +0200 <ski> @type PamfPilfRewol
2022-10-12 09:20:08 +0200 <lambdabot> (forall b. (a -> b) -> f b) -> Yoneda f a
2022-10-12 09:20:11 +0200 <ski> @type lowerFlipFmap
2022-10-12 09:20:13 +0200 <lambdabot> Yoneda f a -> (a -> b) -> f b
2022-10-12 09:20:13 +0200 <ski> @type (lowerYoneda .) . flip fmap
2022-10-12 09:20:14 +0200 <lambdabot> Yoneda f a1 -> (a1 -> a2) -> f a2
2022-10-12 09:20:28 +0200asm(~alexander@burner.asm89.io) (Changing host)
2022-10-12 09:20:28 +0200asm(~alexander@user/asm)
2022-10-12 09:26:21 +0200chele(~chele@user/chele)
2022-10-12 09:27:28 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 09:29:03 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-10-12 09:29:10 +0200enoq(~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)
2022-10-12 09:32:27 +0200codaraxis__(~codaraxis@user/codaraxis)
2022-10-12 09:33:30 +0200extratail(~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a) (Ping timeout: 268 seconds)
2022-10-12 09:36:35 +0200codaraxis(~codaraxis@user/codaraxis) (Ping timeout: 268 seconds)
2022-10-12 09:37:19 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de)
2022-10-12 09:38:51 +0200CiaoSen(~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-10-12 09:39:02 +0200 <Axman6> Who is responsible for this nonsense
2022-10-12 09:42:02 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-10-12 09:48:40 +0200wagle(~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
2022-10-12 09:49:09 +0200wagle(~wagle@quassel.wagle.io)
2022-10-12 09:50:33 +0200arahael(~arahael@210.185.98.153)
2022-10-12 09:50:57 +0200Franciman(~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
2022-10-12 09:55:34 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-10-12 09:58:02 +0200ski<-
2022-10-12 09:58:09 +0200nate1(~nate@98.45.169.16)
2022-10-12 10:00:31 +0200kuribas(~user@silversquare.silversquare.eu)
2022-10-12 10:03:31 +0200nate1(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-12 10:03:31 +0200razetime(~quassel@117.193.1.101) (Ping timeout: 252 seconds)
2022-10-12 10:05:43 +0200fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
2022-10-12 10:07:57 +0200spider_(~spider@vps-951ce37a.vps.ovh.ca) (Ping timeout: 268 seconds)
2022-10-12 10:14:07 +0200shriekingnoise(~shrieking@186.137.167.202) (Quit: Quit)
2022-10-12 10:16:10 +0200spider_(~spider@vps-951ce37a.vps.ovh.ca)
2022-10-12 10:18:11 +0200Franciman(~Franciman@mx1.fracta.dev)
2022-10-12 10:20:13 +0200razetime(~quassel@117.193.1.101)
2022-10-12 10:25:19 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-10-12 10:26:34 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-10-12 10:28:38 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2022-10-12 10:29:01 +0200andreabedini(~andreabed@8s8kj681vht2qj3xkwc5.ip6.superloop.com) (Quit: WeeChat 3.6)
2022-10-12 10:30:17 +0200MajorBiscuit(~MajorBisc@145.94.164.10)
2022-10-12 10:31:47 +0200nschoe(~q@141.101.51.197)
2022-10-12 10:32:18 +0200causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e) (Quit: WeeChat 3.6)
2022-10-12 10:32:35 +0200yvan-sraka(~yvan-srak@2a01:c23:5c26:be00:42ca:3e4b:6bf7:d95c)
2022-10-12 10:36:45 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de) (Remote host closed the connection)
2022-10-12 10:37:25 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-12 10:42:05 +0200 <kuribas> are there other jvm functional languages like scala?
2022-10-12 10:42:19 +0200 <kuribas> (semi-)mainstream, not some student project
2022-10-12 10:42:31 +0200 <probie> Clojure? What does "like Scala" mean?
2022-10-12 10:42:44 +0200jmorris(uid537181@id-537181.uxbridge.irccloud.com)
2022-10-12 10:42:57 +0200 <kuribas> static typed
2022-10-12 10:43:11 +0200 <kuribas> and functional
2022-10-12 10:43:32 +0200 <kuribas> (with ADTs, pattern matching, ...)
2022-10-12 10:43:49 +0200 <kuribas> wait, scala doesn't even have pattern matching, does it?
2022-10-12 10:44:44 +0200 <Franciman> kuribas: there used to be a haskell's clone
2022-10-12 10:44:54 +0200 <Franciman> https://eta-lang.org/
2022-10-12 10:45:02 +0200 <Franciman> not sure whether it's mantained anymore or nawt
2022-10-12 10:45:21 +0200 <kuribas> that's dead
2022-10-12 10:45:28 +0200 <kuribas> for the last three years or so.
2022-10-12 10:46:03 +0200ph88(~ph88@tmo-114-149.customers.d1-online.com)
2022-10-12 10:46:06 +0200 <kuribas> I mean, I can think of a few jvm functional languages (idris!), but nothing that is actually used in production.
2022-10-12 10:46:40 +0200talismanick(~talismani@2601:200:c100:c9e0::1b0b) (Ping timeout: 246 seconds)
2022-10-12 10:47:21 +0200Midjak(~Midjak@82.66.147.146) (Ping timeout: 260 seconds)
2022-10-12 10:49:51 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 10:50:56 +0200 <probie> Depending on your threshold for "functional", it's possible to write functional code with Kotlin using Arrow (although if Scala doesn't meet your benchmark, this won't).
2022-10-12 10:52:59 +0200 <kuribas> I believe they added ADTs in scala lately.
2022-10-12 10:53:18 +0200gmg(~user@user/gehmehgeh) (Ping timeout: 258 seconds)
2022-10-12 10:53:30 +0200 <lortabac> how do I reload a package in GHCI?
2022-10-12 10:53:53 +0200 <Hecate> good question
2022-10-12 10:54:05 +0200gmg(~user@user/gehmehgeh)
2022-10-12 10:54:05 +0200 <comerijn> lortabac: define "package"? as in "cabal repl"?
2022-10-12 10:54:27 +0200 <Franciman> you can reload it by restarting ghci
2022-10-12 10:54:37 +0200Kaiepi(~Kaiepi@142.68.249.28)
2022-10-12 10:54:56 +0200 <lortabac> comerijn: yes, I'm in cabal repl and I modified one of the dependencies. Now I would like to reload it without restarting GHCI
2022-10-12 10:54:57 +0200 <comerijn> lortabac: Does your package happen to have multiple components? (multiple libraries/1 lib + executable/etc.)?
2022-10-12 10:55:56 +0200 <lortabac> no, the dependency is another package inside the same cabal project
2022-10-12 10:55:57 +0200 <comerijn> lortabac: In case of multiple components (be it libraries+executable or "local" dependencies) short answer: pretty sure you can't right now
2022-10-12 10:56:12 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 264 seconds)
2022-10-12 10:56:22 +0200 <comerijn> Tough luck, ask again in 1 or 2 GHC releases ;)
2022-10-12 10:57:00 +0200 <lortabac> ok, then question number 2: is there a way to save the session in GHCI? :)
2022-10-12 10:57:10 +0200ph88(~ph88@tmo-114-149.customers.d1-online.com) (Read error: Connection reset by peer)
2022-10-12 10:57:30 +0200Vq_Vq
2022-10-12 10:57:36 +0200 <comerijn> No
2022-10-12 10:57:36 +0200 <lortabac> maybe I should make a GHCI script
2022-10-12 11:00:03 +0200ph88(~ph88@2a02:8109:9e00:71d0:99a4:5f0d:c3c4:a4b6)
2022-10-12 11:00:12 +0200cdsmith(~cdsmithma@2001:470:69fc:105::284) (Quit: You have been kicked for being idle)
2022-10-12 11:00:25 +0200 <kuribas> lortabac: what I do sometimes is write preparatory definitions in a file, then load that in ghci using :load
2022-10-12 11:00:47 +0200 <kuribas> lortabac: then when I need to reload code, I can just reload that file.
2022-10-12 11:01:17 +0200 <lortabac> kuribas: good idea
2022-10-12 11:04:09 +0200teo(~teo@user/teo)
2022-10-12 11:04:56 +0200python476(~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7)
2022-10-12 11:06:14 +0200akegalj(~akegalj@93-138-150-2.adsl.net.t-com.hr)
2022-10-12 11:06:32 +0200beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt)
2022-10-12 11:08:31 +0200ph88^(~ph88@2a01:598:a08a:a364:609c:c76c:ab43:af05)
2022-10-12 11:09:46 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 11:12:19 +0200ph88^(~ph88@2a01:598:a08a:a364:609c:c76c:ab43:af05) (Read error: Connection reset by peer)
2022-10-12 11:12:24 +0200ph88(~ph88@2a02:8109:9e00:71d0:99a4:5f0d:c3c4:a4b6) (Ping timeout: 264 seconds)
2022-10-12 11:12:59 +0200bahamas(~lucian@188.24.138.239)
2022-10-12 11:13:41 +0200ph88(~ph88@2a02:8109:9e00:71d0:5fa:f382:b264:895c)
2022-10-12 11:14:23 +0200ft(~ft@p3e9bc57b.dip0.t-ipconnect.de) (Quit: leaving)
2022-10-12 11:17:51 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-12 11:18:19 +0200bahamas(~lucian@188.24.138.239) (Quit: leaving)
2022-10-12 11:18:33 +0200bahamas(~lucian@188.24.138.239)
2022-10-12 11:18:54 +0200ph88^(~ph88@2a02:8109:9e00:71d0:e513:9d48:6006:c331)
2022-10-12 11:19:35 +0200ph88^(~ph88@2a02:8109:9e00:71d0:e513:9d48:6006:c331) (Read error: Connection reset by peer)
2022-10-12 11:19:58 +0200ph88^(~ph88@2a02:8109:9e00:71d0:e513:9d48:6006:c331)
2022-10-12 11:21:07 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 248 seconds)
2022-10-12 11:24:23 +0200ph88(~ph88@2a02:8109:9e00:71d0:5fa:f382:b264:895c) (Ping timeout: 268 seconds)
2022-10-12 11:35:18 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 11:40:03 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-10-12 11:40:57 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-12 11:42:42 +0200bahamas(~lucian@188.24.138.239) (Ping timeout: 264 seconds)
2022-10-12 11:44:55 +0200Kaiepi(~Kaiepi@142.68.249.28) (Quit: Leaving)
2022-10-12 11:46:24 +0200zoomer123(~zoomer123@24.133.173.162)
2022-10-12 11:46:37 +0200mesaoptimizer(apotheosis@user/PapuaHardyNet)
2022-10-12 11:50:43 +0200Kaiepi(~Kaiepi@142.68.249.28)
2022-10-12 11:51:50 +0200zoomer123(~zoomer123@24.133.173.162) (Quit: Client closed)
2022-10-12 11:53:14 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 11:57:34 +0200yvan-sraka(~yvan-srak@2a01:c23:5c26:be00:42ca:3e4b:6bf7:d95c) (Remote host closed the connection)
2022-10-12 11:59:15 +0200yvan-sraka(~yvan-srak@2a01:c23:5c26:be00:24a:f977:8936:5aea)
2022-10-12 11:59:17 +0200Putonlalla(~Putonlall@it-cyan.it.jyu.fi)
2022-10-12 12:00:29 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-12 12:01:02 +0200Franciman(~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
2022-10-12 12:05:19 +0200Kaiepi(~Kaiepi@142.68.249.28) (Read error: Connection reset by peer)
2022-10-12 12:08:47 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 268 seconds)
2022-10-12 12:09:32 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b) (Remote host closed the connection)
2022-10-12 12:09:42 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
2022-10-12 12:11:21 +0200comerijn(~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
2022-10-12 12:14:23 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 12:14:33 +0200pyrogenum(~pyrogenum@218.90.254.84.ftth.as8758.net)
2022-10-12 12:15:38 +0200Kaiepi(~Kaiepi@142.68.249.28)
2022-10-12 12:17:27 +0200nate1(~nate@98.45.169.16)
2022-10-12 12:18:48 +0200bahamas(~lucian@188.24.138.239)
2022-10-12 12:19:54 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 264 seconds)
2022-10-12 12:22:18 +0200nate1(~nate@98.45.169.16) (Ping timeout: 264 seconds)
2022-10-12 12:23:12 +0200bahamas(~lucian@188.24.138.239) (Ping timeout: 264 seconds)
2022-10-12 12:24:10 +0200_xor(~xor@74.215.182.83) (Ping timeout: 268 seconds)
2022-10-12 12:25:41 +0200raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-10-12 12:25:44 +0200_xor(~xor@74.215.182.83)
2022-10-12 12:29:21 +0200h4|80(~h4|80@194.224.213.145)
2022-10-12 12:29:56 +0200 <pyrogenum> Hi there! Is there someone who has experience with named (fifo) pipes in Haskell? I need to make use of some nodejs library and I think it makes sense to do the communication via pipes. The problem is that things in System.IO are non-blocking, for instance readFile "test.fifo" will just return nothing when nobody is writing into the pipe, rather
2022-10-12 12:29:57 +0200 <pyrogenum> than wait for data (until hitting an eof) character. I have managed to make things work by using blocking IO from System.Posix.IO but this seems to block the entire Haskell runtime and now things like forkIO don't do what I want them to do (also Ctrl-C to kill the process don't work). Thanks a lot for any help :-)
2022-10-12 12:31:43 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 268 seconds)
2022-10-12 12:33:37 +0200__monty__(~toonn@user/toonn)
2022-10-12 12:34:11 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 12:34:55 +0200zxrom(~zxrom@mm-232-14-212-37.vitebsk.dynamic.pppoe.byfly.by) (Leaving)
2022-10-12 12:35:52 +0200CiaoSen(~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2022-10-12 12:37:47 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net)
2022-10-12 12:38:29 +0200severen(~severen@202.36.179.72)
2022-10-12 12:39:35 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-12 12:41:29 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-10-12 12:42:23 +0200califax(~califax@user/califx)
2022-10-12 12:43:19 +0200L29Ah(~L29Ah@wikipedia/L29Ah) (Ping timeout: 268 seconds)
2022-10-12 12:43:29 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-10-12 12:46:55 +0200 <dminuoso> pyrogenum: Use the threaded runtime
2022-10-12 12:50:23 +0200 <dminuoso> pyrogenum: also note, you're probably better off just spawning a worker thread instead.
2022-10-12 12:50:32 +0200 <dminuoso> while using the non-blocking API
2022-10-12 12:50:42 +0200_xor(~xor@74.215.182.83) (Quit: WeeChat 3.6)
2022-10-12 12:51:17 +0200 <dminuoso> So lets talk about `forkIO` perhaps. How does it not do what you want?
2022-10-12 12:53:09 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 12:55:14 +0200fserucas_(~fserucas@74.47.115.89.rev.vodafone.pt)
2022-10-12 12:55:36 +0200 <pyrogenum> Thanks for your answers. I have a function getPipeResult :: String -> IO String which does the blocking write and read things and in main I am now joining `forkIO $ getPipeResult "..." >>= putStrLn` and then `callCommand "node processing.js"` (which reads the pipes on the other side). This does not work. What does work is if I just start node in a
2022-10-12 12:55:37 +0200 <pyrogenum> seperate terminal after starting the Haskell program.
2022-10-12 12:55:46 +0200yvan-sraka(~yvan-srak@2a01:c23:5c26:be00:24a:f977:8936:5aea) (Ping timeout: 244 seconds)
2022-10-12 12:56:29 +0200fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Read error: Connection reset by peer)
2022-10-12 13:00:52 +0200troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-10-12 13:01:55 +0200nate1(~nate@98.45.169.16)
2022-10-12 13:04:32 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-12 13:04:44 +0200thyriaen(~thyriaen@2a01:aea0:dd4:463c:6245:cbff:fe9f:48b1)
2022-10-12 13:05:26 +0200 <dminuoso> Can you share the code in its entirety, perhaps?
2022-10-12 13:05:39 +0200severen(~severen@202.36.179.72) (Ping timeout: 248 seconds)
2022-10-12 13:06:12 +0200xff0x(~xff0x@ai071162.d.east.v6connect.net)
2022-10-12 13:06:40 +0200nate1(~nate@98.45.169.16) (Ping timeout: 246 seconds)
2022-10-12 13:09:24 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-12 13:09:35 +0200michalz(~michalz@185.246.207.222)
2022-10-12 13:10:01 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-10-12 13:11:23 +0200h4|80(~h4|80@194.224.213.145) (Quit: Client closed)
2022-10-12 13:11:35 +0200 <pyrogenum> Sure: https://pastebin.mozilla.org/VxSvjJ6H (the javascript thing on the other side is just an infinite loop which reads the input, does something to it and sends it back).
2022-10-12 13:13:11 +0200 <pyrogenum> Apologies for using several unqualified imports, I hope it isn't too unclear which functions belong to which libraries.
2022-10-12 13:14:30 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds)
2022-10-12 13:14:34 +0200yvan-sraka(~yvan-srak@2a01:c23:5c26:be00:7180:da3e:16dd:f885)
2022-10-12 13:15:00 +0200 <dminuoso> Okay one thing that immediately comes to mind, you should usually not use readFile, especially not here.
2022-10-12 13:15:04 +0200 <dminuoso> Skip the forkIO
2022-10-12 13:16:52 +0200 <dminuoso> Or maybe not mmm.
2022-10-12 13:17:45 +0200 <dminuoso> pyrogenum: Can you include callCommand as well?
2022-10-12 13:18:03 +0200 <dminuoso> Oh hold on, thats from System.Process isnt it
2022-10-12 13:18:27 +0200 <pyrogenum> I guess you are saying that readFile is bad because things will be evaluated lazily which will behave terribly with OS operations.
2022-10-12 13:18:42 +0200 <pyrogenum> Yes, it is.
2022-10-12 13:19:14 +0200 <dminuoso> Yeah, in this particular spot it probably isnt a problem, just pointing it out
2022-10-12 13:19:47 +0200 <dminuoso> pyrogenum: So whats the behavior of this program? Will it block at all?
2022-10-12 13:21:00 +0200 <pyrogenum> It does block, but it doesn't produce any output. I'll check quickly whether something arrives on the javascript side.
2022-10-12 13:21:11 +0200 <dminuoso> Note, that one big problem with the way you are using forkIO, is that exceptions in the separate thread will be silent. So if for some reason callCommand fails, you will not know that it does.
2022-10-12 13:21:43 +0200 <dminuoso> I suspect it will fail opening the write side with ENXIO
2022-10-12 13:22:24 +0200 <dminuoso> If memory serves right, the reader has to open the fifo before the writer can open it
2022-10-12 13:22:40 +0200bahamas(~lucian@188.24.138.239)
2022-10-12 13:22:48 +0200 <dminuoso> And ditch the forkIO here.
2022-10-12 13:23:10 +0200 <dminuoso> (Just as a quick step to validate my theory)
2022-10-12 13:23:24 +0200 <dminuoso> If Im right, you have to rather forkIO the *reading* side first, and then start the command.
2022-10-12 13:23:43 +0200 <dminuoso> With some sort of synchronization
2022-10-12 13:25:32 +0200 <dminuoso> Or you have to repeatedly try and open for writing, perhaps with some sort of delay and a counter.
2022-10-12 13:25:38 +0200 <pyrogenum> The weird thing is though that it does work if I'm starting the processes in two separate terminals. Your memory does serve you right but if one writes in blocking mode then things block until it's possible to write (maybe the point is though that following this approach is inadvisable).
2022-10-12 13:26:44 +0200 <dminuoso> Mmm, I guess defaultFileFlags has nonBlock = False then
2022-10-12 13:26:52 +0200 <pyrogenum> Yes!
2022-10-12 13:27:37 +0200bahamas(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-12 13:28:06 +0200 <pyrogenum> Your idea with repeatedly trying things is also on option though which would avoid having to go down to Posix.System.IO and staying in System.IO.
2022-10-12 13:33:05 +0200CiaoSen(~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-10-12 13:36:06 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-12 13:45:42 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2022-10-12 13:47:31 +0200frost(~frost@user/frost) (Quit: Client closed)
2022-10-12 13:47:37 +0200akegalj(~akegalj@93-138-150-2.adsl.net.t-com.hr) (Quit: leaving)
2022-10-12 13:53:20 +0200 <pyrogenum> I managed to resolve this with the help of one of your comments. The solution was to apply `forkIO` to both the `callCommand` part and the `getPipeResult` which does the blocking IO. I don't quite understand why it makes a difference whether `getPipeResult` runs in the main thread or a forked one but more reading should help. Anyway, thanks a lot!
2022-10-12 13:56:40 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-12 14:03:25 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 14:05:27 +0200bahamas(~lucian@188.24.138.239)
2022-10-12 14:09:58 +0200kenran(~user@user/kenran) (Remote host closed the connection)
2022-10-12 14:10:25 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-10-12 14:12:06 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-10-12 14:12:07 +0200bahamas(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-12 14:12:31 +0200jmorris(uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-10-12 14:13:58 +0200yezariaely(~yezariael@dslb-188-110-202-237.188.110.pools.vodafone-ip.de)
2022-10-12 14:14:31 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-12 14:15:27 +0200Midjak(~Midjak@82.66.147.146)
2022-10-12 14:17:02 +0200Kaiepi(~Kaiepi@142.68.249.28) (Quit: Leaving)
2022-10-12 14:17:20 +0200Kaiepi(~Kaiepi@142.68.249.28)
2022-10-12 14:17:49 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-10-12 14:19:08 +0200Tuplanolla(~Tuplanoll@91-159-69-34.elisa-laajakaista.fi)
2022-10-12 14:23:19 +0200yvan-sraka(~yvan-srak@2a01:c23:5c26:be00:7180:da3e:16dd:f885) (Remote host closed the connection)
2022-10-12 14:25:02 +0200severen(~severen@202.36.179.72)
2022-10-12 14:26:30 +0200infinity0(~infinity0@185.112.146.113) (Remote host closed the connection)
2022-10-12 14:29:01 +0200bahamas(~lucian@188.24.138.239)
2022-10-12 14:30:17 +0200Franciman(~Franciman@mx1.fracta.dev)
2022-10-12 14:31:22 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2022-10-12 14:33:25 +0200infinity0(~infinity0@pwned.gg)
2022-10-12 14:35:44 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-10-12 14:36:17 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-12 14:37:52 +0200pyrogenum(~pyrogenum@218.90.254.84.ftth.as8758.net) (Quit: Client closed)
2022-10-12 14:38:46 +0200severen(~severen@202.36.179.72) (Quit: WeeChat 3.7)
2022-10-12 14:39:24 +0200bahamaselbear
2022-10-12 14:42:59 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-12 14:45:02 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Remote host closed the connection)
2022-10-12 14:45:28 +0200infinity0(~infinity0@pwned.gg) (Remote host closed the connection)
2022-10-12 14:45:40 +0200mimi1vx[m](~osukupmat@2001:470:69fc:105::2:418d)
2022-10-12 14:50:22 +0200infinity0(~infinity0@pwned.gg)
2022-10-12 14:51:25 +0200yvan-sraka(~yvan-srak@2a01:c23:5c26:be00:fdde:672f:bc08:2d38)
2022-10-12 14:59:39 +0200yvan-sraka(~yvan-srak@2a01:c23:5c26:be00:fdde:672f:bc08:2d38) (Remote host closed the connection)
2022-10-12 15:06:58 +0200kuribas(~user@silversquare.silversquare.eu) (Ping timeout: 268 seconds)
2022-10-12 15:08:05 +0200thegeekinside(~thegeekin@189.180.7.159)
2022-10-12 15:09:02 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-12 15:12:13 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-10-12 15:12:22 +0200infinity0(~infinity0@pwned.gg) (Remote host closed the connection)
2022-10-12 15:13:21 +0200infinity0(~infinity0@pwned.gg)
2022-10-12 15:13:56 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-12 15:16:32 +0200kenran(~user@user/kenran)
2022-10-12 15:16:39 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
2022-10-12 15:18:33 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-10-12 15:22:08 +0200enoq(~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
2022-10-12 15:26:21 +0200tv(~tv@user/tv) (Quit: derp)
2022-10-12 15:26:35 +0200tv(~tv@user/tv)
2022-10-12 15:27:19 +0200infinity0(~infinity0@pwned.gg) (Remote host closed the connection)
2022-10-12 15:28:45 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
2022-10-12 15:29:27 +0200infinity0(~infinity0@pwned.gg)
2022-10-12 15:31:29 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-12 15:35:08 +0200son0p(~ff@181.136.122.143)
2022-10-12 15:37:07 +0200razetime(~quassel@117.193.1.101) (Remote host closed the connection)
2022-10-12 15:41:58 +0200zer0bitz(~zer0bitz@2001:2003:f748:2000:db1:77e1:e1b4:2a85)
2022-10-12 15:44:56 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 15:47:03 +0200libertyprime(~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) (Ping timeout: 268 seconds)
2022-10-12 15:49:50 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2022-10-12 15:50:59 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds)
2022-10-12 15:52:58 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-12 15:59:15 +0200hochata(~user@user/hochata)
2022-10-12 16:02:21 +0200zebrag(~chris@user/zebrag)
2022-10-12 16:02:51 +0200nate1(~nate@98.45.169.16)
2022-10-12 16:07:30 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net)
2022-10-12 16:08:01 +0200nate1(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-12 16:10:01 +0200extratail(~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a)
2022-10-12 16:12:53 +0200shriekingnoise(~shrieking@186.137.167.202)
2022-10-12 16:15:34 +0200nate1(~nate@98.45.169.16)
2022-10-12 16:17:00 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-10-12 16:17:00 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-10-12 16:17:01 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-12 16:17:22 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-12 16:17:46 +0200califax(~califax@user/califx)
2022-10-12 16:17:48 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-10-12 16:21:11 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
2022-10-12 16:22:33 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net)
2022-10-12 16:24:38 +0200Sgeo(~Sgeo@user/sgeo)
2022-10-12 16:27:25 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 252 seconds)
2022-10-12 16:30:38 +0200elbear(~lucian@188.24.138.239)
2022-10-12 16:31:27 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
2022-10-12 16:39:30 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-12 16:42:06 +0200ph88^(~ph88@2a02:8109:9e00:71d0:e513:9d48:6006:c331) (Ping timeout: 264 seconds)
2022-10-12 16:47:01 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Quit: Leaving)
2022-10-12 16:47:58 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-10-12 16:48:42 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-12 16:52:48 +0200elbear(~lucian@188.24.138.239)
2022-10-12 16:58:13 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 252 seconds)
2022-10-12 17:00:56 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2022-10-12 17:01:28 +0200razetime(~quassel@117.193.1.101)
2022-10-12 17:02:23 +0200vorpuni(~pvorp@2001:861:3881:c690:c0fe:bc56:314c:dc44)
2022-10-12 17:04:14 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:a1ca:b5f2:64f1:4de6) (Quit: WeeChat 2.8)
2022-10-12 17:05:06 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-10-12 17:08:29 +0200hochata(~user@user/hochata) (Ping timeout: 268 seconds)
2022-10-12 17:09:06 +0200qwedfg(~qwedfg@user/qwedfg) (Ping timeout: 268 seconds)
2022-10-12 17:09:52 +0200ph88(~ph88@2a02:8109:9e00:71d0:a043:fa0a:d378:15c4)
2022-10-12 17:10:35 +0200allbery_b(~geekosaur@xmonad/geekosaur)
2022-10-12 17:10:35 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2022-10-12 17:10:38 +0200allbery_bgeekosaur
2022-10-12 17:10:38 +0200kenran(~user@user/kenran) (Remote host closed the connection)
2022-10-12 17:11:03 +0200thegeekinside(~thegeekin@189.180.7.159) (Remote host closed the connection)
2022-10-12 17:11:48 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 264 seconds)
2022-10-12 17:13:46 +0200ColereSauvin
2022-10-12 17:19:33 +0200nate1(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-12 17:21:07 +0200 <zero> i just found a delicious comment on r/haskell:
2022-10-12 17:21:10 +0200 <zero> I think Haskell excels in supporting a healthy programming life style. It's slow compilation allows for ample breaks, walk outs and focusing eyes at a remote point outside of a screen.
2022-10-12 17:21:42 +0200yvan-sraka(~yvan-srak@2a01:c23:5c26:be00:187b:414e:bfdd:8cf2)
2022-10-12 17:22:17 +0200 <tdammers> it also helps prevent balding from pulling your hair out every other hour
2022-10-12 17:22:29 +0200raym(~aritra@user/raym) (Ping timeout: 250 seconds)
2022-10-12 17:24:12 +0200raym(~aritra@user/raym)
2022-10-12 17:27:03 +0200elbear(~lucian@188.24.138.239)
2022-10-12 17:28:47 +0200yvan-sraka(~yvan-srak@2a01:c23:5c26:be00:187b:414e:bfdd:8cf2) (Remote host closed the connection)
2022-10-12 17:30:13 +0200CiaoSen(~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2022-10-12 17:34:49 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-10-12 17:35:48 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-10-12 17:36:41 +0200califax(~califax@user/califx)
2022-10-12 17:40:46 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-12 17:42:47 +0200zns(~zns@user/zns)
2022-10-12 17:43:33 +0200nschoe(~q@141.101.51.197) (Ping timeout: 268 seconds)
2022-10-12 17:44:23 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-12 17:46:19 +0200ph88(~ph88@2a02:8109:9e00:71d0:a043:fa0a:d378:15c4) (Quit: Leaving)
2022-10-12 17:46:31 +0200talismanick(~talismani@2601:200:c100:c9e0::1b0b)
2022-10-12 17:47:27 +0200 <olivermead[m]> remember the 20:20:20 rule, every 20 minutes look at something 20m away from the office and spend 20 years off grid in the woods
2022-10-12 17:54:10 +0200zns(~zns@user/zns) (Quit: zzz)
2022-10-12 17:54:30 +0200 <tdammers> or the 80:20 rule: perform 80% for 20 years, after that just look busy
2022-10-12 17:54:43 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.6)
2022-10-12 17:57:28 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-10-12 17:58:14 +0200ph88(~ph88@2a02:8109:9e00:71d0:98bd:c30c:40c9:b06f)
2022-10-12 17:58:41 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-12 17:59:14 +0200fserucas_(~fserucas@74.47.115.89.rev.vodafone.pt) (Quit: Leaving)
2022-10-12 18:02:09 +0200 <olivermead[m]> reach ~80% in a logarithmic growth then taper linearly to 20% after 20 days, repeat
2022-10-12 18:02:18 +0200Pickchea(~private@user/pickchea)
2022-10-12 18:02:54 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-10-12 18:03:17 +0200ph88(~ph88@2a02:8109:9e00:71d0:98bd:c30c:40c9:b06f) (Ping timeout: 268 seconds)
2022-10-12 18:03:49 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 246 seconds)
2022-10-12 18:04:34 +0200Natch(~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se)
2022-10-12 18:04:44 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 18:04:45 +0200spacenautx(~spacenaut@user/spacenautx)
2022-10-12 18:05:52 +0200zns(~zns@user/zns)
2022-10-12 18:07:14 +0200ph88(~ph88@ip5f5af71f.dynamic.kabel-deutschland.de)
2022-10-12 18:07:41 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-12 18:09:25 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 246 seconds)
2022-10-12 18:10:17 +0200yezariaely(~yezariael@dslb-188-110-202-237.188.110.pools.vodafone-ip.de) (Quit: Leaving)
2022-10-12 18:12:00 +0200python476(~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7) (Ping timeout: 268 seconds)
2022-10-12 18:19:36 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-12 18:20:01 +0200elbear(~lucian@188.24.138.239)
2022-10-12 18:20:04 +0200chele(~chele@user/chele) (Remote host closed the connection)
2022-10-12 18:21:21 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2022-10-12 18:24:52 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-12 18:26:18 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 18:27:49 +0200thegeekinside(~thegeekin@189.180.7.159)
2022-10-12 18:30:01 +0200Everything(~Everythin@37.115.210.35)
2022-10-12 18:30:03 +0200 <EvanR> @tell kuribas re: functional on JVM... Frege
2022-10-12 18:30:03 +0200 <lambdabot> Consider it noted.
2022-10-12 18:30:20 +0200ph88(~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) (Quit: Leaving)
2022-10-12 18:30:28 +0200finsternis(~X@23.226.237.192) (Read error: Connection reset by peer)
2022-10-12 18:32:35 +0200yvan-sraka(~yvan-srak@31-196-142-46.pool.kielnet.net)
2022-10-12 18:34:11 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 248 seconds)
2022-10-12 18:34:44 +0200MajorBiscuit(~MajorBisc@145.94.164.10) (Ping timeout: 268 seconds)
2022-10-12 18:35:22 +0200tempuser_(~archie@2804:214:8617:700:4d1d:352d:668a:1b70)
2022-10-12 18:35:22 +0200yvan-sraka(~yvan-srak@31-196-142-46.pool.kielnet.net) (Remote host closed the connection)
2022-10-12 18:37:07 +0200extratail(~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a) (Read error: Connection reset by peer)
2022-10-12 18:37:20 +0200yvan-sraka(~yvan-srak@31-196-142-46.pool.kielnet.net)
2022-10-12 18:39:06 +0200vn36(~vn36@123.63.203.210)
2022-10-12 18:40:35 +0200vn36(~vn36@123.63.203.210) (Client Quit)
2022-10-12 18:42:13 +0200teo(~teo@user/teo) (Ping timeout: 268 seconds)
2022-10-12 18:43:10 +0200yvan-sraka(~yvan-srak@31-196-142-46.pool.kielnet.net) (Remote host closed the connection)
2022-10-12 18:43:19 +0200 <EvanR> the Frege README says the following is a pure function: greeting friend = "Hello, " ++ friend ++ "!"
2022-10-12 18:43:45 +0200 <EvanR> and the following is an impure function because it returns IO (): main args = println (greeting "World")
2022-10-12 18:44:07 +0200 <EvanR> making me thonk
2022-10-12 18:47:05 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-10-12 18:47:18 +0200 <EvanR> impure and laziness is supposed to be an unstable toxic mixture
2022-10-12 18:48:14 +0200yvan-sraka(~yvan-srak@31-196-142-46.pool.kielnet.net)
2022-10-12 18:55:33 +0200elbear(~lucian@188.24.138.239)
2022-10-12 18:57:41 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-10-12 18:58:09 +0200 <ski> .. confused terminology
2022-10-12 18:58:20 +0200 <geekosaur> as I understand it, it's not unstable or toxic, it just negates the advantages of laziness because you lose all the optimization possibilities
2022-10-12 18:58:54 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b)
2022-10-12 18:59:30 +0200 <EvanR> oh, maybe there is a way to define the evaluation so the effects you want somehow do happen? once?
2022-10-12 18:59:52 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-12 19:00:07 +0200 <EvanR> in some predictable order, perhaps backwards
2022-10-12 19:00:37 +0200 <davean> EvanR: Infact that is exactly how IO works
2022-10-12 19:00:55 +0200yvan-sraka(~yvan-srak@31-196-142-46.pool.kielnet.net) (Remote host closed the connection)
2022-10-12 19:01:00 +0200 <davean> it just has a chain of dependencies
2022-10-12 19:01:04 +0200 <davean> through the monad
2022-10-12 19:01:09 +0200 <EvanR> all I know about that is ReadWorld is deeply magical
2022-10-12 19:01:16 +0200 <geekosaur> in fact it's not
2022-10-12 19:01:18 +0200 <EvanR> s/Read/Real/
2022-10-12 19:01:19 +0200 <davean> newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #))
2022-10-12 19:01:27 +0200 <davean> Its not magical at all
2022-10-12 19:01:35 +0200 <geekosaur> it's just a phantoom dependency that ensures IO happens in order
2022-10-12 19:01:36 +0200 <davean> Its exactly a dependency
2022-10-12 19:01:53 +0200 <davean> which is also why they lie when they claim that example is impure
2022-10-12 19:02:00 +0200 <EvanR> is this an example of messing up optimizations like geekosaur said
2022-10-12 19:02:08 +0200 <geekosaur> no
2022-10-12 19:02:22 +0200 <davean> well it sorta prevents optimizations.
2022-10-12 19:02:29 +0200 <geekosaur> it does mean you can't for example do let-hoisting through IO
2022-10-12 19:02:41 +0200 <geekosaur> whereas you can if IO isn't involved (or ST or STM)
2022-10-12 19:03:03 +0200 <davean> The chain of RealWorlds locks everything in place
2022-10-12 19:03:13 +0200 <davean> because they are ACTUALLY LOCKED IN PLACE
2022-10-12 19:03:24 +0200 <davean> There is no optimization to do in the face of them
2022-10-12 19:03:35 +0200yvan-sraka(~yvan-srak@31-196-142-46.pool.kielnet.net)
2022-10-12 19:04:09 +0200 <EvanR> so the function contained in that IO is an impure function? what's going on
2022-10-12 19:04:51 +0200 <davean> why do you think there is impurity, other than Frege lieing to you?
2022-10-12 19:05:02 +0200 <EvanR> asking about haskell
2022-10-12 19:05:03 +0200 <[exa]> EvanR: it is perfectly pure in haskell, but the runtime interprets it as something impure
2022-10-12 19:05:39 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 268 seconds)
2022-10-12 19:05:47 +0200 <[exa]> (in haskell. I have no idea about Frege and I'm kinda surprised that the project still goes on)
2022-10-12 19:05:56 +0200 <geekosaur> you can think of Haskell as building a pure chain of actions which the runtime executes possibly impurely
2022-10-12 19:06:28 +0200 <davean> [exa]: Frege isn't anything but a GHC fork they changed the name of and tried to build a brand around?
2022-10-12 19:06:32 +0200 <geekosaur> linked together by data dependencies including the dependency on RealWorld injected by the IO monad
2022-10-12 19:06:41 +0200 <EvanR> e.g. the guts of getChar is a function which takes a dummy dependency, does the systemcall, and returns a new dep and a char?
2022-10-12 19:06:59 +0200 <davean> EvanR: that is what basicly happens.
2022-10-12 19:07:17 +0200 <[exa]> whew wait they forked ghc???
2022-10-12 19:07:17 +0200 <EvanR> interesting
2022-10-12 19:07:34 +0200 <davean> [exa]: yes? I mean blame SPJ and such for that, and refusing to accept new backends?
2022-10-12 19:07:58 +0200 <davean> Its not like they had a choice
2022-10-12 19:08:05 +0200yvan-sraka(~yvan-srak@31-196-142-46.pool.kielnet.net) (Remote host closed the connection)
2022-10-12 19:08:20 +0200 <davean> You might notice like no one would accept GHCJS for a decade too
2022-10-12 19:08:22 +0200 <[exa]> Languages: Java 29% Frege 68%
2022-10-12 19:08:26 +0200 <[exa]> ok likely not a fork
2022-10-12 19:08:41 +0200 <[exa]> that would be one piece of effort back in 2014 :D
2022-10-12 19:09:53 +0200 <[exa]> EvanR: anyway you were kinda right that it's magic. Internally RealWorld is afaik either Void# or (# #) or something like that, and # is by definition a MagicHash!
2022-10-12 19:09:55 +0200 <davean> [exa]: I mean GHCJS was before 2014 and is
2022-10-12 19:10:46 +0200 <EvanR> the RealWorld is less magical than this function which when applied causes side effects xD
2022-10-12 19:10:53 +0200 <EvanR> shattering my haskell worldview
2022-10-12 19:11:17 +0200 <davean> I COULD be mixing up my Haskell on JVMs
2022-10-12 19:11:31 +0200 <geekosaur> there is one piece of magic: codegen realizes RealWorld# has a 0-length representation and removes it from the code
2022-10-12 19:11:52 +0200 <[exa]> EvanR: you can't apply it because there's no way to get the RealWorld for it (except obviously for unsafeBreakEverythingAlsoBurnifyPerformIO)
2022-10-12 19:12:07 +0200 <EvanR> yes it's behind the scenes
2022-10-12 19:12:08 +0200 <davean> oh I think I am, sorry [exa] I think i mean eta
2022-10-12 19:12:30 +0200 <[exa]> davean: ok good I was suspecting a mix-up :D
2022-10-12 19:12:56 +0200 <geekosaur> I have to say I don't blame the ghc devs much for refusing to accept new backends
2022-10-12 19:13:15 +0200 <geekosaur> they really need a rule saying "we accept <x> only if it comes with at least one maintainer"
2022-10-12 19:13:15 +0200 <EvanR> i saw a different way to do the guts involving primitive IO bind chains, like a free monad ish
2022-10-12 19:13:23 +0200 <geekosaur> otherwise you get e.g. DPH
2022-10-12 19:13:31 +0200 <[exa]> davean: btw eta project is alive or not?
2022-10-12 19:13:49 +0200 <davean> [exa]: oh dead
2022-10-12 19:14:07 +0200 <davean> Trying to make a company out of that sort of thing is hard
2022-10-12 19:14:46 +0200 <[exa]> ah.
2022-10-12 19:15:39 +0200 <EvanR> since the idea that frege is lying seems to be based on it being GHC... I go back to square 1 xD
2022-10-12 19:15:51 +0200 <geekosaur> EvanR, there's several ways to do it. Hugs used a different one from GHC IIRC
2022-10-12 19:16:06 +0200hochata(~user@user/hochata)
2022-10-12 19:16:20 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-10-12 19:16:57 +0200 <[exa]> EvanR: I'd still say it's better than in ye olden dayes when patternmatching a list caused this impure operation
2022-10-12 19:18:13 +0200 <EvanR> that sounds fun
2022-10-12 19:18:23 +0200 <EvanR> to explain
2022-10-12 19:19:18 +0200 <[exa]> well, you don't need monads then
2022-10-12 19:19:42 +0200 <davean> oh it was just a lazy list of input, transformed into a lazy list of outputs
2022-10-12 19:19:51 +0200 <[exa]> yap
2022-10-12 19:20:10 +0200 <ski> (Mercury does the same with FFI calls, does a `IO = IO0;' .. e.g. <https://lists.mercurylang.org/archives/users/2022-September/009675.html>)
2022-10-12 19:20:12 +0200 <EvanR> or was it a lazy list of responses transformed into a lazy list of requests
2022-10-12 19:20:22 +0200 <johnjaye> i've heard there are companies based on haskell
2022-10-12 19:20:31 +0200 <geekosaur> [Response] -> [Request]
2022-10-12 19:20:35 +0200 <[exa]> (LazyByteString can still do the same right?)
2022-10-12 19:20:38 +0200 <johnjaye> one time a guy told me he works in the military on jets and uses it
2022-10-12 19:20:43 +0200 <geekosaur> with the initial Response being the parameters, I think?
2022-10-12 19:20:53 +0200 <EvanR> that's so wacky I love it
2022-10-12 19:20:54 +0200 <geekosaur> unsafeInterleaveIO
2022-10-12 19:21:04 +0200 <davean> johnjaye: A decent number, but thats different than selling a compiler and ecosystem
2022-10-12 19:21:06 +0200 <EvanR> your program and the world form an ouroboros
2022-10-12 19:21:19 +0200 <johnjaye> oh you meant ghc itself
2022-10-12 19:21:28 +0200 <geekosaur> but $SOMEONE help you if you get out of sync
2022-10-12 19:21:36 +0200 <johnjaye> yeah that's more of a fuzzy thing. bug having a company to 'back' the ecosystem can be good sometimes
2022-10-12 19:21:39 +0200 <[exa]> johnjaye: there are really good tools for generating safe static code with haskell, which might be a good usecase there
2022-10-12 19:21:46 +0200 <johnjaye> like ubuntu and canonical or redhat and fedora/qemu/misc things
2022-10-12 19:22:04 +0200 <davean> johnjaye: it can be, but bootstrapping it from scratch by calling it "not haskell" makes your life harder.
2022-10-12 19:22:22 +0200 <davean> Note that like RH claims to be selling you linux support
2022-10-12 19:22:23 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 19:22:55 +0200 <EvanR> I've heard companies using haskell need to retain a "haskell professor". Which kind of sounds more expensive than a subscription to GHC tech support
2022-10-12 19:23:02 +0200 <dminuoso> I found, when you want XYZ support, its best to just hire or train someone to be competent in XYZ.
2022-10-12 19:23:05 +0200 <johnjaye> so a company couldn't call itself Haskell Inc and take over ghc and run things?
2022-10-12 19:23:06 +0200dminuososhrugs
2022-10-12 19:23:10 +0200 <ski> (iiuc, the main problem, from a theoretical standpoint, with the `State# RealWorld', is that it doesn't really account for exceptions, concurrency)
2022-10-12 19:23:17 +0200 <ski> EvanR : "i saw a different way to do the guts involving primitive IO bind chains, like a free monad ish" -- elaborate ?
2022-10-12 19:23:25 +0200 <dminuoso> johnjaye: To be fair, Well Typed is just that. :p
2022-10-12 19:23:31 +0200 <ski> geekosaur : yes, with explicit exception continuation, iirc
2022-10-12 19:24:05 +0200 <EvanR> way 1 is in the idris implementation, way 2 was in a talk by ekmett which might be what they did in (proprietary language). I can try to find links
2022-10-12 19:24:11 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-12 19:24:18 +0200 <ski> no the `type Dialogue = [Response] -> [Request]' was the pre-monadic way
2022-10-12 19:24:29 +0200 <geekosaur> Ermine?
2022-10-12 19:25:25 +0200 <ski> (basically coding in `Cont Dialogue' .. except with no `Cont', manual plumbing (sometimes with an alternative continuation, for failure))
2022-10-12 19:25:58 +0200 <ski> @type interact
2022-10-12 19:25:59 +0200 <lambdabot> (String -> String) -> IO ()
2022-10-12 19:29:53 +0200 <ski> @hoogle f a -> (a -> b) -> f b
2022-10-12 19:29:54 +0200 <lambdabot> Data.Functor (<&>) :: Functor f => f a -> (a -> b) -> f b
2022-10-12 19:29:54 +0200 <lambdabot> Control.Lens.Lens (<&>) :: Functor f => f a -> (a -> b) -> f b
2022-10-12 19:29:54 +0200 <lambdabot> Control.Lens.Operators (<&>) :: Functor f => f a -> (a -> b) -> f b
2022-10-12 19:30:01 +0200 <ski> @hoogle f (a -> b) -> a -> f b
2022-10-12 19:30:03 +0200 <lambdabot> Control.Lens.Lens (??) :: Functor f => f (a -> b) -> a -> f b
2022-10-12 19:30:03 +0200 <lambdabot> Control.Lens.Operators (??) :: Functor f => f (a -> b) -> a -> f b
2022-10-12 19:30:03 +0200 <lambdabot> Diagrams.Prelude (??) :: Functor f => f (a -> b) -> a -> f b
2022-10-12 19:30:12 +0200 <ski> @hoogle (a -> f b) -> f (a -> b)
2022-10-12 19:30:13 +0200 <lambdabot> No results found
2022-10-12 19:30:36 +0200 <ski> what could the last one be called ?
2022-10-12 19:30:50 +0200 <ski> `costrength' ??
2022-10-12 19:31:50 +0200 <EvanR> ski, hmm... this is the latest idris 1 https://github.com/idris-lang/Idris-dev/blob/28fa2d88a8620ea6d30ed3a6a282dffec1c4c9cb/libs/prelude…
2022-10-12 19:32:51 +0200zeenk(~zeenk@2a02:2f04:a20a:3e00:5712:52b0:ca1d:bc63) (Quit: Konversation terminated!)
2022-10-12 19:33:40 +0200 <EvanR> they are using some kind of World (which was annoying when you wanted to use this word for your own purposes) in IO too, but they don't have laziness... ... they parameterize over an FFI but don't seem to use it for anything at the value level
2022-10-12 19:33:52 +0200 <EvanR> ok they do have lazy annotation maybe that's why
2022-10-12 19:34:21 +0200 <EvanR> now I go find way 2 which actually involved an ffi
2022-10-12 19:34:28 +0200freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds)
2022-10-12 19:35:14 +0200mbuf(~Shakthi@49.205.87.152) (Quit: Leaving)
2022-10-12 19:37:38 +0200 <ski> hm, seems they don't return a `World' ?
2022-10-12 19:37:47 +0200 <ski> seems a fair bit magical
2022-10-12 19:39:52 +0200 <EvanR> and this is not what I was thinking of for way 2... where the hell is that blog post... https://github.com/ermine-language/ermine/blob/master/stdlib/Prelude/IO/Unsafe.e
2022-10-12 19:40:47 +0200jinsun(~jinsun@user/jinsun)
2022-10-12 19:42:00 +0200 <ski> sorry, which one was way 1 and way 2 ?
2022-10-12 19:46:36 +0200Natch(~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Ping timeout: 264 seconds)
2022-10-12 19:47:30 +0200talismanick(~talismani@2601:200:c100:c9e0::1b0b) (Ping timeout: 268 seconds)
2022-10-12 19:48:01 +0200 <EvanR> doesn't matter because I wouldn't find either
2022-10-12 19:48:26 +0200Natch(~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se)
2022-10-12 19:50:10 +0200razetime(~quassel@117.193.1.101) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-10-12 19:50:21 +0200freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-10-12 19:55:19 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-12 19:55:19 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-12 19:55:19 +0200wroathe(~wroathe@user/wroathe)
2022-10-12 19:55:58 +0200 <EvanR> something like, ConstructorName :: ffi i o -> i -> (o -> IO a) -> IO a
2022-10-12 19:56:33 +0200 <dolio> hbc might have worked something like that. I've never looked at it in detail.
2022-10-12 19:59:43 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-12 20:00:15 +0200HP-UXLinux
2022-10-12 20:01:57 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 20:03:23 +0200 <dolio> I guess it's just the Cont Dialogue thing.
2022-10-12 20:03:37 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-12 20:06:11 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 260 seconds)
2022-10-12 20:06:39 +0200 <ski> EvanR : that does sound similar to `newtype IO a = MkIO ((a -> IOResult) -> IOResult)' with `data IOResult = Done | PutChar Char IOResult | GetChar (Char -> IOResult) | ...'
2022-10-12 20:08:31 +0200econo(uid147250@user/econo)
2022-10-12 20:08:45 +0200 <EvanR> yes. but there was this edk tweak which simplified it further, and the ffi "actions" were not to be interpreted, but implemented as i -> o, and strung together for effects. I think
2022-10-12 20:10:56 +0200 <dolio> EvanR's is a sort of free monad, which Cont is not.
2022-10-12 20:12:34 +0200 <ski> you could easily make a variant `data IO a = Return a | Done | PutChar Char (IO a) | GetChar (Char -> IO a) | ...'
2022-10-12 20:12:56 +0200 <dolio> Essentially it is the free monad generated from the algebraic signature `ffi`.
2022-10-12 20:13:27 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b) (Remote host closed the connection)
2022-10-12 20:14:13 +0200 <dolio> Similar to what you do for algebraic effects.
2022-10-12 20:15:39 +0200elbear(~lucian@188.24.138.239)
2022-10-12 20:25:46 +0200 <EvanR> um https://paste.tomsmeding.com/bN7wwneC
2022-10-12 20:26:10 +0200 <EvanR> this is freemonad ish, yeah
2022-10-12 20:27:25 +0200 <ski> fmap = liftM
2022-10-12 20:27:44 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net)
2022-10-12 20:28:55 +0200 <EvanR> so it is
2022-10-12 20:29:43 +0200 <dolio> Yes, if `ffi` is just an enum GADT that uses i to specify input arity, and o to specify output arity, then this is exactly algebraic effects.
2022-10-12 20:30:20 +0200 <EvanR> \o/
2022-10-12 20:30:56 +0200 <dolio> An `i -> o` operation becomes an `(o -> T) -> (i -> T)` operation, and this is the free monad for that.
2022-10-12 20:31:27 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-10-12 20:32:12 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds)
2022-10-12 20:32:36 +0200 <EvanR> what's T
2022-10-12 20:33:22 +0200 <dolio> T is the model of the algebra. `IO a` is the free model with variables in `a`.
2022-10-12 20:33:59 +0200ski. o O ( ⌜(+),(⊕),(⋅) : 2² → 2¹⌝ )
2022-10-12 20:34:46 +0200 <Franciman> dolio: where did you learn all this model theory?
2022-10-12 20:35:17 +0200 <dolio> Just read the algebraic effects papers.
2022-10-12 20:35:24 +0200 <dolio> Plotkin and Power.
2022-10-12 20:35:30 +0200 <Franciman> thnx
2022-10-12 20:35:44 +0200 <Franciman> plotkin and power seems a nice slogan
2022-10-12 20:35:50 +0200ski. o O ( "Strong functors, strong monads" (slides) by Tarmo Uustalu at <https://cs.ioc.ee/~tarmo/ssgep15/ssgep-1a.pdf>,<https://cs.ioc.ee/~tarmo/ssgep15/> )
2022-10-12 20:36:26 +0200 <Franciman> apparently Moggi's work has faded and made room for many more developments!
2022-10-12 20:36:28 +0200 <Franciman> yay
2022-10-12 20:37:15 +0200hochata(~user@user/hochata) (Read error: Connection reset by peer)
2022-10-12 20:37:39 +0200nschoe(~q@2a01:e0a:8e:a190:2bc1:5610:b26:873c)
2022-10-12 20:38:14 +0200Lycurgus(~juan@user/Lycurgus)
2022-10-12 20:41:01 +0200atwm(~atwm@185.234.70.94)
2022-10-12 20:41:45 +0200ski. o O ( "In the Power Domain Order, they are all Plotkin." )
2022-10-12 20:41:51 +0200 <EvanR> Institute of Cybernetics in Tallinn, nice
2022-10-12 20:42:39 +0200 <EvanR> why couldn't I have have gone to college at a place with a fucking rad name like that
2022-10-12 20:43:38 +0200atwm(~atwm@185.234.70.94) (Remote host closed the connection)
2022-10-12 20:45:06 +0200nschoe(~q@2a01:e0a:8e:a190:2bc1:5610:b26:873c) (Quit: Switching off)
2022-10-12 20:46:40 +0200k``(~user@152.1.137.158)
2022-10-12 20:48:09 +0200LinuxHP-UX
2022-10-12 20:48:21 +0200 <k``> Is the law `mx >> mzero` = `mzero` a mistake/typo? Or should the `IO` and `ReadP` `MonadPlus` instances be removed?
2022-10-12 20:48:22 +0200 <EvanR> ski, what is the relation between strong monads and stuff we were actually talking about xD
2022-10-12 20:49:05 +0200HP-UXSysV
2022-10-12 20:49:06 +0200 <EvanR> > Just 3 >> mzero
2022-10-12 20:49:07 +0200 <lambdabot> Nothing
2022-10-12 20:50:02 +0200 <k``> > print "Hi there" >> mzero
2022-10-12 20:50:04 +0200 <lambdabot> error:
2022-10-12 20:50:04 +0200 <lambdabot> • No instance for (Typeable b0)
2022-10-12 20:50:04 +0200 <lambdabot> arising from a use of ‘show_M36784398342963031606’
2022-10-12 20:51:14 +0200 <k``> > print Nothing >> mzero
2022-10-12 20:51:15 +0200 <lambdabot> error:
2022-10-12 20:51:15 +0200 <lambdabot> • No instance for (Typeable b0)
2022-10-12 20:51:15 +0200 <lambdabot> arising from a use of ‘show_M90845009386314507’
2022-10-12 20:51:21 +0200 <k``> ?
2022-10-12 20:51:26 +0200ski. o O ( "Non-determinism in Functional Languages" by Harald Søndergaard,Peter Sestoft in 1988-08,1992-05 at <http://comjnl.oxfordjournals.org/content/35/5/514.abstract> (mentions Hoare,Smyth,Plotkin / Egli-Milner orderings on power domains ) )
2022-10-12 20:51:35 +0200 <ski> @help run
2022-10-12 20:51:35 +0200 <lambdabot> run <expr>. You have Haskell, 3 seconds and no IO. Go nuts!
2022-10-12 20:51:35 +0200 <k``> > print () >> mzero
2022-10-12 20:51:37 +0200 <lambdabot> error:
2022-10-12 20:51:37 +0200 <lambdabot> • No instance for (Typeable b0)
2022-10-12 20:51:37 +0200 <lambdabot> arising from a use of ‘show_M9476205005181858498’
2022-10-12 20:51:57 +0200 <ski> > print () >> mzero :: IO ()
2022-10-12 20:51:59 +0200 <lambdabot> <IO ()>
2022-10-12 20:52:11 +0200 <EvanR> % print "hello"
2022-10-12 20:52:11 +0200 <yahb2> "hello"
2022-10-12 20:52:18 +0200 <EvanR> % print "hello" >> mzero
2022-10-12 20:52:18 +0200 <yahb2> <interactive>:30:18: error: Variable not in scope: mzero :: IO b
2022-10-12 20:54:06 +0200 <ski> % print "hello" >> Control.Monad.mzero
2022-10-12 20:54:06 +0200 <yahb2> "hello" ; *** Exception: user error (mzero)
2022-10-12 20:54:22 +0200 <ski> @wiki MonadPlus
2022-10-12 20:54:22 +0200 <lambdabot> https://wiki.haskell.org/MonadPlus
2022-10-12 20:54:26 +0200 <ski> @wiki MonadPlus reform proposal
2022-10-12 20:54:26 +0200 <lambdabot> https://wiki.haskell.org/MonadPlus_reform_proposal
2022-10-12 20:54:38 +0200 <ski> k`` : where are you looking ?
2022-10-12 20:54:46 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2022-10-12 20:55:11 +0200 <k``> The description of `MonadPlus` in its Haddoc:
2022-10-12 20:55:25 +0200 <k``> https://hackage.haskell.org/package/base-4.17.0.0/docs/Control-Monad.html#t:MonadPlus
2022-10-12 20:55:50 +0200Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt juan@acm.org)
2022-10-12 20:56:20 +0200 <ski> "The precise set of rules that MonadPlus should obey is not agreed upon."
2022-10-12 20:56:50 +0200SysVQNX
2022-10-12 20:56:55 +0200 <k``> Right. So it could obey some unspecified set of rules, plus the ones that are actually required in the doc.
2022-10-12 20:56:59 +0200 <EvanR> is there an imprecise set of rules it should obey?
2022-10-12 20:57:11 +0200 <k``> Like it doesn't have to satisfy left catch or distribution.
2022-10-12 20:57:17 +0200 <ski> .. also, i'm not really that fond of `MonadPlus IO' (randomly swallowing exceptions doesn't seem too great an idea, to me)
2022-10-12 20:57:24 +0200 <ski> k`` : what's the `ReadP' issue ?
2022-10-12 20:57:49 +0200 <k``> `get ; empty` consumes input.
2022-10-12 20:58:05 +0200 <ski> .. and commits ?
2022-10-12 21:00:22 +0200 <ski> iirc, `ReadP' does parallel parsing (due to Claessen, also see e.g. <https://hackage.haskell.org/package/parsek>), doesn't commit (so no `try')
2022-10-12 21:00:50 +0200 <ski> if it doesn't commit, surely it's equivalent to just `empty', ?
2022-10-12 21:01:05 +0200QNX(~kernel@user/OpenSource) (K-Lined)
2022-10-12 21:01:35 +0200 <EvanR> the link to the functional pearl is broken in there
2022-10-12 21:05:00 +0200 <k``> (<|>) is basically parallel, but `get *> empty` does not use <|>. That said, I'm not sure whether it's possible to observe that input was consumed in a failed branch. In which case I'm wrong about ReadP, but it still holds for IO (and I think Parsec-like parsers).
2022-10-12 21:05:47 +0200 <k``> I'm ignoring the monoid laws because a legal instance that didn't throw away useful errors could be defined for IO, even though it isn't.
2022-10-12 21:07:09 +0200 <dolio> Probably the right-zero rule should just be removed.
2022-10-12 21:07:34 +0200 <dolio> From the documentation.
2022-10-12 21:08:14 +0200 <k``> Makes sense. Would certainly be less disruptive than removing the IO instance...
2022-10-12 21:10:57 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-10-12 21:14:01 +0200 <ski> EvanR : try <https://web.archive.org/web/20100325144945/http://www.cs.chalmers.se/~koen/pubs/entry-jfp04-parser…>,<https://web.archive.org/web/20061012125410if_/http://www.cs.chalmers.se/~koen/pubs/jfp04-parser.ps>
2022-10-12 21:14:05 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-10-12 21:14:36 +0200 <EvanR> got it
2022-10-12 21:15:56 +0200 <ski> anyway .. one problem with right zero is partiality `undefined >> mzero = undefined >>= \_ -> mzero = undefined', not being `mzero'
2022-10-12 21:16:12 +0200nate1(~nate@98.45.169.16)
2022-10-12 21:16:35 +0200 <k``> Also an example of why (<>) :: () -> () -> () should be strict.
2022-10-12 21:16:55 +0200zns(~zns@user/zns) (Quit: zzz)
2022-10-12 21:17:17 +0200 <ski> (`undefined *> empty' could conceivably get `empty', though. but if we want `empty *> undefined = empty' as well, we'd need "parallel or" kind of thing, spawing racing computations for the two matches)
2022-10-12 21:17:23 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 248 seconds)
2022-10-12 21:17:33 +0200 <ski> k`` : hm ?
2022-10-12 21:17:36 +0200talismanick(~talismani@99-113-70-120.lightspeed.frokca.sbcglobal.net)
2022-10-12 21:18:14 +0200 <k``> () is the unit of (<>), so `undefined <> ()` should be `undefined`.
2022-10-12 21:18:47 +0200zerozzz
2022-10-12 21:18:49 +0200 <dminuoso> And indeed it is. :>
2022-10-12 21:18:51 +0200 <ski> yes, but we were talking about `Alternative' and `MonadPlus', not `Monoid' ?
2022-10-12 21:19:24 +0200 <k``> Right, just giving a similar example of laws affecting strictness requirements.
2022-10-12 21:19:24 +0200 <ski> and `undefined >> _' already is `undefined', for `IO',&c.
2022-10-12 21:19:28 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-10-12 21:19:39 +0200freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
2022-10-12 21:19:45 +0200 <k``> > undefined <> ()
2022-10-12 21:19:47 +0200 <lambdabot> ()
2022-10-12 21:19:55 +0200 <k``> () <> undefined
2022-10-12 21:20:03 +0200 <k``> > () <> undefined
2022-10-12 21:20:05 +0200 <lambdabot> ()
2022-10-12 21:20:13 +0200 <ski> ah, so you're remarking specifically on the `Monoid ()' (or `Semigroup ()') instance
2022-10-12 21:20:41 +0200freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-10-12 21:20:41 +0200 <k``> Should be defined `() <> y = y` or `x <> () = x`.
2022-10-12 21:20:42 +0200 <dminuoso> Keep in mind that most laws that govern our typeclasses only exist if we pretend bottom does not exist.
2022-10-12 21:21:14 +0200nate1(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-12 21:21:36 +0200causal(~user@50.35.83.177)
2022-10-12 21:22:16 +0200 <ski> > let !_ = second chr undefined :: (Bool,Char) in ()
2022-10-12 21:22:17 +0200 <lambdabot> ()
2022-10-12 21:22:17 +0200 <k``> The cool thing about Monoid is its laws work even in the presence of bottoms.
2022-10-12 21:22:18 +0200 <ski> > let !_ = fmap chr undefined :: (Bool,Char) in ()
2022-10-12 21:22:20 +0200 <lambdabot> *Exception: Prelude.undefined
2022-10-12 21:22:44 +0200 <k``> Unlike, say naiive annihilative laws.
2022-10-12 21:23:01 +0200 <ski> k`` : or `() <> () = ()' or `() <> y@() = y', say
2022-10-12 21:23:34 +0200 <dminuoso> k``: Sure, but that would introduce an additional burden of say (<>) being strict on both sides.
2022-10-12 21:23:53 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 258 seconds)
2022-10-12 21:24:02 +0200 <dminuoso> So its best to not make that demand and pretend bottoms dont exist for the sake of the law. It's just more useful than the idealistic construction of a lawful universe in the presence of bottoms.
2022-10-12 21:24:09 +0200 <k``> Yeah, with `() <> () = ()` you have to know how GHC evaluates arguments to know which bottom you get in `undefined "first" <> undefined "second"`.
2022-10-12 21:24:14 +0200 <k``> But that's fine.
2022-10-12 21:24:28 +0200 <ski> hmm .. i wonder how these choices would affect stuff like `rnf' and strategies (e.g. re tail calls)
2022-10-12 21:24:28 +0200 <dminuoso> This applies to a lot of monoids.
2022-10-12 21:25:04 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-10-12 21:25:28 +0200 <k``> But the lazy <> for () has caused a few memorable memory leaks. Not sure if that's ideal.
2022-10-12 21:25:31 +0200 <ski> behaviour on bottoms tend to matter when you're tying knots
2022-10-12 21:26:01 +0200 <ski> (chasing your own tail, hoping you don't reach it, stopping progress)
2022-10-12 21:28:10 +0200finsternis(~X@23.226.237.192)
2022-10-12 21:28:13 +0200xsebek(~xsebek@swarm.znchost.com) (www.ZNCHost.com)
2022-10-12 21:29:17 +0200 <k``> Anyway, glad to hear I can safely ignore Monad right annihilation.
2022-10-12 21:29:58 +0200 <drlkf> janus: i ended up just doing it manually with a do block because i needed to read the strings into numbers too
2022-10-12 21:30:11 +0200 <k``> > fmap id (undefined :: ((),()))
2022-10-12 21:30:12 +0200 <lambdabot> *Exception: Prelude.undefined
2022-10-12 21:31:25 +0200 <k``> foldMap (\_-> ()) (undefined :: ((), ()))
2022-10-12 21:31:27 +0200 <drlkf> but the question was more like is there something that exists in the same vein as the (.:) operator
2022-10-12 21:31:48 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-12 21:32:16 +0200 <k``> > foldMap (\_->()) (undefined :: ((),()))
2022-10-12 21:32:17 +0200 <lambdabot> *Exception: Prelude.undefined
2022-10-12 21:32:18 +0200ft(~ft@p3e9bc57b.dip0.t-ipconnect.de)
2022-10-12 21:32:32 +0200 <drlkf> otherwise i could always combine withArray, Aeson.Lens.nth and fail when matching Nothing
2022-10-12 21:33:08 +0200zero(~z@user/zero)
2022-10-12 21:33:28 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 21:35:59 +0200zzz(~z@user/zero) (Ping timeout: 250 seconds)
2022-10-12 21:41:48 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 264 seconds)
2022-10-12 21:42:21 +0200johnw(~johnw@2600:1700:cf00:db0:b1b8:33de:e15a:f4eb)
2022-10-12 21:46:54 +0200 <johnw> back when the world was young, I could use CABAL_BUILDDIR to decide where the `dist` directory goes. What is the equivalent now in the days of `dist-newstyle`?
2022-10-12 21:47:15 +0200 <jmcantrell> with ghcup, is there a way to set the system version as the default?
2022-10-12 21:51:59 +0200 <dmj`> johnw: --builddir=<dir> ?
2022-10-12 21:52:08 +0200 <johnw> it seems to be ignoring it
2022-10-12 21:52:25 +0200 <geekosaur> jmcantrell, just set the system version earlier on $PATH
2022-10-12 21:53:30 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-10-12 21:53:33 +0200 <jmcantrell> how would i use a ghcup version at the project level?
2022-10-12 21:54:23 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 21:55:16 +0200 <AndreasK> johnw: `cabal build --builddir=my-dist-dir` works for me
2022-10-12 21:56:05 +0200 <geekosaur> cabal -w (or cabal-project 'with-compiler')
2022-10-12 21:57:13 +0200 <geekosaur> note that the system one usually won't have a version, so '-w ghc' would get you that while '-w ghc-9.2.4' or etc. would get you a ghcup version. (verify this though)
2022-10-12 21:57:28 +0200pavonia(~user@user/siracusa)
2022-10-12 21:57:29 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614)
2022-10-12 21:57:52 +0200 <geekosaur> if necessary you can use a full pathname
2022-10-12 21:58:53 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-12 21:59:22 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 21:59:32 +0200 <jmcantrell> ok, thanks
2022-10-12 22:00:30 +0200Guest51(~Guest51@205.175.106.169)
2022-10-12 22:01:03 +0200 <Guest51> With Neovim and CoC, how can I get HLS to properly identify the project root?
2022-10-12 22:01:20 +0200 <Guest51> Is there at least a way to manually set or change the project root?
2022-10-12 22:02:11 +0200 <geekosaur> hie.yaml?
2022-10-12 22:05:20 +0200 <geekosaur> Guest51, I have an example https://paste.tomsmeding.com/0jiF7xM3
2022-10-12 22:05:35 +0200 <talismanick> I case-matched on readMaybe; HLS now suggests "replace case with maybe"
2022-10-12 22:05:54 +0200 <geekosaur> not much going on, I mostly created that one to stop HIE from poking at a lot of other stuff
2022-10-12 22:05:54 +0200 <talismanick> not sure how that works, looking at the type signature of maybe :: b -> (a -> b) -> Maybe a -> b
2022-10-12 22:06:29 +0200 <geekosaur> <Nothing-case> <Just-case> <Maybe-expr>
2022-10-12 22:06:42 +0200_xor(~xor@74.215.182.83)
2022-10-12 22:06:46 +0200 <geekosaur> it's basically a case match as a function
2022-10-12 22:07:07 +0200 <talismanick> Where might I find an example of it in context?
2022-10-12 22:07:13 +0200 <geekosaur> that said, that's the kind of HLS complaint I usually shut off
2022-10-12 22:07:14 +0200 <Guest51> This is relatively common practice in Haskell thanks to lazy evaluation
2022-10-12 22:07:44 +0200 <_xor> Not very familiar with Haskell/Cabal. What do I need to look into if I want to vendor dependencies and run `cabal v2-update && cabal v2-build ...` offline?
2022-10-12 22:08:18 +0200 <geekosaur> https://cabal.readthedocs.io/en/3.6/cabal-project.html#specifying-the-local-packages
2022-10-12 22:09:25 +0200 <ski> talismanick : hlint is sometimes better ignored
2022-10-12 22:09:45 +0200 <tomsmeding> it's not HLS directly that gives this particular notice; that's the hlint plugin of HLS
2022-10-12 22:10:05 +0200 <tomsmeding> I say this because I love HLS but I don't like hlint, and I wish to note that it is possible to turn off hlint in HLS :)
2022-10-12 22:10:06 +0200 <_xor> Ah ok, I see.
2022-10-12 22:10:24 +0200 <geekosaur> that said, I don't think you meant running v2-update offline since by definition it's online to update the master package index. perhaps you wanted v2-build --only-dependencies
2022-10-12 22:10:38 +0200 <tomsmeding> _xor: oops, that was directed at talismanick and geekosaur
2022-10-12 22:10:43 +0200 <Guest51> I tried adding an hie.yaml file with similar contents and now I get "unknown local package: haskell-ide-engine"
2022-10-12 22:10:54 +0200biberu(~biberu@user/biberu) (Read error: Connection reset by peer)
2022-10-12 22:11:08 +0200 <geekosaur> o.O
2022-10-12 22:11:33 +0200 <geekosaur> you might have to ask in #haskell-language-server
2022-10-12 22:15:36 +0200biberu(~biberu@user/biberu)
2022-10-12 22:18:27 +0200zerozzz
2022-10-12 22:20:32 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614) (Remote host closed the connection)
2022-10-12 22:21:29 +0200Guest51(~Guest51@205.175.106.169) (Quit: Client closed)
2022-10-12 22:21:45 +0200Guest51(~Guest51@205.175.106.169)
2022-10-12 22:22:29 +0200Guest51(~Guest51@205.175.106.169) (Client Quit)
2022-10-12 22:25:42 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-12 22:26:43 +0200talismanick(~talismani@99-113-70-120.lightspeed.frokca.sbcglobal.net) (Ping timeout: 248 seconds)
2022-10-12 22:27:08 +0200vorpuni(~pvorp@2001:861:3881:c690:c0fe:bc56:314c:dc44) (Quit: bye)
2022-10-12 22:32:15 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 252 seconds)
2022-10-12 22:33:29 +0200thyriaen(~thyriaen@2a01:aea0:dd4:463c:6245:cbff:fe9f:48b1) (Quit: Leaving)
2022-10-12 22:33:48 +0200 <dmj`> is there a good / elegant functional pearl abstraction for pretty printers? Looking for something as elegant as the Hutton paper's 'type Parser a = String -> [(a,String)]'
2022-10-12 22:34:23 +0200wonko(~wjc@2a0e:1c80:2:0:45:15:19:130)
2022-10-12 22:36:36 +0200 <ski> hm, i recall reading "A prettier printer" by Philip Wadler in 1997-04,1998-03 at <https://homepages.inf.ed.ac.uk/wadler/topics/language-design.html#prettier>, years ago
2022-10-12 22:37:08 +0200 <ski> <https://wiki.haskell.org/Research_papers/Functional_pearls> has two pretty printing pearls, it seems
2022-10-12 22:39:22 +0200caryhartline(~caryhartl@2600:1700:2d0:8d30:c527:6c1:a00c:e1d4)
2022-10-12 22:41:32 +0200 <ski> (also find e.g. "Functional Pearl: Replaying the stack for parsing and pretty printing" by Mathieu Boespflug at <https://www.cs.mcgill.ca/~mboes/papers/cassette.pdf>, "The Final Pretty Printer" David Darais at <https://david.darais.com/assets/papers/final-pretty-printer/fpp.pdf>, "Linear, Online, Functional Pretty Printing" by S. Doaitse Swierstra in 2004-08-24 at
2022-10-12 22:41:37 +0200 <ski> <https://www.cs.uu.nl/research/techreps/repo/CS-2004/2004-025a.pdf>, "FUNCTIONAL PEARL Pretty Printing with Lazy Dequeues" at <https://www.cs.kent.ac.uk/pubs/2001/1813/content.pdf>)
2022-10-12 22:41:56 +0200Everything(~Everythin@37.115.210.35) (Quit: leaving)
2022-10-12 22:42:18 +0200 <ski> (i also recall reading one paper which did pretty-printing with attribute grammar techniques (lazy encoding, iirc), to make multiple passes .. can't recall author or title, though)
2022-10-12 22:42:48 +0200 <dmj`> I'll try the Swiestra one first, thank you ski.
2022-10-12 22:46:42 +0200 <EvanR> the beginning of wadler's paper defines a set of operations on a type Doc yet to be defined at that point. Without backpack, is there a way to express this directly in haskell
2022-10-12 22:47:07 +0200zer0bitz(~zer0bitz@2001:2003:f748:2000:db1:77e1:e1b4:2a85) (Read error: Connection reset by peer)
2022-10-12 22:47:10 +0200 <EvanR> type classes add a certain amount of noise, but might work
2022-10-12 22:48:09 +0200wolfshappen(~waff@irc.furworks.de) (Quit: later)
2022-10-12 22:49:33 +0200 <EvanR> like, an abstract data type and its operations, allowing multiple concrete implementations
2022-10-12 22:49:57 +0200 <EvanR> reflection?
2022-10-12 22:51:32 +0200 <EvanR> (dangit I basically answered my own question, "backpack")
2022-10-12 22:59:28 +0200 <ski> EvanR : another option is to define a `data' type with fields, possibly also using existentials
2022-10-12 22:59:46 +0200 <ski> (i'm talking about the ADT (Abstract Data Type) use of existentials, not the OO one)
2022-10-12 22:59:48 +0200k``(~user@152.1.137.158) (Remote host closed the connection)
2022-10-12 23:00:50 +0200 <ski> data QueueImpl q a = QI { empty :: q,enqueue :: a -> q -> q,dequeue :: q -> Maybe (q,a) }
2022-10-12 23:01:09 +0200 <ski> data QueueOps a = forall q. QO (QueueImpl q a)
2022-10-12 23:01:43 +0200 <ski> (`q' here, not `QueueImpl' or `QueueOps', would correspond to the abstract data type, btw)
2022-10-12 23:02:17 +0200elbear(~lucian@188.24.138.239)
2022-10-12 23:02:28 +0200michalz(~michalz@185.246.207.222) (Remote host closed the connection)
2022-10-12 23:03:32 +0200 <ski> basically, `QueueImpl q a' behaves like a module, where `q' and `a' are transparent, while for `QueueOps a', `q' is opaque/hidden/abstract/forgotten/encapsulated/skolem
2022-10-12 23:04:53 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-12 23:05:53 +0200 <ski> to use it, you'd open up the operations, and then use them directly on `q's. in the OO view, though, you'd rather use something like `data QueueObj a = forall q. QObj { state :: q,methods :: QueueImpl q a }', defining wrappers around the operations/methods that rewrap in `QObj' each time they want to return an object
2022-10-12 23:06:43 +0200zmt00(~zmt00@user/zmt00) (Ping timeout: 248 seconds)
2022-10-12 23:07:00 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 264 seconds)
2022-10-12 23:08:24 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2022-10-12 23:09:06 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 23:09:40 +0200 <dminuoso> Is there a simple primitive in `base` or `container` that would let me `lookup` and remove at the same time comfortably and efficiently for small lists/data sets (5-10)
2022-10-12 23:10:03 +0200 <dminuoso> Using a Set with alterF seems a bit much
2022-10-12 23:10:22 +0200 <ski> (of course, since there are no binary methods (like a `merge' one, needing to peek into implementation of two abstract data structures), we can refactor, "using closures" (partial application), to get `data QueueObj a = QObj { enqueue :: a -> QueueObj a,dequeue :: Maybe (QueueObj a,a) }' and `newEmpty :: QueueOps a -> QueueObj a', distributing the existential inwards (forgetting that we were returning an
2022-10-12 23:10:28 +0200 <ski> object using the same state type))
2022-10-12 23:14:16 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-10-12 23:19:54 +0200Feuermagier(~Feuermagi@user/feuermagier)
2022-10-12 23:20:10 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2022-10-12 23:21:35 +0200Feuermagier_(~Feuermagi@213.149.82.60)
2022-10-12 23:21:35 +0200Feuermagier_(~Feuermagi@213.149.82.60) (Client Quit)
2022-10-12 23:24:18 +0200 <ski> can't think of anything better than `break', or `findIndex'/`elemIndex' with `splitAt'
2022-10-12 23:24:25 +0200Feuermagier(~Feuermagi@user/feuermagier) (Ping timeout: 246 seconds)
2022-10-12 23:24:33 +0200 <ski> (which isn't really "at the same time")
2022-10-12 23:25:03 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-12 23:25:27 +0200 <dminuoso> So handwritten it is? https://gist.github.com/dminuoso/f9a82bd74e4f568c08ff499d8a53e124
2022-10-12 23:25:48 +0200 <dminuoso> (For reasons beyond me, that implementation reverses the list when the located element is at the end)
2022-10-12 23:27:47 +0200 <dminuoso> Oh, nevermind I see why now.
2022-10-12 23:28:03 +0200 <ski> @hoogle (a -> Bool) -> [a] -> Maybe (a,[a])
2022-10-12 23:28:04 +0200 <lambdabot> Text.XML.HXT.Arrow.Pickle.Xml findElem :: (a -> Bool) -> [a] -> Maybe (a, [a])
2022-10-12 23:28:04 +0200 <lambdabot> Control.Concurrent.SupervisorInternal pickFromSaveStack :: (a -> Bool) -> [a] -> Maybe (a, [a])
2022-10-12 23:28:26 +0200 <dminuoso> But I can actually live with the list being somewhat reordered.
2022-10-12 23:28:28 +0200jargon(~jargon@184.101.208.112)
2022-10-12 23:29:07 +0200 <dminuoso> I dont have any benefit with the dlist here, do I?
2022-10-12 23:29:39 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 248 seconds)
2022-10-12 23:30:19 +0200 <ski> .. i don't think so ?
2022-10-12 23:30:37 +0200 <ski> you're not using `dlistSnoc' or `dlistAppend'
2022-10-12 23:30:57 +0200 <ski> (also, does the wrapper base really help ?)
2022-10-12 23:31:38 +0200 <dminuoso> What do you mean by wrapper base?
2022-10-12 23:31:51 +0200 <ski> lookupDel _key [] = Nothing
2022-10-12 23:31:59 +0200 <dminuoso> Ah yes that is redundant
2022-10-12 23:32:10 +0200 <dminuoso> It's just some leftover from starting with a plain lookup
2022-10-12 23:32:35 +0200 <ski> .. maybe you'll avoid some small allocation of `emptyDList'. or some other cost of using the nested function
2022-10-12 23:32:43 +0200 <ski> i suspect it wouldn't be a big deal
2022-10-12 23:33:20 +0200 <ski> anyway, the "obvious" solution is the direct style, using `fmap'/`(<$>)' on `Maybe' over the recursive call
2022-10-12 23:33:36 +0200 <EvanR> splitAt is efficient due to some kind of update frame shenanigan
2022-10-12 23:34:09 +0200 <ski> but that suffers from the "left-associated `(>>=)'" kind of problem .. i might try using CPS for the worker in `lookupDel'
2022-10-12 23:34:20 +0200 <ski> EvanR : hm ?
2022-10-12 23:34:33 +0200 <dminuoso> ski: I think the handwritten version is just easier to predict mmm.
2022-10-12 23:35:05 +0200 <ski> try the CPS ?
2022-10-12 23:35:58 +0200 <dminuoso> Ah, I see you mean instead of the Maybe on the top signature?
2022-10-12 23:36:07 +0200 <dminuoso> Yeah, I was going to do that anyway
2022-10-12 23:38:27 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7)
2022-10-12 23:38:37 +0200 <ski> i mean using `go :: [(k,v)] -> o -> (v -> [(k,v)] -> o) -> o'
2022-10-12 23:39:14 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2022-10-12 23:39:15 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-10-12 23:39:19 +0200 <ski> (well, `forall o.', but it's implicit (`v' doesn't matter))
2022-10-12 23:40:55 +0200mikoto-chan(~mikoto-ch@193.185.223.3)
2022-10-12 23:41:41 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-10-12 23:42:56 +0200 <dminuoso> Im so deep into continuations already. :(
2022-10-12 23:43:19 +0200 <dminuoso> newtype ExStateT s e m a = ExStateT { runExStateT :: forall r. s -> (e -> m r) -> (s -> a -> m r) -> m r }
2022-10-12 23:43:59 +0200 <dminuoso> Is my outer monad, while Im working over an ad-hoc continuation, using continuation constructors to build up a tree...
2022-10-12 23:44:04 +0200 <dminuoso> And now this. :(
2022-10-12 23:44:23 +0200 <Franciman> dminuoso: does this perform decently?
2022-10-12 23:44:57 +0200 <dminuoso> Honestly I dont even know yet, its not finished enough to run proper benchmarks yet
2022-10-12 23:46:37 +0200 <[Leary]> :t \k -> first (fmap snd) . partition ((k ==) . fst)
2022-10-12 23:46:38 +0200 <lambdabot> Eq a => a -> [(a, b)] -> ([b], [(a, b)])
2022-10-12 23:47:15 +0200 <[Leary]> It's a bit weird to use partition for lookup, but it should work.
2022-10-12 23:51:17 +0200chomwitt(~chomwitt@2a02:587:dc0c:c200:5b5:50e2:356d:c45b) (Ping timeout: 268 seconds)
2022-10-12 23:51:59 +0200shawwwn(sid6132@id-6132.helmsley.irccloud.com)
2022-10-12 23:52:26 +0200 <[Leary]> Though I guess it's lacking if you want early stopping, which you probably do.
2022-10-12 23:54:52 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-12 23:57:52 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-10-12 23:58:05 +0200rockystone(~rocky@user/rockymarine)
2022-10-12 23:58:29 +0200ubert1(~Thunderbi@91.141.75.122.wireless.dyn.drei.com)
2022-10-12 23:59:46 +0200ubert(~Thunderbi@77.119.214.60.wireless.dyn.drei.com) (Ping timeout: 268 seconds)
2022-10-12 23:59:47 +0200ubert1ubert