about summary refs log tree commit diff
path: root/users/tazjin/rlox/src/bytecode (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-02-27 r/2241 feat(tazjin/rlox): Add initial Pratt parser table lookupVincent Ambo1-9/+67
Change-Id: I1b894d2f84d23ddddcd1bb8794f771512b7d677e Reviewed-on: https://cl.tvl.fyi/c/depot/+/2560 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-27 r/2240 feat(tazjin/rlox): Partial implementation of binary operatorsVincent Ambo1-1/+49
Change-Id: I6f0bc9f58b51dec2673c918e08b199b52e793ed4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2559 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-27 r/2239 feat(tazjin/rlox): Set up precedence parsing scaffoldingVincent Ambo1-12/+67
Defines a new precedence levels enum which can be used to restrict the parser precedence in any given location. As an example, unary expressions and grouping are implemented, as these have a different precedence from e.g. expression() Change-Id: I91f299fc77530f76c3aba717f638985428104ee5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2558 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-27 r/2238 chore(tazjin/rlox): Set up some scaffolding for panic modeVincent Ambo2-6/+26
This lets us suppress reporting of additional errors from the compiler until a synchronisation point is reached. Change-Id: Iacf90949f868fbdb4349750065b5e458cf74d32a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2557 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-27 r/2237 feat(tazjin/rlox): Bootstrap rough shape of bytecode compilerVincent Ambo3-1/+87
This one necessarily has to diverge more from the book than the treewalk interpreter did, so some of this is expected to change, but I'm happy with the rough shape. Since we're reusing the old scanner, the compiler/parser struct owns an iterator over all tokens with which the pull-scanner from the bytecode chapters is simulated. Change-Id: Icfa0bd4729d9df786e08f7e49a25cba1b9989a91 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2556 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-02-27 r/2236 chore(tazjin/rlox): Add From<Error> for Vec<Error>Vincent Ambo1-0/+8
This makes it easier to transition between the single/multi error functions via ? Change-Id: Ie027f4700da463a549be6f0d4a0022a9b8dc0d61 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2555 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-02-27 r/2235 style(tazjin/rlox): Set max_width=80Vincent Ambo7-50/+153
Change-Id: Ib64831c0b97c94fdfbdbae64f4dfccc86879ef73 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2554 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-02-27 r/2234 chore(tazjin/rlox): Implement From<ScannerError> for bytecode errorsVincent Ambo2-3/+22
Change-Id: I446c6e38cf239a132882d37df156884d319ca111 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2553 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-02-24 r/2233 fix(buildGo): Fix stdlib list under Go 1.16.Luke Granger-Brown1-1/+1
Go 1.16 makes "go list all" not work. "go list std" is what we should be using instead anyway. Change-Id: I3f867fde477030d2358085b3d64b5856fb9c421b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2551 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-02-24 r/2232 feat(gs/system): Add config for laptop batteryGriffin Smith4-4/+17
hibernate on low battery, and when the power button is pressed Change-Id: I6560fc770ee5707e59fb2763614de2b8000e156e Reviewed-on: https://cl.tvl.fyi/c/depot/+/2550 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-02-24 r/2231 feat(gs/home): Alias cch=cargo checkGriffin Smith1-0/+1
Change-Id: I4b0ef2f5996b6cf34724a0ed6b1c8081baa4d929 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2549 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-02-24 r/2230 feat(gs/home): Install juliaGriffin Smith1-0/+1
Change-Id: I66820d3209f0ef6120f2946acc2063cfd638512f Reviewed-on: https://cl.tvl.fyi/c/depot/+/2548 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-02-24 r/2229 feat(gs/system): Install mypaint and xdotGriffin Smith1-0/+2
Change-Id: I4153911c4ef701c10106fddd5f3bef2263aac5c3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2547 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-02-24 r/2228 fix(gs/emacs): drop spellcheckerGriffin Smith1-1/+1
Change-Id: I841b7407f80d5096a32ee9019c1e02d26c015fc0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2546 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-02-24 r/2227 feat(gs/emacs): Add some more w3m bindingsGriffin Smith1-4/+5
Change-Id: I764b810245b2ec0bb1b76f6641b9baf2fab08be6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2545 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-02-24 r/2226 chore(ops/journaldriver): Expand wildcard importsVincent Ambo2-3/+5
... to appease Profpatsch. Change-Id: Id8576645a6920312c2304ea7880524d9cda8e21b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2544 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-02-22 r/2225 feat(tazjin/emacs): Add #'rg-in-projectVincent Ambo3-2/+12
Uses project.el to anchor the ripgrep search. In combination with my project detection logic, this means that grepping in TVL subprojects works automatically. Change-Id: I2705466d1de156c08ff0401a71112864aa24f976 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2542 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-19 r/2224 feat(nix/readTree): give better error message when not a functionProfpatsch4-1/+27
When a file is added to the depot tree that is picked up by read-tree, but it’s not a function like ({...}: {}), `readTree` will fail on the function application, leading to a bad error message. We can do slightly better, by checking the type and throwing a nicer trace message. `assertMsg` is copied from `nixpkgs/lib/assert.nix`, since at this point we don’t have a reference to the lib. There is another evaluation failure that can happen, which is when the function we try to call does not have dots; however, nix does not provide any inflection capabilies for checking whether a function attrset is open (`builtins.functionArgs` only tells us the attrs it mentions explicitly). Maybe the locality of the error could be improved somehow. Change-Id: Ibe38ce78bb56902075f7c31f2eeeb93485b34be3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2469 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-02-19 r/2223 chore(3p): Remove git-bugVincent Ambo3-41/+0
We stopped using this in favour of //web/panettone quite a while ago, so lets clean it up. Change-Id: I8aa8d86288933d470ab3962ffbb60294eaddd27b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2540 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi>
2021-02-19 r/2222 fix(nix/yants): make (typedef …).checkType return a result setsterni1-3/+7
Previously, for types defined using typedef (like all primitive types) type.checkType would return a boolean. This is largely fine since in most places `type.checkToBool (type.checkType x)` or similar is used. However, some functions actually take type.checkType up on the promise that it returns a set of the form: { ok = <bool>; err = <option string>; } This is the case for restrict which has checkToBool = v: v.ok; and will generate a proper set except if `t.checkToBool (t.checkType v) == false` in which case it will return t.checkType v. If t was a primitive type or defined using typedef, previously `t.checkType v` would be a boolean which meant as soon as (restrict …).checkToBool was called on a restrict checkType result in cases where the wrapped type didn't match, an unrelated error would be thrown: nix-repl> with nix.yants; restrict "foo" (_: true) int "lol" error: value is a boolean while a set was expected, at /home/lukas/src/depot/nix/yants/default.nix:38:39 This is fixed by making typedef return a proper set from checkType and adjusting its checkToBool accordingly. Unfortunately I don't think we can easily add test cases for this except by using recursive nix or VM tests as there is no way to introspect error messages. Change-Id: I96a7be065630f04ca33358f21809284911ec14fe Reviewed-on: https://cl.tvl.fyi/c/depot/+/2536 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-02-19 r/2221 chore(3p): Bump NixOS channels to 2021-02-18sterni7-20/+11
Main motivation for this is to get the openldap update that fixes 10 CVEs: CVE-2020-36221 to including CVE-2020-36230. See also this issue which lists them all: https://github.com/NixOS/nixpkgs/issues/113490 Someone should also redeploy whitby as soon as this lands in canon and all build failures have been fixed. Things done to resolve upstream breakages: * grpc no longer takes abseil-cpp as an input, it has also been removed in the override. * Upgrade glittershark's kernel to 5.11 since the linuxPackages_5_9 attribute has been removed by upstream and the patch used by them is available for 5.11 as well. * The fixed output hash for third_patry.apereo-cas changed for some reason. * Remove the pin of haskellPackages.vector from the haskell overlay. It broke as the most recent version of vector in nixos-unstable no longer depends on semigroups. This effectively updates vector from 0.12.1.2 to 0.12.2.0. * Align two comments in tvix/libstore/worker-protocol.hh because the updated clang-format now demands that. Change-Id: I2ecf10a98de935e9222acf1feaea447d4c11ed2d Reviewed-on: https://cl.tvl.fyi/c/depot/+/2538 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: glittershark <grfn@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org>
2021-02-19 r/2220 feat(tazjin/emacs): Add layout for reMarkable as primary screenVincent Ambo1-1/+7
Change-Id: I4c10e36250aa112d2dd0cebf4ed41e0b6fd8182d Reviewed-on: https://cl.tvl.fyi/c/depot/+/2539 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-18 r/2219 chore(users/Profpatsch/netencode): update serdesterni1-4/+4
Was messing around with serde and trying to build serde_json something, might as well commit this. Change-Id: I60f87aa3180f750fa171eca7f9c375ed053f8456 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2537 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-02-18 r/2218 fix(nix/readTree): make nixFileName only match .nix extensionssterni1-1/+1
Nix unfortunately has terrible escaping syntax: If something is an escape sequence it does not know, like \0, it just swallows the backslash and returns the second character (byte) as is (yes, "\0" == "0" is true). This created the following bug in nixFileName which should have resulted in at least a parse error: "(.*)\.nix" is the same as "(.*).nix" which meant that nixFileName matched anything that is at least 4 characters long and ends in "nix". This lead to readTree creating double attributes when directories are involved or attributes for non-nix files. Change-Id: Ibf3be2bd189d48881c82ee795c50151bfb365627 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2535 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-14 r/2217 test(users/Profpatsch/writers): use testRustSimple on transitive libsterni2-3/+14
This adds a trivial test case on