> Yes: I used arenas a lot when I was shipping C code; they're a very easy way to get big speed boosts out of code that does a lot of malloc
This is something I look forwards to exploring later in my current pet project, right now it has possibly the stupidest GC (just tracks C++ 'new' allocated objects) but is set up for drop in arena allocation with placement new so, we'll see how much that matters later on. There are two allocation patterns, statements and whatnot get compiled to static continuation graphs which push and pop secondary continuations and Value objects to do the deed so, I believe, the second part with the rapid temporary object creation will see the most benefit.
Anyhoo, slightly different pattern where the main benefits will most likely be from the cache locality or whatever, assuming I can even make a placement new arena allocator which is better than the performance of the regular C++ new. Never know, might even add more overhead than just tracking a bunch of raw C++ pointers as I can't imagine there's even a drop of performance which C++ new left on the table?
C++ has the ability to override new and delete, and the standard library supports allocators as type parameters exactly because the standard implementation purpose is to be good enough.
There are plenty of specialisations that get more performance out, e.g. multi-threaded code in NUMA architectures.
In this digital world, the core components of writing can feel overwhelming, by leveraging crutches learned by reading hundreds of dead internet comments, the core principles of writing in an ever-shifting landscape can be more crucial than ever.
Isn't that the way if works, everybody throws their ideas against the wall and sees what sticks? I haven't really seen anyone recommend using xml in a long while...
And isn't this a 'remote' tool protocol? I mean, I've been plugging away at a VM with Claude for a bit and as soon as the repl worked it started using that to debug issues instead of "spray and pray debugging" or, my personal favorite, make the failing tests match the buggy code instead of fixing the code and keeping the correct tests.
So you pay $20/month to be able to earn some crypto-coins they generate out of thin air to be used for...
If they aren't paying the equivalent of whatever the government allows you to deduct for 'wear and tear' on your vehicle then you're basically just subsidizing their data collection.
I don't even have an opinion on this, you do you.
--edit--
Oh, I saw down thread they're primarily a fleet services company and that explains a bunch. $20/month per car probably makes sense if you're outfitting an entire fleet and integrate it with your wonky in-house drivers' app which is barely fit for purpose. Yeah, I'm not bitter...
All I really have an issue with is the claim you get compensated for the time and energy you, essentially, donate to the company. If that's what you want to do with your time then by all means...
It just seems like a weird business model to me, they sell a pimped-out dash cam (fair enough) and pay some tokens (or rely on your philosophical bent) so you're willing to turn over all your data so they can repackage and sell it. To give credit where credit is due, they seem to be completely transparent with this and if the people who participate don't care then why should I?
Back in the day, before I had our robot overlords to write code for me, I would just use C++ as a fancy C with classes and a larger standard library. Or Boost as they have some fun and exciting things to play with.
Now, the robots do a good enough job at writing clean C++ without going too crazy that I just kind of let them do their thing and review the very readable code to keep them on the right path.
I can't even imagine the nightmare with something like a browser where you'd be pulling in C++ dependencies from all over the place and each having their own way of doing things. I mean, I get annoyed when C libs don't do the 'object to be operated on' as the first argument to functions so they can't be trivially wrapped in Python C-API extensions super easily using generators.
--edit--
Actually, this got me thinking, I was exploring using zig for a project (might still do, dunno) and came up with this meta-circular comptime peg grammar 'evaluator' to generate, at compile time, the parser for the peg grammar used to generate the parser for the runtime peg generator tool. Admittedly, I was pretty high when I cooked up this scheme with the robots but it seems to be viable...
In the couple years I've owned my (now) 10 year old wee-Fiat I think I've opened the hood once, when I first bought it, just to confirm the engine was actually there. Other than that, what engine?
Probably should pop it open (heh, Fiat Pop, no pun intended) to fix the headlight which has been out for about a year but it was a lot easier to get a (free) veteran's plate than poke around in there and you pretty much have to commit vehicular homicide in front of a cop to get pulled over with a veteran's plates so... I mean, it came with an extra headlight for a reason.
But, yeah, tiny little engine for a tiny little car which does it's job without issue, what's not to love?
Claude will also tend to go for the "test-passing" development style where it gets super fixated on making the tests pass with no regards to how the features will work with whatever is intended to be built later.
I had to throw away a couple days worth of work because the code it built to pass the tests wasn't able to do the actual thing it was designed for and the only workaround was to go back and build it correctly while, ironically, still keeping the same tests.
You kind of have to keep it on a short leash but it'll get there in the end... hopefully.
I used to contribute to a FLOSS project years ago and decided to use Claude to do some work on their codebase recently where they basically told me to go away with these daffy robots or, at the very least, nobody will review the code. Luckily, I know better than putting too much work into something like this and only wasted enough time to demonstrate the basic functionality.
So... I have a debugged library (which is what I was trying to give to them) that I can use on another project I've been working (the robots) to the bone on and they get to remain AI free, everyone wins.
No, no... I know better than putting too much work into something before poking the core devs and seeing if it's something they'd be interested in.
If they don't want code written by a robot then what do I care? Mostly I wanted to see how well the daffy robots could work in an established code base and I chose one I was familiar with to experiment on and they were less than receptive so, their loss, I suppose...
I saw another example where they had 'mm' as well so I'm guessing that's all part of the type system as postfix attributes?
Poked around in the docs a bit but didn't see a grammar so, dunno... I can only guess it does automatic type conversion if you only type the numbers without the qualifier.
I used to have Hopi and Navajo friends and I have no idea what they are referring to.
One thing I can tell you that the whole situation up there is contentious and complicated between the tribes, the states and the feds where one could support any argument as there isn't some standard "Rez Life" one can point at.
I mean, I used to have this one friend who grew up (and still had family) on a part of the reservation which was completely surrounded by the other tribe and her and my other friends (from the other tribe, don't quite remember which was which here) would get into some serious arguments at the bar over the issue where we'd have to separate them before it came to fisticuffs.
This is something I look forwards to exploring later in my current pet project, right now it has possibly the stupidest GC (just tracks C++ 'new' allocated objects) but is set up for drop in arena allocation with placement new so, we'll see how much that matters later on. There are two allocation patterns, statements and whatnot get compiled to static continuation graphs which push and pop secondary continuations and Value objects to do the deed so, I believe, the second part with the rapid temporary object creation will see the most benefit.
Anyhoo, slightly different pattern where the main benefits will most likely be from the cache locality or whatever, assuming I can even make a placement new arena allocator which is better than the performance of the regular C++ new. Never know, might even add more overhead than just tracking a bunch of raw C++ pointers as I can't imagine there's even a drop of performance which C++ new left on the table?
reply