about summary refs log tree commit diff
path: root/users/wpcarro/scratch (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-01-19 r/5704 feat(wpcarro/slx.js): Support JavaScript simple-select implWilliam Carroll2-381/+0
See README.md Change-Id: I6a50e34398c42aabe3cceba160be006f1867eca4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7874 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2023-01-17 r/5682 feat(wpcarro/slx): Support filtering by dateWilliam Carroll1-10/+60
Queries like `before:"03/05/2020` Change-Id: I34b06f38c8f3abeed9ad6824cd365065a1fe8d2b Reviewed-on: https://cl.tvl.fyi/c/depot/+/7831 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2023-01-17 r/5681 feat(wpcarro/slx): Match against all columnsWilliam Carroll1-6/+55
With `MATCH_ALL` type. Change-Id: I2fe537c2b277a86be5c04a27da088f31fe7eb09e Reviewed-on: https://cl.tvl.fyi/c/depot/+/7817 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com>
2023-01-17 r/5680 feat(wpcarro/slx): Simple Select impl'd in JSWilliam Carroll2-0/+282
Proof-of-concept implementation of "simple select" to write browser apps that can filter lists with labels like: ``` author:Hemingway title:For\sWhom.+ ``` Change-Id: I6c4cc65fe6319c9230fdc1e983462864acdc6aef Reviewed-on: https://cl.tvl.fyi/c/depot/+/7812 Reviewed-by: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-10-25 r/5197 feat(wpcarro/compiler): Support Vector typeWilliam Carroll5-95/+192
Support an array that dynamically resizes itself, and replace usages of `List`, `Array`, and `Queue` with `Vec`. Change-Id: I910b140b7c1bdddae40e08f8191986dccbc6fddf Reviewed-on: https://cl.tvl.fyi/c/depot/+/7080 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com>
2022-10-25 r/5196 feat(wpcarro/compiler): Support string literal typeWilliam Carroll3-5/+34
``` repl> "Hello, world" String repl> (fn x "testing") a0 -> String ``` Change-Id: Ia76299a56aa4d2032c9a21277e2fddfb2e055831 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7079 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com>
2022-10-25 r/5195 refactor(wpcarro/compiler): Modularize debug fnsWilliam Carroll7-85/+91
Define `debug.ml` and `prettify.ml` to clean-up some code. Change-Id: Iee2e1ed666f2ccb5e56cc50054ca85b8ba513f3b Reviewed-on: https://cl.tvl.fyi/c/depot/+/7078 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com>
2022-10-24 r/5194 feat(wpcarro/scratch): Implement "Algorithm W"William Carroll7-1/+658
I've been wanting to grok Haskell-style type inference for awhile, so instead of just watching conference talks and reading papers about it, I've decided to attempt to implement it to more readily test my understanding of it. Change-Id: I69261202a3d74d55c6e38763d7ddfec73c392465 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6988 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com>
2022-10-10 r/5093 feat(wpcarro/scratch): Rewrite Python compiler in OCamlWilliam Carroll4-0/+154
Just to see how productive I could be in OCaml with little familiarity. Overall I really like it. Change-Id: I8affc65a5ee86a29d4f8c01426529ae9948660f9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6934 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-10-10 r/5081 feat(wpcarro/scratch): Proof-of-concept register VMWilliam Carroll1-0/+161
I heard that register VMs might be slightly faster than stack VMs, and then it occurred to me that I wouldn't know how to write a register VM if I tried. So I wrote one (sort of). Change-Id: I15309bca88f4b43f6e04957acedc90d9adf16673 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6902 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-09-06 r/4687 feat(wpcarro/rust): Define Rc<T> exampleWilliam Carroll3-2/+15
My foray into "smart pointer" land. Change-Id: I4ca775c72168dd34d90bf88fa41149867cd7fdae Reviewed-on: https://cl.tvl.fyi/c/depot/+/6244 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com>
2022-08-29 r/4525 feat(wpcarro/rust): Define stdin exampleWilliam Carroll2-6/+24
Pipe Rust strings to shell commands. Change-Id: Id8afeed642d30c79e193fa9b353de081a5843eb5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6197 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-08-09 r/4396 feat(wpcarro/rust): Include std::fmt::Display exampleWilliam Carroll6-50/+123
Gotta know how to `to_string` things Change-Id: I259ef61ecaf6ae7fabe0b3d211706ba5f429b3a7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6057 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-06-27 r/4262 docs(wpcarro/rust): Tidy-up documentation widthWilliam Carroll1-2/+2
Line was too long Change-Id: I62c4454307f89e089f7d4cda0721f6b9d8029ced Reviewed-on: https://cl.tvl.fyi/c/depot/+/5900 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com>
2022-06-27 r/4260 chore(wpcarro/rust): Include Cargo.lockWilliam Carroll1-0/+39
v0v Change-Id: I0ce845e01bdb76e2894322c622919f0a24ffff7e Reviewed-on: https://cl.tvl.fyi/c/depot/+/5899 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com>
2022-06-27 r/4259 feat(wpcarro/rust): Show 3/3 json examplesWilliam Carroll2-1/+38
See git diff Change-Id: Ic3100dbed09775113ddb055e6ba0d5cf900426d0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5898 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-06-27 r/4258 feat(wpcarro/rust): Show 2/3 json examplesWilliam Carroll1-2/+18
Documented in the module Change-Id: I550c233c8116904a1f9cd6841ee778eb0abb540a Reviewed-on: https://cl.tvl.fyi/c/depot/+/5897 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-06-27 r/4257 feat(wpcarro/rust): Show 1/3 json examplesWilliam Carroll2-0/+44
See json/src/main.rs Change-Id: I83ee6b762b741a05932832a9a87eb8161bb95d0f Reviewed-on: https://cl.tvl.fyi/c/depot/+/5896 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-06-27 r/4256 feat(wpcarro/rust): Create a sandbox for learning RustWilliam Carroll3-0/+19
See README Change-Id: I007a4d5c3b840986f6d3bc93aaa72d26daaa9b12 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5895 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-03-01 r/3891 docs(wpcarro/simple-select): Add README 📘William Carroll1-0/+71
Because documentation Change-Id: I1d805331efd5cb3ca878a1b66774d0807f735872 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5349 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-03-01 r/3890 feat(wpcarro/simple-select): Support readline-style KBDsWilliam Carroll1-3/+8
...and prevent REPL from crashing on parse/compilation errors. Better error messaging would be quite nice as well. Change-Id: I47d06fd74ef65bfa3f14f0b57a5516a908321da8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5348 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-03-01 r/3889 fix(wpcarro/simple-select): Support regexesWilliam Carroll1-0/+12
The python lib for sqlite doesn't support REGEXP, so we need to support it manually. Change-Id: I90670ff564d6fb40e8cee30c3d1509feb2c00857 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5347 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-03-01 r/3888 feat(wpcarro/simple-select): Support CSVsWilliam Carroll1-10/+26
Convert CSVs to in-memory SQLite tables from which we query. Also read variables from the command-line. For now, I'd say this is MVP-status. Change-Id: I8b7400e60da4b14eea25c3f4b47447497a4218c8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5346 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-03-01 r/3887 feat(wpcarro/simple-select): Execute SQL query on databaseWilliam Carroll1-11/+18
Connect REPL to SQLite for further integration testing. Change-Id: Ie48a68eedf227dcf67d0262dd4672d53bbc6ec86 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5345 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-03-01 r/3886 feat(wpcarro/simple-select): Compile AST to SQLWilliam Carroll1-7/+62
Currently supports the SQLite flavor of SQL. Preliminary testing seems to show encouraging results. Change-Id: Ib2ed6a695352f41185c8e8abdadfd76ce38bdbcc Reviewed-on: https://cl.tvl.fyi/c/depot/+/5344 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-03-01 r/3882 feat(wpcarro/simple-select): Parse query language 🎉William Carroll2-19/+93
Seems to successfully handle inputs like... ``` > (-fname:"William" lname:/C.*l/) OR (fname:"William" -lname:"Carroll") ``` Change-Id: I5277cfbc7d102158eab5e1e71b2d95aaf13508fd Reviewed-on: https://cl.tvl.fyi/c/depot/+/5340 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-03-01 r/3881 feat(wpcarro/simple-select): Define Parser classWilliam Carroll1-0/+28
Copy-paste from monorepo. Change-Id: Iff51fa9b939fe7dec3952077b5764bcc45d96f24 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5339 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-03-01 r/3880 feat(wpcarro/simple-select): support tokenizer for query languageWilliam Carroll2-5/+88
Support a tokenizer for a query language that looks like: ``` -fname:/W.*m/ lname:"Von Carroll" ``` Parser otw... Change-Id: I2badf14a41313ca2f75dec20adbcf9031b22ab83 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5338 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-02-28 r/3879 feat(wpcarro/simple-select): Support basic Scanner classWilliam Carroll2-0/+40
...alongside a small REPL to quickly test the functionality. Change-Id: I3c2b3f060d82cd49488e00dec9b72f7b23e2b666 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5337 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-01-31 r/3723 style: format entire depot with nixpkgs-fmtVincent Ambo3-4/+6
This CL can be used to compare the style of nixpkgs-fmt against other formatters (nixpkgs, alejandra). Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: cynthia <cynthia@tvl.fyi> Reviewed-by: edef <edef@edef.eu> Reviewed-by: eta <tvl@eta.st> Reviewed-by: grfn <grfn@gws.fyi>
2022-01-08 r/3556 feat(wpcarro/scratch): create a proof-of-concept blockchain serverWilliam Carroll3-0/+286
> You cannot get educated by this self-propagating system in which people study > to pass exams, and teach others to pass exams, but nobody knows anything. You > learn something by doing it yourself, by asking questions, by thinking, and by > experimenting. > - Richard Feynman In the spirit of learning by doing, I decided to implement a simple blockchain server. More work remains, but I'm tired after working on this for ~2-3h. I'd like to reimplement this from memory using a statically typed language like Haskell. I'd also like to implement node discovery (https://en.bitcoin.it/wiki/Satoshi_Client_Node_Discovery) because that is still something I don't quite understand. But I'm signing-off for now... Change-Id: I74f424e7f52ffbf81eaad420d7d5205da66d33b5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4802 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com>
2022-01-08 r/3548 feat(wpcarro/cryptopals): Support repeating key cipherWilliam Carroll1-0/+16
I think this is a form of symmetric encryption where the passphrase (e.g. "ICE") is repeated (e.g. "ICEICEICEICEI...") until it matches the length of the cleartext string; after that, the two byte-strings are XOR'd against one another and then encoded as hexadecimal creating the ciphertext. Change-Id: Ib148f06d6c42a41377d1df1f0738d77da935a9f6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4789 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com>
2022-01-08 r/3547 fix(wpcarro/cryptopals): Update cleartext scoring algorithmWilliam Carroll3-11/+45
Create a frequency table of alphabetic characters by reading each character in "Alice in Wonderland"; use this frequency table to score cleartext when decoding ciphers. Change-Id: Id322af64d792c15231a1a02794f396c46196c207 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4788 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com>
2021-12-29 r/3501 feat(wpcarro/scratch): Upload my solutions to cryptopalsWilliam Carroll6-0/+409
More beginner problems/solutions for CTF-style challenges. Change-Id: Ide229e99e3ccc1ede5a5ca1c2ad039498e49ea4c Reviewed-on: https://cl.tvl.fyi/c/depot/+/4740 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2021-12-29 r/3500 feat(wpcarro/scratch): Upload my solutions to picoCTF challengesWilliam Carroll9-0/+107
Just getting my feet wet... Change-Id: Ia1db0c69fe7d5ea5cb5585853d0688ef97f2680a Reviewed-on: https://cl.tvl.fyi/c/depot/+/4739 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2021-12-15 r/3249 fix(wpcarro/nix): Remove <briefcase> referencesWilliam Carroll3-10/+9
Angle-bracketed references are a Nix anti-pattern, and thankfully this repository enforces this as a standard. TL;DR: - Drop angle-bracketed references - Change `briefcase` -> `users.wpcarro` - Fix any resulting regressions - Fix //users/wpcarro/tools/simple_vim - Mark //users/wpcarro/boilerplate/typescript and related projects as broken - drop .skip-subtree file, enabling depot CI Change-Id: I7153cbabafa617bfd6b199370cbec65cb75441f6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4325 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: wpcarro <wpcarro@gmail.com>
2021-12-14 r/3226 subtree(users/wpcarro): docking briefcase at '24f5a642'Vincent Ambo221-0/+13466
git-subtree-dir: users/wpcarro git-subtree-mainline: 464bbcb15c09813172c79820bcf526bb10cf4208 git-subtree-split: 24f5a642af3aa1627bbff977f0a101907a02c69f Change-Id: I6105b3762b79126b3488359c95978cadb3efa789