HN user

dxhdr

1,596 karma
Posts0
Comments357
View on HN
No posts found.

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.

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.

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

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

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.

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.

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.

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?

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.

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?

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?

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.

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.

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?

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.

GPT-4 3 years ago

“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.

FDIC – SVB FAQ 3 years ago

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.