zperk13,
@zperk13@mastodon.sdf.org avatar

Trying out

I am getting very annoyed with the way it just imports everything

There's a reason we don't do "using namespace" or "use library::*" or "from library import *".

Ok I see a function here. Is it built in or imported? I have no idea.

Or if you somehow know it's not builtin, ok, but which of the 20 imported things is it from?

sandro,
@sandro@c3d2.social avatar

@zperk13 It doesn't. There a few keywords and everything else is either in builtins or in lib. lib is split into multiple sections but everything is also directly available under lib. and mostly those sections are not used and implementation details.

That people overuse with lib is slowly worked on to be removed.

zperk13,
@zperk13@mastodon.sdf.org avatar

I like the idea of all the stuff being defined in files. I like the ability to roll back if something breaks. I like being able to temporarily have a program installed (nix-shell -p) but then removed from the path and marked as not depended on and ready to be removed in garbage collection.

I don't like this weird language. I don't like not understanding how this file knows that home manager or g++ exists. I don't like this new "function" showing up and having no idea where it came from.

zperk13,
@zperk13@mastodon.sdf.org avatar

I scroll through the installed programs on Windows. I see some visual C++ thing. Am I using that? Can I delete it and free up space? What'd I install that used it? Is it even still installed? No idea.

I don't have to worry about that with Nix. I can even put comments in the file and write a novel about why this thing is here, right next to the thing. It getting added can even be part of a git commit.

zperk13,
@zperk13@mastodon.sdf.org avatar

In Nix, I also don't have to worry about having program A wanting Library Z, and then I download program B which wants a newer version of library Z, so I download that, and now program A doesn't work.

But other programs break in Nix because it's not FHS compliant.

sandro,
@sandro@c3d2.social avatar

@zperk13 Even if it would have a FHS layout, things wouldn't always work out of the box and if you really need one, it can be emulated with a fhs env.

sandro,
@sandro@c3d2.social avatar

@zperk13 It's not weird, it's a run of the mill functional language and for most beginner things it doesn't even matter that it is functional.

The file doesn't know anything. Nix looks everything up through channels, flakes and then you have a high level wrapper which pulls everything together.

lib comes all from the lib directory in nixpkgs.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • NixOS
  • khanakhh
  • DreamBathrooms
  • cubers
  • cisconetworking
  • osvaldo12
  • magazineikmin
  • Youngstown
  • thenastyranch
  • rosin
  • slotface
  • Durango
  • mdbf
  • kavyap
  • tacticalgear
  • JUstTest
  • InstantRegret
  • normalnudes
  • modclub
  • ngwrru68w68
  • everett
  • GTA5RPClips
  • ethstaker
  • anitta
  • Leos
  • tester
  • provamag3
  • megavids
  • lostlight
  • All magazines