Better HN
topnewbestaskshowjobs
Log inSign up

adamlouis

50 karma · joined Jul 11, 2018 (8y ago) · 16 submissions

https://suczewski.com

email: firstname@lastname.com

Submissions

comment 5y ago · link · parent

Thank you! Appreciate it! Glad you noticed some of the details.

I didn't intentionally model the Mongo query language. Some requirements were:

- JSON-based: so I did not have to parse the query

- Easy to extend: so I could add new operators later

- DB independent: so I could swap out SQLite with postgres, mongo, cockroach, duckdb, etc. IF I ever wanted to

- Expressive: so I could do aggregations / group-bys / etc

I considered using more popular standards like the ElasticSearch API but they weren't quite what I wanted. I liked how jsonlogic was basically just an AST. Its primitive structure makes code generation to other DB query languages straightforward.

I started this project with my own "JSON lisp" variant, but then found jsonlogic & used that since mine was _pretty_ close (only lists, no objects).

The top-level fields of my queries look like SQL (select, where, group_by, order_by) - I really like the Honeycomb query UI (https://www.honeycomb.io/query/) - so wanted to be able to support user experiences like that ... but also go further via arbitrary jsonlogic expressions.

comment 5y ago · link · parent

Nice! The nested explorer you have there is REALLY slick. Great work!

This is something I had been thinking about - when dealing w/ normalized JSON documents, how might I allow exploration of referenced documents? & how might I encode those relationships is some way that's lightweight?

Thanks for sharing.

comment 5y ago · link · parent

Thanks!

Yeah, jsonlogic does not seem THAT popular. A JSON-based solution that looks like an AST means you can skip query parsing & just do generation. I started this project with my own JSON Lisp DSL before going with jsonlogic.

In either case, I like the idea of being able to swap out arbitrary storage layers - sqlite, postgres, mongo, etc. - while keeping the JSON api.

Had not encountered odata - thanks for sharing!

comment 5y ago · link · parent

Thanks for sharing! This is great work. Cool to see it's written in Nim!

comment 5y ago · link · parent

Nice! Thank you!

By implementing the the ES API you may then be able to re-use parts of Kibana, Elastalert & other parts of the ES ecosystem ... could be cool!

comment 5y ago · link · parent

Nice! Glad it resonated. Never quite sure how a project like this will land.

Thanks for sharing those - will check them out. Interested to see what happens as the size of the dataset grows.

I have not looked deeply, but Typesense[1] seems like another interesting project. Similar to ES or Algolia, easy to self-host, & with a seemingly efficient memory & disk footprint.

[1]https://github.com/typesense/typesense

comment 5y ago · link · parent

Will look into it - thank you for the tip!

comment 5y ago · link · parent

Thank you for checking it out! Glad to hear it might be useful.

Will take a cleanup pass soon - was excited just to ship it.

9.

Show HN: Squirrelbyte – a SQLite-based JSON document server(squirrelbyte.com ↗)

118 points · by adamlouis · 5y ago · 31 comments

comment 7y ago · link · parent

Hi! About 6 months ago, I built a Spotify integration to:

- save all plays

- save all “Discovery Weekly” playlists

- save top songs & artists of the last month, 6 months, and all-time & observe how each changes over time

This weekend, I wrote an article with some technical descriptions & learnings. Sharing my work here!

Thanks!

app link: https://spotify.suczewski.com

11.

Show HN: Track Spotify plays, trends and discover weekly (article and app)(suczewski.com ↗)

3 points · by adamlouis · 7y ago · 1 comment

comment 8y ago · link · parent

Thank you! Definitely a bit overboard.

`returnif` is fun, but there's certainly value in the simplicity of restricted, opinionated syntax (e.g Go).

comment 8y ago · link · parent

Thanks! Agreed on the cost/benefit.

Was mostly a fun project to prove out & build a new idea. No plan ahead for this, but always new projects in the pipeline!

14.

Show HN: Returnif – the conditional return statement(suczewski.com ↗)

9 points · by adamlouis · 8y ago · 8 comments