• 0 Posts
  • 12 Comments
Joined 1 month ago
cake
Cake day: August 31st, 2025

help-circle
  • CouchDB (a no-sql db, but whatever) automatically provides a REST API that’s designed to be exposed directly to clients. It even implements its own client-facing authentication system. “queries” are configured in advance from the admin side, and clients just pull the results, allowing for very efficient caching. Basically, if you RTFM enough to get a couchdb instance running, you have 90%-100% of your backend complete. You could create an entire scalable full-stack app using only client-side code… and if you’re clever with HTMX, you might even be able to do it without writing any javascript at all! (I tried once, but failed because I’m not that clever, but it’s definitely probably possible)

    So TL;DR: I like couchdb, and the idea of exposing your database directly to users isn’t unprecedented. I wonder if there are any SQL databases that offer a similar thing?












  • This non-sarcastically. The operating system is better at cleaning up memory than you, and it’s completely pointless to free all your allocations if you’re about to exit the program. For certain workloads, it can lead to cleaner, less buggy code to not free anything.

    It’s important to know the difference between a “memory leak” and unfreed memory. A leak refers to memory that cannot be freed because you lost track of the address to it. Leaks are only really a problem if the amount of leaked memory is unbounded or huge. Every scenario is different.

    Of course, that’s not an excuse to be sloppy with memory management. You should only ever fail to free memory intentionally.