HNHacker News
TopNewBestAskShowJobs

kam

1,146 karma · joined March 15, 2009

https://kevinmehall.net
submissionscomments
kam··on (Re)Using rustc components in gccrs
rustc_codegen_gcc is also a thing.
kam··on Safety Goggles for Alchemists
The reserved values can be used as tags in outer enum types. For example `Option<bool>` might encode `None` as 2. If you did `Some(transmute::<bool>(2))` it'd turn into `None`.
kam··on Critical Exploit in MediaTek Wi-Fi Chipsets: Zero-Click Vulnerability
They say that OpenWrt 19.07 and 21.02 are affected, but as far as I can tell, official builds of OpenWrt only use the mt76 driver and not the Mediatek SDK.
kam··on Ask HN: What runs L4-related microkernels/hypervisors these days?
> The only gripe I have with Rust's unsafe is that I can't mark methods with preconditions as unsafe while still requiring `unsafe` clauses within the function body.

This is being fixed in the 2024 edition. Or now, with `#[warn(unsafe_op_in_unsafe_fn)]`.

kam··on Jiff: Datetime library for Rust
`parse` is actually an inherent method on `str` that always exists: https://doc.rust-lang.org/core/primitive.str.html#method.par...

Its return type is generic, and here it's inferred from the left hand side. It's implemented using the `FromStr` trait, and you can equivalently write `Timestamp::from_str(t)`.

You're thinking of the "extension trait" pattern for using traits to add methods to existing types when the trait in scope, but that's not what's going on here. Jiff's `ToSpan` mentioned above is an example of that pattern, though: https://docs.rs/jiff/latest/jiff/trait.ToSpan.html

kam··on Show HN: Picohsm, a $5 open-source hsm
It says it encrypts the SPI flash with a PIN provided over USB on every boot...but if you can trust the host to store/handle the PIN, why can't the host do the rest of the cryptography too?
kam··on NASA regains contact with mini-helicopter on Mars
FLIR Chameleon3 connected via USB to a Intel Atom Linux SBC running ffmpeg to encode the video.

See EDLCAM in https://link.springer.com/article/10.1007/s11214-020-00765-9

kam··on How to build a IP geolocation database from scratch?
This is literally the most prominent thing on the https://ipinfo.io home page.
kam··on YouTube-dl fork with additional features and fixes
And archivists. And people who prefer a different video player app or unsupported device.
kam··on HashiCorp adopts Business Source License
They didn't take contributions under the MPL. They required their CLA too, giving them the rights to do this.

Contributors should consider it as a red flag when a project isn't willing to accept inbound contributions under the same terms as they grant to others.

kam··on Kickstarting a book to end enshittification, because Amazon will not carry it
They stopped sounding the alarm because they largely won that battle: The previous electronic voting machines everyone objected to had no paper trail and there was no way to verify that they were trustworthy. Modern electronic voting systems count paper ballots, and a recount can verify them by hand.
kam··on Rust vs. Julia in scientific computing
A race condition is not the same as a data race, and nondeterminism is not the same as undefined behavior.
kam··on Remote code execution in OpenSSH’s forwarded SSH-agent
It's exploitable only by a SSH server that you connect to with agent forwarding enabled (i.e. one that you're already trusting with access to your SSH keys).
kam··on NXP LA9310: A new platform for SDR and the 10-year-old AD9361 RF Transceiver
What's the software story for the VSPA DSP? Is that going to run user code, or a binary blob that does some filtering and sends I/Q samples to the iMX or USB3?

NXP doesn't share many details on the LA9310. Could just be too early, but it smells like a "you must convince a sales rep you're going to be a qualified customer and sign a stack of NDAs before you dare ask for a datasheet or instruction set manual" situation, which is unfortunate.

kam··on Joint statement by the Department of the Treasury, Federal Reserve, and FDIC
What large bank is not lobbying against regulations?
kam··on Nixpacks takes a source directory and produces an OCI compliant image
> "Tags", "registries", "base images", "extraCommands"... no thanks

All of which are optional. It's just doing the same thing as your tar commands.

kam··on Rust 1.63
Editions only guarantee that old code builds with new compilers, not vice versa. New features are added to all editions unless they require e.g. new keywords that are available only in new editions.
kam··on Rust 1.63
`std::thread::scope` takes a closure, and joins the threads after the call to the closure returns, rather than relying on `Drop`.
kam··on Voyager spacecraft begin to power down
The Mars Helicopter Ingenuity actually has a 2014-era 2.2GHz ARM phone SoC, the Snapdragon 801 (same chip as the Galaxy S5 and OnePlus One)

https://rotorcraft.arc.nasa.gov/Publications/files/Balaram_A...

kam··on Linode Managed Databases
Aurora Serverless v2 doesn't scale to zero, though. Minimum capacity costs $43/month.
kam··on Software Jailbreak for Any Kindle
Kobo eReaders come with support for syncing articles from Pocket out-of-the-box.
kam··on PipeWire: Bluetooth Support Status Update
`pactl` is the command line version
kam··on Re: Zlib memory corruption on deflate
It was fixed in 2018, but no release was made at the time https://github.com/madler/zlib/commit/5c44459c3b28a9bd3283aa...
kam··on Phone number has been used too many times
WebAuthn deliberately doesn't give relying parties a way to tell if two registrations are from the same device.
kam··on Security vulnerability in Rust standard library
> Does that mean that any Rust program compiled with any affected version of the standard library is affected?

Most programs don't use `remove_dir_all`, and a smaller fraction of those use it on a directory that untrusted actors can write to.

But yes, tracking down those that do is a challenge.

kam··on Don’t try to sanitize input, escape output (2020)
The sentence immediately after that is "And of course use your SQL engine’s parameterized query features so it properly escapes variables when building SQL"
kam··on Don’t try to sanitize input, escape output (2020)
They're calling the SQL query "output" (from the app to the DB server). The point is that the "bad characters" depend on the context, so it's the step where you combine trusted and untrusted data that you need to think about escaping or validating.
kam··on Professional maintainers: a wake-up call
"Sending them bugfixes for free" is both a benefit and a burden to an open source project. It takes maintainer time and effort to review the fix, test, make releases, etc, and that's a thankless job. When a company pushes their patches upstream, they're gaining a benefit for themselves (avoiding maintaining a fork), and potentially benefiting any other users who might be affected by the bug or want the same feature. But they're also adding to a maintainer's workload, and that's often the scarcest resource in open source.
kam··on Bumble claims IP rights on employee's open-source libs
California Labor Code section 2870
kam··on AWS free tier data transfer expansion
Backblaze B2 has separate hard spending limits for storage, bandwidth, and requests, which is an elegant solution to the "but what happens to your data if you hit the limit?" objections you often see in these threads.
← PreviousPage 2 of 6Next →