HNHacker News
TopNewBestAskShowJobs

GrantMoyer

2,236 karma · joined April 3, 2024

submissionscomments
GrantMoyer··on I ditched Docker for Podman
Docker Engine without Docker Desktop is available through winget as "Docker CLI"[1].

[1]: https://github.com/microsoft/winget-pkgs/tree/master/manifes...

GrantMoyer··on Rv, a new kind of Ruby management tool
Pyright catches an awful lot of dumb mistakes I make in Python.
GrantMoyer··on Wildthing – A model trained on role-reversed ChatGPT conversations
Is there any reason to explicitly train for role reversal? Can't you instead swap the input labels on any instruct tuned LLM? The model is trained on both sides of the chat log either way, right?
GrantMoyer··on A deep dive into Rust and C memory interoperability
Rust bindgen[1] will automatically generate native Rust stucts (and unions) from C headers where possible. Note that c_int, c_char, etc. are just aliases for the corresponding native Rust types.

However, not all C constructs have idomatic Rust equivalents. For example, bitfields don't exist in Rust, and unlike Rust enums, C enums can have any value of the underlying type. And for ABI reasons, it's very commom in C APIs to use a pointer to an opaque type paired with what are effectively accessor function and methods, so mapping them to accessors and methods on a "Handle" type in Rust often is the most idomatic Rust representation of the C interface.

[1]: https://github.com/rust-lang/rust-bindgen

GrantMoyer··on Vet is a safety net for the risky curl | bash pattern
Try Arch Linux. It hits all your points except maybe 5.

1. It symlinks redundant bin and lib directories to /usr/bin, and its packages don't install anything to /usr/local.

2. You can keep most config files in /etc or $XDG_CONFIG_HOME. Occasionally software doesn't follow the standards, but that's hardly the distro's fault.

3. Arch is bleeding edge

4. Arch repos are pretty big, plus thete's the AUR, plus packaging software yourself from source or binaries is practically trivial.

5. Security is not the highest priority over usability. You can configure SELinux and the like, but they're not on by default. See https://wiki.archlinux.org/title/Security.

6. There are few defaults to adhear to on Arch. Users are expected to customize.

GrantMoyer··on A media company demanded a license fee for an Open Graph image I used
There's no implied license because the news site that told them to use the image — through the OpenGraph protocol — is (supposedly) not the rights holder.
GrantMoyer··on Valve confirms credit card companies pressured it to delist certain adult games
I don't think that can explain why they're only targeting certain sub-categories of porn, and it's also contradictory to the public statements by Valve:

> We were recently notified that certain games on Steam may violate the rules and standards set forth by our payment processors and their related card networks and banks

Individual games violating "rules and standards" doesn't really fit with prohibiting a category because of high rates of fraud.

GrantMoyer··on Helix Editor 25.07
I'd love for Helix to implement a "Kakoune mode". I develop on Windows at work, where Kakoune is not ideal, so Helix seems like it'd be a perfect fit, except I can't get over the keybindings. Its keybinding philosophy encourages verbosity instead of Kakoune's terseness, which bothers me more than it probably should, and as far as I can tell its keymap configuration isn't yet powerful enough to emulate Kakoune well.

Vim's inconsistent keybinds and behavior are what pushed me to Kakoune — which I find has more consistent and elegant bindings and behavior — in the first place, and Helix feels like a step backwards on that front.

GrantMoyer··on Most ints are not floats
> On average the precision is equal. The mantissa just adds linear segments to a logarithmic curve.

Yes, exactly; the linear regions are needed to more evenly distribute precision, while the average precision remains the same. Alternatively, you can omit the mantissa, but use an exponent base much closer to 1 (perhaps 1 + 2⁻²³).

GrantMoyer··on Most ints are not floats
Without a mantissa, way too much precision is allocated to the near zero range and not enough to the "near infinity" range. Consider that without a mantissa, the second largest float is only half of the largest float. With a 23 bit mantissa, there are 2^23 floats from half the largest to the largest.
GrantMoyer··on Weird Expressions in Rust
Haskell has `bottom`[1] (see also [2]), which acts like Rust's `return` from a type checking perspective.

I wouldn't call using a uninhabited type for the type of a return expression theoretically inelegant. On the contrary, I find it quite pleasing.

[1]: https://wiki.haskell.org/Bottom

[2]: https://en.wikipedia.org/wiki/Bottom_type

GrantMoyer··on Fairphone 6 is switching to a new design that's even more sustainable
My phone is not the only device I use my ear buds with. Having to contantly attach and remove a usb-c adapter would be a complete pain in the ass. It's not just a matter of plugging it in — which would already be bad enough. I'd also need somewhere to store it, and I'd need to pack and unpack it each time. All that, or I could just buy a phone with a standard headphone port.
GrantMoyer··on New US visa rules will force foreign students to unlock social media profiles
Any law that allows a government to renounce people's citizenship for broad, vague reasons is a very, very bad law. Regardless of its intentions, it will be used as a tool to subvert the rights of citizens even outside the target group.
GrantMoyer··on WhatsApp introduces ads in its app
The problem with this is that once enough people are paying for an ad-free subscription, services reintroduce ads to the paid subscription, sometimes alongside the introduction of a new more expensive ad-free subscriotion.
GrantMoyer··on An origin trial for a new HTML <permission> element (2024)
It depends on how styleable the <permission> element ends up. I don't imagine any website will use it if it's limited to being an ugly default button with non-configurable text. But if the button is configurable enough, there's nothing to stop websites from abusing it for permission spam, just like the current model is.

Basically, I expect users wil stil need a way to defend against permission spam.

GrantMoyer··on An origin trial for a new HTML <permission> element (2024)
Google's trial has "allow on every visit" and "allow this time", but "block on every visit" is conspicuously missing.
GrantMoyer··on Endometriosis is an interesting disease
I think it's probably just really hard to diagnose uncommon diseases in people (although endometriosis in particular may be fairly common). I have trouble diagnosing some bugs in software at my job; I imagine it's much harder to diagnose issues in a human body.
GrantMoyer··on Why agents are bad pair programmers
Claude Plays Pokemon is kind of an interesting case study for this. This sort of knowledgebase is implemented, but even state of the art models struggle to use it effectively. They seem to fixate on small snippets from the knowledge base without any ability to consider greater context.
GrantMoyer··on What was Radiant AI, anyway?
I think Starfield gets a lot more flak than it deserves. Yeah, compared to Fallout 4, where there's something hand placed to observe or interact with seemingly every 100 ft in any direction, the world feels barren. But I think the departure is intentional; Starfield felt much more like a spiritual successor to Daggerfall than to anything since Morrowind. Overall, I spent less time in Starfield than in older Bethesda titles, but I liked what was there, despite it being less dense, and I spent more time than I have in many other games.

Why should Bethesda have to refine the same exact formula over and over? That would just turn into what Ubisoft does with Assassins Creed, pumping out soulless entry after entry into the franchise. In other words, Starfield was Bethesda taking a risk and trying to introduce unique features rather than releasing yet another another predictable "Bethesda RPG".

GrantMoyer··on Covert web-to-app tracking via localhost on Android
I agree it's not hacking, but the Computer Fraud and Abuse act seems to have a pretty broad definition of computer fraud and abuse. In particular, the technique seems like it might (emphasis mine) "knowingly and with intent to defraud, accesses a protected computer without authorization, or exceeds authorized access, and by means of such conduct furthers the intended fraud and obtains anything of value …". Would the other person have a reasonable belief that they didn't authorize access to information which their OS attempts to prevent access to?

I'm not a lawyer, so my question is genuine.

GrantMoyer··on KDE for Windows 10 Exiles – Upgrade your software, not your computer
I find Plasma much more pleasant to use than Windows' shell. There's no specific big feature that makes it stand out, but it works just a little more smoothly in almost everything it does.

Maybe it's a case of [1], but I think Plasma is ready for the average desktop user. The other parts of the system may have some ways to go.

[1]: https://xkcd.com/2501/

GrantMoyer··on Covert web-to-app tracking via localhost on Android
Would an individual using this technique to collect information from someone else's computer possibly face prosecution under the Computer Fraud and Abuse act?
GrantMoyer··on Bagel: Open-source unified multimodal model
Nice, it's really an open source model, Apache 2.0.
GrantMoyer··on Animated Factorization
1. Set var factors to the prime factors of the integer

2. Sort factors in ascending order

3. Set var diagram to a single dot

4. Foreach factor in factors

4.1. Set var diagram to factor copies of diagram aranged in a circle

GrantMoyer··on AI in my plasma physics research didn’t go the way I expected
The field of neural network research is known as Deep Learning.
GrantMoyer··on Initialization in C++ is bonkers (2017)
The problem is that the initialization semantics are so complex in C++ that almost no programmer is actually empowered to exercise their final say, and no programmer without significant effort.

And that's not just said out of unfamiliarity. I'm a professional C++ developer, and I often find I'm more familiar with C++'s more arcane semantics than many of my professional C++ developer co-workers.

GrantMoyer··on Python lib generates its code on-the-fly based on usage
I'm kind of dissapointed this doesn't override things like __getattr__ to generate methods on the fly from names just in time when they're called.
GrantMoyer··on Show HN: Semantic Calculator (king-man+woman=?)
These are pretty good results. I messed around with a dumber and more naive version of this a few years ago[1], and it wasn't easy to get sensinble output most of the time.

[1]: https://github.com/GrantMoyer/word_alignment

GrantMoyer··on When Compiler Engineers Act as Judges, What Can Possibly Go Wrong?
Direct link to the GitHub thread the post is about: https://github.com/llvm/llvm-project/issues/72413
GrantMoyer··on Matt Godbolt sold me on Rust by showing me C++
C++ has this[1], kind of, but please don't actually use it.

> for_each(a.begin(), a.end(), std::cout << _1 << ' ');

Also, Scala has something similar as a first class feature[2].

[1]: https://www.boost.org/doc/libs/1_88_0/doc/html/lambda.html

[2]: https://scala-lang.org/files/archive/spec/3.4/06-expressions...

← PreviousPage 2 of 12Next →