Readit News logoReadit News
ameliaquining commented on Common Rust Lifetime Misconceptions   github.com/pretzelhammer/... · Posted by u/CafeRacer
wakawaka28 · a day ago
>They certainly know that you dont want to process garbage data from freed memory.

It depends on what you mean by "freed". Can one write a custom allocator in Rust? How does one handle reading from special addresses that represent hardware? In both of these scenarios, one might read from or write to memory that is not obviously allocated.

ameliaquining · a day ago
Both of those things can be done in Rust, but not in safe Rust, you have to use unsafe APIs that don't check lifetimes at compile time. Safe Rust assumes a clear distinction between memory allocations that are still live and those that have been deallocated, and that you never want to access the latter, which of course is true for most applications.
ameliaquining commented on Fedora: Open-source repository for long-term digital preservation   fedorarepository.org/... · Posted by u/cernocky
cevn · 4 days ago
I was ready to be mad in the comments, now I'm mad but in the other direction.
ameliaquining · 4 days ago
It seems that in 2003 (when Fedora Linux first launched) this project was pretty obscure and early-stage, so it's hard to blame Red Hat for not having known about it then. This kind of thing just happens sometimes.
ameliaquining commented on My Father's Instant Mashed Potatoes   astralcodexten.com/p/your... · Posted by u/nvader
jorgyak · 5 days ago
I predict this was not Scott. Since he sometimes slips his own reviews into the competition.
ameliaquining · 5 days ago
The finalist authors' identities were revealed in October when the contest ended. This post is by Chris Finkle of https://tereglith.substack.com. Scott Alexander didn't write any of this year's entries.
ameliaquining commented on My Father's Instant Mashed Potatoes   astralcodexten.com/p/your... · Posted by u/nvader
TimorousBestie · 5 days ago
The article boils down (pun intended) to, “you already accept all these things which I am glossing as basically instant mashed potatoes, so you should also accept LLMs.”

That’s why they not-so-subtly start calling them IMPs when they introduce the “abstracted version.”

It’s not merely an example. It’s the thesis of the article.

EDIT: Out of perversity, I skimmed the comments. The audience of Astral Codex Ten seems to share this interpretation, for whatever that’s worth.

ameliaquining · 5 days ago
I read the post as pretty clearly anti-LLM (and anti-instant-mashed-potatoes).
ameliaquining commented on My Father's Instant Mashed Potatoes   astralcodexten.com/p/your... · Posted by u/nvader
justsomehnguy · 5 days ago
ameliaquining · 5 days ago
Looks like this is the fourth submission, but the first to get any comments.
ameliaquining commented on My Father's Instant Mashed Potatoes   astralcodexten.com/p/your... · Posted by u/nvader
silisili · 5 days ago
Oh wow, I felt like I was reading my own kid's writing for a moment, as this is very much our situation. They get tired of hearing my long-winded tangents of potatoes being the ultimate food, and of course, my particular affection for mashed potatoes. I read once that humans can live on a diet of potatoes and milk, and I never bothered fact checking that despite me repeating it to them often - and asking guess what's made of potatoes and milk?

That aside, I'm guessing the author's aversion as a child is strictly texture based which is fair. Don't get me wrong, fresh prepared is better, but instant potatoes, especially the Idahoan brand, taste exactly the same to me. It's just that they're too perfectly thin and uniform, quite unnaturally so.

ameliaquining · 5 days ago
Some commenters allege that the author and his father prepared the instant mashed potatoes wrong; in particular, they dumped boiling water directly onto the flakes, which the directions on the package say not to do.
ameliaquining commented on My Father's Instant Mashed Potatoes   astralcodexten.com/p/your... · Posted by u/nvader
ameliaquining · 5 days ago
For what it's worth, he didn't win.
ameliaquining commented on Removed rust to gain speed   prisma.io/blog/announcing... · Posted by u/2233
ameliaquining · 10 days ago
An important part of the story here, not mentioned in this post but noted elsewhere (https://www.prisma.io/blog/from-rust-to-typescript-a-new-cha...), is that they gave up on offering client libraries for languages other than JavaScript/TypeScript. Doing this while mostly sharing a single implementation among all languages was much of the original reason to use Rust, because Rust is a good "lowest common denominator" language for FFI and TypeScript is not; it wasn't entirely about performance. If they hadn't tried to do this, they would likely never have used Rust; if they hadn't given up on it, they would likely still be using Rust.
ameliaquining commented on Nimony (Nim 3.0) Design Principles   nim-lang.org/araq/nimony.... · Posted by u/andsoitis
aw1621107 · 11 days ago
> Have two float types, one that can represent any float and one that can represent only finite floats. Floating-point operations return a finite float if all operands are of finite-float type, or an arbitrary float if any operand is of arbitrary-float type. If all operands are of finite-float type but the return value is infinity or NaN, the program panics or equivalent.

I suppose there's precedent of sorts in signaling NaNs (and NaNs in general, since FPUs need to account for payloads), but I don't know how much software actually makes use of sNaNs/payloads, nor how those features work in GPUs/super-performance-sensitive code.

I also feel that as far as Rust goes, the NonZero<T> types would seem to point towards not using the described finite/arbitrary float scheme as the NonZero<T> types don't implement "regular" arithmetic operations that can result in 0 (there's unsafe unchecked operations and explicit checked operations, but no +/-/etc.).

ameliaquining · 11 days ago
Rust's NonZero basically exists only to enable layout optimizations (e.g., Option<NonZero<usize>> takes up only one word of memory, because the all-zero bit pattern represents None). It's not particularly aiming to be used pervasively to improve correctness.

The key disanalogy between NonZero and the "finite float" idea is that zero comes up all the time in basically every kind of math, so you can't just use NonZero everywhere in your code; you have to constantly deal with the seam converting between the two types, which is the most unwieldy part of the scheme. By contrast, in many programs infinity and NaN are never expected to come up, and if they do it's a bug, so if you're in that situation you can just use the finite-float type throughout.

ameliaquining commented on Nimony (Nim 3.0) Design Principles   nim-lang.org/araq/nimony.... · Posted by u/andsoitis
echelon · 11 days ago
Holy shit, I'd love to see NaN as a proper sum type. That's the way to do it. That would fix everything.
ameliaquining · 11 days ago
I suspect that this would result in a lot of .unwrap() calls or equivalent, and people would treat them as line noise and find them annoying.

An approach that I think would have most of the same correctness benefits as a proper sum type while being more ergonomic: Have two float types, one that can represent any float and one that can represent only finite floats. Floating-point operations return a finite float if all operands are of finite-float type, or an arbitrary float if any operand is of arbitrary-float type. If all operands are of finite-float type but the return value is infinity or NaN, the program panics or equivalent.

(A slightly more out-there extension of this idea: The finite-float type also can't represent negative zero. Any operation on finite-float-typed operands that would return negative zero returns positive zero instead. This means that finite floats obey the substitution property, and (as a minor added bonus) can be compared for equality by a simple bitwise comparison. It's possible that this idea is too weird, though, and there might be footguns in the case where you convert a finite float to an arbitrary one.)

u/ameliaquining

KarmaCake day2740July 6, 2016View Original