George Hotz checking out Nix for the first time :-)

Scrub to 1:28:00

Interesting times…

8 Likes

This really shows how messed up all the experimental features situation is for beginners, especially with zero-to-nix which comes up as one of the first resources despite it not working on the official installer most would use, Hotz fell right into that trap.

I am really glad he stopped using zero-to-nix and went to nix.dev after that, an documentation source that actually works on the official installer.

edit: ↓
Seems like he’s not interested in Nix anymore, (shocking!). The beginner experience is so horrible with the unofficial docs everywhere, he was checking random GitHub repos just to understand how to get anything done and he still failed. Nix is doomed if that’s how it keeps going holy crap.

25 Likes

Getting George to try and setup nix and run media wiki was actually master stroke of new user on boarding testing…we all know it’s a 5 second operation in docker .

But nix, again proves that almost impenetrable for new users, with confusing entry points , misleading naming and confusing documentation.

The fact that he searches for packages, but needs a ‘nixos service’ , no where does the nix installer on apple macintrash say that it can’t run ‘services or applications that require servers which need to be compose of db or webserver’. The again, no where on ubuntu nix does it say that either.

If i nix-shell -p mediawiki , is there any indication that is not a runable unit like docker?

nix-shell -p mediawiki
‘THIS NEEDS TO BE COMPOSED IN A NIXOS SERVICE, THANKS FOR TRYING ANYWAY’

No where on the mediawiki nix package page does it say ‘this needs to be run as a service, or be composed as a service and will on run on NIXOS’.

There is a lot to unpack with this video, sometimes i wish i could erase everyone mind and make them have zero nix knowledge, and the get them to install MediaWiki on nix…

So, you can see that that installing the Macintrash version, really confuses users, who think they are getting the full nix experience… nix , nixOS, nixel , nix the package manager, and everything called nix.

it seems that a lot of flakes out there now reference flake utils, which just confuses the hell out of new users, going to the flake utils github it says…

'Pure Nix flake utility functions.

The goal of this project is to build a collection of pure Nix functions that don’t depend on nixpkgs, and that are useful in the context of writing other Nix flakes.’

what does that even mean to a new user?

So, the rabbit hole continues, so he installs nix-darwin, which is what i consider a nasty hack to make macintrash look like a nixos system which it is clearly not and never will be.

https://devenv.sh/ can do all this, but when he discovers it … he shy’s away from it because it is not part of the base operating system… that’s exactly what a developer would do… and we all would do until we get into the ecosystem some more.

Why not get devenv.sh part of the base operating system?

Why not get home manager part of the base operating system?

I know the answer to those questions.

The great thing is, he is curious and keeps plugging away at it, because it’s unusual to him, but there is noway he going to win, because he’s already been led down the garden path to loose.

The great thing is, if he tried this 5 years ago, he would of given up in about less than 5 mins… :-).

The quote of year has to be …

‘nix is just arch linux docker for haskell fans’.

LOL! Brilliant!

That really is the best line I’ve ever heard.

looks like i won’t becoming a devops engineer at comma ai anytime soon , darn it.

LOL!

I like to thank George for giving it a shot, and recording the experience for us to learn from…take heed nixxers.

17 Likes

this video convinced me even more so that nix.dev needs more love and affection and that the unofficial wiki needs to slowly fade away (I still find myself on its pages occasionally). Both tall orders. Somehow the first time experience has to be made into one of those “aha” moments we all get. Would it be crazy to point folks to nix.dev on nixos.org somewhere? :person_shrugging:

6 Likes

How do you write documentation for someone who is unquestionably talented with tech but never spends even one full minute on any single document while trying to learn something new?

I’m sure geohot isn’t unique in this respect, but it’s so far removed from my personal patterns for how to learn a new bit of tech that I can’t really fathom what would be more useful to someone like him. If I wrote the best Nix tutorial in the world tomorrow, it would still only be a resource that, if geohot found it, he’d spend thirty seconds on before flipping to something else in the ecosystem that I didn’t write. What can any of us do about that?

30 Likes

We probably could learn something from OpenBSD docs and manual pages (truly the best). Even an official FAQ perhaps? Then again, yeah, most people aren’t going to bother reading it. They just want something that works in a flash and that they’ll forget about soon enough.

edit nix.dev has a Frequently Asked Questions — nix.dev documentation but I’m more thinking nixos.org here.

3 Likes

The Ecosystem is confusing, the entry points are confusing, the branding is confusing, the Haskell monad gonad mumbo jumbo is confusing.

I think to dismiss George that ‘he is at fault for not reading the docs’ maybe a case of blame the players, not blaming the game. I always try and blame the game…never the players.

He maybe removed from your personal patterns of how you learn tech… but what does that tell me?

If a CEO/CTO of ANY tech company with millions of dollars in the bank speaks , I listen, very intently, very respectfully and very carefully, because they probably know a lot more than I do (i know essentially nothing)

I don’t know you, i don’t know if your the CEO/CTO of a company will millions of dollars in the bank and lots of happy customers…, or just have a few machines at home just upgraded from arch linux to play minecraft. What ever you are, it doesn’t matter…your a nix user, an under stander of nix , maybe even a nix developer and whatever you are …you are the Future we so desperately need…

I just want bright minds like Geohot and others like him to be part of that future too, because if they are not the whole overly complex software stack of spinning plates is going to fall over like the Leaning tower of pizza… and i’ll be left to install windows 15 and OSX 1984.0

Geohot is not unique…rather the opposite… , if fact this is quite the normal for ‘young’ people to learn in this manner, and there is not ‘correct or incorrect way of learning’. The old institutional way of learning is changing rapidly, making learning interesting, fun, engaging always wins. I’ve mentored young nixers, they learn this way…and i really really like it… it’s fast and it’s furious and it gets things done, exactly what you need a a devsecop’s environment. Staring at a monodic endofunctor for three days while ponding it’s pureness is not going to stop a DDOS attack on your server cluster in real time ;-).

The great news is, all this can be fixed, and really quite easily…

It’s such a shame the Nix project is so cash strappep, it can’t afford to hire more professionals to tackle issues like this head on. The efforts of @fricklerhandwerk have been valiant, both on documentation and getting nix ‘stories’ out there, sometimes i think he might be 6 men in one… a true nix warrior. We need 100’s of paid ‘nix warriors’, working full time on this project, that can move quick and fix things.

The BSD project has excellent documentation, because almost everyone that works on BSD works at Juniper… and they banked rolled the whole ‘open source free software’ show.

You don’t get professionals of that calibre working for free unless they have 1000 bitcoin’s in the bank and they can ‘do what they want with their time’.

but i know for a fact in 5 more years, Geoholt will try Nix again… or some meta distribution of it … … and he’ll be running it at comma ai powering his autonomous robots and vehicles … and you know what he will say when he see’s how glorious and powerful nix is…

‘Nix , it really whips the llama ass’.

10 Likes

Just two replies to two remarks

How do you write documentation for someone who is unquestionably talented with tech but never spends even one full minute on any single document while trying to learn something new?

Ideally I feel that documentation should be more use-case based or at least provide good use-case examples for everything. Understanding user-stories might be an idea here.

Also I’ve come to realize that the flake vs non-flake divide appears to have a fairly negative impact on all of this onboarding experience. The communication around this feature is plainly contradictory. Some people recommend it in spite of being experimental, others do exactly the opposite because it is experimental.

You can see how George gets lost in that part of the jungle.

The beginner experience is so horrible with the unofficial docs everywhere

Again, I feel the how to get anything done question should be the focus. Where anything can be really anything.

Note what George says at some point: “I am interested in being able to use Nix to quickly deploy cloud instances.”

So wouldn’t it be great if we had documentation for that use case?

6 Likes

I’m skeptical, but listening. How?

None of us is emperor of the internet, so erasing all of the tutorials that start with flakes isn’t an option. (Nor is erasing all of the tutorials that ignore flakes, if you lean that way.) So the ecosystem will contain both flakes and pre-flakes advice, and someone trying to learn from five tutorials at once is understandably going to be confused. The best case scenario here seems to be to heal Nix of its self-induced schizophrenia and then wait… forever… for all the old tutorials to bitrot away.

Nix is not Docker and doesn’t share the same goals. There is no (AFAIK?) Nix-y command to get a running Mediawiki instance on macOS in fifteen seconds or less. No amount of making the CLI less confusing or whatever is going to change that, right? What’s it supposed to do—somehow know that if someone blindly types nix run mediawiki that it should print ‘hey, I’m not Docker, maybe use Docker’?

Suppose we paid a bunch of people to write the best documentation possible for Nix. Even better than BSD’s, say. What good would that do someone who comes in expecting Nix to be something it’s not and who will be constantly bouncing between that excellent documentation and whatever other tutorials still exist on the internet?

It’s easy to point at this experience and say, look, we’re doing a bad job, let’s do better. It’s much harder—for me, anyway—to envision what doing a better job looks like. Guy picks up a katana, says hey, I know this, this is like a chainsaw, tries to chop down a tree with it, fails, concludes that it is a chainsaw but for people who are masochists. It’s not the guy’s fault if he doesn’t know that katanas aren’t for felling trees. But what do we do about it if people start with these assumptions and then don’t let go of them when they fail to match reality?

That’s the point I was trying to make. I’m not trying to blame geohot or be dismissive of his experience at all! The takeaway from my previous comment should be that I have no idea how to help him, not that he should have done a better job learning the exact same way I did. Traditional documentation doesn’t seem like the right tool for this type of mind. Maybe some sort of gamified tutorial along the lines of Vim Adventures would help? Or is that too patronizing for an adult tech CEO? I don’t know. All I know is that when I was getting started with Nix seven-ish years ago, the best advice at the time was to sit down and read the Nix whitepaper, and that worked for me. What’s the best advice for today, and how can it be improved so as not to leave people like geohot out?

(Also I have no idea what ‘monadic endofunctors’ have to do with any of this!)

14 Likes

erasing all of the tutorials that start with flakes isn’t an option. (Nor is erasing all of the tutorials that ignore flakes, if you lean that way.)

No, but maybe going both routes at the same time until this issue is finally resolved might be an idea. I am using flakes primarily myself. I find it interesting how this split between the official docs nix.dev and the DetSys based zero-to-nix leads to each side kinda ignoring the other as it seems. Not an ideal situation.

I actually like flakes. I have come to learn recently they have downsides or design flaws. But I don’t really experience these much tbh.

There is no (AFAIK?) Nix-y command to get a running Mediawiki instance on macOS in fifteen seconds or less.

The people working on nixified.ai at least are trying to provide something like that. For InvokeAI (Stable Diffusion) and textgen webui. I sadly had no luck running that on my AMD GPU. Not sure why, but it wanted to recompile everything. Which is a lot in the case of the ROCm libraries. Must have something to do with me not adding the cache correctly I guess.

What good would that do someone who comes in expecting Nix to be something it’s not and who will be constantly bouncing between that excellent documentation and whatever other tutorials still exist on the internet?

In BSD-land (FreeBSD that is for my experience) people just point you to the handbook oftentimes. There are some nice community tutorials as well, but they are mostly more advanced/custom stuff and hence the handbook remains the foundation to build on.

The takeaway from my previous comment should be that I have no idea how to help him

Maybe we should do brainstorming at some point and try to find a way?

Traditional documentation doesn’t seem like the right tool for this type of mind.

But even some traditional documentation has lots of howto examples. I personally really like Scikit-Learn’s documentation. You can basically read it like a practically minded statistics textbook, or like a piece of python documentation, or like a cookbook. They have theory, API reference and implementation examples for the diffferent models.

I think George Hotz is the guy who just loves to copy-paste-run-fail-iterate.

Others might like to watch tutorials on YouTube. There are better channels coming up right now for nix related content. I am thinking of adding something myself soon, actually.

:laughing:

My summary of this conversation so far:

y’all: geohot is struggling, we need to help him
me: geohot doesn’t read documentation, how else can we help him
y’all: better documentation
me: he doesn’t read documentation though
y’all: pay people to write better documentation
me: doesn’t. read. documentation.
y’all: BSD has great documentation, let’s do that
me: doesn’t read documentation
y’all: look, I think geohot just doesn’t read documentation

(This is unfair to the part of the thread that’s about the flakes divide, which is a point I think is beyond dispute other than the question of what people who aren’t involved in the stabilization effort can do about it.)

17 Likes

Hi. I was watching the stream while that was happening and the magic incantation he was missing was something along the lines of:

$ nix-build -E 'with import <nixpkgs> {}; (nixos { services.mediawiki.enable = true; /* … etc … */}).config.system.build.vm'
$ ./result/bin/run-nixos-vm

This is not discoverable currently, but I think trying to solve it with more documentation is a fools’ errand. I learn the same way as George and Nix took me months to figure out and quite a few attempts. My friends are similar, even with my help.

I think the underlying problem is Nix is like a few pieces of metal; Nix, nixpkgs, <nixpkgs/nixos/default.nix> and these have all melted together into this Nix megastructure. There’s only some pretty shitty context hints.

Use nix build or nix-build with a nixpkgs from the flake registry, a channel, a git checkout, github:nixos/nixpkgs to evaluate the pkgs.nixos function—not a package! …and give it a NixOS module that enables the MediaWiki NixOS module. Now please remember you can just ask it to build a VM with .config.system.build.vm! And then it probably runs if you fiddle with the firewall or whatever. Probably.

This is wonderful for me because I know where all these things are and I just nix repl through a wall of weird shit and get what I want fairly quickly, but for a noob this is wayy too many concepts introduced too quickly.

Similarly there’s also a lot of ways to approach this (install NixOS on your Pi! he was working on a pi. docker run nixos or whatever. surely nix standalone can just do this?), which I love about nix but which also make it really hard to break into.

Do we want an eternal september? FOSS projects don’t need endless growth.

11 Likes

Broke: What NixOS needs is documentation
Bespoke: What NixOS needs is AI

2 Likes

I mean wasn’t he doing that in the video? Pasting an error message into a chatbot? The error message was pretty clear what to do…but I get it’s still horrible. “Hey, computer! What’s the error you just spit back at me?”

1 Like

I’d like to offer this:

Q: We need to document Nix!
A: Which Nix?

<nixpkgs/pkgs> or lib, or NixOS? The nix tool itself? home-manager? <insert your own>?

Q: NixOS. I want to get started with NixOS.
A: Deploy it where?

Desktop? A server? On a cloud provider (which?)? Self-hosted (aarch64?)?

…For what?

GNOME for your family (not making this one up)? your custom twm rice? your own custom web service? (what language/…?) A GitLab/MediaWiki/…?

Nix covers an absurd amount of territory and spamming more docs isn’t going to guide people where they need to go. There are docs for most of what I mentioned more-or-less but there’s no markers for the lay of the land. There’s no “the one Nix thing you install which does everything”.

We’re a pretty unique project in just how much surface area we cover. This is precisely what makes Nix so powerful and also what makes it so unapproachable.

I think our best shot is focusing our efforts at the NixOS Wiki and improving the ecosystem itself to have better errors and more intuitive structure⁰. (thank you @piegames for summarizing my last post back at me and pointing the latter out :3)

⁰: Briefly as I understand: video game level design hints to the player what to do next with the environment. our current UX is bad except for a few golden paths. (see: NixOS fresh install, once it’s installed. disko looks good too.)

6 Likes

If a legendary hacker finds it too complicated, it’s way too complicated for the average user.

Personally, I am not a fan of flakes. They just add more complicated DSL boilerplate on top of an already complicated system. That is why I created Botnix as a fork, which intends to be a minimized and simplified version of NixOS for intelligent embedded systems. It has only just begun.

1 Like

Personally, I am not a fan of flakes. They just add more complicated DSL boilerplate on top of an already complicated system.

They restrict in order to simplify.

Liberties constrain, constraints liberate.

The boilerplate gives a starting point whereas nix without flakes is an overwhelming blank page.

6 Likes

https://nixos.org/learn does point to nix.dev under “First Steps with Nix”; and the /learn page is linked to with the “Get started” button on the https://nixos.org/ landing page.

That’s not to say “problem already solved” so much as “your proposed solution is already implemented, isn’t it?”.

Ha. I do like the README remark on hlissner’s dotfiles of “it was hard for me, it should be hard for you too”.

The more nix there is, the more I get to freeload off of nix. People who benefit from other people writing Nix, without having to write Nix themselves. e.g. llama.cpp is a popular fast-moving repo, and has a flake.nix; since it’s got a flake.nix, I can use it without even having to copy-and-paste “install these packages”.

Some stuff (like write Nix code for your own bespoke case) might be unavoidably difficult. But it’d be nice if things that are really easy on other OSs were also quite easy on NixOS.

Excellent question.

And:

I do think that would help. – I’d be cautious about reading some blogpost from 2011 and expecting it work today.

I sympathise with this “cowboy, too impatient to read the docs” attitude. With programming in general… a lot of the time you can get by without needing to read the docs. – It’s good to find an example that’s pretty close to what you want to do, understand as much about it as you need to, and just change the bits that look relevant.

Sure, there are things that could make this approach smoother, with various costs. (Bigger community => more StackOverflow questions asking novice questions like “why did I get this error message”, etc.).

If I had pixie dust, another thing I’d wish for is that alongside the hype for Nix came an understanding that writing Nix code is not easy. e.g. Rust is still has a lot of hype, but I think people also have the understanding that learning Rust can be very difficult. – Whereas with Nix, it’s really common to see people try something which is really easy on other Linux systems, but really difficult on Nix, get frustrated, and give up.

6 Likes

An interesting idea I’ve seen in a few web docs is a really handholdy lesson-like tutorial. It would have all the advantages of an in-depth video while also being easily searchable and accessible.

Something like this is a great example or what I mean: https://docs.astro.build/en/tutorial/0-introduction/1/

You can also explicitly highlight any facts with a quiz qt the end like this: Send your first script to the browser | Docs

A couple with things like “Install NixOS on a VM”, “Write your first package”, “Create a self-contained development environment with <flakes/nix-shell>” etc. could really help a beginner, but I understand that it would be a lot of effort as well.

2 Likes

I think there’s an old issue for this exact problem. Someone (@roberth ?) suggested adding an option back reference to packages that are mentioned as default packages in options. This is the exact thing I ran into many times when I started out. I quit nix about 5 times over 10 years before sticking with it.

The newcomer experience is brutal and fulfils the prophecy of “linux is free if you have a lot of time” (or whatever the exact version of that is). Hopefully https://nixlang.wiki will make a dent in that. https://nix.dev still feels too cumbersome to contribute to.

1 Like