2025/02/12

Newest at the top

2025-02-12 15:17:54 +0100alp(~alp@user/alp) (Ping timeout: 248 seconds)
2025-02-12 15:17:23 +0100Wygulmage(~Wygulmage@user/Wygulmage) Wygulmage
2025-02-12 15:15:10 +0100alp_(~alp@5.226.4.112)
2025-02-12 15:12:09 +0100misterfish(~misterfis@84.53.85.146) (Ping timeout: 260 seconds)
2025-02-12 15:11:12 +0100Crypt-LabCryptLab
2025-02-12 15:10:53 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
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:08:16 +0100__monty__(~toonn@user/toonn) toonn
2025-02-12 15:04:52 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 252 seconds)
2025-02-12 15:00:22 +0100tri(~tri@ool-44c70bcb.dyn.optonline.net)
2025-02-12 14:56:48 +0100zungi(~tory@user/andrewchawk) andrewchawk
2025-02-12 14:55:10 +0100alp(~alp@user/alp) alp
2025-02-12 14:55:10 +0100alp(~alp@5.226.4.112) (Changing host)
2025-02-12 14:55:05 +0100alp(~alp@5.226.4.112)
2025-02-12 14:52:26 +0100forell(~forell@user/forell) forell
2025-02-12 14:51:25 +0100forell(~forell@user/forell) (Quit: ZNC - https://znc.in)
2025-02-12 14:51:12 +0100zungi(~tory@user/andrewchawk) (Ping timeout: 264 seconds)
2025-02-12 14:49:17 +0100brachyrhynchos(~brachyrhy@user/brachyrhynchos) (Remote host closed the connection)
2025-02-12 14:43:15 +0100brachyrhynchos(~brachyrhy@user/brachyrhynchos) brachyrhynchos
2025-02-12 14:38:54 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 260 seconds)
2025-02-12 14:36:32 +0100hgolden(~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) hgolden
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:34:10 +0100alfiee(~alfiee@user/alfiee) alfiee
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:32:54 +0100 <bgamari> in particular, intermediate structures can be deforested readily
2025-02-12 14:32:36 +0100 <bgamari> since it optimises specific parsers reasonably well
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:31:16 +0100 <bgamari> indeed cborg is an interesting design (primarily Duncan's)
2025-02-12 14:31:15 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
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: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: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: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:27:59 +0100 <bgamari> fair enough
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:47 +0100Digit(~user@user/digit) Digit
2025-02-12 14:27:43 +0100 <bgamari> yes
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:02 +0100Digit(~user@user/digit) (Read error: Connection reset by peer)
2025-02-12 14:26:44 +0100 <bgamari> sure, that would be a great source of inspiration
2025-02-12 14:26:37 +0100 <bgamari> what concretely is the question about `return $!`?
2025-02-12 14:26:33 +0100 <haskellbridge> <Profpatsch> I could write down some questions
2025-02-12 14:26:21 +0100 <bgamari> a great suggestion
2025-02-12 14:26:13 +0100 <haskellbridge> <Profpatsch> Haskell Unfolder? :P
2025-02-12 14:25:50 +0100sawilagar(~sawilagar@user/sawilagar) sawilagar
2025-02-12 14:25:40 +0100 <bgamari> Profpatch: I don't think it was ever written down
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:24:38 +0100 <haskellbridge> <Profpatsch> Up to go_fast that is, which does not have any pragma
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:23:09 +0100 <haskellbridge> <Profpatsch> bgamari: ^ I guess same question :)