Live data from Hacker News

Show HN: Building a web server in assembly to give my life (a lack of) meaning

github.com

231–240 of 246 posts

Re: Show HN: Building a web server in assembly to give my life (a lack of) meaning

#231

Earlier quoted context omitted.

Did hammers obviate the technical mastery of finding a suitable rock? Or did they elevate the definition of “technical mastery”?

llms are nothing like hammers or other tools. They are factories that product goods on a whim. There is nothing to compare them to as we never had anything like that. This is not industrial revolution this is obliteration of work at its core.

I look at them as lab grown bacteria. We’re in the early days and still have a lot of contamination we still don’t understand. They don’t always produce a viable result, and sometimes they break test rigs.

Just because they’re not a pure extension of our bodies or minds like a hammer or pencil doesn’t mean they will magically break the concept of work.

Re: Show HN: Building a web server in assembly to give my life (a lack of) meaning

#232

Earlier quoted context omitted.

If you've got an idea that you need assembly language for, you can use a compiler to create that assembly language. It'll probably do a better job than an LLM. Assembly projects are interesting because they're written in assembly, not because they contain assembly.

You'd be surprised, again.... most compilers don't generate very good code, mostly because 1. the time for optimisation is limited 2. the constraints are overlapping and just completely intractable beyond a single function (do you want to inline this, saving on the call and increasing binary size, or not do it because it's cold?) 3. they don't have domain-specific knowledge about your code, and even with PGO, they mi…

Expanding the struct to two arguments does not take longer than rewriting your whole project in assembly.

Re: Show HN: Building a web server in assembly to give my life (a lack of) meaning

#233
post #230

This is brilliant, I love it. The absolute best projects ever posted here are the ones made for no other reason than “just because I wanted to”.

Thank you. My favorite reasons for projects are "just because I wanted to" and "because someone told me I shouldn't", and this one ticks both boxes, haha.

Re: Show HN: Building a web server in assembly to give my life (a lack of) meaning

#234

Earlier quoted context omitted.

How well does that run on real hardware (or PCem/86box)?

I'm using DOSbox to test it right now, but it works perfectly under the emu. I'd love to try it on a real 5160 or similar.

Another option is MartyPC https://github.com/dbalsom/martypc

Re: Show HN: Building a web server in assembly to give my life (a lack of) meaning

#235
post #224

This is fun, thanks for sharing. I have a much more minimalist one for x86 Linux if you want to see what that looks like: https://github.com/jcalvinowens/asmhttpd

Oh wow! Your project was actually really inspiring to me, thank you for making this. I was really impressed reading through it a while back. Is it alright if I add a link to your repo in my README?

How fun! I'm glad it was interesting, please feel free to link to it :)

Re: Show HN: Building a web server in assembly to give my life (a lack of) meaning

#236

I suspect that the test suite isn't great. Bun has so many different behaviors compared to other JS engines, sometimes just plain wrong or contradicting the spec. Test suite didnt catch those..

Wrong thread?

Re: Show HN: Building a web server in assembly to give my life (a lack of) meaning

#237

Earlier quoted context omitted.

Have you considered that as a hobby project, cross-compatibility (and especially on a tight timeline) might not be a priority, or even the point?

How is that relevant to a general audience? Why does such an obscure hobby project deserve attention by a broad audience if one can't even run it on a Linux-like VPS? It doesn't, and I was faithfully attempting to bridge that gap, with your nasty trolling interruption coming in the way. I don't know how much you know about assembly code, but people write it professionally to squeeze performance, typically on a server…

Show HN has a long history of people just posting random shit they’ve built that they think is cool.

Some of it is in pursuit of productization feedback. Some of it isn’t.

The general audience here is (or at least, used to be) tech enthusiasts, and you can usually assume that crowd will enjoy cool shit in tech.

Personally I’ve had to occasionally hand write x86 assembly for work on a handful of occasions to ensure certain runtime guarantees were met that the programming language i was using couldn’t provide directly. I’ve used it a ton in hobby projects because it’s just kinda cool, and i want to have a better understanding of that world.

Re: Show HN: Building a web server in assembly to give my life (a lack of) meaning

#238
What I love most about your project is the super clean Makefile (https://github.com/imtomt/ymawky/blob/main/Makefile). It is a great template to jump start an ARM64 assembly project.

I made a self documented (all the related links are in the file) single makefile (https://gist.github.com/ontouchstart/d3ad8e4d0adf63532303a90...) so that anyone can build ymawky from scratch and dig deeper by tinkering.

Re: Show HN: Building a web server in assembly to give my life (a lack of) meaning

#239

Earlier quoted context omitted.

You'd be surprised, again.... most compilers don't generate very good code, mostly because 1. the time for optimisation is limited 2. the constraints are overlapping and just completely intractable beyond a single function (do you want to inline this, saving on the call and increasing binary size, or not do it because it's cold?) 3. they don't have domain-specific knowledge about your code, and even with PGO, they mi…

Expanding the struct to two arguments does not take longer than rewriting your whole project in assembly.

I've never said that, but using assembly in certain places can certainly be justified, especially for the performance-intensive parts.

Re: Show HN: Building a web server in assembly to give my life (a lack of) meaning

#240
post #222

Earlier quoted context omitted.

Pascal stores the length of the string next to the string, but the other thing of note is with the advent of Unicode, strlen is strlen, but often not actually the number you need/want.

I argue that strlen is actually still quite often the number you need+want, because possibly the main use case for it is determining how many bytes long a string is.

It is, it just isn't always any more. When printing the string to the screen, the multibyte sequences need to be accounted for, like an emoji that's 2 bytes but only renders as one character too the screen.
Post reply on HN