News for hackers. Stuff that matters.
Re:Artificial intelligence is losing hype by torginus on Wednesday August 21, 2024 @04:31AM (#41308101)
This is what the AI is great at - the topics might be obscure to you but they are not that obscure in general, so the AI has had a lot of training data.

I've also assembled a Kubernetes cluster overnight, despite not knowing much about Kubernetes before, and I ran the kubectl files ChatGPT made for me past some devops folks, and it passed the smell test.

I consider much of coding to be a magic spellcasting tutorial - we do conceptually simple things, and the difficult lies in figuring out how to use novel libraries and get them to do what you want.

Edit: After checking out the Arduino sketch, I'd take issue with all the floating point calculations in there - most microcontrollers don't have FPUs, and the performance is awful on 8-bit AVRs. It's not great on Cortex M3s either as all this stuff is done in software, and each FP operation is like a hundred cycles.

I'd definitely try to rephrase the issue with integer math. It might work, but no self-respecting embedded dev would write like this.

Re:Artificial intelligence is losing hype by magicalhippo on Wednesday August 21, 2024 @04:57AM (#41308268)
> the topics might be obscure to you but they are not the obscure in general

Exactly, it's a very nice alternative to searching the web and discovering new stuff.

> most microcontrollers don't have FPUs, and the performance is awful on 8-bit AVRs.

I used to think like you. But then I realized the Atmega 328p is running at 16 MHz, so even hundreds of . As you can see here[1], it can do 94k double-precision FLOPS, more than enough for simple sketches like this. This jives with the benchmarks I did several years ago.

Sure if I was writing some tight control loop or similar I wouldn't use floating point.

[1]: https://kreier.github.io/benchmark/LinpackDP/

Re:Artificial intelligence is losing hype by torginus on Wednesday August 21, 2024 @05:14AM (#41308360)
Still it does not sit right with me - it might work, but figuring out the math with fixed point is not that hard, just requires some sitting down and thinking about it.

It's like I have some light fixtures in my attic that are connected with wires twisted together and covered with electrical tape - they certainly work and have done for a decade, but its still not right and I wouldn't recommend anyone do it this way.