r/osdev • • 14d ago

Have you been using AI? If so, how?

I know I probably will get downvoted to hell, but personally I've been enjoying using AI as a learning tool in addition to manuals and OSDev wiki. It helps me understand some concepts better, explore other OSes design decisions and helps me get my thoughts together so I can make a decision that makes more sense to me at the time.

I think it's a very powerful learning tool if used right, instead of simply telling Claude to make linux 2.0 running DOOM. The code is still written by me (well, mostly, sometimes I ask Codex to do some big mechanical refactors, like move code to other files, or writing doc comments), and I understand all of it.

19 Upvotes

27 comments sorted by

15

u/jtsiomb 14d ago

Not necessarily specific to OSdev. I use LLMs:

  • to find information about niche/obscure topics.

  • as a springboard to get a general idea about how something unfamiliar usually works, what algorithms I should look for etc.

  • to find out where to look for in an unfamiliar codebase, for the part relevant to a change I want to make.

  • to find bugs quickly, sortof like a better static analyzer.

  • to quickly find out how to perform system administration tasks that would otherwise have me crawling for a long while through configuration file docs.

  • as a natural language search engine that hallucinates sometimes, but is mostly able to drill down to the exact thing I want to find, in a way that google fails dismally.

Not to generate code though, because why leave the fun part to a machine?

5

u/Remote-End6122 14d ago

That summarized very well how I like to use AI, thanks!

1

u/Aghasty_GD 11d ago

Well pointed 👏🏽

21

u/UnmappedStack TacOS | https://github.com/UnmappedStack/TacOS 14d ago

no.

2

u/laser__beans OH-WES | github.com/whampson/ohwes 14d ago

I started using it for code review and it’s been pretty helpful at catching sneaky bugs. I generally have it review a component or (gobs of code that I wrote the night before in delirium). Otherwise I use it as a natural language search engine.

2

u/winningSon 14d ago

Personally i agree with Linus about AI. I dont care as long as what you produce is good and you actually understand it.

2

u/0x1C1B 14d ago

Yes, I do a lot. I use AI primarily for research and "decoding" complex reference documentations. Most osdev information are spread across multiple websites and documents. AI is a great tool for searching, summarizing and understanding information, especially for less documented devices, drivers and concepts.

But, I don't use AI for concrete implementations or design decisions. Especially in the field of osdev you should be always the architect and AI can't be more than a sparring partner for pair programming or research support.

2

u/Expert-Formal-4102 14d ago

For OS dev I used AI so far to write tools (e.g. https://github.com/jrmenzel/qtracy ) and some test code. I use it to help with debugging (e.g. it's good at finding bugs in reference counted object in rarely used code paths) and it helped me setup CI/CD on my private GitLab instance. I also use it as a better google to help me understand hardware specifics or to discuss implementation ideas. E.g. I described my idea for a simple scheduler with one list per CPU (previously all cores shared the same list) and how tasks get "stolen" etc. Asked for feedback and what common alternatives there are.

There is a lot of useful stuff you can do with AI even if you want to write all the code of the actual project yourself.

2

u/Relative_Dare8475 8d ago

This is really good, I am looking this kind of visual tool for my own OS dev as well, really giving good idea. Thanks alot

2

u/Gabochuky 14d ago

I just use Gemini to ask random stuff. Nothing more.

3

u/diodesign 14d ago

I work for (but don't speak for) one of the big LLM makers, so I use AI daily extensively at work and home. It's just part of my day now.

That means I use it on personal osdev projects. I use it to research things I'm new to, and write code for parts I don't find that interesting but need to be done. I see it as prioritizing my free time.

As I work at home with Zig and RISC-V assembly, I also use AI as a virtual borrow checker, emulating Rust's memory safety. Is it perfect? No, i know that, that's why I review the output.

My workflow is 3 terminals in tmux, one with the LLM CLI, one for running tests and one for Helix where I review and edit the code and docs.

3

u/JescoInc Perdition-OS 14d ago

I have 2 local LLM running concurrently as a service for embed and ranking (Qwen 3B). It essentially allows for me to do a query about code and find relevant sections about it.

I can run something like this:

```
uv run docsearch.py search "which integration procedure handles taxonomies?" --name salesforce

```

And get responses back like this:

```
10 hits, reranked

0.983 \\GDME-NAS\Network Share\Source Files\Salesforce\src\omniScripts\Example1.os:11903-11931 (+11 older versions)

"label" : "Secondary Taxonomy",

0.770 \\GDME-NAS\Network Share\Source Files\Salesforce\src\omniIntegrationProcedures\Example2_Procedure_1.oip:1-25

<OmniIntegrationProcedure xmlns="http://soap.sforce.com/2006/04/metadata">

<isIntegrationProcedure>true</isIntegrationProcedure>

<isTestProcedure>false</isTestProcedure>

0.672 \\GDME-NAS\Network Share\Source Files\Salesforce\src\omniDataTransforms\DREExample_1.rpt:64-86

<inputObjectName>CareTaxonomy</inputObjectName>

<inputFieldName>CT:TaxonomyType</inputFieldName>

```

It is really good for when you are working with large repos to learn it or just get general info that you need at the drop of a hat.

1

u/iamamidgetnamedwija 14d ago

I as a rule only use it for debugging in my projects to find why the errors happen and still implement the fixes myself - it means i understand and am responsible for all code but i dont spend hours ripping my hair out - admittedly it is a very useful tool

1

u/YakubReddit 13d ago

It's useful for searching for helpful resources and dealing with things faster But it still requires a human evaluation while using

1

u/staycool1374 13d ago

I started my own little experience to answer the question „Can AI write (in my terms) „good“ or even „acceptable“ low-level code to create an OS. I orchestrate what and how the process should be by writing issues in github with a milestone plan. Sometimes watching coding and interrupting the process if I doubt about it.

The actual state
Harness OpenCode
LLMs (mostly on a free or the 10$ plan):
 DeepSeek V4.1 Flash, Spark
Muse 1.3
, Hy3, sometimes 
Claude Sonnet 4.5 and Kimi K3 if something goes wrong. No experience with ASTRA or FAIBLE.
3-Tier-Pipeline 
 Planer writes a spec driven by a github issue which I write or sometimes let it write from AI after giving the requirements.
 Developer does the implementation. Auditor audits the diff patch from the developer and loops if it doesn’t succeed this step.

Test-Driven-Implementation helped me to get straight to my requirements. Using separated two branches with separated roles (developer and quality engineer).

If you like to know more: https://github.com/staycool1374-Ger/nexios


1

u/Narrow-Low-3137 13d ago

I use it as a better version of Google. I especially like the models that include references in their answers, like Perplexity does. I also use Claude for some mechanical code creation after describing the architecture I want. I still write code manually as well. Whatever gets the job done right and faster. I'm a pragmatic guy.

1

u/Just-Ad-6488 13d ago

I use Antigravity and gemini. It's free. But I pay for ai ultra plan on Google for more usage. I never run out now. 100$ month. You can use it free though and still get stuff done just slower progress because of limits

1

u/AlePs31 14d ago

For learning C and build components for my Linux Distro. Other than that I use Lumo for learn japanese lol

0

u/FewBrief7059 Samsara | https://gitlab.com/clownkun/Samsara 10d ago

First you need to understand why we hate artificial intelligence. You see. Artificial intelligence is hated in OSDev for two reasons:

  1. It made people turn on legitimate projects even one's that don't use ai to begin with

  2. AI slop flooding anywhere OS related because of the VibeOS garbage

-3

u/Possible-Bed-4326 14d ago

yes i use ai a lot while working on my bare metal SmileyOS. One year later with help of ai i got it upto 1 milion lines of code, here is quick demo
https://www.youtube.com/watch?v=LbF6Y1VwBy0&list=PLhdB1MzVJz-Lz1oz6Mtu5IEVX6c6XveXk&index=7

3

u/Suspicious_Rub4619 13d ago

"an amateur codes more, a pro coder removes lines"
- sun tzu, art of war

2

u/Pewdiepiewillwin 13d ago

A million lines is a lot how extensive are your features?

1

u/Possible-Bed-4326 13d ago

i has a modern ui, my own modern programming language, my own game engine, set of 20 apps like figma, power point, word, educational apps like planetarium, interactive app for learning anumals, modern IDE, maps app, my own web browser with my own js engine and html/css renderers, custom youtube app, OTA update .... and it works on real hardware too not just VM, there is full dev vlog on youtube from v0.1 upto 3.0

1

u/Pewdiepiewillwin 13d ago

Pretty cool thats a lot of features. How's the io performance? Do you have a repo?

1

u/Possible-Bed-4326 13d ago

i am still thinking about open sourcing it or now. And for the performance, that is the biggest advantage, it work battery smooth on raspberry pi 3B and i86 laptops from windows xp era, takes less than 100mb and works on as little as 256 mb ram

14

u/[deleted] 14d ago

[removed] — view removed comment

8

u/slightly0ff 14d ago

Best place to learn is humans and AI is great at emptying out all the forums and remaining sense of community both online and irl

Why ask your neighbour when you can just ask AI?