Readit News logoReadit News
jrpelkonen commented on Unexpected productivity boost of Rust   lubeno.dev/blog/rusts-pro... · Posted by u/bkolobara
akshay-deo · 3 days ago
Comparing anything with JS or TS would make it shine. The biggest problem I personally have with Rust is that there are a hundred ways (not literally ) to do one thing, which throws readability out the window, especially when you have developers at different levels of expertise.
jrpelkonen · 3 days ago
Can you elaborate or maybe give some examples about having too many ways to do one thing? I have never heard this complaint about Rust before.

Rust even has tooling (clippy) that warns about unidiomatic code.

jrpelkonen commented on Will Smith's concert crowds are real, but AI is blurring the lines   waxy.org/2025/08/will-smi... · Posted by u/jay_kyburz
jrpelkonen · 5 days ago
I wonder if there are two people reading this and wishing that Coldplay had employed this technology earlier this summer?

On a serious note, I find this trend of shoving AI everywhere pretty disturbing. For instance, I used to enjoy Spotify’s “Discover Weekly” feature to find new music, but these days it’s offering so many AI generated songs the experience is pretty jarring.

jrpelkonen commented on The borrowchecker is what I like the least about Rust   viralinstruction.com/post... · Posted by u/jakobnissen
umanwizard · a month ago
IMO, it is reasonable that in the example given:

  struct Point {
      x: f64,
      y: f64,
  }

  impl Point {
      fn x_mut(&mut self) -> &mut f64 {
          &mut self.x
      }

      fn y_mut(&mut self) -> &mut f64 {
          &mut self.y
      }
  }
the returned references are, for the purposes of aliasing rules, references to the entire struct rather than to pieces of it. `x` and `y` are implementation details of the struct and not part of its public API. Yes, this is occasionally annoying but I think the inverse (the borrow checker looking into the implementations of functions, rather than their signature, and reasoning about private API details) would be more confusing.

I also disagree with the author that his rejected code:

  fn main() {
      let mut point = Point { x: 1.0, y: 2.0 };
      let x_ref = point.x_mut();
      let y_ref = point.y_mut();
      *x_ref *= 2.0;
      *y_ref *= 2.0;
  }
"doesn't even violate the spirit of Rust's ownership rules."

I think the spirit of Rust's ownership rules is quite clear that when calling a function whose signature is

  fn f<'a>(param: &'a mut T1) -> &'a mut T2;

`param` is "locked" (i.e., no other references to it may exist) for the lifetime of the return value. This is clear once you start to think of Rust borrow-checking as compile-time reader-writer locks.

This is often necessary for correctness (because there are many scenarios where you need to be guaranteed exclusive access to an object beyond just wanting to satisfy the LLVM "noalias" rules) and is not just an implementation detail: the language would be fundamentally different if instead the borrow checker tried to loosen this requirement as much as it could while still respecting the aliasing rules at a per-field level.

jrpelkonen · a month ago
I found the arguments in this article disingenuous. First, the author complains that borrowchecker examples are toys, then proceeds to support their case with rather contrived examples themselves. For instance, the map example is not using the entry api. They’d be better served by offering up some real world examples.
jrpelkonen commented on I convinced HP's board to buy Palm and watched them kill it   philmckinney.substack.com... · Posted by u/AndrewDucker
jrpelkonen · 3 months ago
Interesting story, but the “DECIDE” framework definitely gave me strong “conjoined triangles of success” vibes.
jrpelkonen commented on Jepsen: TigerBeetle 0.16.11   jepsen.io/analyses/tigerb... · Posted by u/aphyr
matklad · 3 months ago
Oh, important clarification from andrewrk(https://lobste.rs/c/tf6jng), which I totally missed myself: this isn't actually a dereference of uninitialized pointer, it's a defer of a pointer which is explicitly set to a specific, invalid value.
jrpelkonen · 3 months ago
This is indeed an important point, the way I originally understood the bug was that the memory was not initialized at all. Thanks for the clarification
jrpelkonen commented on Jepsen: TigerBeetle 0.16.11   jepsen.io/analyses/tigerb... · Posted by u/aphyr
AndyKelley · 3 months ago
TigerBeetle uses ReleaseSafe optimization mode, which means that the pointer was in fact initialized to 0xaaaaaaaaaaaaaaaa. Since nothing is mapped to this address, it reliably causes a segfault. This is equivalent to an assertion failure.
jrpelkonen · 3 months ago
That’s good to hear! Thanks for the clarification.
jrpelkonen commented on Jepsen: TigerBeetle 0.16.11   jepsen.io/analyses/tigerb... · Posted by u/aphyr
jorangreef · 3 months ago
Thanks!

Yes, we have around 6,000+ assertions in TigerBeetle. A few of these were overtight, hence some of the crashes. But those were the assertions doing their job, alerting us that we needed to adjust our mental model, which we did.

Otherwise, apart from a small correctness bug in an internal testing feature we added (only in our Java client and only for Jepsen to facilitate the audit) there was only one correctness bug found by Jepsen, and it didn’t affect durability. We’ve written about it here: https://tigerbeetle.com/blog/2025-06-06-fuzzer-blind-spots-m...

Finally, to be fair, TigerBeetle can (and is tested) to survive more faults than Postgres can, since it was designed with an explicit storage fault model and using research that was not available at the time when Postgres was released in ‘96. TB’s fault models are further tested with Deterministic Simulation Testing and we use techniques such as static memory allocation following NASA’s Power of Ten Rules for Safety-Critical Code. There are known scenarios in the literature that will cause Postgres to lose data, which TigerBeetle can detect and recover from.

For more on this, see the section in Kyle’s report on helical fault injection (most Raft and Paxos implementations were not designed to survive this) as well as a talk we gave at QCon London: https://m.youtube.com/watch?v=_jfOk4L7CiY

jrpelkonen · 3 months ago
Hi Joran,

I have followed TigerBeetle with interest for a while, and thank you for your inspirational work and informative presentations.

However, you have stated in several occasions that the lack of memory safety in Zig is not a concern since you don't dynamically allocate memory post startup. However, one of the defects uncovered here (#2435) was caused by dereferencing an uninitialized pointer. I find this pretty concerning, so I wonder if there is something that you will be doing differently to eliminate all similar bugs going forward?

jrpelkonen commented on Parking_lot: Ffffffffffffffff   fly.io/blog/parking-lot-f... · Posted by u/shepmaster
vsgherzi · 3 months ago
Cool blog but a little concerned. I’ve never had to write anything this complex and multithreaded before but I would have thought that rust would guard against something like this better… isn’t fearless concurrency the tag line
jrpelkonen · 3 months ago
That’s still the tag line. The bug was in the part that did bit manipulation inside the concurrency primitive itself, and therefore not a concurrency bug as such.
jrpelkonen commented on Careless People   pluralistic.net/2025/04/2... · Posted by u/Aldipower
rottc0dd · 4 months ago
I think there are some similar remarks on Bill Gates in another good memoir by Microsoft co-founder Paul Allen [1]. Even on his school days, Gates was so sure he will not have a competition on Math, since he was the best at math at his school. When he went to Harvard, (which I somehow remember as Princeton(!) as pointed out by a commenter) and saw people better than him, he changed to applied math from Pure math. (Remarks are Paul's)

> I was decent in math and Bill was brilliant, but I spoke from experience at Wazzu. One day I watched a professor cover the black board with a maze of partial differential equations, and they might as well have been hieroglyphics from the Second Dynasty. It was one of those moments when you realize, I just can’t see it. I felta little sad, but I accepted my limitations. I was OK with being a generalist.

> For Bill it was different. When I saw him again over Christmas break, he seemed subdued. I asked him about his first semester and he said glumly, “I have a math professor who got his PhD at sixteen.” The course was purely theoretical, and the homework load ranged up to thirty hours a week. Bill put everything into it and got a B. When it came to higher mathematics, he might have been one in a hundred thousand students or better. But there were people who were one in a million or one in ten million, and some of them wound up at Harvard. Bill would never be the smartest guy in that room, and I think that hurt his motivation. He eventually switched his major to applied math.

Even Paul admits, he was torn between going into Engineering or Music. But, when he saw his classmate giving virtuoso performance, he thought "I am never going to as great as this." So, he chose engineering.

Maybe it is a common trait in ambitious people.

Edits: Removed some misremembered information.

[1] https://www.amazon.com/Idea-Man-Memoir-Cofounder-Microsoft/d...

jrpelkonen · 4 months ago
I’m pretty sure Gates went to Harvard, not Princeton.

u/jrpelkonen

KarmaCake day615February 7, 2012View Original