Hacker News new | ask | show | jobs
by izzylan 276 days ago
I don't see the value in making it even harder to build software. I want to make things. Downloading a dependency manually and then cursing at the compiler because "it's right there! why won't it load!!" is just gonna make me want to build software less.

Anyone I want to work with on a project is going to have to have the same frustration and want to work on the project less. Only even more because you see they downloaded version 2.7.3-2 but the version I use is 2.7.3-1.

2 comments

> Downloading a dependency manually and then cursing at the compiler because "it's right there! why won't it load!!"

Odin's compiler knows what a package is and will compile it into your program automatically.

Isn't that a (built-in) package manager if it works for general packages? Or does it work only for selected dependencies?
From what I've seen. The Odin has three package collections: `base`, `core` and `vendor`.

`base` is intrinsically necessary to port Odin. `core` seems to be its standard library, your `libc`, `xml`, etc.

And `vendor` is everything else. So you basically get the Python's '`core` is where packages go to die' approach iff they take backwards compatibility seriously. Otherwise, they have breaking changes mid-language version change.

EDIT: Package collections not packages per gingerBill.

Those are library/package collections which contain multiple different packages, not the packages themselves.

And we will take backwards compatibility seriously when we hit 1.0, and only "break" on major versions.

> And we will take backwards compatibility seriously when we hit 1.0, and only "break" on major versions.

I'm talking about post 1.0 language choices:

- Choose backwards compatibility. Packages frozen in time, you get "Packages go to std to die." - Choose to break backwards compatibility. The ecosystem is split, some choose to go Odin 2 some are Odin 3.

I already know all that, that's why we are being very conservative and slow when it comes to figuring out what is meant to be in 1.0.
So they are trying the Linux distribution model of packages, right? (Compare `vendor` with, say, Ubuntu's `universe`.)
It doesn't necessarily "manage" the packages. It just sees them in your project and compiles them. You manage them yourself.
If that's what happens, I think in the following claim:

> Odin's compiler knows what a package is and will compile it into your program automatically.

...the word "automatically" should be dropped. Of course compilers compile any supplied dependency "automatically", but it is so obvious that we don't often use the adverb just for that.

> Of course compilers compile any supplied dependency "automatically", but it is so obvious that we don't often use the adverb just for that.

They often don't though. Rust, C, C++ need either long command line invocations or a build system for anything beyond hello world. Zig needs a build file for anything beyond hello world.

With Odin, you just invoke "odin build ." and all your dependencies are taken in without needing a build system, build file, make file, etc...

We call that a build system. It is not like that there is no build system; you have an integrated build system that is optimized for typical situations. Which is great by its own, but other languages and toolings would have optimized other metrics (for example, you can't ignore Cargo when talking about Rust's build system) so it is not a fair comparison.
This seems like a loss of separation of concerns. As a result Odin's compiler is full of completely unrelated stuff because it takes on this far larger role supervising everything about a project not just being a compiler.

Both Zig and Rust supply all of what you needed in the box, so all that Odin is doing here is commingling these features inside a single executable - there's no end user benefit that I can see.

This is an argument for a good build system, not a package manager.
These aren’t always separate.

Some distos might try to support multiple versions of a library. That could require installing it to different prefixes instead of the default. Thus, the build system will have to comprehend that.

Not everything in the world revolves around Linux. Distros terrible choices around shared library architecture has nothing to do with build systems for most languages.
True. The most popular Unix is after all macOS, followed shortly by WSL2
There are way more servers running linux than there are macos installs. And wsl2 is linux.
Number of servers isn’t the right metric imho.

Literally all code I write runs on Windows, macOS, Android, and Linux. In roughly that order of priority. No I do not and will not use WSL2, it’s an abomination.

Build systems are yet another special circle of hell.