Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
alde
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
61.
▲
by
alde
6y ago
Thanks! A grouping feature will definitely be useful, I have been thinking about a good way to add it to pgtyped. Will grouping fields by tables they belong to good enough? Or is there some different grouping logic you have in mind?
62.
▲
by
alde
6y ago
Sqlx looks nice! I had some ideas about porting pgtyped to rust and utilizing macros to do query type inference at build time, but was worried that such db-connected macros will slow down the build process. Nice to see that it worked out fo
63.
▲
Show HN: PgTyped – Typesafe SQL in TypeScript and Postgres
(github.com)
269 points
by
alde
6y ago
|
88 comments
64.
▲
by
alde
7y ago
I think you misunderstood my point. You mentioned that "SQL isn't type-safe", which is NOT true. Any decent RDB engine allows to perform typechecking and validation of your query without executing it. This means that SQL is t
65.
▲
by
alde
7y ago
Well, all I am saying is that PostgreSQL provides you with compile-time type-safety when your write your queries. Bringing this type information at "compile-time" into your language of choice where you embed your queries can also
66.
▲
by
alde
7y ago
This looks great and should surely cover most of the CRUD needs of simpler apps and hopefully even more. On the other hand, in my experience such complicated abstractions eventually leak, especially due to the complicated nature of the rela
67.
▲
by
alde
7y ago
SQL is as type-safe as the DB engine allows it to be. PostgreSQL is type-safe. Extracting these types and making them available and usable in your lang-of-choice at compile time is a different problem though.
68.
▲
by
alde
7y ago
I'm working on PgTyped, a code generator that makes it possible to use inline SQL in TypeScript code with guaranteed type-safety. https://github.com/adelsz/pgtyped
69.
▲
by
alde
7y ago
Imo, engineering types usually think about technical differentiation because they can potentially be good in it. Usually marketing/branding is very expensive and not very accessible for the average bright founder+engineer type.
70.
▲
by
alde
7y ago
PgTyped doesn't include a query executor. It transforms a query and its parameters into a format of parametrized query+parameter bindings, which are then sent into a Postgres DB driver of your choice. A proper DB driver sends the query
71.
▲
Show HN: PgTyped – Typesafe SQL – TypeScript types generator for raw SQL queries
(github.com)
9 points
by
alde
7y ago
|
3 comments
72.
▲
by
alde
7y ago
Yes, so true. Wish Facebook stated this explicitly on their projects readmes.
73.
▲
by
alde
7y ago
CL has some type checking features in some of its compilers, but this doesnt mean it is a typed language. Quicklisp is still in beta and is in no way even close to package managers like cargo or npm.
74.
▲
by
alde
7y ago
Hmm, interesting GQL endpoint name choice by NYT devs. https://en.wikipedia.org/wiki/Samizdat
75.
▲
by
alde
7y ago
For me Lisp was a lot of fun to learn and play with, but I dont think it had a chance to survive in modern production environment because: 1. Not typed 2. Absence of a proper package mechanism and package managers like cargo or npm
76.
▲
by
alde
8y ago
A cool fact is that mpv can hook into youtube-dl to play videos by youtube url. I use this a lot for music and 4k videos (mpv unlike browsers has good gpu decoding support on linux).
77.
▲
by
alde
8y ago
Isn't OCAML garbage collected, which should be too slow and memory hungry for system drivers.
78.
▲
by
alde
8y ago
Here is a service I know of: https://reconfigure.io/
79.
▲
by
alde
8y ago
I think this is a valid point. I can't imagine effectively managing side effects without global state like in Redux.
80.
▲
by
alde
8y ago
WebAssembly is binary packed bytecode and generally takes much less space than UTF-8 JavaScript source files.
81.
▲
by
alde
8y ago
I think this is misdirected criticism. WebAssembly runs at almost native speeds on a single very lightweight "VM".
82.
▲
by
alde
8y ago
Yo, I heard you like browsers, so we put a browser in your browser, so you can surf while you surf.
83.
▲
by
alde
8y ago
Yes, FFs devtools are slow to the point of being unusable for me. I still use Firefox for general web surfing, but need to switch to Chrome for debugging/inspection.
84.
▲
by
alde
9y ago
You have almost formulated the no-hair theorem. https://en.wikipedia.org/wiki/No-hair_theorem
85.
▲
Show HN: Go Pollock – Teaching Tool for Student Engagement and Learning
(gopollock.com)
5 points
by
alde
9y ago
|
0 comments
86.
▲
by
alde
9y ago
>"Please upload a photo of yourself that clearly shows your face. We’ll check it and then permanently delete it from our servers." >"To determine if the account is authentic, Facebook looks at whether the photo is uniqu
87.
▲
by
alde
9y ago
Looks like the part about translational invariance is wrong. Translational invariance is an invariance to translations, not rotations. If a model detects a rotated cat as a cat, then it is rotationally invariant.
88.
▲
by
alde
9y ago
A flat torus can be isometrically embedded in 3D space with a continuously differentiable embedding. Visualising this embedding using computer graphics was the aim of a French project, completed in 2012. Turned out a flat torus in 3D has co
89.
▲
by
alde
9y ago
"Pound Sterling Made Smart People Feel Dumb" (Black Wednesday).
90.
▲
by
alde
9y ago
Nowadays, most JS is uglified/minified on build anyway. I believe that times when after-build JS code was readable for the end user are long gone.
More ›