Newest at the top
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 +0100 | Digit | (~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 +0100 | Digit | (~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 +0100 | sawilagar | (~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 +0100 | sawilagar_ | (~sawilagar@user/sawilagar) (Quit: Leaving) |
2025-02-12 14:17:20 +0100 | forell | (~forell@user/forell) forell |
2025-02-12 14:11:43 +0100 | florida | (~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b) (Quit: Leaving) |
2025-02-12 14:09:39 +0100 | ljdarj1 | ljdarj |
2025-02-12 14:09:39 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 276 seconds) |
2025-02-12 14:09:01 +0100 | ljdarj1 | (~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 +0100 | Guest34 | (~Guest34@96-8-132-1.block0.gvtc.com) (Client Quit) |
2025-02-12 14:02:10 +0100 | Guest34 | (~Guest34@96-8-132-1.block0.gvtc.com) |
2025-02-12 14:02:00 +0100 | jespada | (~jespada@2800:a4:22f4:ae00:fc16:e598:5958:94e6) jespada |
2025-02-12 13:59:59 +0100 | <haskellbridge> | <Profpatsch> there’s a bunch of really cool tricks in there |
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: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:54:45 +0100 | florida | (~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b) |
2025-02-12 13:53:48 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-02-12 13:53:24 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) L29Ah |
2025-02-12 13:52:01 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Remote host closed the connection) |
2025-02-12 13:49:19 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-12 13:45:07 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-12 13:43:59 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2) |
2025-02-12 13:43:33 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-02-12 13:41:52 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Remote host closed the connection) |
2025-02-12 13:37:40 +0100 | lockywolf_ | (~lockywolf@213.165.252.157) lockywolf |
2025-02-12 13:37:22 +0100 | lockywolf | (~lockywolf@213.165.252.157) (Read error: Connection reset by peer) |
2025-02-12 13:35:38 +0100 | mange | (~user@user/mange) (Remote host closed the connection) |
2025-02-12 13:34:24 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) lortabac |
2025-02-12 13:29:09 +0100 | tnt2 | tnt1 |
2025-02-12 13:29:09 +0100 | tnt1 | (~Thunderbi@user/tnt1) (Ping timeout: 244 seconds) |
2025-02-12 13:29:08 +0100 | ash3en1 | ash3en |
2025-02-12 13:29:08 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 272 seconds) |