Live data from Hacker News

A Rust shaped hole

mnvr.in

311–319 of 319 posts

Re: A Rust shaped hole

#311

Earlier quoted context omitted.

I think the issue was an async boundary - I was able to trace back to CoreFoundationLibrary but the trail ended there. Also, lldb was unable to get locals? Which is something I’ve not seen happen…

Were you inside the library itself, perhaps?

Yes. That’s where the crash happened. (obviously not the cause, but…)

Re: A Rust shaped hole

#312

> If someone posts a patch or submits a PR to a codebase written in C, it is easier to review than any other mainstream language. There is no spooky at a distance. [..] Changes are local. Lol, wut? What about about race conditions, null pointers indirectly propagated into functions that don't expect null, aliased pointers indirectly propagated into `restrict` functions, and the other non-local UB causes? Sadly, C's e…

That blog post is pretty close to describing Swift. :)

Re: A Rust shaped hole

#313

> If someone posts a patch or submits a PR to a codebase written in C, it is easier to review than any other mainstream language. There is no spooky at a distance. [..] Changes are local. Lol, wut? What about about race conditions, null pointers indirectly propagated into functions that don't expect null, aliased pointers indirectly propagated into `restrict` functions, and the other non-local UB causes? Sadly, C's e…

I was very surprised to read this too. Local reasoning is the antithesis of C.

Re: A Rust shaped hole

#314
post #298

Earlier quoted context omitted.

It’s not even close to as formal as the C++ specification because only one of them is an ISO standard, or more generally, an international standard. US corporations have massive influence over Rust since they bought seats on the board. Speaking of the board, it seems to me it’s all US based. The company working on the official spec is a Berlin LLC .

International standards have nothing to do with formality in the computer science sense. US corporations also have massive influence on the C and C++ specifications, just look at the brouhaha around Bloomberg and contracts for C++, for example. And the Rust Foundation does not author the specification, the Rust Project does. So in many ways, companies on the Foundation board have less direct influence than the compan…

My use of formal was from: “The standard is not intended to teach how to use C++. Rather, it is an international treaty – a formal, legal, and sometimes mind-numbingly detailed technical document intended primarily for people writing C++ compilers and standard library implementations.”

https://isocpp.org/wiki/faq/wg21 is still very US skewed, but much more diverse than both https://www.rust-lang.org/governance/teams/lang and and the foundation. The latter does influence the direction of the language: https://rustfoundation.org/safety-critical-rust-consortium/

Re: A Rust shaped hole

#315

Earlier quoted context omitted.

Were you inside the library itself, perhaps?

Yes. That’s where the crash happened. (obviously not the cause , but…)

Yeah, if you are crashing inside the library, you won't have access to locals in that stack frame. You'll need to unwind a bit to your own code until they become visible.

Re: A Rust shaped hole

#316
post #287

Earlier quoted context omitted.

As the response to that comment points out, you are confusing editions for ABI changes. Different editions are purely a source-level change in the language. All editions are ABI-compatible.

Not really, because one thing that apparently I haven't gotten across is that they don't cover semantic changes, only grammar ones for the most part. What is the compiler supposed to generate if code from edition X calls code in edition X + 10, with a lambda written in X + 5, expecting using a specific language construct that has changed semantics across editions, maybe even more than once? Everything compiling from…

It would work as intended? I’m not sure what problem you are trying to point out. The lambda would compile in the edition in which it is written, resulting in a code unit passed to the other crate(s). As mentioned, the ABI is stable across editions. To put in your words, there are no semantic changes to the ABI across editions.

Re: A Rust shaped hole

#317
post #314

Earlier quoted context omitted.

International standards have nothing to do with formality in the computer science sense. US corporations also have massive influence on the C and C++ specifications, just look at the brouhaha around Bloomberg and contracts for C++, for example. And the Rust Foundation does not author the specification, the Rust Project does. So in many ways, companies on the Foundation board have less direct influence than the compan…

My use of formal was from: “The standard is not intended to teach how to use C++. Rather, it is an international treaty – a formal, legal, and sometimes mind-numbingly detailed technical document intended primarily for people writing C++ compilers and standard library implementations.” https://isocpp.org/wiki/faq/wg21 is still very US skewed, but much more diverse than both https://www.rust-lang.org/governance/teams/…

Sure, and that’s the same as the Rust version, regarding formality.

And sure, corporate influence is worth talking about, but the point is C++ isn’t free of it either.

Re: A Rust shaped hole

#318
post #42

> And the very point of writing a native program in the first place is to make it feel solid. What does that mean, and what is it about native programs (i.e. programs AOT-compiled to machine code) that makes them feel solid? BTW, such programs are often more, not less, sensitive to OS changes. > realizing that I was just spawning complexity that is unrelated to the problem at hand Wait till you use Rust for a while,…

> What does that mean, and what is it about native programs (i.e. programs AOT-compiled to machine code) that makes them feel solid?

Im a little late here and as a Java user most of the time people tell me:

1. They just want to ship a binary. Most are not aware of Jpackage, but correct me if I’m wrong that just makes installers right? I’m hopeful that the “hermetic” work from Leyden will help here.

2. They frequently complain about Java’s memory usage, but don’t really understand how setting the heap size works and what the defaults are. I’m also hopeful that ZGC’s automatic heap sizing will solve this.

With those two features I think the view of Java will change, as long as there is good build tooling for them. It would be nice to make that the default, but that would break many builds.

Re: A Rust shaped hole

#319
post #301

Earlier quoted context omitted.

> What does that mean, and what is it about native programs (i.e. programs AOT-compiled to machine code) that makes them feel solid? BTW, such programs are often more, not less, sensitive to OS changes TFA also concludes Since I want native code ... I think by "solid" they mean as close to metal as possible, because, as you suggest, one can go "native" with AOT. With JS/TS (languages TFA prefers), I'm not sure how fa…

> I think by "solid" they mean as close to metal as possible A JIT compiler compiles your code to machine code just as an AOT compiler does, so I don't think that's what's meant here (and they don't mean the level of the source code because they consider Haskell to be "native").

Hm. TFA has the terms confused or uses them inconsistently, I guess.
Post reply on HN