Commit graph

15150 commits

Author SHA1 Message Date
William Carroll
b53ae61db2 Read PG's Lisp for Web-Based Applications
Read Paul Graham's notes about the benefits of building Viaweb with Lisp. I
found it interesting how his competitors (in the 90s) were using CGI scripts to
build their web applications. I wonder how much of his advice would hold true
today...
2020-02-21 19:47:54 +00:00
Vincent Ambo
68d1d87a9b fix(ops/nixos/camden): Add missing quote in nginx config 2020-02-21 16:12:48 +00:00
Vincent Ambo
25d8e7ce25 feat(ops/nixos/camden): Modify nginx log format
This log format contains more structured and correctly typed
information, which I can now use for dashboards and stuff in Stackdriver.
2020-02-21 16:10:08 +00:00
Xiaoyi Zhang
2a5633fc07 Merge "Export of internal Abseil changes" 2020-02-21 16:05:43 +00:00
Vincent Ambo
1e51a2135d fix(ops/nixos/camden): Configure nginx to not log hostnames
Hostname prefixes break JSON serialisation, leading to useless
Stackdriver Logging entries.
2020-02-21 16:01:54 +00:00
Vincent Ambo
703aebe6a9 feat(ops/nixos/camden): Install jq 2020-02-21 15:43:07 +00:00
Vincent Ambo
6e4df43f62 feat(ops/nixos/camden): Forward logs to Stackdriver Logging
Enables the journaldriver service to forward logs into a "home"
log-stream in the "tazjins-infrastructure" project.

The service account key for camden has been placed on the machine
manually.
2020-02-21 15:35:51 +00:00
Vincent Ambo
7290a18cb1 chore(ops/nixos/nugget): Remove input-fonts package
My default font is now Jetbrains Mono everywhere.
2020-02-21 13:54:53 +00:00
Vincent Ambo
3d1f568ddb fix(fun/amsterdump): Fix call to os.Getenv
Not sure how this broken version ended up committed ...
2020-02-21 13:54:53 +00:00
Vincent Ambo
f2235ba0ae feat(build): Add //fun and //ops/nixos projects to CI builds 2020-02-21 13:54:53 +00:00
Vincent Ambo
4bbbb58cb5 chore: Rename pkgs->depot in all Nix file headers 2020-02-21 13:54:53 +00:00
Vincent Ambo
5d9d84f4cf refactor: Pass the depot as an argument named 'depot'
This change, which I've been meaning to do for a while, renames the
attributes passed by readTree to things in the tree so that:

* the depot root is now 'depot'
* depot.third_party is additionally passed as 'pkgs' (for
  compatibility with exported subtrees)
2020-02-21 12:45:43 +00:00
William Carroll
00177d2e65 Read two PG essays
- Programming Bottom-Up: Benefits of writing reusable utility functions and
  amassing a personal utility belt. Specifically how lisp makes this easier than
  most or all languages.
- This Year We Can End the Death Penalty: Voting against the death penalty is
  voting against the killing of killers *and* the killing of innocent people,
  since some estimate that 4% of people on death row are in fact innocent.
2020-02-21 12:29:28 +00:00
William Carroll
0dd3987821 Solve InterviewCake's inflight-entertainment problem
Write a predicate that tests whether two films in a list of films can exactly
fill the duration of a flight.
2020-02-21 11:30:01 +00:00
William Carroll
6895b8b1ef Track which Paul Graham essays I've read and haven't read
As I mention at the top of the org file, I cannot rely on my web browser
informing me which of these essays I've read; it only shows me which of the
links I've clicked.
2020-02-21 09:38:34 +00:00
Khem Raj
f9b3d6e493
Add RISCV support to GetProgramCounter() (#621)
Identify PC register from signal context

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-02-20 22:36:23 -05:00
William Carroll
1fbc80359b Support ssh/{sudo-buffer,cd-home}
- Support command to open a dired buffer with wpcarro's $HOME directory for any
  host defined in ssh/hosts.
- Support opening the current buffer with sudo privileges.
2020-02-20 23:18:59 +00:00
Abseil Team
914ff44510 Export of internal Abseil changes
--
bffb14058bb46137d42c7a113a36b6b582997cda by Xiaoyi Zhang <zhangxy@google.com>:

Add ABSL_MUST_USE_RESULT to Status.

PiperOrigin-RevId: 296272498

--
b426fdd3b3f687d7a8aeb644925923bbab503778 by CJ Johnson <johnsoncj@google.com>:

Optimizes absl::InlinedVector::clear() by not deallocating the data, if allocated. This allows allocations to be reused.

This matches the behavior of std::vector::clear()

PiperOrigin-RevId: 296197235

--
8cb9fbfe20e749816065c1a042e84f72dac9bfc0 by CJ Johnson <johnsoncj@google.com>:

Optimizes absl::InlinedVector::clear() by not deallocating the data, if allocated. This allows allocations to be reused.

This matches the behavior of std::vector::clear()

PiperOrigin-RevId: 296058092

--
2558d3369a482879919155b6f46317ccafe0ca13 by Matthew Brown <matthewbr@google.com>:

Internal cleanup

PiperOrigin-RevId: 296025806

--
cf7ee57228534021c15ed7421df92acf6c27c9c7 by Gennadiy Rozental <rogeeff@google.com>:

Make FlagOps enum class.

We also add comments to all the functions used to invoke flag ops.

PiperOrigin-RevId: 295975809

--
74bbdbd12fbc54e9c4ebcb3005e727becf0e509d by Xiaoyi Zhang <zhangxy@google.com>:

Release `absl::Status`.

PiperOrigin-RevId: 295777662

--
3dbc622b4e2227863525da2f7de7ecbeb3ede21f by Xiaoyi Zhang <zhangxy@google.com>:

Internal change.

PiperOrigin-RevId: 295733658

--
48d74aa0ab01d611da6012b377f038d8b26c712e by Abseil Team <absl-team@google.com>:

Fix typo in container/CMakeLists.txt for container_common

PiperOrigin-RevId: 295491438
GitOrigin-RevId: bffb14058bb46137d42c7a113a36b6b582997cda
Change-Id: Ia966857b07fa7412cd6489ac37b5fa26640e4141
2020-02-20 15:37:22 -05:00
Sinan Kaya
0232c87f21
Add missing ABSL_HAVE_VDSO_SUPPORT conditional (#622)
Signed-off-by: Sinan Kaya <sinan.kaya@microsoft.com>
2020-02-20 15:37:01 -05:00
William Carroll
79013316a6 Support installer.nix
The command...
nix-build -A config.system.build.isoImage -I nixos-config=installer.nix nixos
...creates an .iso file in the ./result directory. You can then copy this onto a
USB and use it a custom installer...
cp ./result/iso/*-linux.iso /dev/sda

I needed an installer that used a version of the Linux kernel higher than the
one distributed on NixOS's website: 4.19.? -> 5.4.20+. My Acer laptop needed a
version of the kernel that supported its network controller: Intel 3168NGW.

TODO(wpcarro): Pin the nixpkgs git commit SHA inside of installer.nix.
2020-02-20 19:51:51 +00:00
William Carroll
01f0ebfa32 Support basic nixos/configuration.nix
I'm attempting to configure an old Acer laptop that I bought at a used
electronics store in Shepherd's Bush (~100GBP) as my server. I'd like to install
NixOS on it. The configuration.nix herein defines a starting point for the
configuration for that machine. It isn't currently working.

Troubleshooting and solutions forthcoming...
2020-02-20 19:49:15 +00:00
William Carroll
66c38f8656 Solve InterviewCake's cafe-order-checker problem
Write a predicate that tests if a given list of integers, zs, is a possible
interleaving of two other lists, xs and ys.
2020-02-20 15:20:58 +00:00
William Carroll
737bdd0a23 Solve InterviewCake's merge sorted arrays question
Write a function merging two sorted arrays into one sorted array.
2020-02-19 16:02:38 +00:00
William Carroll
00e3526d9a Support SSH config for acer machine
I'd like to setup a NixOS machine that runs in my flat to host my blog and other
projects. For now it's a slow Acer running Manjaro Linux. I'm hoping that I can
install NixOS on it remotely over SSH. But first! SSH access...

I setup port forwarding from my router to this machine for:
- HTTP
- HTTPS
- SSH
2020-02-19 15:01:42 +00:00
William Carroll
ca6bd29ed8 Solve bonus part of reverse-words
InterviewCake asks "How would you handle punctuation?". Without precise specs
about what that entails, I'm supporting sentences ending with punctuation.
2020-02-19 15:01:42 +00:00
William Carroll
acf1b8c4f0 Solve InterviewCake's reverse-words
Wrote a function to reverse the words in a list of characters. A word is a
space-delimited strings of characters.

The trick here is to first reverse the entire string and then reverse each word
individually.
2020-02-19 15:01:42 +00:00
Eelco Dolstra
2097983218
Doh 2020-02-18 21:30:31 +01:00
Eelco Dolstra
2f0122b23c
Disable the progress bar if $TERM == dumb or unset
Fixes #3363.

(cherry picked from commit d8fd31f50ff55f7f334a2b9e58a82570e82ec28d)
2020-02-18 18:36:33 +01:00
Eelco Dolstra
db3d3a5618
Build with large config Boehm GC
(cherry picked from commit 583d06385de82ab5c7fc77d26cd138d3c6d5f4b5)
2020-02-18 18:02:58 +01:00
Eelco Dolstra
91030eae50
Enable debug symbols
(cherry picked from commit f46bc0e8eb079f7d2613bfabfbcff31f4401b42c)
2020-02-18 18:00:54 +01:00
Eelco Dolstra
8950ae95a4
Disable shellcheck
It's broken at the moment: https://hydra.nixos.org/build/105746055

Also it pulls in GHC which is a pretty big dependency.

(cherry picked from commit b4e260d887441fde9ab568dff7c21a77d7cff904)
2020-02-18 16:57:46 +01:00
Benjamin Hipple
6605ea0197
doc: touchup release notes for 2.3
- At the top of the release notes, we announce sandboxing is now enabled by default,
then at the bottom it says it's now disabled when missing kernel support. These
can be merged into one point for clarity.

- The point about `max-jobs` defaulting to 1 appears unrelated to sandboxing.

(cherry picked from commit 5d24e18e29ea1fff8fa316701fd95be6941da770)
2020-02-18 16:45:56 +01:00
Robin Gloster
b51ecc02c8
structured-attrs: chown .attrs.* files to builder
Otherwise `chmod .`'ing the build directory doesn't work anymore, which
is done in nixpkgs if sourceRoot is set to '.'.

(cherry picked from commit f8dbde0813c4e8beed6dfd09b093589e027a6675)
2020-02-18 16:45:43 +01:00
Domen Kožar
ed25fdd66e
retry on HTTP status code 429
(cherry picked from commit 48ddb8e481c0ba0b59b7193df4aa914ce83a9032)
2020-02-18 16:45:34 +01:00
Eelco Dolstra
475c2e5de7
Bump version number 2020-02-18 16:44:55 +01:00
William Carroll
9fc29831e0 Configure ssh preferences
Every Tuesday I work from Google's 6PS office instead of BEL. I work from my
laptop, which often requires that I ssh into the desktop work station in BEL. I
have settled on a locally optimal workflow that I'd like to improve. To help
seek higher ground, I'm planning on using ssh.el to configure tramp and define
utility functions to lower my cost of exploring new workflows.

- Defines a function, `ssh/desktop-cd-home` that helps me quickly open a dired
  buffer for my work station's home directory.
- Documents some variables that I set weeks ago.
- Requires ssh.el in init.el.
2020-02-18 11:18:02 +00:00
William Carroll
993f7c9389 Further configure notmuch
Until now my notmuch is usable but not almost always pleasurably so. For
example, when I reply to messages, notmuch warns that "Insert failed:"; when I
check Gmail, the reply sent... strange. After consulting with a fellow notmuch
user and Emacs disciple, tazjin@, I borrowed some of his notmuch configuration.

- notmuch is no longer warning about replies
- Replies do not include noisy email signatures
- I have an Emacs User-Agent header in my outgoing mail
- All of this and more...
2020-02-18 11:09:03 +00:00
William Carroll
6f179afd49 Define KBD for find-file-at-point (i.e. ffap)
I'm attempting to incorporate the beloved find-file-at-point function into my
workflow.
2020-02-18 11:09:03 +00:00
William Carroll
159301da50 Further specify saved searches for tags
Add tag:unread to:
- direct
- broadcast
- systems

Additionally: I added "and not tag:sent" for direct because oftentimes I send
myself mail. Without that condition, my sent mail shows up in direct.
2020-02-18 11:09:03 +00:00
Carlos O'Ryan
3e4f8c025e
fix: fix dependencies for trace.proto (#35) 2020-02-17 20:17:01 -05:00
Griffin Smith
22b7a9be84 Drop Rasterific for non-filled circles
Rasterific appears to generate some pretty surprising, if  not
completely wrong, circles at especially low sizes - this was resulting
in unexpected behavior with vision calculation, including the character
never being able to see directly to the left of them, among other
things. This moves back to the old midpoint circle algorithm I pulled
off of rosetta code, but only for the non-filled circle. The filled
circle is still using the wonky algorithm for now, but at some point I'd
love to refactor it such that empty circles are eg always a subset of
non-filled circles.
2020-02-17 18:01:57 -05:00
William Carroll
2e63a4e2e1 Require keybindings.el after wpc-keybindings.el
keybindings.el calls (require 'evil-ex), which I introduced in this commit...
0456a1c4b4
...calling (require 'evil-ex) loads evil. When evil is loaded before
evil-want-integration is set to nil, evil-collection writes to *Warnings* when
Emacs initializes, which I find noisy. This commit ensures the
evil-want-integration is set to nil before evil is loaded, which appeases
evil-collection and thus removes the warning message.

Bonus:
If you git checkout the previous commit, and attempt to run the KBDs...
- `SPC g s`: magit-status
- `s h`: evil-window-vsplit
...from a buffer whose major-mode is dired-mode, you should notice that the
above functions won't execute.

Strangely though, if you look at this commit...
37f8ca04f2
...I fixed these issues. Well I introduced a regression when I added 0456a1c.

My current guess is that when evil-collection complains about
evil-want-integration, it is breaking the evaluation sequence of my init.el
file. wpc-dired.el is downstream from wpc-keybindings.el, which requires
evil-collection. Perhaps no modules required after wpc-keybindings.el are
evaluated after evil-collection warns about evil-want-integration. Even if that
assumption is wrong, what I do know is that this commit fixes the
evil-collection warning and restores the KBDs for dired-mode-map.

Here's to feeding two birds with one scone!
2020-02-17 22:40:41 +00:00
William Carroll
e61965cafd Drop support for compton
I'm finding myself running `pkill compton` offer. In the spirit of slimming down
my configuration, I'm dropping support for compton.
2020-02-17 21:18:03 +00:00
Griffin Smith
1265155ae4 Don't run initEvent when loading the game
Rather than having a single sentWelcome boolean, avoid running the
initEvent entirely when loading an already-initialized game. Among other
things, this stops us from re-generating a level and then merging it
with the existing one when the game is loaded (oops).
2020-02-17 13:24:31 -05:00
Griffin Smith
69ccf3a77d Fix argument order to drawEntities
I had swapped the order of isVisible and isRevealed, which was causing
not-currently-visible gormlaks to still be rendered.
2020-02-17 13:14:36 -05:00
Griffin Smith
f6eeccbb0f Add Staircase to the list of all entities
Forgot to do this when I added staircases - this is necessary for
loading saved games.
2020-02-17 13:14:12 -05:00
Vincent Ambo
0e54b3eb6a Merge branch 'fix/camden-trusted-users' 2020-02-17 01:02:06 +00:00
Vincent Ambo
ce4042ede7 fix(ops/nixos/camden): Add myself to trusted Nix users 2020-02-17 01:00:12 +00:00
Vincent Ambo
494e006c6b fix(ops/nixos/camden): Use pounce from //third_party 2020-02-17 00:52:07 +00:00
Vincent Ambo
24de5683aa chore(third_party/pounce): Override version to 1.1
This has not yet propagated to nixos-unstable
2020-02-17 00:51:13 +00:00