!avYyleMexqjFHoqrME:nixos.org

Nix Documentation

402 Members
Discussion about documentation improvements around the Nix ecosystem81 Servers

Load older messages


SenderMessageTime
19 Apr 2024
@fricklerhandwerk:matrix.orgfricklerhandwerk
In reply to @terru:raccoon.college
sure: https://github.com/NixOS/nixpkgs/pull/305328
Thanks!
15:28:02
@terru:raccoon.college@terru:raccoon.college (and while we are on the topic of leftover docbook mentions: anyone got opinions on this issue of mine?) 15:29:11
@djacu:matrix.orgdjacu fricklerhandwerk: infinisil I've created an issue for expanding and improving the module documentation on nix.dev. I would appreciate your and anyone else's feedback.
https://github.com/NixOS/nix.dev/issues/966
16:34:01
@fricklerhandwerk:matrix.orgfricklerhandwerk
In reply to @terru:raccoon.college
(and while we are on the topic of leftover docbook mentions: anyone got opinions on this issue of mine?)
Yeah just ditch those references. Thanks a lot!
17:10:29
@olafklingt:matrix.org@olafklingt:matrix.org I started to think/brainstorm about the NixOS manual again. And i remember that fricklerhandwerk recently said that he thinks "a lot of things in the manual should be on the wiki". What was did you had in mind with of that statement? 19:15:31
@terru:raccoon.college@terru:raccoon.college
In reply to @fricklerhandwerk:matrix.org
Yeah just ditch those references. Thanks a lot!
have opened a PR removing it
19:29:59
@fricklerhandwerk:matrix.orgfricklerhandwerk
In reply to @olafklingt:matrix.org
I started to think/brainstorm about the NixOS manual again. And i remember that fricklerhandwerk recently said that he thinks "a lot of things in the manual should be on the wiki". What was did you had in mind with of that statement?
All the NixOS-specific interfaces should be documented in the manual. Probably also installation instructions. How to use/troubleshoot particular software can be in the Wiki, because that's not actually about NixOS.
22:22:05
20 Apr 2024
@nscnt:matrix.org@nscnt:matrix.org left the room.13:41:08
@olafklingt:matrix.org@olafklingt:matrix.orgthis closed pr https://github.com/NixOS/nix.dev/pull/964 triggered my brainstorming mind to think about the possibility to have testable tutorials. What if every tutorial is an annotated nixos-test? For me the question is not focused on the style of annotation right now. But rather if you have ideas why an attempt to realize this would be futile? maybe to difficult to realize for potential content contributors (deteriorating)? maybe to complex to implement correctly (endless poc...)?14:52:22
@fricklerhandwerk:matrix.orgfricklerhandwerk
In reply to @olafklingt:matrix.org
this closed pr https://github.com/NixOS/nix.dev/pull/964 triggered my brainstorming mind to think about the possibility to have testable tutorials.
What if every tutorial is an annotated nixos-test?
For me the question is not focused on the style of annotation right now.
But rather if you have ideas why an attempt to realize this would be futile?
maybe to difficult to realize for potential content contributors (deteriorating)?
maybe to complex to implement correctly (endless poc...)?

I find this to be a bit of a rabbit hole, because in my opinion (which may as well be very wrong), all of the tooling we have for that is near-useless for our purposes. Which doesn't make it impossible to do anything about the problem of tutorials diverging from the code, but raises the question of how to approach it regardless.

There are three ways I currently see, and find all of them to be a stretch:

  • Add NixOS tests that accompany tutorials. Problem: duplication and a mess of a setup
  • Use https://github.com/OceanSprint/tesh to extract test cases from tutorials. This would cover many use cases, but the tool is not actively developed, and there are lots of open questions. I think it is worth trying out.
  • Do something completely different, as sketched here: https://github.com/fricklerhandwerk/beast. Problem: This very unorthodox and requires building some infrastructure first, so there's high risk of diverting attention from what we may think is more important.
16:30:20
@fricklerhandwerk:matrix.orgfricklerhandwerk
In reply to @olafklingt:matrix.org
this closed pr https://github.com/NixOS/nix.dev/pull/964 triggered my brainstorming mind to think about the possibility to have testable tutorials.
What if every tutorial is an annotated nixos-test?
For me the question is not focused on the style of annotation right now.
But rather if you have ideas why an attempt to realize this would be futile?
maybe to difficult to realize for potential content contributors (deteriorating)?
maybe to complex to implement correctly (endless poc...)?
*

I find this to be a bit of a rabbit hole, because in my opinion (which may as well be very wrong), all of the tooling we have for that is near-useless for our purposes. Which doesn't make it impossible to do anything about the problem of tutorials diverging from the code, but raises the question of how to approach it regardless.

There are three ways I currently see, and find all of them to be a stretch:

  • Add NixOS tests that accompany tutorials. Problem: duplication and a mess of a setup, which needs to be maintained by hand.
  • Use https://github.com/OceanSprint/tesh to extract test cases from tutorials. This would cover many use cases, but the tool is not actively developed, and there are lots of open questions. I think it is worth trying out.
  • Do something completely different, as sketched here: https://github.com/fricklerhandwerk/beast. Problem: This very unorthodox and requires building some infrastructure first, so there's high risk of diverting attention from what we may think is more important.
16:30:55
@olafklingt:matrix.org@olafklingt:matrix.org
In reply to @fricklerhandwerk:matrix.org

I find this to be a bit of a rabbit hole, because in my opinion (which may as well be very wrong), all of the tooling we have for that is near-useless for our purposes. Which doesn't make it impossible to do anything about the problem of tutorials diverging from the code, but raises the question of how to approach it regardless.

There are three ways I currently see, and find all of them to be a stretch:

  • Add NixOS tests that accompany tutorials. Problem: duplication and a mess of a setup, which needs to be maintained by hand.
  • Use https://github.com/OceanSprint/tesh to extract test cases from tutorials. This would cover many use cases, but the tool is not actively developed, and there are lots of open questions. I think it is worth trying out.
  • Do something completely different, as sketched here: https://github.com/fricklerhandwerk/beast. Problem: This very unorthodox and requires building some infrastructure first, so there's high risk of diverting attention from what we may think is more important.
thanks for the links. actually this convinces me that it should be feasible. now one needs to find time :-P
17:15:59
@djacu:matrix.orgdjacu
In reply to @djacu:matrix.org
fricklerhandwerk: infinisil I've created an issue for expanding and improving the module documentation on nix.dev. I would appreciate your and anyone else's feedback.
https://github.com/NixOS/nix.dev/issues/966

olaf: You might be interested in what I was proposing for the module tutorials update. It's probably not as comprehensive as what you have in mind but might be suitable for smaller tests that don't need the infrastructure of a full nixos-test.

For my workshop, I created lessons where the code was separate from the markdown and inserted at build time of the site. Each example was evaluated/built and the result was also injected into the markdown. Essentially creating a system where the site would not build if the examples failed to evaluate. I didn't do any checking to make sure the answer was correct but that could be added.

The way I did this was pretty hacky and sometimes cursed (and definitely not the way we should do it on nix.dev) but it's what I had to do given my time constraints. With more time I would have needed to run Nix inside of Nix or come up with some other solution.

17:23:23
@olafklingt:matrix.org@olafklingt:matrix.org
In reply to @djacu:matrix.org

olaf: You might be interested in what I was proposing for the module tutorials update. It's probably not as comprehensive as what you have in mind but might be suitable for smaller tests that don't need the infrastructure of a full nixos-test.

For my workshop, I created lessons where the code was separate from the markdown and inserted at build time of the site. Each example was evaluated/built and the result was also injected into the markdown. Essentially creating a system where the site would not build if the examples failed to evaluate. I didn't do any checking to make sure the answer was correct but that could be added.

The way I did this was pretty hacky and sometimes cursed (and definitely not the way we should do it on nix.dev) but it's what I had to do given my time constraints. With more time I would have needed to run Nix inside of Nix or come up with some other solution.

I feel this might lead to the problem that it is difficult to write the tutorial if you don't see directly what the reader will be able to see. mdbook supports including lines from rs files into the documentation files. but this can become very easily mangled. but i also see the benefits to separate the two. i need to look into literal programming more, to see what caveats have been solved in which way.
17:29:22
@fricklerhandwerk:matrix.orgfricklerhandwerk
In reply to @djacu:matrix.org

olaf: You might be interested in what I was proposing for the module tutorials update. It's probably not as comprehensive as what you have in mind but might be suitable for smaller tests that don't need the infrastructure of a full nixos-test.

For my workshop, I created lessons where the code was separate from the markdown and inserted at build time of the site. Each example was evaluated/built and the result was also injected into the markdown. Essentially creating a system where the site would not build if the examples failed to evaluate. I didn't do any checking to make sure the answer was correct but that could be added.

The way I did this was pretty hacky and sometimes cursed (and definitely not the way we should do it on nix.dev) but it's what I had to do given my time constraints. With more time I would have needed to run Nix inside of Nix or come up with some other solution.

That's pretty much the idea in my sketch, except no hacky insertions into markdown, but rendering markdown from literate programs.
17:37:58
@fricklerhandwerk:matrix.orgfricklerhandwerk
In reply to @djacu:matrix.org

olaf: You might be interested in what I was proposing for the module tutorials update. It's probably not as comprehensive as what you have in mind but might be suitable for smaller tests that don't need the infrastructure of a full nixos-test.

For my workshop, I created lessons where the code was separate from the markdown and inserted at build time of the site. Each example was evaluated/built and the result was also injected into the markdown. Essentially creating a system where the site would not build if the examples failed to evaluate. I didn't do any checking to make sure the answer was correct but that could be added.

The way I did this was pretty hacky and sometimes cursed (and definitely not the way we should do it on nix.dev) but it's what I had to do given my time constraints. With more time I would have needed to run Nix inside of Nix or come up with some other solution.

* That's pretty much the idea in my sketch, except no hacky insertions into markdown, but rendering markdown (or anything) from literate programs.
17:38:10
@djacu:matrix.orgdjacuSeparate files is definitely hacky but worked for me. I had some copy scripts that would build the site and copy the resulting markdown into the live editing area. So I had a pseudo live editing experience. The real big upside to having separate code files is that all the lessons have files that is available to the reader to use right away. Although I wonder if it would be possible to write the code in the markdown, evaluate it (like we are talking about), and also extract it into files so the reader could use them.18:22:14
21 Apr 2024
@paperdigits:matrix.org@paperdigits:matrix.org joined the room.06:49:52
@me:indeednotjames.com@me:indeednotjames.comhttps://github.com/NixOS/nixpkgs/pull/305767: nixos/manual: abort build on warn15:18:24
@me:indeednotjames.com@me:indeednotjames.com PR has been updated and takes the existing documentation.nixos.options.warningsAreErrors option into account instead of hard-coding NIX_ABORT_ON_EVAL 16:21:35
@symys:fnord.theinfinitycorporation.comSYMYƧ joined the room.16:26:16
@symys:fnord.theinfinitycorporation.comSYMYƧHey I noticed a style issue with nix.dev ... the hyperlink color (when not highlighted) is the same color as the blue in-depth explanation expandable backgrounds.16:27:36
@symys:fnord.theinfinitycorporation.comSYMYƧIs that the kinda thing I should open an issue about? I am willing to help with it and all16:28:21
@symys:fnord.theinfinitycorporation.comSYMYƧ(I didn't open an issue, yet, because that seemed like a lot of overhead for such a minor change)16:29:26
@paperdigits:matrix.org@paperdigits:matrix.org left the room.16:57:38
@infinisil:matrix.orginfinisil
In reply to @symys:fnord.theinfinitycorporation.com
Hey I noticed a style issue with nix.dev ... the hyperlink color (when not highlighted) is the same color as the blue in-depth explanation expandable backgrounds.
Oh neat find, apparently it only happens in the light theme, which is why I haven't seen in before.

If you can fix it yourself, a PR would be best!
20:06:52
@olafklingt:matrix.org@olafklingt:matrix.org
In reply to @symys:fnord.theinfinitycorporation.com
Hey I noticed a style issue with nix.dev ... the hyperlink color (when not highlighted) is the same color as the blue in-depth explanation expandable backgrounds.
I can have a look as it's caused by my pr
20:22:21
@olafklingt:matrix.org@olafklingt:matrix.orgI self merged this time because it would be a major annoyance when one cannot read the tutorial properly. 21:30:33
@symys:fnord.theinfinitycorporation.comSYMYƧ
In reply to @olafklingt:matrix.org
I can have a look as it's caused by my pr
Oh, thanks! Looks good, much easier to read and still in color scheme.
22:55:51
22 Apr 2024
@olafklingt:matrix.org@olafklingt:matrix.org fricklerhandwerk: this commit https://github.com/NixOS/nix.dev/pull/940/commits/b556495361e12a9e81adc8080e362ea032b1e123 reverts the change i made to find a middle ground between having the command in the text and removing it. is this on purpose? 16:46:40

Show newer messages


Back to Room ListRoom Version: 6