Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
n_e
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
n_e
6mo ago
I haven't checked, but it would be surprising that the min-release-age applies to npm audit and equivalent commands
32.
▲
by
n_e
6mo ago
> Cloud sql lowest tier is pennies a day Unless things have improved it's also hideously slow, like trivial queries on a small table taking tens of milliseconds. Though I guess that if the alternative is google sheets that's no
33.
▲
by
n_e
6mo ago
I process TB-size ndjson files. I want to use jq to do some simple transformations between stages of the processing pipeline (e.g. rename a field), but it so slow that I write a single-use node or rust script instead.
34.
▲
by
n_e
7mo ago
> but so could FFI calls to another language for the CPU bound work Worker threads can be more convenient than FFI, as you don't need to compile anything, you can reuse the main application's functions, etc.
35.
▲
by
n_e
7mo ago
I assume they were talking about the comments here, not the post which I agree is great.
36.
▲
by
n_e
7mo ago
PFAS are many different molecules. For example PTFE is a large molecule with strong bonds, and as a consequence isn't very reactive and likely safe. On the other hand, perfluoroalkyls such as PFOA have the same shape as fatty acids, so
37.
▲
by
n_e
7mo ago
What exactly do the developers need to keep in mind?
38.
▲
by
n_e
7mo ago
I think that you're missing that the parent poster and I are implicitly assuming that XML is validated the most common way, i.e. with XSD, and that I'm comparing XSD validation and Zod.
39.
▲
by
n_e
7mo ago
The "data" is part of the tax simulation source code, not untrusted input, so such an attack vector doesn't exist.
40.
▲
by
n_e
7mo ago
> JSON: No comments, no datatypes, no good system for validation. I don't agree at all. With tools like Zod, it is much more pleasant to write schemas and validate the file than with XML. If you want comments, you can use JSON5 or Y
41.
▲
by
n_e
7mo ago
After thinking a bit about the problem, and assuming the project's language is javascript, I'd write the fact graph directly in javascript: const totalEstimatedTaxesPaid = writable("totalEstimatedTaxesPaid", { ty
42.
▲
by
n_e
7mo ago
(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
43.
▲
The Linux Foundation Certificate of Origin Is recursive
(developercertificate.org)
2 points
by
n_e
7mo ago
|
1 comments
44.
▲
by
n_e
7mo ago
In which countries?
45.
▲
Deploy from GitHub Actions without Storing Secrets (Using OIDC)
(even.li)
1 points
by
n_e
7mo ago
|
0 comments
46.
▲
by
n_e
7mo ago
I found your article both interesting and readable. It doesn't really matter what tools are used if the result is good
47.
▲
by
n_e
7mo ago
I have a SaaS project where the backend is in JS. I also have some data processing to do with large file (several TB). Doing it is in JS is more convenient as I can reuse code from the backend, and it is also the language I know best. Perfo
48.
▲
by
n_e
8mo ago
> but I still think the developers of both engines banter over who is really producing the True WDL numbers for a given position In fact, stockfish's WDL is very rudimentary: it is a function of the centipawn evaluation of the posit
49.
▲
by
n_e
8mo ago
Kanel is great! That's what I used before pg-typesafe, and I still use it for dynamic queries. Regarding the nominal/branded types, the typegen is configurable , so instead of e.g. mapping oid 20 to a bigint, you could map the fie
50.
▲
by
n_e
8mo ago
I haven’t found a good way to handle dynamic queries in pg-typesafe yet. For now, I type these manually, which is acceptable for my usage as they are pretty rare compared to static queries.
51.
▲
by
n_e
8mo ago
That is the way node-postgres works. pg-typesafe adds type safety but doesn’t change the node-postgres methods
52.
▲
by
n_e
8mo ago
PostgreSQL uses the format $1, $2 in the protocol, so I think it's just that nobody has bothered to implement named parameters in clients. In another style, postgres.js uses calls such as sql`select * from t where id = ${variable}` (wh
53.
▲
by
n_e
8mo ago
Unfortunately I haven't found a way to make it work. It would be quite easy to extract the queries to compute the types, but TypeScript doesn't handle tagged template literals well enough to link the query passed to the sql`` temp
54.
▲
by
n_e
8mo ago
Very interesting, thanks! I see they use the same global approach as pg-typed (asking for a ParameterDescription / RowDescription, which aren't usually exposed by the PG drivers), but there are interesting differences in the detai
55.
▲
by
n_e
8mo ago
I didn't look too much into sqlc-gen-typescript because the project looks abandoned (no commits in 2 years, many open PRs). Regarding sqlc in general, it is focused on having the SQL queries in .sql files, while pg-typed is focused on
56.
▲
by
n_e
8mo ago
Kysely is a query builder: you build queries by calling javascript functions, while with pg-typesafe you write SQL directly. I've used kysely before creating pg-typesafe, and came to the conclusion that writing SQL directly is more con
57.
▲
by
n_e
8mo ago
Not sure if it would work for HN / how it could be adapted to HN, but something I noticed on opensource projects, is that once they hit a hurdle, submitters of low quality AI-written PRs don't try to solve it and go elsewhere. For
58.
▲
Show HN: Pg-typesafe – Strongly typed queries for PostgreSQL and TypeScript
(github.com)
69 points
by
n_e
8mo ago
|
34 comments
59.
▲
by
n_e
8mo ago
An explanation that would fit both the old accounts and the artificial comments would be that they were encouraged by the author to comment (which is against the HN rules).
60.
▲
by
n_e
8mo ago
Controversial opinion: GitHub actions are good enough. I have one job that runs a shell script that runs tests, a second one that builds and pushes the docker image, and a third one that triggers CD. Could it be faster? Yes. Could the log v
More ›