Age | Commit message (Collapse) | Author | Files | Lines |
|
Taken from the overview:
> I'm making this as an offline reference for some of the commands that I use
> often enough to need to remember but not often enough to *actually* remember.
|
|
Prefer these more human-readable defaults to SQLite.
|
|
The astute observer may notice that the number of entries in db.sqlite3 is fewer
than the number of unwatched movies in imdb-top-250.org. I'm at a lake in
Germany with Mimi and Cullen, so we took the intersection of my unwatched
movies, Mimi's unwatched movies, and Cullen's unwatched movies.
|
|
I needed to add the first step since I dipped into my Emergency fund last month
to pay for someone to prepare my US tax return. I added the other step as a
reminder.
|
|
amount -> amounts
|
|
Back when I owned an iPhone -- before I switched (mistakenly and thus
temporarily) to Android -- I had a note for each year's newly learned words. As
I am condensing as many of my documents as possible into my briefcase, I decided
it is time for including a dictionary.
I can still record words on my phone, and then I can transfer them to this
document.
|
|
In the beginning there existed only a generic //org directory... This directory
was generic enough to include any .org file regardless of its purpose, but
specific enough to disallow membership of other worthy files of the Markdown
ilk.
Then came the //playbooks directory, which robbed //org of most of its
inhabitants...
In the interim various .md and .org TODO lists existed scattered across the
landscape of the monorepo... some existed in far-away, exotic lands like
"travel-histlist"... These fractious tribes shared much in common with their
distant relatives, but the superficial differences granted the simple-minded,
draconian filesystem license to prevent them from mingling.
Then one day the monorepo had a new visitor: //todo-lists.
//todo-lists restored order to the monorepo, uniting all of the fractious
documents under one roof.
.md and .org files held hands and sang Kumbaya around a blazing fire for the
first time in history. All was well, and all were happy.
|
|
I'm particularly excited about this idea. As I was reading Graham's "Erase your
darlings" blog post, I had an idea: I should have playbooks at the root of my
monorepo.
I can have playbooks for the following:
- How to install NixOS
- How to build GCR images from Nix expressions
- A collection of miscellaneous shell commands (e.g. "how to kill a process by name")
- What series of steps should I follow when I receive a paycheck
I already keep README's at the root of each package, which I think is where many
of these instructions belong. Other tutorials that I write for myself that do
not belong to any package can go in //playbooks. I also will host my personal
habits in //playbooks since habits are a bit like playbooks for life. Let's see
how this idea ages as the caffeine wears off...
|
|
Optimizing is difficult: I like flat hierarchies because I don't like
directory-hopping, but I also would like a cleaner root for my mono-repo. Bombs
away!
Well it's that time again, folks: spring cleaning!
Here I am musing about a few things that bother me:
- Should I use kebab-case or snake_case?
- It feels ~confusing to have //tools and //utils. What a //projects? Isn't
everything a project? *sigh*
|
|
Because every library/package deserves a README.
|
|
Also rename it advent-of-code-2019 since I expect to participate this year as
well.
TODO: Should directories and files be name like-this or like_this?
|
|
Inconveniently, I do not have the cipher code that I wrote from a previous
chapter, and I'm not eager to reimplement it.
TODO
- Implement encrypt
- Implement decrypt
- Read all characters from STDIN
|
|
This is taking up too much space.
|
|
- Add new entries
- Change quantities of existing entries
|
|
I was instructed to benchmark these functions, but I couldn't get the
benchmarking library to run using Nix -- although I'm *sure* it's
possible. Unfortunately the book recommends using `stack`, which I couldn't
reproduce.
|
|
I completed most of the exercises for this enlightening chapter in ghci.
|
|
I expect to look back on this code and cringe, but... it compiles!
|
|
Write Functor, Applicative, Monad instances for:
- MaybeT
- EitherT
- ReaderT
|
|
I believe there are two exercises sets in the "Composing Types" chapter. Here
are *some* of my answers so far...
I'm having trouble implementing Foldable for Compose. I was able to implement a
version of it by adding the (Functor f) constraint to the instance signature,
but I think I cheated.
I will revisit these problems as well as the earlier exercises later.
|
|
I stole these bad-boys from @tazjin's config.
|
|
Because revs afa9ca, dc80d7 aren't in the "default" (typically "master") branch
of NixOS/nixpkgs-channels, I need to specify the ref (aka branch) in order for
fetchGit to resolve the rev.
|
|
After growing frustrated with doom-modeline's compatibility with my EXWM setup,
I decided to borrow @tazjin's setup, which I find to be much more appealing.
|
|
Ensure that $NIX_PATH is empty using a .envrc file. nix.dev considers references
to <nixpkgs>, <briefcase>, <depot>, <unstable> to be an anti-pattern because it
hinders reproducibility by introducing an implicit environment.
This repository is chock-full of references to
<{nixpkgs,unstable,briefcase,depot}>, so right now everything is broken.
|
|
Thanks to the Nix anti-patterns documented here...
https://nix.dev/anti-patterns/language.html#reproducability-referencing-top-level-directory-with
...I'm cleaning up some of my Nix expressions. Read the article for more
context.
|
|
Refactor the caching policy for the Memo by evicting the elements that have been
the least-recently-accessed.
Python's heapq module default to a min-heap. By storing our heap elements
as (UnixTime, a), we can guarantee that when we call heappop, we will get the
element with the lowest UnixTime value in heap (i.e. the oldest). When we call
heappush, we use (time.time(), key) and these values -- by having the largest
UnixTime, will propogate to the bottom of the min-heap.
|
|
Bound the size of the memo by creating a BoundedQueue. Whenever we add elements
to the BoundedQueue, we remove the oldest elements. We use the BoundedQueue to
control the size of our dictionary that we're using to store our key-value pairs.
|
|
After hearing from a Jane Street recruiter, I decided to dust off some of the
DS&As knowledge. I found this article online, which outlines an example problem
called "Memo":
https://blog.janestreet.com/what-a-jane-street-dev-interview-is-like/
Here's part 1 of the solution in Python.
|
|
Ensure that the export.hs script refers to the .org file.
|
|
It's beautiful how State is just Reader that returns a tuple of (a, r) instead
of just a, allowing you to modify the environment (i.e. state).
```haskell
newtype Reader r a = Reader { runReader :: r -> a }
newtype State s a = State { runState :: s -> (a, s) }
```
|
|
I would've created on at $HOME/.ghci, but I don't need that yet, and I didn't
want to bother with home-manager.
|
|
I feel much more comfortable using `traverse` and `sequenceA`. I even used both
of them in the Haskell program that I wrote at work to export a trix.
|
|
At this point, I'm starting to lose interest.
|
|
Setting `authMode = "Registered"` prevents me from running the `register
<password>` command from inside of `bitlbee`, which I *believe* I need to
run...
|
|
I'm having trouble getting PAM auth to work, so I'm temporarily disabling it.
TIL that I can use the following to verify that PAM is properly setup for a
program (e.g. `bitlbee`).
```
pamtester -v bitlbee $(whoami) authenticate
```
...but despite this succeeding, I still cannot use the `identify` command in
`bitlbee` to successfully authenticate. It just tells me "Incorrect password"
even though I'm providing it the same password that I type when doing the
`pamtester` command from above.
Computers!
|
|
Use Linux's PAM for Bitlbee's auth.
|
|
TLS support for bitlbee...
|
|
Attempt to access Bitlbee from IRCCloud.com client...
|
|
I'm still not entirely sure what bitlbee does, but I know this: I want as many
messengers in the same place as possible: IRC, Slack, Telegram. @tazjin tells me
that Bitlbee will help me get to the promised land. This is hopefully one step
of many in that direction.
|
|
- Change list.txt -> list.org
- Group groceries by category
- Sort categories by store layout
|
|
At this point, I may be taking this idea too far, but what the heck?
|
|
Helps me run my chapter exercises.
|
|
From "Haskell Programming from First Principles"...
I have completed all of the exercises in the book thus far, but I only recently
dedicated a Haskell module for each chapter. Previously I created ad hoc modules
per exercise, per chapter... it was chaotic.
|
|
From "Haskell Programming from First Principles"...
|
|
I'm creating Haskell modules to host my attempts and solutions for the exercises
defined in each chapter of "Haskell Programming From First Principles".
|
|
Mimi and I will go to the grocery store every Monday here. If we track what we
buy, we can easily generate grocery lists that get better over time.
|
|
After consuming some of this boilerplate for a TopTal assessment, I found a few
inconsistencies with my docs.
|
|
Problem: My SSH is behaving strangely.
Reason: I'm not sure. What I do know, however, is that Google handles SSH
differently. So I think that's enough for me to know I should keep my hands off
and not wrestle with it.
|
|
Without the ivy-helpers/ namespace, I believe this code is buggy.
|
|
I've said it once, and I'll say it again: my preferences often change.
|
|
Define KBDs in clojure-mode-map that resemble my common-lisp and elisp KBDs.
|