Valentin Gagarin
961bb2766a
be more precise what we cover here
...
most importantly, the "elements of programming" approach is understood
in a broader sence. we don't really deal with operators and just subsume
them under functions.
2022-10-04 08:34:33 +02:00
Valentin Gagarin
e64b2059e0
flarify role of NixOS
2022-10-04 08:34:33 +02:00
Valentin Gagarin
23c8c80481
note the overview is an overview
2022-10-04 08:34:33 +02:00
Valentin Gagarin
e5b77c58fc
make Derivations a topic on its own
...
this pays tribute to its central role in Nix and elegantly removes it
from the part on side effects, whicht it doesn't belong to.
2022-10-04 08:34:33 +02:00
Valentin Gagarin
b3407ec6b6
move indented strings to the end
...
they are the least significant combination of frequency of occurrence
and peculiarity, even if they're really handy.
but remember, the goal is to help people *understand* Nix language code,
not write it effectively.
2022-10-04 08:34:33 +02:00
Valentin Gagarin
90cbe92389
clarify purpose of inherit
2022-10-04 08:34:33 +02:00
Valentin Gagarin
8047c8f16e
restructure functions section
2022-10-04 08:34:33 +02:00
Valentin Gagarin
3e89ed3038
search paths are not reproducible at all
2022-10-04 08:34:33 +02:00
Valentin Gagarin
f478379550
add missing semicolons
2022-10-04 08:34:33 +02:00
Valentin Gagarin
1d86654878
elaborate on current directory
2022-10-04 08:34:33 +02:00
Valentin Gagarin
69b0858367
add emphasis
2022-10-04 08:34:33 +02:00
Valentin Gagarin
1dd5699888
less strict wording
2022-10-04 08:34:33 +02:00
Valentin Gagarin
d2cad3d48e
clarify nested functions with parentheses
2022-10-04 08:34:33 +02:00
Valentin Gagarin
de6128a8f8
chaining arguments -> multiple arguments
...
"chaining arguments" is not well-defined, as [noted] by @matta
[notes]: https://github.com/NixOS/nix.dev/pull/267/files#r968597277
2022-10-04 08:34:33 +02:00
Valentin Gagarin
f66543da01
Nix language -> the Nix language
...
as [pointed out] by @matta
[pointed out]: https://github.com/NixOS/nix.dev/pull/267/files#r968574463
2022-10-04 08:34:33 +02:00
Valentin Gagarin
ff2c457f32
reword; there are also invalid expressions
2022-10-04 08:34:33 +02:00
Valentin Gagarin
e9af30a6ff
shorten time estimate
...
move the section further up, as recommended by @infinisil
2022-10-04 08:34:33 +02:00
Valentin Gagarin
d910383580
capitalize list items
...
according to English style guides such as [1]
[1]: https://www.instructionalsolutions.com/blog/bulleted-list-punctuation
2022-10-04 08:34:33 +02:00
Valentin Gagarin
93706c411e
add notes on strict evaluation
2022-10-04 08:34:33 +02:00
Valentin Gagarin
109ae74e94
Update source/tutorials/nix-language.md
...
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
aaea5b42c0
Update source/tutorials/nix-language.md
...
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
1fcaaea3b0
Update source/tutorials/nix-language.md
...
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
68c33e7ed1
Update source/tutorials/nix-language.md
...
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
7474d830a1
Update source/tutorials/nix-language.md
...
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
90522e865f
expressions are transformed, not simplified
...
@infinisil: This is a bit misleading, the model isn't that expressions get simplified. Instead it's that each expression type has semantics for how it should be turned into a Nix value.
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
14455c1d86
evaluate to Nix value, not just value
...
@infinisil: Introducing the concept of a Nix value fits very well here
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
e5260f3d6d
libraries are not just functions
...
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
55eb91bd9e
stdenv -> stdenv.mkDerivation
...
@infinisil: `stdenv` itself is not a builder
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
5938ad044b
remove "and" from example list
...
@infinisil: The "and" would indicate the end of the list
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
506b35311e
libraries have more things than functions
...
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
30d76c858b
use less ambiguous grammar for what NixOS is
...
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
abf0f5e6d3
use consistent grammatical structure in requirements
...
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
95ce02b793
update Nix manual URLs
2022-10-04 08:34:33 +02:00
Valentin Gagarin
8ac15f8a08
Update source/tutorials/nix-language.md
...
Co-authored-by: Dan Baker <daniel.n.baker@gmail.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin
78a43fb28f
use consistent terminology
...
sort out derivation, Derivation, `derivation` and store derivation
2022-10-04 08:34:33 +02:00
Valentin Gagarin
adaba6637e
fix wording
2022-10-04 08:34:33 +02:00
Valentin Gagarin
e0ee7d5597
link to installation instructions
2022-10-04 08:34:33 +02:00
Valentin Gagarin
17bf23546a
rework section on side effects
2022-10-04 08:34:33 +02:00
Valentin Gagarin
397a39f9de
mention operators
...
at some point we have to introduce them, even if they are not really
important here.
2022-10-04 08:34:33 +02:00
Valentin Gagarin
8f1dd17106
add proper examples to file system paths
2022-10-04 08:34:33 +02:00
Valentin Gagarin
c36c6ed732
rewordings and links
2022-10-04 08:34:33 +02:00
Valentin Gagarin
8a4d87474b
add detailed explanations to some examples
2022-10-04 08:34:33 +02:00
Valentin Gagarin
cd7e00ba8d
reword time estimate
2022-10-04 08:34:33 +02:00
Valentin Gagarin
bb9e7d7ab3
Nix package manager -> Nix
...
based on https://github.com/NixOS/nix.dev/issues/275#issuecomment-1227572104
2022-10-04 08:34:33 +02:00
Valentin Gagarin
7e18f44302
add introduction and cross-linking
...
this should both help with initial overview and navigation
2022-10-04 08:34:33 +02:00
Valentin Gagarin
5851659340
add detailed explanation to let expression
2022-10-04 08:34:33 +02:00
Valentin Gagarin
4253a0bc7a
nixpkgs/lib
-> pkgs.lib
...
this is probably how most people would encounter it, but since there are
so many equivalent representations, maybe it does not matter outside
a dedicated guide to Nixpkgs
2022-10-04 08:34:33 +02:00
Valentin Gagarin
922e018fd6
nixpkgs
-> Nixpkgs
...
based on https://github.com/NixOS/nix.dev/issues/275#issuecomment-1227572104
2022-10-04 08:34:33 +02:00
Valentin Gagarin
b084005748
fix copypaste error
2022-10-04 08:34:33 +02:00
Valentin Gagarin
aa0bf42491
fix typo in link
2022-10-04 08:34:33 +02:00