2025/05/07

Newest at the top

2025-05-07 10:28:57 +0200 <tomsmeding> both of these things allow you to separate the things that _must_ happen procedurally (parsing) and the things that can happen more functionally (albeit with effects)
2025-05-07 10:28:27 +0200 <haskellbridge> <magic_rb> didnt think of deferring it to later with the [] idea, dont know why that didnt occur to me
2025-05-07 10:27:57 +0200 <tomsmeding> that sounds like O(n^2) because presumably that grow operation is O(n)
2025-05-07 10:27:55 +0200 <haskellbridge> <magic_rb> yeah will also do that one
2025-05-07 10:27:43 +0200 <tomsmeding> similar question for `s ^. output`; it's a VM-something that you manually unsafeGrow by 1 every time you find an entry
2025-05-07 10:25:50 +0200 <haskellbridge> <magic_rb> thanks
2025-05-07 10:25:49 +0200 <haskellbridge> <sm> 👍️
2025-05-07 10:25:40 +0200 <haskellbridge> <magic_rb> oh thats a great idea
2025-05-07 10:25:31 +0200 <tomsmeding> separates responsibility of the parser (this code) and the whole byte array writing nonsense
2025-05-07 10:25:11 +0200 <tomsmeding> why not represent it as a list of (Ptr Word8, Int) pairs, and then collect the filename in one go after reading all chunks
2025-05-07 10:24:55 +0200 <haskellbridge> <magic_rb> probably should have been a Strict ByteString ?
2025-05-07 10:24:35 +0200 <tomsmeding> why is the filename a mutablebytearray that you resize every time you append a little chunk for it?
2025-05-07 10:24:32 +0200 <haskellbridge> <magic_rb> the official doc for FAT32 is horrendous and the osdev wiki page is only marginally better
2025-05-07 10:24:15 +0200 <haskellbridge> <magic_rb> yeah thats also missing, something i figured out how to do yesterday
2025-05-07 10:24:01 +0200 <haskellbridge> <magic_rb> the exact structure of it is super fucked, its like 0-7 then 10-13 then 18-24 or something like that
2025-05-07 10:24:00 +0200 <tomsmeding> I see no functionality for handling a non-long filename, is why I was confused
2025-05-07 10:23:42 +0200 <tomsmeding> I see
2025-05-07 10:23:37 +0200 <haskellbridge> <magic_rb> but yeah you accumulate the filename over possibly many entries
2025-05-07 10:23:28 +0200 <haskellbridge> <magic_rb> but its broken, i misunderstood how it works
2025-05-07 10:23:21 +0200 <haskellbridge> <magic_rb> its accumulated
2025-05-07 10:23:17 +0200 <haskellbridge> <sm> a field in PeekDirectoryState isn't it ?
2025-05-07 10:23:14 +0200 <haskellbridge> <magic_rb> yeah
2025-05-07 10:23:09 +0200 <tomsmeding> perhaps you expect to first get into the 'then' on line 31?
2025-05-07 10:22:37 +0200 <haskellbridge> <sm> that's great, so just refactoring code golfing remains. That's fun
2025-05-07 10:22:36 +0200 <tomsmeding> magic_rb: where does that filename field on line 42 come from?
2025-05-07 10:21:56 +0200 <haskellbridge> <magic_rb> sm: it does so far, doesnt mean im happy with it :P
2025-05-07 10:20:56 +0200 <tomsmeding> magic_rb: those manual read-at-offset and plusPtr operations scream for parser combinators
2025-05-07 10:20:15 +0200 <haskellbridge> <sm> have you achieved the goals, other than how the code looks ? does it work, is it performant ?
2025-05-07 10:20:03 +0200sajenim(~sajenim@user/sajenim) sajenim
2025-05-07 10:19:16 +0200 <haskellbridge> <magic_rb> im still considering extending my bsc just because of the thesis so i can submit something im actually happy with
2025-05-07 10:18:57 +0200 <haskellbridge> <magic_rb> sm: so far im fresh out on the ideas :P and theoretically the deadline is in 2 months, i really despise the dutch system where you have 3 months for you thesis
2025-05-07 10:18:19 +0200 <haskellbridge> <magic_rb> finished it yesterday so there is some low hanging fruit
2025-05-07 10:18:04 +0200 <haskellbridge> <magic_rb> the ifs could be done with case, see that already
2025-05-07 10:17:44 +0200 <haskellbridge> <magic_rb> tomsmeding: https://paste.tomsmeding.com/RKZytHDb
2025-05-07 10:16:00 +0200 <haskellbridge> <Bowuigi> Try various approaches and see what is more elegant, that's the Haskell way (tm)
2025-05-07 10:14:20 +0200 <tomsmeding> I'd be surprised if it's a lot of work
2025-05-07 10:14:09 +0200 <tomsmeding> and one that's currently written to work on ByteString is probably a good place to start :p
2025-05-07 10:13:53 +0200 <tomsmeding> magic_rb: and also, you say "can't use flatparse because I don't have a bytestring" -- may be true, but there's no reason one cannot write (or hack) a parser combinator library to work on a Ptr instead
2025-05-07 10:13:46 +0200 <haskellbridge> <sm> at least to start with. You might get some refactoring ideas
2025-05-07 10:12:27 +0200 <haskellbridge> <sm> alright, well that might involve some procedural-looking code, and if so that's fine, I'd say
2025-05-07 10:12:07 +0200 <haskellbridge> <magic_rb> tomsmeding will share, give me a sec
2025-05-07 10:11:45 +0200 <haskellbridge> <magic_rb> Essentially
2025-05-07 10:11:41 +0200 <haskellbridge> <magic_rb> Seeing if a FUSE FAT driver can be done in haskell, while remaining performant and haskell-y
2025-05-07 10:11:05 +0200 <haskellbridge> <sm> but I don't know if it's the right language for your thesis problem.. what's the argument of the thesis ?
2025-05-07 10:11:02 +0200 <tomsmeding> magic_rb: what does that code snippet look like?
2025-05-07 10:10:32 +0200 <haskellbridge> <sm> haskell code doesn't have to look functional. It's a good imperative language too
2025-05-07 10:10:05 +0200 <haskellbridge> <Bowuigi> Parser combinators in general seem to fit
2025-05-07 10:09:54 +0200 <haskellbridge> <magic_rb> So im trying to see if im perhaps missing something
2025-05-07 10:09:41 +0200 <haskellbridge> <magic_rb> sm indeed, but thats like the whole driver, so then the conclusion of my thesis would be "dont use haskell for this" :P
2025-05-07 10:08:51 +0200 <haskellbridge> <magic_rb> Bowuigi flatparse is fascinating but i dont have a bytestring. I have a Ptr to a mmaped file.