!avYyleMexqjFHoqrME:nixos.org

Nix Documentation

399 Members
Discussion about documentation improvements around the Nix ecosystem78 Servers

Load older messages


SenderMessageTime
12 Jan 2024
@raitobezarius:matrix.orgraitobezariusBut beyond that, it's a fairly mundane program21:17:17
@asymmetric:matrix.dapp.org.ukasymmetric
In reply to @raitobezarius:matrix.org
I know both codebases, I don't have deep familiarity with neither, but I can achieve deep familiarity with nrd in stupidly low amount of time
are you offering help? 🙃
21:17:51
@raitobezarius:matrix.orgraitobezariusNo, but I can be there if there's any rescue-level tasks regarding nrd or this sort of stuff21:18:17
@raitobezarius:matrix.orgraitobezariusI think it's better if someone else grow experience with nrd :)21:18:27
13 Jan 2024
@bzzm3r:matrix.org@bzzm3r:matrix.org How feasible are such "docs auto-generation" projects, given the lack of typing systems or other automated verification/compiler-based checks in Nix-the-language?00:32:30
@infinisil:matrix.orginfinisil At least nixdoc is used already for lib documentation. 00:33:43
@infinisil:matrix.orginfinisilTbh I gotta sleep though, good night!00:34:48
@bzzm3r:matrix.org@bzzm3r:matrix.orgOkay, and this is an important background RFC: https://github.com/NixOS/rfcs/blob/master/rfcs/0145-doc-strings.md00:44:48
@9999years:matrix.org@9999years:matrix.org
In reply to @infinisil:matrix.org
At least nixdoc is used already for lib documentation.

is there a plan to use nixdoc to document .override arguments/defaults, package doc comments, or function arguments?

# In `my-func/default.nix`
{ }: # ← callPackage arguments

/* I want this to render as documentation for `pkgs.my-func`
 */
{
/* I want this to render as documentation for `myArgument`
 */
myArgument
}:
null
00:55:48
@9999years:matrix.org@9999years:matrix.orgthere's lots of good comments in the nixpkgs source that aren't visible except by grepping and it would be great to get those rendered into reference docs00:56:10
@mcdonc:matrix.orgChris McDonough danielsidhion and bzm3r ... thank you for the PR review suggestions... I think all of them are incorporated except this one https://github.com/NixOS/nixpkgs/pull/277534/files#r1450744275 ... (heading name)... i rationalize why i think it's the right thing in a reply there 03:19:57
@bzzm3r:matrix.org@bzzm3r:matrix.orgRedacted or Malformed Event09:02:01
@bzzm3r:matrix.org@bzzm3r:matrix.org
In reply to @mcdonc:matrix.org
danielsidhion and bzm3r ... thank you for the PR review suggestions... I think all of them are incorporated except this one https://github.com/NixOS/nixpkgs/pull/277534/files#r1450744275 ... (heading name)... i rationalize why i think it's the right thing in a reply there
*

As I said in my review comments, this is looking really good, and if I had merge powers, I'd hit merge. But I also am not in touch with the details in a way that that infinisil or fricklerhandwerk might be, so it's a good thing I don't have merge powers.

Anyway I just want to say, as one new contributor to another, please don't feel frustrated by the fact that this is a process that will take time because both fricklerhandwerk and infinisil:

  • are time constrained
  • are careful, and therefore might have more requests for changes
  • are human

I would suggest putting it up as a point for discussion in the meeting agenda for next week. It tends to get sorted out super fast in these meetings, because of the communication setup.

In the meantime I found it helpful to move onto other projects/PRs. I think of PRs as seeds that I plant...

09:02:35
@bzzm3r:matrix.org@bzzm3r:matrix.org *

As I said in my review comments, this is looking really good, and if I had merge powers, I'd hit merge. But I also am not in touch with the details in a way that that infinisil or fricklerhandwerk might be, so it's a good thing I don't have merge powers.

Anyway I just want to say, as one new contributor to another, in case you do find it frustrating (not sure): please don't feel (too) frustrated by the fact that this is a process that will take time because both fricklerhandwerk and infinisil:

  • are time constrained
  • are careful, and therefore might have more requests for changes
  • are human

I would suggest putting it up as a point for discussion in the meeting agenda for next week. It tends to get sorted out super fast in these meetings, because of the communication setup.

In the meantime I found it helpful to move onto other projects/PRs. I think of PRs as seeds that I plant...

09:03:07
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host
In reply to @bzzm3r:matrix.org
How feasible are such "docs auto-generation" projects, given the lack of typing systems or other automated verification/compiler-based checks in Nix-the-language?

As the author of rfc145 and the creator of https://noogle.dev i can say:

It is very much feasible to autogenerate documentation from doc-comments. At least the API descriptions of all functions in nixpkgs.

Roughly 95% of what is in Noogle currently could also be autogenerated by any other tool.

I think one of the next important steps is to migrate to "doc-comments" (/** {commonmark} */)

asymmetric I've briefly looked into nrd (nixos-render-docs), and opened this issue: https://github.com/NixOS/nixpkgs/issues/280514
See the reply of @pennae there. I dont fully understand yet how to change nrd to clear the path. I'd super thankfull if someone from the community could do it. Otherwise... it will take me quite while, because i'm super busy recently with work related stuff.

09:07:31
@bzzm3r:matrix.org@bzzm3r:matrix.org
In reply to @johannes.kirschbauer:scs.ems.host

As the author of rfc145 and the creator of https://noogle.dev i can say:

It is very much feasible to autogenerate documentation from doc-comments. At least the API descriptions of all functions in nixpkgs.

Roughly 95% of what is in Noogle currently could also be autogenerated by any other tool.

I think one of the next important steps is to migrate to "doc-comments" (/** {commonmark} */)

asymmetric I've briefly looked into nrd (nixos-render-docs), and opened this issue: https://github.com/NixOS/nixpkgs/issues/280514
See the reply of @pennae there. I dont fully understand yet how to change nrd to clear the path. I'd super thankfull if someone from the community could do it. Otherwise... it will take me quite while, because i'm super busy recently with work related stuff.

But who does the work to ensure that the doc comments match up with the actual code?

Also, it seems the doc comments RFC left defining function arguments as "future work"...

09:09:48
@bzzm3r:matrix.org@bzzm3r:matrix.org
In reply to @johannes.kirschbauer:scs.ems.host

As the author of rfc145 and the creator of https://noogle.dev i can say:

It is very much feasible to autogenerate documentation from doc-comments. At least the API descriptions of all functions in nixpkgs.

Roughly 95% of what is in Noogle currently could also be autogenerated by any other tool.

I think one of the next important steps is to migrate to "doc-comments" (/** {commonmark} */)

asymmetric I've briefly looked into nrd (nixos-render-docs), and opened this issue: https://github.com/NixOS/nixpkgs/issues/280514
See the reply of @pennae there. I dont fully understand yet how to change nrd to clear the path. I'd super thankfull if someone from the community could do it. Otherwise... it will take me quite while, because i'm super busy recently with work related stuff.

*

But who does the work to ensure that the doc comments match up with the actual code?

Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

09:10:32
@bzzm3r:matrix.org@bzzm3r:matrix.org *

But who does the work to ensure that the doc comments match up with the actual code?

Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...wouldn't that also be necessary for stuff like noogle, or auto-gen docs?

09:10:51
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host

bzm3r: > Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

I think this is might be common missunderstanding:

We specified it for "lambda-formals".

#### Lambda formals

```nix
/**Doc for the whole lambda function*/
{
 /**Doc for formal 'a'*/
 a
}:
 a              
```

09:12:43
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host *

bzm3r: > Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

I think this might be common missunderstanding:

We specified it for "lambda-formals".

#### Lambda formals

```nix
/**Doc for the whole lambda function*/
{
 /**Doc for formal 'a'*/
 a
}:
 a              
```

09:12:52
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host bzm3r: The rfc is not yet fully implemented. What currently works is all the stuff that you can right now see in noogle. 09:14:36
@bzzm3r:matrix.org@bzzm3r:matrix.org
In reply to @johannes.kirschbauer:scs.ems.host

bzm3r: > Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

I think this might be common missunderstanding:

We specified it for "lambda-formals".

#### Lambda formals

```nix
/**Doc for the whole lambda function*/
{
 /**Doc for formal 'a'*/
 a
}:
 a              
```

Ah, I think I see. Okay, so this is presumably also where we put type information? (does "lambda formal" have a more specific meaning outside of nix/nixos?)
09:14:40
@bzzm3r:matrix.org@bzzm3r:matrix.org
In reply to @johannes.kirschbauer:scs.ems.host

bzm3r: > Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

I think this might be common missunderstanding:

We specified it for "lambda-formals".

#### Lambda formals

```nix
/**Doc for the whole lambda function*/
{
 /**Doc for formal 'a'*/
 a
}:
 a              
```

* Ah, I think I see. Okay, so this is presumably also where we put type information too then? (does "lambda formal" have a more specific meaning outside of nix/nixos?)
09:15:00
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host

bzm3r: You could also verify if your comments show up in noogle.

If you point noogle's "nixpkgs-master" flake input to your fork of nixpkgs and then execute nix build .#ui
You'll end up with the static site in ./result/lib/node_modules/noogle/out which you can serve statically with any http server. (e.g. nodePackages.http-server)

09:21:21
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host *

bzm3r: You could also verify if your comments show up in noogle.

If you point noogle's "nixpkgs-master" flake input to your fork of nixpkgs and then execute nix build .#ui
You'll end up with the static site in ./result/lib/node_modules/noogle/out which you can serve statically with any http server. (e.g. nodePackages.http-server)

Note: building takes quite a while the first time, because i modfiy c++ nix and the nix-build takes ~15minutes on my notebook)

09:22:32
@danielsidhion:nixos.devdanielsidhion
In reply to @infinisil:matrix.org
No idea about the first, but the second one oh no..
I figured out the first: the highlighting library also provides aliases for languages, and shellsession is an alias for shell: https://github.com/highlightjs/highlight.js/blob/main/src/languages/shell.js#L13-L16
This isn't documented in the docs for that library.
I have no idea why the highlighting wasn't working before, but now it is, so everything's good
20:12:07
14 Jan 2024
@bzzm3r:matrix.org@bzzm3r:matrix.org I believe I came across some research yesterday---I have a vague memory that it might have been work done as part of the nixos-render-docs project---collating a list of function documentation styles currently used by the manuals. 05:54:11
@bzzm3r:matrix.org@bzzm3r:matrix.orgMight someone know what I am referring to, or something similar to this? I am having trouble finding it at the moment.05:54:31
@bzzm3r:matrix.org@bzzm3r:matrix.org * I believe I came across some research yesterday collating a list of function documentation styles currently used by the manuals. I have a vague memory that it might have been work done as part of the nixos-render-docs project. 06:04:21
@bzzm3r:matrix.org@bzzm3r:matrix.org
In reply to @johannes.kirschbauer:scs.ems.host

bzm3r: > Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

I think this might be common missunderstanding:

We specified it for "lambda-formals".

#### Lambda formals

```nix
/**Doc for the whole lambda function*/
{
 /**Doc for formal 'a'*/
 a
}:
 a              
```

https://github.com/NixOS/rfcs/pull/168
06:33:32

Show newer messages


Back to Room ListRoom Version: 6