Newest at the top
2025-05-07 13:22:37 +0200 | <haskellbridge> | <magic_rb> ive never used ContT so trying to shove it in will probably only confuse me more |
2025-05-07 13:22:24 +0200 | <haskellbridge> | <magic_rb> i think for now this is good enough |
2025-05-07 13:22:15 +0200 | <haskellbridge> | <magic_rb> or at least i dont know how |
2025-05-07 13:22:12 +0200 | <haskellbridge> | <magic_rb> hm, i dont think i can lift PeekT through ContT |
2025-05-07 13:20:57 +0200 | fp | (~Thunderbi@wireless-86-50-140-117.open.aalto.fi) fp |
2025-05-07 13:17:28 +0200 | fp | (~Thunderbi@2001:708:20:1406::1370) (Ping timeout: 268 seconds) |
2025-05-07 13:15:10 +0200 | xff0x | (~xff0x@2405:6580:b080:900:b221:6d86:16ab:9b95) |
2025-05-07 13:14:42 +0200 | <haskellbridge> | <magic_rb> yeah getPtr is just to fetch the current ptr value since i need to store it for later |
2025-05-07 13:13:52 +0200 | <haskellbridge> | <magic_rb> i track it separetely so im not traversing the list twice |
2025-05-07 13:10:56 +0200 | j1n37 | (~j1n37@user/j1n37) j1n37 |
2025-05-07 13:10:33 +0200 | j1n37 | (~j1n37@user/j1n37) (Ping timeout: 244 seconds) |
2025-05-07 13:08:30 +0200 | euleritian | (~euleritia@77.23.248.100) |
2025-05-07 13:08:16 +0200 | euleritian | (~euleritia@77.23.248.100) (Remote host closed the connection) |
2025-05-07 13:04:15 +0200 | <tomsmeding> | (it's the final result of the scanl' in my code that I discard) |
2025-05-07 13:03:48 +0200 | <tomsmeding> | and filenameLength does not need to be tracked explicitly, it can be computed by buildFilename |
2025-05-07 13:02:57 +0200 | <tomsmeding> | oh ignore that, you're not reading pointers here |
2025-05-07 13:02:44 +0200 | <tomsmeding> | magic_rb: note that Ptr is Storable |
2025-05-07 13:02:15 +0200 | <tomsmeding> | if it just returns a Ptr that you separately record the length for anyway |
2025-05-07 13:02:01 +0200 | <tomsmeding> | what does the argument to peekPtr do? |
2025-05-07 13:01:46 +0200 | jespada | (~jespada@r179-25-194-114.dialup.adsl.anteldata.net.uy) jespada |
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) |