about summary refs log tree commit diff
path: root/users/sterni (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-12-26 r/3444 feat(sterni/aoc/2021): don't split on consecutive occurrences of 𝕨sterni1-1/+1
Change-Id: I2ab17e0238df297f580c45bc28914c6dfd0ce848 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4680 Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2021-12-25 r/3409 feat(sterni/aoc/25): day 25 part 1 solutionsterni1-0/+20
Change-Id: I8ffefd2b85e595bdae2cfb2bf7b34ea63b82c457 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4627 Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2021-12-25 r/3390 feat(sterni/aoc/2021): day 20 solutionsterni1-0/+29
Change-Id: Id864d6e6f0722c2da5d3487bd38da80e6bff2161 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4566 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-12-25 r/3389 feat(sterni/aoc/2021): day 6 solutionsterni1-6/+21
Change-Id: Icd21b0f0c92b596fbb369d6f08715a6554259572 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4558 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-12-21 r/3330 chore(users/sterni): remove feeds I don't read or find the time forsterni1-5/+0
Change-Id: Id9d6582de2a95f770c7d734ec5d7baad2293e522 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4518 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: sterni <sternenseemann@systemli.org>
2021-12-16 r/3265 feat(sterni/aoc/2021): day 15 solutionsterni1-0/+35
Change-Id: Idca2ae2829a7ee9e856aa7fcdc716c3055051062 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4363 Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2021-12-16 r/3264 chore(sterni/aoc/2021): add shell for running solutions.bqnsterni1-0/+10
Change-Id: I2e192dec9eb863a1b2386d40d26eeeeb57e1ed28 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4350 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-12-15 r/3263 feat(sterni/aoc/2021): day 14 solutionsterni1-0/+33
Change-Id: I8b6c0c5d1ced89eadaeea3fb619d37e77a439965 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4349 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-12-15 r/3262 refactor(sterni/aoc/2021): fold over 2d array instead of nested liststerni1-1/+1
Seems to save some allocations and thus recover some performance compared to the two separate folds we had before. Change-Id: Ie3d283103e6a9b8aa702db633d9c988fda1b2903 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4348 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-12-14 r/3241 feat(users/sterni/emacs): provide BQN interpreter via Nixsterni2-4/+24
For this we create a directory containing a nix-inject.el file using writeTextFile where we can string interpolate as much as we please and merge that into a single emacs.d directory with the config *.el files tracked in the normal tree using symlinkJoin. Change-Id: I0e39591587a54527214783d4380456d2763da091 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4324 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: sterni <sternenseemann@systemli.org>
2021-12-14 r/3238 refactor(sterni/aoc/2021): use a fold instead of last scan elementsterni1-1/+1
We can use the reverse swap trick to get a forward fold. Change-Id: I88185e2ff0b41ec1454f414db2d24b1c8173ac2d
2021-12-14 r/3230 refactor(sterni/aoc/2021): determine width/height in the same foldsterni1-2/+1
Change-Id: I39410171402cedc3ee8d9ac972557656ed12de53
2021-12-13 r/3229 feat(sterni/aoc/2021): day 13 solutionsterni1-0/+60
Change-Id: I9cfa8a28854cbee7e8e1b457faf9c572353e803f
2021-12-13 r/3228 refactor(sterni/aoc/2021): name input data more consistentlysterni1-17/+17
Change-Id: Ibcea43d2e51f14d8b1b021050310f88d44d970d3
2021-12-13 r/3225 feat(sterni/aoc/2021): day 9 solutionsterni1-0/+38
Change-Id: I90e7a47d5418abeff1ae7cc5757b6a8b3b0d1086
2021-12-13 r/3224 feat(sterni/aoc/2021): day 7 solutionsterni1-0/+29
Change-Id: I8c8b535defb42f15eafc816ebe953e51b11ea702
2021-12-13 r/3223 feat(sterni/aoc/2021): day 3 solutionsterni1-0/+51
Change-Id: Id14281f7b18ddaf6875e5dd8398249a10a9474af
2021-12-13 r/3222 refactor(sterni/aoc/2021): allow variable bases ≤ 10 for ReadIntsterni1-3/+4
Change-Id: Ie035134a4b3d478ce836aa00016122e0f49a5a28
2021-12-13 r/3221 feat(sterni/aoc/2021): day 2 "solution"sterni1-3/+41
Change-Id: Ifbd50274f0b09305991a49e7453ac1f13089e57e
2021-12-01 r/3129 feat(sterni/emacs): subscribe to the TVL feedsterni1-0/+1
Change-Id: Iac08e992a4c610a6f152c1dc5e681b17298b8834
2021-12-01 r/3128 feat(sterni/aoc/2021): day 1 solutionsterni2-0/+32
Change-Id: I0781b2aa3624df9a3158296edcbbbf2ee845102b
2021-11-25 r/3094 feat(sterni/nix/utf8): check if codepoint valid/encodeablesterni2-4/+42
* Enforce the U+0000 to U+10FFFF range in `count` and throw an error if the given codepoint exceeds the range (encoding U+0000 won't work of course, but this is Nix's fault…). * Check if the produced bytes are well formed and output an error if not. This indicates that the codepoint can't be encoded as UTF-8, like U+D800 which is reserved for UTF-16. Change-Id: I18336e527484580f28cbfe784d51718ee15c5477
2021-11-25 r/3092 refactor(sterni/nix/utf8): let wellFormedByte check first bytesterni1-17/+14
Previously we would check the first byte only when trying to figure out the predicate for the second byte. If the first byte was invalid, we'd then throw with a helpful error message. However this made wellFormedByte a very weird function. At the expense of doing the same check twice, we now check the first byte, when it is first passed, and always return a boolean. Change-Id: I32ab6051c844711849e5b4a115e2511b53682baa
2021-11-25 r/3091 feat(sterni/nix/utf8): implement UTF-8 encodingsterni2-2/+83
This implementation is still a bit rough as it doesn't check if the produced string is valid UTF-8 which may happen if an invalid Unicode codepoint is passed. Change-Id: Ibaa91dafa8937142ef704a175efe967b62e3ee7b
2021-11-25 r/3090 chore(sterni/nix/utf8): remove decodeSafesterni1-14/+0
This is not really used anywhere and kind of useless. A better decodeSafe would never return null and instead make use of replacement characters to represent invalid bytes in the input. Change-Id: Ib4111529bf0e472dbfa720a5d0b939c2d2511de5
2021-11-23 r/3086 feat(sterni/nix/utf8): allow decoding the empty stringsterni2-3/+3
Change-Id: I8de9cd28c822ac5befbcd16e118440cd13cd86e9
2021-11-23 r/3085 refactor(sterni/nix/utf8): use genericClosure for decoding iterationsterni1-23/+46
builtins.genericClosure is a quite powerful (and undocumented) Nix primop: It repeatedly applies a function to values it produces and collects them into a list. Additionally individual results can be identified via a key attribute. Since genericClosure only ever creates a single list value internally, we can eliminate a huge performance bottleneck when building a list in a recursive algorithm: list concatenation. Because Nix needs to copy the entire chunk of memory used internally to represent the list, building big lists one element at a time grinds Nix to a halt. After rewriting decode using genericClosure decoding the LaTeX source of my 20 page term paper now takes 2s instead of 14min. Change-Id: I33847e4e7dd95d7f4d78ac83eb0d74a9867bfe80
2021-11-16 r/3072 chore(nixpkgs-crate-holes): whitelist more maintainerssterni1-0/+3
Change-Id: I6ed03ff8cbc590087cfa58264c0c28a7b1496740 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3825 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2021-11-10 r/3034 feat(nixpkgs-crate-holes): cc maintainers allowed by a whiteliststerni2-3/+19
Change-Id: Iffbe173a48b466c52669efc70f9b5e5d4a6aff9a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3730 Tested-by: BuildkiteCI Reviewed-by: Alyssa Ross <hi@alyssa.is> Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-12 r/2969 feat(nixpkgs-crate-holes): report vulnerable crates in cargoDepssterni2-0/+326
nixpkgs-crate-holes can build a markdown report detailing all vulnerable crates pinned in cargoDeps vendors in nixpkgs according to RustSec's advisory db. This report is intended to be pasted into a GitHub issue. The report is produced by a derivation and can be obtained like this: nix-build -A users.sterni.nixpkgs-crate-holes.full \ --argstr nixpkgsPath /path/to/nixpkgs Example output: https://gist.github.com/sternenseemann/27509eece93d6eff35cd4b8ce75423b5 Additionally, you can obtain a more verbose report for a single attribute of nixpkgs, in HTML format since we just reuse the command line output of cargo-audit and convert it to HTML using ansi2html: nix-build -A users.sterni.nixpkgs-crate-holes.single \ --argstr nixpkgsPath /path/to/nixpkgs --argstr attr ripgrep Change-Id: Ic1c029ab67770fc41ba521b2acb798628357f9b2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3715 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-11 r/2964 feat(users/sterni/emacs): enable jq-modesterni2-0/+3
Change-Id: I943343af92665897e2ebc556f3984a2f8ede9a23 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3723 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-30 r/2936 feat(users/sterni/emacs): tag noisy feeds for filtering outsterni1-1/+1
Change-Id: I45cc10aaa7bfc7561ef25978c71248659ce6579d Reviewed-on: https://cl.tvl.fyi/c/depot/+/3652 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2021-09-30 r/2935 chore(users/sterni/emacs): dnkl sends out release emails nowadayssterni1-1/+0
Change-Id: Ib2d7c0c8db8a6a579985b8c84739c72b8e8e395b Reviewed-on: https://cl.tvl.fyi/c/depot/+/3651 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2021-09-15 r/2859 feat(users/sterni/emacs): enable rust modesterni2-0/+2
Change-Id: I49c8f5c0c18ac7664f5f120ad23a55c3bc19bd5b Reviewed-on: https://cl.tvl.fyi/c/depot/+/3545 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-12 r/2854 feat(sterni/mblog): convert apple note mime msgs to htmlsterni5-0/+250
For now mblog only contains the mnote-html executable which takes a mime message from a maildir and prints the equivalent HTML fragment to stdout. It is intended to work with the mblaze(7) utilities, i. e. mnote-html resolves all `object` tags to proper `img` inclusions with the correct filename, so mshow(1)'s -x version can supply the needed image files. A note created using Apple's Notes app (tested with the iOS version) can be converted in a viewable HTML file like this: $ mnote-html path/to/msg > fragment.html $ mshow -x path/to/msg $ cat <(echo "<!DOCTYPE html>") fragment.html > document.html $ xdg-open document.html Note that only the limited feature set of Apple Notes when using the IMAP backend is supported. The iCloud-based one has more (quite neat) features, but its notes can only accessed via an internal API as far as I know. This CLI is a bit impractical due to the big startup overhead of loading the lisp image. mblog should be become a fully fletched static site generator in the future, but this is a good starting point and providing the mnote-html tool is certainly useful. Change-Id: Iee6d1558e939b932da1e70ca2d2ae75638d855df Reviewed-on: https://cl.tvl.fyi/c/depot/+/3271 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-12 r/2851 feat(users/sterni/nix/string): very simple printf implementationsterni2-0/+45
This is mostly to yet another silly idea which turns out to be possible. This may be actually useful should I implement more sophisticated format specifiers like "%xd" or "%f". Change-Id: Ia56cd6f5793a09fe5e19c91a8e8f9098f3244d57 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3537 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-10 r/2833 chore(nint): move from //users/sterni to //nixsterni3-209/+0
Since //web/bubblegum depends on nint, we need to move it to a non user directory to conform with the policy established via cl/3434. Note that this likely doesn't mean greater stability (which isn't really implied in depot anyways), since I still would like to use a more elaborate calling convention to allow for additional useful features. Change-Id: I616f905d8df13e3363674aab69a797b0d39fdd79 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3506 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-09-09 r/2832 refactor(sterni/emacs): read extra feeds from ~/.config/emacs-extrasterni1-79/+84
This allows me to add stuff without doing a commit for every feed. I can always import them in bunches if I want to later. Change-Id: I080f40b3627940a1f68cf13598c102953f4994b1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3505 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-09 r/2828 feat(users/sterni/emacs): install bqn-modesterni2-0/+4
Change-Id: I8429f09525e7ca78893b62f6efb8037687ac36a3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3494 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-09 r/2827 feat(users/sterni/emacs): subscribe to eta's honkingsterni1-0/+1
https: //www.youtube.com/watch?v=nH4Gr2U50i8 Change-Id: Iaf998cee07325900272f1fef29478f724b19fe34 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3501 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-01 r/2816 feat(users/sterni/emacs): add (mostly) lisp related feedssterni1-0/+3
Change-Id: I79d30e4e5cbe41fcd0f4a751ed08d12541b453eb Reviewed-on: https://cl.tvl.fyi/c/depot/+/3487 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2021-08-30 r/2801 chore(3p): update NixOS channels to 2021-08-30sterni1-7/+12
This lets us benefit from the recent OpenSSL security-related update [1]. Since nixos-unstable is still stuck, we temporarily use nixos-unstable-small as our unstable channel. Fixes necessary: * //users/sterni/nix/char: Someone has decided to drop writers.writeC upstream [2], so we reimplement it ad-hoc using runCommandCC [1]: https://www.openssl.org/news/secadv/20210824.txt [2]: https://github.com/nixos/nixpkgs/commit/982f46985e37a6488d8e904b46e0cba2060adc71 Change-Id: Id84756e2e370296b7a27e1a3f1744f58f8fe3c47 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3463 Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-08-26 r/2785 feat(users/sterni/emacs): add ariadne conill's blog to subscriptionssterni1-0/+1
Change-Id: I6d5935279069c8af7e7a5f21f9d221c93a533d8e Reviewed-on: https://cl.tvl.fyi/c/depot/+/3428 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-08-26 r/2784 feat(users/sterni/nix): cursed nix html DSLsterni3-0/+351
Couldn't sleep, so I made a surprisingly neat way to render HTML documents in Nix using our favorite feature __findFile: let inherit (depot.users.sterni.nix.html) __findFile esc; in <html> {} [ (<head> {} [ (<meta> { charset = "utf-8"; } null) (<title> {} (esc "hello")) ]) (<body> {} [ (<h1> {} (esc "hello world")) ]) ] => "<html><head><meta charset=\"utf-8\"/><title>hello</title></head><body><h1>hello world</h1></body></html>" Change-Id: Id36808a56ae3da3b5263c06f29342fc22d105c21 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3410 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-24 r/2771 feat(nix/buildLisp): add eclsterni1-1/+4
Adds ECL as a second supported implementation, specifically a statically linked ECL. This is interesting because we can create statically linked binaries, but has a few drawbacks which doesn't make it generally useful: * Loading things is very slow: The statically linked ECL only has byte compilation available, so when we do load things or use the REPL it is significantly worse than with e. g. SBCL. * We can't load shared objects via the FFI since ECL's dffi is not available when linked statically. This means that as it stands, we can't build a statically linked //web/panettone for example. Since ECL is quite slow anyways, I think these drawbacks are worth it since the biggest reason for using ECL would be to get a statically linked binary. If we change our minds, it shouldn't be too hard to provide ecl-static and ecl-dynamic as separate implementations. ECL is LGPL and some libraries it uses as part of its runtime are as well. I've outlined in the ecl-static overlay why this should be of no concern in the context of depot even though we are statically linking. Currently everything is building except projects that are using cffi to load shared libaries which have gotten an appropriate `badImplementations` entry. To get the rest building the following changes were made: * Anywhere a dependency on UIOP is expressed as `bundled "uiop"` we now use `bundled "asdf"` for all implementations except SBCL. From my testing, SBCL seems to be the only implementation to support using `(require 'uiop)` to only load the UIOP package. Where both a dependency on ASDF and UIOP exists, we just delete the UIOP one. `(require 'asdf)` always causes UIOP to be available. * Where appropriate only conditionally compile SBCL-specific code and if any build the corresponding files for ECL. * //lisp/klatre: Use the standard condition parse-error for all implementations except SBCL in try-parse-integer. * //3p/lisp/ironclad: disable SBCL assembly optimization hack for all other platforms as it may interfere with compilation. * //3p/lisp/trivial-mimes: prevent call to asdf function by substituting it out of the source since it always errors out in ECL and we hardcode the correct path elsewhere anyways. As it stands ECL still suffers from a very weird problem which happens when compiling postmodern and moptilities: https://gitlab.com/embeddable-common-lisp/ecl/-/issues/651 Change-Id: I0285924f92ac154126b4c42145073c3fb33702ed Reviewed-on: https://cl.tvl.fyi/c/depot/+/3297 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: eta <tvl@eta.st>
2021-08-24 r/2756 chore(users/sterni/emacs): fix typosterni1-1/+1
Thanks tazjin! Change-Id: I3c742e832bbc98fbf4112a7bea367d013a2ef722 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3401 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-08-24 r/2755 feat(users/sterni): add emacs configurationsterni3-0/+296
Change-Id: Icbdb52ba5ea51e8594eb46c5f0740e4f7c353be4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3381 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-24 r/2547 chore(nix): move rustSimple from users.Profpatsch.writersProfpatsch2-2/+2
I think it’s solid enough to use in a wider context. Change-Id: If53e8bbb6b90fa88d73fb42730db470e822ea182 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3055 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi>
2021-04-12 r/2495 feat(sterni/nix/fun): add hasEllipsissterni2-0/+43
As a complementation to builtins.functionArgs this function checks if the function has a set pattern that contains an ellipsis (i. e. `{ [arg, [ arg1, [ … ]]] ... }:`). The implementation of this is pretty cursed however since there is no clean way to do this in vanilla nix: We need to match on the output of builtins.toXML which does try to serialize functions by outputting their argument and information about it (whether it is a normal argument or a attribute set pattern, in the latter case it also serialize every component of the pattern). Change-Id: I0f33721811a3180cec205a0c98e6d92e10e92075 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2950 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-10 r/2460 refactor(sterni): use pkgs over third_party to import from nixpkgssterni1-2/+2
This should ease migrating to a distinction between depot.third_party and pkgs (as in nixpkgs) in the future. Ref cl/2910, b/108. Change-Id: I53a854071fddd7c0d0526cc4c5b16998202082c6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2913 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>