notpeter's comments

notpeter | 10 months ago | on: Zed: High-performance AI Code Editor

1. You can specify your terminal font via terminal.font_family in zed settings.json

2. Not sure.

3. For most languages, the default is to use prettier for formatting. You can disable `format_on_save` globally, per-language and per project depending on your needs. If you ever need to save without triggering format ("workspace: save without formatting").

Prettier is /opinionated/ -- and its default is `singleQuote` = false which can be quite jarring if unexpected. Prettier will look for and respect various configuration files (.prettierrc, .editorconfig, via package.json, etc) so projects can set their own defaults (e.g. `singleQuote = true`). Zed can also be configured to further override prettier config zed settings, but I usually find that's more trouble than it's worth.

If you have another formatter you prefer (a language server or an external cli that will format files piped to stdin) you can easily have zed use those instead. Note, you can always manually reformat with `editor: format` and leave `format_on_save` off by default if that's more your code style.

- https://zed.dev/docs/configuring-zed#terminal-font-family

- https://zed.dev/docs/configuring-zed#format-on-save

- https://prettier.io/docs/configuration

- https://zed.dev/docs/languages/yaml#prettier-formatting

- https://zed.dev/docs/configuring-zed#formatter

notpeter | 1 year ago | on: Why SQLite Uses Bytecode

This was the question I was going to ask! I've recently been diving into Lua 5.x internals and have been extremely impressed with Lua's register-based bytecode implementation. Lua has a stable byte code interface between patch releases (5.4.0 -> 5.4.1, etc) but not between major/minor revisions (5.3 -> 5.4). SQLite on the other hand does not consider this a public interface at all!

> "Remember: The VDBE opcodes are not part of the interface definition for SQLite. The number of opcodes and their names and meanings change from one release of SQLite to the next." https://www.sqlite.org/opcode.html#the_opcodes

For anyone interested in understanding how a register-based VM operates I highly recommend:

A No-Frills Introduction to Lua 5.1 VM Instructions by Kein-Hong Man. https://www.mcours.net/cours/pdf/hasclic3/hasssclic818.pdf

notpeter | 2 years ago | on: Latam Airlines SYD to AKL flight: 50 people treated after mid-air incident

I also like their Automated License Plate Reader (ALPR) record retention period (3 minutes):

> Records of number plates read by each LPR shall not be recorded or transmitted anywhere and shall be purged from the system within 3 minutes of their capture in such a manner that they are destroyed and are not recoverable, unless an alarm resulted in an arrest, a citation, or protective custody, or identified a vehicle that was the subject of a missing person or wanted broadcast [...]

https://law.justia.com/codes/new-hampshire/2022/title-xxi/ti...

notpeter | 2 years ago | on: Decoded: GNU Coreutils (2018)

> to see how far it gets before killing itself (on a VM or easily re-flashed machine of course).

I did this, but with dd -- it completed. Was very anti-climatic. I was hoping it would crash or at least disconnect me, but the kernel, sshd and bash were still in memory and happily returned me to a prompt where I couldn't really do anything.

notpeter | 2 years ago | on: Show HN: Text a photo to send as a postcard

My assumption is that they are not handling mail pieces and just outsourcing everything via the PostGrid API. Public pricing for a domestic 4x6 full color postcard $0.74. [1] There's no international pricing listed, but given that a domestic postcard stamp is $0.48, printing is ~$0.26 so add international forever stamp ($1.45) so $1.71/card. Stripe is 2.9% + $0.30 ($0.39 on $2.99). They are using Twilio so that's $0.01 for an inbound/MMS and just under $0.01 for the outbound SMS with a stripe link.

Profit per card would be $1.84/card domestic and $0.98/card international. Excellent margins for a $2.99 product with no need to handle inventory.

Seems like a great side project creating glue between three REST APIs (PostGrid, Stripe, Twilio) and I'd expect it'd generate sufficient free cash flow to cover its server costs and buy a few beers.

[1]: https://www.postgrid.com/pricing-print-mail/#perunit

notpeter | 2 years ago | on: Severance payments at Wikimedia Foundation

In my experience reading hundreds of IRS 990 forms these number are not out of bounds for non-profits at their scale. Healthcare and university may skew the absolute numbers, but are similar.

Specifically a great executive will personally move the fundraising needle in organizations (+1-5% or more) and mediocre executive can cause losses/missed opportunities in the opposite direction of a similar magnitude. The conventional thinking is the relative fundraising impact of a great vs a good executive may 10x their total compensation, so it's probably worth trying to retain the best.

Anecdotally, I know of a not-for-profit COO who offended an NBA player killing the relationship. His successor COO repaired the relationship, ultimately resulting in multiple millions of new donations and a co-marketing agreement with the team. When the COO was hired there were rumblings because he'd negotiated +$50k over his predecessor.

With no equity and the poor optics of commission compensation or cash-bonuses, big severance packages are one of the few ways an organization can reward employees following years of great service.

notpeter | 3 years ago | on: FSArchiver – Filesystem Archiver for Linux

Parchive development has moved GitHub.

PAR2 (libpar2/par2cmdline) continues to see active (if sporadic) maintenance. The most recent tagged release was 2020-02-09 but there've been a handful of PR's merged since. [2]

PAR3 has a reference implementation and alpha spec (libpar3/par3cmdline) which is based around Blake3. [3]

OG PAR (libpar/parcmdline) is legit unmaintained; the last release was 21 years ago. [1]

[2]: https://github.com/Parchive/par2cmdline

[3]: https://github.com/Parchive/par3cmdline

[1]: https://github.com/Parchive/parcmdline/

page 1