Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

we just slurp/dump clojure maps to disk. clojure is our query language.


As a clojure user, that's an apples-to-oranges comparison. Out of the box clojure does not provide you with out-of-order slurp/dump info against a file, does not provide you with indexes, etc. You can load everything into memory and create an efficient structure in your EDN but a) you need to implement it yourself; b) if your machine crashes, you lose it, because by default you work in memory, so you need to manually manage saving to disk.

So basically I can just say the same thing you said with C: "I just fopen/fgetc strings to disk. C is my query language."


it's not that apples to oranges. op is saying they use sqlite, i'm saying we use edn files. just offering another point of view.

if by out-of-order you mean loading parts of a file, of course we don't do that.

we don't load everything into memory (there's more than one file). just like you wouldn't load your whole sqlite db into memory.

if the machine crashes we lose what we didn't save. same with a db.

  > So basically I can just say the same thing you said with
  > C: "I just fopen/fgetc strings to disk. C is my query
  > language."
as a clojure user you know this is not a good analogy. c has macros too.

the main problem with our approach is that the server needs to have access to the edn files. that's not always doable ... but same problem with sqlite.

and it is oh so nice to investigate stuff in the repl:

  (:prio (load-file (filter #(= "secret-id" (:id %)) index))) 
btw, i loved to kill a mocking bird.


How is not apples to oranges? You are comparing a library that implements a database (with a specific binary file format that any sqlite instance understands, and a query language, among other functionalities) to a programming language!

With sqlite, creating an index is a one-liner. How do you cover that in clojure? With sqlite, a whole database fits in one file that can be read by almost any macos / linux machine. With clojure, you need your specific program created on top of clojure installed in the machine. Etc.

At the end of the day, you can reimplement sqlite on clojure, which basically proves that we are talking about different abstraction levels, thus apples to oranges.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: