Newest at the top
2025-05-07 13:00:10 +0200 | <tomsmeding> | reserving "peek" for "read but don't advance cursor" |
2025-05-07 13:00:02 +0200 | <tomsmeding> | and then I would rename the `peek` operation (which _does_ increment the read offset) to perhaps `readStorable` |
2025-05-07 12:59:15 +0200 | <tomsmeding> | gets you further from standard parser combinators, but nobody says that you must adhere to the standard construction |
2025-05-07 12:58:45 +0200 | <tomsmeding> | perhaps it makes more sense to have a peekOffset instead of this repeated savePtr/skip/peek dance? |
2025-05-07 12:57:56 +0200 | <tomsmeding> | (this is ContT with a different name) |
2025-05-07 12:57:50 +0200 | <tomsmeding> | https://git.tomsmeding.com/yahb2/tree/src/ExitEarly.hs |
2025-05-07 12:57:36 +0200 | <tomsmeding> | perhaps it's nicer to put early-exiting in the monad instead of using whileM |
2025-05-07 12:56:56 +0200 | <tomsmeding> | oh the boolean |
2025-05-07 12:56:47 +0200 | <tomsmeding> | what is 'continue'? |
2025-05-07 12:56:41 +0200 | <haskellbridge> | <magic_rb> it makes the math simpler |
2025-05-07 12:56:36 +0200 | <haskellbridge> | <magic_rb> yeah |
2025-05-07 12:56:35 +0200 | <tomsmeding> | right |
2025-05-07 12:56:35 +0200 | <haskellbridge> | <magic_rb> after the inner action |
2025-05-07 12:56:32 +0200 | <tomsmeding> | restore read offset after you exit the block? |
2025-05-07 12:56:25 +0200 | <haskellbridge> | <magic_rb> saves and restores the ptr |
2025-05-07 12:56:18 +0200 | <tomsmeding> | what does savePtr do? |
2025-05-07 12:56:11 +0200 | <haskellbridge> | <magic_rb> thank you :) |
2025-05-07 12:55:36 +0200 | <tomsmeding> | but it already looks much nicer, well done |
2025-05-07 12:55:20 +0200 | <tomsmeding> | with a newline after the `->` |
2025-05-07 12:55:17 +0200 | <tomsmeding> | myself I would probably write that foldM_ loop like this: forM_ (zip chunks (scanl' (+) 0 (map snd chunks))) $ \((chunk, len), off) -> copyPtrToMutableByteArray ba off chunk len |
2025-05-07 12:54:50 +0200 | <haskellbridge> | <magic_rb> unsafePackCStringLen |
2025-05-07 12:54:45 +0200 | <haskellbridge> | <magic_rb> its named weirdly |
2025-05-07 12:54:42 +0200 | <haskellbridge> | <magic_rb> oh there is |
2025-05-07 12:54:08 +0200 | <haskellbridge> | <magic_rb> didnt see it |
2025-05-07 12:53:43 +0200 | <tomsmeding> | is there no unsafePackCString without finalizer? |
2025-05-07 12:52:13 +0200 | <haskellbridge> | <magic_rb> newest version which actually works |
2025-05-07 12:52:08 +0200 | <haskellbridge> | <magic_rb> tomsmeding: https://paste.tomsmeding.com/TCeWNqJV |
2025-05-07 12:40:08 +0200 | mistivia | (~mistivia@user/mistivia) mistivia |
2025-05-07 12:39:31 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) lortabac |
2025-05-07 12:35:23 +0200 | mistivia | (~mistivia@user/mistivia) (Read error: Connection reset by peer) |
2025-05-07 12:23:45 +0200 | xff0x | (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 244 seconds) |
2025-05-07 12:19:02 +0200 | rvalue- | rvalue |
2025-05-07 12:13:24 +0200 | rvalue | (~rvalue@user/rvalue) (Ping timeout: 260 seconds) |
2025-05-07 12:12:20 +0200 | rvalue- | (~rvalue@user/rvalue) rvalue |
2025-05-07 12:08:02 +0200 | rvalue | (~rvalue@user/rvalue) rvalue |
2025-05-07 12:07:26 +0200 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |
2025-05-07 12:07:24 +0200 | rvalue | (~rvalue@user/rvalue) (Read error: Connection reset by peer) |
2025-05-07 11:55:26 +0200 | lortabac | (~lortabac@2a0d:e487:53f:1bb4:a731:33f3:afa0:8130) (Ping timeout: 268 seconds) |
2025-05-07 11:49:20 +0200 | Square2 | (~Square4@user/square) (Ping timeout: 252 seconds) |
2025-05-07 11:44:27 +0200 | ubert1 | ubert |
2025-05-07 11:43:07 +0200 | takuan | (~takuan@d8D86B601.access.telenet.be) |
2025-05-07 11:42:09 +0200 | ubert1 | (~Thunderbi@2a02:8109:ab8a:5a00:3fca:6e1e:2b37:f18d) ubert |
2025-05-07 11:31:17 +0200 | sayurc | (~sayurc@169.150.203.34) (Quit: Konversation terminated!) |
2025-05-07 11:28:59 +0200 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 244 seconds) |
2025-05-07 11:24:09 +0200 | econo_ | (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
2025-05-07 11:22:02 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) Unicorn_Princess |
2025-05-07 11:14:42 +0200 | lortabac | (~lortabac@2a0d:e487:53f:1bb4:a731:33f3:afa0:8130) |
2025-05-07 11:12:07 +0200 | j1n37- | (~j1n37@user/j1n37) (Ping timeout: 276 seconds) |
2025-05-07 11:11:42 +0200 | tromp | (~textual@2001:1c00:3487:1b00:d43:3b62:1503:cb84) |
2025-05-07 11:11:01 +0200 | j1n37 | (~j1n37@user/j1n37) j1n37 |