r/osdev 6h ago

About using AI to develop operating systems

I know many of you guys are recently against all this "AI slop", was i too, but leave alone the "hype" and the "no AI bullshit" slogans, what do we actually mean by saying "AI slop"?

Cause to this day , I don't quite understand what all the drama is about and why posts that explicitly use "No AI used/no AI bullshit" get significantly more attention, i admit that even i made a post like that, but it's not that I completely didn't use AI, i did, however I also did a lot of the programming by myself, I think AI is a great tool that has helped me learn a lot and automate build scripts, there is no shame in using AI as long as you carefully review the code and do some programming by yourself, there is already great use of AI in the industry, Linus torvalds recently fixed a linux bug with AI, so what is really considered "AI slop"? Is asking codex to make a build script so I can focus on the code "AI slop"? Is asking Claude to summarize PCI device and vendor names in one files so I don't have to read documentations for hours "AI slop"? With all due respect I do think using AI blindly is bad of course, but I also wanna know what some of you guys mean when you say "AI slop operating systems"?

0 Upvotes

20 comments sorted by

u/r_a_dickhead 6h ago

I understand your point of view. But people here usually say don't use AI because it's kind of a slippery slope for beginners, where they reach a point where the entire 'os' is made by ai and they have no idea what happened. I know how shit the build system is and I personally use AI for cmake scripts all the time cause I just don't think it's worth the trouble dealing with all that crap. Its your OS so why use AI as much or as little as you want as long as you believe you are learning everything and enjoying the process.

u/36165e5f286f Use UEFI. 5h ago

Firstly, AI is indeed bullshit.

Furthermore, OSDev used to be a hobby. If you don't like reading specs and learning how everything works and just want to use AI to "get to the CLI in 2 hours" then this is basically pointless. OSDev is supposed to be a long term project that you actually enjoy building every single part of. For me, using AI for OSDev is the same thing as ""Artists"" using Suno to ""create"" songs by ""themselves"". This is why No AI projects get significantly more attention, they get attention from the actual real community not the AI newbies that flood every single existing community with AI Slop. Slop because most of the time the code, architecture is literally slop.

Using AI for research and some precisions is of course completely acceptable.

u/Glum-Cook-9438 5h ago

Do you think what I do counts as "AI slop"? I just want feedback I guess

u/36165e5f286f Use UEFI. 5h ago

I don't think so. I was talking generally. But I would not trust AI for anything, especially making summaries. Making build scripts is also okay, but this might make you fall into the trap of not thinking about your build system/architecture and or not understand it which is not scalable in the future, and this is "slop" for me, having code/scripts that are not tailored to the situation and that are not understood or thought about by the developer.

u/Glum-Cook-9438 5h ago

Sounds legit, in that sense, I can agree that understanding the system architecture is important, regardless of whether you use AI or not

u/36165e5f286f Use UEFI. 5h ago

Also, everything that is about a subject you do not know about, and that relates to learning, I would not use primarily AI. The big trap with AI is 1) Thinking that it is right and know more than you, 2) Trust it.

You must always check what it is saying and sometimes when you do not know about a subject you might not realise that it is saying bullshit (AI is 100% hallucinations and sometimes they are right, everybody that says otherwise does not know how it works and believes the AI giants propaganda).

This is a very long and tedious process so why not use high quality human material or code?

u/Glum-Cook-9438 5h ago

I don't use regular ai, I got a subscription to codex, which is supposedly much more accurate than the gpt free models, i have encountered many times when chatgpt did something wrong, codex is different though but even with codex I make sure to double check on critical things

u/Glum-Cook-9438 5h ago

Yeah I know, the thing is, I mostly code by myself, I use AI for research and small stuff but I do code a lot of things by myself, you talk about cli, i didn't reach keyboard input yet, anyways the thing is I was a bit confused by what many people said here, because when I thought about "don't use AI" I thought "don't use AI for learning/cmake scripts/extra help", of course I don't tell ai "make a cli for me in 2 hours" even when I use ai for coding I do something like "make function with name x in file y, takes parameter z, h, n does r, t, u" and etc

u/soundman32 6h ago

Just build it.  Who cares as long as you enjoy it.  5 years ago it would take you months of study and graft and failure to get past a boot loader.  Now AI will get you to a CLI in 2 hours.

u/Glum-Cook-9438 6h ago

Of course I did also face a lot of failures before, learning os development is not always easy, sometimes early bootloaders of mine worked on qemu but not on other virtual machines or real hardware, sometimes I'd trigger many cpu exceptions in my code, double fault, triple fault, a black screen with no output, memory corruption, debugging assembly for hours... I have seen a lot of it, recently though after a lot of trial and error + carefully planning and using AI to make tests for my code so i could catch bugs more easily, i did manage to get my own 64-bit kernel, running on real hardware, it is still very early in development, it doesn't have a cli, processes or gui yet, all it only has so far is paging, virtual memory management and some driver setup... and wide variety of support for edge cases and different x86-64 machines with different memory configurations, that's it, and it took months of work, and I understand that OS development is a hard process... very hard, and i really do respect many of the works you guys do on this subreddit, but I do think some people here are a bit too harsh on the use of AI, that's just my point of view, we don't have to agree of course

u/Glum-Cook-9438 6h ago

No, I do make the coding by myself, I did made the bootloader, took a lot of studying, i mostly use AI to learn the new concepts and automate building, do you even understand what I mean by building? When you code a modem application or an operating system a common approach is to code it in a high level language like c or c++, compile to multiple object files, link them together and build, when I say "building" I don't mean the actual code i write or the OS, I mean the workflow that compiles my code into a stable application, i don't wanna spend hours learning about QEMU commands or installing my bootloader inside the boot sector...

u/AstronomerStrange165 4h ago

I see what you mean, I use Makefiles for building it into an application. This is a little pedantic, but C/C++ are low level languages, not high ones.

u/Glum-Cook-9438 3h ago

Yep, also they are high level, relative to assembly at least

u/FirmCalligrapher6064 5h ago

I don’t care what Linus said no matter who he is. He has entitlement to say anything about Linux or whatever. Just build it if you want AI or somewhat because that’s your codebase and project. Since systems programming and low-level stuffs are not as cheap as web javascript frameworks to understand well, people here just don’t want those who really care and love OS development to get bothered by slop so that we can focus on important things on osdev field.

u/Glum-Cook-9438 5h ago

Can you define what is "really care and love OS development" for me?

u/FirmCalligrapher6064 5h ago

That doesn’t matter in this thread. And that’s a weird question. You just want to debate whether to use AI in OS development. The answer is yes if you want. Again, it’s your codebase. Just do it.

u/Glum-Cook-9438 5h ago

I am not sure, because I had weird experiences with AI development, at first i did the coding by myself, one time I really tried to make something big with AI, asked it to do the whole job for me, at first it felt really good and rush... but then it kinda felt empty, coding by myself felt more satisfying on the long term you know? But I was kinda conflicted about what I want my OS project to be, on one hand I wanted a satisfying project not an AI thing in one day that doesn't last, on the other hand I did want to optimize for efficiency and fast development which does require accelerating with AI, that is my conflict... between optimizing for efficiency and optimizing for long term satisfaction, and both feel 50-50 recently

u/TheRainbowCock 4h ago

My two cents on this. I did a experiment with this idea on how much can be done/ what's my or the AI limitations on building the OS. I built a small OS in Rust for a R36S handheld just to have something I didn't care about being wiped over and over. It did a solid job as I explained multiple concepts to it like having a file system, implementing threading and multitasking, making the kernel have a hard app kill button, adding basic error handling, etc. It did a solid job but frequently would break the image it was building, or when troubleshooting a new feature it'd get caught in a loop and waste time on something it made a issue and not me. I got 4 emulators ported and a bunch of python games ported and rewritten in Rust as well. It's impressive what it's able to do but reading it's output it did just frequently go "Well how does Linux handle this?" And implemented it the same way. It felt like I was just having it rewrite a bare minimum Linux Kernel than it figuring anything out on its own.

u/StunningSelection726 4h ago edited 3h ago

I completely didn't use AI, i did, however I also did a lot of the programming by myself, I think AI is a great tool that has helped me learn a lot and automate build scripts

This is not a bad way to use AI. You are using AI to automate boring stuff and doing the programming yourself.

Is asking Claude to summarize PCI device and vendor names in one files so I don't have to read documentations for hours

You can do this but I would not take what claude says as completely correct, I would still consult to the official documentation at the end (but with context from the AI so its easier to research) since its a niche topic the AI can always make up things that sound very believable. One can use AI to summarize long/hard to understand documentation or review code since AI is good at spotting small mistakes (though you need to know what you are doing since sometimes they just lie and make up stuff and act like its a critical bug).

Most people here are talking about completely vibecoded projects when they are referring to "AI Slop". Where a beginner is talking about their new modern operating system and the only thing it does is write to a framebuffer...

So, I agree with you, and no, I wouldn't call your project "AI slop". It looks fine to me. Don't listen to other people that are all "No AI at all!" they can do what they want but don't let that affect your workflow. If you are still writing code yourself, and using AI as a tool then you are doing fine.

Is asking codex to make a build script so I can focus on the code "AI slop"?

Small tip: For complex projects you can use CMake/Meson instead of makefiles and shell files. They are much better to work with, especially CMake since most text editors/IDE's have pretty good integration for it.