Readit News logoReadit News
alfiedotwtf commented on Ergonomic errors in Rust: write fast, debug with ease, handle precisely   gmcgoldr.github.io/2025/0... · Posted by u/garrinm
echelon · 15 hours ago
Are all of these proc macros worth it? The compile times for proc macros explode.

I'd rather hand-roll errors than deal with more proc macros. Or better yet, have code gen pay the cost once and never deal with it again.

alfiedotwtf · 14 hours ago
Cognitive load is more expensive than compilation time.
alfiedotwtf commented on Io_uring, kTLS and Rust for zero syscall HTTPS server   blog.habets.se/2025/04/io... · Posted by u/guntars
kbolino · 2 days ago
But what does "heap my_heap_var" actually mean, without a garbage collector? Who owns "my_heap_var" and when does it get deallocated? What does explicitly writing out the heap-ness of a variable ultimately provide, that Rust's existing type system with its many heap-allocated types (Box, Rc, Arc, Vec, HashMap, etc.) doesn't already provide?
alfiedotwtf · a day ago
> What does explicitly writing out the heap-ness of a variable ultimately provide, that Rust's existing type system with its many heap-allocated types (Box, Rc, Arc, Vec, HashMap, etc.) doesn't already provide?

To be honest, I was thinking more in terms of cognitive overload i.e. is all that Box boilerplate even needed if we were to treat all `heap my_heap = …” as box underneath? In other words, couldn’t we elide all that away:

    let foo = Box::new(MyFoo::default ());
Becomes:

    heap foo = MyFoo::default();
Must nicer!

alfiedotwtf commented on U.S. government takes 10% stake in Intel   cnbc.com/2025/08/22/intel... · Posted by u/givemeethekeys
x2tyfi · 2 days ago
Because it’s extremely lucrative and strategically valuable to the US
alfiedotwtf · a day ago
… but the shareholders are global?! That’s not really a compelling argument unless you made it a requirement that all major/strategic companies must have 100% domestic ownership!

BUT - all you then need to do is create a Delaware LLC that buys the strategic stock, which is owned by $SCARY_FOREIGNERS

alfiedotwtf commented on U.S. government takes 10% stake in Intel   cnbc.com/2025/08/22/intel... · Posted by u/givemeethekeys
scarface_74 · 2 days ago
There is no such thing as a “smallish” chip manufacturer that can manufacture leading edge chips. It’s about scale.

If it were that easy, Apple, Amazon, Google AMD, Nvidia, etc who all design their own chips would have done it.

alfiedotwtf · 2 days ago
Flip side: why would Apple, Amazon, Google, AMD, NVIDIA etc build their own when they can outsource it cheaper?

Companies are run to make a profit… they don’t care about sovereignty as long as the money is coming in.

alfiedotwtf commented on U.S. government takes 10% stake in Intel   cnbc.com/2025/08/22/intel... · Posted by u/givemeethekeys
alfiedotwtf · 2 days ago
Didn’t the US invade Iran when they did this to their oil industry? (Yes I know 10% is different to 100%, but wow… I thought the US shun commandeering of private companies?)
alfiedotwtf commented on Io_uring, kTLS and Rust for zero syscall HTTPS server   blog.habets.se/2025/04/io... · Posted by u/guntars
pornel · 2 days ago
This can be done with exclusively owned objects. That's how io_uring abstractions work in Rust – you give your (heap allocated) buffer to a buffer pool, and get it back when the operation is done.

&mut references are exclusive and non-copyable, so the hot potato approach can even be used within their scope.

But the problem in Rust is that threads can unwind/exit at any time, invalidating buffers living on the stack, and io_uring may use the buffer for longer than the thread lives.

The borrow checker only checks what code is doing, but doesn't have power to alter runtime behavior (it's not a GC after all), so it only can prevent io_uring abstractions from getting any on-stack buffers, but has no power to prevent threads from unwinding to make on-stack buffer safe instead.

alfiedotwtf · 2 days ago
In my universe, `let` wouldn’t exist… instead there would only be 3 ways to declare variables:

  1. global my_global_var: GlobalType = …
  2. heap my_heap_var: HeapType = …
  3. stack my_stack_var: StackType = …
 
Global types would need to implement a global trait to ensure mutual exclusion (waves hands).

So by having the location of allocation in the type itself, we no longer have to do boxing mental gymnastics

alfiedotwtf commented on How Not to Buy a SSD   andrei.xyz/post/how-not-t... · Posted by u/speckx
nyarlathotep_ · 2 days ago
> Honest question: after all the reports of co-mingled inventory, plain fakes etc. being sold by Amazon - for years i might add - do you really consider Amazon being a reliable source for anything that is not some unimportant trinket?

For me, it's just physical books, basically.

Occasionally, I'll order an Anker charger or something too.

alfiedotwtf · 2 days ago
See my comment above lol :)
alfiedotwtf commented on How Not to Buy a SSD   andrei.xyz/post/how-not-t... · Posted by u/speckx
Moru · 2 days ago
I'm curious with what you mean with "Even sold by Amazon". The last few years I see nothing but reports of cheap fake products over Amazon.

Years ago I ordered some T-Shirts to test and they were all fake versions that barely survived the first wash. Haven't ordered anything since then.

alfiedotwtf · 2 days ago
I ordered a Springer published book on Prolog from Amazon, and it was obviously printer but professional book publisher. The only difference was that almost half the physical dimensions of Springer’s usual books, and it looked as though it was printed from a DJVU file downloaded from the Internet!!
alfiedotwtf commented on AI tooling must be disclosed for contributions   github.com/ghostty-org/gh... · Posted by u/freetonik
ivanjermakov · 3 days ago
Hot take: if you can't spot any issues in the code review it's either good code, code that needs further changes, or review was not done properly. I don't see how "I used LLMs" fit here, because it means nothing to the quality of the code submitted.

If such mention would mean increased reviewer attention, then every code review should include it.

alfiedotwtf · 2 days ago
I feel like this is similar to the main-vs-master discussion years ago.

u/alfiedotwtf

KarmaCake day3946November 27, 2014
About
[ my public key: https://keybase.io/alfiedotwtf; my proof: https://keybase.io/alfiedotwtf/sigs/q-WkpFMtX65U6EPxZ5mYwpWZp-nWaZPd_fnLlkc7vbI ]

"We will not have any more crashes in our time."

- John Maynard Keynes, 1927

Contact details at https://www.alfie.wtf

View Original