I'd like to see if I can avoid using `cabal` and `stack` and build and deploy
this application using `nix-shell` and `nix-build` only. Let's see how that
goes.
The JWT should match "accounts.google.com" or "https://accounts.google.com". If
it doesn't, we produce a validation error.
TL;DR:
- Group all failed stringOrURI function calls as StringOrURIParseFailure errors
I'm attempting to be an obedient boy and implement this and future features
using TDD.
TL;DR:
- Defined a few tests
- Defined an empty GoogleSignIn module
- Defined a Fixtures module to quickly create JWTs to test
TL;DR:
- Add common dependencies like Servant, Aeson, Warp, Cors
- Define a POST /verify endpoint for our client to hit
- POST to /verify client-side onSignIn
Using Haskell's Text.ParserCombinators.ReadP library for the first time, and I
enjoyed it thoroughly! It's nice avoiding a third-party library like MegaParsec.
Before starting my take-home assignment, the instructions advised me to create a
"Hello, world" program in the language of my choice. Since I'm choosing Haskell,
I created this example as my starter boilerplate.
Many Bollywood movies have excellent acting, excellent directing, excellent
storytelling, but in my opinion, they spoil this with unnecessary musicals
interspersed throughout the films.
Dangal is a notable exception here. Overall, I'd say that this movie is
appropriately rated!
What a confusing movie this was... I may need to watch it a second time to
better understand what happened, but I found watching it once already so
exhausting that I'm not sure I'll ever watch it again.
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.
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.
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*
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
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 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.