code, screenreader-unfriendly 

nix-repl> (rec { c.c = 1; __overrides = { c.d = 4; };}).c
{ d = 4; }

nix-repl> ({ c.c = 1; __overrides = { c.d = 4; };}).c
{ c = 1; }

Nix is a very well-defined language

re: code, screenreader-unfriendly 

Did I mention that I'm trying to write a bug-for-bug-compatible implementation

re: code, screenreader-unfriendly 

@joepie91 RIR? or what are you aiming for?

re: code, screenreader-unfriendly 

@eater Not Rust, weird performance experiment with V8

re: code, screenreader-unfriendly 

@joepie91 oh god oh no, are you re implementing in JS?

re: code, screenreader-unfriendly 

@eater That is really not the sort of comment I am looking for when working on a project

re: code, screenreader-unfriendly 

@joepie91 ah sorry! I guess I should have used some tone indicators there, it's not meant as "don't do this", it just sounds delightfully cursed to me, and I highly encourage you, I am honestly very curious to what results you might end up with, V8's performance can be really good after all!

so yea, not meant as discouragement! sorry if it came over that way!

re: code, screenreader-unfriendly 

@eater Ahh right, yeah, it definitely is cursed, but in the "this just might work but most people wouldn't bother to try" way

· · Web · 1 · 0 · 1

re: code, screenreader-unfriendly 

@eater (Specifically I'm compiling Nix to JS and then evaluating that JS within V8, to see if its optimizer can make sense of it, since the semantics of the two are surprisingly close)

re: code, screenreader-unfriendly 

@joepie91 oooh neat!! I wonder if you could make a little nix playground like this in-browser also,

re: code, screenreader-unfriendly 

@eater That'd be one of the things I'm going for as well, yeah

re: code, screenreader-unfriendly 

@joepie91 what are you using for parsing? just doing it by hand or using something alike antlr?

re: code, screenreader-unfriendly 

@eater treesitter-nix, taped to some custom AST wrangling code

re: code, screenreader-unfriendly 

@eater In case you're interested in following along: git.cryto.net/joepie91/nix-in-

re: code, screenreader-unfriendly 

@joepie91 oooh awesome, I'll keep an eye out

Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.