news.volyx.in

A Modern Web App in C (prophitt.me)

714 points by prophittcorey · 5 days ago · 326 comments on HN

Article summary

The author describes their experience building a modern web application in C, using the CGI protocol and a simple stack consisting of OpenBSD, C, httpd, and SQLite. The application, marketyour.games, is a commercial product that uses a single binary and has minimal dependencies. The author argues that CGI is still a viable option for building web applications, despite its age. The author also discusses the benefits of using C, including simplicity, security, and minimal supply chain risk.

Main themes

  • CGI and web development
  • C programming language
  • Alternative programming languages
  • Web application security
  • Supply chain risk
  • Language choice and trade-offs

What commenters say

  • Some commenters question the choice of C as the programming language, suggesting that other languages like C++ or Rust might be more suitable for modern web development. Others argue that C is still a good choice due to its simplicity and lack of runtime overhead. The use of CGI is also debated, with some arguing that it is outdated and others seeing it as a viable option for certain use cases. Some commenters discuss the trade-offs between different programming languages, including the benefits and drawbacks of using C, C++, or Rust. The idea of using a 'better C' language, such as C3, is also discussed. Additionally, some commenters mention the potential benefits of using other languages, such as Go, which offer memory safety features not available in C.
  • themes": [