Hacker News new | past | comments | ask | show | jobs | submit | kapolos's comments login

No jailbrake.

```

Cartman enters.

Cartman: "Elon! You fatass, give me back my anal probe! I know you stole it."

Elon: "Why on Earth would I want your probe? I've got rockets, dude."

Cartman: "Respect my authoritah!"

Scene 3: Mark’s Meditation Zone

It's a digital realm with floating emoji. Mark (Indigo Butthead) levitates, reflecting the colors of the metaverse.

```


> I guess Rust and C++ also "pause the world"

Rust does not ship a garbage collector with your binary, so there is nothing to pause your code.

When the compiler adds those drop() statements, they just free the respective memory at runtime. There is no need to pause your application to do that.

The garbage collector needs to pause the application because it takes time to calculate in runtime which parts of the application memory are safe to clean. If the application was running in the meantime, there's no guarantee that the blocks it marked as "safe" are actually still so.


Yes, it's exactly as you say.

I did search for benchmark comparisons and bumped into one that had 2 orders of magnitude difference.

But naturally, isolated benchmarks can't encapsulate the whole picture because there's a world of difference between testing how fast a loop runs and performance in production.


I guess that arithmetic operations are not very slow in Python, but if you use objects, then Python performs complicated lookups for every field or method access.


If I recall correctly, the first time I used Java it was way back in JDK 1.1. It was amazingly slow. Of course, today's Java is fast enough for its domain, but I still enjoy throwing a jab at it here and there :)


Well, then you are just uninformed. Java can JIT compile hot loops to C speed. There is hardly anything it is not fast enough for, and if there is (a certain kind of HFT), then nor is a general purpose CPU (they use FPGAs).


What can I say, I like memes & jokes ¯\_(ツ)_/¯

On a more serious note, I think lighthearted content is what's needed when it comes to intro stuff. There are no puns in the Rust Book ( https://doc.rust-lang.org/book/ ) ;)


The Head First series uses similar techniques to help aid book learning. At least there is precedent :)


Indeed, thank you for catching it! I will make an update.

Thanks again!


Imho, Rust is not hard as in "high complexity hard", but it is hard as in "must practice to get good at".

All the little rules and new concepts add up and in the beginning it can be frustrating to have the compiler complaining. On the plus side, it's like a motorcycle - it doesn't take long to drive it safely & efficiently.

Learning Rust is fun, I wholeheartedly suggest it even if you don't end up using it at work.


I don't think motorcycles are a great analogy. They're way more dangerous for the driver than a car and you have to be constantly vigilant about your surroundings.


Yeah. If you start to get a bit too confident for your level, you'll just get yelled at by the compiler instead of ending up in the ER (if you're still breathing).

But I suppose the analogy is more along the lines of "it can be intimidating at first, but you can quickly figure out how to use it reasonably well".


You are right, I should have found a better one. I was between "bicycle" and "motorcycle" and I felt that bicycle would imply that learning is a breeze, so I went with motorcycle.


A tongue-in-cheek exploration of how Rust achieves memory safety & performance, for people interested in Rust coming from high-level (managed) languages.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: