Readit News logoReadit News
lilyball commented on Self-hosting my photos with Immich   michael.stapelberg.ch/pos... · Posted by u/birdculture
Dedime · 10 days ago
My problem with NixOS is the second you try to go "outside the guardrails", the difficulty increases 100x
lilyball · 10 days ago
Is it? Why? If a NixOS module doesn’t support what you need, you can just write your own module, and the module system lets you disable existing modules if you need to. Doing anything custom this way still feels easier than doing it in an imperative world.
lilyball commented on Patterns for Defensive Programming in Rust   corrode.dev/blog/defensiv... · Posted by u/PaulHoule
lilyball · 11 days ago
In Pattern: Defensively Handle Constructors, it recommends using a nested inner module with a private Seal type. But the Seal type is unnecessary. The nested inner module is all you need, a private field `_private: ()` is only settable from within that inner module, so you don't need the extra private type.
lilyball commented on Homebrew no longer allows bypassing Gatekeeper for unsigned/unnotarized software   github.com/Homebrew/brew/... · Posted by u/firexcy
pxc · a month ago
> Most people I know are not installing too many casks

Casks are the only things Homebrew does that some other package manager available on macOS doesn't reliably do better. Nix, Pkgsrc, MacPorts, and (and now Spack) all have better fundamental designs; sane, multi-user-friendly permissions; and enough isolation from the base system that they break neither each other nor manually-installed software.

I use Homebrew exclusively tucked away in isolated prefixes, only to install casks, and without ever putting any binaries it installs along the way on my PATH. I don't remember which programs it is, exactly, but I do use a few that are unsigned.

It also doesn't seem to me that the signing process is as vital in determining actual risk as the curation and moderation processes involved in maintaining "third-party" software distributions like Homebrew or Debian or whatever.

`--no-quarantine` in particular is one of the conveniences that makes Homebrew casks useful. If I have to give my consent anew for each app update, I might as well install the apps manually and live in the usual auto-update pop-up hell.

lilyball · a month ago
I haven't used Homebrew in a long time, but if I ever did it would be in the way that you describe (so far I've always found reasonable alternatives for the software I want). What I'm wondering is if this is entirely to support unsigned casks, why does Homebrew not simply resign the software itself at install time with an adhoc signature as though it had just built it?
lilyball commented on The AirPods Pro 3 flight problem   basicappleguy.com/basicap... · Posted by u/andrem
thenobsta · 2 months ago
:( I recently lost my APP1 and was going to buy new airpods this week. I guess I'm going to look elsewhere until Apple improves their quality. I'm one of the few that are bothered by ANC, so I don't use it. But I also don't want to buy/support a subpar product release.
lilyball · 2 months ago
If you don't use ANC, then why is an ANC issue that only appears on flights a reason for you to not buy a product? If someone said they have weird ears and the AirPods Pro 3 simply doesn't fit their ears, would that be a reason for you to not buy it even though it fits yours?
lilyball commented on I spent a year making an ASN.1 compiler in D   bradley.chatha.dev/blog/d... · Posted by u/BradleyChatha
lilyball · 2 months ago
I'm fascinated by ASN.1, I don't know why it appeals to me so much but I find working with it oddly fun. I've always wanted to find the time to write an ASN.1 compiler for Rust, because for some reason all of the Rust implementations I've seen end up just either being derive macros on Rust structs (so going the other direction), or even just providing a bunch of ASN.1 types and functions and expecting you to manually chain them together using nom.
lilyball commented on Apple: SSH and FileVault   keith.github.io/xcode-man... · Posted by u/ingve
kylehotchkiss · 3 months ago
Can LaunchDaemons spin up after this initial unlock? I'm trying to get my Mac Mini server to run things regardless of my login status. It would be great to get FileVault enabled on the server with this. I'm OK to manually login whenever the power goes out.
lilyball · 3 months ago
LaunchDaemons don't rely on GUI login state so they should come up. If you use LaunchAgents then they won't start this way, but LaunchDaemons should be enabled once the data volume is unlocked and booting finishes.
lilyball commented on Apple: SSH and FileVault   keith.github.io/xcode-man... · Posted by u/ingve
Cu3PO42 · 3 months ago
Neat. Though I wonder if this suffers from the same race condition that the graphical session does when your shell is stored on a data volume.

Specifically, if you restart and opt to restart apps, they can come up before all volumes have been decrypted and mounted. If your shell is on one such volume, your terminal emulator may fail to start, for example. This can happen when using Nix to install your shell, for example.

I imagine this may be even easier to hit over SSH unless the underlying problem was resolved.

lilyball · 3 months ago
Unlock over SSH terminates the connection after unlocking the data volume, so it doesn't even attempt to start the shell until you reconnect after it's fully booted up.

FWIW you can fix the shell issue by wrapping your shell in a shim that essentially runs wait4path on the nix store before exec'ing your real shell. I set up my environment to install that shim binary directly onto the data volume at a known path so it can be used as my login shell.

lilyball commented on New knot theory discovery overturns long-held mathematical assumption   scientificamerican.com/ar... · Posted by u/baruchel
viraptor · 3 months ago
Is this something people have been actively trying to disprove? The example provided seems to not be hard to bruteforce - given it's only 5 moves. Does anyone know why there's no older counter example? (Or am I totally underestimating how the number of options explodes in 5 moves?)
lilyball · 3 months ago
It's not just 5 moves. It's 5 crossing changes (which don't change the number of crossings, they just change the order of the strings in a crossing). Unknotting also involves moving the strings around to add or remove crossings, without performing crossing changes (if you take a loop and twist it into a figure eight, you've moved the strings and created a crossing but you haven't cut the strings and performed a crossing change).

If you look at the preprint paper, the knot it starts with has 14 crossings, but they actually move the strings around to end up with 20 crossings prior to performing the first 2 crossing changes in the unknotting sequence. So the potential space for moves here is actually rather large.

lilyball commented on Unexpected productivity boost of Rust   lubeno.dev/blog/rusts-pro... · Posted by u/bkolobara
neandrake · 4 months ago
Rust caught the lock being held across an await boundary, but without further context I'd hedge there's still a concurrency issue there if the solution was to release the lock before the await.

Presumably the lock is intended to be used for blocking until the commit is created, which would only be guaranteed after the await. Releasing the lock after submitting the transaction to the database but before getting confirmation that it completed successfully would probably result in further edge cases. I'm unfamiliar with rust's async, but is there a join/select that should be used to block, after which the lock should be unlocked?

lilyball · 4 months ago
If you need to hold a lock across an await point, you can switch to an async-aware mutex. Both the futures crate and the tokio crate have implementations of async-aware mutexes. You usually only want this if you're holding it across an await point because they're more expensive than blocking mutexes (the other reason to use this is if you expect the mutex to be held for a significant amount of time, so an async-aware lock will allow other tasks to progress while waiting to take the lock).
lilyball commented on I Prefer RST to Markdown (2024)   buttondown.com/hillelwayn... · Posted by u/shlomo_z
physicles · 4 months ago
The author wrote a book, for which RST is undoubtedly the better choice. ("I wrote a book in Markdown" would be a surprising headline!)

But it's overkill for light documentation. Just look at their first example of embedding an image:

> ![alttext](example.jpg)

vs

> .. image:: example.jpg

> :alt: alttext

In the first one, it's just the syntax for a hyperlink with ! in front.

In the second one, there are several bits of syntax to remember. We have .. and then whitespace, and not one but two colons after `image`, and it's not `alt:` but `:alt:`.

I don't have to try to remember Markdown syntax, because it's simpler and it's ubiquitous. I type Markdown directly into Slack and Obsidian every day. Most tech-adjacent people know some Markdown.

Many years back a developer on my team decided that all the readmes that live next to source code should be in RST, because it's Better(TM) and we could have nicely formatted generated docs. The result was that a lot less documentation got written, and nobody looked at the generated docs anyway. Eventually we transitioned back.

lilyball · 4 months ago
Your argument here is basically just "I already know Markdown". Sure, the Markdown image syntax is similar to its hyperlink syntax, so if you know the hyperlink syntax then the image syntax is easy, but the same argument works for reST but even better, the image syntax is the same as any other directive, so if you know how to write a directive then you know how to write an image.

u/lilyball

KarmaCake day19284May 8, 2009
About
My opinions are my own and do not reflect those of my employer

[ my public key: https://keybase.io/lilyball; my proof: https://keybase.io/lilyball/sigs/okmRsMzqujmfu5cZO3uh8L1hmbSarnLcQJTjev7R60c ]

View Original