Commit graph

16647 commits

Author SHA1 Message Date
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
Luke Granger-Brown
e115e58f9c fix(3p/gerrit): fix left padding on account chip
We don't have an avatar provider at the moment, so it's wonky. I'll make
this a CL upstream as well once my work laptop has charged.

Change-Id: I79754560b2de6981508ba7e10faf6b50cb9c3f8f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2266
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-12-20 16:10:40 +00:00
Luke Granger-Brown
bbfcc7bbf0 chore(3p/gerrit): bump to latest version deployed on gerrit-review
Change-Id: I0aee39b21346f378964bab69bd903e8f43b7e7e8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2265
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-12-20 16:10:40 +00:00
William Carroll
983b0fb276 Solve the Linked List questions
I did these during my flight from LON->NYC without wifi. I managed to get both
correct on the first attempt although I did not find the *optimal* solution for
"Reorder List". IMO "Reorder List" is the best Linked List question I've seen
because it covers a few essential Linked List tricks.
2020-12-18 19:55:18 +00:00
William Carroll
039e712656 Nest URLs beneath TODO entries
Tidying things up.
2020-12-18 14:41:26 +00:00
William Carroll
fd6029db69 Update remaining LC questions
Looks like I should prioritize the following topics:
- Dynamic Programming
- String
- Graph

Although I'm not sure how common DP questions are in interviews, DP is a useful
dragon to slay IMO.
2020-12-18 09:43:54 +00:00
William Carroll
9610ae5f5b Update Linked List LC questions
Snapshot my progress with Linked Lists...
2020-12-18 09:40:05 +00:00
William Carroll
88a22aba3d Update LC String questions
Looks like I have a few string questions to solve before closing that chapter.
2020-12-18 09:38:23 +00:00
William Carroll
262a0b45fb Mark LC Tree questions as done
Making sure that this document closely approximates the state of my LC
progress.
2020-12-18 09:36:28 +00:00
William Carroll
a30bc0f21d Create offline, org file from TeamBlind LC questions
TeamBlind.com hosts a curated list of DS&As questions from LeetCode.com that the
author claims appropriately samples the topics worth exploring. I'm creating an
offline list so that I can track my progress and work while I'm traveling.
2020-12-18 09:31:50 +00:00
Griffin Smith
fea146deb5 fix(gs/yeren): Increase fd soft limit to 65535
I'm building a database! I have to open all the files!

Change-Id: Ie77ad6fafe837c0ddba6b5d56cdc06d787807d4e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2257
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-12-15 23:59:22 +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
316a4fa1e0 fix(3p/notmuch): Rebase dottime patch on notmuch 0.31
Change-Id: I43e8f59cd7f58b9c8b501983edbe55a3cb2f20d0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2241
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 19:41:30 +00:00
Griffin Smith
6197e4bc81 fix(gs/system): Prefer cache.nixos over whitby
cache.nixos.org is way faster

Change-Id: If6f9a448b5a5ad7dab6d01e19c447e113a8d933a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2256
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
e9e7ecfd59 feat(gs/emacs): Bring back org-clubhouse
Change-Id: Id89bd99740b7761c092a923912b07917b56f4d55
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2255
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
a2c03cc78b feat(gs/yeren): Re-enable rc6 and psr
These didn't appear to be the source of the flickering after all.

Change-Id: Id3cce3e7905d0af21dc6ec4dc3a11828451378fe
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2254
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
d6f11af7eb feat(gs/emacs): Update for latest doom changes
Change-Id: I771ada41a64961da9969d0ce805943698d2c9a31
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2253
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
4e263520d6 feat(gs/yeren): Install a bunch of packages
Change-Id: Ie70a91f0efa2560a3ad088648f72e8a30451cbfe
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2252
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
436855d9b8 refactor(gs/system): Use tokei instead of loc
Change-Id: Id14865dd329df476fb209f586200928beea3e6e0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2251
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
c038ce07ee feat(gs/system): Setup sccache for rust
Change-Id: Id102a25013d6a99f3db4f082a9feee87eadcd523
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2250
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
4256c2aea9 fix(gs/yeren): Split audio interface sources
Split the 6 channels of input I have from my audio interface into 2
separate channels for inputs 1 and 2, so that I can have only the one
microphone feed into video chat apps.

The way this is done right now is less than ideal as it doesn't support
any sort of hotplugging - at some point, I should figure out the
appropriate udev invocations to make that work.

Change-Id: I53dc363173fa8db591b0e9cb08258d90835c1109
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2249
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
2123c1f570 feat(gs/emacs): Move all rust-specific stuff to rust.el
Change-Id: I50fa50745dfc60c6487108f50d57f1fde97ad920
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2248
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
ddf58ee319 fix(gs/emacs): general.el bindings take an arg now
Change-Id: Ie9e808a4447e5de1cfe4cb53ca047bbafe544512
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2247
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
02585bb198 feat(gs/emacs): Use rg over git grep
Change-Id: I8704a333918b0f907563ec91d500c5a9638c502a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2246
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
bc5392e909 feat(gs/system): Bring back scratch buffer bindings
More bindings that existed in the default i3 config but I had never
explicitly specified.

Change-Id: I57de0d3221afac299da9a09224564571037f67fa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2245
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
bcea9cd0b3 feat(gs/system): Init roswell
An ec2 node I'm using as a remote dev box

Change-Id: I7d81371ecdc11d6c1b5bc06d1b4f55de534d25ad
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2244
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-12-14 18:18:19 +00:00
Griffin Smith
3f9bd60d85 feat(gs/emacs): Setup rust
Change-Id: I98e2badbaec523e509a2d311a13d8d2d81f4cda8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2222
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-12-14 18:18:19 +00:00
Griffin Smith
23f1bac044 fix(gs/emacs): Undefine SPC / earlier
Change-Id: I405403a39f31041e9c50cdbea7ec55efeff8722c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2221
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-12-14 18:18:19 +00:00
Griffin Smith
43355f1f92 feat(gs/system): Add some rust aliases
These take precedence over cabal old-style aliases, since those aren't
used anymore

Change-Id: Iad1593bffb35d8f7b9c7df16c7c2da09a6ebb906
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2220
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-12-14 18:18:19 +00:00
Griffin Smith
cdedcc6238 feat(gs/system): Setup fingerprint scanner
This is kinda nifty

Change-Id: I1b9a6762a5349974f539d2c4938a2b3dcdf488ad
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2219
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-12-14 18:18:19 +00:00
William Carroll
1cff020d66 Show Morning and Evening habits by default
Now that I've deployed this, and I have an iPad running in kiosk mode, I
realized that I'd like to show my morning routine and my evening routine.
2020-12-13 15:14:19 +00:00
William Carroll
27585cd874 Update Sunday and Morning chains
Adapting to changes.
2020-12-13 15:13:18 +00:00
William Carroll
894615af52 Add -r to cp to copy the directory
This should be the last hold-out before deploying habit-screens! :)
2020-12-13 14:25:18 +00:00
William Carroll
f99b61305b Commit compiled file, output.css to habit-screens
As you can see, I was previously `.gitignore`-ing this file, but because my
`default.nix` attempts to `cp output.css`, I need that file available.
2020-12-13 14:16:14 +00:00
William Carroll
6b9eae2fa3 Productionize habit-screens
At some point I should document or write a script for how I package Elm projects
with Nix to be deployed on my website. For now, I'm modeling everything after my
previous success LearnPianoChords.
2020-12-13 13:33:49 +00:00
William Carroll
e3c72f3fd6 Add project-local .gitignore
Since the `default.nix` file is specific to my tooling, I'm ignoring it.
2020-12-12 02:59:49 +00:00
William Carroll
cc4f67c388 Add usage instructions to top-level README
Also delete redundant `README` from `server` directory.
2020-12-12 02:49:49 +00:00
William Carroll
8c5e4e77ed Expose functions at API layer
Creating a simple HTTP RESTful API for exposing our `Server.semiprime`
function. It supports some help messages, primitive parsing and error handling,
and singular vs. batch processing of arguments.

For more sophisticated parsing and error-checking, I prefer to use Haskell's
Servant library.
2020-12-12 02:43:40 +00:00
William Carroll
45877a8b9c Include cache hit/miss info in return type
This can be useful downstream for diagnostics.
2020-12-12 02:43:35 +00:00
William Carroll
1a404a58de Expand 10^5 in README
I think it's more readable this way.
2020-12-12 02:41:09 +00:00
William Carroll
686766929a Simple Math tests
Calling `assert` within the `Enum.map` makes the errors more usable.
2020-12-12 01:36:22 +00:00
William Carroll
ee96a818e1 Define Server.semiprime
- Clear the boilerplate that `mix` generated
- Consume `Math.factor` to test which inputs are semiprimes
- Cache all inputs that are semiprimes as soon as we discover that they are
- semiprimes

I considered a couple things related to the Cache:
- Could save space by storing all semiprime factors in a tree. This would make
  the lookups more expensive. Also because the tree's depth would never exceed
  two (because all semiprimes only have two factors), the tree would be quite
  broad, and we may not be saving enough space for the trade to be worthwhile. I
  might be wrong about that though.
- We could consider pre-computing all semiprimes when we start the app, but
  without running some tests firsts, I'm not sure whether or not it's worth the
  trouble.
2020-12-12 01:32:31 +00:00
William Carroll
ab73220280 Define Cache.{list,clear} to help debugging
Since I'm often using `iex` for interactive development, these functions are
useful.
2020-12-12 01:31:51 +00:00
William Carroll
714ec29743 Define Cache and convert app to OTP
Define a simple in-memory key-value store for our cache.

TL;DR:
- Define `Cache` as a simple state-keeping `Agent`
- Define `Sup`, which starts our Cache process
- Define `App`, which starts our Supervisor process
- Whitelist `App` in `mix.exs`, so that it starts after calling `iex -S mix`
2020-12-12 01:04:39 +00:00
William Carroll
c0a88ba7d5 Add moduledoc to Extras
9 out of 10 doctors agree that every module needs a doc. Ask your doctor if
moduledocs are right for you!
2020-12-11 22:48:12 +00:00
William Carroll
9e2fbfde8e Move the habit-screens project into //website
I'd like to eventually deploy this to wpcarro.dev. Coming soon!
2020-12-11 22:47:04 +00:00
William Carroll
3feb8ceb9a Delete //website/habits
Accommodating space for my habit-screens project.
2020-12-11 22:46:37 +00:00
William Carroll
90035da32e Delete //website/habitgarden
This is change #2 in a series of other larger changes...
2020-12-11 22:45:39 +00:00
William Carroll
381c344563 Delete //website/days-of-week-habits
This is one small change in a series of other, larger changes.
2020-12-11 22:45:14 +00:00
William Carroll
1eab926121 Define stubbed default.nix
In case I want to package this project with Nix. For now, it's useful to store
this at the project root because it help my Emacs's `project-find-file`
function.
2020-12-11 22:43:53 +00:00