How a broken elevator led to one of the most loved programming languages available today

Jimmy2x

Posts: 238   +29
Staff
The big picture: It's not uncommon for programmers to build and reuse one-off solutions to meet specific needs or overcome never-before-seen challenges. However, having that solution stay relevant, evolve, and flourish after 17 years is pretty uncommon. The Rust programming language has done just that, growing from one man's side project to one of today's most heavily supported open-source projects.

Seventeen years ago, Mozilla developer Graydon Hoare returned from work to find his building's elevator out of order. Forced to climb 21 flights of stairs, he became increasingly annoyed that a software malfunction caused his unplanned cardio session.

Hoare went on to pour these frustrations into a fast, flexible language project aimed at minimizing memory errors and preventing issues such as his elevator breaking down. The Rust programming language has since become a heavily supported open-source project for programmers ranging from small, solo projects to massive applications developed by technology giants like Microsoft and Amazon.

Programming languages such as C and C++ come with a tradeoff. They provide the flexibility needed to program functions required for an application's successful execution but, in turn, require developers to manage memory transactions carefully. Failure to account for these memory transactions can introduce crashing and instability within the application.

To ease the burdens of memory management, languages like Java introduced the concept of garbage collectors. These collectors are designed to clean up system memory periodically, minimizing the risk of memory errors. However, this comes at the expense of higher overall memory utilization and more resource draw to keep the collectors running.

Hoare attempted to create an effective and efficient programming language to bridge the gap between these legacy memory management approaches. While it requires developers to adhere to somewhat rigid coding rules, the language manages memory on behalf of the developer, ensuring any developed code is memory-safe.

By 2013 the language's supporters had refined Rust's memory management system to the point that it no longer required a garbage collector function. The language continued to mature and gain support from developers worldwide, prompting Rust's first official stable release in May 2015.

In 2022, the size of the Rust community had effectively tripled to more than three million users and was featured on the National Security Agency's (NSA) recommended list of memory-safe languages. This ranking put Rust in the company of other well-established household names such as Java, C#, and Ruby.

Rust's use in the automotive and aerospace industries and by IT companies, including Microsoft, Amazon, and Dropbox, continues to increase daily, decreasing overall reliance on legacy C and C++ development.

Permalink to story.

 
There are many things that broken elevators are known to cause, from becoming a toilet, to unwanted pregnancy. At least, this guy was able to get away easy. I personally hate Rust language, but it could have been worse.
 
Were elevators programmed in C/C++ ?
Are they now programmed in Rust?
In addition to the original story about Rust, the primary business purpose for the language was to replace C/C++ in web browsers. It was under Brendan Eich’s leadership as CTO that Rust’s development was sponsored by Mozilla and five years later that it reached stable V1.0. This happened one month after he was canceled and forced out of his newly promoted CEO position.

Anyways if you are interested in reading a more full story about Rust’s development, he recommended a specific story:
 
It is inferior to TypeScript, and completely superfluous, nobody really needs it.
Lol as far as I know TypeScript relies on a JIT compiler just like JavaScript whereas Rust compiles to machine code. That alone speaks volumes about the differences between them. There are going to be needs for Rust that TypeScript can’t fulfill based on that, and a JIT also means TypeScript becomes superfluous in those situations.

Obviously TypeScript is going to be focused on web development, and I would agree that using Rust isn’t typically worth it there, but in many other scenarios it’s a much better fit.
 
Were elevators programmed in C/C++ ?
Are they now programmed in Rust?

I'm curious, first of all how this guy knew it was software that stopped the elevator and even more curious how he knew it was a memory issue? Why would the elevator company tell him those details. And is the elevator company now programming in Rust?
 
I'm curious, first of all how this guy knew it was software that stopped the elevator and even more curious how he knew it was a memory issue? Why would the elevator company tell him those details.

Probably went like this. Hello mr repairman, why have you not fixed the lift yet?
Nothing wrong mechanically, just the software having issues.
So why do they not send a programmer to fix it
The programmers says its not the program its the memory issue
So why are you here?
Because we have a SLA to send someone within 1 hour. I just need to look busy.
 
My elevator stopped working, gotta go write another stupid language, damn it!
Weirdly, I quite like producing new stupid languages. I've even been quite proud of a few. There's always that hope that your new language will become popular but sadly the only person that ever uses them is me :(
 
I used Rust several times, and I didn't find it very intuitive. Probably it would be better if he thought of it on the toilet.

I have coded in a few programming languages over the years. Now I am stuck in JavaScript Framework/Library hell. There are various reasons why you can't use one programming language for all situations. Still, it would be heaven on Earth if we could all use Python to code everything and then recompile it to whatever language for deployment. It may have its own flaws, but it is the best programming language by far. There is no need for gazillion programming languages.

Just use Python and be happy.
 
I too came up with a programming language. It is based from experiences being stuck with nothing to do, but blame it on software issues. Such cases are stuck in an airport for hours, stuck in a broken elevator and yes, stuck on the toilet. I grimness, clenching my fist in anger. So in these times, I relaxed and came up with a new language. It is call "Profanity". It works well to sooth all of your problems.
 
LOL

Some comments are just: I'm not capable of learning Rust, therefore Rust is bad, just use Python. Or: Rust don't allow me to write code as bad and as unsecure as TypeScript, therefore Rust is useless.

Come on, we are looking at completely different programming languages, Rust is a Systems Programming Language. There's hundreds of reasons to why we don't write operating systems and drivers in Python and TypeScript, they cannot be compiled to Machine Code and they're too slow for this purpose (just imagine the overhead of a TypeScript GPU driver limiting your expensive GPU hardware).

Rust is meant to bring the performance of C and the safety of Automatically Memory Managed programming languages. It's obviously not easy. Have you ever tried to code in C or C++? Programming in C is easy, correctly managing the memory is the problem, add parallelism and concurrency on top and you're cursed. Rust is solving those problems, not the problems that Python or TypeScript are meant to solve, it's a completely different field in the programming space, although there's nothing stopping you from using Rust for whatever you want to, it's a general purpose language after all.

Idk about the elevator story, but he's clearly talking about reliability, not that unsafe programming languages caused the issue.
 
It's time to start pushing back on the myth that Rust is so loved. It's concept and what it can do in the right hands is well loved. Using it is not well loved because of its tick-inducing syntax and its completely foreign concepts of object lifecycle (most particularly the horrible management of ownership of objects causing compiler errors that can require a complete re-write of a major section of code to overcome).
 
"How a broken elevator led to one of the most loved programming languages available today" - So, apart from the language not being created because of a broken elevator and it obviously not being the most loved programming language, what exactly are we left with?
 
TypeScript is JavaScript with static types. It's very useful in the web development world, because you can use it to write modern web applications with type checking, but then it can be transpiled to different flavors of JavaScript to target older or newer browsers.

Comparing TypeScript to Rust isn't very useful. As mksrew pointed out, Rust is a system programming language and serves a completely different purpose than TypeScript and JavaScript.
 
It is inferior to TypeScript, and completely superfluous, nobody really needs it.
I am amazed by your reason because it's literally proof that you don't know what Rust is so you probably didn't even read the article. How can you compare Rust and Typescript, they are not even used to do the same things. Try building an elevator program in Typescript then try building a front end application in Rust and then you will understand that your comparison is nonsense.
 
It is inferior to TypeScript, and completely superfluous, nobody really needs it.

Maaaan, you can't even compare those two languages. I'm not a fan of Rust, and I think TypeScript is what JS should have been from the start, but let's not forget that TypeScript still hasn't got integer variables.

Can you imagine that? Running on CPUs where most of the instructions are integer-based, and where integer calculations are the fastests, a language still doesn't have proper integer support?? So, it can only be used for..... scripting. Hence the name: TypeScript.

For serious programming you need something a lot more serious. Like C++, or Delphi, or Go (in case of server programming). Rust is a successor to C++ but they have made it a bit too complicated. Still, Rust can squeeze the maximum out of hardware, while TypeScript (or JavaScript, or Pyton, or Ruby, or any such scripting lang) simply cannot. They waste a lot of CPU cycles, requiring stronger and more expensive hardware to achieve same performance.

Rust is simply much faster and much safer. But for most uses overcomplicated. Or should I say overkill.
 
I think TypeScript is what JS should have been from the start, but let's not forget that TypeScript still hasn't got integer variables.

Rust is a successor to C++

If you knew the painful history of JavaScript, you wouldn't be saying that.

And nothing will succeed C++, though many have tried. Rust will become actual rust in a few years, while C++ may carry on for a century.
 
I'm curious, first of all how this guy knew it was software that stopped the elevator and even more curious how he knew it was a memory issue? Why would the elevator company tell him those details. And is the elevator company now programming in Rust?
Probably a problem with the building management system.
 
Back