josephhgarvin.bsky.social
voicecoding latency and throughput hacker. How did I get here and what am I doing in this hand basket? he/him
623 posts
384 followers
1,565 following
Prolific Poster
Active Commenter
comment in response to
post
I shouldn't have emphasized copying, really it's an issue with construction/destruction in general. The compiler wants to treat them as special because they start/end object lifetime, but that makes it harder to replace them with methods that do so in batches.
comment in response to
post
No I mean classes that are *not* trivially copyable. I want to use SIMD to in effect run multiple nontrivial constructors in parallel. Or well I'm not sure I want to do it so much as I think that the fact that you can't seems like a hole in the traditional OOP model.
comment in response to
post
Bluesky's decentralization is pretty meh so far. They can still make defacto centralized censorship decisions (and have done so). Every feature becomes a research project for dubious gain. Still no bookmarks, group DMs, images in DMs, and the bot problem is worse here than Twitter.
comment in response to
post
That's true but I'm thinking for things that are not POD
comment in response to
post
I was thinking about OOP focus on single object methods which is not SIMD friendly, and you can make your own higher level ObjectGroup for most methods, but construction/destruction is special from compiler perspective b/c it determines lifetime, so needs lang support AFAICT.
comment in response to
post
Nah I just meant a normal register like eax, you want to write 3 bytes of it to a memory location without touching the 4th byte
comment in response to
post
1. Having a real string object makes the C++ code more similar to the code in most other languages, in effect making much more training data relevant
2. LLMs find higher abstraction easier, like humans
3. There are so many more tokens for the C version that can go wrong
comment in response to
post
stackoverflow.com/a/56777274/5...
comment in response to
post
C++ has those two but I think the issue is the same, but @welltypedwit.ch is right you can just make the lexer smarter
comment in response to
post
That's a good point, my thinking was colored by my hacky preprocessor to add them to C++, it relies on the user defined literal syntax which comes *after* the string, `"hello"_f` which is how I get existing parsers/LSP to not be bothered by it (I define a noop `_f` they think is being called).
comment in response to
post
Wonder if cargo could benefit from redo's trick here, using more of the information from stat, still super cheap to check compared to full hashing.
apenwarr.ca/log/20181113
comment in response to
post
.. logic would be terrible. Because you would need to expand the escaped quotes to code where the quotes are not escaped, unless they are inside *another* string where they are escaped... blech
comment in response to
post
Nah just in the habit of looking at an API and thinking "does this really need dynamic allocation?"
comment in response to
post
Nice! I did a deep dive on Python before and it was mostly that any import from stdlib triggered a giant cascade of other imports, and besides the work to load then Python has a lot of places to has to check for the files too. How long until Polaris is competitive with dash? 😁
comment in response to
post
I haven't timed it but I assume deno startup time must suffer from JIT? I guess for this test it would stay in interpreter mode probably
comment in response to
post
I don't think there's really a good reason it has to work this way but when you specify the number of workers with -j it spawns one sleep per worker as a placeholder... I guess because there's no Option<T> ??? 🤷♂️
comment in response to
post
Fun fact: calling pthread_exit from the main thread circumvents this behavior. Your child threads will stay alive, but because argv and env vars are stored on the main thread stack your process will show as "<defunct>" in ps and /proc/$pid/{cmdline, environ} stop working :D
comment in response to
post
I think this would work well because ideally containers should have runs of contiguous elements for cache efficiency
comment in response to
post
I've been thinking the ideal way to do iteration for containers is a nested loop, where outer loop iterates slices and inner loop iterates each slice. You could imagine an alternative stdlib where Iterator is built to yield slices and `for foo in bar` expands to the nested loop.
comment in response to
post
I don't think you can use this to change the type of a local in place -- you want the drop for the original to not run, but also have direct access to the new value. This only lets you go through a ref and if you manually drop the original the backing memory will be gone IIUC