Re:A Programming Language Database
by nerdponx on Saturday August 27, 2022 @12:24PM
(#32620625)
Missed opportunity to encode this as s-expressions or a Prolog database!
[ Parent
| on HN ]
Re:A Programming Language Database
by cyberbanjo on Saturday August 27, 2022 @01:17PM
(#32621074)
I don't know enough Prolog to know why you'd want that (please share), but SWI prolog has a SQL interface to run prolog over SQL data, and the author has released it as CSV and JSON, I know SQLite lets you import CSV data, probably other databases do.
JSON to s-expr's should be convertable with simple search-and-replace, or you could just load the file with a json library with reader macros so it loads the data into the appropriate data structures, I'm fairly sure both common lisp and clojure let you read jsons directly like that.
SWI is full of features and does JSON and SQL on its own very easily.