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)
2025-02-12 15:17:23 +0100Wygulmage(~Wygulmage@user/Wygulmage) Wygulmage
2025-02-12 15:17:54 +0100alp(~alp@user/alp) (Ping timeout: 248 seconds)
2025-02-12 15:21:41 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 248 seconds)
2025-02-12 15:21:48 +0100albet70(~xxx@2400:8905::f03c:92ff:fe60:98d8) (Ping timeout: 276 seconds)
2025-02-12 15:21:54 +0100Smiles(uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2025-02-12 15:22:55 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 15:24:25 +0100weary-traveler(~user@user/user363627) user363627
2025-02-12 15:26:57 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 244 seconds)
2025-02-12 15:28:07 +0100albet70(~xxx@2400:8905::f03c:92ff:fe60:98d8)
2025-02-12 15:30:15 +0100Smiles(uid551636@id-551636.lymington.irccloud.com) Smiles
2025-02-12 15:33:06 +0100merijn(~merijn@77.242.116.146) merijn
2025-02-12 15:49:03 +0100zungi(~tory@user/andrewchawk) (Quit: BRB.)
2025-02-12 15:56:22 +0100zungi(~tory@user/andrewchawk) andrewchawk
2025-02-12 15:59:24 +0100ystael(~ystael@user/ystael) ystael
2025-02-12 16:01:39 +0100vanishingideal(~vanishing@user/vanishingideal) (Remote host closed the connection)
2025-02-12 16:05:44 +0100Sgeo(~Sgeo@user/sgeo) Sgeo
2025-02-12 16:06:43 +0100Square(~Square@user/square) Square
2025-02-12 16:10:33 +0100Square2(~Square4@user/square) (Ping timeout: 276 seconds)
2025-02-12 16:12:18 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 16:16:54 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 260 seconds)
2025-02-12 16:17:54 +0100jrm(~jrm@user/jrm) (Quit: ciao)
2025-02-12 16:19:48 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2025-02-12 16:22:57 +0100vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2025-02-12 16:24:43 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 16:29:34 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 260 seconds)
2025-02-12 16:30:17 +0100jrm(~jrm@user/jrm) jrm
2025-02-12 16:30:33 +0100jrm(~jrm@user/jrm) (Remote host closed the connection)
2025-02-12 16:30:57 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 252 seconds)
2025-02-12 16:32:02 +0100jrm(~jrm@user/jrm) jrm
2025-02-12 16:35:53 +0100chele(~chele@user/chele) (Remote host closed the connection)
2025-02-12 16:35:56 +0100ljdarj(~Thunderbi@user/ljdarj) ljdarj
2025-02-12 16:38:58 +0100jespada(~jespada@2800:a4:22f4:ae00:fc16:e598:5958:94e6) (Quit: My Mac has gone to sleep. ZZZzzz…)
2025-02-12 16:43:57 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-02-12 16:47:50 +0100jrm(~jrm@user/jrm) (Quit: ciao)
2025-02-12 16:49:25 +0100jrm(~jrm@user/jrm) jrm
2025-02-12 16:51:20 +0100rekahsoft(~rekahsoft@bras-base-orllon1103w-grc-14-174-92-69-126.dsl.bell.ca) rekahsoft
2025-02-12 17:00:04 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 17:00:26 +0100jespada(~jespada@2800:a4:22f4:ae00:fc16:e598:5958:94e6) jespada
2025-02-12 17:03:49 +0100ash3en(~Thunderbi@146.70.124.222) (Quit: ash3en)
2025-02-12 17:04:05 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 244 seconds)
2025-02-12 17:16:14 +0100alp_(~alp@5.226.4.112) (Ping timeout: 260 seconds)
2025-02-12 17:19:54 +0100user363627(~user@user/user363627) user363627
2025-02-12 17:20:54 +0100weary-traveler(~user@user/user363627) (Ping timeout: 252 seconds)
2025-02-12 17:22:08 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 17:26:29 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 248 seconds)
2025-02-12 17:35:07 +0100biberu(~biberu@user/biberu) (Read error: Connection reset by peer)
2025-02-12 17:42:25 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 248 seconds)
2025-02-12 17:45:39 +0100 <EvanR> is there a good way to explain what Char is. Yeah it's a character, but what are all the possible elements. "unicode" is how it's described in the report, but
2025-02-12 17:46:31 +0100 <EvanR> Char not only allows non-characters but utf-16 surrogates, private use area,
2025-02-12 17:50:15 +0100YaShhhh(~YaShhhh@103.247.7.35)
2025-02-12 17:50:25 +0100 <EvanR> "a fancy integer between zero and 1114111"?
2025-02-12 17:51:01 +0100YaShhhh(~YaShhhh@103.247.7.35) (Client Quit)
2025-02-12 17:53:30 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 17:53:40 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-12 17:54:06 +0100 <c_wraith> "Unicode contains 1,114,112 code points; currently, characters are assigned to more than 96,000 of them." If that sentence is fully accurate, that would make Char a code point.
2025-02-12 17:54:34 +0100sprotte24(~sprotte24@p200300d16f0a8e00790a95c75d7de89b.dip0.t-ipconnect.de)
2025-02-12 17:57:56 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-12 17:59:15 +0100target_i(~target_i@user/target-i/x-6023099) target_i
2025-02-12 18:02:15 +0100 <geekosaur> :codepoint: is my understanding, yes
2025-02-12 18:02:51 +0100 <geekosaur> the business with surrogates in Unicode code points is rather bizarre, tbh
2025-02-12 18:03:52 +0100yegorc(~yegorc@user/yegorc) yegorc
2025-02-12 18:04:04 +0100 <geekosaur> I think that should have been a detail of UCS-2/UTF-16, not polluting the core concept of "code point"
2025-02-12 18:08:11 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
2025-02-12 18:09:22 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2025-02-12 18:14:28 +0100 <geekosaur> hm. the Report doesn't specify what `Char` is beyond "a Unicode character" (IMO correctly), but the GHC manual doesn't explicitly state that its `Char` is a codepoint
2025-02-12 18:15:04 +0100 <geekosaur> (a compliant implementation should be free to choose UTF-8 or UTF-16 imo)
2025-02-12 18:17:53 +0100Googulator(~Googulato@2a01-036d-0106-4074-f40d-d825-16f5-119a.pool6.digikabel.hu)
2025-02-12 18:17:56 +0100JuanDaugherty(~juan@user/JuanDaugherty) JuanDaugherty
2025-02-12 18:19:17 +0100sarna(~sarna@d168-237.icpnet.pl) (Remote host closed the connection)
2025-02-12 18:19:40 +0100econo_(uid147250@id-147250.tinside.irccloud.com)
2025-02-12 18:19:45 +0100 <EvanR> the issue would have been some code points could not be encoded with UTF-16 if some codepoints weren't blocked out
2025-02-12 18:20:17 +0100 <EvanR> if I'm not mistaken
2025-02-12 18:20:22 +0100sarna(~sarna@d168-237.icpnet.pl) sarna
2025-02-12 18:21:07 +0100 <geekosaur> it could have been designrd differently: UTF-8 doesn't have the same problem, it just ends up with potentially long encodings (IIRC up to 7, although in practice not more than 3-4 because the rest haven't been assigned yet?)
2025-02-12 18:21:15 +0100 <EvanR> "a unicode character" was probably written back in the day, unicode since clarified what a character is (in several ways), but it ends up still making sense
2025-02-12 18:21:40 +0100prasad(~Thunderbi@c-73-75-25-251.hsd1.in.comcast.net)
2025-02-12 18:22:44 +0100 <geekosaur> but, strictly speaking, is wrong because surrogates are not characters
2025-02-12 18:25:01 +0100 <EvanR> and other non-characters
2025-02-12 18:25:16 +0100 <EvanR> are literally not characters
2025-02-12 18:25:42 +0100 <EvanR> like fffe
2025-02-12 18:26:08 +0100 <EvanR> which is an integer, or codepoint. So "a fancy integer" seems yeah
2025-02-12 18:26:32 +0100saimazoon(~hrtz@user/haritz) (Ping timeout: 252 seconds)
2025-02-12 18:26:38 +0100 <EvanR> which is how C considers characters
2025-02-12 18:26:46 +0100 <monochrom> To understand what Char is, first you have to understand what Unicode is. >:)
2025-02-12 18:26:55 +0100Wygulmage(~Wygulmage@user/Wygulmage) (Quit: Client closed)
2025-02-12 18:27:10 +0100 <EvanR> turns out once you understand what (latest) unicode is, Char makes less sense xD
2025-02-12 18:27:22 +0100 <geekosaur> but then you have to understand all the stuff the Report didn't specify
2025-02-12 18:27:35 +0100 <monochrom> I don't have absolute certainty that Char = codepoint, but I use that as a working theory and it works pretty well.
2025-02-12 18:27:37 +0100 <geekosaur> (which is a shocking amount once you start digging into it…)
2025-02-12 18:28:19 +0100 <EvanR> practically it seems to be in one to one correspondence with integers in the precise range of unicode's... codes
2025-02-12 18:28:47 +0100 <geekosaur> oh, I found it. even though it's necessarily a compiler built-in, it's specified in library documentation https://downloads.haskell.org/ghc/latest/docs/libraries/base-4.21.0.0-8e62/Data-Char.html#t:Char
2025-02-12 18:29:14 +0100 <monochrom> \∩/
2025-02-12 18:29:24 +0100 <geekosaur> "The character type Char represents Unicode codespace and its elements are code points as in definitions D9 and D10 of the Unicode Standard."
2025-02-12 18:30:09 +0100 <monochrom> It would have been entered into a new version of the Report, if only people bothered to form a committee for it.
2025-02-12 18:30:13 +0100 <EvanR> that is almost the latest version of unicode being linked too
2025-02-12 18:30:31 +0100JuanDaugherty(~juan@user/JuanDaugherty) (Exeunt DS Producers)
2025-02-12 18:30:49 +0100 <monochrom> So basically the Report bitrots and all the clarifications happen in library docs instead.
2025-02-12 18:31:24 +0100 <EvanR> that provides an authoritative answer to my question
2025-02-12 18:31:31 +0100 <monochrom> Hey, vote for me to be the absolute monarch, then I will make it happen! >:)
2025-02-12 18:31:48 +0100haritz(~hrtz@2a02:8010:65b5:0:5d9a:9bab:ee5e:b737)
2025-02-12 18:31:50 +0100haritz(~hrtz@2a02:8010:65b5:0:5d9a:9bab:ee5e:b737) (Changing host)
2025-02-12 18:31:50 +0100haritz(~hrtz@user/haritz) haritz
2025-02-12 18:33:30 +0100tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net)
2025-02-12 18:35:47 +0100 <geekosaur> I still think the Report is the wrong place for it, implementations should be able to make their own decisions. ghc is kinda wrong in deferring it to library docs instead of compiler docs though
2025-02-12 18:36:02 +0100byorgey(~byorgey@155.138.238.211)
2025-02-12 18:36:02 +0100byorgey(~byorgey@155.138.238.211) (Changing host)
2025-02-12 18:36:02 +0100byorgey(~byorgey@user/byorgey) byorgey
2025-02-12 18:41:53 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 18:44:38 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2025-02-12 18:46:14 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 260 seconds)
2025-02-12 18:47:22 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-02-12 18:47:50 +0100sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2025-02-12 18:48:51 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-12 18:51:54 +0100Smiles(uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2025-02-12 18:52:59 +0100 <hololeap> weird. this works in 9.4 but in 9.8 it just causes my exe to spin forever: https://stackoverflow.com/a/41055988
2025-02-12 18:53:21 +0100zungi(~tory@user/andrewchawk) (Quit: "Moving to other building...")
2025-02-12 18:58:19 +0100zungi(~tory@user/andrewchawk) andrewchawk
2025-02-12 18:59:20 +0100 <hololeap> does anyone know of a library that has this functionality? (removing ANSI escape sequences from a ByteString (or Text))
2025-02-12 19:01:11 +0100rawles(~rawles@user/rawles) (WeeChat 3.8)
2025-02-12 19:01:20 +0100[tank](~tank@213.18.138.85)
2025-02-12 19:02:34 +0100lxsameer(~lxsameer@Serene/lxsameer) (Ping timeout: 260 seconds)
2025-02-12 19:04:20 +0100lxsameer(lxsameer@Serene/lxsameer) lxsameer
2025-02-12 19:07:37 +0100Googulator97(~Googulato@2a01-036d-0106-4074-f40d-d825-16f5-119a.pool6.digikabel.hu)
2025-02-12 19:10:27 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 19:11:10 +0100Googulator(~Googulato@2a01-036d-0106-4074-f40d-d825-16f5-119a.pool6.digikabel.hu) (Ping timeout: 240 seconds)
2025-02-12 19:11:22 +0100jespada(~jespada@2800:a4:22f4:ae00:fc16:e598:5958:94e6) (Quit: My Mac has gone to sleep. ZZZzzz…)
2025-02-12 19:12:13 +0100wootehfoot(~wootehfoo@user/wootehfoot) wootehfoot
2025-02-12 19:15:14 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 260 seconds)
2025-02-12 19:20:13 +0100machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) machinedgod
2025-02-12 19:28:58 +0100[tank](~tank@213.18.138.85) (Quit: [tank])
2025-02-12 19:29:21 +0100tank_(sid630849@id-630849.tinside.irccloud.com)
2025-02-12 19:30:10 +0100misterfish(~misterfis@84.53.85.146) misterfish
2025-02-12 19:30:58 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 19:33:22 +0100tank_(sid630849@id-630849.tinside.irccloud.com) (Client Quit)
2025-02-12 19:35:05 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-12 19:36:59 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2025-02-12 19:40:50 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 248 seconds)
2025-02-12 19:40:56 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2025-02-12 19:41:47 +0100 <haskellbridge> <sm> hololeap: String ? https://hackage.haskell.org/package/hledger-lib-1.41/docs/Hledger-Utils-String.html#v:stripAnsi
2025-02-12 19:42:17 +0100Lord_of_Life_Lord_of_Life
2025-02-12 19:42:42 +0100 <hololeap> sm: eh, it's just using a regex and not a very good one. but thanks
2025-02-12 19:42:55 +0100 <haskellbridge> <sm> I'm sorry
2025-02-12 19:43:15 +0100fun-safe-math(~fun-safe-@2601:1c2:1b7f:801f:f530:2eec:1f02:adc2) (Quit: No Ping reply in 180 seconds.)
2025-02-12 19:43:25 +0100 <haskellbridge> <sm> :)
2025-02-12 19:43:26 +0100[tank](sid630849@id-630849.tinside.irccloud.com)
2025-02-12 19:44:12 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2025-02-12 19:44:17 +0100 <hololeap> no worries. I can just use a regex that people provided on stack exchange, and then I don't have to pull in hledger :)
2025-02-12 19:44:30 +0100fun-safe-math(~fun-safe-@2601:1c2:1b7f:801f:c74b:f0dc:f04d:3261) fun-safe-math
2025-02-12 19:44:52 +0100 <haskellbridge> <sm> sometimes seeing code helps
2025-02-12 19:46:37 +0100 <hololeap> fair point
2025-02-12 19:51:14 +0100vanishingideal(~vanishing@user/vanishingideal) (Ping timeout: 252 seconds)
2025-02-12 19:53:01 +0100vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2025-02-12 19:56:20 +0100remedan(~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!)
2025-02-12 19:57:40 +0100 <energizer> why does `pure (+) <*> [0,1] <*> [10,20]` produce [10,20,11,21] and not zipWith?
2025-02-12 19:58:19 +0100 <mauke> because of how <*> is defined on []
2025-02-12 19:58:28 +0100 <monochrom> List's <*> does cartesian product rather than zipping.
2025-02-12 19:59:02 +0100 <mauke> <*> on [] is defined this way to remain compatible with the Monad [] instance
2025-02-12 19:59:22 +0100 <monochrom> That in turn is because we would like <*> to be consistent with >>= whenever applicable. List's >>= has to do cartesian product, there is no other List monad.
2025-02-12 20:00:12 +0100 <monochrom> But the stdlib knows your wish! It has the newtype wrapper ZipList that will do zipping for <*>.
2025-02-12 20:00:20 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-02-12 20:00:47 +0100 <monochrom> > pure (+) <*> ZipList [0,1] <*> ZipList [10,20]
2025-02-12 20:00:48 +0100 <lambdabot> ZipList {getZipList = [10,21]}
2025-02-12 20:01:55 +0100 <mauke> is there a simple proof that Monad [] is unique?
2025-02-12 20:03:51 +0100 <monochrom> I don't actually know of one. I made a bet. :)
2025-02-12 20:05:41 +0100 <monochrom> But I came close to seeing why ZipList cannot be a monad.
2025-02-12 20:05:48 +0100 <geekosaur> iirc ZipList would require `return` to produce an infinite list?
2025-02-12 20:05:56 +0100 <mauke> > pure 42 :: ZipList Int
2025-02-12 20:05:57 +0100 <lambdabot> ZipList {getZipList = [42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42...
2025-02-12 20:06:07 +0100 <monochrom> Yes, moreover you have to ban all finite lists.
2025-02-12 20:08:27 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en)
2025-02-12 20:10:10 +0100 <monochrom> But I have proved that the infinite stream monad is unique (and its <*> does zipping). join xss = [xss !! n !! n | n <- [0..]]
2025-02-12 20:13:26 +0100 <mauke> I figured there would be some kind of diagonalization involved
2025-02-12 20:13:55 +0100 <monochrom> :)
2025-02-12 20:15:58 +0100jespada(~jespada@2800:a4:22f4:ae00:fc16:e598:5958:94e6) jespada
2025-02-12 20:19:23 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 20:24:00 +0100ft(~ft@p4fc2a610.dip0.t-ipconnect.de) ft
2025-02-12 20:24:04 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 260 seconds)
2025-02-12 20:24:27 +0100zungi(~tory@user/andrewchawk) (Remote host closed the connection)
2025-02-12 20:24:48 +0100zungi(~tory@user/andrewchawk) andrewchawk
2025-02-12 20:27:22 +0100 <hololeap> with `WriterT w IO`, is it possible to catch ctrl+c and dump the `w` stdout before aborting, or do I require `ReaderT (IORef w) IO`
2025-02-12 20:28:07 +0100 <hololeap> it's in a loop using `execWriterT $ forM_ ...`
2025-02-12 20:28:49 +0100 <hololeap> (I'll probably end up using Reader+IORef, but I'm curious if this is possible)
2025-02-12 20:30:09 +0100 <c_wraith> @unmtl WriterT w IO a
2025-02-12 20:30:09 +0100 <lambdabot> IO (a, w)
2025-02-12 20:30:17 +0100 <c_wraith> You can catch in that type
2025-02-12 20:30:40 +0100 <c_wraith> but w isn't going to be around
2025-02-12 20:31:14 +0100 <c_wraith> the non-CPS WriterT is terrible and probably never should be used.
2025-02-12 20:33:37 +0100 <hololeap> fwiw I was using the CPS WriterT, but I assume it would also lose w
2025-02-12 20:34:57 +0100 <c_wraith> you could get the "previous" w, but you wouldn't see any changes made in the action at the scope you're catching
2025-02-12 20:35:46 +0100 <hololeap> ok
2025-02-12 20:35:56 +0100lxsameer(lxsameer@Serene/lxsameer) (Ping timeout: 268 seconds)
2025-02-12 20:37:30 +0100 <hololeap> glad to see mtl-2.3 has CPS writer support
2025-02-12 20:37:57 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2025-02-12 20:38:46 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-12 20:39:15 +0100 <tomsmeding> that has been there for ages :)
2025-02-12 20:39:32 +0100 <tomsmeding> oh it hasn't?
2025-02-12 20:39:46 +0100 <tomsmeding> 2019 for transformers and 2022 for mtl? That feels wrong
2025-02-12 20:39:46 +0100 <hololeap> Control.Monad.Writer.CPS Since: mtl-2.3, transformers-0.5.6
2025-02-12 20:39:58 +0100 <tomsmeding> it's not
2025-02-12 20:40:00 +0100 <tomsmeding> huh
2025-02-12 20:41:36 +0100 <hololeap> that and Control.Monad.Accum are excellent additions
2025-02-12 20:41:58 +0100 <hololeap> both of those transformers were annoying to work with without mtl support
2025-02-12 20:45:07 +0100 <hololeap> I guess now I need to learn how to use SelectT
2025-02-12 20:46:56 +0100Googulator44(~Googulato@2a01-036d-0106-4074-f40d-d825-16f5-119a.pool6.digikabel.hu)
2025-02-12 20:49:18 +0100user363627(~user@user/user363627) (Remote host closed the connection)
2025-02-12 20:50:40 +0100Googulator97(~Googulato@2a01-036d-0106-4074-f40d-d825-16f5-119a.pool6.digikabel.hu) (Ping timeout: 240 seconds)
2025-02-12 20:56:59 +0100alp_(~alp@5.226.4.112)
2025-02-12 20:57:01 +0100alp_(~alp@5.226.4.112) (Remote host closed the connection)
2025-02-12 21:00:04 +0100caconym(~caconym@user/caconym) (Quit: bye)
2025-02-12 21:00:45 +0100caconym(~caconym@user/caconym) caconym
2025-02-12 21:04:24 +0100zungi(~tory@user/andrewchawk) (Ping timeout: 264 seconds)
2025-02-12 21:05:18 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Remote host closed the connection)
2025-02-12 21:07:46 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 21:10:33 +0100sprotte24(~sprotte24@p200300d16f0a8e00790a95c75d7de89b.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
2025-02-12 21:11:40 +0100jespada(~jespada@2800:a4:22f4:ae00:fc16:e598:5958:94e6) (Quit: My Mac has gone to sleep. ZZZzzz…)
2025-02-12 21:11:48 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 21:12:04 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 260 seconds)
2025-02-12 21:16:44 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 260 seconds)
2025-02-12 21:16:59 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2025-02-12 21:17:20 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-12 21:17:58 +0100attk(~attk@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca) attk
2025-02-12 21:19:03 +0100[tank](sid630849@id-630849.tinside.irccloud.com) ()
2025-02-12 21:19:56 +0100Tanky(sid630849@id-630849.tinside.irccloud.com)
2025-02-12 21:22:03 +0100zero(~z@user/zero) zero
2025-02-12 21:22:32 +0100zwro(~z@user/zero) (Ping timeout: 252 seconds)
2025-02-12 21:22:33 +0100vanishingideal(~vanishing@user/vanishingideal) (Ping timeout: 276 seconds)
2025-02-12 21:23:37 +0100misterfish(~misterfis@84.53.85.146) (Ping timeout: 252 seconds)
2025-02-12 21:24:00 +0100Googulator44(~Googulato@2a01-036d-0106-4074-f40d-d825-16f5-119a.pool6.digikabel.hu) (Quit: Client closed)
2025-02-12 21:24:08 +0100vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2025-02-12 21:24:16 +0100Googulator44(~Googulato@2a01-036d-0106-4074-f40d-d825-16f5-119a.pool6.digikabel.hu)
2025-02-12 21:27:49 +0100Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) Tuplanolla
2025-02-12 21:28:46 +0100euouae(~euouae@user/euouae) euouae
2025-02-12 21:29:32 +0100 <euouae> Hello if I use emacs and haskell-mode how can I pass -Wno-type-defaults to ghci in haskell-interactive-mode? I've modified the arguments for ghci and the cabal repl but I still get it
2025-02-12 21:29:36 +0100 <euouae> I don't think it's using stack, so what gives?
2025-02-12 21:31:40 +0100 <euouae> oh apparently I should not be using --ghc-option but instead --repl-options
2025-02-12 21:32:48 +0100yegorc(~yegorc@user/yegorc) (Ping timeout: 252 seconds)
2025-02-12 21:33:07 +0100 <merijn> yeah, that sounds about right
2025-02-12 21:33:21 +0100 <merijn> I remember implementing that, but I don't recall why the distinction was needed :p
2025-02-12 21:33:58 +0100OverclockedPotat(~test@user/OverclockedPotat) OverclockedPotat
2025-02-12 21:36:44 +0100 <merijn> oh, right, I remember
2025-02-12 21:37:06 +0100 <merijn> Else changing your warning flags causes cabal to rebuild all your transitive dependencies, which, uh, is bad :)
2025-02-12 21:37:26 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-02-12 21:37:32 +0100 <merijn> Unless it's winter and you want to make your study toasty and warm with CPU heat, I suppose
2025-02-12 21:37:50 +0100 <euouae> I use `--repl-options=-Wno-type-defaults,-ferror-spans` in cabal repl configuration but it still shows the type defaults
2025-02-12 21:37:51 +0100 <euouae> sigh
2025-02-12 21:38:06 +0100 <tomsmeding> does that take a comma?
2025-02-12 21:38:17 +0100 <euouae> I have no idea, but it is "options" not option...
2025-02-12 21:38:37 +0100 <merijn> tomsmeding: I think so?
2025-02-12 21:38:37 +0100 <euouae> --repl-options=FLAG Use the option(s) for the repl
2025-02-12 21:38:41 +0100 <euouae> Not a very clear explanation
2025-02-12 21:38:43 +0100 <merijn> Unless past me is evil
2025-02-12 21:38:56 +0100 <merijn> But past me is generally a stand up guy :p
2025-02-12 21:39:18 +0100 <tomsmeding> the user guide is also not very helpful here https://cabal.readthedocs.io/en/stable/cabal-commands.html#cmdoption-repl-options
2025-02-12 21:39:26 +0100 <tomsmeding> though it confirms what merijn just said
2025-02-12 21:39:35 +0100 <euouae> chatgpt recommends space-separating it
2025-02-12 21:39:44 +0100 <tomsmeding> that's what I recall too
2025-02-12 21:39:52 +0100 <euouae> yeah I just went with what gcc does to pass linker flags
2025-02-12 21:40:01 +0100 <tomsmeding> I'm quite sure gcc also doesn't use ,
2025-02-12 21:40:17 +0100 <tomsmeding> rather it's -Wl,theoption -Wl,thesecondoption
2025-02-12 21:40:17 +0100 <euouae> -Wl does
2025-02-12 21:40:44 +0100 <tomsmeding> one argument per -Wl flag
2025-02-12 21:40:58 +0100 <euouae> right, maybe I misrecalled
2025-02-12 21:41:18 +0100 <tomsmeding> https://cabal.readthedocs.io/en/stable/setup-commands.html#cmdoption-runhaskell-Setup.hs-configure…
2025-02-12 21:41:21 +0100 <tomsmeding> this is spaces, in any case
2025-02-12 21:41:39 +0100Tanky(sid630849@id-630849.tinside.irccloud.com) ()
2025-02-12 21:41:42 +0100 <tomsmeding> I can't find a specific --ghc-options entry in the user guide, but --repl-options claims to be modeled after --ghc-options
2025-02-12 21:42:09 +0100 <euouae> ah, finally! yay
2025-02-12 21:42:12 +0100 <euouae> that worked, thank you
2025-02-12 21:42:19 +0100 <merijn> probably space separated, by the looks of the code
2025-02-12 21:42:49 +0100 <tomsmeding> should this be added to the --repl-options documentation
2025-02-12 21:42:51 +0100 <merijn> https://github.com/haskell/cabal/pull/5287/files
2025-02-12 21:43:02 +0100 <merijn> you can try and figure out what it does there
2025-02-12 21:43:16 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-12 21:43:17 +0100 <euouae> who is "past me"?
2025-02-12 21:43:18 +0100 <merijn> but at a glance it's calling setup with the contents of replFlags passed in as-is
2025-02-12 21:43:28 +0100 <merijn> so, space separated
2025-02-12 21:43:46 +0100 <merijn> euouae: Me approximately 7 years ago :p
2025-02-12 21:43:53 +0100 <euouae> lol
2025-02-12 21:44:10 +0100vanishingideal(~vanishing@user/vanishingideal) (Ping timeout: 252 seconds)
2025-02-12 21:44:12 +0100 <merijn> tomsmeding: Probably should
2025-02-12 21:44:43 +0100 <euouae> also here's what I get from --help:
2025-02-12 21:44:51 +0100 <euouae> --PROG-option=OPT give an extra option to PROG (no need to quote options containing spaces) --PROG-options=OPTS give extra options to PROG
2025-02-12 21:45:14 +0100 <tomsmeding> that presumably covers --ghc-option
2025-02-12 21:45:18 +0100 <euouae> I had no idea what "no need to quote options containing spaces" meant. I think it means it's all passed as one option in --ghc-option.
2025-02-12 21:45:26 +0100 <tomsmeding> yes
2025-02-12 21:45:29 +0100 <euouae> But in --ghc-options, spaces mean multiple arguments. It's *very* unclear
2025-02-12 21:45:35 +0100 <tomsmeding> I think that's accurate
2025-02-12 21:45:50 +0100 <euouae> Right I'm just pointing out one more place where some improvement on the wording would help
2025-02-12 21:46:01 +0100 <merijn> euouae: it's saying that "argument of ghc-options is passed "as-is" to ghc
2025-02-12 21:46:03 +0100 <tomsmeding> --*-options is convenience for a user, tooling should never use it
2025-02-12 21:46:05 +0100vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2025-02-12 21:46:08 +0100 <tomsmeding> because you get magic space splitting
2025-02-12 21:46:14 +0100 <euouae> I would prefer: OPT is passed as-is as a single argument
2025-02-12 21:46:32 +0100 <merijn> euouae: then you'd have to have one flag per argument
2025-02-12 21:46:33 +0100 <euouae> and --PROG-options=OPTS space-separated arguments
2025-02-12 21:46:47 +0100 <tomsmeding> merijn: yes, that's what --ghc-option (singular) does
2025-02-12 21:46:49 +0100 <euouae> merijn: what do you mean? I'm just saying what I would prefer the docs would say
2025-02-12 21:46:58 +0100 <euouae> instead of how they currently explain it
2025-02-12 21:47:22 +0100 <euouae> and who knows how the space-splitting works with arguments that contain spaces
2025-02-12 21:47:25 +0100 <merijn> euouae: I meant that if you write --ghc-options="foo bar baz" it literally just appends foo bar baz to the ghc call
2025-02-12 21:47:30 +0100 <merijn> euouae: There is not space splitting
2025-02-12 21:47:32 +0100 <tomsmeding> euouae: break them
2025-02-12 21:47:42 +0100 <merijn> euouae: it's a shell process call
2025-02-12 21:47:47 +0100 <tomsmeding> merijn: O.o
2025-02-12 21:47:49 +0100 <euouae> merijn: okay, then it should say OPTS passed as-is
2025-02-12 21:47:50 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
2025-02-12 21:48:04 +0100 <tomsmeding> does it do proper quoting when I pass --ghc-option with an OPT containing weird stuff
2025-02-12 21:48:07 +0100 <merijn> tomsmeding: I'm 80% sure of that
2025-02-12 21:48:12 +0100 <tomsmeding> what if I put $() in --ghc-options
2025-02-12 21:48:27 +0100 <merijn> tomsmeding: who knows
2025-02-12 21:48:28 +0100 <euouae> tomsmeding: or just ; rm -rf
2025-02-12 21:49:01 +0100 <merijn> tomsmeding: I don't see how that's an issue, tbh
2025-02-12 21:49:27 +0100 <euouae> it's definitely an issue, it shouldn't happen like that
2025-02-12 21:49:40 +0100yegorc(~yegorc@user/yegorc) yegorc
2025-02-12 21:49:49 +0100 <merijn> euouae: Why does it matter?
2025-02-12 21:49:49 +0100 <tomsmeding> well it's clearly a violation of expectations if something passed to --ghc-options, or god forbid --ghc-option, gets interpreted by a shell
2025-02-12 21:49:51 +0100 <euouae> the expected behavior of --ghc-options= should not be "you get a shell and do w/e you want"
2025-02-12 21:50:10 +0100 <tomsmeding> why is there a shell in the first place?
2025-02-12 21:50:20 +0100sprotte24(~sprotte24@p200300d16f0a8e003d8337fe7ef7e64f.dip0.t-ipconnect.de)
2025-02-12 21:50:27 +0100 <euouae> merijn: it doesn't super-matter, but I'm just telling you that it's definitely an error from a security perspective
2025-02-12 21:50:43 +0100 <tomsmeding> okay --ghc-options seems to escape $ and ` in any case
2025-02-12 21:50:48 +0100 <merijn> tomsmeding: I'm not 100% it goes via the shell, I was thinking it goes via proc
2025-02-12 21:51:04 +0100 <tomsmeding> that's not the shell
2025-02-12 21:51:05 +0100 <merijn> euouae: You already have a shell if you can call cabal with --ghc-options
2025-02-12 21:51:10 +0100 <tomsmeding> if you're thinking of System.Process.proc
2025-02-12 21:51:35 +0100 <euouae> merijn: you could just be in control of that --ghc-options thing somehow -- think of someone contributing a patch to CI where they set the options sneakily
2025-02-12 21:51:53 +0100 <merijn> honestly, just don't look at the cabal inversion of control
2025-02-12 21:52:11 +0100 <tomsmeding> euouae: you could also -i an unexpected file then
2025-02-12 21:52:11 +0100 <merijn> tomsmeding: I was thinking System.Process.sh style
2025-02-12 21:52:20 +0100 <tomsmeding> merijn: but you said "proc"
2025-02-12 21:52:35 +0100 <tomsmeding> (and it's System.Process.shell, I think)
2025-02-12 21:52:46 +0100 <merijn> tomsmeding: In my defense, it's been 7 years :p
2025-02-12 21:52:53 +0100 <tomsmeding> I'm not blaming you for not remembering :p
2025-02-12 21:52:53 +0100 <merijn> And I'm half guessing
2025-02-12 21:53:09 +0100 <tomsmeding> if cabal does indeed pass these things to the shell, I blame the reviewers who accepted that PR
2025-02-12 21:53:20 +0100 <merijn> oh, no that's not new
2025-02-12 21:53:22 +0100 <tomsmeding> but as I said, at least there appears to be some escaping going on if so
2025-02-12 21:53:57 +0100 <merijn> the problem is that cabal-install just calls Cabal's Setup.hs
2025-02-12 21:54:00 +0100 <euouae> I'm not trying to criticize eitehr
2025-02-12 21:54:49 +0100 <merijn> all arguments definitely get turned into one string and then reparsed, though
2025-02-12 21:54:57 +0100 <merijn> in that Setup step
2025-02-12 21:55:52 +0100 <tomsmeding> is this also true in build-type: Simple projects?
2025-02-12 21:55:56 +0100 <merijn> yes
2025-02-12 21:55:57 +0100 <tomsmeding> s/projects/packages/
2025-02-12 21:56:15 +0100 <merijn> They (implicitly) usethe default Setup.hs
2025-02-12 21:56:27 +0100 <tomsmeding> I just ran `cabal build --ghc-options='$(notify-send kaas)'` in a simple cabal project under a tracer that shows all execve calls
2025-02-12 21:56:30 +0100 <merijn> (similar to the two line one cabal init generates)
2025-02-12 21:56:53 +0100 <merijn> tomsmeding: Might be just getting reparsed at the Setup step and using execve then
2025-02-12 21:56:53 +0100 <tomsmeding> the first call containing "notify-send" is a call to ghc that gets passed "$(notify-send" and "kaas)" as two separate arguments
2025-02-12 21:57:07 +0100 <tomsmeding> I don't see a setup invocation at all
2025-02-12 21:57:11 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 21:57:34 +0100 <tomsmeding> also not if I `cabal clean` first
2025-02-12 21:57:35 +0100 <merijn> tomsmeding: Of course not, it's not called as program, it just calls the same logic with a string argument :p
2025-02-12 21:57:42 +0100 <tomsmeding> ah
2025-02-12 21:57:49 +0100 <tomsmeding> that's dumb
2025-02-12 21:57:55 +0100 <tomsmeding> why was it designed that way
2025-02-12 21:57:59 +0100 <merijn> tomsmeding: I mean, not really
2025-02-12 21:58:03 +0100 <merijn> well, a bit
2025-02-12 21:58:03 +0100 <mauke> <merijn> euouae: it's a shell process call <-- directly contradicts <merijn> euouae: There is not space splitting
2025-02-12 21:58:06 +0100 <merijn> it's complicated
2025-02-12 21:58:08 +0100 <tomsmeding> can I not pass an option to GHC that contains a space?
2025-02-12 21:58:25 +0100 <merijn> tomsmeding: If you quote it further, presumably
2025-02-12 21:58:33 +0100 <tomsmeding> mauke: not if there's escaping/quoting in between
2025-02-12 21:59:04 +0100 <tomsmeding> merijn: if I use --ghc-option instead of --ghc-options, the space remains intact
2025-02-12 21:59:33 +0100 <tomsmeding> it certainly seems to act as if there's no reparsing going on in between, but perhaps that just means that it's properly escaped beforehand
2025-02-12 22:02:08 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 272 seconds)
2025-02-12 22:02:14 +0100 <merijn> I'm trying to reverse my logic, but it's split across 2 PRs, annoyingly
2025-02-12 22:05:18 +0100zungi(~tory@user/andrewchawk) andrewchawk
2025-02-12 22:06:18 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-02-12 22:06:44 +0100 <tomsmeding> merijn: what do you think about this reformulation? https://tomsmeding.com/vang/Qk3nO7
2025-02-12 22:07:00 +0100 <tomsmeding> (this is the user guide on --repl-options)
2025-02-12 22:07:40 +0100 <tomsmeding> (the idea being to turn this from a historical remark of why the flag game to be, to a description of what you can do with it)
2025-02-12 22:07:48 +0100 <tomsmeding> s/game/came/
2025-02-12 22:08:27 +0100misterfish(~misterfis@84.53.85.146) misterfish
2025-02-12 22:08:44 +0100 <euouae> it might be nice to mention --repl-options in the docs for --PROG-options?
2025-02-12 22:08:57 +0100 <euouae> if --PROG-options is not reliable, you might as well deprecate it
2025-02-12 22:09:07 +0100 <merijn> I mean that formulation is a bit confusing in the sense of "why would it not reliably pass flags?" it sounds like it implies non-determinism
2025-02-12 22:09:15 +0100 <tomsmeding> euouae: it's useful for all situations _except_ passing an option to the repl
2025-02-12 22:09:23 +0100 <merijn> euouae: It is *specifically and only* ghc that is affected
2025-02-12 22:09:31 +0100hattckory(~hattckory@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca) (Remote host closed the connection)
2025-02-12 22:09:45 +0100hattckory(~hattckory@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca)
2025-02-12 22:09:47 +0100 <tomsmeding> merijn: the original was not clearer in that direction :)
2025-02-12 22:09:47 +0100 <merijn> And only for a deterministic set of flags
2025-02-12 22:09:51 +0100 <euouae> merijn: ah sigh.. it's a messy thing. maybe (NB. use --repl-options on ghc instead)
2025-02-12 22:10:22 +0100 <tomsmeding> "to control ghci without influencing the build", rather
2025-02-12 22:10:53 +0100 <merijn> euouae: If you want the dirty complicated version: There is (or at least at the time of implementation) no way to distinguish between "ghc flags that apply to all transitive dependency of this code" and "ghc flags that apply to thise project *speficially"
2025-02-12 22:11:21 +0100hattckory(~hattckory@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca) (Remote host closed the connection)
2025-02-12 22:11:32 +0100 <merijn> euouae: The current interpretation of --ghc-options is "transtively applied to all dependencies"
2025-02-12 22:11:41 +0100hattckory(~hattckory@70.31.30.224)
2025-02-12 22:12:12 +0100 <merijn> euouae: Which means: adding/removing a flag via --ghc-options will trigger a recompile of your entire transitive dependency graph (well, unless you already compiled that specific set of flags before)
2025-02-12 22:12:35 +0100 <merijn> euouae: This was making me fiddling with my warning flags REALLY fucking slow :p
2025-02-12 22:12:37 +0100 <euouae> yup I see
2025-02-12 22:12:48 +0100 <euouae> exactly, that's an issue
2025-02-12 22:12:58 +0100ljdarj1(~Thunderbi@user/ljdarj) ljdarj
2025-02-12 22:13:03 +0100 <euouae> well, ghc shouldn't be a build system? why is ghc aware of dependencies?
2025-02-12 22:13:06 +0100 <tomsmeding> you can fiddle with them in the cabal file, which does work
2025-02-12 22:13:06 +0100 <merijn> euouae: So, the solution was: "Strip out any flags that do not affec the resulting binary from ghc options"
2025-02-12 22:13:12 +0100 <merijn> euouae: Its not, cabal is
2025-02-12 22:13:23 +0100wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2025-02-12 22:13:29 +0100 <euouae> okay right, you're saying cabal had no way to separate project from dep flags
2025-02-12 22:13:34 +0100 <euouae> that's /bad/ lol :P
2025-02-12 22:13:36 +0100 <merijn> euouae: Dependencies are tagged with a hash of their version, source *and flags*
2025-02-12 22:13:47 +0100 <tomsmeding> not on the command line; the `ghc-options` field in the .cabal file works fine
2025-02-12 22:13:47 +0100 <merijn> euouae: It has one, but not on the commandline
2025-02-12 22:14:01 +0100 <euouae> right, I'm following
2025-02-12 22:14:23 +0100 <merijn> euouae: So the compromise was: any *commandline* ghc-option that does *not* affect the resulting binary gets tossed (so no rebuilding the transitive dependencies)
2025-02-12 22:14:38 +0100 <merijn> euouae: Then I quickly hit your problem "whoops, now I can't use warnings via cabal repl"
2025-02-12 22:14:46 +0100justsomeguy(~justsomeg@user/justsomeguy) justsomeguy
2025-02-12 22:14:55 +0100 <merijn> euouae: Hence --repl-options bypass the flag tossing "for this project ONLY"
2025-02-12 22:15:04 +0100 <merijn> (instead of globally transitive)
2025-02-12 22:15:16 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-12 22:15:20 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 244 seconds)
2025-02-12 22:15:20 +0100ljdarj1ljdarj
2025-02-12 22:15:51 +0100remedan(~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan
2025-02-12 22:15:57 +0100 <tomsmeding> merijn: is that tossing documented somewhere
2025-02-12 22:15:59 +0100 <merijn> Is it very pretty? No, but I didn't (and still don't :p) know a better solution beyond "redesign the way every --PROG-opts work to correctly scope it to project or transitively)
2025-02-12 22:16:13 +0100 <justsomeguy> How does fmap (fmap sum) Just [1,2,3] turn into fmap sum (Just [1,2,3])? What happens to the inner fmap?
2025-02-12 22:16:14 +0100 <tomsmeding> that solution is cabal.project.local, probably
2025-02-12 22:16:45 +0100 <merijn> tomsmeding: It is mentioned here: https://cabal.readthedocs.io/en/stable/cabal-commands.html#cmdoption-repl-options
2025-02-12 22:16:46 +0100 <tomsmeding> justsomeguy: that outer fmap is (.), so it's `(fmap sum . Just) [1,2,3]`
2025-02-12 22:16:51 +0100 <merijn> tomsmeding: But not very well
2025-02-12 22:17:09 +0100 <euouae> justsomeguy: look up the Functor instances of Maybe and (->)
2025-02-12 22:17:12 +0100 <tomsmeding> merijn: the thing I edited in my diff?
2025-02-12 22:17:39 +0100 <merijn> tomsmeding: I think I closed that already
2025-02-12 22:17:41 +0100 <merijn> xD
2025-02-12 22:17:50 +0100 <tomsmeding> the only thing I changed is change "no longer" to "not", and change the "you should use" instruction to "--repl-options bypasses this tossing" :p
2025-02-12 22:17:52 +0100 <tomsmeding> https://tomsmeding.com/vang/Qk3nO7/.psub.kWMobRelu5
2025-02-12 22:17:58 +0100 <euouae> tomsmeding: the .local is a different thing isn't it? I'm going by what I know from CMake
2025-02-12 22:18:12 +0100 <euouae> It's not project versus dependencies -- it's programmer versus upstream
2025-02-12 22:18:15 +0100 <tomsmeding> euouae: cabal.project.local is just the same thing as cabal.project, but with a different name
2025-02-12 22:18:25 +0100 <tomsmeding> _conventionally_, it's your local configuration that you don't push
2025-02-12 22:18:29 +0100 <euouae> right okay
2025-02-12 22:18:39 +0100 <merijn> tomsmeding: tbh it should probably just mentioned the tossed flags are the set of flags not affecting build artifacts, most notably warnings
2025-02-12 22:18:42 +0100 <tomsmeding> the same goes for cabal.project.freeze, actually
2025-02-12 22:19:02 +0100 <tomsmeding> merijn: and it should say that with --PROG-option(s)?
2025-02-12 22:19:03 +0100 <EvanR> justsomeguy, what fmap does depends on the particular instance of Functor, it may not be obvious in isolation which one you're dealing with. In this case "function" Functor
2025-02-12 22:19:04 +0100 <merijn> euouae: yeah .local is just a bunch of overrides merged into cabal.project
2025-02-12 22:19:08 +0100 <tomsmeding> for "ghc" specifically, right?
2025-02-12 22:19:13 +0100 <merijn> tomsmeding: Maybe? I dunno :p
2025-02-12 22:19:22 +0100 <merijn> tomsmeding: yeah, GHC only
2025-02-12 22:20:03 +0100 <justsomeguy> tomsmeding: Why does the outer fmap get rewritten to (.) instead of the inner fmap?
2025-02-12 22:20:05 +0100 <merijn> Because I manually audited a "known-safe to toss" subset of flags and anything not there is kept
2025-02-12 22:20:22 +0100 <EvanR> the inner fmap is using the list functor
2025-02-12 22:20:29 +0100 <EvanR> outer fmap is function functor
2025-02-12 22:20:36 +0100 <EvanR> two different instances
2025-02-12 22:20:51 +0100 <EvanR> er
2025-02-12 22:21:19 +0100 <EvanR> inner fmap is the Maybe functor
2025-02-12 22:21:20 +0100 <merijn> welp, my session if figuring out where the arguments are processed has ended, due to cat blocking my laptop xD
2025-02-12 22:21:55 +0100 <tomsmeding> :3
2025-02-12 22:22:38 +0100 <tomsmeding> merijn: --repl-options is also a thing on Setup.hs, I see
2025-02-12 22:22:57 +0100 <tomsmeding> but `cabal build` doesn't accept it
2025-02-12 22:23:45 +0100 <EvanR> justsomeguy, does fmap sum (Just [1,2,3]) make sense
2025-02-12 22:23:58 +0100 <justsomeguy> I thought the reduction process would go like this (fmap (fmap sum) Just) [1,2,3] ==> fmap (Just (fmap sum [1,2,3])) .... I got this from substituting in (fmap sum) to the definition fmap f (Just x) = Just (f x).
2025-02-12 22:24:36 +0100 <euouae> Isn't it fmap (fmap sum) (Just [1,2,3])?
2025-02-12 22:24:40 +0100 <tomsmeding> justsomeguy: but it's `fmap f Just`, not `fmap f (Just x)`. ;)
2025-02-12 22:24:49 +0100 <EvanR> euouae, no
2025-02-12 22:25:00 +0100 <euouae> Okay
2025-02-12 22:25:09 +0100 <EvanR> f x y z = ((f x) y) z
2025-02-12 22:25:14 +0100tabaqui1(~root@87.200.129.102) (Ping timeout: 252 seconds)
2025-02-12 22:25:21 +0100 <euouae> I misreead it, so (->) on JUst
2025-02-12 22:26:12 +0100 <justsomeguy> Is there some tool I can put this into and see the evaluation process step-by-step?
2025-02-12 22:26:32 +0100 <justsomeguy> Maybe a haskell debugger?
2025-02-12 22:26:38 +0100 <merijn> tomsmeding: Yes, because cabal-install just invokes the Setup.hs parser
2025-02-12 22:26:43 +0100biberu(~biberu@user/biberu) biberu
2025-02-12 22:26:45 +0100 <monochrom> More than that, you need a tool that tells you what "fmap" resolves to.
2025-02-12 22:26:47 +0100 <tomsmeding> merijn: I do wonder if just dropping those flags is the right design though; sure, perhaps the user didn't intend to recompile the world, but perhaps they did!
2025-02-12 22:26:48 +0100yegorc(~yegorc@user/yegorc) (Leaving)
2025-02-12 22:26:50 +0100 <EvanR> (fmap (fmap sum) Just) [1,2,3] => (Just . fmap sum) [1,2,3]
2025-02-12 22:27:26 +0100tanky(sid630849@id-630849.tinside.irccloud.com)
2025-02-12 22:27:46 +0100 <EvanR> I reversed the arguments, nevermind me
2025-02-12 22:27:59 +0100 <tomsmeding> justsomeguy: write down the type of `fmap`; write down the types of the arguments it gets in your expression; match the two and see what the `f` in fmap's type should be
2025-02-12 22:28:02 +0100 <merijn> tomsmeding: I'm ahead of you by 7 years :)
2025-02-12 22:28:04 +0100 <merijn> tomsmeding: https://github.com/haskell/cabal/issues/5300
2025-02-12 22:28:11 +0100 <tomsmeding> justsomeguy: you'll get two different results for the outer and the inner fmap
2025-02-12 22:28:22 +0100 <tomsmeding> merijn: <3
2025-02-12 22:28:46 +0100tanky(sid630849@id-630849.tinside.irccloud.com) (Changing host)
2025-02-12 22:28:46 +0100tanky(sid630849@user/tanky) tanky
2025-02-12 22:29:03 +0100 <merijn> still open, sadly, because it was never enough of a problem to invent a solution
2025-02-12 22:29:41 +0100 <monochrom> I thought flags went into the hash and can trigger rebuild.
2025-02-12 22:30:10 +0100 <merijn> monochrom: only the ones I don't explicit remove from you behind your back :p
2025-02-12 22:30:19 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 22:30:19 +0100 <EvanR> justsomeguy, ghci has a debugger
2025-02-12 22:30:29 +0100 <EvanR> seems to be wildly unpopular
2025-02-12 22:30:34 +0100 <tomsmeding> very
2025-02-12 22:30:41 +0100tomsmedingnods vigorously
2025-02-12 22:30:54 +0100 <tomsmeding> oh you added "un"
2025-02-12 22:31:02 +0100 <tomsmeding> well it's still correct, but now non-sarcastically
2025-02-12 22:31:03 +0100 <merijn> monochrom: so they do, but I'm protecting you and or screwing you (choose as appropriate) by deleting any of your flags I deemed dumb :p
2025-02-12 22:31:11 +0100 <merijn> (that is, not affecting build artifacts)
2025-02-12 22:31:12 +0100 <EvanR> I write :t something in ghci and see if it 1. works and 2. corresponds with my expectations. It helped
2025-02-12 22:31:31 +0100 <monochrom> I sympathize with wanting a stepper. But at this stage it looks like you haven't even grokked type inference and instance resolution.
2025-02-12 22:31:38 +0100 <geekosaur> in particular :trace is a thing
2025-02-12 22:31:45 +0100target_i(~target_i@user/target-i/x-6023099) (Quit: leaving)
2025-02-12 22:31:51 +0100 <EvanR> I will now look up :trace
2025-02-12 22:32:21 +0100 <merijn> @quote stream.of.concious
2025-02-12 22:32:21 +0100 <lambdabot> No quotes match. That's something I cannot allow to happen.
2025-02-12 22:32:23 +0100 <merijn> aww
2025-02-12 22:32:26 +0100 <merijn> really?
2025-02-12 22:32:40 +0100 <tomsmeding> @quote stream.of.consciou
2025-02-12 22:32:40 +0100 <lambdabot> cmccann says: you want a debugger? GHC has one. Except that stepping through lazy evaluation is like listening to a stream of consciousness narrative told by a 5-year-old with ADHD.
2025-02-12 22:32:42 +0100 <geekosaur> @quote stream.of.conscious
2025-02-12 22:32:42 +0100 <lambdabot> cmccann says: you want a debugger? GHC has one. Except that stepping through lazy evaluation is like listening to a stream of consciousness narrative told by a 5-year-old with ADHD.
2025-02-12 22:32:43 +0100 <tomsmeding> english
2025-02-12 22:32:45 +0100 <tomsmeding> ah
2025-02-12 22:32:54 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-02-12 22:33:01 +0100 <merijn> there we go
2025-02-12 22:33:02 +0100 <geekosaur> whoops, didn;t notice I was beaten to it
2025-02-12 22:33:16 +0100 <monochrom> I am not sure that ADHD is necessary. :)
2025-02-12 22:33:37 +0100 <merijn> Can I just say that you all don't appreciate global uniqueness of typeclasses enough?
2025-02-12 22:33:43 +0100 <justsomeguy> fmap :: Functor f => (a -> b) -> f a -> f b
2025-02-12 22:33:45 +0100 <justsomeguy> [f := (->) e]
2025-02-12 22:33:47 +0100 <justsomeguy> fmap :: (a -> b) -> (->) e a -> (->) e a
2025-02-12 22:33:49 +0100 <justsomeguy> fmap :: (a -> b) -> (e -> a) -> e -> a
2025-02-12 22:33:51 +0100 <justsomeguy> y
2025-02-12 22:34:12 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-12 22:34:13 +0100 <justsomeguy> I just tried to paste a few lines for the type signature evalation of the outer fmap, did it go through?
2025-02-12 22:34:17 +0100 <tomsmeding> :t (.)
2025-02-12 22:34:18 +0100 <lambdabot> (b -> c) -> (a -> b) -> a -> c
2025-02-12 22:34:21 +0100 <euouae> Yeah but don't do that justsomeguy
2025-02-12 22:34:36 +0100 <tomsmeding> looks similar? :)
2025-02-12 22:34:44 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 260 seconds)
2025-02-12 22:34:46 +0100 <euouae> justsomeguy: you can paste with <https://paste.tomsmeding.com>
2025-02-12 22:34:57 +0100 <justsomeguy> Sorry, you're right. I'll use a pastebin next time.
2025-02-12 22:35:06 +0100 <tomsmeding> in your expression `fmap (fmap sum) Just [1,2,3]`, the second argument to the outer fmap is Just, which has type `a -> Maybe a`
2025-02-12 22:35:14 +0100 <monochrom> You have a typo but I think you are right.
2025-02-12 22:35:19 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 260 seconds)
2025-02-12 22:35:19 +0100tnt2tnt1
2025-02-12 22:35:38 +0100 <tomsmeding> so you get outer_fmap :: maybe (Maybe a -> b) -> (a -> Maybe a) -> (a -> b)
2025-02-12 22:35:51 +0100 <tomsmeding> ... without that "maybe"
2025-02-12 22:36:08 +0100 <mauke> justsomeguy: the last `(->) e a` should be `(->) e b`
2025-02-12 22:36:44 +0100 <haskellbridge> <magic_rb> so im trying to use either optparse-applicative or tomland to deserialize what i would call a tagged union, essentially this JSON: { type: one, something: foo } or { type: two, else: bar } where "type" must equal "one" or "two". But im struggling to make either work, i suspect its an inherent thing of both being based on applicatives?
2025-02-12 22:36:49 +0100 <justsomeguy> Ah, I see it now. Thanks mauke
2025-02-12 22:36:52 +0100 <EvanR> merijn, what's this in relation to
2025-02-12 22:37:03 +0100 <tomsmeding> merijn: in the .rst docs, can I refer to an option documented in a different file?
2025-02-12 22:37:03 +0100 <EvanR> because I've been noticing the same thing
2025-02-12 22:37:06 +0100 <merijn> EvanR: Having to debug implicits in scala :p
2025-02-12 22:37:47 +0100 <merijn> Scala is surprisingly ok as functional language, but implicits are the bane of my existence >.>
2025-02-12 22:38:14 +0100 <tomsmeding> magic_rb: that sounds plausible, you want parsing to depend on the result of some other part of the parser
2025-02-12 22:38:21 +0100remedan(~remedan@ip-62-245-108-153.bb.vodafone.cz) (Ping timeout: 252 seconds)
2025-02-12 22:38:22 +0100 <tomsmeding> that's monadic
2025-02-12 22:38:30 +0100 <haskellbridge> <magic_rb> yeah...
2025-02-12 22:38:35 +0100 <tomsmeding> this would need to be a primitive parser
2025-02-12 22:38:36 +0100remedan_(~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan
2025-02-12 22:38:40 +0100 <tomsmeding> that handles "tagged unions" somehow
2025-02-12 22:38:51 +0100 <merijn> I think it can work, though
2025-02-12 22:38:51 +0100 <EvanR> merijn, yeah this is how I expected it
2025-02-12 22:39:04 +0100 <haskellbridge> <magic_rb> merijn: i think it can work if you rely on failure and backtracking
2025-02-12 22:39:09 +0100 <merijn> you just need to have a (static) parser for the tag inside the subparser
2025-02-12 22:39:24 +0100michalz(~michalz@185.246.207.203) (Remote host closed the connection)
2025-02-12 22:39:44 +0100 <haskellbridge> <magic_rb> but with optparse-applicative i couldnt get it to work because i couldnt put the different alternatives in subparsers, only commands and optparse wouldnt backtrack through <|> just by itself
2025-02-12 22:40:12 +0100 <haskellbridge> <magic_rb> but ignoring optparse, i actually need this in tomland
2025-02-12 22:40:49 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-12 22:41:01 +0100 <justsomeguy> I think I got so into the habit of just plugging in definitions when evaluating by hand, that I forgot that I have to do type resolution during each step. Most of what I was desk-checking before was monomorphic.
2025-02-12 22:41:29 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-12 22:42:01 +0100 <EvanR> justsomeguy, only in the case of typeclass "methods" like fmap
2025-02-12 22:42:09 +0100 <EvanR> the definition depends crucially on the type
2025-02-12 22:42:19 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 260 seconds)
2025-02-12 22:42:19 +0100tnt2tnt1
2025-02-12 22:42:36 +0100 <tomsmeding> something like `map`, which polymorphic but not a typeclass method, can be rewritten as-is
2025-02-12 22:45:56 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 22:49:04 +0100Spawns_Carpeting(~mobile@user/spawns-carpeting/x-6969421) (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in)
2025-02-12 22:49:05 +0100 <tomsmeding> merijn: euouae: https://github.com/tomsmeding/cabal/commit/e1faaf097cb8e78a5736f176e5e9542396d278e2 what do you think?
2025-02-12 22:49:40 +0100takuan(~takuan@d8D86B601.access.telenet.be) (Remote host closed the connection)
2025-02-12 22:50:15 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 244 seconds)
2025-02-12 22:50:21 +0100 <euouae> tomsmeding: this is dumb, but do 'quotes' also prevent splitting?
2025-02-12 22:50:47 +0100Spawns_Carpeting(~mobile@user/spawns-carpeting/x-6969421) Spawns_Carpeting
2025-02-12 22:51:14 +0100 <euouae> I like how you commented the single option. I agree it's easier to understand now.
2025-02-12 22:51:38 +0100 <tomsmeding> euouae: good question!
2025-02-12 22:52:27 +0100 <euouae> good catch on C:\Program Files\ typo heh
2025-02-12 22:52:44 +0100 <tomsmeding> --repl-options doesn't even seem to accept "
2025-02-12 22:53:09 +0100 <euouae> oh... that's not good
2025-02-12 22:53:23 +0100 <tomsmeding> merijn: ? :p
2025-02-12 22:53:25 +0100 <euouae> I guess, realistically, it only gets passed stuff without spaces?
2025-02-12 22:53:31 +0100 <euouae> like -W arguments and -f
2025-02-12 22:54:13 +0100 <euouae> tomsmeding: I would say the rest is good, just hold off on the -options variant until more clarification is available
2025-02-12 22:54:54 +0100 <justsomeguy> I'm still confused. Maybe I way trying to apply the outer fmap first, instead of the inner fmap? Figuring out where I went wrong is going to bother me for a while.
2025-02-12 22:55:24 +0100 <monochrom> You were using the wrong fmap definition.
2025-02-12 22:55:33 +0100 <tomsmeding> justsomeguy: the order shouldn't matter, which fmap resolves to which definition is determined solely by the types
2025-02-12 22:56:02 +0100 <tomsmeding> euouae: experimentally, --ghc-options parses " but passes ' on unchanged
2025-02-12 22:56:12 +0100 <tomsmeding> so the "quotes" is indeed accurate, it seems
2025-02-12 22:56:13 +0100 <euouae> justsomeguy: try this instead: `fmap (+1) 2` first
2025-02-12 22:56:30 +0100 <monochrom> Or worse, you chose the wrong fmap definition, then you rationalized it by misinterpreting the rest of the expression.
2025-02-12 22:58:27 +0100 <monochrom> Wait, is fmap (+1) 2 supposed to type-check?
2025-02-12 22:58:39 +0100remedan_(~remedan@ip-62-245-108-153.bb.vodafone.cz) (Ping timeout: 260 seconds)
2025-02-12 22:58:54 +0100 <merijn> monochrom: I mean, is it? :p
2025-02-12 22:59:07 +0100remedan(~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan
2025-02-12 22:59:11 +0100 <merijn> > fmap (+1) 2
2025-02-12 22:59:12 +0100 <lambdabot> error:
2025-02-12 22:59:12 +0100 <lambdabot> • Ambiguous type variable ‘f0’ arising from a use of ‘show_M207628434199...
2025-02-12 22:59:12 +0100 <lambdabot> prevents the constraint ‘(Show (f0 Integer))’ from being solved.
2025-02-12 22:59:15 +0100 <merijn> aww
2025-02-12 22:59:19 +0100 <merijn> > fmap (+1) 2 3
2025-02-12 22:59:21 +0100 <lambdabot> error:
2025-02-12 22:59:21 +0100 <lambdabot> • Could not deduce (Num t0)
2025-02-12 22:59:21 +0100 <lambdabot> from the context: (Num t, Num t1, Num (t1 -> t))
2025-02-12 22:59:24 +0100 <tomsmeding> % fmap (+1) (2 :: Data.Monoid.Sum Int)
2025-02-12 22:59:24 +0100 <yahb2> Sum {getSum = 3}
2025-02-12 22:59:26 +0100 <euouae> You can do :: Identity Int
2025-02-12 22:59:32 +0100 <merijn> did lambdabot lose his evil instances?
2025-02-12 23:00:01 +0100 <tomsmeding> ah or Identity, yes
2025-02-12 23:00:27 +0100 <monochrom> > Identity 2 + 3
2025-02-12 23:00:29 +0100 <lambdabot> Identity 5
2025-02-12 23:00:34 +0100 <monochrom> fancy
2025-02-12 23:00:45 +0100 <tomsmeding> Identity implements a lot of type classes!
2025-02-12 23:00:48 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 264 seconds)
2025-02-12 23:00:50 +0100 <tomsmeding> for better or for worse
2025-02-12 23:02:30 +0100 <tomsmeding> % System.Process.system "ghci -e ':i Data.Functor.Identity.Identity' | grep '^instance' | cut -d' ' -f2 | xargs"
2025-02-12 23:02:30 +0100 <yahb2> Traversable Applicative Bounded Enum Eq Floating Foldable Fractional Functor Integral Monad Monoid Num Ord Read RealFloat RealFrac Real Semigroup Show ; ExitSuccess
2025-02-12 23:02:33 +0100finsternis(~X@23.226.237.192) finsternis
2025-02-12 23:03:21 +0100 <tomsmeding> what even is this ordering, why is it alphabetically ordered except that Traversable is first
2025-02-12 23:03:29 +0100 <tomsmeding> "it's always `traverse`"?
2025-02-12 23:04:22 +0100 <monochrom> Interesting.
2025-02-12 23:04:40 +0100gmg(~user@user/gehmehgeh) gehmehgeh
2025-02-12 23:06:21 +0100gmg(~user@user/gehmehgeh) (Client Quit)
2025-02-12 23:06:42 +0100 <merijn> tomsmeding: Funnily enough still true in scala, although not always as easily implemented :p
2025-02-12 23:06:59 +0100 <tomsmeding> merijn: what is?