!VRULIdgoKmKPzJZzjj:nixos.org

Nix Package Manager development

762 Members
For people hacking on Nix: https://github.com/NixOS/nix Nix maintainers can be reached here.162 Servers

Load older messages


SenderMessageTime
8 Nov 2024
@inclyc:matrix.orgYingchi LongThe second is to improve the error handling of the parser to some extend, maybe switch it from a yacc-generated GLR, to hand-written recursive descent, also unifies the parser used for tooling, and the official one.17:57:53
@inclyc:matrix.orgYingchi LongAnd the last one is to improve the evaluation performance by Ahead-Of-Time analysis, namely some tricks used in Chez Scheme, and related work.17:59:13
@inclyc:matrix.orgYingchi Long(Just some thoughts, sorted by implementation state).17:59:57
9 Nov 2024
@joerg:thalheim.ioMic92 Yingchi Long: Could type annotations combined with doc comments? A bit how jsdoc does type checking? 07:51:59
@joerg:thalheim.ioMic92https://github.com/NixOS/rfcs/pull/14507:52:28
@voxel:nyanbinary.rsvoxel 🏳️‍⚧️ joined the room.11:44:40
@fricklerhandwerk:matrix.orgfricklerhandwerk
In reply to @inclyc:matrix.org
Oh, I see, recently I was taking a brainstorm on "what did nixd need in NixOS/nix".

The first thing I want to do is a type-annotation / type checking features for nix-lang, and I'd like to do this in nixd as a PoC, that's a long term plan w/ a large diff.

For reference, in the improbable case you aren't aware: https://github.com/thufschmitt/ptyx

Theophane did his master's thesis on building gradual typing into the Nix language.

14:19:46
@voxel:nyanbinary.rsvoxel 🏳️‍⚧️ left the room.14:20:11
10 Nov 2024
@emilazy:matrix.orgemily Path is deprecated for new code, right? 03:27:46
@emilazy:matrix.orgemily do we have conversions for when new std::filesystem::path-using code has to talk to Path-land, or should I just port any Path stuff I touch? 03:28:12
@lunkentuss:matrix.orgPeter Hansson joined the room.10:04:43
@chrisoboe:one.ems.hostChrisOboe removed their profile picture.11:56:32
@joerg:thalheim.ioMic92
In reply to @emilazy:matrix.org
do we have conversions for when new std::filesystem::path-using code has to talk to Path-land, or should I just port any Path stuff I touch?
I noticed that many std::filesystem::path exception do not provide the most readable error messages and they also do not support these error traces, we are using, so I think we maybe should re-wrap those and throw nix's own exception class in most cases. I think for the most part we want to at least migrate away from path concatenation, this is the most annoying part that breaks things in the windows port.
17:12:11
@joerg:thalheim.ioMic92
In reply to @emilazy:matrix.org
do we have conversions for when new std::filesystem::path-using code has to talk to Path-land, or should I just port any Path stuff I touch?
* I noticed that many std::filesystem::path exception do not provide the most readable error messages and they also do not support these error traces, we are using, so I think we should re-wrap those and throw nix's own exception class in most cases. I think for the most part we want to at least migrate away from path concatenation, this is the most annoying part that breaks things in the windows port.
17:13:19
@emilazy:matrix.orgemily do the error messages differ from strerror? 17:16:17
@emilazy:matrix.orgemily they provide the OS error code, so you can always just strerror yourself 17:16:32
@joerg:thalheim.ioMic92 emily: you can just throw a syserror and the error message is taken care off: https://github.com/NixOS/nix/blob/aa9c0bc1ee03f0fedebc4a6367fcf5bbecb4ef5c/src/libfetchers/git-utils.cc#L227 17:18:28
@emilazy:matrix.orgemilyright17:19:34
@emilazy:matrix.orgemilyalthough, where is that getting the code from?17:19:48
@joerg:thalheim.ioMic92errno17:20:04
@emilazy:matrix.orgemily is it guaranteed that errno corresponds to e.code() there? 17:20:08
@joerg:thalheim.ioMic92Unless something has overridden the errno in the meantime, yes17:20:30
@emilazy:matrix.orgemilyhmm, does the spec actually guarantee that or is it just a common side effect of implementations being written in terms of the C API? I didn't see it mentioned on cppreference anywhere, at least17:21:37
@joerg:thalheim.ioMic92Ah. no. Actually I don't know what e.code() is.17:22:30
@joerg:thalheim.ioMic92Ok. It seems there is a table? https://en.cppreference.com/w/cpp/error/errc17:23:07
@joerg:thalheim.ioMic92But I know that those filesystem exception have errno updated corectly17:23:42
@emilazy:matrix.orgemily I think std::error_code's .value() just gives you an errno 17:24:15
@emilazy:matrix.orgemily so I believe that strerror(e.code().value()) or similar is the correct thing to do 17:24:33
@emilazy:matrix.orgemily if e.what() is not useful 17:24:36
@emilazy:matrix.orgemilynot 100% sure though17:25:10

Show newer messages


Back to Room ListRoom Version: 6