HNHacker News
TopNewBestAskShowJobs

jesse__

1,414 karma · joined April 4, 2022

jesse@scallywag.software

Website: https://scallywag.software

Bonsai :: A 3D Voxel engine, in a pot: https://github.com/scallyw4g/bonsai

Poof :: A C Metaprogramming Environment: https://github.com/scallyw4g/poof

Reddit: https://reddit.com/r/scallywag_software

submissionscomments
jesse__··on Understanding C++ Ownership System
Nice, thanks. I haven't read those gingerbill ones, I'll take a look :D
jesse__··on Understanding C++ Ownership System
Good one. I was blessed to have the opportunity to watch that one live, on stream. It's always stuck with me and, now that I think about it, is the best resource I know of that puts those ideas into words/writing.
jesse__··on Understanding C++ Ownership System
In reverse order they were asked ..

The best argument I've ever come across against using RAII is that you end up with these nests of objects pointing to one another, and if something fails, the cleanup code can really only do one thing, which is unwind and deallocate (or whatever the cleanup path is). This structure, generally, precludes the possibility of context dependent resource re-usage on initialization failure, or on deallocation, because you kind of have to have only one deallocation path. Obviously, you could imagine supporting in an RAII context, but, the point is that you probably have to put a fair bit of conscious effort into doing that, whereas if you have a less .. rigid.. ownership model, it becomes completely trivial.

I agree that the allocation model and ownership model are independent concepts. I mentioned arena allocation because the people I know that reject the traditional C++ ownership model generally tend to favor arenas, scratch space, freelists, etc. I'm specifically interested in an ownership model that works with arenas, and tracks ownership of the group of allocations, as opposed to the typical case we think about with RAII where we track ownership of individual allocations.

jesse__··on Understanding C++ Ownership System
Does anyone reading this have links to people who have written specifically about a C++ ownership model that rejects the smart_ptr/RAII/friends model in favor of an ownership model that embraces bulk allocations, arenas, freelists, etc? I know there are groups of highly productive programmers that feel the traditional C++ ownership model is hot garbage, and I'd love a resource that puts down specific arguments against it, but I've never come across one myself.

Edit: clarity

jesse__··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
... what ..?
jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
> They thought I was a caveman.

I identify as a caveman and I fucking love it. I build a 250k sloc C++ project hundreds of times a day with a 50 line bash script. Works every time, on any machine, everywhere.

jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
As other commentors pointed out, 1gb/day isn't a problem for storage and retroactive processing until you get to like, hundreds of years of data. You can chew through a few hundred TB of JSON data in a day, per core + nvme drive.

Regardless, storage and retroactive processing wasn't part of the problem. The problem was explicitly "parse json records as they come in, in a big batch, and increment some integers in a database".

I'm not going to figure out what the upper limit is on a single bare-metal machine, but you can be damn sure it's a metric fuck-ton higher than 1gb/day. You can do a lot with a 10TB of memory and 256 cores.

jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
Can't really speak to (1), but (2) and (3) definitely qualify as 'fucked up piles of shit', which is what he's saying the real problem is.
jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
I think his point is that instead of hundreds of containers, you can just have a small handful of massive servers and let the multitasking OS deal with it
jesse__··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
Fair enough :) There's a lot to be said for being comfortable in your environment
jesse__··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
If that's literally the only thing stopping you.. you could always just write it yourself ..
jesse__··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
I think OPs point is that people are going to eventually abandon the sinking Windows ship, because gamers are going to soon abandon ship en-masse. That certainly tracks for me (mostly a non-gaming Windows user).

It follows that, at some threshold number of users, it becomes much cheaper to ship a Linux distro than to continue to support Windows proper.

:shrug:

Guess we'll see in 15 years.

jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
Oh, absolutely.
jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
Hahhah, yuuuup.

I can maybe make a case for running in containers if you need some specific security properties but .. mostly I think the proliferation of 'fucked up piles of shit' is the problem.

jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
Hah yeah, that's a funny one, being able to run circles around the interviewer.
jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
Are you saying that running your application in a pile of containers somehow helps that problem ..? It's the same problem as CPU scheduling, we just don't have good schedulers yet.. Lots of people are working on it though
jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
yeah man, computers are completely bananacakes
jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
I've done that too and, in my experience, people that ask a scaling question that fits on a single machine don't have the capacity to have that nuanced conversation. I usually try to help the interviewer adjust the scale to something that actually requires many machines, but they usually don't get it.

Said another way, how do you have a meaningful conversation about scaling with a person who thinks their application is huge, but in reality only requires a tiny fraction of a single machine? Sometimes, there's such a massive gulf between perception and reality that the only thing to do is chuckle and move on.

jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
I agree with your observation. My issue is (from experience) it's really hard to tell from the outside if a teams' values align with mine. Many teams talk the talk, but don't walk the walk, as the saying goes. It's just easier to not participate than it is to guess, and be wrong.

I also believe that running a broken interview process actively selects for qualities you actually don't want, so it's much more likely that teams conducting those interviews aren't teams I want to work on.

Edit: As credence for my claims, the best team I've ever worked on was a team I did 90%+ of the hiring for, and we didn't do any of the 'typical' interview bullshit most companies do.

What we did instead was sit people down and have deep technical conversations about systems they'd worked on in the past. The candidate would explain, in as much detail as they could muster, a system they'd worked on in the past, down to the lowest level details. Usually, they would talk to us for at least 20-30 minutes, then, we (the interviewers) would pose questions, usually starting with the form 'if we changed X, what effect would it have'. Doing interviews in this style make a few things immediately obvious:

1. Did the candidate have a deep, systemic understanding of the system they worked on?

2. Does the candidate have a good mental model for evaluating change in the system?

That's how I conduct interviews, and unsurprisingly, when I get interviewed like that, my success rate is 100%. I don't think I've ever done an interview like that which did not result in an offer.

Anyways, there's some rambling and unsolicited opinions for you :)

jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
Meh .. I've played that game; it doesn't work out well for anyone involved.

I optimize my answers for the companies I want to work for, and get rejected by the ones I don't. The hardest part of that strategy is coming to terms with the idea that I constantly get rejected by people that I think are mostly <derogatory_words_here>, but I've developed thick skin over the years.

I'd much rather spend a year unemployed (and do a ton of painful interviews) and find a company who's values align with mine, than work for a year on a team I disagree with constantly and quit out of frustration.

jesse__··on Ask HN: Who is hiring? (January 2026)
Looks like you pasted the wrong link after Apply:
jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
Yeah man, you're running on a multitasking OS. Just let the scheduler do the thing.
jesse__··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
I've done a handful of interviews recently where the 'scaling' problem involves something that comfortably fits on one machine. The funniest one was ingesting something like 1gb of json per day. I explained, from first principals, how it fits, and received feedback along the lines of "our engineers agreed with your technical assessment, but that's not the answer we wanted, so we're going to pass". I've had this experience a good handful of times.

I think a lot of people don't realize machines come with TBs of RAM and hundreds of physical cores. One machine is fucking huge these days.

jesse__··on Python: Tprof, a Targeting Profiler
Took a look at it. I generally don't like sampling profilers, but the live mode is a neat idea.
jesse__··on Python: Tprof, a Targeting Profiler
Mostly the latter, but a lot of tools are so slow the former actually becomes a problem, too. Valgrind is a great example. For realtime applications, Valgrind and friends are pretty much a non-starter.

To your point about profile results, any profiler that adds more than a couple percentage points at runtime basically destroys the profile results (less than one percent is the acceptable margin, for me). Adding 50% is just laughable, and at the time I looked that was the best available option.

At the time, I was trying to profile ML models and some tooling surrounding them. There are several reasons you want your profiler to be low overhead:

1. If the profiler does a ton of useless shit (read: is slow), it has many deleterious effects on the program being profiled. It can evict entries from the CPUs ICache, DCache, and TLB entries to name a few, all of which can cause huge stalls and make something (such as a scan over tensor memory, for example) many times slower than it would be otherwise. You become unable to reason about if something is taking a long time because it's doing something stupid, or if the profiler is just screwing up your day. Introducing this kind of noise to your profile makes it nearly impossible to do a good job at analysis, let alone optimizing anything.

2. Somewhat unrelated to performance, but, you really want to know more than "this function take up a lot of time", which is basically all sampling profilers tell you. If you look at a flame graph and it says "fooFunc()" takes up 80% of the time, you have no idea if that's because one call to "fooFunc()" took 79% and the rest were negligible, or if they're all slow, or just a handful. That is key information and, in my mind, basically makes sampling profilers unsuitable for anything but 'approxamizing'. Which can be useful, and is often good enough, but if you need to optimize something for real, a sampling profiler exhausts it's usefulness pretty quick.

Anyways .. there are some random thoughts for you :)

jesse__··on Python: Tprof, a Targeting Profiler
I remember looking at python profiling tools a couple years ago and being pretty disappointed. Most added a huge amount of runtime noise, the lowest being something like +50% runtime, which to me is completely unacceptable. The profiler I wrote and use every day for a side project adds well less than 1% runtime overhead.

I wonder what the overhead of sys.monitoring is. It is possible to instrument functions like this without using that API.. you can just walk the AST at startup and do it yourself. Would be interesting to see a very minimal instrumenting profiler that did that and compare the two.

I also love the 'targeted'/instrumenting profiling API. I think sampling profilers are good at scratching the surface, but quickly run out of useful information when getting down to the goods. Happy to see people doing instrumenting profilers.

Thanks for sharing :)

jesse__··on Is Rust faster than C?
Fair point.
jesse__··on Is Rust faster than C?
From the other side of the table, I love performance comparisons, so I always read these things. I also enjoyed your commentary, thanks for writing it :)
jesse__··on Is Rust faster than C?
"could" and "should" are doing some very theoretical heavy lifting here.

Sure, at the limit, I agree with you, but in reality, relying on the compiler to do any optimization that you care about (such as inlining an indirect function call in a hot loop) is incredibly unwise. Invariably, in some cases it will fail, and it will fail silently. If you're writing performance critical code in any language, you give the compiler no choice in the matter, and do the optimization yourself.

I do generally agree that in the case of qsort, it's an API design flaw

jesse__··on Ask HN: Share your personal website
https://scallywag.software

I've written a small handful of articles, with the most interesting one being about writing a state-of-the-art AVX2 Perlin Noise implementation, which improved on the then-SOTA by 1.8x

← PreviousPage 3 of 19Next →