Hacker News new | past | comments | ask | show | jobs | submit | zekenie's comments login

nit: i feel like this is a typesafe sql query builder and not typesafe sql. i'm always on the look out for _good_ typesafe sql which i have yet to encounter.

Agree, I want to write raw SQL and have some tool that validate it and generate the correct return type for it, similar to sqlx[0], but AFAIK there is no such tool yet in Typescript land, there are a few that are taking that direction.

[0] https://github.com/launchbadge/sqlx


Something like manifold-sql[1] for ts would be awesome.

1. https://github.com/manifold-systems/manifold/blob/master/man...


There is Slonik [1] for instance.

[1] https://github.com/gajus/slonik


I’m trying to think through when I’d reach for this over jsonb… I guess the fact that there’s an enforced schema? And that you could do aggregations on your SQLite db? Or maybe if you wanted to send the whole delete db to a client??


> enforced schema

I have bad news for you [0] about SQLite’s view on schema consistency.

[0]: https://www.sqlite.org/quirks.html


I love using the database as the source of truth for data consistency, and constraining your data to only be allowed in your database as long as it's in a valid state.

It's easy enough to replicate those constraints to the client if you want the client to do ahead of time validation, but your source of truth lives in the database...

I wouldn't survive with SQLite.


You can make it behave with its STRICT mode, but that’s fairly recent, and it’s also just upsetting that it has to exist in the first place.

Completely agree that the DB should be the arbiter of validity. Constraints are a good thing.


*Love* monodraw. The last 2 times i was on the job market I used monodraw extensively for little inline diagrams for my take-home projects. It always was a big hit with the reviewers.


long pauses can be rhetorically powerful. i think showing people you’re thinking-and telling them—is also great. you can always say “i need time to process what you said” and write it down


i learned cold fusion in middle school. this was before stack overflow and i remember that one of the benefits to cfml was that it was highly guessable. i wasn’t great at consulting docs and once you got a few patterns you could figure the rest out with trial and error


this is so interesting! does it memoize dependencies? if i have several cells that all depend on a central one, will the central one only run once? what about state? can you declare a variable in one cell then use it in another?


Let's go through these one by one :)

> does it memoize dependencies?

Not sure what do you mean by memoization here, but there is no stored state at all (see the original post for the reasoning behind this).

> if i have several cells that all depend on a central one, will the central one only run once?

Sure!

> can you declare a variable in one cell then use it in another?

You can, as long as it's in global scope.


what i’m really wondering is: could you build a stateful repl with this?


It's a bit tricky, but possible, yes.


oooooh say more! i might use this for a personal project


i love this product and at one point wrote down why https://offbyone.us/posts/why-is-excalidraw-so-good/


some examples would be super helpful!


Documentation of any sort would be super helpful.


It's coming! Check again in 12 hours, I believe it should be up then!


Interesting! I’ve used materialized reviews for this in the past. I’m curious what the advantages to pg_later are over that.


I don't think you'd replace a materialized view with pg_later, but it might help you populate or update your materialized view if you are trying to do that asynchronously. pglater.exec() works with DDL too!

I use it a lot for long running queries when doing data science and machine learning work, and a lot of times when executing queries from a jupyter notebook or CLI. That way if my jupyter kernel dies, my query execution continues even if the network or my environment has an issue. I've started using it a bit more with https://github.com/postgresml/postgresml for model training tasks too, since those can be quite long running depending on the situation.


It should be helpful for maintenance and DDL tasks. Such as I need to build a secondary index over a large table and do something once the index is ready. Start the index creation with pg_later, check the status later and do what you need to do next. Probably, they can support triggers so that once a task is completed I can be notified.


We are planning to add support for "Push notifications for completed and failed jobs". That's in our roadmap listed here: https://tembo.io/blog/introducing-pg-later/#up-next


idk many companies lose a lot of money and are dependent on outside investment for a long time. they clearly have a category defining product that has captured the public’s imagination and changed peoples workflows. i would be very surprised if the server bills made them go bankrupt


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

Search: