!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

233 Members
https://github.com/nixpkgs-architecture, weekly public meetings on Wednesday 15:00-16:00 UTC at https://meet.jit.si/nixpkgs-architecture52 Servers

Load older messages


SenderMessageTime
2 Aug 2022
@infinisil:matrix.orginfinisilI don't think that relates to macros14:02:09
@profpatsch:augsburg.oneprofpatschMy ideal stdenv would be written in R[6]RS scheme, with a potential layer of nix-that-gets-converted-to-sexps on top for end-users14:02:36
@infinisil:matrix.orginfinisil Alyssa Ross: If we wanted to have something like guix, only needing a single language for eval and build, then we need homoiconicity, or something like it, I'm pretty sure 14:02:52
@profpatsch:augsburg.oneprofpatsch(which gives you macros (i.e. codegen) by defition, just in a different way)14:02:55
@infinisil:matrix.orginfinisilI don't think we do want that14:02:56
@infinisil:matrix.orginfinisilBut it's the conclusion I'm trying to convey14:03:04
@qyliss:fairydust.spaceAlyssa RossNo we wouldn't14:03:42
@profpatsch:augsburg.oneprofpatsch The argumentation is a bit similar to the “I want dependent types because I can use my if on the typelevel” approach 14:03:46
@qyliss:fairydust.spaceAlyssa RossYou could build up a shell script from Nix functions if you wanted14:03:56
@profpatsch:augsburg.oneprofpatsch(for Guix)14:03:59
@profpatsch:augsburg.oneprofpatschqyliss: yeah, the big difference is that shell scripts don’t compose14:04:16
@qyliss:fairydust.spaceAlyssa RossBut execline does ;)14:04:33
@profpatsch:augsburg.oneprofpatschI guess scheme doesn’t have to compose either, but it’s easier to get right because you have proper scoping etc14:04:35
@profpatsch:augsburg.oneprofpatschqyliss: agreed14:04:43
@profpatsch:augsburg.oneprofpatschqyliss: In my experience execline is only good for simple tasks though, I wouldn’t want to convert the stdenv to plain execline, even generated execline.14:05:18
@qyliss:fairydust.spaceAlyssa RossMy point is that you can use Nix as a DSL to generate whatever you want, no homoiconicity required.14:05:19
@infinisil:matrix.orginfinisilI'd argue that then it's not using the same language anymore14:05:21
@infinisil:matrix.orginfinisilYeah it's a Nix DSL at that point, not Nix14:05:29
@qyliss:fairydust.spaceAlyssa RossThen you're missing the point by interpreting things too narrowly.14:05:44
@profpatsch:augsburg.oneprofpatschinfinisil: guix in the builder is different from guix at eval time14:05:57
@profpatsch:augsburg.oneprofpatschThe semantics are the important part, not the syntax14:06:03
@infinisil:matrix.orginfinisilIt is different?14:06:20
@profpatsch:augsburg.oneprofpatschThe cool thing is that you can re-use the semantics of stuff like “case” or “if”, but e.g. (read-file) has a totally different semantics if you use it at eval time14:06:40
@profpatsch:augsburg.oneprofpatschi.e. one would presumably read a file and copy it to the store returning a store path, the other would just read a file into the interpreter at build time14:07:49
@profpatsch:augsburg.oneprofpatsch(just a dumb example)14:08:01
@infinisil:matrix.orginfinisilAlright, so how about this: If we want to use the same syntax for eval and build time, we need homoiconicity. But for the same semantics (with a different syntax) we don't need homoiconicity14:08:21
@infinisil:matrix.orginfinisil Does that sound right Alyssa Ross ? 14:08:29
@profpatsch:augsburg.oneprofpatsch but if <bool> then <exp> else <exp> would behave the same in both settings 14:08:35
@profpatsch:augsburg.oneprofpatschinfinisil: yep, exactly14:08:56
@qyliss:fairydust.spaceAlyssa RossNo?14:08:58

Show newer messages


Back to Room ListRoom Version: 9