Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
64 user(s) are online (44 user(s) are browsing Forums)

Members: 0
Guests: 64

more...

Support us!

Headlines

 
  Register To Post  

New Port: Paho MQTT C and CuraEngine for AmigaOS4
Just popping in
Just popping in


See User information
Hi everyone,

I wanted to share some exciting news regarding a project I’ve been working on. I have successfully ported the Paho MQTT C library to AmigaOS4.

To be honest, I don’t consider myself a professional developer—I am still a beginner in many ways. However, I wanted to experiment with AI-assisted development to see if it could help bridge the gap for porting libraries to our platform. To my surprise, I managed to complete the Paho MQTT port in just 4.5 hours.

Progress & Testing
Environment: The entire development and compilation were done using QEMU/Pegasos2 emulation on a MacBook Air M4.

Results: I successfully compiled the included examples and connected to my local MQTT server running on a Raspberry Pi. I was able to publish topics without issues.

CuraEngine: Additionally, I spent about 1.5 hours porting CuraEngine 15.4.6. The command-line tool works correctly on my emulated AmigaOS4; I tested slicing both binary and ASCII STL files with success.

Call for Feedback
I am releasing the source code on GitHub. Since this was a fast-paced experiment heavily aided by AI, I would love for more experienced Amiga developers to take a look at the code. I am curious to hear your thoughts on the quality of the implementation and how the AI handled the Amiga-specific requirements.

GitHub Repository: https://github.com/ldg72/paho.mqtt.c-amigaos4

I hope this can be useful to the community and perhaps spark a discussion on how AI can help us bring more modern software to AmigaOS4.

Best regards, Luca De Giovanni


Edited by ldg72 on 2026/1/24 5:43:19
AmigaOS4.1FE & AmigaOS3.2 on MacMini M1 - MacBook Air M4 - Raspberry Pi500+
Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Just popping in
Just popping in


See User information
That is very cool!

Alien Air Attack

SAM440@733 mhz as main amiga.
Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Quite a regular
Quite a regular


See User information
I don't know enough about these things and... I hate ‘AI’.
If the code was based on ‘AI’, as far as I'm concerned, it ‘doesn't exist’ – it's sludge.

I'm just expressing my opinion and I hope you won't be offended
I'm sure you put a lot of work into it and it works great.

Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Just popping in
Just popping in


See User information
@ldg72

It's quite impressive that AI was able to help, considering that it's very biased when it comes to code, assuming most of the data used by the LLMs comes from linux, some from windows, and presumably not a lot of source code comes from OS4 projects.
I took a quick look at the client source code and there's a lot of platform-dependent code in there. I'd replace the calls to malloc() with calls to AllocVecTags() but I don't know if that's necessary or more of a principle when porting code.

It begs the question whether AI would be helpful with porting FireFox, as the main obstacle is the broad array of libraries that need to be ported and endian conversions needed all over the place.

Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Home away from home
Home away from home


See User information
@AlexC
Quote:
It begs the question whether AI would be helpful with porting FireFox, as the main obstacle is the broad array of libraries that need to be ported and endian conversions needed all over the place.
The main problem porting modern browsers like FireFox or Chromium to AmigaOS is no longer the libraries, but even much lower level parts like support for the programming languages used, for example Rust in case of FireFox.
And of course still assembler for the JavaScript JIT (no PowerPC support any more, even if it was unfinished and unusable, a PPC port was at least started for JavaScriptCore, usually not even any big endian support any more in any parts) and WebAssembly.
Additionally required, compared to about 15-20 years ago with OWB:
A 3D gfx library like Skia for Chromium, instead of the 2D Cairo gfx library (+ some small AmigaOS 4.x parts) used in OWB, support for colour outline fonts (not only for emoji, at least FireFox uses them for GUI parts as well, and colour outline fonts aren't supported by AmigaOS at all yet, i.e. you'd need to use something like the much slower libfreetype instead of native AmigaOS text rendering OWB used).

Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Not too shy to talk
Not too shy to talk


See User information
@smarkusg

wow

Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Just popping in
Just popping in


See User information
@joerg

Quote:
joerg wrote:
support for colour outline fonts (not only for emoji, at least FireFox uses them for GUI parts as well, and colour outline fonts aren't supported by AmigaOS at all yet, i.e. you'd need to use something like the much slower libfreetype instead of native AmigaOS text rendering OWB used).


But OS4 itself also uses FreeType. At least there's an Amiga makefile included in every source archive. Where does this speed increase originate? Assuming OS4's font engine hasn't simply been highly fine-tuned.

Sorry, this is getting OT, but I am genuinely curious.

Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Just popping in
Just popping in


See User information
@smarkusg

I respect your opinion, don't worry, no offense taken!

Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Just popping in
Just popping in


See User information
@AlexC

Thanks a lot for your technical observations which I find truly interesting and valuable for improving the project. To be honest with you and the entire community I do not consider myself a C expert at all as my programming knowledge is actually quite basic. This is why I find it surprising that I was able to complete such a port because without the help of AI I would never have made it. For me AI has been a tireless tutor that allowed me to learn coding concepts while producing something useful and I believe this is a fundamental point for the future of AmigaOS. A clear example happened during the CuraEngine port where the AI initially pointed out the PowerPC big-endian issue but then during the conversion it actually forgot to handle the little-endian to big-endian transition. While testing the program I noticed it wouldn't read binary STL files even though ASCII STLs worked perfectly so I remembered the issue and explicitly asked the AI if we had done the conversion. Only after this correction of mine and a new compilation did CuraEngine start reading binary STL files correctly. I am currently also developing my own project from scratch which is a video processing program that uses ffmpeg and a MUI graphical interface. This is primarily an educational project for me and AI is helping me immensely to understand the complex logic behind MUI development. I must say that sometimes the AI makes mistakes and in those cases it is actually me who by studying the code and the SDK manages to correct it. It is a very active way of learning and today I wouldn't find any human tutor able to teach me how to program on Amiga so this has become a significant educational training ground for me. If someone with little experience can achieve these results just imagine what a veteran and trained developer like you could do by giving precise directions to the AI to accelerate the work and saving hours of tedious tasks. My work is not perfect yet but I hope it serves as proof that with AI and the right determination even those starting from zero can actively contribute to growing our software library.

AmigaOS4.1FE & AmigaOS3.2 on MacMini M1 - MacBook Air M4 - Raspberry Pi500+
Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Home away from home
Home away from home


See User information
@joerg

I don’t think it makes sense to work on more up to date browser, before we have 64bit version of AmigaOS4, if keep running out memory, its no point having latest version, its nice to see progress on SMP.. but we have a long way to go..

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Home away from home
Home away from home


See User information
@ldg72

the main issue with AI, is that when code base gets too big, the AI can’t keep track, and if you don’t understand the code, your stuck. As for sloppy code, AI often produce example quality code, and always need to read the code, before using it.

Often mistakes are unnoticed, memory is not cleaned up correct, things are not checked correctly. LLM produce code from what has learned from human mistakes. its not a inventor, but can stick different things to a degree to a degree.

The more you ask it to fix something, the more confused it gets, and suddenly see it undoing stuff.

AI is good learning tool, it help you get started, and it come up suggestions, it can prof read code, if you ask it, and it can be a aid, but it lacks creativity, focus and does not actually understand the impotence of the work its doing. the AI tool need guidance.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Home away from home
Home away from home


See User information
@smarkusg

It be stupid to not use tool that can help speed up development, we lack developers, we lack funding, and we lack the time. Anything can speed up development, or help if used correct should be used.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Just popping in
Just popping in


See User information
@LiveForIt

Hi! Thank you for your feedback, I totally agree with you. I've experienced first-hand that AI is not a magic wand. Many times it suggested code that looked okay but didn't work at all because it ignored how Amiga actually works.

I clearly noticed that as the project grew, the AI tended to get confused and make more mistakes. For me, it was useful as a 'talking book' to get started, but I realized early on that I couldn't trust it blindly. If I hadn't checked the code myself, line by line, trying to understand what was going on, the program would never have worked.

However, I believe AI is a huge help in two ways: for beginners, it’s essential to take those first steps and finally produce something functional, while for expert developers, it’s a fantastic tool to speed up the daily workflow. In both cases, you still need a human being putting in the time and patience to guide it, or you just get stuck. Thanks again for your insights!

AmigaOS4.1FE & AmigaOS3.2 on MacMini M1 - MacBook Air M4 - Raspberry Pi500+
Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Amigans Defender
Amigans Defender


See User information
@joergQuote:
support for colour outline fonts (not only for emoji, at least FireFox uses them for GUI parts as well, and colour outline fonts aren't supported by AmigaOS at all yet, i.e. you'd need to use something like the much slower libfreetype instead of native AmigaOS text rendering OWB used).


I think there's no reason why colour outline fonts can't be supported by BulletAPI. Might need some extensions (not much different to the alpha channel glyphs that were added to OS4). I looked into it a long time ago and then didn't do anything with it. In theory you could convert colour outline fonts into bitmap ColourFonts too.

I might put this back onto my list as it's something I'd like to see but I'd forgotten about.

Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Quite a regular
Quite a regular


See User information
@LiveForIt @ldg72
I will elaborate on what I wrote about my point of view on AI.
Perhaps what I wrote was too simplistic and did not cover my point of view.

I tried to use generic artificial intelligence tools. They were either inaccurate or verifying what they proposed took longer than if I had found the solution in the traditional way. It wasn't even about programming, but about solutions with hardware and the Linux system. I tried it a few times and always noticed that what it suggested was in the top 10 hits from various browsers. Even some topics were suggested correctly, but it never suggested them unless it was specifically asked about them.

Now, the topic of AI itself, as I see it. The topic of current trends in AI applications and legal issues.
I think many of us remember the late 1990s when the internet appeared. Everyone was excited about the ‘freedom’ it offered.
Of course, access to information was the main thing. There was also a dark side (from today's perspective) - where no one cared about posting files of various kinds (music, photos, codes). The very freedom of access to all this data prevailed over everything else.
This can be compared to what we have with AI – a period where everyone uses various data without caring who created it and how it was transferred to us.
This is changing very slowly. It is most noticeable in the computer games and music industries.


In the computer games industry, users themselves are forcing companies to ensure that games do not contain AI-related code.
There has recently been a huge wave of criticism surrounding the game ‘ARC Raiders’, where sound was generated by AI in certain applications.
Even some companies themselves have stated that they do not want this.
Example -> https://www.gamedeveloper.com/business ... oid-genai-like-the-plague

The music industry is also currently very negative towards AI.
This is not about corporations, but about independent creators.
A simple example. Creators place their music files on various streaming platforms. The payment for opening a song for the creator is a bit complicated. It can be simplified in a 1:1 example (this is not how it works in reality)
The flood of AI-generated music, where the author's role is reduced to simply entering commands into the AI generator, means that real artists who spend a lot of time creating music get almost nothing. Platforms are obviously fighting this, but with little success.

There is a legal issue here. You can easily listen to Metallica in country style, where the authors have nothing to do with it. Some creators try to fight this by deliberately damaging fragments of music in files.
Legal issues also apply to the data that AI spits out, including what you are asking about.

If you train your own AI model on your own data, this topic does not concern you.
The data on which AI is ‘trained’ in publicly available generators is controversial and unregulated.
Few people pay attention to this. Some of the data used by public AI tools (which may apply to programming code) has been downloaded
from sources that are not necessarily legal.


I hope that I have now presented my point of view on AI more comprehensively.
This is just my point of view. I translated it from Polish and I hope that everything has been translated correctly.
If the forum moderator thinks that my comment on AI is irrelevant, feel free to delete it.

Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Not too shy to talk
Not too shy to talk


See User information
@smarkusg

no one cares

Go to top
Re: New Port: Paho MQTT C and CuraEngine for AmigaOS4
Home away from home
Home away from home


See User information
@ldg72

Congrats on getting it working.

@AlexC

Quote:
It begs the question whether AI would be helpful with porting FireFox, as the main obstacle is the broad array of libraries that need to be ported and endian conversions needed all over the place.

Interesting question. My first thought would be that LLMs probably wouldn't be effective with such a huge code-base. Second thought, maybe someone should try it.

I've been testing out using AI coding assistants. There are times when they're surprisingly good. For example, the auto suggestions for DebugPrintF() calls are pretty good at guessing what debug output I want to print, and writing out the code correctly. Being able to write that code with a single TAB certainly saves time.

Other times, the code suggestions are dead wrong, and I write out the code manually.

Code generated via chatting with the LLM is also sometimes impressive, and sometimes utter garbage. I review any code generated line by line, because it gets a lot of stuff wrong, puts magic numbers all over the place, and likes to over-use comments. I do have to do a fair bit of cleanup to make the code higher quality. This does make me wonder about the quality of the code that it was trained on...

I find it very useful to learn how to use 3rd party libraries that I'm unfamiliar with (even large ones). This is especially true, with poorly documented libraries. That might be one of the biggest time savings.

AI code assistants do allow me to write code faster, but I think that being an experienced programmer is essential to keeping the code quality high, and structuring the code well.

@smarkusg

Copyright infringement is indeed a concern with AI. I'm sure that they've slurped up the public parts of my website in their entirety, without my permission. Not much that I can do about it.

If you're using an AI code assistant to work on proprietary code, then you do need to use the settings to exclude GPL licensed ccode (or similar).

I'd love to build my own private LLM code assistant. Alas, I don't have the money to buy hardware sufficiently powerful to run a sufficiently large LLM.**

Hans


** From what I've seen, small LLM models can't even code a working to-do list program.

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 3 ( 0 members and 3 Anonymous Users )



Polls
Running AmigaOS 4 on?
AmigaOne SE/XE or microA1 12% (26)
Pegasos2 3% (8)
X5000 22% (48)
X1000 14% (30)
A1222 8% (19)
Sam 440/460 18% (40)
Classic PowerPC Amiga 2% (6)
WinUAE emulation 7% (16)
Qemu emulation 9% (21)
Total Votes: 214
The poll closed at 2025/12/1 12:00
6 Comments


Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project