about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2021-03-15 r/2281 feat(ops/dns): Configure tvl.su zoneVincent Ambo2-0/+30
Change-Id: I6016d92e9c231a257e06644dfcf44a4aaa12ac4d Reviewed-on: https://cl.tvl.fyi/c/depot/+/2601 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi>
2021-03-15 r/2280 feat(ops/dns): Import tvl.fyi DNS zone into depotVincent Ambo4-0/+59
Imports the current state of the tvl.fyi zone and configures simple CI checks on the file format. No deployment automation exists for this (yet?). Change-Id: Ia7d72e02b9f6d3adef994c5dc1898cc0df9dfcfb Reviewed-on: https://cl.tvl.fyi/c/depot/+/2600 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-15 r/2279 merge(glittershark/achilles): Subtree import at 'b93268085a'Vincent Ambo33-0/+4508
Imported from https://github.com/glittershark/achilles/ git-subtree-dir: users/glittershark/achilles git-subtree-mainline: 4d193f239525954631ba9d789ca3aea9a2f4e14d git-subtree-split: b93268085aab14c80a400c299da5d04d2781098e Change-Id: I64a583b454bbe03e20358ad7808939a4cbc212ba
2021-03-14 Implement top-level ascription of declarationsGriffin Smith5-15/+73
2021-03-14 Universally quantified type variablesGriffin Smith17-112/+635
Implement universally quantified type variables, both explicitly given by the user and inferred by the type inference algorithm.
2021-03-14 Make string and bool parsing completeGriffin Smith2-5/+10
2021-03-14 Add string support to the frontendGriffin Smith10-11/+95
2021-03-13 Add the start of a hindley-milner typecheckerGriffin Smith20-78/+980
The beginning of a parse-don't-validate-based hindley-milner typechecker, which returns on success an IR where every AST node trivially knows its own type, and using those types to determine LLVM types in codegen.
2021-03-13 r/2278 feat(users/adisbladis): Add to usersAdam H1-0/+5
Change-Id: I2a3532605c602dd6ba44a6c723333db219a55907 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2599 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-03-13 Allow exprs+bindings to optionally be ascriptedGriffin Smith6-38/+264
2021-03-13 Factor out expr parser into its own moduleGriffin Smith4-495/+510
2021-03-11 r/2277 feat(users/sterni/htmlman): hyperlink .Xr macro in outputsterni1-2/+32
We make use of the -O man=… option of mandoc(1) which allows to convert cross references via the .Xr macro into actual hyperlinks in the output. This can be disabled (by passing "none") or done in two modes: * all: links all .Xr cross references as if they were in $out/%N.%S.html. This will lead to broken links of course. * inManDir: only link to files in $out if the man page is found in manDir, use the template defined in linkXrFallback if not. all is the default, since we don't require all man pages to be in manDir, so it would be potentially confusing if the path attribute was used in the pages list. linkXrFallback uses the debian online man viewer by default currently, since it can be decently hyperlinked and debian has a lot of packages. Other options would be: * https://manpages.ubuntu.com/manpages/latest/en/man%S/%N.%S.html * https://man.archlinux.org/man/%N.%S.en * https://man.openbsd.org/%N.%S * https://www.man7.org/linux/man-pages/man%S/%N.%S.html Change-Id: I1363b9dfdda25cb7383c7310b8115c335444bd3d Reviewed-on: https://cl.tvl.fyi/c/depot/+/2597 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-11 r/2276 feat(users/sterni/htmlman): static site generator for manual pagessterni5-0/+291
htmlman is a very simple nix based static site generator which is intended for rendering HTML representations for man pages plus an index page listing all available pages. For the sake of simplicity (and unlike previous iterations of this piece of code) other documentation artifacts and formats are not supported. Usually web services like GitHub and depot's web interface are pretty good at displaying "normal" documentation artifacts like markdown files, but man pages are usually not rendered — with the additional problem that it's source is virtually unreadable. htmlman should provide a simple static site generator which can be plugged into GitHub actions or the like to automatically generate rendered version of man pages tracked in version control. Change-Id: Ib53292964b3ff84c32d70c5fde257a2edb8c2122 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2596 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-08 Implement functions, both top-level and anonymousGriffin Smith10-125/+501
Implement both top-level and anonymous functions, but not closures in either case.
2021-03-07 Initial commitGriffin Smith24-0/+2316
2021-03-06 r/2275 fix(tazjin/emacs): Always show newest emails firstVincent Ambo1-0/+1
The default for this seems to have changed in a recent notmuch release. Change-Id: I1542b20c2e3edf72a3472c5277bce313c6df12b8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2595 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-03-06 r/2274 feat(tazjin/rlox): Implement global variable accessVincent Ambo4-6/+48
This also includes a fix for an issue where the identifiers of variables were pushed onto the stack, which is incorrect. Change-Id: Id89b388268efad295f29978d767aa4b33c4ded14 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2594 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-03-06 r/2273 feat(tazjin/rlox): Implement global variable definitionVincent Ambo5-15/+80
identifier_str might look a bit overengineered, but we want to reuse this bit of code and it needs a reference to the token from which to pick the identifier. The problem with this is that the token would be owned by self, but the function needs to mutate (the interner), so this implementation is the most straightforward way of acquiring and working with an immutable reference to the token before interning the identifier. Change-Id: I618ce8f789cb59b3a9c5b79a13111ea6d00b2424 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2592 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-03-06 r/2272 refactor(tazjin/rlox): Refactor Compiler::consume into a macroVincent Ambo1-18/+21
Making this function a macro instead makes it possible to match arbitrary token kinds, even the ones that carry data, without changing the syntax too much. Change-Id: I5cda9e36d6833bd9c259f7d4d8340db6e783b4e8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2593 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-03-06 r/2271 fix(tazjin/rlox): Resynchronise after panickingVincent Ambo1-1/+32
Change-Id: I60939f7a2c523b6ca1e9782e58c97959da38cfff Reviewed-on: https://cl.tvl.fyi/c/depot/+/2591 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-03-05 r/2270 feat(users/sterni/nix/utf8): pure nix utf-8 decodersterni3-0/+332
users.sterni.nix.utf8 implements UTF-8 decoding in pure nix. We implement the decoding as a simple state machine which is fed one byte at a time. Decoding whole strings is possible by subsequently calling step. This is done in decode which uses builtins.foldl' to get around recursion restrictions and a neat trick using builtins.deepSeq puck showed me limiting the size of the thunks in a foldl' (which can also cause a stack overflow). This makes decoding arbitrarily large UTF-8 files into codepoints using nix theoretically possible, but it is not really practical: Decoding a 36KB LaTeX file I had lying around takes ~160s on my laptop. Change-Id: Iab8c973dac89074ec280b4880a7408e0b3d19bc7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2590 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-05 r/2269 feat(users/sterni/nix/flow): add switch conditionalsterni1-23/+53
switch would probably otherwise be called match, but has been renamed so it isn't confused with string.match and the enum matching capabilities yants has. It implements the closest to pattern matching nix can come which is still flexible enough to not be painful: Syntactically it works like cond, but is given a value. Instead of booleans it checks passed predicates or equality if simple values are passed. Both types of checks can be mixed. Change-Id: I40f000979cfd469316e15fd58d6c3a80312c1cc4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2589 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-05 r/2268 feat(users/sterni/nix/fun): make lrs read left to right completelysterni1-1/+1
Change-Id: I57d290f770bc1d6bd88a46924889b919d68201e3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2588 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-05 r/2267 refactor(users/sterni/nix/string): don't calculate length for dropsterni1-4/+5
Since nix ends the substring at the end of the string anyways we can just statically use the largest nix integer as the length of the string. According to my testing this it ever so slightly faster as well. Change-Id: I64566e91c7b223f03dcebe3bc5710696dc4261bc Reviewed-on: https://cl.tvl.fyi/c/depot/+/2587 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-05 r/2266 feat(users/sterni/nix): move flow.match to string.matchsterni5-14/+17
After all it only matches strings. Change-Id: I3d2e5221ef43f692de69028e78ed98b6b11f82d1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2586 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-03 r/2265 feat(tazjin/rlox): Implement expression statementsVincent Ambo4-53/+78
These aren't particularly useful without side effects, but one step at a time. This diverges slightly from the book, in that OpPop retains the last value it "forgot" from the stack in a special field on the interpreter. This makes it possible to return values from expression statements, which helps in cases where Lox is embedded as a scripting language (please don't do this ever) or in tests. Change-Id: Ided0bc04c6e80ddb23ba4693d61ac9e08b002d58 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2584 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-03-03 r/2264 feat(tazjin/rlox): Add support for print statementVincent Ambo3-5/+61
Change-Id: Ic3e7e722325c8784b848c0bcd573c2e51e123c40 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2583 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-03-02 r/2263 feat(tazjin/rlox): Intern all string constantsVincent Ambo4-19/+65
This is again a step closer to the book, but there are some notable differences: * Only constants encountered by the compiler are interned, all other string operations (well, concatenation) happen with heap objects. * OpReturn will always ensure that a returned string value is newly heap allocated and does not reference the interner. Change-Id: If4f04309446e01b8ff2db51094e9710d465dbc50 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2582 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-03-02 r/2262 test(tazjin/rlox): Add simple string assertionsVincent Ambo1-0/+10
Change-Id: I6c60934d57170157d877e71cc87a97ab773342b5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2581 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-03-01 r/2261 feat(users/Profpatsch/advent-of-code): 2020 day 04Profpatsch1-0/+104
Change-Id: I422e43f33737ef4d8e250634fa68926ae340206a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2580 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-03-01 r/2260 feat(u/riking/dotfiles): add tmux.confKane York1-0/+6
Change-Id: Iad6809509ccda599f677c0feaffcef70da55d406 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2579 Reviewed-by: kanepyork <rikingcoding@gmail.com> Tested-by: BuildkiteCI
2021-03-01 r/2259 feat(tazjin/rlox): Add a simple string internerVincent Ambo3-0/+112
This is based on this matklad post: https://matklad.github.io/2020/03/22/fast-simple-rust-interner.html It's modified slightly to provide a safer interface and slightly more readable implementation: * interned string IDs are wrapped in a newtype that is not publicly constructible * unsafe block is reduced to only the small scope in which it is needed * lookup lifetime is pinned explicitly to make the intent clearer when reading this code Change-Id: Ia3dae988f33f8e5e7d8dc0c1a9216914a945b036 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2578 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-03-01 r/2258 feat(tazjin/rlox): Add initial support for stringsVincent Ambo3-1/+40
... including concatenation. This diverges significantly from the book, as I'm using std::String instead of implementing the book's whole heap object management system. It's possible that Lox in Rust actually doesn't need a GC and the ownership model works just fine. Change-Id: I374a0461d627cfafc26b2b54bfefac8b7c574d00 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2577 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-03-01 r/2257 feat(users/sterni/nix): add sternis nix libsterni12-0/+811
What you see here is mostly the fallout of me implementing a correct urlencode implementation in nix for Profpatsch's blog implementation (although they'll probably keep it at arm's length). Where I want to go from here: * Extend this library towards general purpose nix™, mainly by implementing missing interfaces which you'd still have to use <nixpkgs/lib> for right now. Reexposing parts of <nixpkgs/lib> with better naming is fine for now, at some point I'd contemplate making this depend on nothing outside of depot, maybe even itself (should be easy we only use yants for an easily replaceable check). * Improve error messages possibly by carefully reintroducing yants. I originally typed essentially everything using yants, but turns out this can a) be dangerous when stuff you are handling throws because type checking means evaluating and b) has a incredible performance cost in some cases. * Reexpose builtins with better naming and slightly wrapped so they don't unrecoverably throw in cases where a null or something would suffice. Change-Id: I33ab08ca4e62dbc16b86c66c653935686e6b0e79 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2541 Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2021-02-28 r/2256 feat(tazjin/rlox): Implement comparison operatorsVincent Ambo4-0/+43
Change-Id: I03b751db52a3bd502fb4fbda6e89cad087ccad74 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2575 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-28 r/2255 feat(tazjin/rlox): Implement equality operatorVincent Ambo4-6/+50
Change-Id: I5587a11646e228c5af4dc7ca6da026bb4a2592a6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2574 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-28 r/2254 refactor(tazjin/rlox): Let binary_op! work on different typesVincent Ambo1-9/+13
This makes it possible to specify the input & output types of the binary_op macro. If only one type is specified, it is assumed that the input and output types are the same. Change-Id: Idfcc9ba462db3976b69379b6693d091e1a525a3b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2573 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-28 r/2253 feat(tazjin/rlox): Implement unary negation operatorVincent Ambo5-0/+32
Change-Id: I9a5bd3581d4ed05371651697ec496341eb7971ae Reviewed-on: https://cl.tvl.fyi/c/depot/+/2572 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-28 r/2252 feat(tazjin/rlox): Support trivial literals in bytecode compilerVincent Ambo5-6/+52
Adds support for true, false & nil. These each come with a new separate opcode and are pushed directly on the stack. Change-Id: I405b5b09496dcf99d514d3411c083e0834377167 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2571 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-28 r/2251 refactor(tazjin/rlox): Represent VM values as enumsVincent Ambo6-25/+59
Introduces a new enum which represents the different types of possible values, and modifies the rest of the existing code to wrap/unwrap these enum variants correctly. Notably in the vm module, a new macro has been introduced that makes it possible to encode a type expectation and return a runtime error in case of a type mismatch. Change-Id: I325b5e31e395c62d8819ab2af6d398e1277333c0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2570 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-28 r/2250 test(tazjin/rlox): Add some tests for numerical operationsVincent Ambo2-0/+51
If I was adding any dependencies, this might be a good one for a property-based test thing, but I'm not going to. Change-Id: Ia801d041479d1a88c59ef9e0fe1460b3640382e3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2569 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-28 r/2249 chore(tazjin/rlox): Add stack printing when 'disassemble' is onVincent Ambo1-0/+3
Change-Id: I71ae83101002f8fead3fa6cbd4cb229a2d6e3902 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2568 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-28 r/2248 fix(tazjin/rlox): Fix selection of next parser precedence ruleVincent Ambo1-1/+1
Without this fix we would keep parsing in the same precedence level and get weird things like: 10 - -10 + 10 => 10 Change-Id: If2bed4569fbf566027011037165a9b3c09b7427c Reviewed-on: https://cl.tvl.fyi/c/depot/+/2567 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-28 r/2247 feat(tazjin/rlox): Wire up bytecode interpreter & print resultsVincent Ambo3-19/+11
This makes the bytecode interpreter actually usable. Change-Id: I24afc7ce461c6673dc42581378f6e14da7aece5c Reviewed-on: https://cl.tvl.fyi/c/depot/+/2566 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-28 r/2246 fix(tazjin/rlox): Fix identifier order in binary_op macroVincent Ambo1-1/+1
Change-Id: I92253e875436bcb42732a157979a9d1e7ca0cd06 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2565 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-27 r/2245 feat(users/Profpatsch): add advent of code 2020 day 1 2 3Profpatsch3-0/+165
Change-Id: I99d2882ac9ef5ede85032132f6727e7bad8f24eb Reviewed-on: https://cl.tvl.fyi/c/depot/+/2564 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-02-27 r/2244 chore(tazjin/rlox): Fill in minor missing implementationsVincent Ambo1-20/+21
This should clean up everything in the way of actually running this end-to-end. Change-Id: Ie89d82472a458256a251a4fddc1c36d88d21f5f2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2563 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-27 r/2243 feat(tazjin/rlox): Print compiled bytecode with disassemble featureVincent Ambo2-0/+11
Change-Id: I42293b334248b5228dd90f13b9a400ccdca20a84 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2562 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-27 r/2242 feat(tazjin/rlox): Implement parser precedence rulesVincent Ambo1-4/+24
Change-Id: Idcf3c84126603086bbf7e8d54773bccb3ae3b5ab Reviewed-on: https://cl.tvl.fyi/c/depot/+/2561 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
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