... 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
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
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
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
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
... 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
This makes it possible to distinguish between literal and other
values, such as functions.
Change-Id: I4d87b96c2988e25a61eecfeeb56188fabfd0dc40
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2367
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
This has auth tokens etc.
Change-Id: I0877744de38d31f2dfe402ab009f31a22467c3b4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2365
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
There appears to be an issue where the internal trackpad tries to
register itself as a ps1 mouse rather than a usb one, which causes some
dmesg warnings that may or may not cause actual problems. Regardless,
blacklisting this should be harmless.
Change-Id: I00fb539b8acf4fbf1b9125786ea6dc4f649b08c7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2364
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Necessary for tarsnap (for now), though I'm probably gonna get rid of
that sooner rather than later.
Change-Id: I4614a8e4ea62edd247a0fead6ae38d1f870b36f4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2357
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
- add <> as evil-surround pairs (this isn't working atm)
- Make lsp-ui-doc frames a reasonable size
- Use clippy as the cargo watch command for rust-analyzer
Change-Id: Ieee2633cbb332af6513af6b7484adeef5bdb3e06
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2356
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
None of the flycheck checkers work, really, and even if they did I
ignore them most of the time.
Change-Id: Iebb0b5202207f1fbada197bb5667fa8431ab879c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2355
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
This is too deep in my muscle memory, and actually fairly ergonomic on
my keyboard
Change-Id: I2e57c3221a52f00f62e5a7427bdfae6fe37ff850
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2354
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Your regularly scheduled channel update, but slightly more regular
than before.
Included fixes:
* 3p/emacs: Pick telega.el from stable channel, unstable is broken.
* glittershark/fprintd: Compile with gcc9, since build fails with the
new default of gcc10
* glittershark/fprintd: Use a global overlay for the fprintd package
until https://github.com/NixOS/nixpkgs/pull/108962 lands in
nixos-unstable
* glittershark/home: Don't install rr, as it's not building with gcc10
Co-Author: Griffin Smith <grfn@gws.fyi>
Change-Id: Ia715fef64a405a220049fc540017356fa7370e0b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2341
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Tested-by: BuildkiteCI
Running this after a codified refactor acts as a good smoke test,
if a big subset of packages is broken or any central packages are
broken, this should find them quite quickly, thanks to randomness™.
Just let it run for a few minutes and check the errors that pop up.
Change-Id: I1505dd31ca25b29254474a15cd6cb71d9743038a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2346
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: lukegb <lukegb@tvl.fyi>
This is in order to advance the rewriting from stdenv.lib to lib.
https://github.com/NixOS/nixpkgs/issues/108938
The hard part about changing the argument is that a package might not
include lib in its arguments, which is why I use hnix to check whether
lib is included and add it to the import list if it doesn’t already
exist there.
So far, only the really common pattern of
meta = with stdenv.lib;
is rewritten.
Change-Id: I370f0a321b0e5a5bd21ec21fc7cefdd65ec845ed
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2345
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
I haven't used this much in the last months and it's causing issues
via some hook now, so bye bye.
Change-Id: If2b321887569b31c0ac7ad3fdd1b9c1d9f7b69f7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2344
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
... this isn't finished yet, in particular it lacks:
* better support for attribute sets
* support for defining functions that take attribute sets
Change-Id: Ia897fccd9d2b674b6ed12907ae297bfdcc86db48
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2237
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: tazjin <mail@tazj.in>
Changes:
* ops/nixos/tvl-slapd: The NixOS module for OpenLDAP has removed the
ability to configure OpenLDAP directly and now forces users to use
some kind of weird Nix->OLC mapping that is mostly undocumented.
This moves the config we need to the new format in a way that may or
may not work and does the other arbitrary dance steps that someone
decided to impose on us. Note that this now throws lots of warnings,
but I can't be bothered to fix them.
* 3p: Random package removals accomodated
* users/glittershark: Pin grfn's kernel to 5.9, because the CK patch
is not yet updated for 5.10
* users/glittershark: Update vendor hash for pg-dump-upsert, I suspect
this changed because of something in the Go build machinery in
nixpkgs. The deleteVendor flag also has no effect anymore and has been
removed.
* users/glittershark: agda build is broken, commenting out development
home-manager environment until it can be fixed
* third_party/haskell_overlay: updating random needs upper boundarles
of a few dependencies relaxed (curse them)
* third_party/gerrit_plugins: for some cursed reason the fixed-output
hash of the gerrit owners plugin fetchgit changed, updated.
Same for the checks plugin.
Change-Id: Ica37995fe8039d3ba80eab643867f98795c56734
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2295
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: tazjin <mail@tazj.in>
A little executable, combining the netencode and mustache libraries to
make easy templating from the command line possible.
Combined with the nix netencode generators, it’s now trivial to
populate a mustache template with (nearly) arbitrary data.
Yay.
Change-Id: I5b892c38fbc33dd826a26174dd9567f0b72e6322
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2320
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
The netencode standard, a no-nonsense extension of netstrings for
structured data.
Includes a nix generator module and a rust parsing library.
Imported from
e409df3861/pkgs/profpatsch/netencode
Original license GPLv3, but I’m the sole author, so I transfer it to
whatever license depot uses.
Change-Id: I4f6fa97120a0fd861eeef35085a3dd642ab7c407
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2319
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
A bunch of writer functions wrapping the `buildRustCrate`
functionality of nixpkgs. Can be used to write inline rust code, or
rust code read from files with `builtins.readFile`.
Change-Id: I9d74e9381b858b485925e4dc3fbb7fc392877c0a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2318
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Simple helper function to generate a netstring that is a list of
key-value pairs, to serialize a nix dict. Also adds a python lib to
read the serialized form into a dict again.
Change-Id: I306c0cfd51640c0658d32c8d3a4f3d332ba448f0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2315
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Uses the new restrict type to make sure flake errors start with an E.
Change-Id: I30369ade28e1ef612c91a368de2d5b128e6cf2a9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2313
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
This is a reexport of nixpkgs.writers.writePython3, but the libraries
are passed the package set, like with other writers.
Change-Id: Ia5a2ed1b6b329700836a8575d2bde768bf64fb31
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2311
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Smol writer to create a python lib directly from a nix string.
The resulting library can be consumed by the writePython3 writer.
Change-Id: Id3d793564d230b38a08f65140bda4287285e1a72
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2310
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>