Details
-
AboutWriting full-time embedded Rust professionally since 2019
-
SkillsC#, C++, Rust
-
LocationThe Netherlands
-
Website
-
Github
Joined devRant on 7/28/2017
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
I think you're conflating two things. The reason why the next big game isn't gonna be written in Rust is not (primarily) due to the language, but due to there not being a big engine that is written in Rust.
If you look at Unreal, that started out as a much simpler engine in the 90's. To be competitive you need so many resources nowadays. All big engines I know by name are pretty old already. I think one of the newer ones is Frostbite from around 2008 or so.
Not that people aren't trying: https://embark.dev/
This is a studio by one of the Dice Battlefield devs. They're the major driver of the game dev community in Rust now. -
@AleCx04 the point of unsafe is not that you should use it everywhere. You're supposed to create safe wrappers and abstractions with them. Then if something goes wrong, you'll know where to look.
Like, your statement doesn't make a lot of sense if you consider that C++ is unsafe everywhere!
Also, unsafe is not some cheat code where you are allowed to break every rule. Pretty much the only thing you can do in unsafe is calling other unsafe code and dereferencing pointers. Dereference the wrong pointer and bam, UB -
This tech stack is so high level that even the elevator to the top of the Burj Khalifa in Dubai doesn't reach it.
-
You joke, but...
https://security.googleblog.com/202... -
Even on the dirtiest grids, like Poland, an EV is still cleaner than an ICE over its lifespan. But the thing is that ICE cars cannot be made more clean while EVs can when you move away from fossil fuels for electricity generation.
EVs are also better for the local environments in cities.
Also, yeah, superchargers are Tesla only, but I guess you live in the US?
Because at least in Europe we standardized on a charging connector meaning that any car should be able to charge pretty much anywhere because the cables are compatible.
For some reason the US doesn't want to standardize which causes this weird thing of having to build Tesla infrastructure and 'everybody else' infrastructure at the same time.
But man, I'd love to drive an EV. Now I have to pay money to Shell and BP which is not great... -
Just be yourself and try your best
-
Oof, I know what you mean. Once I had a project I worked 1.5 years on full-time. Biggest project I had ever made in terms of complexity too.
It was almost deployed (2-3 weeks away) and could almost prove it's worth. But then my manager got fired and a higher-up guy cancelled my project.
2 months later, I quit there -
@aviophile Rust has been a stable language since 2015.
And you don't need all platforms to be supported. The only platforms you need is the platform you're using.
For me (and many others) that's Cortex-m and it works great 👍 -
@LotsOfCaffeine Rusts Sync + Send abstraction is also very nice when dealing with interrupts. To share data you must either use Atomics or some Mutex. If you know it's safe to access you can use unsafe as well, but there are nice libraries so you can avoid using unsafe.
For example, there's a library with which you can move data into a container that can only be accessed from a specific interrupt. That way you never have a race condition.
There are also entire frameworks like RTIC that do all of this for you. -
Oh well, then I'll tell my full-time embedded Rust colleagues to stop working on our projects 😉
If you tried embedded Rust before 2019, you should try again. It has improved massively!
But yeah, the only thing that really lacks is official vendor support. Espressif is working on it right now and Nordic had a job opening that desired Rust experience. So it's definitely going in the right direction. -
@deadlyRants ok, sure, they aren't clicky. They are clacky
-
I got the brown switches which IMO are the perfect middle ground between the blue and the red. It has a small bump and makes a lower pitched clicking sound.
-
@Stuxnet ok, so guns aren't the issue, right?
Well, then surely there's no problem with strict gun registration and a required psychological test before you can buy a gun, right? Make sure that everybody who owns a gun has to lock it in a vault at home? Background checks? Waiting period?
Any sane person would be able to pass these criteria. That'd make sure no stupid people have access to guns.
But no, the US isn't doing that. Only thoughts and prayers and thoughts and prayers endlessly in a cycle with each new shooting -
@pandasama also btw, I don't want to live in a country where if I had a child, it would have to do active shooter drills in class.
There are so many guns. It's insane.
And healthcare? It's top notch, but only if you're rich. -
@pandasama why are salaries high in the US? Well, is that really true? Some salaries are indeed higher, but many are far lower.
In The Netherlands when you lose your job, you'll get two years of pay compensation of 70% of your salary.
After the two years if you still don't have a job, you will get some financial aid. It's not a lot, but enough to live on (barely). This social security has a cost and it's generally the employers and high earners that pay for this.
So having an employee that makes less than one in a US equivalent role may just be as expensive to the employer -
@rantsauce that's because Rust uses that term. It has had to invent some words for the new concepts it introduced.
-
@Fast-Nop
1) Not true. Doing MMIO directly and writing custom memory and synchronization primitives requires unsafe. Most non-trivial things like writing a fast web server or creating a game engine don't require unsafe.
2) I've not seen this going on in both my enthousiast and professional work so far. My team and me have real deadlines and this has never come up as a solution.
Also, doing things in unsafe doesn't magically fix everything so often it's not even the fastest 'solution'. -
@Fast-Nop that most recent one is pretty fun to read about 😁
That one falls in the logic error catalog. Most of the other ones are from the Dark Arts (unsafe) sections of the code base which actually makes my point. Only the places where the user can (!= may) break the rules are the places where they are broken by accident. Even the people most aware of this make mistakes. So in entire codebases without these rules, of course you're gonna have bugs. -
@Crost of course you can. But unless you're performing the dark arts, only logic bugs will be there.
Memory safety errors are not there and neither are (most) of the multi threading errors.
So for example, the user could be shown the wrong number by accident. But at least that wrong number won't lead to a buffer overflow or something like that -
@lbfalvy most good tech is simple and boring. TOML is an example of simple and boring
-
JSON also isn't very nice for hand writing configs. I hate YAML.
If the config is simple enough, you could use something like TOML. That's a standardized INI like format -
Nothing has changed in the last couple of years for the Rust setup on windows.
Also, this is not Rusts fault, but Window's. Actually it's not even that.
MS has decided that the normal Windows user doesn't need to have a compiler and linker installed. And they are right. Many Linux distros just have the linker installed by default.
As to why Rust is so loved, well:
- Modern language with high performance
- Built-in language level safety features
- Build tool and package manager are standardized in Cargo
- A lot more awesome tooling, e.g. rustup
- Very good compiler errors and messages
And much more. Simply put, people who use Rust want to keep using Rust. -
I don't know why people have these experiences with Windows. I've never had that happen.
Did you postpone the updates for a month or two already or something like that?
I just shut off my PC every night when I go to bed and if it has updates, it will just install it then. -
On average I sleep around 7:15 hours per day. (7 at work days, 8 in the weekend)
This gives me 117.25 awake hours per week. Of those, I work 37 hours, so that makes ~31.6% without including vacations.
This doesn't count the time to get ready for work, traveling to work & the work breaks. -
@Voxera yes it does need calibration and the radio chip manufacturer describes the setup in which you can do that.
However, I made it so it was auto calibrating.
There are a lot of anchors and so every anchor is within receiving distance of a couple of other anchors.
We know the position of every anchor.
So when they synchronize to each other, we can calculate how far they think they are apart and compensate for that using the real distance they are apart.
I don't remember the numbers exactly but I think it was roughly that an uncalibrated device had an accuracy of 10-20cm and calibrated around 1-2cm -
@tosensei with RFID you need to be close to the device already, within 1-2 meters I believe.
UWB radio has a range of 50-150m so it would've been possible to track every device everywhere indoors at a ny time.
You could look up the location from your PC and then walk to that location -
It's a matter of getting used to. Same as any language. I thought so at first too, but I can read Rust code pretty fast now
-
@aviophile I wouldn't call a raspberry pi embedded 😅
Yeah, I've done a couple of things. Nrf52 & Stm32 mostly.
One of the projects required subnanosecond time synchronization between a lot of devices. Was really cool to make!
Everything was Rust. Tags, anchors, iot server, web backend and web frontend 😁
Would definitely do it that way again -
@aviophile I did make embedded Rust my full-time job, so, I saw it already and I hope you do too 🙂
-
Awesome! Rust embedded = best embedded 😁