about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2020-03-06 Support nix/home-manager-switchWilliam Carroll1-0/+10
As a part of my plan to reduce my dependence on the shell, I defined an Elisp function to call `home-manager switch` from `M-x`.
2020-03-06 Manage fish with home-managerWilliam Carroll3-249/+113
I patched home-manager locally to support fzf keybindings for fish. I will PR this into home-manager, but I haven't yet, which means that my home.nix file depends on my local ~/home-manager.
2020-03-06 Splice configs/shared directoryWilliam Carroll169-49299/+2
- Move all children from configs/shared into configs. - Delete "shared" directory.
2020-03-06 Drop support for terminatorWilliam Carroll3-288/+0
I've been consistently using vterm enough that I don't think I will change shells anytime soon. Couple this with my previous commit where I hint that I'd like to curb all terminal usage if possible, and it seems unlikely that I'll want to keep this terminator configuration.
2020-03-06 Drop support for rofiWilliam Carroll2-12/+0
Rofi is a nicer alternative to dmenu, but I use neither dmenu nor rofi, so farewell.
2020-03-06 Drop support for mpdWilliam Carroll2-4/+0
If I'm being candid, I'm not even sure I remember what mpd does. My current guess is that it's a music player daemon.
2020-03-06 Drop support for lfWilliam Carroll2-169/+0
While I like lf, I don't use it enough to maintain this configuration.
2020-03-06 Drop support for .g4dWilliam Carroll1-15/+0
I have an Elisp module that encodes these aliases mappings.
2020-03-06 Drop support for desktop and laptopWilliam Carroll10-59/+20
As I pruned increasingly more dependencies, the few dependencies that desktop and laptop hosted were too trivial for me to justify supporting. And so, I no longer support them.
2020-03-06 Support gpg-agent with home-managerWilliam Carroll2-2/+6
A previous commit supported gpg.conf; this commit supports gpg-agent.conf. I still have other files in my .gnupg directory that I should audit.
2020-03-06 Add programs to home-managerWilliam Carroll3-20/+18
Support commonly used programs like fd, exa, bat, etc. For now, I'm unsure how to manage the programs in my emacs/default.nix with my home.nix. I'll wait until I have a stronger opinion to handle this.
2020-03-06 Support fzf with home-managerWilliam Carroll2-4/+5
Because (to my knowledge) home-manager doesn't support fish-shell, I need to retain some fzf-specific configuration in my fish/config.fish file.
2020-03-06 Support lorri with home-managerWilliam Carroll4-24/+2
Prefer starting lorri with home-manager. Note: I could have removed the `systemctl --user start lorri.service` line before switching to home-manager by calling `systemctl --user enable lorri.service`. This would have made a symlink in `~/.config/systemd/user/default.target.wants`.
2020-03-05 Drop support for TmuxWilliam Carroll2-191/+1
I haven't used Tmux for months. I also suspect that using the terminal in general may be a crutch. Ideally I could replace everything I do in the terminal with Emacs analogues. Perhaps one month I'll force myself to work without a terminal to see what happens.
2020-03-05 Drop support for cloudtopWilliam Carroll5-8/+2
While I do still technically own a Google cloudtop device, I haven't used it in at least six months. In the interest of pruning non-critical dependencies, I'm deleting it. I can alway restore it thanks to Git.
2020-03-05 Drop support for personal_laptopWilliam Carroll3-18/+0
My former Manjaro device is now a NixOS device called "socrates", which hosts this git repo and a few other projects.
2020-03-05 Use home-manager to support SSHWilliam Carroll2-26/+14
I didn't port everything from .ssh/config to home-manager. I omitted a few hosts that I don't connect to anymore. I also omitted the `corp-ssh-helper` configuration.
2020-03-05 Drop support for ncmpcppWilliam Carroll1-12/+0
I don't think I ever fully setup ncmpcpp. This configuration has been collecting dust in my monorepo for awhile.
2020-03-05 Drop support for irssiWilliam Carroll1-44/+0
I've been using ERC for awhile, and I haven't switched back to irssi.
2020-03-05 Drop support for gvcciWilliam Carroll160-14672/+0
I supported gvcci before I switched to EXWM. Now that I'm using EXWM, I prefer keeping things simple and using Doom's solarized-light theme.
2020-03-05 Move gpg.conf to home-managerWilliam Carroll2-3/+7
- Migrate gpg.conf settings to home-manager - Delete gpg.conf
2020-03-05 Drop support for DockerWilliam Carroll2-4/+0
I don't use Docker shells enough to justify maintaining this.
2020-03-05 Support gitconfig with home-managerWilliam Carroll3-28/+21
- Migrate configuration from .gitconfig to home-manager. - Delete .gitconfig. - Delete .gitignore because I'm not using OSX anymore.
2020-03-05 Support Nix home-managerWilliam Carroll1-0/+21
Last night @adisbladis convinced me to try home manager. I'm growing weary of wrestling with symlinks, so I'm willing to give this a try.
2020-03-04 Drop support for functions.fishWilliam Carroll2-67/+0
I'm not using the functions defined in this file, and it is causing me in trouble.
2020-03-04 Drop support for hubWilliam Carroll1-3/+1
I'm not using hub much lately and it's causing me trouble.
2020-03-04 Ensure fish config is compatible with TrampWilliam Carroll1-192/+202
Ensure that my config.fish does not interfere with Tramp.
2020-03-04 Consume top-level emacs attributeWilliam Carroll1-3/+4
Refactor `nix/rebuild-emacs` to consume newly defined top-level emacs attribute.
2020-03-04 Move emacs to top-level nix expressionWilliam Carroll1-0/+1
When I run `nix-build -f '<briefcase>' -iA emacs`, readTree will define... - pkgs - depot - briefcase ...and whatever else I choose to define.
2020-03-04 Support custom fish promptWilliam Carroll1-15/+66
Today I wrote myself a custom fish prompt. It's mostly what I'd like, but I'd like to finely tune it a bit. I'd like to create a separate repository to release this. In that repository, I'll explain why I wrote this.
2020-03-02 Solve InterviewCake's product-of-other-numbersWilliam Carroll2-1/+69
This problem challenged me: without using division, write a function that maps a list of integers into a list of the product of every integer in the list except for the integer at that index. This was another greedy algorithm. The take-away is to first solve the problem using brute force; this yields an algorithm with O(n*(n-1)) time complexity. Instead of a quadratic time complexity, a linear time complexity can be achieved my iterating over the list of integers twice: 1. Compute the products of every number to the left of the current number. 2. Compute the products of every number to the right of the current number. Finally, iterate over each of these and compute lhs * rhs. Even though I've solved this problem before, I used InterviewCake's hints because I was stuck without them. I should revisit this problem in a few weeks.
2020-03-02 Read Paul Graham article "Taste for Makers"William Carroll1-1/+1
I'm considering this essay one of my favorites from Paul Graham. The essay argues that good taste and bad taste exist. Graham argues against relativism in design and cites a variety of examples of architecture, typography, writing, sketching, painting, aircraft design, and others that bolster his opinion. TL;DR - Design should strive to be: - Simple: Prefer simplicity to complexity when possible. - Timeless: Design today for tomorrow by pleasing yesterday. - Pointed: Focus always on the problem; don't work for work's sake. - Suggestive: Constrain usage without suffocating the user. - Humorous: Prefer light-heartedness to sobriety. - Difficult: "Good design" is takes time, effort, and tremendous skill. - Ostensibly effortless: Solutions should look obviously correct. - Symmetric Appreciate symmetry. - Natural: In nature, form ever follows function. - Iterative: Write; rewrite; rewrite; rewrite; throw away; write; publish. - Imitative: Be confident enough to copy others' existing, beautiful ideas. - Communal: Pay attention to "Schelling points" and join the party. Don't be the Milanese Da Vinci. - Fearless: Question the status quo; expect others to challenge your solution.
2020-03-01 Manually require dependencies for <nixpkgs>, <briefcase>William Carroll1-2/+8
When I build socrates using `sudo nixos-rebuild [...] switch`, my `nixos-config` (i.e. <briefcase/nixos/socrates/default.nix>) is a simple Nix anonymous function. Typically readTree populates my pkgs, briefcase, depot function parameters with <nixpkgs>, <briefcase>, <depot>, but `nixos-rebuild` is unaware of `readTree`. For now I'm manually importing these dependencies, and I'm leaving a TODO to reconsider switching to the `{ pkgs, briefcase, ... }` style when I better understand NixOS.
2020-03-01 Removing unused parameters in installer.nixWilliam Carroll1-1/+1
I'm neither using config nor pkgs, so I'm deleteing them.
2020-03-01 Simpify top-level nix expressionWilliam Carroll1-33/+12
When I first created the monorepo, I borrowed @tazjin's monorepo's. I adapted his depot/default.nix, replacing some of his paths with my paths. This worked for me until recently. I attemped to include <briefcase/monzo_ynab/job> as a systemd unit for my NixOS machine, socrates. NixOS failed to build my changes, and I didn't fully understand my default.nix since I borrowed most of it from @tazjin. I spent the past week looking at the `fix` function. I realized that I didn't fully understand how fixed-point recursion worked. This sent me down a rabbit hole terminating with me studying the Y and Z combinators. Ironically, after understanding the `fix` function, I realized that I didn't need to use it where I was consuming it. I ended up pruning most of my configuration, which resulted in this commit. Yours truly, lambda f: (lambda x: f(x(x)))(lambda x: f(x(x)))
2020-03-01 Solve InterviewCake's highest-product-of-3William Carroll2-1/+82
Write a function that returns the highest product of three integers within a list of integers. This solution uses a greedy algorithm that solves for the answer in linear time. The space complexity is constant.
2020-03-01 Remove HTML-encoded quoteWilliam Carroll1-1/+1
Prefer ' to &#39;
2020-03-01 Solve InterviewCake's stock-price problemWilliam Carroll2-1/+55
Write a function that returns the maximum profit that a trader could have made in a day. I solved this using a greedy algorithm which constantly sets the maximum profit by tracking the lowest price we've encountered.
2020-03-01 Use doom-modelineWilliam Carroll2-0/+5
Cleaning up my modeline by using the beautiful doom-modeline package.
2020-03-01 Read Paul Graham's "Five Questions about Language Design"William Carroll1-1/+1
This article felt like a summary of "Being Popular". I'd suggest reading both of these.
2020-03-01 Solve InterviewCake's top-scoresWilliam Carroll2-1/+48
Using a counting sort to sort a list of values in linear time.
2020-03-01 Solve InterviewCake's word-cloud problemWilliam Carroll2-1/+80
Write a function to count the frequency of words in a sentence. Ignore casing for words; ignore punctuation.
2020-03-01 Consolidate fish configurationWilliam Carroll5-465/+117
Months ago when I was revisiting Nix, I decided to nixify my fish configuration. This was a useful learning exercise. I've had two config.fish files floating around this repository ever since then. I sometimes update one and other times I update the other. I'm consolidating these files into one, so I that this is no longer as issue.
2020-03-01 Read Paul Graham's "Being Popular" essayWilliam Carroll1-1/+1
Maybe this is my recency bias writing, but "Being Popular" may be one of my favorite Paul Graham essays that I've read. "Being Popular" outlines Paul Graham's ideas about what an ideal programming language would look like. This essay took me 1-2 hours to read, but it was worth the time. Here are some quotes that I enjoyed (not sorted in any meaningful order): "A friend of mine rarely does anything the first time someone asks him. He knows that people sometimes ask for things that they turn out not to want. To avoid wasting his time, he waits till the third or fourth time he's asked to do something; by then, whoever's asking him may be fairly annoyed, but at least they probably really do want whatever they're asking for." "In this particular case there is a way to finesse our way out of the problem. If we treat data structures as if they were functions on indexes, we could write (a x y) instead, which is even shorter than the Perl form. Similar tricks may shorten other types of expressions." "The latest hot language, Python, is a watered-down Lisp with infix syntax and no macros." "Hackers would think a lot more highly of Lisp if Common Lisp had powerful string libraries and good OS support." "I think language designers would do better to consider their target user to be a genius who will need to do things they never anticipated, rather than a bumbler who needs to be protected from himself." Some take-aways: - Let's refer to Python as "Diet Lisp" from now until the end of time. - Fight to keep your user-base small for as long as you can. Only fools want large user bases. - Rich Hickey definitely read this article; he took some ideas with him; he left some ideas behind. - Focus language design efforts around defining rich standard libraries, especially for string manipulation. - Worry little about supporting backwards compatibility; design a language that can and is often rewritten. - Shift the burden of optimizing code performance to the user by designing a powerful runtime profiler that is tightly integrated into the language runtime. - Minimize the costs users face when experimenting: ensure that your language is interactive; ensure users can create REPLs quickly. - Support OS-level libraries (think about Go). - Maximize introspection and hackability. What a useful read!
2020-03-01 Solve InterviewCake permutation-palindrome problemWilliam Carroll2-1/+38
Write a predicate to test whether any permutation of an input string is a palindrome.
2020-03-01 Add nixos as top-level monorepo packageWilliam Carroll1-0/+1
I'd like to be able to call... `nix-build -E '(import <briefcase> {}).nixos.socrates'` ...as part of my efforts to wane my dependence off of `nixos-rebuild`.
2020-03-01 Remove default values for Nix expression parametersWilliam Carroll28-97/+36
I'm not sure if this commit breaks everything in my monorepo. I think it will. Why am I doing this? Perhaps it's a bad idea. I don't fully understand how readTree works. My ignorance is costing me hours of time spent debugging. In an effort to better understand readTree, I'm removing the default values for my Nix expression parameters, which I believe have preventing errors from surfacing.
2020-03-01 Nest configuration beneath socrates directoryWilliam Carroll3-10/+5
Create a socrates directory to store configuration for socrates.
2020-02-23 Expose depot and briefcase to rebuild scriptWilliam Carroll1-0/+2
At the moment, I don't think nixos-rebuild is reading $NIX_PATH, which appropriately sets the paths for depot and briefcase. I'm going to explicitly expose these values in the rebuild script for now.
2020-02-23 Define monzo-token-server as a root systemd serviceWilliam Carroll1-4/+10
After I considered the security implications of calling `systemctl --user cat monzo-token-server`, I realized that monzo-token-server should be a root service instead of a user service. This service unit now also explicitly depends on briefcase.monzo_ynab.tokens, which is a big improvement.