Better HN
topnewbestaskshowjobs
Log inSign up

bunderbunder

18,725 karma · joined Sep 12, 2011 (15y ago) · 4,843 submissions

Submissions

comment 1w ago · link · parent

It would be a very disruptive change. For example, you can’t do away with header files without also rethinking how shared libraries work, too. Which then leads to hairy questions like, “Where do you put a library’s preprocessor macros if not in the .h file?” Any such changes you make would need to be coordinated with operating system vendors, since it would touch bits of how shared libraries work that are OS-specific.

And we already have header-only libraries, which are often close enough.

comment 1w ago · link · parent

It’s two sides of the same coin. The reason those sites see scrapers as a problem is it still costs money to serve page requests to then but they are no good fit generating ad revenue.

comment 1w ago · link · parent

I don’t think they were trying to make a statement about the law. Just pointing out that it really shouldn’t be a surprise to anyone that site operators would take a dim view of this sort of thing.

comment 1w ago · link · parent

Agreed. And it made a much stronger case for Rust than I’m used to seeing. For most of us non C/C++ programmers memory safety is a problem that’s more easily (not necessarily better) handled with a garbage collector.

But there are times when I really want to come to Rust from the other direction, and almost think of it as a Haskell alternative that doesn’t bring all the headaches that come from being lazy. The examples the author chose beautifully illustrate some of Rust’s virtues that lend themselves to that perspective.

(But no, we are not going to talk about higher programming. I did say “almost”.)

comment 1w ago · link · parent

As someone who speaks multiple languages and uses multiple programming languages, I would say it’s much more true of programming languages than it is of natural languages.

Spoken languages have the odd idiom that doesn’t translate well, and certain languages express certain ideas more or less succinctly. But it’s not like Chinese’s lack of verb tense makes it harder to think about how things are happening in time. The concept still exists, it’s just expressed differently. But not so differently that I can’t translate decently well on the fly.

Programming languages have much more variability in what kinds of concepts they can easily express. In Smalltalk I’m going to use dynamic dispatch to express damn near everything because it’s just about the only sane way to do domain modeling. In Standard ML I’m going to lean instead on algebraic data types and pattern matching. Those tend to lead to very different ways of breaking down a problem. In Scheme I don’t have either built in but both are easy enough to implement as a library, so I’ll freely choose whichever option seems most appropriate to the problem at hand. In assembly language I’ll avoid any such abstraction altogether because, while I could probably implement versions of both, it would be a total PITA and probably result in incomprehensible code. And translating among any of them is likely to be the work of multiple hours or even days.

comment 1w ago · link · parent

Things have changed so much since then. In the 80s compilers didn’t optimize as well, and generally couldn’t because of resource constraints on the computer. The limited power of 1970s and 1980s computers is all over the design of C. Header files are meant to reduce the memory needed to compile programs, for example.

The last time I needed C’s power to fit something into memory and compute limitations, it was code running on a microcontroller and better systems languages like Zig and Rust weren’t a thing yet.

comment 1w ago · link · parent

Empty string is not a valid alternative to null because the empty string is still a string. There are valid cases where “this value is not set” and “this value is set to an empty string” mean two different things.

There are even more valid cases where “this integer is not set” and “this integer is set to 0” are different things.

It’s also a type safety concern. Using sentinel values is comparable to the “billion dollar mistake” version of nulls because it creates a special value that implicitly exists and is not part of the variable’s type definition. This means the compiler can’t help you remember to check it. You have to just remember, and forgetting is a bug. With optionals (including opt-in nullability like in Kotlin), on the other hand, the compiler knows when you do and do not have to worry about a value not being present, and can raise a compile time type error when you forget.

comment 1w ago · link · parent

I have always had a love/hate relationship with unit tests. I love them for all the obvious reasons. I hate them for all the times I read a test suite where 80% of the tests could have been eliminated by just improving the design of the system under test so that error condition wasn’t possible in the first place.

comment 1w ago · link · parent

The cynical answer is that their primary goal was never to meaningfully contribute to mathematics. It was to pick some low-hanging fruit for the marketing department. So they did the 10% of the work that generates 90% of the buzz.

comment 1w ago · link · parent

It also speaks to why I remain skeptical of relying too much on coding agents for code review. They are still pretty iffy on implementing the right thing, and even worse at detecting when a PR didn’t implement the right thing. Ignoring that reality is how you do like Anthropic did and increase your rate of merging changes from 2500/day to 30,000/day without a corresponding increase in the rate at which you deliver useful work product.

comment 1w ago · link · parent

They could only be engineering issues if SpaceX’s management didn’t keep pushing design changes.

As it is, Starship is proving to be a fairly straightforward example of a project that’s stuck in development hell due to excessive managerial meddling and unrealistic expectations.

It’s only getting this much goodwill because SpaceX also produced Falcon 9, which famously also needed 14 flights to safely reach orbit, and definitely did not get there on the first try and deliver cargo to the ISS by flight 4. /s

comment 1w ago · link · parent

Worth pointing out, though, that that was hardly a disinterested assessment.

comment 1w ago · link · parent

100x? SpaceX’s own goal was more like 10x.

And that was just a goal; if they actually pull it off it would be a historic first for rocketry. So let’s estimate maybe 5-10x cost reduction. Hard to know where it would fall in that band while they’re still tweaking the design. But since they made that claim Raptor’s performance has come down by quite a bit and the vehicle’s dry mass has gone up, so they’re certainly not on track to exceed it.

comment 1w ago · link · parent

I don’t think it’s foolish, for more or less the above reason. Starlink is the market for Falcon 9. Without that it apparently isn’t so profitable, because outside of Starlink the demand for a system with that kind of launch cadence just didn’t really materialize.

But that’s also why I’m skeptical about whether Starship will live up to the hype. The whole case for how it’s supposed to revolutionize spaceflight rests on the assumption that it can tap into a huge well of latent demand to put stuff in orbit. If such a well really does exist then we have to ask why Falcon 9 wasn’t able to tap into it despite all of its obvious merits.

comment 1w ago · link · parent

It was originally designed for manned interplanetary missions, but then they (wisely) decided to pivot when it became clear that that wasn’t going to happen.

I have yet to be convinced that Starship’s payload capacity is actually a good thing, from a big picture perspective. It looks to me like a possible case of shouting, “I meant to do that!” after a pratfall. On a months-long trip to Mars, you need a vehicle that big for the sake of the human occupants. For launching Starlink, it’s less clear whether the ability to deploy so many satellites at once was worth the vehicle’s development costs. Perhaps it’s just inherited from an earlier iteration of the program that had different goals, and a more modest design would have been more economical. Worse, so far it seems like Starlink might be it. Most other use cases people have proposed for putting 40 tonnes in orbit on a regular cadence are the kind of highly speculative grasping at straws that accompanies any technically impressive solution in search of a problem.

comment 1w ago · link · parent

That’s such a big if, though. Not just around how long it will take. Around whether it will happen at all. There are still a bunch of unknowns that need to be resolved before we can know whether any such plans are economically viable. What I’ve personally observed is that a lot of these ideas look great when presented as concept art, but iffy at best once you start trying to do any back of the envelope estimates.

That certainly doesn’t mean it will never happen or that it’s not worth trying. But I’ve noticed that in these online discussions there’s a tendency to treat moonshot programs as if they’re sure bets.

Also don’t forget social factors. The US had been actively working on establishing more of a presence on the moon, too. But the current administration more-or-less killed it because they didn’t like how much it was costing.

comment 1w ago · link · parent

They still don’t seem to have figured out how to reliably recover and reuse Superheavy. They did it a couple times in 2025, but it’s been over a year and quite a few flights since the last time they successfully caught one.

Raptor isn’t shaping up to be a sufficiently reliable engine. They are still having shutdowns and failures on every flight. That could be a huge problem for cheap and rapid reuse because it implies that quite a lot of inspection and refurbishment will be needed for every engine they re-fly. This was famously a major impediment to cheap reusability for the RS-25 and Shuttle, and they only had to worry about three of those per flight. Starship has 13 times as many engines to worry about, and those engines have thus far had a much higher failure rate.

And then they’ve also been having trouble with the thermal protection system, which seems to require a lot more refurbishment than what they had originally wanted. There have also been some kinks to work out in terms of its actual protection of the vehicle, which is a problem because even minor materials degradation due to thermal stress will limit the reusability of the upper stage.

comment 1w ago · link · parent

The jury’s still out on whether Starship needs fast reusability, too. The existing market for heavy lift launches is tiny. Starlink creates some demand, but beyond that SpaceX seems to be placing an incredible amount of faith in the idea that if you build it they will come.

But what happens if there isn’t actually that much pent-up, latent demand for flinging heavy things into orbit? What happens if people still mostly want to launch the same size stuff they already do? Starship could become the paratransit shuttle of space: inexpensive, yes, but also inconvenient because of having to share the ride with so many other people that all have different destinations and schedules. In that case we might see that demand for Starship remains low due to potential customers deciding the extra cost of a different option is worth the added convenience. Anyone who’s chosen an Uber even though the city bus can get them to their destination for 1/10 the price should be familiar with the principle.

comment 1w ago · link · parent

But Starship does not currently seem to be on track to achieve cheap, rapid reusability.

I know that is what was promised, but I do wonder how many of Starship’s design goals the program needs to miss on before the general public starts to wonder if maybe goals are not the same thing as guarantees.

comment 1w ago · link · parent

It’s selection bias. It’s always been selection bias.

The “10x” developers I’ve known (and been) were all incredibly effective at snagging the work that they personally were most able to do quickly, and shirking the rest.

That’s not necessarily all the difference. But I’d estimate they would maybe be at most 2x developers if you remove their ability to avoid the proverbial 10% of the work that takes 90% of the effort.

AI coding intensifies this effect. And it also helps explain why people’s amazing success stories for personal projects don’t seem to translate to business ROI. For a side project I am in complete control over design and scope, have no customers or stakeholders to keep happy, etc. So I easily - and mostly unconsciously - tailor what I’m doing to what the coding agent can do well, and quietly drop the rest. I don’t have that luxury at work.

comment 1w ago · link · parent

I’ll admit I interpreted that “you” in pron’s sentence to be a colloquial “you” and not an imperative one. So, more of a statement of their own preference than a strong statement of how things should be.

The point is, it’s a tradeoff. With overloading, exactly which code executes on a specific line becomes a bit more implicit because it depends on extra information from the surrounding context: the types of the arguments.

That comes with the usual tradeoffs. On the one hand, you could argue that the compiler is taking care of it for you, which saves the programmer from having to manually deal with it, and removes some visual clutter from the code.

But you can also argue that letting the choice of function be implicit means that a programmer who wants/needs to keep track of exactly what every line of code is doing needs to carry all that contextual information in their own head, too. For this programmer, it’s adding to the mental burden.

I don’t think it’s a coincidence that Kelley constantly brings up how Zig was inspired by difficulties writing a digital audio workstation with very hard real-time requirements. Part of what he’s doing there is giving a motivating case for why he wants to be an absolute control freak about, e.g., micro-managing exactly when memory is allocated and deallocated. That’s something only a subset of systems programmers need, because not all systems programming is dealing with things like hard real-time.

comment 1w ago · link · parent

So, suppose a team - so hopefully a rather small instance of "everybody" - has decided to make some changes to how they work, and they're trying to decide between adopting Zig and changing their existing C coding conventions.

Suppose, also, that they have decided to make the change incrementally. So a rewrite is not in the cards.

The advantage of sticking with C that I see is that nobody has to learn a new language, migrate to a new toolchain, anything like that. So it is definitely the smaller change. But the downside is that it may be more difficult to hold the line. For some indeterminate (possibly indefinite) period of time you have a mix of legacy code that's being allowed to stay on the old conventions, and new/migrated code that's supposed to be held to the new conventions. IME one solo developer can maintain that distinction, but a team working in a business environment, possibly with people cycling on and off, will struggle with it. You can try to bake the distinction into your tooling, but that's often easier said than done. Most tools expect one set of conventions per project.

The advantage of adopting Zig that I see is that you set a clear demarcation line. New files will be written in Zig. Migrated code gets ported to Zig. Everyone knows that Zig has one coding standard, C has another coding standard. They look different, so it's easy to keep track of which is which. They each have their own compiler flags and static analysis tools, so it's hopefully easier to separate the legacy rules from the new ones.

Now, I mostly do cruddy business applications so I haven't actually done this with C and Zig. But I have done it on the JVM, and IME whether "modernize legacy Java in place" or "modernize legacy Java by strangler vining over to Kotlin" works better depends heavily on what the legacy code in question actually looks like and how much you want to change.

comment 1w ago · link · parent

No, you’re right. I misremembered.

comment 1w ago · link · parent

I’ve also experienced some unnecessary shenanigans related to blurring the distinction between primitive operations, and stuff that happens dynamically at run time such as method calls.

For a somewhat different example of the same general idea, look at how Java handles primitives and their boxed counterparts. = on two ints always compares their value. = on two Integers compares their pointers. But it uses flyweight instances for values up to 256, so in Java, whether two Integers with the same numeric value are equal according to the = operator depends on what that value is.

Then throw autoboxing and generics into the mix, and it suddenly becomes very easy to do refactorings that work fine in the unit tests (which tend to use small numbers) but fails in confusing ways in production.

This isn’t an example of operator overloading, of course. But I hope it more simply illustrates why, at least in certain problem domains, there’s value in being able to visually tell when surprising runtime shenanigans are and are not possible. And also to make it impossible to cross that boundary without touching all code that falls within the blast radius of that change.

comment 1w ago · link · parent

The example you choose is rather telling, though. It indicates that the use case you have in mind is not at all the one that Zig is targeting.

A more humble critique would be to just acknowledge that you don’t seem to be a member of Zig’s target audience, and move on.

comment 1w ago · link · parent

But Zig is expressly not trying to bootstrap a completely new ecosystem. Integrating with - and depending on - existing C and C++ code is a core use case. So much so that they’ve adopted “maintain it with Zig” as a motto that intentionally puns on “rewrite it in Rust”.

comment 1w ago · link · parent

It seems that part of what Zig is trying to do, though, is create a pit of success around these practices. So the response might be something like, “Yes you can do these things in modern C, but doing it consistently requires more discipline than we’d like.”

https://blog.codinghorror.com/falling-into-the-pit-of-succes...

12345
162