Better HN
topnewbestaskshowjobs
Log inSign up

zanecodes

463 karma · joined Sep 27, 2016 (10y ago) · 139 submissions

Submissions

comment 1d ago · link · parent

You can with something like this: https://github.com/rupor-github/wsl-ssh-agent#wsl-2-compatib...

I run ssh-agent in Windows, and then have a socket-activated systemd service that uses the above program to forward the SSH agent socket to the Windows ssh-agent. I have a similar setup for my GPG agent. This lets me seamlessly use my Yubikey for SSH/GPG in both Windows and WSL.

You could also use something like usbip to expose the Yubikey to your WSL distro as a USB device, but this has to be done manually each time you want to use it, and you can't use it in Windows until you manually switch it back.

comment 3w ago · link · parent

Apparently the full expression is "Don't Tread On Me, But Feel Free To Tread On Those With Whom I Disagree"

comment 1mo ago · link · parent

A problem that C solves by simply not having a supply chain! You can vendor dependencies in Rust just as easily as you can in C; far easier in fact thanks to `cargo vendor`. Cargo won't review them for vulnerabilities though, you'll still have to do that yourself.

comment 1mo ago · link · parent

Presumably the grocery stores are already staffed by at least one employee capable of flipping a switch, no?

comment 1mo ago · link · parent

I'm not sure where you got the impression that I'm making excuses for cloud providers. I'm just stating the way things are, not the way I think they should be.

comment 1mo ago · link · parent

Because many cloud services have incredibly complex or opaque pricing structures that make it difficult to impossible to determine how much something is going to cost you ahead of time, especially if it's usage-based a la network egress (and the usage statistics don't update frequently enough to make such circuit breakers possible to implement client-side).

comment 2mo ago · link · parent

If you don't have the time or money to have actual menu photos taken, what are the odds you have the time and money to source high quality ingredients, keep the kitchen clean, or improve the taste of the food?

The minor details are precisely the ones that require the least time and money to handle, so if those are being skimped on, it's likely that the major details are too, in my experience.

comment 2mo ago · link · parent

If you can't be bothered to get the minor details right, how can I be confident that you'll get the major ones right?

comment 2mo ago · link · parent

Android's permission system conflates the Bluetooth scanning permission with the "Fine location" permission, because in theory any app that can enumerate nearby Bluetooth devices (including things like nearby Bluetooth Low Energy beacons commonly found in stores and malls) could use that information to locate your phone within a few hundred feet.

It seems like there's a newer build option to explicitly disable the "Fine location" permission prompt while still being able to scan for Bluetooth devices, but such beacons are somehow filtered from the list if it's enabled, and it's only available for builds targeting newer Android versions.

comment 3mo ago · link · parent

Interesting, I didn't know that! I suppose I could edit my post accordingly, maybe a better example would be "the pharmacy won't let me get a refill until the date written on my prescription: Wednesday, August 12th 2026"? I think the point gets across regardless.

comment 3mo ago · link · parent

Dealing with dates becomes much simpler conceptually when you realize that you are actually dealing with two different ideas masquerading as one: dates, and the actual instants in time which they name. Instants in time can only be unambiguously referenced by measuring some fixed unit of time intervals from some commonly agreed upon event (e.g. seconds since the Unix Epoch).

Dates are a mapping from human-readable labels to instants in time; critically, this mapping is not a total function (there are dates that map to no instant in time in a particular calendar, such as October 5-14 1582 in the Gregorian calendar, or 2:30am March 8 2026 in US timezones due to DST), nor is it in fact a function at all depending on how you define your inputs (1:30am November 1 2026 in US timezones is ambiguous if you don't specify DST/ST).

Furthermore, the mappings (both for past dates and future dates!) can themselves change over time (changes to DST, timezones, and calendars such as in TFA), and you need to keep track of these changes in perpetuity, as well as at which instant in time they were implemented, and we don't necessarily have that information for some of these historical changes, we only have the date as written down, which itself can suffer from the ambiguity problem (is it the date pre- or post- calendar change?).

This makes dealing with past dates tricky, and dealing with future dates speculative at best. For instance, what's February 28th + 1 day? The answer depends on the calendar system and the year; we can answer it definitively for past years but not necessarily for future years (maybe in 2040 we'll move the leap day to December 32nd). This is why it's important to immediately convert past dates (and sometimes future dates, depending on the use case) to unambiguous instants in time, and only convert them back to dates for display purposes.

"Wednesday, August 12th 2026" and "8 days from now" are also semantically distinct for some purposes: if have 8 doses of a daily prescription left, I'm still going to run out in 8 days even if tomorrow the government decides to repeal the Gregorian calendar, thus changing the name of "8 days from now" from "Wednesday, August 12th 2026" to "Sunday, August 2nd 2026". My medication doesn't care what the government decides to call 8 days from now, I'm going to run out either way. The pharmacy, on the other hand, very much does care what the government decides to call 8 days from now, because perhaps they're closed on Sundays. The calendar change means that "8 days from now" went from being not-a-Sunday to a Sunday, affecting their operating hours.

It's really just another instance of one of the two hard problems in computer science: naming things.

comment 3mo ago · link · parent

Docker has made this much much easier than it used to be, and the ease of publishing images has led to many SaaS companies providing "dockerized" versions of their services.

I write a lot of Terraform to manage internal infrastructure with dependencies on other internal and external infrastructure that's outside of my control. I define a module parameter for each dependency (usually with a default value that points to the real service URL) and then create a second module that uses Docker to spin up and configure local instances of each dependency and overrides the corresponding parameter.

This makes local testing very straightforward: `terraform -chdir=tests apply`

comment 4mo ago · link · parent

Not to mention indirectly subsidised by ignoring the externalities imposed on the health of ourselves and our environment.

comment 4mo ago · link · parent

Fossil fuel being heavily subsidised kind of undermines both of your points.

comment 4mo ago · link · parent

Sometimes you're using git in a context where you don't control the filenames, or where a potential attacker could influence or fully control them, at which point edge cases like this can easily turn into exploits.

I also chafe whenever I run into artificial restrictions on things like characters in names of things, because there's no good reason for them besides the laziness of developers or the limitations and inertia of existing systems that might be used under the hood, like DNS for instance.

comment 4mo ago · link · parent

Poob has it for you.

comment 4mo ago · link · parent

I doubt you need an LLM for that, a diffusion model or perhaps even a deep CNN could probably do a passable job. You could train it by taking consecutive triplets of images [A, B, C] and providing [A, C] as inputs with B as the expected output.

comment 4mo ago · link · parent

My equally uninformed guess is that the presence of six empty boxes communicates that the code entered must be exactly six digits long in a way that a generic text input doesn't. It clearly delineates the digits which makes it easy to see how many you've entered and how many are empty, and the presence of an empty box suggests that it needs to be filled while a number that's simply shorter than the input field doesn't. At least, that's my steelman; maybe browsers should check if a field's min-length and max-length are the same and style them similarly?

comment 4mo ago · link · parent

So I don't have to spend 10-15 minutes saving all my open files (including the scratchpad ones I haven't named) and then later reopening all my applications, recreating all of my tmux windows and panes, setting up my vim splits and tabs again, and starting all of my stopped Docker containers?

comment 5mo ago · link · parent

Not that it detracts from your point, but PowerShell defined Linux-like aliases for PowerShell commands, not the old CMD.exe binaries.

So ls would actually match the behavior and accept the flags for Get-ChildItem, not dir.

comment 6mo ago · link · parent

If only there were some kind of third party we could all collectively agree to delegate enforcement of cooperation to...

comment 8mo ago · link · parent

>MinIO

I have some bad news for you: https://news.ycombinator.com/item?id=47000041

comment 9mo ago · link · parent

I'm pretty sure that if you need ubiquitous surveillance to ensure that your citizens don't commit crimes, you don't have a high-trust society, by definition.

comment 9mo ago · link · parent

Ah yeah, I guess I assumed by the use of the term "contructor" that GP meant a language like Python or Java, and in some cases it can difficult to prevent misuse by making an unsafe constructor private and only providing a public safe contructor that returns a sum type.

I definitely agree returning a sum type is ideal.

comment 9mo ago · link · parent

Given that the compiler can't enforce that users only enter valid data at compile time, the next best thing is enforcing that when they do enter invalid data, the program won't produce an `Email` object from it, and thus all `Email` objects and their contents can be assumed to be valid.

comment 9mo ago · link · parent

The far right are largely the people voting against robust safety nets and low inequality...

comment 1y ago · link · parent

You might be interested in IPFS [1], and content-addressed storage systems more generally.

[1] https://en.wikipedia.org/wiki/InterPlanetary_File_System

comment 1y ago · link · parent

You can directly pass JSON to Terraform by putting it in a `.tfvars.json` file [1], as far as I can tell this has been supported since v0.5.0 which released in May 2015.

Terraform doesn't have a built-in deep merge function, but it will merge `.tfvars.json` files in the order given on the CLI, if you specify multiple `-var-file` arguments. For what it's worth, as of Terraform 1.8, you can also use functions from third-party providers like isometry/deepmerge [2] to perform a deep merge.

[1] https://developer.hashicorp.com/terraform/language/parameter... [2] https://registry.terraform.io/providers/isometry/deepmerge/l...

comment 1y ago · link · parent

I look forward to the news stories about people getting lost because they used 100x "zoom" to read a distant sign.

comment 1y ago · link · parent

The -a models are typically released in the spring, the Pixel 9a was only just released in April of this year, so I wouldn't expect to see a Pixel 10a until March or April of 2026.
12345