Earlier quoted context omitted.
Haskell is honestly a larger language, and is a pain in the butt to write. If you're just writing configuration or a very simple package, Nix is basically "JSON with colons, multiline strings, and function calls". Haskell doesn't have a reasonable built-in syntax for dictionaries/maps/whatever you want to call them, which is 95% of Nix.
A third naïve question: why not just use a functional subset of Scheme? It's got a well-defined syntax for key/value mappings, which is fast enough , funcalls, and you can use lazy evaluation if you use a pure subset of the language. And in any rnrs complient Scheme, it's fairly trivial to make a strict functional dialect. And in Guile or Racket, it's even easier. Unfortunately, Guix doesn't do this. Which meant Guix…
Purely Functional Linux with NixOS [video]
101–110 of 143 posts
Re: Purely Functional Linux with NixOS [video]
#102Earlier quoted context omitted.
Haskell is honestly a larger language, and is a pain in the butt to write. If you're just writing configuration or a very simple package, Nix is basically "JSON with colons, multiline strings, and function calls". Haskell doesn't have a reasonable built-in syntax for dictionaries/maps/whatever you want to call them, which is 95% of Nix.
Well, you would use records, but records are a weak point of the Haskell language. I've discussed "why not Haskell" with some Nix people and they specifically mentioned the lack of row polymorphism.
Re: Purely Functional Linux with NixOS [video]
#103Earlier quoted context omitted.
Checksums!
You're missing the point.
M-x passive-agressive-mode
And now, I'll go upgrade my NVIDIA drivers, and load up Psychonauts on Steam.Re: Purely Functional Linux with NixOS [video]
#104Earlier quoted context omitted.
Yeah, that's the reason why i have a "got installer? not worth using" pre-filter for Windows software. Not sure how things are these days, but i'm talking about the Win 9x to Win 7 days.
But that is not a packaging system. You can put binaries in zip files in Linux systems too. And I don't understand what kind of software you used with that pre-filter. You cannot even install drivers then.
But a lot of smaller programs are available in the zip form, or have alternatives that are.
In short, i prefer portable programs - https://en.wikipedia.org/wiki/Portable_application
Re: Purely Functional Linux with NixOS [video]
#105Anyone using NixOS as a server in production? We're on FreeBSD now but I think Linux in our stack is inevitable (many servers, like Aerospike, are Linux only). There's always Ubuntu, but this looks lovely. I've had my eye on it for a personal Linux workstation but haven't heard anything about it as a server.
If you're a non-trivial shop you'll need to harden it, you're better off with CentOS/RHEL than Ubuntu.
Re: Purely Functional Linux with NixOS [video]
#106Earlier quoted context omitted.
We run a fleet. Happy to answer questions here or shoot us a mail at team@wearewizards.io if it's sensitive.
Do you have a blog post about it or something? I don't have specific questions, I'd just love to see how Nix looks in production.
It's still Linux but a lot of common problems go away. E.g. if you remove a user from your config then it's removed on the server (as opposed to Ansible).
Or: Because you have a dependency DAG all services that need restarting after a change are known (no more Chef notifies :restart).
Or: No more apt-get dist-upgrade. You can have a single package depend on an entirely new version of your OS and keep the old OS in place (except for the kernel version of course).
Re: Purely Functional Linux with NixOS [video]
#107My Linux experience so far has been limited to ls, cd and vi. From the outside, package management has always seemed to me like a huge mess. But, I've been starting to learn Nix recently and I really like it. I can add, remove, test, screw up, change my mind, whatever without stress.
I love Nix and completely agree with that, and I do have lots of experience with several package managers (deb, rpm, rubygems, ...)
Re: Purely Functional Linux with NixOS [video]
#108For example, our stack is nginx, uwsgi, django, elasticsearch, and postgres. Installing most of the pieces seemed relatively straightforward(though required a fair bit of searching through the nixpkgs source), but it's honestly pretty unclear how to install our actual django app.
Currently we just clone the repo to the server and point uwsgi to the relevant uwsgi.py file, but it doesn't seem like there's a good way to do that in NixOS.
I'd love to hear that I'm wrong here, but again, the lack of decent example documentation is really the single biggest issue I have with NixOS. The rest of the documentation seems to be improving slowly but steadily.
Re: Purely Functional Linux with NixOS [video]
#109Earlier quoted context omitted.
I greatly respect scheme, and yet I like the nix expression language too. Scheme's claim is you shouldn't be using x more bloated language than it, but the nix expression language is smaller and simpler than Scheme; it beats it at its own game! More practically, I can't think of anything that I wanted that Scheme offers but the nix expression language doesn't.
>the nix expression language is smaller and simpler than Scheme; it beats it at its own game! It may have a smaller stdlib than scheme (but I doubt it). But it's very hard to be simpler than scheme semantically. As for what I want from scheme that nix doesn't provide, a simple, regular, syntax that I already know is what I want. I understand that that doesn't apply to everybody.
Yes, I mean the semantics of the language. Scheme is indisputably more complex. There isn't really much a standard library for the Nix Expression Language either.
> As for what I want from scheme that nix doesn't provide, a simple, regular, syntax that I already know is what I want. I understand that that doesn't apply to everybody.
off the top of my head:
Scheme-Simplified ::= *
Items ::= (define (*) )
| (define )
Expr ::= ( *)
| (set! )
| (lambda (*) )
Nix-Expr ::= :
| with ;
| { * }
| let * in
|
| .
| .
| ?
| ? or
Nix-Item ::= = ;
| = ;
| inherit ;
| inherit () ;Re: Purely Functional Linux with NixOS [video]
#110Earlier quoted context omitted.
A third naïve question: why not just use a functional subset of Scheme? It's got a well-defined syntax for key/value mappings, which is fast enough , funcalls, and you can use lazy evaluation if you use a pure subset of the language. And in any rnrs complient Scheme, it's fairly trivial to make a strict functional dialect. And in Guile or Racket, it's even easier. Unfortunately, Guix doesn't do this. Which meant Guix…
A purely functional subset of Scheme, honestly, is different enough from most lisps that it's a new language on its own. If you're learning a new language, a new syntax isn't very hard. And there's not a terrible amount of people who think S-expressions are an inherently good syntax.
No, it's not. It's a cut-down Scheme: Most of your scheme knowledge would apply directly, or indirectly.
Besides, even if it was a different language, it's a pre-existing one: DSSSL is pretty much this.
>If you're learning a new language, a new syntax isn't very hard.
Yes, but for me, the choice is learning a new language that has no other applications, save package managment, and using a subset of a language I already know.
>And there's not a terrible amount of people who think S-expressions are an inherently good syntax
I said from my perspective. I'm a schemer, so I'm already on board with sexprs.