Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
aleclarsoniv
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
Ask HN: Seeking feedback on my Postgres TypeScript thing
4 points
by
aleclarsoniv
2y ago
|
1 comments
2.
▲
by
aleclarsoniv
2y ago
Hey HN, I wrote this little library a while back. This may be a bit of a niche thing, since there hasn't been much prior art tackling this problem. Before making json-qs, I was using my fork of juri [1], but it valued compression too m
3.
▲
Show HN: JSON querystring, but compact and human-readable
(github.com)
3 points
by
aleclarsoniv
2y ago
|
1 comments
4.
▲
by
aleclarsoniv
2y ago
I think it'd be worth looking at what's already out there before you put a lot of effort into this, unless of course this is merely for fun/learning.
5.
▲
Validate and auto-generate TypeScript types from raw PostgreSQL with ESLint
(github.com)
1 points
by
aleclarsoniv
2y ago
|
0 comments
6.
▲
by
aleclarsoniv
2y ago
I used this initially in a browser extension I'm building. Ended up migrating to a JSX library instead, because jQuery turns into hard-to-reason-about code pretty quickly once you're past “simple app” territory (and I say this as
7.
▲
by
aleclarsoniv
2y ago
I just published it now: https://www.npmjs.com/package/@json-qs/json-qs
8.
▲
by
aleclarsoniv
2y ago
The most common case is probably complex search queries. It's really nice not having to flatten your data just to get network level caching. In my case, building an RPC library with REST semantics, it's important to me to not pla
9.
▲
Show HN: JSON-qs – JSON in query strings, human-readable, compact
(github.com)
13 points
by
aleclarsoniv
2y ago
|
4 comments
10.
▲
Graph Retrieval Using Postgres Recursive CTEs
(sheshbabu.com)
12 points
by
aleclarsoniv
2y ago
|
0 comments
11.
▲
by
aleclarsoniv
2y ago
The home feed is a poor experience, IMO. Adding a tagline to each product would help me know if I want to learn more, without having to decide to click based on a logo and name alone. I think categories would also help me find what I'm
12.
▲
Show HN: Jumpgen – A tiny framework for file generation in TypeScript
(github.com)
1 points
by
aleclarsoniv
2y ago
|
1 comments
13.
▲
by
aleclarsoniv
2y ago
I'd love to get everyone's feedback on this library I made. I've found it helps a lot when writing a library that takes advantage of compile-time code generation. In the future, I think it could be cool to try and integrate j
14.
▲
by
aleclarsoniv
2y ago
That's not entirely true. Tree-shaking algorithms could have a “noDynamicAccess” option that errors on such use (only viable for applications, not libraries). Alternatively, the algorithm could be integrated with the TypeScript compile
15.
▲
by
aleclarsoniv
2y ago
* Not the creator of Terser, but the lead maintainer
16.
▲
by
aleclarsoniv
2y ago
TypeBox[1] also supports bi-directional transforms. [1]: https://github.com/sinclairzx81/typebox
17.
▲
by
aleclarsoniv
2y ago
TypeBox[1] differentiates between optional and undefined. [1]: https://github.com/sinclairzx81/typebox
18.
▲
by
aleclarsoniv
2y ago
It requires flow analysis, which is really hard to get right. I don't think there's a tree-shaking library that uses the TypeScript compiler API for static analysis purposes. Maybe because it would be slow? edit: The creator of
19.
▲
by
aleclarsoniv
2y ago
I'd recommend TypeBox[1] as an alternative, which has a runtime “compiler” for generating optimized JS functions from the type objects. It also produces a JSON schema, which can be useful for generating API docs and API clients if need
20.
▲
by
aleclarsoniv
2y ago
I'd love to hear more about your experience with web discoverability, as I'm making a product that aims to help with that. Email me at alec.stanford.larson @ gmail I don't know if much can be done about echo chambers. People
21.
▲
by
aleclarsoniv
2y ago
That's not supported yet, but it will involve removing the foreign key constraint from one table (by parsing and rewriting the CREATE statement before running it). Then after the referenced table has been created, add the FK constraint
22.
▲
by
aleclarsoniv
2y ago
I wouldn't compare the two directly, as they serve different preferences. I would say that using Postgres functions is more powerful, but that may not matter for your app, depending on its complexity and needs. Ultimately, I'm not
23.
▲
by
aleclarsoniv
2y ago
You could use both side-by-side if you prefer query builders for certain tasks, but that means you'll be bundling two Postgres drivers in your application server, which could mean hitting the connection limit of your Postgres instance.
24.
▲
by
aleclarsoniv
2y ago
> Seems like this tool could essentially pre-create the types for any raw Postgres SQL statement? It's a syntax parser that produces an AST. So only information explicitly defined in the syntax is available. To infer input/outp
25.
▲
by
aleclarsoniv
2y ago
The main reason I didn't contribute my changes via PR is I wanted a package without "deparse" support, which adds considerably to the install size. I also didn't want pre-compiled binaries for every supported platform
26.
▲
Show HN: Parse your Postgres queries into a fully-typed AST in TypeScript
(github.com)
116 points
by
aleclarsoniv
2y ago
|
21 comments
27.
▲
by
aleclarsoniv
2y ago
This is one of 4 reasons why I'm building pg-nano [1] and honestly the main catalyst. The other 3 reasons are: I still want to call my Postgres functions from TypeScript in a safe manner; I want declarative schemas with generated migra
28.
▲
Ask HN: Chatbot with free plan for my OSS project's docs?
1 points
by
aleclarsoniv
2y ago
|
0 comments
29.
▲
Autofix.ci automatically fixes pull requests to increase developer productivity
(autofix.ci)
2 points
by
aleclarsoniv
2y ago
|
0 comments
30.
▲
CI for performance: Reliable benchmarking in noisy environments
(pythonspeed.com)
1 points
by
aleclarsoniv
2y ago
|
0 comments
More ›