Hacker News new | past | comments | ask | show | jobs | submit login

Honestly pretty strange to write a package manager for sqlite and to use directories + json files to store the data instead of sqlite.



A couple of reasons:

1) I wanted human readable specs and lockfiles.

2) I didn't want to introduce a dependency (working with SQLite in Go is pretty ugly, it either requires GCC or a ton of other dependencies for a pure Go implementation).


SQL not so good for tree structures. Recursive CTEs are pretty gnarly.

Graphdb would be ideal.


You want to bring in a dependency to avoid writing one 8 line CTE?


The number of lines needed is not a good measure for gnarliness.

(To be fair, I don't know if gnarliness is measurable at all.)


It isn’t gnarly at all, but recursive CTE are outside the experience of most SQL devs. Here “gnarly” is used to describe “unfamiliar”.


SQLite is a pretty darn good solution for any file(set) that needs atomic / consistent writes


Why not? Just add child/parent ids


local system log "files" and package databases would be an excellent example of using sqlite


Great point




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

Search: