2025/02/12

2025-02-12 00:01:30 +0100 <dminuoso> euouae: That looks good.
2025-02-12 00:01:41 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 248 seconds)
2025-02-12 00:01:48 +0100mniip(mniip@libera/staff/mniip) mniip
2025-02-12 00:01:49 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2025-02-12 00:01:51 +0100 <dminuoso> euouae: So what you have conjured, is a `Lens (Vec3 a) a`
2025-02-12 00:02:12 +0100 <dminuoso> That is, that thing that "traverses over a single component using some functor", that is the lens.
2025-02-12 00:03:16 +0100 <euouae> I see the setter, but not the getter
2025-02-12 00:03:17 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-02-12 00:03:23 +0100 <dminuoso> How do you `set` with that?
2025-02-12 00:03:38 +0100 <dminuoso> Curious whether you can find out yourself
2025-02-12 00:03:42 +0100 <euouae> traverseVecX (const v) vec
2025-02-12 00:03:57 +0100 <dminuoso> Interesting. You are close, but that wont work.
2025-02-12 00:04:10 +0100machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) machinedgod
2025-02-12 00:04:28 +0100 <dminuoso> You need to find a choice of `f` here.
2025-02-12 00:04:59 +0100 <euouae> Identity
2025-02-12 00:05:30 +0100 <dminuoso> Give it a try.
2025-02-12 00:05:38 +0100 <dminuoso> Have you peeked into the lens implementation before?
2025-02-12 00:06:20 +0100 <euouae> Not really I'm just reading the lens book
2025-02-12 00:06:27 +0100 <euouae> So far it's "how to use this" type of thing
2025-02-12 00:06:33 +0100 <dminuoso> Fair enough.
2025-02-12 00:06:51 +0100 <dminuoso> So there are two newtypes that seem rather useless or silly in isolation:
2025-02-12 00:06:58 +0100 <dminuoso> newtype Const a b = Const { getConst :: a }
2025-02-12 00:07:12 +0100 <dminuoso> newtype Const a b = Const { getConst :: a }
2025-02-12 00:07:15 +0100 <dminuoso> newtype Identity a = Identity { runIdentity :: a }
2025-02-12 00:07:56 +0100 <dminuoso> And both happen to be Functor. And it turns out that if you traverseVecX using those functors, it gives you the exact behavior of either extracting the thing it traverses over, or setting the value in place.
2025-02-12 00:09:05 +0100 <euouae> I made this work `traverseVecX (const 30) x :: Identity (Vec3 Int)`
2025-02-12 00:09:27 +0100 <euouae> oh? let me re-read what you said
2025-02-12 00:09:59 +0100 <dminuoso> euouae: Yeah, that way to "set" with Identity is correct.
2025-02-12 00:10:10 +0100 <dminuoso> euouae: https://hackage.haskell.org/package/lens-5.3.3/docs/src/Control.Lens.Setter.html#set
2025-02-12 00:10:30 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2025-02-12 00:11:01 +0100 <dminuoso> Note that your lens is a simple: Lens' (Vec3 a) a
2025-02-12 00:11:08 +0100 <euouae> so you're using `traverseVecX getConst vec`?
2025-02-12 00:11:35 +0100weary-traveler(~user@user/user363627) user363627
2025-02-12 00:12:05 +0100 <euouae> no, hm...
2025-02-12 00:12:35 +0100 <dminuoso> You just `traverseVec3 Const`, that's it!
2025-02-12 00:12:46 +0100 <dminuoso> (Well and getConst to unwrap it)
2025-02-12 00:13:32 +0100 <dminuoso> https://hackage.haskell.org/package/microlens-0.4.13.1/docs/src/Lens.Micro.Extras.html#view (the lens implementation has a small layer of indirection with `asks`, so this one is a bit easier to look at
2025-02-12 00:13:46 +0100 <dminuoso> euouae: And here comes the next cool part:
2025-02-12 00:13:51 +0100 <dminuoso> % :t traverse . traverse
2025-02-12 00:13:51 +0100 <yahb2> traverse . traverse ; :: (Applicative f, Traversable t1, Traversable t2) => ; (a -> f b) -> t1 (t2 a) -> f (t1 (t2 b))
2025-02-12 00:13:54 +0100 <dminuoso> % :t traverse . traverse . traverse)
2025-02-12 00:13:55 +0100 <yahb2> <interactive>:1:31: error: [GHC-58481] parse error on input ‘)’
2025-02-12 00:13:56 +0100 <dminuoso> % :t traverse . traverse . traverse
2025-02-12 00:13:56 +0100 <yahb2> traverse . traverse . traverse ; :: (Applicative f, Traversable t1, Traversable t2, ; Traversable t3) => ; (a -> f b) -> t1 (t2 (t3 a)) -> f (t1 (t2 (t3 b)))
2025-02-12 00:14:10 +0100 <dminuoso> Note how you can just compose these traverse-like functions to traverse over nested structures.
2025-02-12 00:14:19 +0100 <euouae> I'm not able to get an answer with getConst (traverseVecX Const (Vec3 1 2 3))
2025-02-12 00:14:28 +0100 <euouae> Maybe because there's no Show?
2025-02-12 00:14:35 +0100 <dminuoso> What error do you get?
2025-02-12 00:14:45 +0100 <euouae> I just get `getConst (traverseVecX Const x) :: (Monoid a, Num a) => a` as a type
2025-02-12 00:14:50 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 00:14:58 +0100 <euouae> I think it evaluates, I just don't know what it is, it's the repl on haskell-mode in emasc
2025-02-12 00:15:02 +0100 <dminuoso> euouae: Check your type.
2025-02-12 00:15:10 +0100 <dminuoso> Did you relax the constraint to Functor?
2025-02-12 00:15:17 +0100 <euouae> No its still Applicative
2025-02-12 00:15:21 +0100 <dminuoso> Thats why.
2025-02-12 00:15:24 +0100 <euouae> Oh, heh
2025-02-12 00:15:30 +0100 <dminuoso> We can use this to figure out what just happened next.
2025-02-12 00:15:35 +0100 <dminuoso> So
2025-02-12 00:15:57 +0100 <dminuoso> Consider your original traverseVec3 that traversed over all components, but needed Applicative
2025-02-12 00:16:14 +0100 <dminuoso> Use your Const, but instead of using Numbers maybe put strings into your Vec.
2025-02-12 00:16:16 +0100 <dminuoso> Give it a try.
2025-02-12 00:17:31 +0100 <dminuoso> And similiarly, try using Identity with that too.
2025-02-12 00:17:43 +0100 <mauke> "stringsareanicemonoid"
2025-02-12 00:18:12 +0100 <dminuoso> yada-yada-free-monoid
2025-02-12 00:19:52 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
2025-02-12 00:21:56 +0100 <euouae> I'm going to definitely refactor with just Functor and investigate how Const works, thank you
2025-02-12 00:22:04 +0100 <euouae> I'll do this tomorrow because there's stuff now to do
2025-02-12 00:22:25 +0100 <euouae> One thing that trips me up in Haskell is that I don't know if I'm dealing with a class or data whenever I see "Foo"... is this normal?
2025-02-12 00:22:37 +0100 <dminuoso> You can know.
2025-02-12 00:22:58 +0100 <euouae> Well if it is in the left of => it's a class?
2025-02-12 00:23:09 +0100 <dminuoso> A typeclass constraint can only appear in special places, normally not even in type position but only special constraint places.
2025-02-12 00:23:31 +0100 <euouae> right... just talking about "Const a b" though, you wouldn't know, you'd have to look into it
2025-02-12 00:23:32 +0100 <dminuoso> In places where values can appear, any identifier starting with an uppercase letter is a constructor of sorts.
2025-02-12 00:24:02 +0100 <dminuoso> euouae: well I did not mention `Const a b` in isolation.
2025-02-12 00:24:06 +0100 <euouae> I guess I need to be more conscious about it
2025-02-12 00:24:11 +0100 <dminuoso> newtype Const a b = Const { getConst :: a }
2025-02-12 00:24:21 +0100 <dminuoso> Or, with GADTSyntax (which I prefer):
2025-02-12 00:24:50 +0100Crypt-Lab(NSA@gateway/vpn/protonvpn/commanderbond007) CommanderBond007
2025-02-12 00:25:05 +0100CryptLab(NSA@gateway/vpn/protonvpn/commanderbond007) (Remote host closed the connection)
2025-02-12 00:25:15 +0100 <dminuoso> % newtype Const a b where Const :: a -> Const a b
2025-02-12 00:25:15 +0100 <yahb2> <no output>
2025-02-12 00:25:36 +0100ski'd really prefer various data types to not reuse the exact same name for the data constructor
2025-02-12 00:25:50 +0100 <dminuoso> euouae: One of the larger sources of confusion for beginners of haskell is the compact dense notation of data, where value-level constructor and types appear to be sitting right next to each other
2025-02-12 00:26:23 +0100 <dminuoso> ski: Have you worked with languages that have a shared namespace for types and value level constructs?
2025-02-12 00:26:39 +0100 <ski> dependently typed
2025-02-12 00:26:42 +0100 <dminuoso> Oh well, I guess in dependent types this would be natural
2025-02-12 00:26:44 +0100 <dminuoso> Yeah.
2025-02-12 00:27:54 +0100 <ski> but yea. having seen BNF before, the way `data' declarations work becomes a bit less unfamiliar
2025-02-12 00:27:56 +0100 <mauke> euouae: right, and with things like constraint types, it's completely ambiguous
2025-02-12 00:28:27 +0100 <mauke> type Wtf a = (Show a, Num a) -- what even is that
2025-02-12 00:28:53 +0100 <dminuoso> Wait until I hand you a `Dict Show`
2025-02-12 00:29:02 +0100 <mauke> that's illegal
2025-02-12 00:29:07 +0100 <dminuoso> Oh its not.
2025-02-12 00:29:20 +0100 <ski> `Dict (Show T)'
2025-02-12 00:29:41 +0100 <dminuoso> Oh I was a bit too quick with that assessment indeed.
2025-02-12 00:30:11 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 00:30:33 +0100 <mauke> newtype Identity runIdentity where Identity::a -> Identity a
2025-02-12 00:30:55 +0100 <ski> heh
2025-02-12 00:30:58 +0100 <euouae> mauke: I guess it's a restriction on what a can be? is that an extension?
2025-02-12 00:31:02 +0100 <jackdk> I had some code a while back that went hard on the stuff from package `constraints` to wrangle various `KnownNat` constraints. And then I fixed my design error and it all went away. But it was fun while it lasted.
2025-02-12 00:31:23 +0100 <dminuoso> euouae: `type ..` introduces just a type alias.
2025-02-12 00:31:39 +0100 <dminuoso> However...
2025-02-12 00:32:15 +0100 <mauke> euouae: https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/constraint_kind.html
2025-02-12 00:32:37 +0100 <dminuoso> I think they were referring to `type Wtf ...`
2025-02-12 00:32:43 +0100 <dminuoso> % type Wtf a = (Show a, Num a)b
2025-02-12 00:32:43 +0100 <yahb2> <interactive>:183:29: error: [GHC-76037] ; Not in scope: type variable ‘b’
2025-02-12 00:32:45 +0100 <dminuoso> % type Wtf a = (Show a, Num a)
2025-02-12 00:32:45 +0100 <yahb2> <no output>
2025-02-12 00:33:31 +0100 <dminuoso> % f :: Wtf a => a -> a; f = id
2025-02-12 00:33:31 +0100 <yahb2> <no output>
2025-02-12 00:34:09 +0100 <ski> % let foo :: Wtf a => a -> String; foo n = show (show (n + 1)) in foo 42
2025-02-12 00:34:10 +0100 <yahb2> "\"43\""
2025-02-12 00:34:23 +0100tabaqui1(~root@87.200.129.102) (Ping timeout: 252 seconds)
2025-02-12 00:34:27 +0100 <euouae> oh it's a type constraint synonym that page says
2025-02-12 00:34:44 +0100 <euouae> so an intersection of Show and Num
2025-02-12 00:34:46 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 00:35:08 +0100 <ski> it's a compound constraint, consisting of two part constraints
2025-02-12 00:35:12 +0100 <dminuoso> euouae: This can be useful for situations where you may have a bunch of constraints that you want to repeatedly mention in type signatures.
2025-02-12 00:35:19 +0100 <euouae> right
2025-02-12 00:35:25 +0100 <dminuoso> Especially in effect systems like effectful.
2025-02-12 00:35:42 +0100 <ski> basically, "constraints live at the same level as types"
2025-02-12 00:37:06 +0100mange(~user@user/mange) mange
2025-02-12 00:37:21 +0100 <mauke> newtype Identity runIdentity where Identity :: { runIdentity :: a } -> Identity a
2025-02-12 00:37:35 +0100 <mauke> had to look up GADT record syntax
2025-02-12 00:38:48 +0100Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) Tuplanolla
2025-02-12 00:38:48 +0100 <dminuoso> % data Dict :: Constraint -> Type where Dict :: a => Dict a
2025-02-12 00:38:48 +0100 <yahb2> <no output>
2025-02-12 00:38:55 +0100 <dminuoso> % d = Dict :: Dict (Show Int)
2025-02-12 00:38:55 +0100 <yahb2> <no output>
2025-02-12 00:39:12 +0100 <dminuoso> Some portion of these constraints can exist at the value level too!
2025-02-12 00:39:42 +0100 <dminuoso> Not quite the constraints, but dictionaries of them.
2025-02-12 00:40:08 +0100 <dminuoso> And we can use them to discharge constraints at will, no longer are we at the whim of the compiler.
2025-02-12 00:40:16 +0100 <dminuoso> Finally, liberated.
2025-02-12 00:41:17 +0100 <dminuoso> I tried really hard to find a reason to use `constraints` in one of our projects.. but no matter the mental gymnastics, I couldn't even justify it to myself.
2025-02-12 00:42:01 +0100 <mauke> % let { foo :: Dict (Show a) -> a -> String; foo Dict x = show x } in foo Dict '?'
2025-02-12 00:42:01 +0100 <yahb2> "'?'"
2025-02-12 00:42:18 +0100 <mauke> % let { foo :: Dict (Show a) -> a -> String; foo _ x = show x } in foo Dict '?'
2025-02-12 00:42:18 +0100 <yahb2> <interactive>:231:54: error: [GHC-39999] ; • No instance for ‘Show a’ arising from a use of ‘show’ ; Possible fix: ; add (Show a) to the context of ; the type signature ...
2025-02-12 00:43:31 +0100 <dminuoso> % withDict :: Dict a -> (a => r) -> r; withDict d r = case d of Dict -> r
2025-02-12 00:43:31 +0100 <yahb2> <no output>
2025-02-12 00:43:50 +0100 <dminuoso> mauke: ^- you must pattern match for the GADT packed dict to discharge the surrounding constraint.
2025-02-12 00:44:13 +0100 <ski> that's the point, yes
2025-02-12 00:44:47 +0100 <dminuoso> This machinery lives on not just ConstraintKinds but also GADTs.
2025-02-12 00:45:33 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 00:46:02 +0100 <mauke> % let { withDict' :: Dict a -> (a => r) -> r; withDict' Dict = id } in ()
2025-02-12 00:46:03 +0100 <yahb2> <interactive>:237:62: error: [GHC-91028] ; • Couldn't match type ‘r’ with ‘a => r’ ; Expected: (a => r) -> r ; Actual: r -> r ; Cannot equate type variable ‘r’ ; with ...
2025-02-12 00:46:08 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 00:46:14 +0100 <mauke> % let { withDict' :: Dict a -> (a => r) -> r; withDict' Dict r = r } in ()
2025-02-12 00:46:14 +0100 <yahb2> ()
2025-02-12 00:47:03 +0100 <dminuoso> Okay I find the diagnostic a bit surprising here.
2025-02-12 00:47:05 +0100 <mauke> eta reduction: destroyed
2025-02-12 00:49:17 +0100 <geekosaur> % :set -XDeepSubsumption
2025-02-12 00:49:17 +0100 <yahb2> <no output>
2025-02-12 00:49:38 +0100 <geekosaur> % let { withDict'' :: Dict a -> (a => r) -> r; withDict'' Dict = id } in ()
2025-02-12 00:49:39 +0100 <yahb2> ()
2025-02-12 00:49:50 +0100 <ski> (s/eta reduction/function extensionality/)
2025-02-12 00:50:10 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 00:50:32 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-12 00:51:33 +0100 <ski> perhaps there should be an explicit syntax for dictionary application ?
2025-02-12 00:52:03 +0100 <dminuoso> Do we have a suitable syntax for type application, now?
2025-02-12 00:52:20 +0100 <ski> debatable
2025-02-12 00:52:35 +0100 <dminuoso> I recall there was a proposal a while ago, but I cant quite remember the name of the extension
2025-02-12 00:53:02 +0100skidoesn't think the selection of `@' is great
2025-02-12 00:54:02 +0100 <dminuoso> % :set -XTypeAbstractions
2025-02-12 00:54:02 +0100 <yahb2> <no output>
2025-02-12 00:54:13 +0100 <dminuoso> % id @a x = (x :: a)
2025-02-12 00:54:13 +0100 <yahb2> <interactive>:263:4: error: [GHC-14964] ; • Invisible type pattern a has no associated forall ; • In an equation for ‘id’: id @a x = (x :: a)
2025-02-12 00:54:13 +0100 <ski> withShowable (WrapShowable @a x) k = k @a x -- could one write something like this ?
2025-02-12 00:54:20 +0100 <dminuoso> Hold on.
2025-02-12 00:54:37 +0100 <dminuoso> Invisible type pattern?
2025-02-12 00:54:49 +0100sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 244 seconds)
2025-02-12 00:54:51 +0100 <dminuoso> % id :: a -> a; id @a x = (x :: a)
2025-02-12 00:54:51 +0100 <yahb2> <no output>
2025-02-12 00:55:09 +0100 <dminuoso> But that has no associated forall either..
2025-02-12 00:55:20 +0100 <ski> (assuming `data Showable = forall a. Show a => WrapShowable a', and `withShowable :: Showable -> (forall a. Show a => a -> o) -> o')
2025-02-12 00:56:31 +0100 <dminuoso> Oh well, I think I understand what the diagnostic is really trying to say
2025-02-12 00:58:09 +0100 <dminuoso> ski: At times I do wish we had a mechanism to just swap out typeclass instances, or have some overlapping ones and then decide which ones I want.
2025-02-12 00:58:25 +0100 <ski> mm
2025-02-12 00:59:03 +0100 <dminuoso> The discussions Ive seen over the years consistently bring up coherence issues, but they feel contrived.
2025-02-12 00:59:36 +0100 <ski> occasionally, i'd like to be able to define types (possibly non-locally depending on tyvars in scope) in `where' and `let', as well as making instances for them there
2025-02-12 00:59:56 +0100 <dminuoso> Oh, locally scoped instances yes.
2025-02-12 01:00:06 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 246 seconds)
2025-02-12 01:00:37 +0100 <ski> as long as the instance is given in the same scope as the data type, i think there'd be no issue with coherence
2025-02-12 01:00:57 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 01:01:14 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2025-02-12 01:01:39 +0100ljdarj1(~Thunderbi@user/ljdarj) ljdarj
2025-02-12 01:01:55 +0100 <dminuoso> At least for `data` GHC would have to drag the type in interface files in case of inlining.
2025-02-12 01:01:57 +0100 <ski> perhaps it would be nice to have two variants, one requiring uniqueness, and the other not .. i dunno
2025-02-12 01:02:09 +0100 <dminuoso> At that point I'm not too sure what benefit you would gain.
2025-02-12 01:02:11 +0100 <ski> mm
2025-02-12 01:02:24 +0100 <ski> benefit over what ?
2025-02-12 01:02:35 +0100 <dminuoso> A module level type
2025-02-12 01:02:38 +0100 <ski> ah
2025-02-12 01:02:41 +0100 <EvanR> dminuoso, it's really nice not having to worry about incoherent instances
2025-02-12 01:03:05 +0100 <ski> well, avoiding needing to parameterize over nonlocal tyvars, at least
2025-02-12 01:03:18 +0100 <dminuoso> EvanR: I've been using orphan instances a plenty lot without having any occurence of that.
2025-02-12 01:03:19 +0100 <EvanR> code A sees instance B while code C sees instance D of the same typeclass on the same type
2025-02-12 01:03:49 +0100 <dminuoso> EvanR: Note, Im not talking about forcing automatic instance resolution.
2025-02-12 01:04:08 +0100 <dminuoso> If we had the freedom to just say "Dont resolve, Ill decide here locally", much of the incoherence problems disappear.
2025-02-12 01:04:34 +0100 <EvanR> other languages have mechanisms for using explicit instances and there comes with it the additional cognitive overhead
2025-02-12 01:04:38 +0100 <dminuoso> I mean writing newtypes with custom instances, and then selecting those instances is not a problem either.
2025-02-12 01:04:57 +0100 <EvanR> just like using imperative programming everywhere where it wouldn't help 99% of the time
2025-02-12 01:05:15 +0100 <dminuoso> If we had a mechanism of dict application that just skipped the instance resolution, the big benefit would be not having to wrap through newtype just for force instance selection
2025-02-12 01:05:21 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 246 seconds)
2025-02-12 01:05:21 +0100ljdarj1ljdarj
2025-02-12 01:05:37 +0100 <EvanR> code A sees instance B while code C sees instance D of the same typeclass on the same type
2025-02-12 01:05:45 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
2025-02-12 01:05:47 +0100 <dminuoso> EvanR: Yes, and this is not a problem with newtype either.
2025-02-12 01:05:52 +0100 <EvanR> (when someone didn't expect this)
2025-02-12 01:06:09 +0100 <EvanR> I know, newtypes are great
2025-02-12 01:06:31 +0100 <EvanR> just slapping the newtype constructor activates the special behavior
2025-02-12 01:06:51 +0100 <EvanR> and no one is surprised
2025-02-12 01:08:17 +0100 <dminuoso> The one thing is just, that if you have `f :: forall a. Show a => ...` you know that f cant possibly use any newtype wrappers to swap out the Show instance because of parametricity.
2025-02-12 01:08:26 +0100 <dminuoso> Or well, except for those versions that do silly things
2025-02-12 01:08:33 +0100 <dminuoso> Say `newtype UppercaseShow ...`
2025-02-12 01:08:43 +0100 <dminuoso> Or `newtype SortAfterShow ...`
2025-02-12 01:09:00 +0100 <dminuoso> So dunno, feels like incoherence is already upon us,.
2025-02-12 01:09:05 +0100 <EvanR> yeah I have dumb newtypes specifically to change the show instance
2025-02-12 01:09:38 +0100 <EvanR> but Show type issues are a separate ergonomic issue from type class mechanisms I think
2025-02-12 01:10:30 +0100 <EvanR> anyway solid abstractions that are actually solid is great as long as you can do what you need to do with it
2025-02-12 01:10:34 +0100 <dminuoso> I think its quite related.
2025-02-12 01:10:49 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2025-02-12 01:10:58 +0100 <EvanR> if the solid abstraction isn't doing what you want, the answer is probably not to break the abstraction for everyone, just don't use this abstraction
2025-02-12 01:11:28 +0100 <dminuoso> When you have only a single typeclass for "turn this thing into human text" that widely exists, but there's this large mismatch between "produce some nice legible string" and "produce valid haskell expressions"...
2025-02-12 01:11:32 +0100 <EvanR> that's like every other language, they never got to the point of having solid abstractions because they felt it was necessary to shoehorn stuff and hammer a screw with it
2025-02-12 01:11:33 +0100 <dminuoso> It's a matter of not having the choice.
2025-02-12 01:11:37 +0100Sgeo(~Sgeo@user/sgeo) Sgeo
2025-02-12 01:11:46 +0100 <EvanR> Show is stupid for other reasons
2025-02-12 01:11:49 +0100 <dminuoso> Since you are forced to do one of them, authors will just do - and they dont agree.
2025-02-12 01:12:01 +0100 <EvanR> it's not a good thing to base the entire type class system, or break the whole system over
2025-02-12 01:12:29 +0100dtman34(~dtman34@2601:447:d000:1f5e:74c2:4ec:de8d:13d3) dtman34
2025-02-12 01:12:30 +0100 <dminuoso> typeclasses certainly are not the reason Im using Haskell.
2025-02-12 01:12:47 +0100 <EvanR> haskell would be much more of a pain in the ass without it though
2025-02-12 01:12:56 +0100 <EvanR> if it just didn't have type classes
2025-02-12 01:13:46 +0100 <EvanR> the cases for which it was invented, it really shines there
2025-02-12 01:14:10 +0100 <ski> (`Show' and `Read' are not for custom formatting. the instances on different types are meant to play together (`instance Show a => Show (Maybe a)',&c.). this, imho means that if your instance doesn't use valid Haskell source code format (either data constructors, or exported abstract operations), your instance is bad)
2025-02-12 01:14:14 +0100 <EvanR> for other purposes it might not be the best tool
2025-02-12 01:14:32 +0100 <EvanR> and if there's a better tool we can invent that other tool
2025-02-12 01:14:43 +0100 <dminuoso> ski: That was the original intent some decades ago. The reality of hackage tells a different story.
2025-02-12 01:15:04 +0100 <ski> yes. i see no reason to abandon that vision, still
2025-02-12 01:15:12 +0100 <dminuoso> Im not convinced calling those instances "bad" is sensible at this point.
2025-02-12 01:15:28 +0100 <EvanR> I just ignore Show and wish that the interactive interpreter could just show anything without any code or deriving, and this one off feature
2025-02-12 01:16:18 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 01:16:42 +0100 <EvanR> the example of forall a . Show a => being inflexible, this would be much better just as "pass in a string instead of using a constraint"
2025-02-12 01:16:55 +0100 <EvanR> like most examples of trying to save or restore Show instances
2025-02-12 01:17:13 +0100 <EvanR> just pass the string form (lazily perhaps, if you might not use it)
2025-02-12 01:17:58 +0100 <EvanR> an extreme example of manually passing a dictionary, but it's pretty doable for 1 string
2025-02-12 01:20:54 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-02-12 01:21:29 +0100Googulator(~Googulato@2a01-036d-0106-4074-758c-12a1-cbb4-05eb.pool6.digikabel.hu) (Quit: Client closed)
2025-02-12 01:21:46 +0100Googulator(~Googulato@2a01-036d-0106-4074-758c-12a1-cbb4-05eb.pool6.digikabel.hu)
2025-02-12 01:25:06 +0100xff0x(~xff0x@2405:6580:b080:900:36c:449b:42ad:5dc6) (Ping timeout: 252 seconds)
2025-02-12 01:25:32 +0100euouae(~euouae@user/euouae) ()
2025-02-12 01:31:42 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 01:34:52 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 01:38:13 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-02-12 01:39:17 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-12 01:45:02 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2025-02-12 01:48:37 +0100 <Leary> kaol: If your ghc is recent enough, you have "multi-repl"; you can list multiple components or just do `cabal repl all`. For older GHC and ghciwatch, which don't support it, there's a nice way to write your cabal file such that you have a `dev` component that effectively combines the others without interfering with them: https://gist.github.com/LSLeary/6551f1dc3e25fe0d0d629b4ddb385359
2025-02-12 01:48:45 +0100attk(~attk@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca) (Remote host closed the connection)
2025-02-12 01:49:44 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 01:54:50 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
2025-02-12 01:56:36 +0100zungi(~tory@user/andrewchawk) andrewchawk
2025-02-12 02:02:51 +0100acidjnk_new3(~acidjnk@p200300d6e7283f949088022741b454a0.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2025-02-12 02:03:15 +0100califax_(~califax@user/califx) califx
2025-02-12 02:04:24 +0100califax(~califax@user/califx) (Ping timeout: 264 seconds)
2025-02-12 02:04:27 +0100califax_califax
2025-02-12 02:05:05 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 02:09:37 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-02-12 02:11:09 +0100xff0x(~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp)
2025-02-12 02:12:10 +0100 <monochrom> About Show. Rust learned from us and have two such type classes instead of one.
2025-02-12 02:13:05 +0100 <monochrom> More precisely, learned from our quarrels. :)
2025-02-12 02:13:31 +0100 <zungi> monochrom: Can you summarize the Rust situation?
2025-02-12 02:13:35 +0100sprotte24(~sprotte24@p200300d16f05dc00448362a75cf21d07.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
2025-02-12 02:13:54 +0100 <monochrom> Yes. It has two such type classes instead of one. :)
2025-02-12 02:14:25 +0100 <zungi> Hey, Haskell has two typeclasses, too; Haskell has Read and Show. zo'o sai
2025-02-12 02:14:52 +0100rvalue(~rvalue@user/rvalue) (Read error: Connection reset by peer)
2025-02-12 02:15:01 +0100 <monochrom> OK OK. One type class is for end-users, the other is for debugging messages.
2025-02-12 02:15:26 +0100kittiesCatty
2025-02-12 02:15:31 +0100rvalue(~rvalue@user/rvalue) rvalue
2025-02-12 02:15:31 +0100 <zungi> Thank you, monochrom.
2025-02-12 02:15:59 +0100 <monochrom> more precisely, debugging messages for devs.
2025-02-12 02:16:31 +0100Googulator(~Googulato@2a01-036d-0106-4074-758c-12a1-cbb4-05eb.pool6.digikabel.hu) (Quit: Client closed)
2025-02-12 02:16:45 +0100Googulator(~Googulato@2a01-036d-0106-4074-758c-12a1-cbb4-05eb.pool6.digikabel.hu)
2025-02-12 02:18:07 +0100 <monochrom> I actually forgot whether Rust has anything like our Read.
2025-02-12 02:20:27 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 02:22:37 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 02:24:48 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2025-02-12 02:26:58 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-12 02:28:33 +0100Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
2025-02-12 02:31:19 +0100Smiles(uid551636@id-551636.lymington.irccloud.com) Smiles
2025-02-12 02:32:59 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection timed out)
2025-02-12 02:35:49 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 02:35:56 +0100weary-traveler(~user@user/user363627) (Remote host closed the connection)
2025-02-12 02:38:29 +0100machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 248 seconds)
2025-02-12 02:40:10 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 02:40:21 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 02:44:02 +0100ystael(~ystael@user/ystael) (Quit: Lost terminal)
2025-02-12 02:44:54 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 260 seconds)
2025-02-12 02:46:24 +0100piele(~piele@eiseth.creativeserver.net) (Ping timeout: 252 seconds)
2025-02-12 02:46:53 +0100piele(~piele@eiseth.creativeserver.net) piele
2025-02-12 02:48:22 +0100 <haskellbridge> <zungi (it/its)> zungi: test
2025-02-12 02:49:46 +0100 <geekosaur> pass
2025-02-12 02:51:13 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 02:52:42 +0100zungi(~tory@user/andrewchawk) (Quit: WeeChat 4.4.2)
2025-02-12 02:53:49 +0100zungi(~tory@user/andrewchawk) andrewchawk
2025-02-12 02:55:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 02:57:59 +0100 <EvanR> monochrom, end-users want to see a plain text version of their data?
2025-02-12 02:58:16 +0100 <EvanR> EULA agreers tend to want fancy graphics
2025-02-12 02:59:15 +0100 <monochrom> Just look at end-users of IRC. >:)
2025-02-12 02:59:32 +0100 <EvanR> debugging by having a built-in don't-have-to-implement-or-even-derive functionality for anything in the language automatically seems to work for many languages
2025-02-12 03:00:13 +0100 <EvanR> on the other hand, when you see a "character" in C, there are at least 3 different textual forms you might want to see for debugging
2025-02-12 03:00:24 +0100 <EvanR> in which case you'd need 3 typeclasses just for that
2025-02-12 03:00:28 +0100 <EvanR> according to this theory
2025-02-12 03:06:36 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 03:12:01 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 03:13:10 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 03:13:29 +0100remmie(ianremsen@tilde.team) (Ping timeout: 260 seconds)
2025-02-12 03:16:28 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-12 03:24:39 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 03:25:17 +0100lol_jcarpenter2
2025-02-12 03:28:56 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 03:37:43 +0100weary-traveler(~user@user/user363627) user363627
2025-02-12 03:40:01 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 03:44:37 +0100remmie(ianremsen@tilde.team) remsense
2025-02-12 03:44:49 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-02-12 03:55:24 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 03:56:43 +0100ColinRobinsonJuanDaugherty
2025-02-12 03:59:44 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 04:01:05 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 04:03:43 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 04:05:14 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-12 04:08:01 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 248 seconds)
2025-02-12 04:08:45 +0100JuanDaughertyColinRobinson
2025-02-12 04:10:46 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 04:12:25 +0100 <albet70> what's the function name that return the first no-failed value, like f Just 3 Nothing == Just 3
2025-02-12 04:12:41 +0100 <albet70> f Nothing (Just 3) == Just 3
2025-02-12 04:12:51 +0100 <albet70> f Nothing Nothing == Nothing
2025-02-12 04:13:22 +0100 <albet70> :t or
2025-02-12 04:13:23 +0100 <lambdabot> Foldable t => t Bool -> Bool
2025-02-12 04:14:16 +0100 <monochrom> > Just 3 <|> Nothing
2025-02-12 04:14:17 +0100 <lambdabot> Just 3
2025-02-12 04:14:23 +0100 <monochrom> > Nothing <|> Just 5
2025-02-12 04:14:25 +0100 <lambdabot> Just 5
2025-02-12 04:14:32 +0100 <monochrom> I think that's what you want.
2025-02-12 04:15:00 +0100 <albet70> > Nothing <|> Nothing
2025-02-12 04:15:02 +0100 <lambdabot> Nothing
2025-02-12 04:15:17 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-02-12 04:15:34 +0100 <albet70> aha, python or operator is Haskell's<|>
2025-02-12 04:16:18 +0100 <jackdk> Depending on whether you want to consider two items or several, you can use `asum` instead of repeated applications of `(<|>)`
2025-02-12 04:17:58 +0100 <monochrom> That theory can hold up for a little while until you have Python "my_list or my_number" and then suddenly Haskell "my_list <|> my_number" is a type error.
2025-02-12 04:19:36 +0100 <albet70> haha
2025-02-12 04:21:23 +0100machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) machinedgod
2025-02-12 04:21:39 +0100 <albet70> what's the opposite of <|>? f Nothing Just 3 == Nothing
2025-02-12 04:21:53 +0100 <albet70> f Just 3 Nothing== Nothing
2025-02-12 04:22:10 +0100 <albet70> f Just1 Just2 == Just2
2025-02-12 04:23:27 +0100 <monochrom> I don't know what opposite means. Can you show all 4 cases?
2025-02-12 04:23:52 +0100 <albet70> forgot opposite, my bad English
2025-02-12 04:24:16 +0100 <albet70> f Nothing (Just 3) == Just 3
2025-02-12 04:24:19 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2025-02-12 04:24:28 +0100 <albet70> wrong
2025-02-12 04:26:11 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 04:27:10 +0100 <albet70> > Just 3 *> Nothing
2025-02-12 04:27:12 +0100 <lambdabot> Nothing
2025-02-12 04:27:47 +0100lockywolf(~lockywolf@213.165.252.237) lockywolf
2025-02-12 04:27:47 +0100 <albet70> *> is and operator in python
2025-02-12 04:30:27 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2025-02-12 04:33:17 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 04:37:57 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-02-12 04:39:45 +0100Smiles(uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2025-02-12 04:42:09 +0100tavare(~tavare@user/tavare) tavare
2025-02-12 04:44:46 +0100ColinRobinson(~juan@user/JuanDaugherty) (Quit: praxis.meansofproduction.biz (juan@acm.org))
2025-02-12 04:45:11 +0100 <hololeap> > Just 2 *> Just 3
2025-02-12 04:45:13 +0100 <lambdabot> Just 3
2025-02-12 04:45:21 +0100 <hololeap> > Just 2 <* Just 3
2025-02-12 04:45:22 +0100 <lambdabot> Just 2
2025-02-12 04:46:09 +0100 <zungi> > 9 + 10
2025-02-12 04:46:11 +0100 <lambdabot> 19
2025-02-12 04:46:23 +0100 <zungi> Thank God.
2025-02-12 04:46:40 +0100 <zungi> xo'o
2025-02-12 04:48:07 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 268 seconds)
2025-02-12 04:48:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 04:48:42 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 04:49:28 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 04:50:26 +0100 <hololeap> albet70: liftA2 is closer to "and" IMO
2025-02-12 04:51:09 +0100 <hololeap> > liftA2 (,) (Just 2) (Just 3)
2025-02-12 04:51:10 +0100 <lambdabot> Just (2,3)
2025-02-12 04:51:15 +0100 <hololeap> > liftA2 (,) Nothing (Just 3)
2025-02-12 04:51:16 +0100 <lambdabot> Nothing
2025-02-12 04:51:18 +0100 <hololeap> etc
2025-02-12 04:53:38 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-12 04:53:45 +0100 <albet70> :t >>
2025-02-12 04:53:46 +0100 <lambdabot> error: parse error on input ‘>>’
2025-02-12 04:54:03 +0100 <albet70> :t (>>)
2025-02-12 04:54:04 +0100 <lambdabot> Monad m => m a -> m b -> m b
2025-02-12 04:55:25 +0100 <albet70> >> *> looks so similar
2025-02-12 04:57:54 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-02-12 05:01:20 +0100skylord5816(~skylord58@user/skylord5816) (Remote host closed the connection)
2025-02-12 05:02:00 +0100Googulator(~Googulato@2a01-036d-0106-4074-758c-12a1-cbb4-05eb.pool6.digikabel.hu) (Quit: Client closed)
2025-02-12 05:02:15 +0100Googulator(~Googulato@2a01-036d-0106-4074-758c-12a1-cbb4-05eb.pool6.digikabel.hu)
2025-02-12 05:08:32 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 05:12:49 +0100lunitur(~lunitur@86.33.95.148)
2025-02-12 05:13:04 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 05:18:40 +0100 <c_wraith> yes, (>>) predates the implementation of the applicative-monad proposal
2025-02-12 05:22:31 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2025-02-12 05:22:53 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) bitdex
2025-02-12 05:23:53 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 05:25:10 +0100vanishingideal(~vanishing@user/vanishingideal) (Ping timeout: 252 seconds)
2025-02-12 05:27:13 +0100vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2025-02-12 05:27:42 +0100yegorc(~yegorc@user/yegorc) (Quit: Leaving)
2025-02-12 05:29:14 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-02-12 05:38:12 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 05:39:39 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 05:42:25 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 248 seconds)
2025-02-12 05:44:13 +0100Googulator(~Googulato@2a01-036d-0106-4074-758c-12a1-cbb4-05eb.pool6.digikabel.hu) (Quit: Client closed)
2025-02-12 05:44:14 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 05:50:02 +0100aforemny_(~aforemny@2001:9e8:6cc1:2800:a5a5:c3e6:116b:76ba) aforemny
2025-02-12 05:50:14 +0100aforemny(~aforemny@i59F4C4A3.versanet.de) (Ping timeout: 260 seconds)
2025-02-12 05:55:02 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 05:59:33 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-02-12 06:00:44 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2025-02-12 06:02:29 +0100eL_Bart0(eL_Bart0@dietunichtguten.org) (Ping timeout: 260 seconds)
2025-02-12 06:10:24 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 06:15:02 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 06:25:46 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 06:25:57 +0100lockywolf(~lockywolf@213.165.252.237) (Ping timeout: 246 seconds)
2025-02-12 06:26:12 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2025-02-12 06:26:57 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 06:29:52 +0100prasad(~Thunderbi@2601:243:c001:3f07::5c) (Ping timeout: 268 seconds)
2025-02-12 06:31:39 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 260 seconds)
2025-02-12 06:32:33 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-02-12 06:36:18 +0100machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 252 seconds)
2025-02-12 06:40:12 +0100michalz(~michalz@185.246.207.203)
2025-02-12 06:49:22 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 06:52:21 +0100Flow(~none@gentoo/developer/flow) (Ping timeout: 252 seconds)
2025-02-12 06:55:46 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
2025-02-12 06:56:43 +0100Flow(~none@gentoo/developer/flow) flow
2025-02-12 07:06:14 +0100 <hololeap> I need a container that can store an arbitrary type and "heal" after popping a random element out. there will be about 2000 indices max. any suggestions? Sequence perhaps?
2025-02-12 07:06:19 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 07:08:35 +0100 <c_wraith> Sequence is a decent stopgap for that, unless there are additional properties that give you something more directly useful
2025-02-12 07:10:35 +0100wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2025-02-12 07:10:40 +0100 <hololeap> basically, I build up a list/collection/etc of items, then perform an action on a random one and repeat, never performing the action on the same item twice
2025-02-12 07:11:37 +0100 <c_wraith> that's a shuffle
2025-02-12 07:13:13 +0100 <c_wraith> like, within those specific confines... I'd generate them in... anything Foldable, really. Then stuff them into an ST array to run a fisher-yates shuffle and extract the results as a list.
2025-02-12 07:13:56 +0100 <hololeap> ok
2025-02-12 07:15:10 +0100 <hololeap> @hackage list-shuffle -- I did find this
2025-02-12 07:15:10 +0100 <lambdabot> https://hackage.haskell.org/package/list-shuffle -- I did find this
2025-02-12 07:15:30 +0100 <hololeap> looks pretty good
2025-02-12 07:15:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-02-12 07:15:42 +0100 <c_wraith> hey, that does the stuffing into ST and extracting for you
2025-02-12 07:16:18 +0100 <c_wraith> (as well as the shuffling)
2025-02-12 07:17:18 +0100zungi(~tory@user/andrewchawk) (Remote host closed the connection)
2025-02-12 07:17:20 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 07:17:25 +0100takuan(~takuan@d8D86B601.access.telenet.be)
2025-02-12 07:17:48 +0100zungi(~tory@user/andrewchawk) andrewchawk
2025-02-12 07:21:37 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 248 seconds)
2025-02-12 07:22:09 +0100ZLima12(~zlima12@user/meow/ZLima12) (Remote host closed the connection)
2025-02-12 07:23:18 +0100ZLima12(~zlima12@user/meow/ZLima12) ZLima12
2025-02-12 07:23:56 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Remote host closed the connection)
2025-02-12 07:26:08 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 07:27:00 +0100Square2(~Square4@user/square) Square
2025-02-12 07:27:20 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-12 07:28:44 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
2025-02-12 07:30:12 +0100tnt1(~Thunderbi@user/tnt1) tnt1
2025-02-12 07:30:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 07:31:40 +0100tnt2(~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
2025-02-12 07:35:12 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 07:37:53 +0100ft(~ft@p4fc2a610.dip0.t-ipconnect.de) (Quit: leaving)
2025-02-12 07:39:44 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-12 07:46:03 +0100robobub(uid248673@id-248673.uxbridge.irccloud.com) robobub
2025-02-12 07:50:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 07:54:09 +0100acidjnk_new3(~acidjnk@p200300d6e7283f80357462f87ee532d8.dip0.t-ipconnect.de) acidjnk
2025-02-12 07:55:36 +0100hgolden(~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) (Remote host closed the connection)
2025-02-12 07:56:56 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-02-12 07:58:23 +0100 <dminuoso> What language settings does a GHCi invocation default to these days? GHC2021?
2025-02-12 07:58:59 +0100 <dminuoso> It cant be Haskell2010 since geekosaur demonstrated earlier that DeepSubsumption is not on by default.
2025-02-12 08:01:04 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 08:05:23 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 252 seconds)
2025-02-12 08:05:43 +0100CiaoSen(~Jura@ip-037-201-241-067.um10.pools.vodafone-ip.de) CiaoSen
2025-02-12 08:05:45 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 08:10:09 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 248 seconds)
2025-02-12 08:16:22 +0100misterfish(~misterfis@84.53.85.146) misterfish
2025-02-12 08:34:04 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com) szkl
2025-02-12 08:34:44 +0100sawilagar(~sawilagar@user/sawilagar) sawilagar
2025-02-12 08:37:40 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
2025-02-12 08:42:14 +0100tnt1(~Thunderbi@user/tnt1) tnt1
2025-02-12 08:42:58 +0100nek0(~nek0@user/nek0) (Quit: The Lounge - https://thelounge.chat)
2025-02-12 08:43:10 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
2025-02-12 08:45:12 +0100weary-traveler(~user@user/user363627) (Remote host closed the connection)
2025-02-12 08:47:13 +0100merijn(~merijn@77.242.116.146) merijn
2025-02-12 08:47:56 +0100eL_Bart0(eL_Bart0@dietunichtguten.org)
2025-02-12 08:48:04 +0100sord937(~sord937@gateway/tor-sasl/sord937) sord937
2025-02-12 08:48:12 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-12 08:48:36 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 244 seconds)
2025-02-12 08:48:36 +0100tnt2tnt1
2025-02-12 08:53:29 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 08:54:16 +0100xdej(~xdej@quatramaran.salle-s.org) xdej
2025-02-12 08:54:17 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-12 08:54:48 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 244 seconds)
2025-02-12 08:54:48 +0100tnt2tnt1
2025-02-12 08:56:27 +0100 <c_wraith> It's Haskell2021 in recent GHC
2025-02-12 08:57:08 +0100 <dminuoso> What is Haskell2021?
2025-02-12 08:57:29 +0100 <c_wraith> err. GHC2021.
2025-02-12 08:57:33 +0100 <c_wraith> wires crossed
2025-02-12 08:57:50 +0100CiaoSen(~Jura@ip-037-201-241-067.um10.pools.vodafone-ip.de) (Ping timeout: 252 seconds)
2025-02-12 08:57:54 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 244 seconds)
2025-02-12 08:58:01 +0100 <dminuoso> Oh, GHC2024 is a thing too nowadays.
2025-02-12 08:58:14 +0100 <c_wraith> yes, but it's not a default in any current version of GHC
2025-02-12 08:58:31 +0100 <dminuoso> The wording in the manual is a bit cute. [
2025-02-12 08:58:35 +0100 <dminuoso> [
2025-02-12 08:58:43 +0100 <dminuoso> Oh what is going on. My clipboard is acting up.
2025-02-12 08:59:33 +0100 <dminuoso> In one part it says: "[GHC2024 is] suitable to be turned on by default", while indeed "Currently, GHC2021 is used by default [...]"
2025-02-12 08:59:43 +0100 <dminuoso> See https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html#controlling-editions-and-exte…
2025-02-12 08:59:53 +0100 <c_wraith> I'm not sure 2024 actually *is* suitable as a default
2025-02-12 09:00:01 +0100caconym(~caconym@user/caconym) (Quit: bye)
2025-02-12 09:00:11 +0100CiaoSen(~Jura@ip-037-201-241-067.um10.pools.vodafone-ip.de) CiaoSen
2025-02-12 09:01:05 +0100caconym(~caconym@user/caconym) caconym
2025-02-12 09:01:13 +0100 <c_wraith> Though the way in which it is lacking, GHC2021 is also lacking... Last I saw, there were plans to break up ScopedTypeVariables into multiple extensions because it's current kind of the extension for putting type variables anywhere
2025-02-12 09:01:24 +0100 <dminuoso> Which extension do you disagree with the most in GHC2024?
2025-02-12 09:02:20 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-12 09:02:21 +0100 <c_wraith> Well, I'm no fan of MonoLocalBinds. Which, yes, comes with GADTs
2025-02-12 09:03:04 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 244 seconds)
2025-02-12 09:03:04 +0100tnt2tnt1
2025-02-12 09:03:30 +0100 <c_wraith> But other than that, there's nothing in there that bugs me except the weird future of ScopedTypeVariables. Which 2021 also has to deal with.
2025-02-12 09:05:39 +0100HappyNewYear2025(~newyear@2.219.56.221) (Ping timeout: 244 seconds)
2025-02-12 09:08:07 +0100nek0(~nek0@user/nek0) nek0
2025-02-12 09:09:13 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 09:09:14 +0100sawilagar_(~sawilagar@user/sawilagar) sawilagar
2025-02-12 09:09:25 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 248 seconds)
2025-02-12 09:09:42 +0100florida(~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b)
2025-02-12 09:10:59 +0100kaskal(~kaskal@2a02:8388:15bf:c200:b761:f798:cc12:a3c8) kaskal
2025-02-12 09:11:20 +0100pierrot(~pi@user/pierrot) pierrot
2025-02-12 09:11:29 +0100GdeVolpiano(~GdeVolpia@user/GdeVolpiano) (Ping timeout: 260 seconds)
2025-02-12 09:12:04 +0100sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 260 seconds)
2025-02-12 09:12:04 +0100pierrot_(~pi@user/pierrot) (Ping timeout: 260 seconds)
2025-02-12 09:12:04 +0100kaskal-(~kaskal@2a02:8388:15bf:c200:f01c:d173:579b:8db6) (Ping timeout: 260 seconds)
2025-02-12 09:13:14 +0100GdeVolpiano(~GdeVolpia@user/GdeVolpiano) GdeVolpiano
2025-02-12 09:13:44 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 265 seconds)
2025-02-12 09:14:56 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) lisbeths
2025-02-12 09:16:15 +0100florida(~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b) (Quit: Leaving)
2025-02-12 09:17:53 +0100merijn(~merijn@77.242.116.146) merijn
2025-02-12 09:18:48 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 264 seconds)
2025-02-12 09:19:06 +0100stiell(~stiell@gateway/tor-sasl/stiell) stiell
2025-02-12 09:27:35 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
2025-02-12 09:29:21 +0100tavare(~tavare@user/tavare) (Read error: Connection reset by peer)
2025-02-12 09:29:49 +0100lockywolf(~lockywolf@213.165.252.157) lockywolf
2025-02-12 09:37:53 +0100AlexZenon(~alzenon@178.34.151.30) (Quit: ;-)
2025-02-12 09:38:49 +0100AlexNoo(~AlexNoo@178.34.151.30) (Quit: Leaving)
2025-02-12 09:38:53 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 265 seconds)
2025-02-12 09:42:20 +0100merijn(~merijn@77.242.116.146) merijn
2025-02-12 09:42:21 +0100tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
2025-02-12 09:42:33 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 09:42:48 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2025-02-12 09:47:04 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 260 seconds)
2025-02-12 09:48:01 +0100califax(~califax@user/califx) (Remote host closed the connection)
2025-02-12 09:49:32 +0100califax(~califax@user/califx) califx
2025-02-12 09:52:01 +0100lunitur(~lunitur@86.33.95.148) (Ping timeout: 248 seconds)
2025-02-12 09:52:45 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Read error: Connection reset by peer)
2025-02-12 09:59:27 +0100califax(~califax@user/califx) (Remote host closed the connection)
2025-02-12 09:59:30 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
2025-02-12 10:01:15 +0100notzmv(~umar@user/notzmv) (Ping timeout: 252 seconds)
2025-02-12 10:01:54 +0100califax(~califax@user/califx) califx
2025-02-12 10:07:23 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) kuribas
2025-02-12 10:08:45 +0100AlexNoo(~AlexNoo@178.34.151.30)
2025-02-12 10:10:24 +0100AlexZenon(~alzenon@178.34.151.30)
2025-02-12 10:13:33 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 244 seconds)
2025-02-12 10:14:37 +0100califax(~califax@user/califx) (Remote host closed the connection)
2025-02-12 10:15:41 +0100califax(~califax@user/califx) califx
2025-02-12 10:25:48 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2)
2025-02-12 10:30:17 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 10:33:00 +0100merijn(~merijn@77.242.116.146) merijn
2025-02-12 10:34:45 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 248 seconds)
2025-02-12 10:44:02 +0100chele(~chele@user/chele) chele
2025-02-12 10:44:59 +0100xff0x(~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 260 seconds)
2025-02-12 11:03:01 +0100lxsameer(~lxsameer@Serene/lxsameer) lxsameer
2025-02-12 11:03:06 +0100tabaqui1(~root@87.200.129.102) tabaqui
2025-02-12 11:08:35 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2025-02-12 11:13:46 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 11:18:00 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 252 seconds)
2025-02-12 11:18:21 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 11:20:22 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) Unicorn_Princess
2025-02-12 11:22:57 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-12 11:29:13 +0100 <geekosaur> it's GHC2021 in all versions that support it, even if they also support GHC2024
2025-02-12 11:30:30 +0100 <geekosaur> IIRC 9.0+ do shallow subsumption (even before QuickLook landed) and there was no extension to disable it until later
2025-02-12 11:32:23 +0100rawles(~rawles@user/rawles) rawles
2025-02-12 11:37:21 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-12 11:37:29 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit)
2025-02-12 11:38:18 +0100lockywolf(~lockywolf@213.165.252.157) (Read error: Connection reset by peer)
2025-02-12 11:38:24 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-12 11:38:49 +0100lockywolf(~lockywolf@213.165.252.157) lockywolf
2025-02-12 11:40:50 +0100xff0x(~xff0x@2405:6580:b080:900:fa0c:e524:bc5c:8ead)
2025-02-12 11:44:43 +0100sprotte24(~sprotte24@p200300d16f0a8e005c58c6c9b84f6b12.dip0.t-ipconnect.de)
2025-02-12 11:52:14 +0100lockywolf(~lockywolf@213.165.252.157) (Read error: Connection reset by peer)
2025-02-12 11:53:23 +0100lockywolf(~lockywolf@213.165.252.157) lockywolf
2025-02-12 12:06:06 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 12:08:05 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 248 seconds)
2025-02-12 12:08:42 +0100xff0x(~xff0x@2405:6580:b080:900:fa0c:e524:bc5c:8ead) (Ping timeout: 272 seconds)
2025-02-12 12:08:49 +0100jcarpenter2(~lol@2603:3016:1e01:b9c0:f7:4b70:33ec:27a0) (Ping timeout: 260 seconds)
2025-02-12 12:10:23 +0100jcarpenter2(~lol@2603:3016:1e01:b9c0:dd5c:182b:d497:5a90)
2025-02-12 12:10:34 +0100CiaoSen(~Jura@ip-037-201-241-067.um10.pools.vodafone-ip.de) (Ping timeout: 260 seconds)
2025-02-12 12:10:44 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 260 seconds)
2025-02-12 12:21:24 +0100merijn(~merijn@77.242.116.146) merijn
2025-02-12 12:23:39 +0100aforemny(~aforemny@2001:9e8:6cc4:e000:b3b9:f8f6:fb02:80e2) aforemny
2025-02-12 12:24:15 +0100aforemny_(~aforemny@2001:9e8:6cc1:2800:a5a5:c3e6:116b:76ba) (Ping timeout: 252 seconds)
2025-02-12 12:28:11 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 244 seconds)
2025-02-12 12:31:20 +0100merijn(~merijn@77.242.116.146) merijn
2025-02-12 12:38:22 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-02-12 12:47:54 +0100rvalue(~rvalue@user/rvalue) (Read error: Connection reset by peer)
2025-02-12 12:48:25 +0100rvalue(~rvalue@user/rvalue) rvalue
2025-02-12 12:52:03 +0100xff0x(~xff0x@2405:6580:b080:900:eaaa:e5a8:7fd2:7c37)
2025-02-12 12:54:37 +0100sprotte24(~sprotte24@p200300d16f0a8e005c58c6c9b84f6b12.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
2025-02-12 12:56:02 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 13:00:17 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 248 seconds)
2025-02-12 13:02:45 +0100Sciencentistguy(~sciencent@hacksoc/ordinary-member) (Ping timeout: 252 seconds)
2025-02-12 13:06:35 +0100Sciencentistguy(~sciencent@hacksoc/ordinary-member) sciencentistguy
2025-02-12 13:09:39 +0100gabiruh(~gabiruh@vps19177.publiccloud.com.br) (Ping timeout: 252 seconds)
2025-02-12 13:12:36 +0100dtman34_(~dtman34@2601:447:d000:1f5e:74c2:4ec:de8d:13d3) dtman34
2025-02-12 13:12:48 +0100Smiles(uid551636@id-551636.lymington.irccloud.com) Smiles
2025-02-12 13:13:10 +0100dtman34(~dtman34@2601:447:d000:1f5e:74c2:4ec:de8d:13d3) (Ping timeout: 268 seconds)
2025-02-12 13:21:20 +0100gabiruh(~gabiruh@vps19177.publiccloud.com.br) gabiruh
2025-02-12 13:29:05 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-12 13:29:08 +0100ash3en1(~Thunderbi@146.70.124.222) ash3en
2025-02-12 13:29:08 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 272 seconds)
2025-02-12 13:29:08 +0100ash3en1ash3en
2025-02-12 13:29:09 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 244 seconds)
2025-02-12 13:29:09 +0100tnt2tnt1
2025-02-12 13:34:24 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) lortabac
2025-02-12 13:35:38 +0100mange(~user@user/mange) (Remote host closed the connection)
2025-02-12 13:37:22 +0100lockywolf(~lockywolf@213.165.252.157) (Read error: Connection reset by peer)
2025-02-12 13:37:40 +0100lockywolf_(~lockywolf@213.165.252.157) lockywolf
2025-02-12 13:41:52 +0100vanishingideal(~vanishing@user/vanishingideal) (Remote host closed the connection)
2025-02-12 13:43:33 +0100vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2025-02-12 13:43:59 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2)
2025-02-12 13:45:07 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 13:49:19 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-12 13:52:01 +0100vanishingideal(~vanishing@user/vanishingideal) (Remote host closed the connection)
2025-02-12 13:53:24 +0100L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2025-02-12 13:53:48 +0100vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2025-02-12 13:54:45 +0100florida(~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b)
2025-02-12 13:58:15 +0100 <haskellbridge> <Profpatsch> duncan: do you have a document describing the design of the cborg decoder? I haven’t seen a parser like that before, with the split into DecodeAction and wrapping everything in ST
2025-02-12 13:59:37 +0100 <haskellbridge> <Profpatsch> plus the split into fast and slow decoding loop depending on whether the parser hits a "read()" boundary
2025-02-12 13:59:59 +0100 <haskellbridge> <Profpatsch> there’s a bunch of really cool tricks in there
2025-02-12 14:02:00 +0100jespada(~jespada@2800:a4:22f4:ae00:fc16:e598:5958:94e6) jespada
2025-02-12 14:02:10 +0100Guest34(~Guest34@96-8-132-1.block0.gvtc.com)
2025-02-12 14:02:37 +0100Guest34(~Guest34@96-8-132-1.block0.gvtc.com) (Client Quit)
2025-02-12 14:05:18 +0100 <haskellbridge> <Profpatsch> "return $!" is another one that I have no clue how it makes things in ST work
2025-02-12 14:09:01 +0100ljdarj1(~Thunderbi@user/ljdarj) ljdarj
2025-02-12 14:09:39 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 276 seconds)
2025-02-12 14:09:39 +0100ljdarj1ljdarj
2025-02-12 14:11:43 +0100florida(~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b) (Quit: Leaving)
2025-02-12 14:17:20 +0100forell(~forell@user/forell) forell
2025-02-12 14:21:41 +0100sawilagar_(~sawilagar@user/sawilagar) (Quit: Leaving)
2025-02-12 14:23:09 +0100 <haskellbridge> <Profpatsch> bgamari: ^ I guess same question :)
2025-02-12 14:24:25 +0100 <haskellbridge> <Profpatsch> One more question: Stuff like https://hackage.haskell.org/package/cborg-0.2.10.0/docs/src/Codec.CBOR.Magic.html#withBsPtr uses unsafeDupablePerformIO, but all of these helpers are INLINE
2025-02-12 14:24:38 +0100 <haskellbridge> <Profpatsch> Up to go_fast that is, which does not have any pragma
2025-02-12 14:25:38 +0100 <haskellbridge> <Profpatsch> are these valid if they are allowed to be inlined? I guess go_fast acts as a natural boundary that is never inlined because of its size
2025-02-12 14:25:40 +0100 <bgamari> Profpatch: I don't think it was ever written down
2025-02-12 14:25:50 +0100sawilagar(~sawilagar@user/sawilagar) sawilagar
2025-02-12 14:26:13 +0100 <haskellbridge> <Profpatsch> Haskell Unfolder? :P
2025-02-12 14:26:21 +0100 <bgamari> a great suggestion
2025-02-12 14:26:33 +0100 <haskellbridge> <Profpatsch> I could write down some questions
2025-02-12 14:26:37 +0100 <bgamari> what concretely is the question about `return $!`?
2025-02-12 14:26:44 +0100 <bgamari> sure, that would be a great source of inspiration
2025-02-12 14:27:02 +0100Digit(~user@user/digit) (Read error: Connection reset by peer)
2025-02-12 14:27:10 +0100 <haskellbridge> <Profpatsch> well I’m assuming "return $!" is used everywhere because you want to be strict in the return values in the ST
2025-02-12 14:27:43 +0100 <bgamari> yes
2025-02-12 14:27:47 +0100Digit(~user@user/digit) Digit
2025-02-12 14:27:48 +0100 <haskellbridge> <Profpatsch> but even just an explanation of what needs to be strict and what doesn’t would be super helpful since it’s such a black art
2025-02-12 14:27:59 +0100 <bgamari> fair enough
2025-02-12 14:28:44 +0100 <bgamari> the short answer is: when you are parsing and can't incrementally consume the parsed result then you likely want to be strict
2025-02-12 14:29:08 +0100 <bgamari> since you will gain nothing by suspending the work of the parsing (which is typically fairly "light" computationally)
2025-02-12 14:30:00 +0100 <bgamari> regarding unsafeDupablePerformIO, the argument is that we "own" the bytestring and none of the operations under `withBsPtr` are side-effecting (e.g. writes)
2025-02-12 14:30:46 +0100 <bgamari> so evaluation order is irrelevant (since the bytestring is immutable) and duplication doesn't change semantics (for the same reason)
2025-02-12 14:31:15 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-12 14:31:16 +0100 <bgamari> indeed cborg is an interesting design (primarily Duncan's)
2025-02-12 14:31:56 +0100 <bgamari> when people think of "high performance" parsing in Haskell they often resort of CPS'd style
2025-02-12 14:32:36 +0100 <bgamari> since it optimises specific parsers reasonably well
2025-02-12 14:32:54 +0100 <bgamari> in particular, intermediate structures can be deforested readily
2025-02-12 14:34:10 +0100 <bgamari> but cborg shows that this isn't the only path to a decent parser
2025-02-12 14:34:10 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 14:35:22 +0100 <haskellbridge> <Profpatsch> I mean the decoupling of DecodeAction and actual decoding is super interesting
2025-02-12 14:36:32 +0100hgolden(~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) hgolden
2025-02-12 14:38:54 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 260 seconds)
2025-02-12 14:43:15 +0100brachyrhynchos(~brachyrhy@user/brachyrhynchos) brachyrhynchos
2025-02-12 14:49:17 +0100brachyrhynchos(~brachyrhy@user/brachyrhynchos) (Remote host closed the connection)
2025-02-12 14:51:12 +0100zungi(~tory@user/andrewchawk) (Ping timeout: 264 seconds)
2025-02-12 14:51:25 +0100forell(~forell@user/forell) (Quit: ZNC - https://znc.in)
2025-02-12 14:52:26 +0100forell(~forell@user/forell) forell
2025-02-12 14:55:05 +0100alp(~alp@5.226.4.112)
2025-02-12 14:55:10 +0100alp(~alp@5.226.4.112) (Changing host)
2025-02-12 14:55:10 +0100alp(~alp@user/alp) alp
2025-02-12 14:56:48 +0100zungi(~tory@user/andrewchawk) andrewchawk
2025-02-12 15:00:22 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 15:04:52 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 252 seconds)
2025-02-12 15:08:16 +0100__monty__(~toonn@user/toonn) toonn
2025-02-12 15:09:13 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-02-12 15:10:53 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-12 15:11:12 +0100Crypt-LabCryptLab
2025-02-12 15:12:09 +0100misterfish(~misterfis@84.53.85.146) (Ping timeout: 260 seconds)
2025-02-12 15:15:10 +0100alp_(~alp@5.226.4.112)