news.volyx.in

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

430 points by imtomt · 112 days ago · 227 comments on HN

Article summary

The author has written a web server in ARM64 assembly language, called ymawky, as a personal project to learn and for therapeutic purposes. The web server is designed to run on MacOS and Linux, but currently only works on MacOS due to differences in assembly language and system calls. ymawky supports various HTTP methods, including GET, PUT, and POST, and has features such as path traversal detection and prevention, and custom HTML pages for error codes. The author plans to port the project to Linux in the future.

Main themes

  • Assembly language programming
  • Web server development
  • Personal projects
  • Learning and education
  • System calls and portability
  • Therapeutic benefits of coding

What commenters say

  • Writing a web server in assembly language is a valuable learning experience that can help programmers understand how CPUs and compiled languages work.
  • Using assembly language for large projects is impractical and unnecessary, and high-level languages are more suitable for most tasks.
  • The project's lack of cross-compatibility with Linux is a significant limitation, and using an LLM to generate assembly code could be a solution.
  • The project's focus on MacOS is not a major issue, as it is a personal project and not intended for production use.
  • The use of assembly language can provide performance benefits and allow for more direct control over system resources.
  • The project's codebase could be maintained for both MacOS and Linux using conditional compilation directives, but it would require significant reworking.
  • The therapeutic benefits of coding and working on personal projects should be recognized and valued, regardless of the project's practical applications.
  • The project's limitations and potential vulnerabilities should be acknowledged, and the author's plans to port it to Linux and improve its security are necessary steps.