Posted: 04:21pm 15 Dec 2025 Copy link to clipboard
matherp Guru
VSCode now includes an AI extension GitHub Copilot. This for GBP10 per month gives access to multiple AI models Claude, ChatGPT, Gemini, etc. It integrates with VSCode and basically can write code for you with an extraordinary autocomplete capability that predicts the next code you are going to write - mostly correctly. You then just hit tab to accept the suggestion. But that is only part of the story. Today I/we have written a pretty comprehensive G-Code interpreter from scratch fully integrated into MMBasic. The technique I've evolved is to build the code step by step. At each step I swap AI and ask the new AI to review and correct the work of the previous one. Then I ask it to extend the code with the next step and repeat. Of course I still have to plan the steps and understand how the functionality would fit into MMBasic. I also need to understand the subject matter enough to know what I'm asking for. So, this morning I/we have written a 2287 line C function together with a 336 line header file. Obviously this will need some serious testing but this is the functionality implemented.
I then asked Copilot to review the file and provide a commentary:
Edited 2025-12-16 02:26 by matherp
Posted: 04:36pm 15 Dec 2025 Copy link to clipboard
PhenixRising Guru
Holy moly, Santa Mather arrived early.
This is soooo cool but don't forget that real CNCs don't use steppers and we already have PID.
Trapezoidal profiles are still great but a bit 20th century. I believe I already posted my S-curve routine (much more civilised) but I'll repost when I get off the road.
So freaking excited
Posted: 05:39pm 15 Dec 2025 Copy link to clipboard
ville56 Guru
this makes me thinking about how fast the changes in the programming business may occur in the near future and how people will be able to deal with that. I fear that many will be left behind even though they are good programmers at the moment or make them even unnecessary. On one hand I think it is good to be already retired, on the other hand it may be an interesting challenge to professionally work with AI support which I'm missing. Interesting times are comeing up ...
Posted: 05:49pm 15 Dec 2025 Copy link to clipboard
matherp Guru
I think programmers will become an extinct species very soon. I've always been a crap programmer but a good system designer/architect and systems analyst and this new environment is absolutely perfect for me. Thinking back to my career before IT management, the productivity I could have achieved with these tools is mind-blowing. Projects that took a year would have been completed in a month and the rate of change is only going to accelerate as the tools improve further.
Posted: 06:02pm 15 Dec 2025 Copy link to clipboard
RonnS Senior Member
It must have been another very rainy day in England.. but jokes aside, I think it's a good extension for small personal control tasks.
Ron
Posted: 06:30pm 15 Dec 2025 Copy link to clipboard
PhenixRising Guru
Small tasks?
Thanks to Pete and Volhout, I have exceeded every metric of high performance, megabuck controllers of not too long ago.
Now a picomite + Propeller P2 and OMRON's "fastest motion controller in the world" is a big old yawn.
No, the PicoMite is a serious industrial controller...I will accept any challenge.
Posted: 09:19pm 15 Dec 2025 Copy link to clipboard
karlelch Senior Member
This is very impressive indeed, Peter!
Not quite matching my experience with AI last weekend, when I tried to use it to debug a MMBasic driver for a 8x8 pixel distance sensor ... (In the sensor manual it said something that a small microcontroller would not handle the complex sensor, which requires transferring almost 90k of binary code to the chip via I2C - I could not let that stand and started to write an MMBasic driver.) In any case, I asked AI (I think Claude) to translate the Python code for the driver into MMBasic and did some editing. Then I asked AI (Copilot in VSCode) to check to code for any mismatches with the Python code as well as the original C++ code - that was really useful, as it discovered hard to find coding issues. The result was an almost working driver with two issues: It generated 8x8 pixel distance data but the distances were not in mm, and the 4x4 mode would not produce any data. Here, AI failed - even after several rounds with different models (Chat GTP, Gemini), I could not solve these issues. I think the main reason is that the models are not used to MMBasic code - I gave them the manual, the driver output, all source files, but they kept insisting on errors in the I2C code although I showed them examples in MMBasic (and that their suggestions did not correct the issues). It was an interesting experience realizing that I almost shouted at the AI that we just had discussed that point because it presented me the wrong solution again from two iterations before. At this level of detail (e.g. hardware driver), I think it matters a lot how much code the AI has seen - that's probably why coding in C(++) with AI support works so well. Anyway, since I spend so much time on it, I had to tell someone
P.S.: We should probably publish more MMBasic code ...
Posted: 09:14am 16 Dec 2025 Copy link to clipboard
hhtg1968 Senior Member
I do not often use AI for coding.
now i read this posts and asked chatgpt wether mmBasic is known... and then chatgpt explain mmBasic and lists examples and so on.
i am impressed and frightened at the same time. maybe we programmer really will become extinct.
Posted: 10:28pm 16 Dec 2025 Copy link to clipboard
dddns Guru
Didn't you hear the shot? It's done already
Bezos said, only creative jobs will survive. G-code is for sure not creative because it exists more than 40 years.