!tPxtoBdChSsxHuBlNW:nixos.org

NixOS Marketing

257 Members
NixOS website + marketing team: https://nixos.org/community/teams/marketing.html56 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
1 May 2024
@infinisil:matrix.orginfinisil djacu Oh here's something else: inherit doesn't alway desugar to x = x 07:42:11
@infinisil:matrix.orginfinisil E.g. `x: rec { inherit x; }` 07:43:33
@raboof:matrix.orgraboofcool! the 'bind set arguments' (top-right) can't decide between 'set' or 'args' it seems?07:51:27
@raboof:matrix.orgraboofmaybe use 'attribute set' rather than just 'set' in that description? ('set' may invoke different expectations to people not familiar with nix)07:52:43
@raboof:matrix.orgraboof * cool! the 'bind set arguments' (bottom-right) can't decide between 'set' or 'args' it seems? 07:53:12
@infinisil:matrix.orginfinisil djacu Also "update" attribute sets instead of "merge". Merge sounds recursive 08:03:44
@infinisil:matrix.orginfinisil djacu Actually maybe it's best to just post it in a Nix issue so that the Nix team can briefly bikeshed and check it? :P 08:05:04
@infinisil:matrix.orginfinisil It looks really cool though, let's get that posted soon! 08:05:26
@tomberek:matrix.orgtomberekPerhaps a mention that builtins exist? A full pverview is out of scope, but it might be good to point out.08:47:55
@tomberek:matrix.orgtomberek* Perhaps a mention that builtins exist? A full overview is out of scope, but it might be good to point out.08:48:10
@raboof:matrix.orgraboofgood point, maybe point to 'further references' like https://nixos.org/manual/nix/stable/language/builtins.html and https://nixos.org/manual/nixpkgs/unstable/#id-1.4 ? Getting hard to fit in, though, I can imagine ;)09:07:40
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.15:06:50
@djacu:matrix.orgdjacu
In reply to @raboof:matrix.org
maybe use 'attribute set' rather than just 'set' in that description? ('set' may invoke different expectations to people not familiar with nix)
Yeah ideally I would use 'attribute set' here but it didn't fit on a single line. Space is a premium so I shortened it to set. Thinking about just removing the word 'set` here. Since it is a continuation from the previous three examples, it should be clear that it is still an attrset
15:11:05
@djacu:matrix.orgdjacu
In reply to @raboof:matrix.org
cool! the 'bind set arguments' (bottom-right) can't decide between 'set' or 'args' it seems?

The inspiration was the nixcademy cheat sheet.
https://nixcademy.com/cheatsheet.html

I changed the bind arguments variable to args because it's contextually different. Also a lot of examples I've seen usually call that variable args or inputs in the case of flakes.

15:13:17
@djacu:matrix.orgdjacu

Wow thanks for all the feedback everyone. For reference, we are trying to emulate something similar to the nixcademy cheat sheet (https://nixcademy.com/cheatsheet.html). This one being just for the nix language.

The design goals I am working with are

  • printable (so we can hand them out at cons)
  • start with just the nix language (no nix commands for now)
  • ideally 1 page
  • cover enough basics that users can get going (i.e. it's not comprehensive)

We could go to 2 pages but ideally it would be 1 for the nix language and 1 for nix commands.
Built-ins would be a great addition. Trying to figure out how to make it all fit.
Creating this in latex. The default font size, which you all see, is 10pt. I could try 9pt... would need to do some test prints to see if it would look okay.

15:20:26
@djacu:matrix.orgdjacu

Doesn't it still hold true in this case?

nix-repl> (x: rec {inherit x;}) 10
{ x = 10; }
nix-repl> :p (x: rec {inherit x;}) { y = { z = 20; }; }
{ x = { y = { z = 20; }; }; }
15:28:54
@raboof:matrix.orgraboofMakes sense, then it should be 'args.x' and 'args.y' right?15:29:44
@djacu:matrix.orgdjacu
In reply to @raboof:matrix.org
good point, maybe point to 'further references' like https://nixos.org/manual/nix/stable/language/builtins.html and https://nixos.org/manual/nixpkgs/unstable/#id-1.4 ? Getting hard to fit in, though, I can imagine ;)
We really need to get our own URL shortener
15:31:04
@djacu:matrix.orgdjacuah yes i see what you mean. i caught that right after i posted it last night. forgot to mention it. thanks for calling it out!16:20:27

Show newer messages


Back to Room ListRoom Version: 6