Earlier quoted context omitted.
>A purely functional subset of Scheme, honestly, is different enough from most lisps that it's a new language on its own. 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 i…
> No, it's not. It's a cut-down Scheme: Most of your scheme knowledge would apply directly, or indirectly. Only if you regularly write code using purely functional scheme in the first place. The difficulty of writing in a new language is very rarely figuring out what function calls to make, at least for me - it's about thinking in terms of the language.
Purely Functional Linux with NixOS [video]
121–130 of 143 posts
Re: Purely Functional Linux with NixOS [video]
#122Earlier quoted context omitted.
> It may have a smaller stdlib than scheme (but I doubt it). But it's very hard to be simpler than scheme semantically. 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 tha…
Yeah, that scheme syntax looks much simpler. And it is far more regular than Nix's. Of course, scheme is regular enough that the output of the readtables match this: Scheme ::= * Expr ::= | ( *) Atom ::= | | And IIRC, that's close to what r5rs requires, although without the '`, syntactic sugar, which a readtable would handle in schemes that have them, and would be added to the above for schemes that don't. I may be w…
Besides dynamic variables, there is also plain old variable mutation. Scheme macros are much more complex than what you described, because of hygiene. For the sake of making Scheme look better, I left macros out of my grammar. The Nix expression language has none of these things.
> but more regular? I doubt it.
Nix's lack of a top level (the * in Scheme) is a big boon for simplicity, especially concerning imports from other files which I forgot to include.
Re: Purely Functional Linux with NixOS [video]
#123Earlier 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.
How's the binary security on NixOS these days? The official information I find are... worrying. Specifically: a) security updates are the same as all the other updates and may take days to get to you, do runtime replacements manually yourself ( https://nixos.org/wiki/Security_Updates ) and b) next to no hardening during compilation ( https://nixos.org/wiki/Hardened_NixOS )
Re: Purely Functional Linux with NixOS [video]
#124Earlier quoted context omitted.
Yeah, that scheme syntax looks much simpler. And it is far more regular than Nix's. Of course, scheme is regular enough that the output of the readtables match this: Scheme ::= * Expr ::= | ( *) Atom ::= | | And IIRC, that's close to what r5rs requires, although without the '`, syntactic sugar, which a readtable would handle in schemes that have them, and would be added to the above for schemes that don't. I may be w…
Note that's a dumbed down scheme, where nothing can be accomplished, I should take a look at the guix APIs to craft a bigger subset. I realized as I wrote it, my argument does look undercut, but didn't want to spend more time just yet, so posted that anyways. Besides dynamic variables, there is also plain old variable mutation. Scheme macros are much more complex than what you described, because of hygiene. For the s…
Fair enough, but:
>I should take a look at the guix APIs to craft a bigger subset.
What? No.
Those don't add any complexity to the language. You don't add every function to your BNF syntax, do you? This is what I meant about regularity: The sexpr and atoms are the only syntactic elements (except quote and friends, which are syntactic sugar for sexprs).
Most of the things you included in your scheme BNF syntax aren't syntax, they're special forms. Special forms are not syntactically distinct, they are semantically distinct. So while define, if, and lambda are part of the semantics, they aren't part of the syntax.
Macros, too, have no syntactic differentiation: You actually CAN'T add macros to the BNF of the syntax, because there is no syntax to add.
If that's not regular, I don't know what is.
>Nix's lack of a top level (the * in Scheme) is a big boon for simplicity, especially concerning imports from other files which I forgot to include.
How? What's so complex about having multiple forms at toplevel?
Re: Purely Functional Linux with NixOS [video]
#125Earlier quoted context omitted.
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.
Purescript?
(aside from Haskell and Scheme themselves, of course)
Re: Purely Functional Linux with NixOS [video]
#126Am I the only one who thought Guix did this better? Maybe it's just my freakish and unnatural love of parenthesis. Or my hatred of learning new configuration syntaxes (I just want to install packges, dammit! Yes, I enjoy learning new languages, but I need to get this machine up and running, and I don't want to learn your new programming language to do that)
What I really worry about is my nonfree wireless driver and Nvidia driver, which doesn't seem to be available on Guix.
https://github.com/genenetwork/guix-bioinformatics
and
https://github.com/Ecogenomics/ace-guix
I'm not sure how easy it is to maintain a system with extra packages like this, but it'd be nice to be able to use an "overlay" repo as you can in Gentoo for personal/custom packages.
Would love to ping davexunit to see if he can elaborate, because I don't see any specific way to add repositories from the documentation.
Re: Purely Functional Linux with NixOS [video]
#127so could this replace docker as distribution format? cgroups and namespaces can be use independently of docker.
Re: Purely Functional Linux with NixOS [video]
#128Earlier quoted context omitted.
Purescript?
Can I just point out that pretty much all of these options, including guix, are things that were invented well _after_ nix was established as its own thing? (aside from Haskell and Scheme themselves, of course)
Those PureScript records tho...
Re: Purely Functional Linux with NixOS [video]
#129Earlier quoted context omitted.
> No, it's not. It's a cut-down Scheme: Most of your scheme knowledge would apply directly, or indirectly. Only if you regularly write code using purely functional scheme in the first place. The difficulty of writing in a new language is very rarely figuring out what function calls to make, at least for me - it's about thinking in terms of the language.
Do you know what % of scheme is fairly functional? Most of it. There are ~19 functions in r5rs that mutate state, if you count IO related functions. I have used maybe half of them, and mostly the IO ones. The rest were for mutating variables, lists, vectors, and strings. Many of those are rarely used. I mean, really, when was the last time you used set-car! or set-string!?
Re: Purely Functional Linux with NixOS [video]
#130Earlier quoted context omitted.
Note that's a dumbed down scheme, where nothing can be accomplished, I should take a look at the guix APIs to craft a bigger subset. I realized as I wrote it, my argument does look undercut, but didn't want to spend more time just yet, so posted that anyways. Besides dynamic variables, there is also plain old variable mutation. Scheme macros are much more complex than what you described, because of hygiene. For the s…
>Besides dynamic variables, there is also plain old variable mutation. Scheme macros are much more complex than what you described, because of hygiene. For the sake of making Scheme look better, I left macros out of my grammar. The Nix expression language has none of these things. Fair enough, but: >I should take a look at the guix APIs to craft a bigger subset. What? No. Those don't add any complexity to the languag…
Oh, believe me, I'm all about the separation between language and library. I mean the smallest subset of Scheme necessary to use the api. For example, it might use string maps instead of association lists.
> Most of the things you included in your scheme BNF syntax aren't syntax, they're special forms.
This is just terminology. We have a hierarchy of languages here:
1. All terminating Scheme programs are Scheme programs
2. All Scheme programs are valid s-exprs
3. All s-exprs are plain text
4. All plain text is valid bytestring.
...
> Macros, too, have no syntactic differentiation: You actually CAN'T add macros to the BNF of the syntax, because there is no syntax to add.I was doing a grammar for scheme programs, not anything else on that list. Macros invocation requires its own non-terminals because its arguments are arbitrary sexprs, not merely unevaluated expressions.
> How? What's so complex about having multiple forms at toplevel?
Imports. file=expression makes Nix's `import ` dead simple. Scheme's is necessarily more complicated.