News for hackers. Stuff that matters.
Re:What? More 8-Bit Microcontrollers? by rtpg on Friday July 01, 2022 @05:09AM (#31944026)
I don’t want to go too much into C vs Rust but loads of C code out there, when it comes time to manipulate strings or do something a bit complicated, ends up a hacky mess.

For all the implications you are making about “move fast and break things” in web dev, at least newer tech stacks makes it easier to not completely break your data structures cuz the abstraction ceiling made doing things the right way hard.

Of course experienced C programmers “get it”, design their code in a way to avoid these pitfalls, and can right performant, correct code. I just think that it’s easier with a lot of other tools for stuff that’s just a bit complicated

Re:What? More 8-Bit Microcontrollers? by ChuckNorris89 on Friday July 01, 2022 @05:19AM (#31944095)
I feel you're mixing things up. Not every embedded application requires parsing strings or JSONs like you do with web frameworks.

AVRs and 8 bit chips in general are mostly used in various fixed point numerical control applications like CNC, industrial automation, elevator control, and white goods for the home like washing machines, HVAC, and microwave ovens, so for that they're perfect and so is C.

All they do is read some buttons and sensors, crunch some basic math, run a state machine, and turn some motors, LEDs and relays ON and OFF. That's it.

Complex string manipulations is something you'll never see on an AVR chip in such production applications.

Re:What? More 8-Bit Microcontrollers? by jjoonathan on Friday July 01, 2022 @04:32PM (#31952430)
Fixed point is a perfect example of an abstraction ceiling that makes it unnecessarily hard to do the right thing.

At first it's fine, but then you'll want to do some filtering, and then some coefficient buckets will start to overflow, and then you'll start tracking exponents, and before you know it you've sunk engineer months or years into an ugly, buggy, underpowered reinvention of floating point numbers.

Re:What? More 8-Bit Microcontrollers? by ChuckNorris89 on Saturday July 02, 2022 @09:31AM (#31958825)
I've shipped safety critical motor control embedded software that runs flawlessly on thousands of cars using only fixed point math without it being ugly, buggy or underpowered, precisely because everything was computed only in fixed point fractional math.

You're just making up FUD.

Re:What? More 8-Bit Microcontrollers? by jjoonathan on Tuesday July 05, 2022 @11:29AM (#31989372)
"It was good enough for me, so it should be good enough for everybody."

Lol.

Re:What? More 8-Bit Microcontrollers? by otter-rock on Saturday July 02, 2022 @04:55PM (#31962308)
Seems like you didn't need fixed point in the first place. It's for when you need guarantees.
Re:What? More 8-Bit Microcontrollers? by scoutt on Friday July 01, 2022 @05:28AM (#31944152)
I've worked on dozens of embedded projects that don't need string manipulation. Or just outputting some log string through a serial port, which is removed in release.

Why do you think you'll need to process input strings?

> just a bit complicated

Like what? Most embedded projects don't use concurrency, or even dynamic allocations. Not every projects is a hackable bluetooth/wifi stack, that you need Rust otherwise [insert favourite exploit FUD here]. It can be as simple as a toothbrush with two buttons and a motor.

Re:What? More 8-Bit Microcontrollers? by rtpg on Friday July 01, 2022 @10:32AM (#31946919)
I’m just talking about business logic and data structures. It seems fine to want to not have bugs in principle!

Though to your point when we’re talking about 8-bit microprocessors the amount of complications that could even be placed. I just feel like it’s totally normal to feel lacking when writing/reading certain kinds of code in C.

Re:What? More 8-Bit Microcontrollers? by scoutt on Friday July 01, 2022 @11:11AM (#31947484)
> business logic and data structures. It seems fine to want to not have bugs in principle!

I think there is no (embedded) language so far which prevents you from having bugs in business logic.

Re:What? More 8-Bit Microcontrollers? by pjmlp on Friday July 01, 2022 @06:06AM (#31944396)
Those Python programmers scared of learning C, can also use certified Pascal and BASIC compilers then.

https://www.mikroe.com/mikropascal

https://www.mikroe.com/mikrobasic