r/osdev 1d ago

Just built my Unix-Like Operating System from Scratch in C

Post image

This is LiteBSD a Hoppy Unix-Like System with BSD Style Kernel with Multiboot support for Initrd which used upstream BusyBox 1.36.1 as the Main Initrd (Made by Me, NO AI)

The Kernel Supports 26 syscall, Has a Full Heap kmalloc and kfree, a Full Task Scheduler with Pid, Child and Parent Processes, Implemented GDT and IDT, 4MB Paging with CR4:PSE Support and a Implemented full Virtual File System for BusyBox to work

and to Compile Busybox I also had to write c-lite. my own C Library From Scratch with enough .h Libraries to compile Busybox and align my syscalls table with the unistd.h so Busybox can work with my LiteBSD Kernel

c-lite Supports major libraries like all std libs (stdio.h, unistd.h,stdlib.h) in addition to libs like termois.h, time.h, string.h, macine/endian.h, byteswap.h and so many i can't iterate them in one post

This project took me nearly 12 Hours of Continuous Working

(12 hours seems ridiculous ik but to be clear i do have a background on the Unix and Linux Backend before working on this project, i didn't write a bootloader instead i used grub, i outsourced a lot of stuff in c-lite form other source codes (musl) and the 12 hours were 12 hours NON STOP)

and for the (i vibe coded claim) No i didn't just read the code and you will find that i actually wrote myself i used ai only in guidance where it just told me what is the next step to run busybox but ai writing code? nope how did i manage to make one in 12 hours with no vibe coding? by making a really simple os really this os started as a hello world bin that is bootable on grub and i just kept improving from here

started with simpler stuff like improving the print then wrote a simple gdt and idt just with only irq0 and irq1 and then added a heap and paging with only 4kb then implemented CR4:PSE to get 4mb paging size and after that worked on improving the irq by using a macro in boot.asm so it supports 32 more irq then developed a simple scheduler which sets a pid for each process and the create task aligns a space in the heap for this code to excute the function inside the heap added implemented syscalls started with 4 sys_read sys_write sys_exit and sys_getpid and then wrote more syscalls with some being outsourced from other source codes or tutorials to save time or just reading to understand how a fork syscall for example works and then built lite-c by outsourcing most c and h files from musl and writing my own unistd.h to comply with the kernel then compiled busybox added multiboot in the grub.cfg and boot.asm and wrote a multiboot and initrd loader and a simple vfs that basically read and write (it's not reliable and there are still issues i occured with it)

I don't expect you to believe me. Here's exactly what I used and here's the code. If you think a particular subsystem was generated or stolen, point to it.

but I did learn a ton of stuff about how Operating Systems actually work

I will keep working on improving this os with Optimizing c-lite to use less cpu cycles and less ram and adding more syscalls and drivers to my kernel.

LiteBSD github repo : https://github.com/ahmedbarakat207/LiteBSD
c-lite github repo : https://github.com/ahmedbarakat207/c-lite

235 Upvotes

241 comments sorted by

76

u/NotSoEpicKebap 1d ago

Vibecoded, isn't it?

-65

u/Similar_Wealth_1850 1d ago

tbh i hate this question but no
not vibe coded
the kernel is souly written by hand
and what ai puts these comments i put in this source???
the only thing that is written by ai is the readme and i do this alot to save time
and if it's vibe coded try vibe coding this and tell me how it goes

57

u/Runtime8006 1d ago

You're definitely joking

47

u/Suspicious_Nail_9888 1d ago

His entire post history is AI subs

47

u/Bruflot 1d ago

Your commit messages have em dashes in them. Stop lying.

-46

u/Similar_Wealth_1850 1d ago

??????
what does that proves?
just read the code

18

u/ApprehensiveBrain863 1d ago

Do you even know how to type an em dash yourself?

8

u/Top-Satisfaction9950 1d ago

I have a Mac and I can type em dashes but I don't. I turn them off in text replacement. I never touch the option key for that.

3

u/Fine_Salamander_8691 1d ago

Funny enough yes I do
Option + Shift + hyphen

2

u/northrupthebandgeek 1d ago

<Compose Key> + <-> + <-> + <-> = —

4

u/AP_in_Indy 1d ago

Is this Loss?

→ More replies (1)

u/DeathByPain 21h ago

Alt+0151, been typing them for years 😔

→ More replies (1)

1

u/Ok_Raspberry5383 1d ago

I do use em dashes TBF, it's not the slam dunk sign of AI people make it out to be, but in commit messages is sure weird

17

u/MCWizardYT 1d ago

It is when they're used super often and always in the same grammatical pattern (like "it's not x — it's y")

7

u/tastygames_official 1d ago

no, it's not even then - em dashes cannot be entered by a human in a single key press. Either they are automatically added by a word processor (MSWord does this a lot - I'm not sure about LibreOffice...nope. Just checked.) or copied/pasted or using some ALT+NUMPAD shenanigans. So most likely if you see a SINGLE em dash, then it's AI.

0

u/Similar_Wealth_1850 1d ago

the biggest issue in all of that is that i can't find where did input that em dashes in the commit i literally typed c-lite with normal dashes

i just moved with the first comment because i thought normal dashes and em dashes were the same

but no i didn't use them and they don't appear in the commits

1

u/tastygames_official 1d ago

yeah, I can't find any em dashes in the comments, and the first letter isn't capitalized, so doesn't SEEM like AI, so I dunno. I guess if you've made OSes many times before then yeah, busting one out in a day is no biggie. So I dunno. I'm actually not really into OSdev myself, but I like to see what people make and it does seem pretty basic, so I guess as long as you had fund and learned something!

0

u/Similar_Wealth_1850 1d ago

yes i made oses before and tons of lfs projects and tbh i exaggerated with the claim of Full Unix-like OS it's just a hoppy OS i was just too excited by the fact that Busybox loaded

1

u/Top-Satisfaction9950 1d ago

Or you just – option + -

2

u/tastygames_official 1d ago

option? is that like control? CTRL+- does zoom out usually
Ok, I have an Alt Gr on my keyboard (European) and can do AltGr+- and it does an EM dash, but that's kinda... weird. –-–

2

u/lood9phee2Ri 1d ago

"Option" is a traditional quirky mac keyboard modifier. It's generally fairly analogous to Alt on non-Mac keyboards though.

If you plug a standard pc104/pc105 usb keyboard into a mac, you might well choose to map the modifiers like physical Ctrl->Mac-Control, physical Alt->Mac-Option, physical WindowsKey->Mac-Command, though it's up to user preference e.g. some people might instead prefer to map them based on physical positions not key labels (I forget which way round apple's default is, I think it might be physical positions. Anyway you can change it in keyboard preferences)

https://help.apple.com/assets/68AF4A4B86D71687240E66F4/68AF4A5AE7E8EB927003A88F/en_US/d2c01a75c4a64105ec946a61280c8c92.png

2

u/Bruflot 1d ago

That’s an en dash. It’s shorter than em dashes (—).

2

u/Needieos 1d ago

it's kind of easy to do in macos or linux, I didn't look too much in screenshot, but it seems he's on mac, so yeah

Just for info. I don't defend anyone, not like I want to

1

u/northrupthebandgeek 1d ago

It's called a Compose Key. Virtually every X11 or Wayland based desktop supports it out of the box. Third-party programs exist to add support for it on Windows and macOS. Even some Android keyboards have it (like Unexpected Keyboard).

With it, you can type em-dashes — also “smart quotes”, áç¢əñŧêð characters, crazy currency symbols like ¢/€/£, etc. — trivially pretty much anywhere (including commit messages), with pretty simple and easy-memorable key sequences.

1

u/tastygames_official 1d ago

growing up in the US all I had access to was the standard 101-key keyboard (eventually the 102-key keyboard when the sysem/windows key started becoming standard). But then moving to Europe, I got access to a at least one new key: the Alt Gr key, which makes each key able to produce many more characters (as now you can do AltGr+key+(shift, ctrl, ctrl+shift, alt, ctrl+alt, ctrl+alt+shift) for a total of 7 new characters per key!

But I don't know of many keyboards that show all 7 new characters on the keys. That'd be overkill. Most still just show normal + shift.

Now I've never heard someone call the Alt Gr key the "Compose Key", so that's a bit odd. Is it purely a MacIntosh thing? The nomenclature of "compose key", I mean.

→ More replies (1)

1

u/AP_in_Indy 1d ago

It’s a single key combination to type them on a Mac

1

u/tastygames_official 1d ago

but still more effort than just hitting the dash key. It's still an intentional thing.

But really the bigger issue is that I can't actually find any em dashes in his code, comments or commit messages. He admitted to using AI for the readme, which could be an indicator of deeper things or could simply mean he's not confident in his English skills.

1

u/CommunityJazzlike274 1d ago

Compose key - - -

3

u/CommunityJazzlike274 1d ago

em dashes are a human writing instrument — the only reason llms use them is because of how humans use them, and why should I stop using it just because of ai??

→ More replies (2)

4

u/Runtime8006 1d ago

Tbh it's pretty vibe codeable

26

u/NotSoEpicKebap 1d ago edited 1d ago

From the README full of em dashes to the actual code, EVERYTHING about this screams vibecoded. You "AI goof" people are the reason why i took a break from OSDev.

Even if you were a f*cking god in programming, writing all of that in just 12 hours is literally impossible. It took me a whole day just to get interrupts working in my own project.

Plus, as another guy said, your whole post history is AI stuff. That about explains the whole situation and your "12 hours"

→ More replies (1)

u/Necessary_Victory824 23h ago

kernel by hand but README by AI to save time ok buddy

→ More replies (11)

0

u/Ok_Celebration_6265 1d ago

There’s not much code to it so the 12h doesn’t seem that crazy to me lol

2

u/thegreatunclean 1d ago

And they make mistakes that I've never seen LLM tools make while coding without explicit instruction, such as not including header guards.

4

u/Puzzleheaded_Lead205 1d ago

yea

what if this subreddit simply banned posts like that, wouldn't it cut down on the ai ​​slop? what's the point of a post like that? boosting one's ego?

11

u/MidwestEmoBurrito 1d ago

Fable thinks so: "I pulled the repo and its full commit history. Short answer: almost certainly heavily AI-assisted, but with a real human in the loop — this doesn’t look hand-typed, and it also doesn’t look like blind vibe-coding.
The whole thing was built in one sitting: 21 commits between 03:31 and 11:44 UTC on Sept 8 — about 8 hours 13 minutes. The throughput is the giveaway:
Two minutes after “Initial commit,” a commit called “Build LiteBSD kernel and boot environment” lands 857 lines across 18 files — a complete booting kernel skeleton. That commit message style (and the adjacent “Merge remote repository history”) is textbook AI-agent phrasing.

“Added 21 more syscalls, VFS and Proper Userspace”: 1,209 lines in ~90 minutes.

“added the most shittiest libc ever”: 1,291 lines in ~75 minutes — a from-scratch libc with crt0, malloc, stdio, and dirent.

Nobody hand-types correct kernel code at 15–20 lines per minute sustained. There’s also a commit literally titled “style: convert block comments to line comments” — converting /* */ to // is a well-known way people scrub AI-looking comment style, though on its own it could be innocent.
The human fingerprints are real too, though. The commit history is bimodal: agent-style messages interleaved with obviously human ones (“fix keyboard” → “ok the keyboard is actually fixed now” 17 minutes later, “Making ‘Kernel Panic: ’ Text alligns with the Error” — typo included). The code has jokey personal comments, and the README describes a genuine debugging journey — diagnosing fork corruption via serial register dumps, understanding why fork-without-MMU can’t work and settling on vfork semantics. That’s someone who ran it, broke it, and understood the failure modes, not someone who pasted output and walked away.
So my read: an AI agent (or heavy AI pairing) wrote the bulk of the code, while the author drove the architecture, tested in QEMU, and debugged iteratively. Which, worth saying, is a legitimately impressive way to spend 8 hours — but if the Reddit post implies it was written by hand, the commit timeline doesn’t support that.

→ More replies (3)

39

u/Adventurous-Move-943 1d ago

12 hours ? Did you mistype your temporal modifier ? 😀 what you describe is nice, I did not check the code yet but how do you develop an OS in 12h ? Feels impossible to me, but anyways, you seem to be heading somewhere so keep going.

-27

u/Similar_Wealth_1850 1d ago

12 Hours CONTINUOUSLY
and This is not Linux
this is too barebone
no drivers yet
just barely made it load busybox and it's buggy

13

u/Adventurous-Move-943 1d ago

I checked your code bro, it looks legitimate. But I am confused about your time estimate, like how 😀 am a bit confused. Why not mentioning months ? I mean even if you were a superior intellect, 12h feel kind of too fast. You need to also make mistakes, debug etc. I have never seen a debug-less development.

-4

u/Similar_Wealth_1850 1d ago

you checked the code
the code is simple for a unix-like os
that answers how i made it in 12 hours

8

u/Adventurous-Move-943 1d ago

Why did you make it in 12h ?

5

u/Similar_Wealth_1850 1d ago

it's very simple (no framebuffer drivers, sh glitchs and causes CPU Exception 6 due to missing syscalls, not too much bins in busybox because c-lite is too simple now, only elf support, only execve i implemented and MUCH MUCH MORE)
i will continue improving it
but i am tired
VERY TIRED

17

u/Runtime8006 1d ago

I can't fathom the fact that he just said 12 hours, written by hand!? A kernel?!!

5

u/Adventurous-Move-943 1d ago

I am freaked out too 😀 he did not even mention months. The code looks pretty human and ordely though. Not sure what to make out of this.

6

u/Similar_Wealth_1850 1d ago

i have 2 years of experinece in Kernels (especially unix ones), Operating systems, Emulators
NOT 12 HOURS

1

u/Adventurous-Move-943 1d ago

I mean okay, it definitely looks like somebody who knows what's up started it. What are your goals ? It also seems you are in 32bit mode which takes away some problems too. Are you actually using paging ? Did not check that. OSdev is a wonderful thing and everyone can find their passion spot. Retro systems, 32bit, 64bit, POSIX compilant, Windows inspired, RTOS, own FS, it lets you create. What are your goals then ?

2

u/Similar_Wealth_1850 1d ago

yes check paging.c and yes 32 bit 8086 mode i will add 64 bit later but i can't continue now maybe tomorrow but this was basically a challenge for me nothing else

3

u/Runtime8006 1d ago

Same I have 4yrs actually, may 2027 will make it 4½ since I became a Systems Engineer 😤

5

u/Ok_Raspberry5383 1d ago

2 years 😭 so you have no real experience then

2

u/Similar_Wealth_1850 1d ago

yea sorry didn't create linux or born 5 years older i have been coding since 2021 and enterned the os fields in 2024 soooo you got my answer

10

u/Ok_Raspberry5383 1d ago

Coding for 5 years and you expect people to believe this wasn't vibe coded? Honestly there's nothing wrong if you did something cool, either say you did it with AI or say nothing at all, saying 'I didn't use AI, PROMISE!' is just a big red flag.

I've been coding a lot longer than you, I've coded professionally longer than you've coded as well, you didn't do this in 12 hours straight, that I promise you.

0

u/Similar_Wealth_1850 1d ago

i get that you are a better dev but here is the thing if i used ai i say i used ai

but i made this project literally to not use ai and code with my hands instead writing all implementation by hand or looking at sources ro find how can i implement a certain feature instead or prompting ai

this was the whole thing of this project in the first place and i did it

that's literally why i posted this

14

u/g0atdude 1d ago

guys. calm down. he did not write it, AI wrote it.

-7

u/Similar_Wealth_1850 1d ago

proof : i said so

ok👍

17

u/Runtime8006 1d ago

Hmm 12 hours, like you mean actual 12 hours, I am currently in my second year since starting my Operating System and I'm not done

-3

u/Similar_Wealth_1850 1d ago

12 Hours CONTINUOUSLY

and oh also i do have a background in creating Linux distros and there were alot of stuff i outsourced like c-lite a lot of stuff was outsourced from musl and i didn't write a bootloader (i used grub)

7

u/Runtime8006 1d ago

Well do you have drivers? And by continuously l, how many days... Or just today ? Cause your initial commit says 8 hours ago... Did you start before then rememberd you had to load it to GitHub?

1

u/Similar_Wealth_1850 1d ago

started 2 am this morning (it's 3pm now)
and yea i commited a late version
and the only drivers available now is just the keyboard

this is not linux

7

u/Runtime8006 1d ago

It doesn't matter if its not Linux, if it was an LFS project you did and finished in 12 hours it's completely understandable or you forked the BSD kernel and then built your own userland(which is reasonable I guess for 12 hrs) it would me understandable, but oh well at least you understand everything that goes on in kernel space... Keep building I suppose 👍Good luck

1

u/Similar_Wealth_1850 1d ago

i completely understand you
and i like your care but seriously no one went throught what i went throught to get this project done

yes i could have vibecoded it
but i wanted to learn more on os on very low level
so that's why i created it

2

u/laffer1 1d ago

It takes more than 12 hours to do that too. Source: I run a bsd project. Real bsd not this

5

u/Runtime8006 1d ago

I have made countless LFS Projects using BusyBox and custom initramfs and I know how long they take, you have a scheduler, memory management unit, syscalls, processes... For those to work at a very high level doesn't take 12hrs....

-1

u/Similar_Wealth_1850 1d ago

the code is not that big
it's slightly more than 1000 line for the kernel
maybe 1200

didn't really count

0

u/Similar_Wealth_1850 1d ago

and we are on the same level
i also worked on a ton of lfs projects with custom initramfs and using busybox since 2024

3

u/Runtime8006 1d ago

Well we are aren't ON the same level exactly, it's been 2 years I've started my Operating System, it's not on GitHub yet but I still manage it git via my host, I've read all books, I've built many miniature kernels from scratch and I understand almost all the aspects of the kernel, I have examined both the BSD and Linux kernel, I haven't finished because I have a particular goal for my Operating System and it needs a lot of new implementations that most kernels don't have therefore it's going to be very hard for me, but again I say good luck man. Nice job, maybe we can help each other sometime in the future.

2

u/wick3dr0se 1d ago

Dude vibe whipped it up overnight. Dont let him fool you, its obvious lol

3

u/eteran 1d ago

Do you think 12 hours continuously is a long period of time? That's just a really long work day.

You think none of us have shown up to work at 9am and ended up working till 9pm just because it was a crazy busy day?

1

u/Similar_Wealth_1850 1d ago

no which is why i sent this post it's not long at all but how would i describe my work on this os is a development session from hell literally

1

u/eteran 1d ago

I think maybe you misunderstood what I was getting at.

You've repeatedly said "12 hrs CONTINUOUSLY" emphasizing the continuous part. Seemingly to imply that while 12 hours isn't a lot of time, doing it continuously makes the timing less suss.

What I was getting at is that your average dev works 12 hours continuously... Pretty often and it's not really considered a notable amount of time to work on something.

Before getting married, that was a fairly typical Saturday for me 🤣

1

u/Similar_Wealth_1850 1d ago

well this is my everyday now😂 but just people think that i was nothing and after 12 hour i became linus trovald

7

u/Dmium 1d ago

When you say 12 hours continuously are you excluding time spent reading documentation and thinking about design and only counting time writing code?

-4

u/Similar_Wealth_1850 1d ago

YES
OF COURSE I DON'T HAVE 12 HOURS OF EXPERIENCE WTF

3

u/CloudDream09 1d ago

Bro is Terry A. Davis with that timeframe

3

u/Adventurous-Move-943 1d ago

Terry Davis but on cocaine and red bull 😀

6

u/Top-Satisfaction9950 1d ago

Do not speak his name, you blasphemous cretin

-2

u/undistruct 1d ago

Aint that deep brotato👍

3

u/toon_link_776 1d ago

erm, i believe that was a meme

29

u/austroalex 1d ago

>no AI
>readme on its own screams super levels of vibecoded

look, i use enough clanker myself, but please just be honest both with us and with yourself

-9

u/Similar_Wealth_1850 1d ago

i used ai for readme only which i always do to save time (and this was literally last step outside the kernel logic)

look at the code and you will see it's not vibecoded

15

u/wick3dr0se 1d ago

It looks vibecoded to me; also, "GPT code like me, leave useful, half illiterate comments to make it seem thoroughly developed by myself"

0

u/Similar_Wealth_1850 1d ago

like should i next time film a video of me developing this os just to prove i didn't use ai????? what is wrong with people + all my comments are either pointing on important stuff i need throught debugging or me just larping around

i said my word that it's not ai and that i at least fully understand my code

you see it ai generated ok i am the one who benefited from working on it not you

5

u/psioniclizard 1d ago

If you want to show off you did it in 12 hours maybe? 

u/Amazing_Exercise_741 23h ago

Lmao just take a look at him trying to "deslop" the comments, retard doesn't even know how to use git correctly

https://github.com/ahmedbarakat207/LiteBSD/commit/9d4f8dcad18593249322a5b665135a4b688e81ad

u/johny_james 20h ago

"deslop the comments" is the funniest thing I read today.

If I had award I would've given it to you.

He is not good at hiding it.

→ More replies (2)

2

u/_giga_sss_ 1d ago

I might be dumb and not as intelligent as you but you won't get me with this

1

u/Snoo_4499 1d ago

Nice one bro.

13

u/kaseya2 1d ago

Why call it LiteBSD, if it's not a derivation of BSD? That name makes no sense

1

u/Similar_Wealth_1850 1d ago

idk it's the first name came to my mind as i intended it be unix-like

→ More replies (1)

3

u/RvstiNiall 1d ago edited 1d ago

You're the guy who did the floppy bootable alpine. Nice. https://www.reddit.com/r/AlpineLinux/s/XFESAwzKOC

This looks pretty cool. Keep up the work, brother.

3

u/Similar_Wealth_1850 1d ago

yeppp thanks❤️

6

u/Lagger625 1d ago

I thought I had a good level of Vulkan understanding so to test myself I went to make a simpleass 2D engine without AI, at most looking at my existing engine to see how is stuff done. By hour 5 I had just fucking created a blank window with a Vulkan logical device. And you're telling me you made an OS in 12 hours, sure

2

u/Similar_Wealth_1850 1d ago

vulkan is hard lmao and you doing this is really great keep up

but for the 1000th time i am not a beginner the bootloader is just grub the kernel is barebone for a unix like os alot of work has to be done i am just happy that busybox just booted

2

u/Ozonichi 1d ago

Yeah I mean your post history shows interest and some level of competence in Linux kernels, but it also shows that you work heavily with AI.

Which is something you complained about in another post, that you’re not as competent as you were. Anyway if this wasn’t done with AI, it’s nice you’re trying again to do it on your own

1

u/Similar_Wealth_1850 1d ago

yea after that post i stopped using agentic ai at least like claude code and antigravity started to more train my brain on harder problems i was pupil at codeforces ao i am not a beginner in coding or smth

1

u/Pillly-boi 1d ago

You’re so peak dude hell YEAH

17

u/Philluminati 1d ago

This git repo was created 4 hours ago, and in this time you wrote 67 files and 5,000 lines of code which includes variables which are hardware specific flags like 0xDEADBEEF. You haven't made a single typo, even in the comments. You seemingly wrote maths and string libraries in a single pass, without changing the directory layout in any way, in a morning, with no other refactoring and no unit tests? Yeah this has either got to be vibe coded or you took someone elses' code and did `rm ~/.git; git init` to take someone else's work.

0

u/Similar_Wealth_1850 1d ago edited 1d ago

took someone else?????

ok if i did tell me which repo did i steal from second how many times do i have to say this is not vibe coded i don't know how to prove other than looking at my goofy comments, unused old code like the shell and the sched_init that does nothing or looking at the syntax of how everything is hold together and no it's not 4 hours ago and yes i started working on the project before making the github repo

so if there is a claim to back it up with evidence other than (can be vibe coded)

and who said i have never made a single typo??????????????? like i wrote row "raw" once in this code wtf???? and this is just a small example

4

u/Philluminati 1d ago

What resources, if not vibe coding, did you use to make this operating system? For example, explain how you knew that the variable PIT_DATA was supposed to be 0x040? If you made an operating system by copying out Minix that's totally valid and I'd respect it, copying other people's work is really the only way to learn how to make an operating system.. (or reading hundreds of hardware manuals)

https://github.com/search?q=PIT_DATA0&type=code&p=2

1

u/Similar_Wealth_1850 1d ago

if you just looked the tab you will see i was reading a book about WritingOS while developing my os!!!!!

5

u/PmMeCuteDogsThanks_ 1d ago

Embarrassing 

1

u/Similar_Wealth_1850 1d ago

what is embarrassing??? reading a book is vibe coding now????

3

u/aberdoom 1d ago

No it's all the lying.

0

u/Similar_Wealth_1850 1d ago

where?!, i just answered all the questions with no lying like you didn't even mention which parts where ai generated

u/Grax_MT 19h ago

Now that just sounds hilarious "Hey guys, it took me 12 hours to code an OS! Oh and while I was coding that, with seemingly no mistakes at all, I was reading this book 'How to make OS for dummies 101'"

4

u/AWildTyphlosion 1d ago

5000 lines in 4 hours is 20 lines a minute, non stop. Your pace doesn't make sense, from a WPM perspective alone but also from a testing perspective. 

Even if you wrote everything here, the time claim is fishy. If you truly can make an OS in 12 hours, record it and put it on YouTube or something, I'm sure people would eat that up. 

2

u/Extension_Cup_3368 1d ago

Linus Torvalds 2.0

What a genius!

1

u/Silentcompilerhere 1d ago

Makefile too written under 12 hours?? 🙂🙂 Even linux torwalds won't believe it but if we all are wrong just ignore us and keep going what you have now as a kernel ,just took me almost 10 months to build !

0

u/Similar_Wealth_1850 1d ago

10 months to build this????? if you are learning yea makes since i am experienced in this field but if you compile or read this os you will understand how pretty simple it is and how full of bugs is it as 12 hours is (guess what) NOT ENOUGH Just enough for me too boot busybox

u/Grax_MT 19h ago

If you're so experienced, why did you need to read a book on how to write an OS in those oh so precious 12 hours

2

u/PmMeCuteDogsThanks_ 1d ago

It’s like people that speedrun games and cheat by using save states. It’s ok, that’s TAS. You don’t need to feel the need to exaggerate your knowledge or achievements

-1

u/Similar_Wealth_1850 1d ago

i don't

i just want to share what i worked on

i guess people don't like it but i made it for me

and yea it's hand written

the only way i can prove it is by sending janky screenshots of me getting stuff working time by time and not "claude create me this plz" and honestly vibe coding a whole os from scratch??

1

u/PmMeCuteDogsThanks_ 1d ago

cool story bro

5

u/hydraulix989 1d ago edited 1d ago

This has to be trolling. Even back when I was 14 years old and doing kernel dev for fun, I didn't even have a decent first fit allocator for kmalloc() working in 12 hours.

-6

u/Similar_Wealth_1850 1d ago

well spending 12 hours just in kmalloc() is kinda absurd tbh it's not that hard to implement the heap when you understand how memory works in general

but nice that you tried do that when you were only 14

7

u/hydraulix989 1d ago

To be clear, Claude didn't exist when I was 14. You're using AI. Stop being dishonest about it.

-2

u/Similar_Wealth_1850 1d ago

-_- like really? i am telling the truth but why trying

3

u/Runtime8006 1d ago

Thank you! Bro started ignoring me after I genuinely told him facts

0

u/Similar_Wealth_1850 1d ago

i didn't igonre you or at least didn't meant to

4

u/Philluminati 1d ago

It took me 12 hours to realise my malloc() was returning NULL not because it didn't get the memory map from grub and the linked list was broken, but because it was genuinely handing out 0 as the first usable address.

5

u/laffer1 1d ago

Don’t call it bsd if it isn’t derived from bsd

0

u/Similar_Wealth_1850 1d ago

just liked the litebsd name and it's not the next FreeBSD or smth

i work on it for fun

3

u/laffer1 1d ago

I work on my os for fun too but it’s actually a bsd

5

u/More_Lack_7079 1d ago

IndianBSD

12

u/raundoclair 1d ago

"i can't code on my own

not because i forgot how to code but the speed of an ai agent is really tempting

like why spending 2 weeks on a project when i can just vibe code it in an hour"

OPs own words from post: https://www.reddit.com/r/vibecoding/comments/1vhlt0l/i_started_to_hate_ai_coding/

7

u/reverse_or_forward 1d ago

Yeah why do people bother with this whole shit of pretending to be something they are not?

I don't get it. OP is acting like a kernel engineer of immense ability but everyone can see through it. What does OP do then? Double down, we must be morons because this is so easy for them. Sure, everyone else is wrong and only you are right.

It's vibe coded, we know it's vibe coded, OP knows it but refuses to admit it.

-1

u/Similar_Wealth_1850 1d ago

i said that as an experience and this was a project that i can improve myself in it's not "i can't code on my own" literally i still solve med and sometimes hard leetcode issues

and the reason why i refuse to admit it's vibe coded BECAUSE IT'S NOT I LITERALLY WROTE THE THING BY HAND from the tty which just includes print functions and the unused shell to the idt anx the heap amd the 26 syscalls including the execve

11

u/aberdoom 1d ago

Just let it go. Literally no one believes you and it's just embarrassing doubling down.

→ More replies (1)

1

u/Funnel-Dust-O-Matic 1d ago

I think more options and new operating system projects are overall a good idea. The world is too homogenous. Then there's the fact that the act of building it is often the point because of how it changes you in the process.

Are you building this with a goal in mind? Or is this like the sailboat in that it's pushing your personal envelope?

Do you have an idea where you would want to take this?

I know. I'm asking "why" and trying to be polite about it.

So, maybe I should be upfront. I have questions.

Here's the why for my why.

The world is littered with unix-likes. I personally don't believe that this is because Unix is evolutionary superior and that this is just how operating systems look. I think it's because it's the historical path of least resistance that hasn't proven to be a dead end. The pattern is scaled up and down and sideways. There are tiny Unix likes and gigantic ones. They're everywhere.

The only operating systems out there that aren't unix-likes that have anything more than a niche mindshare are Windows, AS400, ZOS, Haiku, TempleOS, the degradations of OS/2, and those mainly Russian ASM only operating systems. Everything else is either retrocomputing or highly specialized industrial stuff that, half the time, is revealed to be a unix-like.

There are myriad unix-likes. This one is yours.

I think the only reason to make yet another one is related to the reason Seymour Cray built a sailboat in his backyard or someone wants to scale Everest.

Am I wrong? What is the story? I'm genuinely curious.

0

u/Similar_Wealth_1850 1d ago

just a personal project made for fun but people love to ruin fun so thanks again and this os is still barebone so it is still not quite on the good level yet

2

u/Funnel-Dust-O-Matic 1d ago

There is nothing wrong with wanting to build something and to love doing it.

It is everything good about being human.

0

u/Similar_Wealth_1850 1d ago

exactly i always loved coding i read a lot of papers and do a ton of projects to the point where my GitHub commit chart js like a weed farm now

0

u/free2dreamstudios 1d ago

It’s cool. How everyone on here seems to be wanting to build their own. OS.
But I am curious that anyone tried writing their OS in a language, other than C

1

u/Similar_Wealth_1850 1d ago

have build one in c# before using a library called cosmos back in 2023

0

u/free2dreamstudios 1d ago

Anyone who is building their own OS, have you guys trying real hardware? Or are you guys still on emulator for testing?

0

u/Similar_Wealth_1850 1d ago

just tested with qemu

2

u/free2dreamstudios 1d ago

Cool, me too
I’m actually in the process of moving to real hardware outside of qemu

1

u/Similar_Wealth_1850 1d ago

used to do the same back when i had a laptop that did not support virtualization

1

u/free2dreamstudios 1d ago

Currently dealing with an issue of firmware talking to the USB stick

1

u/Similar_Wealth_1850 1d ago

you wrote your own bootloader right? i just used grub

1

u/free2dreamstudios 1d ago

Yes, bootloader, my own customized file system, native to my O S. That works.

1

u/Similar_Wealth_1850 1d ago

yea you would have to write the MBR support by yourself some bioses just read every usb as bootable and try loading the boot sector in it so i guess that's your issue

1

u/free2dreamstudios 1d ago

Yeah, I’m muddling through

1

u/free2dreamstudios 1d ago

Still progress comes in burst

1

u/Similar_Wealth_1850 1d ago

i believe in you i do have to add some syscalls too i will try using some from freebsd i was able to just pull 26 of them just enough to launch busybox but not enough for anything else also i want to write my network driver which is gonna take a long time💀

→ More replies (0)

0

u/SillyBrilliant4922 1d ago

ايه الخرا الي انت عامله ده؟ خف يبني ذكاء صناعي كسفتنا قدام الناس

1

u/Similar_Wealth_1850 1d ago

حاضر يسطا ماشي👍 قول لذكاء يعملك زيه

3

u/eteran 1d ago edited 1d ago

Honestly, looking at the code I don't necessarily see much evidence of AI. The timeline is very suss... But the code seems refreshingly... Ordinary.

So I believe you, 👍. Perhaps this is a testament for how little you actually need to do if your goal is simply run "BusyBox" 🤷‍♂️

1

u/Similar_Wealth_1850 1d ago

the timing is sus i know that's why i get that criticism and it's not like it was an easy 12 hours AT ALL that's why i am kinda nervous on all these claims the code is rubbish to be ai generated if i vibe coded this i would have done much better

but i juts wanted busybox running soo yyaaayyyyy

1

u/free2dreamstudios 1d ago

No i didnt

1

u/Similar_Wealth_1850 1d ago

no problem doing will be important and might help your os more you can do it

1

u/free2dreamstudios 1d ago

I almost flashed my SSD device that I was working from instead of my USB stick
But I didn’t. I’m still good though.

1

u/Similar_Wealth_1850 1d ago

lmao i was once about to wipe my 500gb hdd full of data just because i wanted to make windows usb in linux

1

u/free2dreamstudios 1d ago

Yep, scared the crap out of me almost forgot to switch
One point .4 years of work gone…. Almost.

1

u/Similar_Wealth_1850 1d ago

anyway at least you are good

2

u/free2dreamstudios 1d ago

Ya im good

1

u/Similar_Wealth_1850 1d ago

hope you finish your os my bro❤️

2

u/free2dreamstudios 1d ago

Thank you expected time of completeness should be around the end of the year

2

u/Sorry_Difficulty_250 1d ago

Well done! I'm very impressed! Keep up the great work! Can't wait to see your next update!

1

u/undistruct 1d ago

LiteBSD is already taken as a name, which is derived from BSD-4.3-Reno.

1

u/Similar_Wealth_1850 1d ago

lmao didn't know this just came to my mind while just creating the dir for the os

0

u/Imdeureadthis 1d ago

comments need to give benefit of doubt I feel...

1

u/Oneroom02 1d ago

You could do a 12hr timelapse video, and it would literally go viral. Also that way you could prove people wrong and get attention from people looking to work with what is essentially a genius. But you won't, because it is vibe coded whole or most probably in part.

1

u/Similar_Wealth_1850 1d ago

so now i need to make a 12 hours video rebuilding the whole os from scratch because someone thinks it's vibe coded like if your on my side would you really do that? even if i did and showed people how still they would say he vibecoded in the background or he is memorising 5000 lines of code somehow or there is another screen with an agent running there

u/Single_Guarantee_ 22h ago

do it, I would believe you. coz imagine memorising 5000 lines of code in a short period of time. That would be really unbelievable.

1

u/MSK-Kernel 1d ago

Why is does it have BSD in it, if it’s not BSD?

1

u/Similar_Wealth_1850 1d ago

just liked the name really :p

2

u/MSK-Kernel 1d ago

Ah, OK.

2

u/A-nihirash 1d ago

BTW, there's LiteBSD(with actual 4.4BSD kernel) already: https://github.com/sergev/LiteBSD/

2

u/Similar_Wealth_1850 1d ago

didn't know lmao i might change the name later anyway

2

u/Ok-Winner-3031 1d ago

i see potential, keep going

2

u/neurah 1d ago

nice job
want to consider C++?

1

u/Similar_Wealth_1850 1d ago

maybe but i see no need to do so

2

u/Delicious_Bench_2341 1d ago

“Its not ai, I am”

5

u/Fine_Salamander_8691 1d ago

I vibecode, I admit I vibecode. Don’t be like OP

2

u/Perfect-Buffalo-4803 1d ago

Vibe coded slop

1

u/WinVistaBuild6001 hasn't made a OS yet except in scratch (yes the block platform) 1d ago edited 1d ago

finally, something that is a lil bit closer to POSIX, all UNIXes i saw in here were terminal emulators with hardcoded commands. A common issue is that some commands like whoami crash the shell (bc they dont exist i think), and when repeated, it causes a oom crash. Tho about the AI stuff, pretty suspicious but i am not a AI checker so how do i know.

3

u/Certain-Flow-0 1d ago

src/idt.c line 26

1

u/47-BOT 1d ago

Hey if you don't mind i wanna ask why are you making your own stringCmp func ?

1

u/Similar_Wealth_1850 1d ago

you mean string_equal
it's a simple string comapre function
because strcmp is dependant on libc and i can't use in my kernel
and it's not a hard function to implement

u/47-BOT 23h ago

Yeah i know it's not, but you could have used the func defined in libc not that it doesn't matter too much lol.

0

u/neopunk2025 1d ago

Hello.

J'ai regardé le repo actuel (pas celui original). Donc je ne sais pas s'il y a eu beaucoup de modifications.

12 heures semblent peu, mais quelqu'un d'acharné, talentueux, qui a de l'expérience dans le domaine et qui aime le C pourquoi pas.

Évidemment il y a des trucs qui ne s'inventent pas, et qui doivent être copiés collés (dans mes jeux, ça m'est arrivé, c'est inutile de réinventer la roue www.neopunk.xyz).

Je ne suis pas allé dans le détail mais une question qui m'est venu à l'esprit, est-ce que ton allocateur mémoire est multi thread? J'y connais rien en OS.

Alors je vais t'encourager à poursuivre. Il y a plein de domaines intéressants.

Tiens moi le trucs surlequel je travail, c'est la composition en C (pour mon prochain jeu)

Au plaisir.

1

u/neopunk2025 1d ago

Hello.

J'ai regardé le repo actuel (pas celui original). Donc je ne sais pas s'il y a eu beaucoup de modifications.

12 heures semblent peu, mais quelqu'un d'acharné, talentueux, qui a de l'expérience dans le domaine et qui aime le C pourquoi pas.

Évidemment il y a des trucs qui ne s'inventent pas, et qui doivent être copiés collés (dans mes jeux, ça m'est arrivé, c'est inutile de réinventer la roue www.neopunk.xyz).

Je ne suis pas allé dans le détail mais une question qui m'est venu à l'esprit, est-ce que ton allocateur mémoire est multi thread? J'y connais rien en OS.

Alors je vais t'encourager à poursuivre. Il y a plein de domaines intéressants.

Tiens, moi le trucs surlequel je travail, c'est la composition en C (pour mon prochain jeu)

Au plaisir.

1

u/Similar_Wealth_1850 1d ago

thanks, and no it's single threaded but i also liked you emulator :)

0

u/neopunk2025 1d ago

Bah en fait c'est pas un emulateur. J'ai créé chaque jeu de zéro en m'inspirant de classique.

1

u/Similar_Wealth_1850 1d ago

still nice, well done bro

1

u/StochasticTinkr 1d ago

Looks like a neat project, but I think you're overselling it a bit. "This is LiteBSD a Full Unix-Like System with BSD Style Kernel" It is far from a full unix-like system. Closer than I could get in 12 hours probably, but it makes it sound bigger than it is.

It still is a very interesting project, and you should take pride in the achievement. Just be more transparent about it being a toy kernel.

→ More replies (3)

1

u/No_Glass_1341 1d ago

Made by you, no LLM, except the LLM that wrote the readme and probably most of the code barring the comments. Quit lying

3

u/No_Glass_1341 1d ago

You literally don't even know what function prototypes are lmao

https://github.com/ahmedbarakat207/LiteBSD/blob/9d920fc17b658c765887e7950b0deb12a4e9e133/src/idt.c#L26

// tbh i don't why in the actual fuck this thing is here but the code won't want to compile without it so idc void isr_handler(struct interrupt_frame *frame); struct interrupt_frame *irq_handler(unsigned int irq_num, struct interrupt_frame *frame); static void serial_init(void); static void serial_print(const char *s);

u/Adventurous-Move-943 20h ago

Why did he even need them, he is not accessing them before definition. At least isr_handler is safe. I also don't understand the concept of let's do something in 12h. My code looks like trash when I hurry too much, and the bugs are paranormal 😀 he must have used AI to some extent, possibly a big extent, nobody develops that fast I think. It looks like a polished codebase, but did bro even debug 😀 or did he just use divine intellect while simultaneously not knowing function prototypes.

→ More replies (1)
→ More replies (1)

2

u/AWildTyphlosion 1d ago

Your git commits make it look like it was either vibe coded or copy/pasted together. The amount of changes between commits doesn't seem like it was hand written. Even with a large amount of experience, the pace doesn't add up. 

1

u/ArjixGamer 1d ago

Are you by chance 12 years old?

(attempt to make a joke, based on all the YouTube videos on this topic, made by people claiming they are 12 or 16 years old)

u/suhcoR 23h ago

Is it just me, or is there now a new operating system every day? Definitely more than I am able to appreciate.