Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10709
Posted: 04:21pm 15 Dec 2025
Copy link to clipboard
Print this post
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
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1676
Posted: 04:36pm 15 Dec 2025
Copy link to clipboard
Print this post
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
ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 336
Posted: 05:39pm 15 Dec 2025
Copy link to clipboard
Print this post
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 ... 73 de OE1HGA, Gerald
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10709
Posted: 05:49pm 15 Dec 2025
Copy link to clipboard
Print this post
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.
RonnS Senior Member Joined: 16/07/2015 Location: GermanyPosts: 122
Posted: 06:02pm 15 Dec 2025
Copy link to clipboard
Print this post
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
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1676
Posted: 06:30pm 15 Dec 2025
Copy link to clipboard
Print this post
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.
karlelch Senior Member Joined: 30/10/2014 Location: GermanyPosts: 278
Posted: 09:19pm 15 Dec 2025
Copy link to clipboard
Print this post
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 ...
hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 153
Posted: 09:14am 16 Dec 2025
Copy link to clipboard
Print this post
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.
dddns Guru Joined: 20/09/2024 Location: GermanyPosts: 713
Posted: 10:28pm 16 Dec 2025
Copy link to clipboard
Print this post
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.
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4171
Posted: 10:54pm 16 Dec 2025
Copy link to clipboard
Print this post
Did he not include doctors, dentists, opticians, barbers, bin men, police, oh an so many others?
A world run by the techbros or along the lines they wish. No thanks.
George Orwell...
John Edited 2025-12-17 08:54 by JohnS
dddns Guru Joined: 20/09/2024 Location: GermanyPosts: 713
Posted: 11:09pm 16 Dec 2025
Copy link to clipboard
Print this post
Science fiction always told us what's next.
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2872
Posted: 11:35pm 16 Dec 2025
Copy link to clipboard
Print this post
maybe we programmer really will become extinct
And programming languages too.
Claude, create a machine code .uf2 file for a RP2040 that performs these functions:- blah, blah, blah. Using these sensors for input... And these devices for output... The user interface shall be a XYZ touch screen.
Then draw up the circuit diagram and design a PCB and PCB manufacturing files for it.
RIP MMBasic !
Edit. @Mixtel90, You can have the IP rights to this for just fifty quid!
Claude, create a machine code program for a ESP32 that performs these functions:- blah, blah, blah. Using these sensors for input... And these devices for output... The user interface shall be a XYZ touch screen.
Then wrap it in a loader program to transfer it from a Linux PC to the ESP32.
No more Arduino IDE :-) Edited 2025-12-17 10:55 by phil99
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3515
Posted: 01:15am 17 Dec 2025
Copy link to clipboard
Print this post
bin men
Happened between last April and now here in Florida. New system requiring a new special (and huge) bin eliminates the guy who used to empty the bin. Now the driver pulls alongside, and a big arm comes out and grips the bin and lifts it overhead to dump it into the truck.
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2872
Posted: 02:51am 17 Dec 2025
Copy link to clipboard
Print this post
New system... Now the driver pulls alongside, and a big arm comes out and grips the bin and lifts it overhead to dump it into the truck.
Have had that here for over 30 years. On older trucks the driver steers the arm to the correct bin. On newer trucks a computer selects the correct bin by the colour of the lid* and does the rest. As the bin is being emptied computer vision can record the presence of prohibited materials (and the address they came from). At the transfer station that load can be separated from the rest.
No doubt they are investigating AI drivers. Iron ore dump-trucks and trains have been driverless for a long time.
* There are four bin lid colours. Red - general waste, yellow - recyclables other than glass, green - compostable organic waste and purple - glass bottles and jars. Edited 2025-12-17 17:19 by phil99
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8373
Posted: 07:51am 17 Dec 2025
Copy link to clipboard
Print this post
@phil99 That assumes that I know in advance what I want the confounded thing to do...
First rule of programming: define the problem. But I don't know it yet. :)Mick
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1676
Posted: 10:08am 17 Dec 2025
Copy link to clipboard
Print this post
This is the most efficient s-curve that I have come across:
I have it in SmallBasic here:
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10709
Posted: 07:58pm 17 Dec 2025
Copy link to clipboard
Print this post
It works https://youtu.be/36vuRRbHHyA Shown running a typical spiral drilling profile. Note no lost steps and running fast. I slow it down in the end of the movie so you can see the actual x and y motion. There are two versions of the GCODE. One is fully integrated into MMbasic and allows the user to use variables in the GCODE as in the video. The second allows the user to use straight GCODE e.g. G0 X100 Y100. The axis setup as on the screen says I have 400 steps per millimeter and my maximum speed is 1600mm/minute and maximum acceleration is 100mm/sec squared. The acceleration for arc is calculated across the arc over the multiple arc steps. The acceleration for linear moves can be either trapezoid or s-curve at the user's discretion
dddns Guru Joined: 20/09/2024 Location: GermanyPosts: 713
Posted: 09:53pm 17 Dec 2025
Copy link to clipboard
Print this post
Two ideas: please take a look at the Heidenhain dialect introduced with TNC151/155 And in any case, radius compensation is a very practical feature