HNHacker News
TopNewBestAskShowJobs

dxhdr

1,596 karma · joined March 26, 2013

submissionscomments
dxhdr··on 'WebAssembly Is Finally Usable, Almost'
What problems is WASI 0.2 and the Component Model solving? I've read the project goals but I still don't quite understand.

I mean, I guess having some defined interface between languages might be useful for some specific usecases, I just don't see what that has to do with WASM and I also don't understand how this complexity would be a net benefit to the broader ecosystem.

dxhdr··on Show HN: ChatGPT UI for rabbit holes
Very cool!

It seems to dead-end unexpectedly on some topics. For example, I delved "path tracing" -> "importance sampling" and it output a section on probability distribution functions (PDFs) but didn't offer any links to explore those further.

Highlight-to-delve would probably fix that.

dxhdr··on Most investments are bad. Here's why
> 1999, or any other year is arbitrary, and you probably can pick dates to make any investment strategy look good

I agree, that was partly my point!

dxhdr··on Most investments are bad. Here's why
If you bought gold in 1999 and kept it until today you would have 8x'd your money.
dxhdr··on Institutions try to preserve the problem to which they are the solution
> in regard to the NATO-Ukraine question Putin had by that time already achieved a successful, non-violent containment strategy. But ultimately he opted for the full-scale invasion in 2022 anyway.

Beginning in 2019, Ukraine went full-press on seeking NATO membership. In fact, they "voted 334 to 17 to amend the constitution to state Ukraine's strategic objectives as joining the European Union and NATO" [0]. Again, Ukraine went as far as amending their constitution to codify the goal of joining the EU and NATO.

Now, was that Putin's "real" motive for the 2022 invasion? Who knows, I'm sure there are a number of reasons. Putin frankly denied Ukraine's right to exist. But regardless, it is very clear that his rhetoric over the past 17 years, and subsequent actions, are at least consistent with the NATO issue.

> First, it wasn't an "ouster" - he fled to escape likely imminent charges of corruption and complicity in murder.

There was a revolution in Ukraine in 2014 and he was overthrown. On February 22, 2014 the "Ukrainian parliament voted to remove Yanukovych from office by 328 to 0" [1]. He fled that evening. I have no doubt corruption and any number of other things led to the revolution. Regardless, he was very anti-EU and pro-Russia and his removal from office directly led to the 2014 Crimea invasion and the start of the Russo-Ukrainian war. In fact, Russia began organizing troops outside of Ukraine the very same day Yanukovych was voted out and the invasion began 5 days after his removal [2].

> Second - if you really believe that whatever happens in the internal politics of one country is a "reason for", or can "provoke" another country into launching a full-scale invasion -- then I don't know what to tell you.

If one country has been saying for nearly 2 decades that if another country joins NATO it means war, and then that country ratifies their constitution to seek NATO membership, and then a war happens, is it really that surprising? When the two countries are already at war over allegiances in the first place?

[0] https://en.wikipedia.org/wiki/Constitution_of_Ukraine#2004_a...

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

[2] https://en.wikipedia.org/wiki/Russo-Ukrainian_War

dxhdr··on Institutions try to preserve the problem to which they are the solution
That's some hallucinated nonsense.

Putin gave an "explicit warning that Russia perceived NATO's eastward expansion as a threat to its national security" as early as 2007 in his Munich speech [0]. The Russo-Ukrainian war began in 2014 with the ouster of Yanukovych, who was pro-Russia and opposed closer ties with the EU [1]. Zelensky became president in 2019 and initially promised to end the Russo-Ukranian war, but instead continued to pursue NATO protection and in August 2021 "urged NATO members to speed up Ukraine's request for membership" [2]. Russia escalated the Russo-Ukrainian war and invaded Ukraine for a second time in February 2022 [3].

[0] https://en.wikipedia.org/wiki/2007_Munich_speech_of_Vladimir...

[1] https://en.wikipedia.org/wiki/Russo-Ukrainian_War

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

[3] https://en.wikipedia.org/wiki/Russian_invasion_of_Ukraine

dxhdr··on Bad property debt exceeds reserves at largest US banks
"Through the Treasury, the US Government actually booked $15.3 billion in profit, as it earned $441.7 billion on the $426.4 billion invested."

So over the 5 years of holding those assets, that's a rate of return of 0.7%?

dxhdr··on US will relax pollution-limiting rules for vehicle emissions
> Where people live, the infrastructure exists.

Have you tried using non-Tesla charging stations? It's a disaster! Those charging terminals are hastily thrown together pieces of junk, frankly. The hardware, software, billing, everything.

dxhdr··on Implementing Mario's Stack Blur 15 times in C++ (with tests and benchmarks)
One thing the article didn't mention is that a gaussian blur can be approximated with multiple passes of a box blur. Not sure how that would relate performance-wise to the discussed stack blur algorithm. The code would probably be a bit simpler, anyway.
dxhdr··on Home schooling's rise from fringe to fastest-growing form of education
Rich families already do this by sending their kids to private schools. Have you seen how expensive and competitive these schools are, even starting as early as Kindergarten?
dxhdr··on My personal C coding style as of late 2023
> But if your assertion checks don't run in release mode, and due to some bug, those invariants don't hold, well, your program is already going to exhibit undefined behaviour. Why not let the compiler know about the undefined behaviour so it can optimize better?

Usually in release mode you want to log the core dump and then fix the bug.

dxhdr··on Data-Oriented Design Principles
Mike Acton presented a great visualization of this in his 2014 DOD talk -- here's a link to just that clip: https://www.youtube.com/watch?v=rX0ItVEVjHc&t=1831s
dxhdr··on Try: run a command and inspect its effects before changing your live system
Try out Doom! You don't have to use evil-mode either if that's not your thing (I don't use it), just disable :editor evil in your init.el.

Personally I kind of view it like having a custom mechanical keyboard. Why not invest some time and money into making your tools more ergonomic and enjoyable? Yeah any keyboard will work, and any text editor will edit documents.

Text-editing aside, magit and org-mode are particularly nice in Emacs. Plus there's just something comforting knowing that Emacs will always be there for me, just the way I set it up.

dxhdr··on Making C++ safe without borrow checking, reference counting, or tracing GC
> But it is not 'a memory usage pattern not supported by the borrow checker'. You can absolutely write a crate with an API identical to slotmap without using unsafe.

I think that might actually be worse though, performance aside. You're performing memory / object lifetime management but the Rust borrow checker still would have no idea what's going on because now you've tricked it by using indices or an opaque handle instead of references. The program may compile just fine but could have use-after-free bugs.

At least with unsafe there's an explicit acknowledgement that the borrow checker is turned off.

dxhdr··on Making C++ safe without borrow checking, reference counting, or tracing GC
It's essentially a "user-space" memory allocator with it's own use-after-free and double-free checks, apparently because the language implementation isn't adequate. If anything it just reinforces the articles point that "borrow checking is incompatible with some useful patterns and optimizations."
dxhdr··on Making C++ safe without borrow checking, reference counting, or tracing GC
> In fact the pattern described in the article is a common pattern in Rust and I make use of it all the time; the library for making use of it is `slotmap`.

Slotmap uses unsafe everywhere, it's a memory usage pattern not supported by the borrow checker. It's basically hand-implementing use-after-free and double-free checks, which is what the borrow checker is supposed to do. Is that really a common pattern in Rust?

dxhdr··on Rust vs Zig Benchmarks
How do you measure cache line utilization with a flame graph? I'm not sure it's as simple as you're describing. Poor memory access patterns from heap allocations can kill performance via death from a thousand cuts. It's not about spending "X% of the time on allocation," it's about every computation spending unnecessary time reading and writing to the cache due to poor choice of allocation strategy. Custom allocators can ensure data layout fits the access pattern.

More specifically, arrays are about the fastest thing around, and handing out objects from within a preallocated array tends to give the best access performance by a large margin. From what I understand you basically have to sidestep the Rust borrow checker to achieve this. Which does raise some interesting questions.

I think the original poster was also saying that heap allocations are slow, which is true, but I agree it'd be easier to tell if your program is having trouble with that.

dxhdr··on Metformin shown to prevent long Covid
> My opinion doesn't lead to harm to other people, so you'll understand why I don't respect yours. Your right to swing your infected spittle ends where other people's mouths and noses begin.

Don't you have the ability to stay home and avoid breathing near other humans if you're so concerned? I'm confused by that statement. How is demanding reduced freedom for him more just than simply exercising your own?

dxhdr··on Ask HN: My GPT project has become a local hit but I can't afford the bill
This removes half the magic of interacting with ChatGPT. Users will quickly realize they're interacting with a dumb database rather than an AI.
dxhdr··on FDIC to hit biggest US banks with $16B bill for SVB clean-up
> Socialize losses + Medicare, Medicaid, ERC, unemployment, education, subsidize food, housing, solar, recycling etc etc.

I don't understand your point. Those other items are government services that I receive in exchange for paying taxes. Banking is a private for-profit enterprise, except when they mess up, then I pay for it. How are they the same?

dxhdr··on FDIC to hit biggest US banks with $16B bill for SVB clean-up
Privatize profits, socialize losses. No wonder it works when you can justify it like that.
dxhdr··on JPMorgan Chase Bank Assumes All the Deposits of First Republic Bank
> They claim a net windfall of $2.6B, with projected $2B in future costs associated with the takeover. So in some sense it cost them negative $2.6B; in some other sense (if those cost projections are accurate), negative $600M.

Additionally their own slides on the transaction highlight an "IRR > 20%." Who knows how they calculated that. Either way, JPM is definitely not losing money on this.

dxhdr··on Even Apple employees hate Siri and are skeptical of its future, new report says
That's kind of my point, it's a product that doesn't work. It's a language interface that can't understand language.

FWIW I tried many alternatives like "Bach classical music" etc to no avail.

dxhdr··on Even Apple employees hate Siri and are skeptical of its future, new report says
Had the same experience at a friends house trying to get Alexa to play Bach. I gave up after a half dozen attempts.

These products are just hilariously bad.

dxhdr··on Elixir and Rust is a good mix
> Other than that, what's the difference to using Rust's green threads, given that the developer knows what they are doing (but are still human and can make mistakes of course)?

An analogy: The BEAM process model is to "developers know what they are doing" as the Rust borrow checker is to "C developers know how to write memory safe code."

In other words, your program will have bugs. Your program will not correctly handle every failure mode. Your program will fail. The BEAM process model makes it so that a failure in one process won't take down all processes. And furthermore, after a process fails, there's always a deterministic way to recover from that failure without you the programmer having to think about it too hard.

The system is so robust that having processes fail on error conditions is encouraged. Once you really internalize this "let it crash" way of thinking and writing code, you only program for the happy path and let the process system handle the rest. The code ends up being much shorter and easier to understand. It's the complete opposite of writing code in something like Go, or I imagine Rust, where you explicitly handle or punt every error you can think of at every step.

And interestingly enough, despite not handling errors at every step, the share-nothing process model ends up being much more resilient in the face of errors.

dxhdr··on Elixir and Rust is a good mix
> Using Rust afterwards was great, plus it was faster than the BEAM. I guess, why not use Rust entirely instead of as a FFI into Elixir or other backend language?

Sure, you just need to reimplement light-weight threading with preemptive scheduling prioritizing latency over throughput, extremely robust fault tolerance with a supervision hierarchy, and runtime introspection with code hotloading capabilities. Maybe you could add frictionless distributed system support as well.

No big deal, why not right?

dxhdr··on A systematic critique of Bitcoin's value proposition
> What does it do better than other networks?

Provides you complete control over your money. You can send any amount to whoever you want, whenever you want, with no third parties capable of approving, disapproving, or delaying the transaction.

Obviously, there are downsides to that. But that's what it does better.

dxhdr··on GPT-4
> “General thinking” is much more than token prediction. Hook it up to some servos and see if it can walk.

Honestly, at this rate of improvement, I would not at all be surprised to see that happen in a few years.

But who knows, maybe token prediction is going to stall out at a local maxima and we'll be spared from being enslaved by AI overlords.

dxhdr··on SVB collapse: Peter Thiel’s role scrutinized as spark of bank run
I wonder if the SVB CEO sold shares 2 weeks ago
dxhdr··on FDIC – SVB FAQ
You lose money the instant rates go up. It doesn't matter whether you sell them or not. The only way to gain it back is for rates to go back down. Holding to maturity is irrelevant.
Page 1 of 12Next →