HNHacker News
TopNewBestAskShowJobs

gingerBill

916 karma · joined March 31, 2014

submissionscomments
gingerBill··on A critique of package managers
> So what does the solution look like?

There are no solutions, only trade-offs. And the point is that not everything needs to be, nor ought to be, automated. And package managers are a good point of this.

And yes, a language with an ill-defined concept of a package in the language itself is a problem of the language, but the package managers are not making it any better.

gingerBill··on A critique of package managers
I am not sure how you got this conclusion from the article.

> So let's handle the hell manually to feel the pain better

This is far from my position. Literally the entire point is to make it clearer you are heading to dependency hell, rather than feel the pain better whilst you are there.

I am not against dependencies but you should know the costs of them and the alternatives. Package managers hide the complexity, costs, trade-offs, and alternative approaches, thus making it easier to slip into dependency hell.

gingerBill··on A critique of package managers
Where?
gingerBill··on A critique of package managers
Yes. That's the entire point, but it should not be automated which is my point.
gingerBill··on A critique of package managers
This critique applies to even closed-source development that uses open-source code bases.

I have an article on my unstructured thoughts on the problems of OSS/FOSS which goes into more depth about this: https://www.gingerbill.org/article/2025/04/22/unstructured-t...

gingerBill··on A critique of package managers
The semantic quibbling is just to explain what a package manager isn't.

Also, use git subtrees, not git submodules. What people think submodules are, are actually subtrees and most people don't know about them.

As for "good" package managers, they are still bad because of what I said in the article.

gingerBill··on Lisp interpreter with GC in <750 lines of Odin (and <500 lines of C)
Me being "well known" in general is news to me. However, the people I am that way are usually people like yourself. I am argumentative with people like yourself, however I try not to be "rude" but I am not always "nice". I think this is probably a cultural distinction where I make a distinction between Niceness and Politeness. Rudeness is the not-being-polite, rather than not-being-nice.

As for my "highly opinionated" things, honestly, I don't think I am that opinionated about many things, but I guess the ones I am on, they are the "well known" aspects. If I am wrong about something, I will gladly change my opinion given a good argument or set of facts.

gingerBill··on Lisp interpreter with GC in <750 lines of Odin (and <500 lines of C)
Sorry to pop in but I kind of need to clarify my own position even further here:

Odin has "undefined behaviour". SHOCK! HORROR!

The thing I bring up that people think I go "ad nauseum" about (like yourself) is just that the term "undefined behaviour" is in itself "undefined". This is why I try to make as many distinctions about the different kinds of "UB" out there, and even what the "U" means in "UB".

To quote you from earlier:

> ...Ginger Bill will engage in pointless semantic arguments in which he defines away your problem.

Yes... the entire discussion about "UB" is fundamentally a semantic thing, LITERALLY it's an argument about semantics. And if I can "define away [the] problem" in certain cases, then it's literally not Undefined Behaviour. I am not sure what else to say to your point here. The entire discussion around UB is fundamentally a semantics game and always will be. And when people complain about the "semantics game" part, they have not understood the problem in the first place.

Interestingly, the C++26 example you give is a brilliant example of this, it's an Erroneous Behaviour, not necessarily "undefined" or "unspecified".

In the case of race conditions in Odin? This is pretty much a brilliant example of _Unobservable_ behaviour because Odin shares a similar memory model to C, and thus it has to make assumptions. And when the programmer violates certain assumptions, the compiler cannot observe the broken code that easily, and thus it can easily produce unexpected behaviour due to it being unobservable.

I know have said things in passing, but it's a question of what to tell people. A lot of the people who bring up examples of UB bring up are usually TRIVIALLY definable, and things we have probably already defined in Odin (e.g. integer (under|over)flowing, integer division by zero, etc), but when I say what Odin's defined it to, they usually go one of two ways, either "I don't like that definition" or "but I wanted to use these specific passes in the compiler backed to do 'optimizations' with", both of which actually annoys me because I am not discussing with someone serious. In the latter case, "passes" are just algorithms that do things; they are not intrinsically "optimizations". To "optimize" something, you need well defined rules to optimize within, if the rules are ill-defined or arbitrary chosen, then how the heck can anyone call that "optimization"?

> In a language with UB, the use after free is UB. Which explains the nonsensical results. [https://odin.godbolt.org/z/8onn4hxP1]

Even the case of "use after free" that you brought up earlier, it is something which is not a language thing in certain cases, especially when Odin has custom allocators which are defined at the user-level. The language itself knows nothing about of the allocators and how they work, it cannot. So yes, Odin allows for "use after free" but and? We are not enforcing a specific memory allocation strategy at the language level, like other languages. But it could be technically well defined at the algorithm level of that specific allocator. Which leads to my many problem with this discussion: are flawed algorithms/code considered Undefined Behaviour now and thus make the language "UB"? Why is not just shitty code?

And I will literally go... your "nonsensical results" are just... allocator specific behaviour. Yes it's "nonsensical" to you, but Odin isn't C so stop applying its approach to things to it. C has its standard library as part of its spec and defines how `malloc` et al work. Odin doesn't have its core library as part of the spec and never will (base library will to a certain extent with room for implementation specified behaviour for certain defaults, e.g. what is the default `context.allocator` or `context.assertion_failure_proc`, etc).

> Bill's go-to is to blame somebody else...

No... my go-to response is to say where it should be defined, and if it is possible to define at _any_ level (if at all). So even in your case, you are blaming the compiler for something it cannot know if this is undefined or erroneous because it cannot know what you are doing, but the allocator itself could allow for it. `delete` could be a complete no-op and is for many allocators.

It's all about responsibility. What is responsible for what. So if you thin that's "blame", whatever, but that's the question. Is the compiler _responsible_ for "use-after-free" bugs? In some languages, yes. In other languages, no.

> Linux didn't define your programming language, Intel didn't define your programming language, this is your fault Bill.

No but they all put bounds on what is possible in the first place. They literally define the arena the language takes place in, and thus you are subject to their whims, regardless of my feelings about them. No it's not "my fault" anywhere, it's just a thing.

----------

If you want to discuss with me further on this, I'd be happy to do so. Other mediums other than a comment on Hacker News would be preferrable.

----------

P.S. nowhere on the Odin website itself do we say Odin has no "UB" nor even suggest it. So there is no official position on "UB" for Odin anywhere. My comments on Twitter or other social medias should not be taken as official in any way, and be considered closer to "conversation", especially Twitter.

P.P.S. Some of possible meanings of "U": Undefined (i.e. not-defined), Undefinable, Unspecified, Underspecified, Unobservable, Unknown, Erroneous (I know it's not a U), Unimplemented, Ill-Defined (different to Undefined or Underspecified, and again not a U), Defined-At-A-Different-Level (e.g. language, compiler, platform, core library, user's code, etc, and again it's not a U). It's an absolutely mess and things just need to be defined better about what you are talking about.

gingerBill··on GingerBill – Tools of the Trade – BSC 2025 [video]
Bill Hall's (gingerBill) talk at BSC 2025 about mathematics as part of the programmer's toolbox.

Slides: https://bsc2025.gingerbill.org/

Chapters: 00:00 Intro 12:58 Talk 56:08 Q&A

gingerBill··on Odin: A programming language made for me
Many implementations of qsort do allocate using malloc.

And I know malloc/free is the allocator, but you cannot override it either.

gingerBill··on Odin: A programming language made for me
This is a common thing I get annoyed with when explaining to people too about Odin. Odin also defines dereferencing `nil` as panicking (as on all systems with virtual memory, it comes for free).

C is just one language of many and you do not have to define the rules of a new language to it.

gingerBill··on Odin: A programming language made for me
Odin has very good FFI with its `foreign import` system, so you can still use libraries written in C, Objective-C, or any other language. And Odin does support tools like asan, tsan, etc already too. So what are the thing that you are giving up if you were using Odin instead of C?—in practice.
gingerBill··on Odin: A programming language made for me
That would require having constructors, which is not something Odin will ever have nor should it. However you can just initialize with a constant or variable or just use a procedure to initialize with. Odin is a C alternative after all, so it's a fully imperative procedural language.
gingerBill··on Odin: A programming language made for me
Exactly. That's what I meant with my question about what did he think HackerNews was for.
gingerBill··on Odin: A programming language made for me
Making it opt-in, means making the hierarchical approach the default. Whatever you make "opt-in" means you are by default discouraging its use. And what you are suggesting as the default is not what I wanted from Odin (I am the creator by the way).

I normally say "try to make the zero value useful" and not "ZII" (which was a mostly jokey term Casey Muratori came up with to reflect against RAII) because then it is clear that there are cases when it is not possible to do ZII. ZII is NOT a _maxim_ but what you should default to and then do something else where necessary. This is my point, and I can probably tell you even more examples of where "ZII is bad" than you could think of, but this is what is a problem describing the problem to people: they take it as a maxim not a default.

And regarding pointers, I'm in the camp that nil-pointers are the most trivial type of invalid pointer to catch empirically speaking. Yes they cause problems, but because how modern systems are structured with virtual memory, they are empirically trivial to catch and deal with. Yes you could design the type system of a language to make nil-pointers not be a thing unless you explicit opt into them, but then that has another trade-off which may or may not be a good thing depending on the application.

The Objective-C thing is just a poorly implemented system for handling `nil`. It should have been more consistent but wasn't. That's it.

I'd argue "correctness" is important in games too, but the conception of "correctness" is very different there. It's not about provability but testability, which are both valid forms of "correctness" but very different.

And in some non-game applications, crashing early is also a very bad thing, and for some games, crashing early is desired over corrupted saves or other things. It's all about which trade-offs you can afford, and I would not try to generalize too much.

gingerBill··on Odin: A programming language made for me
It is "undefined behaviour" in C (which is an overloaded term which I will not discuss why I hate it in this comment). But my point was that is how many people conceptualize it, and for many things people do expect it to be one of the possible values, just not knowable ahead of time.

However, I was using that "C programmers" bit to explain the conceptualization aspect, and how it also applies to other languages. Not every language, even systems languages, have the same concepts as C, especially the same construction as "UB".

gingerBill··on Odin: A programming language made for me
Sure. What I originally wrote was not actually intended to be an insult, but I didn't mind calling it that if he took it as insulting.

It's just very weird to see be very vague when questioned, and claim things which cannot be true based on what he's stated already in this comment chain.

gingerBill··on Odin: A programming language made for me
Loads of libc allocate. The trivial ones being malloc/calloc/free/strdup/etc, but many other things within it will also allocate like qsort. And that means you cannot change how those things allocate either.
gingerBill··on Odin: A programming language made for me
I'm the creator of the Odin programming language and I originally tried to approach it by fixing C. And my conclusion was that C could not be fixed.

I made my own standard library to replace libc. The lack of safety is hard to do when you don't have a decent enough type system. C's lack of a proper array type is a good example of this.

Before making Odin, I tried making my own C compiler with some extensions, specifically adding proper arrays (slices) with bounds checking, and adding `defer`. This did help things a lot, but it wasn't enough. C still had fundamentally broken semantics in so many places that just "fixing" the problems of C in C was not enough.

I didn't want to make Odin initially, but it was the conclusion I had after trying to fix something that cannot be fixed.

gingerBill··on Odin: A programming language made for me
> It seems to me... that initialization time is unlikely to be significant

The thing is, initialization cost is a lot more than you think it is, especially when it's done on a per-object level rather than a "group" level.

This is kind of the point of trying to make the zero value useful, it's trivially initialized. And in languages that are much more strict in their approach, it is done at that per-object level which means instead of the cost of initialization being anywhere from free (VirtualAlloc/mmap has to produce zeroed memory) to trivially-linear (e.g. memset), to being a lot more nested hierarchies of initialization (e.g. for-loop with constructor for each value).

It's non-obvious why the "strict approach" would be worse, but it's more about how people actually program rather than a hypothetical approach to things.

So of course each style is about trade-offs. There are no solutions, only trade-offs. And different styles will have different trade-offs, even if they are not immediately obvious and require a bit of experience.

A good little video on this is from Casey Muratori, "Smart-Pointers, RAII, ZII? Becoming an N+2 programmer": https://www.youtube.com/watch?v=xt1KNDmOYqA

gingerBill··on Odin: A programming language made for me
The compiler cannot know the _purpose_ of your program, and thus cannot "figure out the optimal data layout". It's metaphysically not possible, let alone technically.

Not everybody needs to worry about L2 or L3 most of the time, but if you are using a systems-level programming language where it might be of a concern to you at some point, it's extremely useful to be able to have that control.

> expecting every programmer to call malloc and free in the right order

The point of custom allocators is to not need to do the `malloc`/`free` style of memory allocation, and thus reduce the problems which that causes. And even if you do still need that style, Odin and many other languages offer features such as `defer` or even the memory tracking allocator to help you find the problems. Just like what was said in the article.

gingerBill··on Odin: A programming language made for me
I won't get into it too much but virtually no one needs ECS, and if you have to ask how to do it, it's not for you. There are much better ways to organize a game for most people than the highly generic relational-database-like structure that is ECS. ECS does make sense in certain contexts but most people do not need it.

But I agree that DOD in practice is not a compromise between performance and ergonomics, and Odin kind of shows how that is possible.

gingerBill··on Odin: A programming language made for me
My hobbies would not be suitable for __HackerNews__. What do you think HackerNews is for?
gingerBill··on Odin: A programming language made for me
> As long as programmers view a program as a mechanism that manipulates bytes in flat memory...

> Yes, it will eventually manifest in memory as bytes in some memory cell...

So people view a program how the computer actually deals with it? And how they need to optimize for since they are writing programs for that machine?

So what is an example of you abstraction that you are talking about? Is there a language that already exists that is closer to what you want? Otherwise you are talking vaguely and abstractly and it doesn't really help anyone understand your point of view.

gingerBill··on Odin: A programming language made for me
Because to be _standard_, it would have to come with the compiler toolchain. And if it's scattered around on the internet, people will not use it.

I tried to create my own alternative about a decade ago which eventually influenced my other endeavours.

But another big reason is that people use C and its stdlib because that's what it is. Even if it is bad, its the "standard" and trivially available. Most code relies on it, even code that has its own standard library alternative.

gingerBill··on Odin: A programming language made for me
> You're making it sound like uninitialized variables _have_ a value but you can't be sure which one.

Because that's a valid conceptualization you could have for a specific language. Your approach and the other person's approach are both valid but different, and as I said in another comment, they come with different compromises.

If you are thinking like some C programmers, then `int x;` can either have a value which is just not known at compile time, or you can think of it having a specialized value of "undefined". The compiler could work with either definition, it just happens that most compilers nowadays do for C and Rust at least use the definition you speak of, for better or for worse.

gingerBill··on Odin: A programming language made for me
You're assuming that's the style of programming others want to program in. Some people want the "ZII" approach. Your approach is a trade-off with costs which many others would not want to make. So it's not "preferable", it's a different compromise.
gingerBill··on Odin: A programming language made for me
The author literally says that they used to do that in C. And I've done a lot of those things in C too, it just doesn't mean that C has good defaults nor good ergonomics for many of the tasks other languages have be designed to be good with.
gingerBill··on Odin, a pragmatic C alternative with a Go flavour
So Odin the language in-itself is effectively done. But of course the core library, vendor library, tooling, etc are still very much being improved.

The reason for the lack of "social media presence" is because Odin is kind of weird to market for: https://www.gingerbill.org/article/2024/09/08/odin-weird-to-...

It's not "hypeable" like Zig or Rust mainly because it doesn't have any "killer features" but rather is a very pragmatic language by design. The people Odin attracts are also not the types of people to evangelize Odin either, since they are not there for the hype-train but to actually program.

So if you can help us find a way to market Odin itself without lying or exaggerating or overblowing minor features, then that would be very much obliged. It's a lot harder than you think.

As for "1.0", we have never worked to a timeframe for anything nor any sort of roadmap. The reason being is that we do not want to give false promises/hope about anything. Roadmaps are purely for advertisement, and the problem is, we don't even work to one so why present one? The other problem is that for "1.0", the language itself is well known: it's pretty much what you see today. But "1.0" for the general tooling? Now that's a harder question. We have plans but since everything is being worked on as we go (mostly volunteers), we cannot say when things will be finished. The biggest project at the moment is `core:os/os2`, the replacement for the `core:os` package. `core:os` was the first package ever written for Odin and it's absolutely dreadful and needs replacing. And that's what we've been doing with `core:os/os2`, slowly. And when it is ready, we will tell people many months in advance when we will make it the official one. This will be a breaking change, but probably the last biggest one for Odin.

gingerBill··on Odin, a pragmatic C alternative with a Go flavour
Most C programmers I know pretty much do that. I use C11 just for the atomics and that is it. And I know many C programmers who still use C89/C90 exclusively.
← PreviousPage 4 of 9Next →