[{"data":1,"prerenderedAt":303},["ShallowReactive",2],{"project-45290590":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":43,"post_text":45,"what":46,"said":82,"maker_in_thread":174,"shape":184,"grid":188,"attempts":264,"same_week":265,"maker_shows":32,"maker_hidden":295,"reader_version":296,"card":297},"45290590","OS-1000-lines-zig","An OS in 1000 lines of Zig","title","Show HN: I wrote an OS in 1000 lines of Zig","https:\u002F\u002Fgithub.com\u002Fbotirk38\u002FOS-1000-lines-zig","github.com","botirk",1758207912,2025,151,34,490,3837,13,"notable","learning_science","operating system education","other",[24,25,26,27,28],"operating system","zig","kernel","risc-v","learning","roasted",-0.414,{"positive":32,"neutral":33,"mixed":34,"critical":35},1,7,0,10,18,{"execution":38,"docs":40,"idea":42},{"positive":34,"critical":39},5,{"positive":34,"critical":41},4,{"positive":34,"critical":32},[34,44,34,44,34,34,44,44,44,44,34,44,32,32,32,32,34,32,34,32,32,34,34,34,32,34,32,34,34,32,34,34,39,34],3,null,{"problem":47,"audience":54,"pricing":45,"motivation":63,"time_to_build":45,"stack":67,"openness":80,"stage":81,"team_size":80},{"value":48,"source":49,"evidence":50},"Shows how a bare-minimum operating system works.","maker",[51],{"id":52,"by":11,"text":53},"45290591","I wanted to understand what the bare minimum of an operating system looks like. So I built one in Zig, keeping the whole thing under 1000 lines of code. It can: → Boot from GRUB…",{"value":55,"source":56,"evidence":57},"People wanting to understand OS basics.","inferred",[58,59],{"id":52,"by":11,"text":53},{"id":60,"by":61,"text":62},"45328316","ants_everywhere","Sweet! Folks interested in this may also like \"Operating System in 1,000 Lines\" https:\u002F\u002Foperating-system-in-1000-lines.vercel.app\u002Fen\u002F and the implementation in C…",{"value":64,"source":49,"evidence":65},"To understand what the bare minimum of an operating system looks like.",[66],{"id":52,"by":11,"text":53},[68,72],{"value":69,"source":49,"evidence":70},"Zig",[71],{"id":52,"by":11,"text":53},{"value":73,"source":74,"evidence":75},"QEMU","commenter",[76],{"id":77,"by":78,"text":79},"45327301","coffeeri","Check the build.zig file. It defines the arguments for QEMU to run the OS. You should be able to run zig build run.","unknown","prototype",{"praise":83,"objections":95,"requests":141,"questions":152,"alternatives":169},[84],{"value":85,"source":74,"evidence":86},"Interesting learning project",[87,91],{"id":88,"by":89,"text":90},"45327267","cyberclimb","Hi botirk, really interesting project! If I build the project what is the output format and how could configure things to boot it? I know how to this with IMG and ISO files of…",{"id":92,"by":93,"text":94},"45328221","sofia44","Very cool! Mad props friend",[96,111,119,130],{"value":97,"source":74,"evidence":98},"Claimed features like CLI and VGA output are missing or not implemented",[99,103,107],{"id":100,"by":101,"text":102},"45328882","mmaunder","“Interact with the command-line interface to execute commands and view output” A command line interface has not been implemented. It just prints a bootup message. “Some basic…",{"id":104,"by":105,"text":106},"45329062","valleyer","Bizarre that the README.md does not specify that this is for RISC-V. I also went to look to see where \"console output\" was implemented, and ... it looks like it's just not?…",{"id":108,"by":109,"text":110},"45328918","reactordev","Bingo, I was about to post the same but you hit all the things I was going to say. This is completely fake and only prints stuff out like it works.",{"value":112,"source":74,"evidence":113},"README appears AI-generated and disconnected from code",[114,115],{"id":100,"by":101,"text":102},{"id":116,"by":117,"text":118},"45328006","mtlynch","Cool projects! A few suggestions: - You're committing .zig-cache to git, but that's build output, so it shouldn't be under version control. You should add it to .gitignore (you…",{"value":120,"source":74,"evidence":121},"Build fails on newer Zig versions",[122,126],{"id":123,"by":124,"text":125},"45328984","anta40","How to build the OS? I'm on macOS with zig 0.15.1 installed. `zig build` gave me this: \u002FUsers\u002Fanta40\u002FLab\u002FOSDev\u002FOS-1000-lines-zig\u002Fbuild.zig.zon:9:13: error: expected enum literal…",{"id":127,"by":128,"text":129},"45330394","s-lambert","The project was made with an older version of Zig, which used strings as keys in zig.build.zon before but then it was changed to use enum literals in 0.14.0 IIRC.",{"value":131,"source":74,"evidence":132},"Targets RISC-V with no VGA; unclear what it runs on",[133,137],{"id":134,"by":135,"text":136},"45333874","WD-42","I don’t know what output to the VGA means from the OP. I suspect that entire project was vibe coded including the readme. It’s a common first step when writing an OS for x86 but…",{"id":138,"by":139,"text":140},"45330959","a96","I also tried to find what this is supposed to run on. Some of it looks like intel crap and most looks like it's just an application. Looking at the comments, this seems to be AI…",[142,147],{"value":143,"source":74,"evidence":144},"Update to newer Zig version",[145,146],{"id":100,"by":101,"text":102},{"id":116,"by":117,"text":118},{"value":148,"source":74,"evidence":149},"Clarify README and supported platforms",[150,151],{"id":104,"by":105,"text":106},{"id":116,"by":117,"text":118},[153,158,162],{"value":154,"source":74,"evidence":155},"How to run the built output and boot it",[156,157],{"id":88,"by":89,"text":90},{"id":77,"by":78,"text":79},{"value":159,"source":74,"evidence":160},"Whether it runs on ARM",[161],{"id":88,"by":89,"text":90},{"value":163,"source":74,"evidence":164},"What lessons the project teaches",[165],{"id":166,"by":167,"text":168},"45328075","wsve","I was hoping to get some commentary about the project and what lessons you learned from it. You wrote an OS in 1000 lines of Zig, but... So what? What should I take away from…",[170],{"value":171,"source":74,"evidence":172},"Operating System in 1,000 Lines (C implementation)",[173],{"id":60,"by":61,"text":62},{"comments":175,"answered":41,"key":176},9,[177,178,181],{"id":52,"text":53},{"id":179,"text":180},"45479935","no libs at all, only std where appropriate, and there is no hidden sys calls",{"id":182,"text":183},"45479924","its been ported, currently basic paging, scheduling is implemented, but still need to implement sys call interface",{"commenters":185,"max_depth":186,"maker_replies":175,"first_comment_mins":34,"lifespan_hours":187},23,6,401,[189,191,195,198,200,202,204,205,206,209,212,213,216,218,219,223,226,230,233,235,236,237,239,242,245,246,249,250,251,253,255,258,260,262],[52,34,34,190,11,32],"project\u002Fneutral\u002Fidea",[192,34,44,193,194,34],"45327257","project\u002Fneutral\u002Fexecution","noone_youknow",[196,34,34,197,135,34],"45328093","commenter\u002Fneutral\u002Fexecution",[199,34,44,193,194,34],"45329172",[134,34,34,201,135,34],"commenter\u002Fcritical\u002Fdocs",[203,34,34,197,194,34],"45336925",[88,34,44,193,89,34],[77,34,44,193,78,34],[207,34,44,193,208,34],"45327649","hdjxjdjdkshsb",[210,34,44,193,211,34],"45327730","mcny",[179,34,34,193,11,32],[214,34,44,193,215,34],"45327788","tjpnz",[100,34,32,217,101,34],"project\u002Fcritical\u002Fexecution",[108,34,32,217,109,34],[220,34,32,221,222,34],"45329000","project\u002Fcritical\u002Fdocs","ko_pivot",[224,34,32,221,225,34],"45329467","never_inline",[227,34,34,228,229,34],"45329806","commenter\u002Fneutral\u002Fnone","freetonik",[231,34,32,221,232,34],"45330026","nvlled",[182,34,34,234,11,32],"maker\u002Fneutral\u002Fexecution",[104,32,32,217,105,34],[138,32,32,217,139,34],[238,32,34,234,11,32],"45479947",[60,240,34,241,61,34],2,"other\u002Fpositive\u002Fidea",[243,240,34,244,11,32],"45479941","maker\u002Fneutral\u002Fidea",[116,44,32,221,117,34],[247,44,34,248,11,32],"45479943","maker\u002Fneutral\u002Fdocs",[123,41,32,217,124,34],[127,41,34,197,128,34],[252,41,34,234,11,32],"45479948",[166,39,32,254,167,34],"project\u002Fcritical\u002Fidea",[256,39,34,228,257,34],"45328112","gjm11",[259,39,34,244,11,32],"45479938",[92,186,39,261,93,34],"maker\u002Fpositive\u002Fnone",[263,186,34,261,11,32],"45479951",[],[266,271,276,281,286,291],{"id":267,"name":268,"points":269,"category":270},"45284311","unscreenshottable",568,"creative",{"id":272,"name":273,"points":274,"category":275},"45361268","Dayflow",480,"productivity",{"id":277,"name":278,"points":279,"category":280},"45306120","WeUseElixir",213,"languages",{"id":282,"name":283,"points":284,"category":285},"45307166","Zedis",158,"dev_tools",{"id":287,"name":288,"points":289,"category":290},"45362813","Vibe Linking",155,"ai",{"id":292,"name":293,"points":14,"category":294},"45330198","Ohjelmistofriikit Contract Generator","web_saas",false,"v2",{"id":298,"name":5,"line":6,"ai":295,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":299,"top":18,"kw":300,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":301,"url":9,"mix":302,"praise":85,"objection":97,"sub":21},45290590,-0.41,[24,25,26,27,28],"0303003333031111010110001010010050",[32,33,34,35],1794036682730]