Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix language tutorial: restructure introduction #609

Merged
merged 7 commits into from
Jul 13, 2023

Conversation

fricklerhandwerk
Copy link
Collaborator

@fricklerhandwerk fricklerhandwerk commented Jun 21, 2023

this collapses the "don't panic" section into a motivating introduction and gives
the document a more distinctive name.

this also addresses feedback stating that having "basics" in the title
may be misleading about the effort required to work through the
tutorial.

this also fixes a long-standing gap of not mentioning function arguments as another form of name assignment.

@NixOS/documentation-team

@cloudflare-pages
Copy link

cloudflare-pages bot commented Jun 21, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 16ffcd0
Status: ✅  Deploy successful!
Preview URL: https://d52e831c.nix-dot-dev.pages.dev
Branch Preview URL: https://language-tutorial-title.nix-dot-dev.pages.dev

View logs

@roberth
Copy link
Member

roberth commented Jun 21, 2023

What is the process here? Are you extending the introduction because it's too short? Is the desired length of an introduction documented somewhere?

@fricklerhandwerk
Copy link
Collaborator Author

No, the intent is to focus the introduction on the motivation for the particular approach. I was thinking about cutting down on the elements of programming, but didn't find a good way so there they still are. How would you illustrate to someone not necessarily familiar with functional programming that a language is small and has few fundamental moving parts?

@roberth
Copy link
Member

roberth commented Jun 21, 2023

How would you illustrate to someone not necessarily familiar with functional programming that a language is small and has few fundamental moving parts?

I'd sneak in the three elements of lambda calculus (variable reference, lambda abstraction, application):

  • functions: you can describe complex behavior by introducing a name for something you don't have
  • function application: you can use such behaviors by filling in the thing that was missing, as many times as you need
  • names: you can use a name to refer to something you've introduced with a function, or what's made available to you by the programming environment

So this de-emphasizes the role of "primitive values" compared to The Elements Of Programming you referenced.
Not coincidentally that's the purpose of lambda calculus: a simplified model of computation, and indeed all data can be expressed using only a function primitive. (e.g. consider true = a: b: a; false = a: b: b; or the more general encoding schemes that exist for "usable" data types)

Nix is a functional language, so maybe this is a useful model?
When you have the lambda calculus part down, and the sugar like let, inherit, and the unrelated monster with, you're going to be thinking about exactly all the other things that make up your problem domain, which is of course the bread and butter of what we're documenting. So that seems like a sensible boundary for dividing up the material "reference style", but for a learning experience, I guess we'll want to return to this subject to "exercise" the lambda calculus thinking. It's not just a thing you use but a cognitive skill.

@fricklerhandwerk
Copy link
Collaborator Author

  • @proofconstruction, @renoire: have some concerns about inclusion of the time expected section
    • should add some introduction how we came up with these numbers
  • @fricklerhandwerk: should move the time estimate after the prerequisites

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-06-26-documentation-team-meeting-notes-58/29666/1

@fricklerhandwerk fricklerhandwerk changed the title rename the Nix language tutorial Nix language tutorial: restructure introduction Jul 13, 2023
this collapses the "don't panic" section into a motivating introduction and gives
the document a more distinctive name.

this also addresses feedback stating that having "basics" in the title
may be misleading about the effort required to work through the
tutorial.
this fills a long-standing gap of not mentioning function arguments as
another form of name assignment
introducing a negatively connotated word is probably not a good idea.
there is some risk of inducing fear that was not there before, and the
tongue-in-cheek aspect may not come across.

the title should be unique and easy to recognise, and it was. "Reading
the Nix language" is already the title of the talk most of this is based
on, and we shouldn't reuse it
@fricklerhandwerk
Copy link
Collaborator Author

I decided against renaming the article. The title should stay brief and unique, and it is. The content changes are already an improvement.

@fricklerhandwerk fricklerhandwerk merged commit 1fce494 into master Jul 13, 2023
2 of 3 checks passed
@fricklerhandwerk fricklerhandwerk deleted the language-tutorial-title branch October 9, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants