Commit graph

407 commits

Author SHA1 Message Date
Vincent Ambo
995d024f03 feat(tazjin/rlox): Wire up bytecode interpreter & print results
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 11:14:03 +00:00
Vincent Ambo
0c9a7de5be fix(tazjin/rlox): Fix identifier order in binary_op macro
Change-Id: I92253e875436bcb42732a157979a9d1e7ca0cd06
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2565
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-02-28 11:14:03 +00:00
Vincent Ambo
f3d00b84bb chore(tazjin/rlox): Fill in minor missing implementations
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 20:19:14 +00:00
Vincent Ambo
758730d25d feat(tazjin/rlox): Print compiled bytecode with disassemble feature
Change-Id: I42293b334248b5228dd90f13b9a400ccdca20a84
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2562
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-02-27 20:19:14 +00:00
Vincent Ambo
56f6a6e9f2 feat(tazjin/rlox): Implement parser precedence rules
Change-Id: Idcf3c84126603086bbf7e8d54773bccb3ae3b5ab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2561
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-02-27 20:19:14 +00:00
Vincent Ambo
7778a58f8d feat(tazjin/rlox): Add initial Pratt parser table lookup
Change-Id: I1b894d2f84d23ddddcd1bb8794f771512b7d677e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2560
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-02-27 20:19:14 +00:00
Vincent Ambo
d2f24c925d feat(tazjin/rlox): Partial implementation of binary operators
Change-Id: I6f0bc9f58b51dec2673c918e08b199b52e793ed4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2559
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-02-27 19:22:58 +00:00
Vincent Ambo
1d3d9d32e3 feat(tazjin/rlox): Set up precedence parsing scaffolding
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 19:22:58 +00:00
Vincent Ambo
b13a6736dd chore(tazjin/rlox): Set up some scaffolding for panic mode
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 19:22:58 +00:00
Vincent Ambo
ee974b3edd feat(tazjin/rlox): Bootstrap rough shape of bytecode compiler
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 13:05:18 +00:00
Vincent Ambo
da2dfb42c6 chore(tazjin/rlox): Add From<Error> for Vec<Error>
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 13:05:18 +00:00
Vincent Ambo
75750ba683 style(tazjin/rlox): Set max_width=80
Change-Id: Ib64831c0b97c94fdfbdbae64f4dfccc86879ef73
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2554
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-02-27 13:05:18 +00:00
Vincent Ambo
ebc987f4aa chore(tazjin/rlox): Implement From<ScannerError> for bytecode errors
Change-Id: I446c6e38cf239a132882d37df156884d319ca111
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2553
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-02-27 13:05:18 +00:00
Vincent Ambo
bef01b1419 feat(tazjin/emacs): Add #'rg-in-project
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-22 13:50:34 +00:00
Vincent Ambo
e174bad35b feat(tazjin/emacs): Add layout for reMarkable as primary screen
Change-Id: I4c10e36250aa112d2dd0cebf4ed41e0b6fd8182d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2539
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-02-19 13:37:37 +00:00
Vincent Ambo
83465be599 feat(3p/telega): Pin tdlib version used for telega
Recent channel updates have caused some issues for telega.el, mostly
because the version of tdlib (the C++ library for Telegram) and the
Emacs package are out of sync.

This overrides the version used in the Emacs package to a "known good"
commit. It would be useful to change the tdlib derivation in nixpkgs
to make this version mismatch a hard build error.

Change-Id: I9c994f783e1cc17e933432507cd13b65697efd4a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2445
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-26 13:25:43 +00:00
Vincent Ambo
aa6e7f7c10 chore(tazjin/emacs): Disable my default dark theme temporarily
There's a giant laser in the sky which makes it hard to read anything
on a dark theme.

Change-Id: I1dd0631dc8f8f693cceada4e62b25d4bde322e09
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2442
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-26 10:29:16 +00:00
Vincent Ambo
cf4357d9b7 chore(tazjin/emacs): Remove some unused packages
Change-Id: I4adf7c1e028c997f776c635e1c6210f904274582
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2441
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-25 19:18:09 +00:00
Vincent Ambo
ea9982d9ea feat(tazjin/nittredir): Add Chrome extension to redirect to Nitter
There is another extension for this already, but it hooks in after the
page has already started loading - doing it on the URL change handler
is much faster.

Change-Id: I442552cbd8bb040df999a1624cafd436f4a7b875
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2430
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-20 15:36:05 +00:00
Vincent Ambo
de64ebbbaa feat(tazjin/emacs): Reset keyboard layout before locking screen
I managed to lock myself out by having the layout set to Russian while
locking the screen. This prevents that from happening.

Change-Id: I15780d2a626d96abe0af8db3736fad75034e66d8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2424
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-19 15:04:16 +00:00
Vincent Ambo
5868d4bd49 refactor(tazjin/rlox): Prepare scanner for shared use
In the book, the clox interpreter has its own scanner which uses a
pull-based model for a single pass compiler.

I can't be bothered to write another scanner, or amend this one into
pull-mode to work with the treewalk interpreter, so instead I will
just reuse it and pull from a vector of tokens.

The tokens are shared between both interpreters and the scanner is not
what I'm interested in here.

Change-Id: Ib07e89127fce2b047f9b3e1ff7e9908d798b3b2b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2420
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-19 09:57:05 +00:00
Vincent Ambo
1ff7a2686c refactor(tazjin/rlox): Add Interpreter trait for switching impls
Change-Id: Iae28d64ce879014c5e5d7e145c536c1f16ad307d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2418
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-18 00:24:16 +00:00
Vincent Ambo
d6d3c12efb feat(tazjin/rlox): Implement simple arithmetic operators
Change-Id: I9873bcd281053f4e9820a5119f5992a0b8cb8cfc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2417
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-01-17 21:17:54 +00:00
Vincent Ambo
7fb93fb490 feat(tazjin/rlox): Bootstrap VM for Lox bytecode
Change-Id: I479e20bf2087e5c4aa20e31b364c57ed0d961bcf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2416
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-01-17 21:17:54 +00:00
Vincent Ambo
b1d0e22b1f chore(tazjin/rlox): Move other modules under treewalk::
It's unclear if the second part of the book can reuse anything from
the first part (I'm guessing probably the scanner, but I'll move that
back if it turns out to be the case).

Change-Id: I9411355929e31ac6e953599e51665406b1f48d55
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2415
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-17 21:17:54 +00:00
Vincent Ambo
c26915d012 feat(tazjin/rlox): Track source lines along with bytecode
Change-Id: I272e73b9b1c9571fbfe4fa983fb4283ddee02bd4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2414
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-17 21:17:54 +00:00
Vincent Ambo
49c4cc6c56 feat(tazjin/rlox): Initial bytecode representation
This is significantly simplified from the version in the book, since
I'm using Rust's Vec and not implementing dynamic arrays manually.

We'll see if I run into issues with that ...

Change-Id: Ie3446ac3884b850f3ba73a4b1a6ca14e68054188
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2413
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-17 21:17:54 +00:00
Vincent Ambo
30a6fcccee refactor(tazjin/rlox): Move entrypoints into interpreters
Right now this introduces a simple mechanism to flip between the
interpreters.

Change-Id: I92ee920c53d76ab6b664ac671993a6d6426af61a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2412
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-17 21:17:54 +00:00
Vincent Ambo
f8b3e2a100 refactor(tazjin/rlox): Move treewalk interpreter into subdirectory
Change-Id: I9163f75db5a1ff75e1b1f81bad78fd9d8ddb104a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2409
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-17 09:34:13 +00:00
Vincent Ambo
052f8976bb fix(tazjin/rlox): Include static globals in resolution
Change-Id: Id377ce1fe4c9b9cd65395d15873399d9b6d38af8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2408
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-17 09:34:13 +00:00
Vincent Ambo
06a6aa5dc0 refactor(tazjin/rlox): Call resolver from interpreter
This makes the interpreter API a bit cleaner and allows for tighter
integration between the two parts (e.g. for static globals, which are
unhandled in the resolver right now).

Change-Id: I363714dc2e13cefa7731b54326573e0b871295d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2407
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-17 09:34:13 +00:00
Vincent Ambo
e7a7e09300 chore(tazjin/homepage): Remove mentions of Twitter
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 20:51:48 +00:00
Vincent Ambo
da7e99a4ff feat(tazjin/rlox): Use variable depth for env lookup
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 13:46:31 +00:00
Vincent Ambo
29335a8b63 feat(tazjin/rlox): Implement variable depth resolver
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-16 13:46:31 +00:00
Vincent Ambo
740a9a3565 feat(tazjin/rlox): Implement support for closures
Change-Id: I0ffc810807a1a6ec90455a4f2d2bd977833005bd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2396
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-14 20:26:37 +00:00
Vincent Ambo
39439d59e8 feat(tazjin/rlox): Implement early return from functions
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 20:26:37 +00:00
Vincent Ambo
20a6cfeee2 refactor(tazjin/rlox): Let scanner tokens own their lexeme
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 16:53:02 +00:00
Vincent Ambo
1d8e3f4f8b feat(tazjin/rlox): Implement function definitions
... 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 15:19:01 +00:00
Vincent Ambo
56d8fa97ed feat(tazjin/rlox): Implement calling user-defined functions
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 15:19:01 +00:00
Vincent Ambo
fe97398fd9 refactor(tazjin/rlox): Thread lifetimes through interpreter
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 15:19:01 +00:00
Vincent Ambo
1ed34443d8 feat(tazjin/rlox): Parse function declarations
Change-Id: I1db4316563827976e5233dc7a626968f80b992ef
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2390
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-14 02:05:00 +00:00
Vincent Ambo
8bcbb04160 refactor(tazjin/rlox): Add helper method for parsing identifiers
Change-Id: I9a45f823f16919319d6135225d5bd53ed54c2530
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2388
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-14 02:05:00 +00:00
Vincent Ambo
fcd9801b01 refactor(tazjin/rlox): Let Parser::match_token take a single kind
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 02:05:00 +00:00
Vincent Ambo
f4a6e9f133 test(tazjin/rlox): Add a handful of interpreter tests
Change-Id: I32dd896d42cc73d68d73093e9cbb74b48d95e041
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2386
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-14 00:52:51 +00:00
Vincent Ambo
0c1c4584cb feat(tazjin/rlox): Implement PartialEq for interpreter::Value
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 00:52:51 +00:00
Vincent Ambo
9b477975d4 feat(tazjin/rlox): Always return values from interpreter
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 00:31:27 +00:00
Vincent Ambo
a03b509fb8 refactor(tazjin/rlox): Constructor for interpreter with globals
Change-Id: Id8242c22500c8e2781cc656d3faabb28d9bdf091
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2383
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-14 00:31:27 +00:00
Vincent Ambo
26544aa5f0 feat(tazjin/rlox): Implement function call evaluation
Change-Id: I6767c3a1a9654475b4066415f8c026b9c5b5907a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2382
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-14 00:31:27 +00:00
Vincent Ambo
090c96eae9 feat(tazjin/rlox): Scaffolding for builtin functions
... 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-14 00:31:27 +00:00
Vincent Ambo
73c2b8fb85 refactor(tazjin/rlox): Wrap interpreter values in new enum
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
2021-01-13 17:03:15 +00:00
Vincent Ambo
f3c60865a3 feat(tazjin/rlox): Parse function calls
Change-Id: I1836c73dbfd5fc4ca30c2d22bbffee2fb222d566
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2366
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-13 17:03:15 +00:00
Vincent Ambo
b4e420d4ff chore(3p): Bump NixOS channels to 2021-01-09
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
2021-01-13 16:53:20 +00:00
Vincent Ambo
c1cb4c260c chore(tazjin/emacs): Remove org-journal
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
2021-01-10 13:32:47 +00:00
Vincent Ambo
4e34276b69 feat(tazjin/nisp): Add initial source-to-source transform
... 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>
2021-01-09 16:52:34 +00:00
Vincent Ambo
0b4e280a07 feat(tazjin/rlox): Implement for loops via desugaring to while
Change-Id: I31a93efcc8e0c2bcb8549e2a2c05bb58d2dc74ca
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2326
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-06 23:02:31 +00:00
Vincent Ambo
d47e55ba4d feat(tazjin/rlox): Parse & interpret while statements
Change-Id: Iee772274de95dfd6a6d4af973402859aeda17b1d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2325
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-06 23:02:31 +00:00
Vincent Ambo
0a0335ae6c feat(tazjin/rlox): Parse & interpret logical operators
Change-Id: I1a7d0eda61f7f077b820dc0d2c2516e204966962
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2324
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-01-06 23:02:31 +00:00
Vincent Ambo
93122a212e feat(tazjin/rlox): Interpret if statements
Change-Id: Ic6aed29bec42098eb07e1ba9eb01dbcaae8d11e3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2322
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-01-06 17:14:17 +00:00
Vincent Ambo
a89777b34f feat(tazjin/rlox): Parse if statements
Change-Id: I2352d75a3f02d65a5a2d04fb2cc4daa50f11ca1e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2321
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-01-06 17:14:17 +00:00
Vincent Ambo
1686355d2e refactor(tazjin/rlox): Hold shared environment ptr in interpreter
Change-Id: Ia4c4ef330be431a344d42bc00d3a518825fb9399
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2305
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-12-31 19:10:39 +00:00
Vincent Ambo
b55caf0338 feat(tazjin/rlox): Implement block scope in interpreter
This is currently a bit hacky because of the environment
wrapping/unwrapping, will refactor this to just keep a single Rc
around instead.

Change-Id: Iad1cbbe35112d0329248d4655a09260fc60644c8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2304
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-12-31 19:10:39 +00:00
Vincent Ambo
8915cd6fba feat(tazjin/rlox): Implement block parsing
Change-Id: I1b7235ed71fa36120984a36f22cd564f59581352
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2303
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-31 15:33:08 +00:00
Vincent Ambo
3c979acdf3 refactor(tazjin/rlox): Unify parser::Statement & parser::Declaration
Change-Id: I6f21b246eb9d3bf760edb3220ce6be5de5b05b08
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2302
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-31 15:33:08 +00:00
Vincent Ambo
26ed836e1d feat(tazjin/rlox): Add support for scoped environments
Adds scoped environments using a sophisticated structure known as an
SRPT, which stands for "shitty parent pointer tree".

Change-Id: I62f66aabe6eb32ea01c4cabcca5b03cfefcc28ee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2301
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-31 15:33:08 +00:00
Vincent Ambo
48a54625ce refactor(tazjin/rlox): Separate assignment and definition
So that:

> var a = 15;
> b = 12;
Error in program: Error { line: 0, kind: UndefinedVariable("b") }
> a = 12; print a;
Number(12.0)

Change-Id: I687e95ccc2d3084e39a71bd452656ae981c95191
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2300
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-31 14:32:03 +00:00
Vincent Ambo
cc958e6730 feat(tazjin/rlox): Implement mutable variable assignment
Change-Id: I56db10a5ac26958ae27a8d4c8fa7b8f8285bc7e1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2299
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-31 14:32:03 +00:00
Vincent Ambo
8ab66f1689 refactor(tazjin/rlox): Retain interpreter state in REPL
Change-Id: Id60760e241ad0e45871b48e499f58e9831d57316
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2298
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-12-31 11:19:42 +00:00
Vincent Ambo
78355d3c0b feat(tazjin/rlox): Add global variable support in interpreter
Change-Id: I4134cf78dc3934a517ad0c848ae1d3729abaf882
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2297
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-12-31 11:19:42 +00:00
Vincent Ambo
0f9a7b3f86 feat(tazjin/rlox): Parse variable assignment & access
Change-Id: I9894d76716d739e85a4757d9e658f884228e7f52
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2290
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-22 20:18:01 +00:00
Vincent Ambo
5010b79718 fix(tazjin/emacs): Don't override CARGO_INCREMENTAL
Change-Id: Ib25c45795cb8aea87fc7e22343af6710a6339d32
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2289
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-22 10:13:28 +00:00
Vincent Ambo
a104afa6ea refactor(tazjin/rlox): Introduce declarations in parser
Change-Id: I873fdd53319ec36da18926d9477e809a69dbace7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2288
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-22 10:13:28 +00:00
Vincent Ambo
75ae25daa9 feat(tazjin/rlox): Add support for statements
First part of
https://craftinginterpreters.com/statements-and-state.html

Supports print statements, as well as evaluation for the sake of
it (i.e. future side-effects).

Change-Id: Ic6653b568f98d6cfe3f297615b7113c0ba1d9a70
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2287
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-22 10:13:28 +00:00
Vincent Ambo
5d2d80795d fix(tazjin/emacs): Bind notmuch shortcuts via EXWM
Change-Id: I082ee9f75f9e0ef486bc240b4aeda3dec8e79019
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2284
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-20 16:30:54 +00:00
Vincent Ambo
8ad3e84e40 chore(tazjin/emacs): Remove #'fefes-blog
It's not worth reading anymore, he's getting old.

Change-Id: Ia9bac99169949c3f057c0e9c526cbc99e925af76
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2283
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-20 16:25:54 +00:00
Vincent Ambo
5ebe28cca2 feat(tazjin/rlox): Add runtime type error handling
Change-Id: I0d52bc9ff5be6421cb4131265ed28ce1ea7d8ff3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2282
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-20 16:25:54 +00:00
Vincent Ambo
bc6775c318 feat(tazjin/rlox): Implement tree-walk interpreter of exprs
This is only a subset of the Lox spec so far. It implements the
language up to the runtime error chapter on
https://craftinginterpreters.com/evaluating-expressions.html

Change-Id: I295dbf4b6544420d6fe80b6aaba661fb21acdea6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2281
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-20 16:25:54 +00:00
Vincent Ambo
a9014203b6 chore(3p/lieer): Upgrade to lieer 1.3
* rebases the send scope patch
* removes the API key override patch, lieer now has a configuration
  option for this

Change-Id: I198e8b61855f6cdb2b1439a1c8f2d9d69261c1b5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2242
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 19:41:30 +00:00
Vincent Ambo
ea936e0a78 feat(tazjin/aoc2020): Add solution for day 8, part 2
Change-Id: I03f46faf9b5b1b578b1131ecd08746f1adc3e87f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2243
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-10 13:20:57 +00:00
Vincent Ambo
2485006197 refactor(tazjin/emacs): Always use completing-read instead of ivy
This is a step towards making the completing-read framework more
easily interchangeable (I'm eyeing selectrum).

Change-Id: I7a066e212a5384136defbba8f11ef9ed57abf22e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2240
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-09 14:09:23 +00:00
Vincent Ambo
93f0ab5af8 feat(tazjin/aoc2020): Add solution for day 8, part 1
I'm too tired for part 2.

Change-Id: Ic7058344806466276e3792e9ff9bbf660a18f672
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2239
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-08 23:13:55 +00:00
Vincent Ambo
3061b3228f feat(tazjin/aoc2020): Add (somewhat delayed...) solution for day 7
Solve time is like 36 hours, that must be a record!

Change-Id: I3713f033d83e6179a5d5fa7513952ee3864a6164
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2238
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-08 22:33:07 +00:00
Vincent Ambo
42405bfa24 feat(tazjin/rlox): Synchronise parser state after errors
This lets the parser collect multiple errors instead of returning
after the first one, with some optimistic synchronisation after
encountering something that looks wonky.

Change-Id: Ie9d0ce8de9dcc7a3d1e7aa2abe15f74cab0ab96b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2236
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-06 17:34:57 +00:00
Vincent Ambo
1835b2be99 feat(tazjin/rlox): Wire up parser to the REPL
Change-Id: I940448c63ce105d53a0f281b6320ffb01378f207
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2235
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-06 14:58:39 +00:00
Vincent Ambo
4812fc2ee6 feat(tazjin/rlox): Implement parsing of parenthesised expressions
Change-Id: I0e6bd71fd787b719104ef93fc52df4090dc415b9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2234
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-06 14:30:59 +00:00
Vincent Ambo
28002fcea5 refactor(tazjin/rlox): Add error plumbing in parser functions
Change-Id: I7ae3d721f76d8d69043f5ed077abbc70a18cbd92
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2233
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-06 14:30:59 +00:00
Vincent Ambo
5fcff11eae feat(tazjin/rlox): Implement parsing up to unary expressions
... with the exception of parenthesised expressions, because error
threading is not implemented yet.

Change-Id: I8d455d85e647548d5b71cbfd3d078f4970dab7fb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2232
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-06 14:30:59 +00:00
Vincent Ambo
a8371b01df refactor(tazjin/aoc2020): Build all solutions in CI
This changes the structure of the output, too, where all AoC solutions
now end up in a big folder with `bin/day$n` executables.

Change-Id: I77928f4129489d06779b50059835925652688c9c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2231
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-06 13:02:31 +00:00
Vincent Ambo
54f143b8f7 feat(tazjin/aoc2020): Add solution for day 6
Change-Id: I107cc23bb77c618067af6cc47ced3c87464f4cba
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2230
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-06 11:59:22 +00:00
Vincent Ambo
7067f3a797 feat(tazjin): Check in higher-quality version of avatar
... found this in the same place as hanebuschtag.txt

Change-Id: Iff5f4867b6c1d7685edae8a190489f3efb4890bc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2229
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-06 00:48:52 +00:00
Vincent Ambo
efd48011fc feat(tazjin): Check in hanebuschtag.txt
This old, legendary file should never be lost.

Change-Id: I2ae1607da24d684199c4136a880f56528d45a6e8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2228
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-06 00:48:52 +00:00
Vincent Ambo
6d411c53ee feat(tazjin/aoc2020): Add solution for day 5
Change-Id: I771335f351be3418dbb589c429411748564f07f5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2227
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-05 13:32:17 +00:00
Vincent Ambo
d4f6b67644 feat(tazjin/aoc2020): Add solution for day 4
Change-Id: I0b3c6a251bb0997b77bdd83593c65efcf471625c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2226
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-04 11:37:52 +00:00
Vincent Ambo
a9980bb631 feat(tazjin/aoc2020): Add solution for day 3
Change-Id: I84147731e1508032510a52cda28be74bbbb17c61
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2225
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-04 11:37:52 +00:00
Vincent Ambo
ea683b1ce8 feat(tazjin/aoc2020): Add solution for day 2
Change-Id: Id149ff13d1e903a578cdcdc3a8d0045cfefaecfa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2224
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-02 10:05:28 +00:00
Vincent Ambo
6aa6151146 feat(tazjin/aoc2020): Add solution for day 1
Change-Id: I9c5e7f69cac1940ddeb7932d4450e2bd3764e1f5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2213
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-12-01 12:55:59 +00:00
Vincent Ambo
87f1e15baa chore(writeElispBin): Move from //overrides to //nix
... some legacy cleanup ...

Change-Id: I9e73451256f842e75ddbf1382badaf06c775c755
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2212
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-12-01 12:55:59 +00:00
Vincent Ambo
6c08bcc84d chore(tazjin/aoc2019): Move out of //fun
Change-Id: I9d065b672f4245b81444737dd900c8864447bc4d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2211
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-12-01 12:55:59 +00:00
Vincent Ambo
9cb98713d3 fix(tazjin/emacs): Don't use use-package for dottime.el
It doesn't work.

Change-Id: I06e95a43ca09f12c5763760e616b1b90c84dd265
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2209
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-30 16:46:51 +00:00
Vincent Ambo
349583d5a9 feat(tazjin/rlox): Bootstrap recursive-descent parser for Lox
... mostly some AST boilerplate and a first top-level rule, plus
boilerplate similar to that set up in the Scanner.

Change-Id: I605d1de23c47a3b3702ab4f62cd3371bc3988c7d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2194
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-30 16:42:17 +00:00
Kane York
844c84a38a chore(3p): upgrade llvm to version 11
Additionally, anchor clang-tools to match the current llvmPackages version.

Change-Id: I27a199cadb55907c3e2deabfd1d14a5b50fc541b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2166
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: glittershark <grfn@gws.fyi>
2020-11-29 03:02:14 +00:00
Vincent Ambo
36cf7bef24 refactor(tazjin/rlox): Thread through scanner errors
... and show them to users, very crudely.

Change-Id: If4491b14db1124313f6ab7e5fbfdce9fea501d11
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2193
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-28 17:26:58 +00:00
Vincent Ambo
af793325c0 feat(tazjin/rlox): Scan identifiers and keywords
Change-Id: Ifec627605c23c25f199d47eaa91e441ed9590208
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2192
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-28 16:55:25 +00:00
Vincent Ambo
97505eb1e1 feat(tazjin/rlox): Implement number scanning
Change-Id: Ide0126d1c2274d56903092816ff9cd531c03f513
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2191
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-28 16:55:25 +00:00
Vincent Ambo
47aa92b87d feat(tazjin/rlox): Implement string scanning
Note that Lox does not support escapes, and I don't care about that.

Change-Id: Ie848cbc1164c4b005b15e29aad8fe723aaa68d1b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2190
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-28 16:33:32 +00:00
Vincent Ambo
800d2ccde8 fix(tazjin/rlox): Clear previous line in REPL mode
Change-Id: I8acc5b0d07b2c656f9bba76a6ddac6b9088ea563
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2189
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-28 16:33:32 +00:00
Vincent Ambo
4277d3e6b4 feat(tazjin/rlox): Handle whitespace in scanner
Change-Id: Iead3efa6aa797af5c5b57c67226205bf7e39e647
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2188
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-28 16:33:32 +00:00
Vincent Ambo
9f61579dde feat(tazjin/rlox): Scan single-line comments
Change-Id: I2efafdb1374ac2863a1f8d8a9310123a7dec0900
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2187
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-28 16:33:32 +00:00
Vincent Ambo
46c6906aaa chore(tazjin/rlox): Wire scanner to interpreter to reduce warnings
... they're just noisy at the moment. This isn't complete because it
doesn't thread through scanner errors.

Change-Id: I0f75d2b20fa3f57be1af5d1d8aa8059856855825
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2162
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-27 17:29:04 +00:00
Vincent Ambo
3f6b88bce2 feat(tazjin/rlox): Implement multi-character scanning
Change-Id: Ic5a246a7f5834477aeb97824fa30ba74a8422bc1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2161
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-27 17:29:04 +00:00
Vincent Ambo
6363efbebf refactor(tazjin/rlox): Use &[char] instead of &str in scanner
This makes it easier to work with the Unicode issue. The original
string representation can be discarded.

Change-Id: I740be4cb9654679ea7950f3899c5c709b1e7a739
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2160
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-27 17:29:04 +00:00
Vincent Ambo
de44fdf92a feat(tazjin/covid): Add jq script for wrangling CDC data
Change-Id: Ia23f528d28126d6a2d0dd2d7327ec686c7e90df4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2158
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-27 02:24:42 +00:00
Vincent Ambo
3d1b116f7f feat(tazjin/rlox): Implement single-character scanning
... still not that interesting, but at this point slightly divergent
from the book:

The book embraces mutability for interpreter state, initially for
tracking whether an error condition has occured.

I avoid this by instead defining an error type and collecting the
error values, to be handled later on.

Notes: So far nothing special, but this is just the beginning of the
book. I like the style it is written in and it has pointed to some
interesting resources, such as a 1965 paper titled "The Next 700
Languages".

Change-Id: I030b38438fec9eb55372bf547af225138908230a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2144
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-23 01:15:57 +00:00
Vincent Ambo
9d2b001c4c feat(tazjin/rlox): Add basic program structure
... as well as a Nix derivation, because why not.

Change-Id: Iaf2591ab72676fe0732c3f807b3aa0cff13fb4ef
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2143
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-23 01:15:57 +00:00
Vincent Ambo
0618ff11cc feat(tazjin/rlox): Bootstrap program
This is going to be the first of two interpreters from "Crafting
Interpreters".

Change-Id: I354ddd2357444648d0245f35d92176dd176525d8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2142
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-23 01:15:57 +00:00
Vincent Ambo
312d76acba feat(tazjin/emacs): Enable midnight.el
Change-Id: I22bedd80c6e99ccefefa7840ec37496360937842
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2137
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-22 23:26:57 +00:00
Vincent Ambo
5a00e58904 chore(3p): Bump nixpkgs to nixos-unstable from 2020-11-21
Included fixes for random breakage:

* 3p/awscli: pick from the stable channel; it is broken on unstable
* 3p/googletest: bumped version & removed patches that nixpkgs applies
* 3p/lisp/cffi: bumped library version for SBCL compat
* 3p/nix: fix libsystemd attribute
* 3p/nix: reformatted (clang-format handling of ternaries changed)
* glittershark/home: Use home-manager from nixkpgs
* glittershark/kernel: bumped linux-ck patch hash
* glittershark/kernel: removed "patch patch"
* multi/whitby: Use home-manager from nixpkgs
* tazjin/frog: drop Sourcetrail (it doesn't build currently)

Note that in addition to these changes, some previous CLs updated the
versions of git and cgit which was necessary for this channel bump,
but which could not be done in the same commit due to the nature of
the subtree merges.

Change-Id: If2563e8a68e2750c4b913a976ff7b93b42e8b7f3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2110
Tested-by: BuildkiteCI
Reviewed-by: multi <depot@in-addr.xyz>
Reviewed-by: glittershark <grfn@gws.fyi>
2020-11-21 23:18:27 +00:00
Vincent Ambo
cce0ad1bcd chore(tazjin/emacs): Minor cleanup of unused modes and config
Change-Id: I38c6a32339bf7606b733a938b4e55df2506a13a7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2107
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-21 13:27:20 +00:00
Vincent Ambo
ac5ba13dce fix(tazjin/emacs): Do not assume '.txt' files are Markdown
Change-Id: I5cab039938e415facf81492e7e3775672ee45db9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2068
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-11-04 11:34:06 +00:00
Vincent Ambo
7a62272d20 feat(tazjin/camden): Install flatcam tooling
This was previously set up manually in a nix-shell.

Invocation works like this:

  screen fswebcam --title 'tazflat' --font 'JetBrains Mono' \
                  --timestamp "%Y-%m-%d %H·%M+01" -l 60 -r 1280x720 \
                  -d /dev/video0 --jpeg 95 /var/www/blobs/flat.jpg \
                  --exec 'cp /var/www/blobs/flat.jpg /var/www/blobs/flat/at_$(date +%s).jpg'

Change-Id: I5ecf8fdf67240faf885fd12f428e368e2bc64dc8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2018
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-10-04 16:06:25 +00:00
Vincent Ambo
2670f84f5f fix(tazjin/camden): Backport 19.09 ACME module
The new one is causing breakage for me, but I have no time to debug
this, so I'm backporting the old one.

AFAICT the simp_le included in this channel should be new enough to
have ACMEv2 compat, we'll see if it works.

Change-Id: Ib8b869a5af8a0418a66017a0cf3b9336df5f2d05
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2017
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-10-04 15:51:59 +00:00
Vincent Ambo
48235517f6 feat(tazjin/emacs): Add function for quick Songwhip lookups
Adds a function `songwhip-lookup-url` which looks up the supplied URL
on Songwhip and copies the Songwhip link if a result was found.

This is bound to `s-s w` for convenience.

Change-Id: I3b529a058ee56f992942760910822490e6324259
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2002
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-09-27 21:02:41 +00:00
Vincent Ambo
6bdc6c85cd feat(tazjin/emacs): Add Swedish keyboard layout
It's a little easier to use this for Swedish than to compose the ä and
ö in the Norwegian layout.

Additionally - to avoid problems when switching to keyboards that have
no hardware remapping - re-applies the caps:super flip on every layout
switch.

Change-Id: I1b2c55761514745291d0eeb1502fa503f84f8aa1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2001
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-09-24 11:35:04 +00:00
Vincent Ambo
1c7e20ce30 feat(tazjin/camden): Enable bitlbee
Change-Id: Ie7a438c2038b3689600499f1d3a7e3d70bca120a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2000
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-09-24 11:13:38 +00:00
Vincent Ambo
5528a9aa6f chore(tazjin/camden): Add my user to the quassel group
Makes log access easier ...

Change-Id: I1b4df00ad2015b6a51029772a43f3e6544ba8d18
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1991
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-09-20 19:23:02 +00:00
Vincent Ambo
4a29942b06 fix(tazjin/emacs): Gracefully handle irregular Quassel titles
Some Quassel dialogues (e.g. popups, or clients that aren't connected
yet) don't match the expression and cause errors. This falls back to
the raw title for the window if no match is found.

Change-Id: I67b9cd7f6e2cb8e3e118d7fb7eeb615380be09d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1976
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-09-14 15:31:13 +00:00
Vincent Ambo
20e88b0dd6 fix(tazjin/emacs): Include -/& in Quassel channel names
Change-Id: Id21de577043fe0fea90ae684a311ac7239714cf8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1974
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-09-12 19:56:06 +00:00
Vincent Ambo
b8b2a499e1 feat(tazjin/emacs): Rename Quassel EXWM windows
This gives Quassel buffers sensible titles containing the name of the
network the buffer is currently displaying.

Ideally it would show me the name of the Quassel Core connection, but
this isn't exported from Quassel into the X window title.

The regex captures both the channel and the network, but only the
network is currently used for display - I may revisit that at some
point.

Change-Id: Ife4c06919d9e9c0114ff298e1443b2b27ce2f146
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1964
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-09-09 10:56:52 +00:00
Vincent Ambo
87bfc53d7b chore(tazjin/keys): Add S10e key
Change-Id: I3efdd49e23bdc357f15ea189b890e25843cc0255
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1933
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-09-06 17:15:14 +00:00
Vincent Ambo
7f1c9bc234 fix(tazjin/emacs): Kill vterm buffers if their process exits
This has somehow stopped being a thing in newer vterm versions,
causing the weird behaviour with my term switcher - buffers with the
correct name were sticking around, but no longer in the right mode.

Change-Id: Ie641eb3db91808d7d1016de1e8ef3ad271c8995e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1931
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-09-05 23:38:12 +00:00
Vincent Ambo
77a47fa85c chore(tazjin/nixos): Include camdenSystem and frogSystem in CI
Change-Id: I83c99a853e7a14a41ba87fed9d7988d4a2556920
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1894
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-08-31 23:14:11 +00:00
Vincent Ambo
61d2d2d503 feat(ops/pipelines): Dynamically generate CI pipeline from targets
Create the pipeline by outputting a file that contains nix-build
invocations for each target's *derivation path*.

Each invocation has a generated Nix expression passed to it with `-E`
which fetches the correct target from the tree while correctly
handling targets with strange characters (such as in Go-packages).

This makes it possible to run target-level granular pipelines. We're
getting somewhere!

Change-Id: Ia6946e389dafd1d4926130bb8891446d6e17133b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1855
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-08-31 23:14:11 +00:00
Vincent Ambo
5ad61ee408 chore: Add __readTree attributes on systems that need to be built
This is a temporary state (TODO added) to be picked up by the new CI
logic.

Change-Id: Id4702740ffd18325088e2a8a0c6157a8cee7ccf7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1852
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-08-26 23:49:32 +00:00
Vincent Ambo
2bf806b21a chore(tazjin/dt): Move project into user folder
... missed this when going multi-user.

Change-Id: If2c9f24555f82e944e3cebb45b2a13801cc1f35e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1844
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-08-26 23:49:32 +00:00
Vincent Ambo
dec32be0d7 fix(tazjin/emacs): Override vterm's internal title generator
This used to be part of the public interface, but was removed and
replaced with a (less useful) format string.

Change-Id: I387557c20c2eddde16974c3fcad1712569db5325
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1841
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-08-26 11:15:41 +00:00
Vincent Ambo
35b214ae9f feat(tazjin/emacs): Add magit-find-file-worktree function
This will look up a file in the current worktree of the git repository
enclosing `default-directory'.

In combination with project-find-file this lets me toggle between
switching to a file within a project, and within the whole depot.

Change-Id: Ie1011f10051fc2c4bd4279b0944a79c7edf92f3b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1838
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-08-23 23:47:46 +00:00
Vincent Ambo
937469509b feat(tazjin/emacs): Add depot-aware project.el extension
If this ends up working well I'll extract it to tvl.el

Change-Id: I83722abf33a3346ccc7957c8d64d6381b15c6ee9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1837
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
2020-08-23 22:48:04 +00:00
Vincent Ambo
b051148473 fix(tazjin/emacs): Use 'Semi Light' font weight on frog
The font weight rendering issue on frog is, for now, undefeatable and
I'm resorting to just using a lighter font base weight which makes it
possible to actually see bold things.

Change-Id: Ida10f2e8d728039c9ab76bfab1fd0d36340fbac7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1785
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-08-19 00:11:30 +00:00
Vincent Ambo
1da8ace6a2 chore(tazjin/emacs): Bump my personal Emacs to 27.1
Change-Id: Ib7e9ac97830427b962b02cd5ea6151a67c387936
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1765
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-08-17 18:14:40 +00:00
Vincent Ambo
dae33202fc fix(tazjin/emacs): Completely disable vc-mode
vc-mode is somehow broken in this newer version of Emacs and, since it
is part of the default find-file-hook, breaks pretty much everything.

This disables all vc backends until I figure out what's going on.

Change-Id: I104cd30d6c56f3d6423ac079b1427127bf5a1038
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1752
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-08-15 00:26:42 +00:00
Vincent Ambo
8b2d0ae064 refactor(tazjin/emacs): Use telega.el from unstable channel
This removes the need for supplying a locally built telega-server
binary, as the new upstream derivation includes this.

It also ensures that the frontend/backend are synchronised, which I
think has been causing some issues on vauxhall.

Change-Id: If504624e607a24fa12d68516cde65fef25ed2838
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1749
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-08-14 13:34:48 +00:00
Vincent Ambo
1b5a5b0561 feat(tazjin/homepage): Add entry for the Joscha Bach interview
Change-Id: Iae7428da249e2a70bc55c4b404b57b74971e999f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1716
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-08-10 23:24:44 +00:00
Vincent Ambo
574d62c4b9 feat(tazjin/homepage): Add non-blog-post entries to Atom feed
Adds the same entries that are also listed on the homepage itself to
the feed.

Change-Id: I6586dcb899d40536777ac5a5dfcac4bb1cc8cee5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1715
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-08-10 23:24:44 +00:00
Vincent Ambo
1d699fdc5c refactor(tazjin/atom-feed): Make content optional
This allows for adding feed entries which only have an alternate
representation (i.e. URL that points somewhere else).

These entries will still have a summary, in my use-case.

Change-Id: I149838c5f59c66e8169b97f35b378aefe9763a84
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1714
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-08-10 23:24:44 +00:00
Vincent Ambo
718a561441 chore(tazjin/camden): Remove services that have moved to whitby
Change-Id: Ica3e30105be1ec56023ebf2dd81e5fa0cbe4759c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1713
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-08-10 23:24:44 +00:00
Vincent Ambo
dc13e12b95 feat(tazjin/homepage): Add Atom feed for blog posts
Change-Id: I9049e2cc3f5a2c491ccfad5595d60c01ad926e6d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1712
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-08-10 23:24:44 +00:00
Vincent Ambo
452b8c7e23 refactor(tazjin/blog): Extract post rendering to utility function
To use cheddar for both the feed & web views, the rendering function
is extracted a level up - this prevents duplicate renderer calls.

Change-Id: I31812c5c3f905f2f84914c6a8ab7c14602227be1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1710
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-08-10 23:24:44 +00:00
Vincent Ambo
916dba43e7 feat(tazjin/atom-feed): Add Nix functions for generating an Atom feed
This only adds the feed generation functions, but does not yet wire it
up to the blog content.

This was implemented against
https://validator.w3.org/feed/docs/atom.html and I've validated some
generated example feeds with the W3 validator.

Change-Id: Ide3ea90d3fa935047506aa87169100c2ead21284
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1709
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-08-10 23:24:44 +00:00
Vincent Ambo
820a4fd46d feat(tazjin/frog): Install sourcetrail
Change-Id: I4858a1e374162ea1cf35aa906e0d723fe8c2c392
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1681
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-08-06 02:03:36 +00:00
Vincent Ambo
d42c3dd72f chore(3p): Bump nixpkgs channels
Bumps both nixos-unstable and nixos-20.03 to today's versions, as per
status.nixos.org

Contains minor fixes to things that broke because of the update:

* tazjin/frog: hardware.u2f is a deprecated setting
* glittershark/system: modSha256 in Go modules is now vendorSha256
* glittershark/owothia: removed version constraint on relude

Change-Id: Ib3e9612b1b06ed547b90e4f8b0ffe5ed7fe0a5c4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1642
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-08-06 00:15:33 +00:00
Vincent Ambo
c9701da602 feat(tazjin/frog): Install screen & xsecurelock
rather than using nix-shell each time ...

Change-Id: If84a84bca4ed892d0d38c5dcfc23a073cbb89e64
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1512
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-08-01 14:13:14 +00:00
Vincent Ambo
e2c72e91ed chore(tazjin): Move wallpapers into my user folder
Change-Id: I30901967ff0d65ae4a12a5b74c3baec9a6406971
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1511
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-08-01 14:13:14 +00:00
Vincent Ambo
2ed0778103 chore(tazjin/frog): Enable Docker for Nixery testing
Change-Id: Ia0ffb781fc61f42aa4ad043a6f73fa995eb2c1b5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1434
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-25 13:46:04 +00:00
Vincent Ambo
d305e39187 fix(tazjin/frog): Flip order of screens around
I switched the physical connectors of these to avoid having the boot &
disk unlocking process happen on the vertical screen.

Change-Id: Iaf0be5edd145aa763437e2352438ee11c8d64c3d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1335
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-07-21 19:15:33 +00:00
Vincent Ambo
7770d4b2a0 feat(tazjin/frog): Enable Bluetooth & Blueman service
Change-Id: Ie5c1a93b8aa42172376edfcc63d8fbaaaa3daa5d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1334
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-07-21 19:15:33 +00:00
Vincent Ambo
1ba5aa293b feat(tazjin/emacs): Rotate left screen counterclockwise
Change-Id: I0318e394b32c341a04471f687ee4c6d5beb29cd1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1214
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-16 17:57:51 +00:00
Vincent Ambo
e92c824330 chore(tazjin/frog): Lower 'kernel.perf_event_paranoid' to -1
This allows access to profiling events by (almost?) all users.

Change-Id: I10e31ea9978f0b552a3973c29e98b43a6db45d1d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1183
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-07-16 00:37:29 +00:00
Vincent Ambo
f808afc89c feat(tazjin/frog): Install patched rr
Frog has a ThreadRipper, and rr won't run at all without this patch.

Change-Id: Ie7e7c3567fb395ef8e7cd23061f099f91c7882ed
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1130
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-13 17:56:22 +00:00
Vincent Ambo
ec46fdf28c chore(tazjin/camden): Remove cgit & gerrit deployments
Change-Id: Iaf34d0d005285a367fa9730093b553d38acb8ae5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1101
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-12 13:40:12 +00:00
Vincent Ambo
d76f1eb10b chore(tazjin/camden): Remove Sourcegraph & TVL website deployments
These are now on whitby.

Change-Id: I25b1cdedf4ce9cdb377a40edbbbce123938b6828
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1068
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-12 13:36:45 +00:00
Vincent Ambo
5abdc16f6f feat(nixos/sourcegraph): Move cheddar server to module & make ports configurable
Change-Id: Iaf0c854b148062e30d426c2e92638932caf2e92e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1065
Tested-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-07-12 13:36:45 +00:00
Vincent Ambo
31f65f5d2b feat(whitby): Move over clbot deployment from camden
There is only one minor configuration change: CLBot now connects to
cl.tvl.fyi, instead of localhost, because Gerrit is still on camden.

Change-Id: Ibd8d46ec2c18312a270471a2f0be3e58eaf0cbab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1062
Tested-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-07-11 12:20:17 +00:00
Vincent Ambo
9eb248e0c5 feat(tazjin): tazjin
tazjin: https://github.com/tazjin/tazjin/issues/1
Change-Id: I655670fed1dd1ba7e9034f165238e2d69b228ee5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1002
Tested-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-07-10 23:23:41 +00:00
Vincent Ambo
e2e1579185 feat(tazjin/camden): Configure Quassel core instance
I'm not actually sure if this will apply cleanly, because the new
NixOS ACME module is kind of broken.

Change-Id: I39584333dbea0a5f7b72e68d5e9f752a4c31bfe6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/957
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-08 22:10:08 +00:00
Vincent Ambo
d6bf3207b0 feat(tazjin/frog): Install Quassel client on frog
Change-Id: I5abcf0768a84b2010acefef595d05d4f24f6d622
Reviewed-on: https://cl.tvl.fyi/c/depot/+/956
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-08 22:10:08 +00:00
Vincent Ambo
096fa10632 chore(tazjin/frog): Remove Buildkite agent setup
Whitby is handling this now!

Change-Id: I342d0ad15e3b2c177f7251b01e884729141b99fd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/907
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: BuildkiteCI
Tested-by: BuildkiteCI
2020-07-03 22:55:07 +00:00
Vincent Ambo
cd45c04b11 feat(tazjin/frog): Add whitby as a binary cache
Change-Id: Iedfd0a4aef6e49fc2dcaf9da3d41b858bc3b22f9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/906
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: BuildkiteCI
Tested-by: BuildkiteCI
2020-07-03 22:55:07 +00:00
Vincent Ambo
a564f36443 feat(tazjin): Add SSH key from vauxhall
Change-Id: Ie897d9e2309f971154ba43e7dce73bb29f4ca9df
Reviewed-on: https://cl.tvl.fyi/c/depot/+/858
Reviewed-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
Tested-by: BuildkiteCI
2020-07-02 22:28:36 +00:00
Vincent Ambo
3ed1da6b24 feat(tazjin/keys): Add an expression with my SSH public keys
Change-Id: I624ce085ff18360bbd390bc570b6be2a416b9a42
Reviewed-on: https://cl.tvl.fyi/c/depot/+/842
Reviewed-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-02 18:32:47 +00:00
Vincent Ambo
c0f07e142e chore(tazjin): Remove nugget system definition
This host is deprecated.

Change-Id: Ibbf1e300ae8b136bb3ce3669864045e6ea7eff23
Reviewed-on: https://cl.tvl.fyi/c/depot/+/826
Reviewed-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-07-01 13:16:32 +00:00
Vincent Ambo
feb3f1a374 feat(nixos/clbot): Add a module for running clbot
Change-Id: I9c10906441c3222b74bcc820a67f11d96462fcfa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/821
Tested-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: BuildkiteCI
2020-06-30 23:39:48 +00:00
Vincent Ambo
37fdd5ae8b chore(tazjin/finito): Add build configuration
Adds a Naersk-based build to check that this compiles, with a Lockfile
based on the ~2018 crate versions.

Change-Id: I0460a476d3b983fcf71e35e6b480f4a526118b58
Reviewed-on: https://cl.tvl.fyi/c/depot/+/803
Reviewed-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-06-30 04:14:27 +00:00
Vincent Ambo
9e7b81391d feat(tazjin/finito): Check in my old Rust state-machine library
I dug through my archives for this and found a version that, while
unfortunately not the latest implementation, is close enough to the
real thing to show off what Finito did.

This is a Postgres-backed state-machine library for complex
application logic. I wrote this originally for a work purpose in a
previous life, but have always wanted to apply it elsewhere, too.

git-subtree-dir: users/tazjin/finito
git-subtree-mainline: 0380841eb1
git-subtree-split: b748117225
Change-Id: I0de02d6258568447a14870f1a533812a67127763
2020-06-30 04:35:58 +01:00
Vincent Ambo
dc07977866 chore(ops): Clean up old GCP infrastructure files
This removes almost all of the GCP-infrastructure leftovers from my
previous setup.

The DNS configuration is retained, but moves to my user folder
instead.

Change-Id: I1867acd379443882f11a3c645846c9902eadd5b0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/782
Tested-by: BuildkiteCI
Reviewed-by: eta <eta@theta.eu.org>
Reviewed-by: isomer <isomer@tvl.fyi>
2020-06-29 21:24:49 +00:00
Vincent Ambo
6d3a9e7b5f feat(besadii): Implement support for Buildkite's post-command hook
This hook is invoked by Buildkite (on the runner) after every build
stage. This change adds support in Besadii to run as this hook and
update the build status on a Gerrit CL.

Change-Id: Ie07a94d9b41645a77681cf42f6969d218abf93c1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/761
Tested-by: BuildkiteCI
Reviewed-by: Kane York <rikingcoding@gmail.com>
2020-06-29 15:15:19 +00:00
Vincent Ambo
f3bf9fbad9 feat(tazjin/camden): Redirect tvl.fyi/builds to Buildkite
Change-Id: Id9f6f6035b1e068d0b3d9f649427010c18d43be6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/641
Reviewed-by: tazjin <mail@tazj.in>
2020-06-27 18:33:54 +00:00
Vincent Ambo
7f703913ed feat(tazjin/frog): Enable Buildkite agent
While we get our actual CI system up-and-running (i.e. while we're
waiting for Hetzner to provision a machine), Frog can serve as a build
host (whenever it's online, anyways).

Change-Id: I917a8dbe92c499c607ead179a58bc59c105abd3d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/626
Reviewed-by: tazjin <mail@tazj.in>
2020-06-27 16:31:15 +00:00
Vincent Ambo
ba94a9f341 fix(tazjin/frog): Install missing manpages
Change-Id: I69f3900415231c20ce3df9d0f2fb59114bc4bffa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/607
Reviewed-by: tazjin <mail@tazj.in>
2020-06-26 21:45:14 +00:00
Vincent Ambo
2e3b03b5ae chore(tazjin): Move my presentations to my user directory
Change-Id: I72b25680e7167c3a55477111c28b1d4936c60e2c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/606
Reviewed-by: tazjin <mail@tazj.in>
2020-06-26 19:51:51 +00:00
Vincent Ambo
351ed4f044 fix(tazjin/homepage): Fix configuration settings after page moves
My personal pages have moved out of //web, and various changes were
necessary to keep everything working.

Change-Id: I2f81fdd8ba2ce2ce6fea7e329bbdcda6092cc8a6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/604
Reviewed-by: tazjin <mail@tazj.in>
2020-06-26 19:33:35 +00:00
Vincent Ambo
a2cbbedc65 chore(tazjin): Move //web/blog & //web/homepage to my userdir
Change-Id: I96a2620ffb1d9e98a1d8ce7d97f2c4f58c2dbfd3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/603
Reviewed-by: tazjin <mail@tazj.in>
2020-06-26 19:33:35 +00:00
Vincent Ambo
0fe66627dd feat(tazjin/frog): Install 'nsfv-setup' into system profile
Change-Id: I8b49cd5208a8ddb43eb426714c14c9cdd50f0bd0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/601
Reviewed-by: tazjin <mail@tazj.in>
2020-06-26 18:56:02 +00:00
Vincent Ambo
cdc687d35b feat(tools/nsfv-setup): Move NSFV setup script out of //users
This program can be used for noise-cancelling in arbitrary audio
streams. See CL/576 and CL/577 for more details.

This moves the script out of my users folder and to //tools, and adds
two changes:

* Existing sinks will be removed & reinitialised
* The sink is changed from stereo->mono (which seems to make little
  difference but is more reliable)
* The parameter has changed from 50 to 42 because I felt like it

Change-Id: Id9ff285fefd682ccc4d9f18e46b5fde9cd056aa7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/578
Reviewed-by: glittershark <grfn@gws.fyi>
2020-06-26 13:55:00 +00:00
Vincent Ambo
6944d0c96a feat(tazjin/nsfv-setup): Add script for noise-cancelling others
This script creates a pulseaudio sink that will cancel noise in audio
streams sent to it, and then move it on to the default sink.

This means that other people's crackling, static background, gulping,
keyboard sounds, fan whirring, construction noise etc. are removed.

Some preliminary tests on TVL suggest that this actually works. The
parameter might need some tweaking ("50" is just the default value),
as there is some occasional crackling at the beginning/end of a speech
segment, but this is already *much* better than before.

Change-Id: I9d4e2b39cfc2b878b4b7c5458788b8d46fb801af
Reviewed-on: https://cl.tvl.fyi/c/depot/+/577
Reviewed-by: nyanotech <nyanotechnology@gmail.com>
2020-06-25 03:12:50 +00:00
Vincent Ambo
14317eea79 fix(tazjin/frog): Explicitly use amdgpu driver
This ends up using the same driver, but generates saner display names
somehow. Who knows what's going on there.

FWIW, it didn't help with the font weight issue.

Change-Id: Ib6161088b23109f4f0e24b8a87c478ad274df4d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/566
Reviewed-by: tazjin <mail@tazj.in>
2020-06-24 01:27:23 +00:00
Vincent Ambo
de5db029e8 feat(tazjin/frog): Install a variety of other tools
These are all things I constantly nix-shell into my environment. Maybe
they should just be part of it.

Change-Id: Ic0b738d12fae70900629c79764c7d8c323e71bb1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/560
Reviewed-by: tazjin <mail@tazj.in>
2020-06-22 22:46:55 +00:00
Vincent Ambo
6851e435d8 feat(tazjin/frog): Install obs
Change-Id: I06d532b707c9c477bc573829805379a90b332182
Reviewed-on: https://cl.tvl.fyi/c/depot/+/559
Reviewed-by: tazjin <mail@tazj.in>
2020-06-22 22:42:56 +00:00
Vincent Ambo
1ff26fb8c5 chore(tazjin/frog): Include v4l2loopback module
Change-Id: Id60311da956d070ab53201fddf3651279fab4a58
Reviewed-on: https://cl.tvl.fyi/c/depot/+/546
Reviewed-by: tazjin <mail@tazj.in>
2020-06-21 17:19:28 +00:00
Vincent Ambo
a8e25bc9d3 feat(3p/kernelPatches): Add kernel audio patch for ASUS TRX40 Pro
Without this patch, this board is not included in the pin map
overrides and audio basically doesn't work.

With this patch, the audio still doesn't work, but it can at least
correctly detect what is and isn't plugged in - so that's progress.

Change-Id: I66ca7d7a1e0e25a0212b9659381875ad4c590ffc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/542
Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-06-20 22:27:03 +00:00
Vincent Ambo
d18faddba3 chore(nixos/sourcegraph): Configure Sourcegraph to use Cheddar
Change-Id: I2b91bef97c16254ffefcbc4da48ef161a859e7a0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/521
Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-06-20 03:00:46 +00:00
Vincent Ambo
56d86da4e9 feat(tazjin/emacs): Install & configure tvl package
Change-Id: If26f1d9ad07c92429f9886b622685db70243e464
Reviewed-on: https://cl.tvl.fyi/c/depot/+/505
Reviewed-by: tazjin <mail@tazj.in>
2020-06-19 17:54:46 +00:00
Vincent Ambo
9266b3947d feat(emacs-pkgs/tvl): Add #'tvl-depot-status function
This function opens the depot in magit. By default the depot path is
assumed to be `/depot`, but that is made available as a customise
option that users can override.

Change-Id: Iefc127cad515dbae330d7af3aa69a0c53aa02015
Reviewed-on: https://cl.tvl.fyi/c/depot/+/504
Reviewed-by: glittershark <grfn@gws.fyi>
2020-06-19 17:54:46 +00:00
Vincent Ambo
4496c48f1a feat(tazjin/frog): Install lutris
Change-Id: I337ffe42007e6c30022719f3564a400a84ddd0e0
2020-06-19 02:09:05 +01:00
Vincent Ambo
298291d9ae chore(tazjin/camden): Get rid of Honk ... again
I swear I've done this before. Multiple times.

Change-Id: I0d9fcb8fbb05b7b3a24392a204553ce60855f8df
2020-06-19 01:56:37 +01:00
Vincent Ambo
94ead741ec feat(tazjin/camden): Redirect cs.tvl.fyi/ -> depot/
The homepage is not useful to us because there is only one repo here
anyways.

Change-Id: Ia4e77849dcc54b64bca8b87a3b7dfae3efc382da
2020-06-19 00:56:38 +01:00
Vincent Ambo
0b0e8c2da7 chore(tazjin/emacs): Move //tools/emacs to //users/tazjin/emacs
Change-Id: I9dfbd0bb1fd3e215bb91c5734fb0934ee3faeae6
2020-06-18 20:19:50 +01:00
Vincent Ambo
794441793c chore(tazjin/camden): Provision certificate for b.tvl.fyi
Change-Id: I96bd3802c05f9ab2973bdb1866d60113fcda56e9
2020-06-18 03:34:21 +01:00
Vincent Ambo
3edb8a7a7d fix(tazjin/frog): Enable 32bit OpenGL support
Change-Id: Ia35102c6041108015703ff8908abd66083c64187
2020-06-18 00:51:32 +01:00
Vincent Ambo
9a7a0aa597 chore: Remove traces of Hound
We can always revert this if we want it back.

Change-Id: I1332b6dd541199584b7b5b94a8651172d79e53a9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/442
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-06-16 20:32:18 +00:00
Vincent Ambo
654f13d405 feat(nixos/sourcegraph): Add a module for running SourceGraph
This module spins up the Sourcegraph container.

Builds:

Note that this is contrary to how our other deployments work, but
packaging Sourcegraph is quite difficult (it's a Gitlab style
deployment with a lot of moving parts and third-party things that it
bundles).

If we decide to keep it around, we will want to look at packaging it
in Nix in the future.

Deployment:

The deployment is a hack. Sourcegraph does not support public
instances, but we want it to be public. To work around this we have
configured HTTP-proxy based authentication (i.e. auth via a header)
and hardcoded a static header.

This works, but lets anonymous users change the "Anonymous" user's
settings. We can expect this to get defaced (profile picture, name
etc), until we figure out how to write some nginx configuration to
drop those requests. See git-bug for details.

The Sourcegraph configuration is also not checked in to the
repository. It's unclear where in the data directory it is stored.

Change-Id: I414ff11c3b49989b6792d697bffc8a0edf96c9cb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/425
Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-06-16 13:40:49 +00:00
Vincent Ambo
ba945dadf8 chore(camden): Disable Hound
Change-Id: Id732f7e2dbc43b2c530a9475499b0dfebff9b273
Reviewed-on: https://cl.tvl.fyi/c/depot/+/424
Reviewed-by: tazjin <mail@tazj.in>
2020-06-16 13:40:49 +00:00
Vincent Ambo
929bb840a6 feat(tazjin/camden): Regularly back up Gerrit to GCS
This configures a timer that will push hourly, incremental backups of
Gerrit's state (including repositories) to GCS.

The GCS bucket tvl-fyi-backups is an Archive-class bucket in the
tazjins-infrastructure project.

Change-Id: I3bb5b084d8dd929bc4c3e51ddfb524b78d9445cb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/397
Reviewed-by: glittershark <grfn@gws.fyi>
2020-06-16 01:19:07 +00:00
Vincent Ambo
c26ee5a448 feat(fun/uggc): Install desktop handler in Nix derivation
This actually registers the desktop entry, so xdg-open etc. start
working:

tazjin@frog /depot> xdg-open 'uggcf://gjvggre.pbz/alnabgrpu/fgnghf/1272363652679524352'
Opening in existing browser session.

Change-Id: Ia754cb87470fce2f8d3340d1147f3f01b9914858
Reviewed-on: https://cl.tvl.fyi/c/depot/+/387
Reviewed-by: riking <rikingcoding@gmail.com>
2020-06-15 18:39:05 +00:00
Vincent Ambo
5f9f6a404f chore(users/tazjin): Move my avatar to my folder
Change-Id: If05860cd975f20c6d8fec301cabcc80d49d0dcda
Reviewed-on: https://cl.tvl.fyi/c/depot/+/344
Reviewed-by: tazjin <mail@tazj.in>
2020-06-14 21:32:02 +00:00
Vincent Ambo
f6c7c85d94 chore(users/tazjin): Remove offlineimaprc
I use lieer these days.

Change-Id: I76ec4654c9d18abbbb28e51d53fca549afde056d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/258
Reviewed-by: tazjin <mail@tazj.in>
2020-06-14 16:59:19 +00:00
Vincent Ambo
566ac0c85f feat(tazjin/dotfiles): Update msmtprc for lieer configuration
Change-Id: I4e2fa960b904dc558904e3df94669513c4163312
Reviewed-on: https://cl.tvl.fyi/c/depot/+/247
Reviewed-by: tazjin <mail@tazj.in>
2020-06-14 04:30:19 +00:00
Vincent Ambo
636372991a chore(users/tazjin): Add OWNERS file
I own this, okay?

Documentation for this file syntax is at https://gerrit.googlesource.com/plugins/owners/+/refs/heads/stable-3.1/owners-autoassign/src/main/resources/Documentation/config.md

Change-Id: If4e6430bdb2d27f31727b5169ce8b82c08ec8de2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/246
Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-06-14 02:15:30 +00:00
Vincent Ambo
268729083e refactor(ops/nixos): Move my NixOS configurations to //users/tazjin
NixOS modules move one level up because it's unlikely that //ops/nixos
will contain actual systems at this point (they're user-specific).

This is the first users folder, so it is also added to the root
readTree invocation for the repository.

Change-Id: I546c701145fa204b7ba7518a8a56a783588629e0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/244
Reviewed-by: tazjin <mail@tazj.in>
2020-06-13 23:52:35 +00:00