Readit News logoReadit News
estebank commented on RFC 9839 and Bad Unicode   tbray.org/ongoing/When/20... · Posted by u/Bogdanp
csande17 · 4 days ago
Unicode really is an impossibly bottomless well of trivia and bad decisions. As another example, the article's RFC warns against allowing legacy ASCII control characters on the grounds that they can be confusing to display to humans, but says nothing about the Explicit Directional Overrides characters that https://www.unicode.org/reports/tr9/#Explicit_Directional_Ov... suggests should "be avoided wherever possible, because of security concerns".
estebank · 3 days ago
The security concerns are those of "Trojan source", where the displayed text doesn't correspond to the bytes on the wire.[1]

I don't think a wire protocol should necessarily restrict them, for the sake of compatibility with existing text corpus out there, but a fair observation.

1: https://trojansource.codes/

estebank commented on The Core of Rust   jyn.dev/the-core-of-rust/... · Posted by u/zdw
swiftcoder · 5 days ago
I think you misunderstand the direction the author is coming from - Jynn is definitely not a newcomer to Rust who doesn't understand why things in Rust are the way they are
estebank commented on The Core of Rust   jyn.dev/the-core-of-rust/... · Posted by u/zdw
TylerE · 5 days ago
The venue bigger issue with rust as that the compiler is so bitchy it is actively hostile to incremental add-a-line-at-a-time incremental development.

Especially unused variables being a hard compilation error, not a warning.

estebank commented on Rust in 2025: Targeting foundational software   smallcultfollowing.com/ba... · Posted by u/wseqyrku
SkiFire13 · 10 days ago
> The orphan rule. I get it, but it's still annoying. We can do better than newtype wrappers

By that do you mean that there are better alternatives that Rust could adopt or that we need such alternatives (but they could not exist)?

estebank · 10 days ago
One option would be to ignore the orphan rule withing workspaces.
estebank commented on A deep dive into Rust and C memory interoperability   notashes.me/blog/part-1-m... · Posted by u/hyperbrainer
cozzyd · 21 days ago
I would think Embedded Linux would be one of the most desired use cases for rust (certainly it's a place where higher level languages are often not an option due to resource usage).
estebank · 20 days ago
It's a matter of what use cases are catered to by default, and what use cases are possible. For example, having debug symbols on by default makes it easier to start using the language and debug your applications, at the cost of more disk space and having to configure your project if your needs are different. I think the discussion would have more merit if the defaults weren't configurable. But of course, the choice of defaults is one that will be contentious no matter what. It should still be done following the Hippocratic Oath of "first, do no harm". And some of us need to accept that our usecases are more niche than others, including mine.
estebank commented on Java was not underhyped in 1997 (2021)   dylanbeattie.net/2021/07/... · Posted by u/SerCe
Tostino · a month ago
For certain problems. I'm looking forward to Project Valhalla finally landing, and the subsequent improvements that come later.

Getting the performance benefits of data oriented programming patterns is very exciting to me for allowing Java to run totally different classes of applications than haven't been practical until now.

estebank · a month ago
Valhalla is indeed the one effort that could close the biggest gap with native languages. Java Vs C or Rust for networked applications have comparable CPU utilisation with comparable throughput, but memory consumption can be >100x. Project Valhalla is the only thing that could potentially change that. The problem I do see is that even after the language and JVM have value types, the vast extense of libraries that people use are unlikely to change to leverage them. But for projects that control most of their own dependencies, it will be a clear win.
estebank commented on The borrowchecker is what I like the least about Rust   viralinstruction.com/post... · Posted by u/jakobnissen
jiggawatts · a month ago
There are scenarios where retrieving the just-inserted value without first cloning it isn't possible. E.g.: when inserting a value into a non-empty hashset and then needing it again immediately.

But yeah... that's a bit of a contrived example and can be solved by a simple change to the insert function without specialised support from the language.

estebank · a month ago
estebank commented on The borrowchecker is what I like the least about Rust   viralinstruction.com/post... · Posted by u/jakobnissen
burntsushi · a month ago
You're engaging in a motte-and-bailey fallacy. Your motte is your much more narrow claim about Rust's advantages in a context where you claim not to care about undefined behavior as a class of bugs more severe than logic errors. And you specifically make this claim in an additional context where a GC language is appropriate. That's an overall pretty easy position to defend, and if that were clearly the extent of it, I probably wouldn't have responded at all.

But, that context has been dropped in this thread, and instead folks are making very general claims outside of that very restricted context. Moreover, your bailey is that you don't do a good job outlining that context either. Your blog's opening paragraphs mention nothing about that more constrained context and instead seem to imply a very general context. This is much harder to defend. You go on to mention scientific computing, but instead of it being a centerpiece of the context of your claim, it's just mentioned as aside. Instead, your blog appears to be making very broad claims. But you've jumped in here to narrow them significantly, to the point that it materially changes your point IMO. Let's just look at what you said here:

> The first time someone gave be this advice, I had to do a double take. The Rust community's whole thing is commitment to compiler-enforced correctness, and they built the borrowchecker on the premise that humans can't be trusted to handle references manually. When the same borrowchecker makes references unworkable, their solution is to... recommend that I manually manage them, with zero safety and zero language support?!? The irony is unreal. Asking people to manually manage references is so hilariously unsafe and unergonomic, the suggestion would be funny if it wasn't mostly sad.

There's no circumspection about the context. You're just generally and broadly dismissing this entirely as if it weren't a valid thing ever. But it absolutely is a valid technique and it has real practical differences with an approach that uses raw pointers. If the comparison is with a GC and that context is made clear, then yes, absolutely, the comparison point changes entirely! If you can abide a GC, then a whole bunch of things get easier... at some cost. For example, I don't think it's possible to write a tool like ripgrep with its performance profile in a GC language. At least, I've never seen it done.

estebank · a month ago
> I don't think it's possible to write a tool like ripgrep with its performance profile in a GC language.

I think it is possible to make a language that has both a GC and a borrow checker, treating the GC types as a third level next to the stack and the heap, where complex referencial cycles can bé promoted to the GC, but the defaults push you towards fast execution patterns. Don't know if such a language would be successful in finding its niche. The only way I could see that, is of a non-gc mode could be enforced so that libraries can be written in the more restrictive, faster by default mode, while being consumed by application developers that have less stringent restrictions. This is no different in concept than Python libraries implemented in native languages. Making it the mode be part of the same language could help with prototyping pains: write with the GC and then refactor once at the end after the general design is mostly found.

estebank commented on The borrowchecker is what I like the least about Rust   viralinstruction.com/post... · Posted by u/jakobnissen
jakobnissen · a month ago
Author here. In scientific computing, there isn't much of a security implication of UB, and the most dangerous kind of error are when your program silently computes the wrong thing. And that is especially likely when you use indices manually.

You could say that UB enables all behaviour, including silently wrong answers, and you'd be right. But it's more likely to crash your program and therefore be caught.

Most importantly, the comparison to a raw pointer is not relevant. My blog post states that integers come with zero safety (as in: preventing bugs, not risk of UB) and zero language support and that is true. My blog post compares Rust with GC languages, not with raw pointer arithmetic. And it's clear that, when you compare to using GC references, manual indices are horribly unsafe.

estebank · a month ago
> And that is especially likely when you use indices manually.

But that is never the recommendation Rust practitioners would give for graph data structures. One would instead recommend using a generational arena, where each index holds their "generation". The arena can be growable or not. When an element is removed from the arena it gets tombstoned, marked as no longer valid. If a new value reuses a tombstoned position, its generation changes. This shifts the cost of verifying the handle is correct at the read point: if the handle corresponds to an index with a tombstone sentinel or has a different generation, the result of the read operation is None, meaning the handle is no longer valid. This is much better than the behavior of pointers.

estebank commented on The borrowchecker is what I like the least about Rust   viralinstruction.com/post... · Posted by u/jakobnissen
ameliaquining · a month ago
Fixing the get_default example wouldn't require interprocedural analysis. (It requires Polonius, which, yeah, has taken a long time to ship.)
estebank · a month ago
The get_default example requires only one to use the stdlib API: https://doc.rust-lang.org/std/collections/hash_map/enum.Entr...

u/estebank

KarmaCake day5308June 6, 2012
About
hn@kuber.com.ar
View Original