about summary refs log tree commit diff
path: root/third_party/nixery (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-01-16 r/2115 chore(tazjin/homepage): Remove mentions of TwitterVincent Ambo2-8/+3
I've stopped using it. This makes the header look a bit empty, but I'll write new copy at some point. Change-Id: I39bf36ba915c44e3d57905d0036de693b6431071 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2406 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-01-16 r/2114 feat(tazjin/rlox): Use variable depth for env lookupVincent Ambo2-12/+31
Finishes the binding implementation from https://craftinginterpreters.com/resolving-and-binding.html Change-Id: I1e2c1f4139d9e77ce0b99e38db26edd4cdb56ad2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2404 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-16 r/2113 feat(tazjin/rlox): Implement variable depth resolverVincent Ambo5-16/+217
Implements the first part of the resolver from https://craftinginterpreters.com/resolving-and-binding.html This is wired up to the execution paths in main, but not yet in the tests. The resolved depth is also not actually used for variable lookups (yet). Change-Id: I3a8615252b7b9b12d5a290c5ddf85988f61b9184 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2403 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-15 r/2112 chore(users/multi): Remove old SSH keys attribute.multi1-1/+0
Change-Id: I5d26aab3865593b74a13794947ad61396135a207 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2400 Tested-by: BuildkiteCI Reviewed-by: multi <depot@in-addr.xyz>
2021-01-15 r/2111 feat(ops/nixos/whitby): Enable remote use of whitby for my Thinkpad.multi1-2/+3
My main workstation is a Thinkpad without a great deal of compute power available, so enabling the use of whitby as both a substituter (services.sshServe) and a remote builder (openssh.authorizedKeys) will save me some time when working on nix things and depot things. Change-Id: I17bfcbb9860f42fb667603ad819e38e82e6052da Reviewed-on: https://cl.tvl.fyi/c/depot/+/2399 Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: lukegb <lukegb@tvl.fyi> Tested-by: BuildkiteCI
2021-01-15 r/2110 chore(users/multi): Refactor SSH keys and add remote builds key.multi1-2/+7
This commit rearranges my SSH keys, and adds a public key for accessing whitby as a remote builder from my laptop. Change-Id: Ide1a9e296d307d141c1a732d01923e46772180a9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2398 Tested-by: BuildkiteCI Reviewed-by: multi <depot@in-addr.xyz>
2021-01-14 r/2109 feat(tazjin/rlox): Implement support for closuresVincent Ambo2-24/+57
Change-Id: I0ffc810807a1a6ec90455a4f2d2bd977833005bd Reviewed-on: https://cl.tvl.fyi/c/depot/+/2396 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2108 feat(tazjin/rlox): Implement early return from functionsVincent Ambo3-1/+47
In the book this is implemented via exceptions as control flow, and I'm sticking somewhat closely to that by doing it via an error variant. Change-Id: I9c7b84d6bb28265ab94021ea681df84f16a53da2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2395 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2107 refactor(tazjin/rlox): Let scanner tokens own their lexemeVincent Ambo5-158/+150
This removes the runtime dependency on a borrow into the program source code. It's not yet ideal because there are a lot of tokens where we really don't care about the lexeme, but this is what the book does and I am not going to change that. Change-Id: I888e18f98597766d6f725cbf9241e8eb2bd839e2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2394 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2106 feat(tazjin/rlox): Implement function definitionsVincent Ambo3-5/+28
... with this, functions now work. Note that this bubbled up another weird code structure nit: The parser::Function type should probably not carry its name directly. However this doesn't matter much and I don't care right now. Change-Id: If8e3b23f07033260433b9acd45f37c0e61fd2ff8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2393 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2105 feat(tazjin/rlox): Implement calling user-defined functionsVincent Ambo1-7/+20
This slightly jiggles around interpret_block to let callers pass in an environment. Change-Id: I03112a38be0e8696242d8eae8d41da8c2cc66b48 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2392 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2104 refactor(tazjin/rlox): Thread lifetimes through interpreterVincent Ambo3-48/+59
In order to store a function in the interpreter's representation of a callable, the lifetimes used throughout rlox need to be threaded through properly. This is currently not optimal, for two reasons: * following the design of the book's scanner, the source code slice needs to still be available at runtime. Rust makes this explicit, but it seems unnecessary. * the interpreter's lifetime is now bounded to be smaller than the source's, which means that the REPL no longer persists state between evaluations Both of these can be fixed eventually by diverging the scanner from the book slightly, but right now that's not my priority. Change-Id: Id0bf694541ff59795cfdea3c64a965384a49bfe2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2391 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2103 feat(tazjin/rlox): Parse function declarationsVincent Ambo2-4/+67
Change-Id: I1db4316563827976e5233dc7a626968f80b992ef Reviewed-on: https://cl.tvl.fyi/c/depot/+/2390 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2102 refactor(tazjin/rlox): Add helper method for parsing identifiersVincent Ambo2-16/+19
Change-Id: I9a45f823f16919319d6135225d5bd53ed54c2530 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2388 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2101 refactor(tazjin/rlox): Let Parser::match_token take a single kindVincent Ambo1-24/+22
This is much easier to read & write. It's been annoying me all the way through. Change-Id: Ia91756d3111a2ce3f74e1c14bccc210118d221dd Reviewed-on: https://cl.tvl.fyi/c/depot/+/2387 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2100 test(tazjin/rlox): Add a handful of interpreter testsVincent Ambo2-0/+66
Change-Id: I32dd896d42cc73d68d73093e9cbb74b48d95e041 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2386 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2099 feat(tazjin/rlox): Implement PartialEq for interpreter::ValueVincent Ambo1-0/+10
Values have equality, unless they're functions. Change-Id: Ie5c623081a1fa556e6b7a5251b0ce85af68dd31a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2385 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2098 feat(tazjin/rlox): Always return values from interpreterVincent Ambo1-20/+23
This makes it easier to write interpreter tests, as we don't need to look at output and such. Change-Id: I6f8ce0cb0c482b8c00707d09e6be750c8e534176 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2384 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2097 refactor(tazjin/rlox): Constructor for interpreter with globalsVincent Ambo2-3/+21
Change-Id: Id8242c22500c8e2781cc656d3faabb28d9bdf091 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2383 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2096 feat(tazjin/rlox): Implement function call evaluationVincent Ambo2-2/+34
Change-Id: I6767c3a1a9654475b4066415f8c026b9c5b5907a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2382 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2095 feat(tazjin/rlox): Scaffolding for builtin functionsVincent Ambo2-0/+49
... and adds an example builtin which returns the current epoch. The types introduced by this, especially in the interpreter module, are going to be used for user-defined functions, too. Change-Id: I0364a67241e94642cde08489ac711a340e30ebe8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2381 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-13 r/2094 feat(ops/nixos/whitby): add sterni usersterni2-0/+13
Change-Id: Ia6790913ea2777a9d4ca89830436623766991c13 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2368 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-01-13 r/2093 refactor(tazjin/rlox): Wrap interpreter values in new enumVincent Ambo1-25/+52
This makes it possible to distinguish between literal and other values, such as