News for hackers. Stuff that matters.
Re:Building a web server in aarch64 assembly to give my life... by thisislife2 on Monday May 11, 2026 @10:45AM (#48095683)
This is an interesting project - kudos for executing it. I have to admit that when I was starting out in this field, I too fantasised about, "Would this software be faster, smaller and better in assembly?". Ofcourse, assembly programming made some sense in embedded electronics, which can be very resource constrained and even specialised for one particular application. Thinking from that aspect, perhaps you should consider making this a specialised program that runs on something like a Raspberry Pi - running such a web server directly on it, without an OS (or a very minimal OS), would make for a real cool and interesting project.
Re:Building a web server in aarch64 assembly to give my life... by senfiaj on Monday May 11, 2026 @11:36AM (#48096427)
IMHO, for servers IO (FS/DB, network, etc) is usually a greater bottleneck. Microoptimizations make sense only for CPU bound problems.
Re:Building a web server in aarch64 assembly to give my life... by jvanderbot on Monday May 11, 2026 @11:39AM (#48096469)
I am pained to think of TLS/HTTPS implemented as a hobby project in ASM, but would be impressed to see it.
Re:Building a web server in aarch64 assembly to give my life... by LegionMammal978 on Monday May 11, 2026 @11:44AM (#48096541)
I did actually make an attempt at that once for BGGP5 [0]. (That is, making a minimal, horribly insecure 'client' implementing just enough behavior to get a response from a server.) But I got demoralized by how much space the binary blobs for the crypto algorithms took up, in comparison to the actual machine code.

[0] https://binary.golf/5/

Re:Building a web server in aarch64 assembly to give my life... by dorianmariecom on Monday May 11, 2026 @12:31PM (#48097229)
that url leads to scam
Re:Building a web server in aarch64 assembly to give my life... by cevn on Monday May 11, 2026 @01:22PM (#48097863)
If you keep scrolling down there is some kind of contest, I was confused at first as well. It seems to be parodying scam sites.
Re:Building a web server in aarch64 assembly to give my life... by grebc on Monday May 11, 2026 @11:58AM (#48096740)
Re:Building a web server in aarch64 assembly to give my life... by tyingq on Monday May 11, 2026 @01:56PM (#48098312)
You could borrow the output of the perl scripts from openssl.

https://github.com/openssl/openssl/blob/master/crypto/aes/as...

Re:Building a web server in aarch64 assembly to give my life... by golem14 on Monday May 11, 2026 @02:22PM (#48098686)
I'd really like to see a TCP/IP stack written in native forth (if anyone needs a really good therapist, that sounds like a _great_ project to try ;)

I mean, it doesn't look _that_ daunting, but the fact that noone seems to ever have release an open source version (there are rumours of proprietary stacks though) speaks for itself.

One of these days ...

Re:Building a web server in aarch64 assembly to give my life... by HeliumHydride on Monday May 11, 2026 @09:00PM (#48102884)
This is a web server, but not a full TCP/IP implementation: https://news.ycombinator.com/item?id=19146767
Re:Building a web server in aarch64 assembly to give my life... by golem14 on Tuesday May 12, 2026 @12:50AM (#48104305)
Yes, well aware of it, that's actually very nice for building higher levels of the webserver.

I'd really like to have a complete forth machine dealing with everything, say on an esp32. I guess there's FreeRTOS, so I could use that network layer, but bare metal would be so much cooler. I admit I don't even understand how it would work - would I have to bit-bang the ethernet lines?

Re:Building a web server in aarch64 assembly to give my life... by seba_dos1 on Tuesday May 12, 2026 @05:58AM (#48106162)
You interface with SoC's peripherals rather than bit-bang lines. You can think of them as a kind of memory mapped APIs.
Re:Building a web server in aarch64 assembly to give my life... by golem14 on Tuesday May 12, 2026 @04:30PM (#48114107)
I never interface with the peripheral in an ESP32 directly. I guess I really need to read the Free-RTOS code. Micropython just uses that, last I checked.
Re:Building a web server in aarch64 assembly to give my life... by thisislife2 on Tuesday May 12, 2026 @01:18PM (#48111257)
I was thinking more of the memory usage. As another project posted on HN described, they were running the web server in the RAM of an RPi ( https://news.ycombinator.com/item?id=48064312 ). Without a full-fledged OS, and a tiny (and fast) webserver coded in Assembly, more RAM would be available for the webserver and they could serve more users.
Re:Building a web server in aarch64 assembly to give my life... by hatefulheart on Monday May 11, 2026 @11:45AM (#48096553)
What on earth are you talking about? Assembly makes sense in desktop computing as well. Have you ever, for example, watched a video? What do you think powers the codecs, JSX?
Re:Building a web server in aarch64 assembly to give my life... by xnorswap on Monday May 11, 2026 @12:08PM (#48096872)
I'd assume most are written in C or some other higher level language. Certainly I checked the x264 ( VLC implementation of h264 ) and that is C.
Re:Building a web server in aarch64 assembly to give my life... by otherjason on Monday May 11, 2026 @12:19PM (#48097035)
The statistics reported by GitLab for the x264 repo (https://code.videolan.org/videolan/x264) report that the project is 13.5% assembly; common utilities used in the inner loops of the codec have optimized assembly implementations for several CPU architectures.
Re:Building a web server in aarch64 assembly to give my life... by xnorswap on Monday May 11, 2026 @12:24PM (#48097112)
I stand corrected.
Re:Building a web server in aarch64 assembly to give my life... by jamal-kumar on Monday May 11, 2026 @12:38PM (#48097298)
A lot of the encoding side on ffmpeg now uses hand-coded assembly optimizations to take advantage of avx512 instructions on newer x64 processors for "100x speed increase" since February 2025 in a stable form

https://www.techspot.com/news/108715-ffmpeg-gets-100x-faster...

Re:Building a web server in aarch64 assembly to give my life... by thisislife2 on Monday May 11, 2026 @02:29PM (#48098793)
Yes, I do know that some Assembly is used in systems programming and other niches where it makes sense. To be clear, I was talking about the phase some of us go through (as amateurs) when we think everything would be "faster, smaller, better" if written in assembly - Python is slow. What about C or Pascal? Wouldn't asm be faster? ... but, as we all realise sooner or later, there's a reason we prefer to code in high-level or very high-level languages, and why pre-mature optimisation can be a real handicap.
Re:Building a web server in aarch64 assembly to give my life... by hatefulheart on Monday May 11, 2026 @03:29PM (#48099568)
Ah yes, the niche that is video, audio, game and systems programming.

When those three to four amateurs still doing those niche things grow up they’ll move on to real programming, like putting together a solid skills.md file.

Re:Building a web server in aarch64 assembly to give my life... by perching_aix on Monday May 11, 2026 @07:37PM (#48102247)
Ah yes, assembly in contemporary game and systems programming. Definitely an everyday encounter, along with the millions of AV codec developers.

What?

Re:Building a web server in aarch64 assembly to give my life... by hatefulheart on Tuesday May 12, 2026 @12:23PM (#48110442)
You’re absolutely right! If a project has less than 1 million active developers it must be old and shite!
Re:Building a web server in aarch64 assembly to give my life... by perching_aix on Tuesday May 12, 2026 @02:35PM (#48112392)
Sounds like I was absolutely right alright, and so was @thisislife2. Just yet another pitiful case of falling for the "hard truths <-> hurt feelings" reversal.

Not even sure why. Something being niche is not a knock, not one way, not another. Such a weird thing to throw a sad fit like this about.

Re:Building a web server in aarch64 assembly to give my life... by hatefulheart on Tuesday May 12, 2026 @03:12PM (#48112978)
I interact with Assembly everyday and many of those around me do too. So I wouldn’t label it as niche. If there are thousands of people doing something in computing, it ain’t niche. It’s niche when the numbers are much smaller than that.

Judging by the downvotes that other guy got, he wasn’t “absolutely correct!” as you seem to claim.

Stop constantly editing your message.

Re:Building a web server in aarch64 assembly to give my life... by perching_aix on Tuesday May 12, 2026 @03:18PM (#48113077)
> If there are thousands of people doing something in computing, it ain’t niche.

Quick web search suggests there are 4.4 million software developers in the US alone. For the record, I think a lot more people touch assembly weekly than your bellyfeel figure, but it's still nevertheless worlds apart. Such a weird thing to try and deny. Not even sure why you'd feel compelled to per se, it's not the coat that wears you.

> Judging by the downvotes that other guy got, he wasn’t “absolutely correct!” as you seem to claim.

I was referring to this comment of theirs, obviously: https://news.ycombinator.com/item?id=48106378

> Stop constantly editing your message

Wait 2 hours before responding, then I can no longer make edits.

Re:Building a web server in aarch64 assembly to give my life... by thisislife2 on Tuesday May 12, 2026 @06:38AM (#48106378)
Your snide comments make me think that you are trying to create a parody account that matches your nick here (@hatefulheart). Just a heads up, unlike Reddit or other SMs, such things are not appreciated much here on HN.