2025/02/12

Newest at the top

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 :)
2025-02-12 14:21:41 +0100sawilagar_(~sawilagar@user/sawilagar) (Quit: Leaving)
2025-02-12 14:17:20 +0100forell(~forell@user/forell) forell
2025-02-12 14:11:43 +0100florida(~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b) (Quit: Leaving)
2025-02-12 14:09:39 +0100ljdarj1ljdarj
2025-02-12 14:09:39 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 276 seconds)
2025-02-12 14:09:01 +0100ljdarj1(~Thunderbi@user/ljdarj) ljdarj
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:02:37 +0100Guest34(~Guest34@96-8-132-1.block0.gvtc.com) (Client Quit)
2025-02-12 14:02:10 +0100Guest34(~Guest34@96-8-132-1.block0.gvtc.com)
2025-02-12 14:02:00 +0100jespada(~jespada@2800:a4:22f4:ae00:fc16:e598:5958:94e6) jespada