Rust, it is a pleasure to work with and far more flexible in where/what it can run then a lot of languages. Good oneverything from embedded systems to running on the web. Only really C and C++ can beat it on that, but those are farlesss pleasant to work with. Even if it is not as mature in some area quite yet, it just gets more support for things as time goes on.
I have been wanting to get into Rust, but as an Electronics Engineer I essentially only have experience coding on embedded devices along with python scripting for test automation and data processing (fuck MATLAB lol)
I am not a good at coding by any stretch. Everything I find on rust focuses on rust user-level or OS-level applications. Most of those concepts I don’t follow well enough in any case.
Do you know of where I can follow tutorials, find more information, and dive into HALs for embedded applications?
Rust actually has a shockingly good embedded story for some parts. ST-micro is very well covered. Espressif has first party support. Nordic parts are supported by Ferrous Systems who certify rust for ISO 26262 use. Msp430 is workable, but requires a fair bit of knowledge. The story is less good for anything else that’s not a Cortex part. RiscV is definitely getting there though.
https://doc.rust-lang.org/stable/embedded-book/
Ferrous systems knurling is actually a pretty incredible set of tools. I’d argue that they’re a better experience than most command-line c environments.
https://github.com/knurling-rs
They also have some pretty good walkthroughs for the Nordic and Espressif parts.
Perfect, I develop mostly on ST, Espressif, and some Nordic! I will check it out!
I would start by learning rust at a user level via the rust book to get you familiar with the language without the extra layers that embedded systems tend to add on top of things. Keep in mind that the embedded space in rust is still maturing, though it is maturing quite quickly. However one of the biggest limitations ATM is the amount of architectures available - if you need to target one not supported then you cannot use rust ATM (though there is quite a few different projects bringing in support for more architectures).
If you only need to use architectures that rust supports than once you have the basics of rust down take a look at the embedded book, the Discovery book and the Embedonomicon. Then there are various crates for different boards such as ruduino for the arduino uno, or the rp-pico for the raspberry pi pico, or various other crates for specific boards. There are also higher and lower level crates for things - like ones specific to a dev board and ones that are specific to a chipset.
Lastly, there are embedded frameworks like Embassy that are helpful for more complex applications.
If you have an avr you could just use avr-hal.
The documentation is ok and if you used to work with arduino it should be straight forward.
DotNet Core as a whole (C# + F# + other languages that are being ported to compile down to a DotNet binary).
Because it has all the things Java promised us - frictionless, painless, cross-platform programs - but is implementing it far better than Java ever could.
Honestly, DotNet Core is now at least a half-decade or more ahead of Java in terms of the base platform and C# language functionality/ease-of-use. The only advantage Java has at this point is it’s community ecosystem of third-party features and programs.
I remember my first job working with C# - this was the common sentiment: it’s a Java that is better than Java at being Java. I mostly agree with that.
Try using Kotlin some day, though. I consider that language to be even better than C#, and it additionally gets to leverage the JVM ecosystem.
Kotlin > C# > Java, in my book
And you can even run it in the browser with Blazor! Love C#
I’ve been meaning to give F# a go but I never seem to get around to it. Seems like an interesting language
Get around to it, F# is fantastic! 😄
And those are enormous advantages. It will also get you a lot more jobs. I see Java jobs everywhere. I barely see C job postings at all.
Good thing they weren’t talking about c.
Lisp, the language that has them all.
If I can choose a single language that’d be lisp. Very beautiful to write.
C, because it can run everywhere and I won’t be limited on the things I can make
Me waiting for all the C websites written in AngularC /s
Lol cgi page generators written in C were the OG web framework. Maybe perl too.
Python. Not even a competition. My love of programming quadrupled the day I switched to python and it’s getting stronger and stronger. I have now 10 years of professional python experience and around the same of C++ with occasional C#. A few projects in Go and Java. They all have ups and downs, but… Not even comparable how much everything is more elegant and simple in python
I don’t get it. I love python for small quick projects. But anytime things get more complicated, I find myself constantly tripping over myself without the strong typing and errors letting me know I when I’ve changed a property in a class that in falling elsewhere.
Python was always strongly typed. For years there has been optional static typing and - you know - unit tests.
If you’re having significant issues due to not knowing what types you’re using, the type system may not be your greatest problem…
Sorry, I meant static typing, not strongly typing. I often cross the two. But this is exactly what I mean, if you want something to be statically typed you have to put in the extra effort, if not you’ve got dynamically typing, which is fine when things are small but I find causes stumbling blocks when things get larger.
And depending on the scale of the project I’m working on, my unit tests usually take minutes to run, if not hours. If I’m debugging and I change a property, when I compile it instantly catches that I forgot to change it elsewhere. Hell, even when I save it I’ll get a little error warning. Maybe running unit tests all the time is fine if the project is small, but not if it’s large. I’m not going to run unit tests every time I’m starting a new debugging session. Linters kind of make up for this. But then we are back to making sure there are type hints, which, as I’ve been told, is not “pythonic.”
If people like it, more power to them, I’m not shitting on the language as even I like it. I just can’t use it for larger stuff, and I’ve never worked anywhere that uses it for larger stuff, and I think for good reason.
If you pick Python, do you still get libraries written in C or Rust?
I’d probably pick something esoteric and then just stop programming, tbh. I enjoy being a polyglot programmer, and learning many languages and learning from many ecosystems is incredibly interesting to me, far more than hyper-specializing in a single language would be.
I’d probably pick something esoteric and then just stop programming, tbh
I’ll just leave this here for your consideration… "Friendship is Magic ++
I thought Brainfuck was esoteric but this, this! My god what have you done
Though I would like to, I can’t take any credit, I’m just a huge fan of the project.
Dear God
Malbolge
INTERCAL
I’ve already made this choice. Switched from C++ to Go, and now I never want to touch another language at all. Since I’m not writing kernels or embedded, Go is pretty fast for everything else. Not very popular in gamedev, but that’s just a lack of 3rd party libs, specifically native graphics support.
As for other languages, I can’t justify unnecessary complexity that is generally welcome by those language communities. Go is straight simple yet powerful, and I admire that.
I think I’m with you on this one. As another polyglot, I’m hesitant to pick anything, but the language I like working with most, today, is ‘go’.
I think I would risk it and hope that ‘go’ gains libraries (or I just discovery existing ones) for other things I want to do later.
I like go for pretty much everything. Except working with arbitrary JSON. So painful.
That boils down to maps. With a few helper functions it’s not a big deal. I can’t remember when I needed to unmarshal JSON into map last time, tho.
I was working on that yesterday. 😂 Building a feature to resolve variables in a serverless config file to custom sources.
This would be my pick as well for all the same reasons.
Python. I’m in data science. Sure I could write all that code in C or C++, but my time spent coding all that extra boilerplate is better spent on analysis.
For me it would be C++.
Likely either C or C++, both languages have been around for a long time and both are still used in huge projects
COBOL because I am a fossil
Can’t have COBOL without COOL!
Yeah, but a rich fossil.
It would be C++. Its versatile enough to do everything with it.
Right? C++ feels like cheating. It has every conceivable feature, and you maintain sanity by not using most of them.
C, can build any other language from that :D
And if i am gonna be miserable, may as well inflict as many vulnerabities on everyone else while I am at it.
Unison. If it were to gain mainstream adoption, it would change the world. It’s a crazy futuristic idea and no one else seems to even remotely be approaching the same thing.
I took a look at Unison a short while ago when I saw it mentioned elsewhere on Lemmy and I’ll say what I said before: Their Hello World example, and by extension the rest of the language, looks very weird and unwieldy to me. With the repeating identifiers and relatively alien syntax I’m having a hard time seeing this catch on.
Functional languages aren’t for everyone.
I dabbled in Haskell, and my time with it was very enjoyable. I grew comfortable with the syntax over time, so I’d say try the language for a few days/weeks (really depends how fast you learn) and see how it makes you feel.
I definitely suggest trying out Haskell. I followed the Wikibooks guide, and ever since using Haskell, I haven’t been coding the same. Functional programming can be amazing.
I’ve never heard of Unision. A quick look at it and it seems interesting, but very foreign. I’ll try it out and give it my thoughts.
Just scanning through the docs and YouTube, it doesn’t seem to do anything that I can’t easily do with Go. What am I missing?
For me it would be C/C++.
That’s cheating; you only get to pick one.
Ok, then C++.