[{"data":1,"prerenderedAt":268},["ShallowReactive",2],{"project-48640278":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":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":43,"post_text":45,"what":46,"said":74,"maker_in_thread":158,"shape":165,"grid":169,"attempts":230,"same_week":231,"maker_shows":38,"maker_hidden":260,"reader_version":261,"card":262},"48640278","ymawky","A pure ARM64 Assembly web server, now on Linux with CGI for no reason","title","Show HN: A pure ARM64 Assembly web server, now on Linux with CGI for no reason","https:\u002F\u002Fgithub.com\u002Fimtomt\u002Fymawky\u002Ftree\u002Flinux","github.com","imtomt",1782188894,2026,51,26,1197,4366,28,"notable","infrastructure","web server","cli",[24,21,25,26,27],"arm64 assembly","cgi","linux","assembly","debated",0.185,{"positive":31,"neutral":32,"mixed":32,"critical":33},6,1,4,12,{"execution":36,"performance":39,"idea":41,"design":42},{"positive":37,"critical":38},3,2,{"positive":40,"critical":32},0,{"positive":38,"critical":40},{"positive":40,"critical":32},[44,40,40,32,40,40,37,40,40,44,37,40,32,44,44,32,40,40,40,40,40,44,44,40,40,32],5,"This is ymawky, a now-dynamic web server written entirely in ARM64 Assembly. I've previously posted about ymawky here: https:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=48080587\n\nIn the past month and a half, I've made some pretty major improvements: I've added CGI scripting support, so the server now supports query strings and dynamic content; and I've fully ported ymawky to run on Linux, rather than macOS-only.\n\nIn addition to GET\u002FPUT\u002FHEAD\u002FDELETE\u002FOPTIONS requests, because of CGI support ymawky also accepts POST requests (only to CGI resources for now).\n\nI've also updated the more detailed writeup to refl",{"problem":47,"audience":47,"pricing":47,"motivation":48,"time_to_build":47,"stack":57,"openness":72,"stage":72,"team_size":73},null,{"value":49,"source":50,"evidence":51},"A fun project, written by hand in assembly","maker",[52,54],{"id":53},"post",{"id":55,"by":11,"text":56},"48651455","Well, if security is a major concern, definitely don't use ymawky in production! That said, I did try my best to harden it. I've fuzzed the parser extensively with afl-fuzz, and…",[58,62],{"value":59,"source":50,"evidence":60},"ARM64 assembly",[61],{"id":53},{"value":63,"source":50,"evidence":64},"raw Linux syscalls",[65,69],{"id":66,"by":67,"text":68},"48643484","radhitya","\"raw syscalls only: no libc wrappers\" insane! i wonder how many times you have spent to learn about them!",{"id":70,"by":11,"text":71},"48651886","Honestly it's easier than you'd think! All the syscall numbers are in \u002Fusr\u002Finclude\u002Fasm-generic\u002Funistd.h (on linux), and you can read the man page for any of them.","unknown","solo",{"praise":75,"objections":95,"requests":117,"questions":122,"alternatives":141},[76,88],{"value":77,"source":78,"evidence":79},"Impressive effort writing the server by hand in assembly","commenter",[80,84],{"id":81,"by":82,"text":83},"48641919","wewewedxfgdf","You wrote this by hand? Impressive.",{"id":85,"by":86,"text":87},"48642538","nickcw","I love it :-) Back in the distant past I wrote some really big ARM 32 assembly projects. 64 bit ARM is really very similar! I had a look through the code. Some ENTRY\u002FEXIT macros…",{"value":89,"source":78,"evidence":90},"Pleased to see it ported to Linux",[91],{"id":92,"by":93,"text":94},"48642193","kunley","Ahh, this little gem ported to Linux, great! That opens much more possibilities to play with it, thanks",[96,106],{"value":97,"source":78,"evidence":98},"Security concerns about vulnerabilities in assembly code",[99,103],{"id":100,"by":101,"text":102},"48644385","mrbluecoat","> written entirely by-hand in ARM64 assembly as a fun project. It's probably got a lot of vulnerabilities I'm unaware of Impressive, but that second part worries me. I hope one…",{"id":104,"by":82,"text":105},"48643241","There's critical security flaws in this web server. Consult your local LLM for a security analysis.",{"value":107,"source":78,"evidence":108},"Assembly is not worth it compared to C for performance or maintenance",[109,113],{"id":110,"by":111,"text":112},"48706832","ntm3c","Assembly can provide the best raw performance because it's closer to the hardware. However, writing and maintaining a web server in Assembly takes much more time, and in many…",{"id":114,"by":115,"text":116},"48643733","sylware","arm64 is an IP-locked ISA, namely it is not worth assembly writting, stick to plain and simple C. RISC-V is. I am self-hosting many of my internet thingies. I plan to move to…",[118],{"value":119,"source":78,"evidence":120},"Use macros for entry\u002Fexit and register renaming for readability",[121],{"id":85,"by":86,"text":87},[123,130],{"value":124,"source":78,"evidence":125},"Is assembly faster than webservers in other languages?",[126],{"id":127,"by":128,"text":129},"48644212","Lucasoato","Is an assembly webserver more performant than webservers written in other languages? Are there any hard limits on how much you can squeeze when using a particular framework?",{"value":131,"source":78,"evidence":132},"Why MIME types by file extension rather than magic numbers?",[133,137],{"id":134,"by":135,"text":136},"48641814","benj111","Cool. I particularly like the O'Reilly book cover that never was. Although I fear you may have misunderstood what wasm is... Question\u002Fcritique. Isn't getting the mime type by…",{"id":138,"by":139,"text":140},"48645138","jprjr_","You could argue well, if you have to open the file to read it anyway may as well look for magic numbers. That doesn't work well with text documents which won't have any kind of…",[142,148,154],{"value":143,"source":78,"evidence":144},"nginx",[145],{"id":146,"by":11,"text":147},"48651321","The language matters much less than the architecture of the web server. A server written in assembly using a fork-on-request model like ymawky is going to be much slower than a…",{"value":149,"source":50,"evidence":150},"Apache",[151],{"id":152,"by":11,"text":153},"48651416","You could do that, but it's not really necessary, and adds extra overhead and complexity. And as the other commenter pointed out, it wouldn't work for text file types without…",{"value":155,"source":78,"evidence":156},"Hiawatha",[157],{"id":100,"by":101,"text":102},{"comments":31,"answered":37,"key":159},[160,163,164],{"id":161,"text":162},"48651179","Thank you! Definitely, some macros would probably be super helpful. Register renaming, too, I'm sure. When I started this project I didn't even know about register renaming lol,…",{"id":152,"text":153},{"id":55,"text":56},{"commenters":166,"max_depth":33,"maker_replies":31,"first_comment_mins":167,"lifespan_hours":168},17,182,128,[170,172,176,178,180,182,183,185,189,190,192,194,195,197,201,204,207,210,212,214,217,219,221,224,227,228],[85,40,44,171,86,40],"maker\u002Fpositive\u002Fexecution",[173,40,40,174,175,40],"48646979","other\u002Fneutral\u002Fnone","gjvc",[161,40,40,177,11,32],"project\u002Fneutral\u002Fexecution",[134,32,32,179,135,40],"project\u002Fcritical\u002Fexecution",[138,32,40,181,139,40],"commenter\u002Fneutral\u002Fexecution",[152,32,40,177,11,32],[100,38,37,184,101,40],"project\u002Fmixed\u002Fexecution",[186,38,40,187,188,40],"48644925","commenter\u002Fneutral\u002Fnone","efficax",[55,38,40,177,11,32],[92,37,44,191,93,40],"project\u002Fpositive\u002Fnone",[127,33,37,193,128,40],"project\u002Fneutral\u002Fperformance",[146,33,40,193,11,32],[110,33,32,196,111,40],"project\u002Fcritical\u002Fperformance",[198,44,44,199,200,40],"48642294","project\u002Fpositive\u002Fidea","hparadiz",[202,31,44,199,203,40],"48641544","tosti",[114,205,32,206,115,40],7,"project\u002Fcritical\u002Fdesign",[208,205,40,187,209,40],"48645018","AntronX",[211,205,40,187,139,40],"48645206",[213,205,40,174,115,40],"48671830",[215,205,40,216,11,32],"48651935","project\u002Fneutral\u002Fdesign",[218,205,40,174,115,40],"48671903",[81,220,44,171,82,40],8,[66,222,44,223,67,40],9,"project\u002Fpositive\u002Fexecution",[225,222,40,187,226,40],"48645475","binaryturtle",[70,222,40,177,11,32],[104,229,32,179,82,40],10,[],[232,237,242,247,252,256],{"id":233,"name":234,"points":235,"category":236},"48591348","in the Weights",471,"ai",{"id":238,"name":239,"points":240,"category":241},"48645437","TikZ Editor",451,"dev_tools",{"id":243,"name":244,"points":245,"category":246},"48616304","Chess-Inspired Roguelike",433,"games",{"id":248,"name":249,"points":250,"category":251},"48608570","TownSquare",278,"web_saas",{"id":253,"name":254,"points":255,"category":241},"48660267","Nub",277,{"id":257,"name":258,"points":259,"category":246},"48629213","puzzlelair.com",251,false,"v2",{"id":263,"name":5,"line":6,"ai":260,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":264,"top":18,"kw":265,"maker":11,"domain":10,"tier":19,"attempts":40,"strip":266,"url":9,"mix":267,"praise":77,"objection":97,"sub":21},48640278,0.19,[24,21,25,26,27],"50010030053015510000055001",[31,32,32,33],1793991157623]