Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sa46
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
121.
▲
by
sa46
3y ago
Joins, however, scale exponentially if you only have full table scans.
122.
▲
by
sa46
3y ago
There was an effort within Google SRE to use Go instead of bash for all the typical usages of bash. [1] Cloudflare uses Go similarly as a scripting language. [2] [1]: https://go.dev/solutions/google/sitereliability
123.
▲
by
sa46
3y ago
For my specific setup and a single row lookup, the ORDER BY ... LIMIT 1 is faster (0.1 ms vs. 1.2 ms). The ORDER BY ... LIMIT 1 one is the same as the DISTINCT ON query, but the DISTINCT ON can return more than one resource.
124.
▲
by
sa46
3y ago
Ah, I've had this same use case: I store many versions of a resource from an external API, but I typically only want the most recent version. I've used the following techniques: Select the ID with the max sync_token. Easiest for P
125.
▲
by
sa46
3y ago
What does “Ceci n'est pas une pipe” mean in this context? I ended up on https://en.m.wikipedia.org/wiki/The_Treachery_of_Images but I’m not sure what it means here.
126.
▲
by
sa46
3y ago
All the way! I was 1-505 PIR. > dumb Joe that keeps erasing the codes out of the radio by turning on the truck without putting it on standby Oh man, I have nightmares about comms. Juggling frequencies while traversing areas of operation,
127.
▲
by
sa46
3y ago
Around 2014 or so, we (light infantry) had field telephones on the books, but we only used them once for a field exercise to practice assuming all modern tech was down.
128.
▲
by
sa46
3y ago
Some additional techniques for triggers I've found helpful: - Triggers for validation are awesome. Avoid triggers for logic if you can help it -- harder to debug and update than a server sending SQL and easier than you might think to c
129.
▲
by
sa46
3y ago
I explicitly want single-threaded execution within a tenant. After writing the original post, I figured out how to parallelize across tenants. The trick is to limit the query to only look at the next pending job for each tenant, which then
130.
▲
by
sa46
3y ago
Here are a couple of tips if you want to use postgres queues: - You probably want FOR NO KEY UPDATE instead of FOR UPDATE so you don't block inserts into tables that have a foreign key relationship with the job table. [1] - If you need
131.
▲
by
sa46
4y ago
Looks super snazzy: Can I point Retool Database to an existing Postgres database? If not, do y'all have any plans to add support? How's it work under the hood? Custom extensions?
132.
▲
by
sa46
4y ago
Here's a fun, related paper by Okasaki: Even higher-order functions for parsing or Why would anyone ever want to use a sixth-order function? [1] [1]: https://www.cambridge.org/core/services/aop-cambridge-core&
133.
▲
by
sa46
4y ago
You omitted a piece of the definition: > Malware is software that is installed on a computer without the user's consent and that performs malicious actions. https://www.mcafee.com/en-us/antivirus/malware.ht
134.
▲
by
sa46
4y ago
Erroring on appending to a slice would require checking every call to append for an error. I'd find it more surprising for append to error on resize since append implies a growable array.
135.
▲
by
sa46
4y ago
> I can't do in TS with the help of a library or two. Libraries like io-ts and zod embed the type information into JavaScript, so the information is available at runtime but only for wrapped types. If TypeScript provided runtime typ
136.
▲
by
sa46
4y ago
> Types are absolutely available at runtime TypeScript types are not available at runtime. As the name implies, runtime type information requires runtime support. Since TypeScript compiles to JavaScript, the only type information availab
137.
▲
by
sa46
4y ago
Jotai may be small and focused, but is definitely not a single file: https://github.com/pmndrs/jotai/tree/main/src/
138.
▲
by
sa46
4y ago
In terms of confidentiality, availability, and integrity: I'll bet LastPass would gladly trade availability right now to regain confidentiality.
139.
▲
by
sa46
4y ago
> I think people get hemmed up talking about what FP is You've defined purely functional programming, which seems to be the increasingly common meaning of FP. The original definitions only explicitly refer to constructing programs
140.
▲
by
sa46
4y ago
Super cool. If I understand correctly: - There's no IDL file, like a .proto file. Instead, weaver looks for marker interfaces by embedding weaver.Implements[T]. - Weaver interfaces must be serializable, which explicitly support protobu
141.
▲
by
sa46
4y ago
An opportunity arises for a Kafkaesque headline: "In Codd's Shadow, Redpanda Rises."
142.
▲
by
sa46
4y ago
Fun historical quote: > In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection. https
143.
▲
by
sa46
4y ago
Homebrew does have Postgres 15. https://formulae.brew.sh/formula/postgresql@15
144.
▲
by
sa46
4y ago
Nice article. I've used composite types with success for similar problems. Some tips: - Composite types are useful for data validation. Money types and unit-based types are good for composite types. - Avoid over-using composite types.
145.
▲
by
sa46
4y ago
Does anyone have experience using client-side DuckDB with WASM? It looks really compelling to ship analytics to the browser by running DuckDB over parquet files.
146.
▲
by
sa46
4y ago
My most popular StackOverflow question is that phenomenon exactly: https://stackoverflow.com/questions/58277794 No root cause after 3 years. The best guess is the overhead of IO somewhere in the stack.
147.
▲
by
sa46
4y ago
Link? Sounds neat.
148.
▲
by
sa46
4y ago
I like the mnemonic that five 9s is five minutes a year.
149.
▲
by
sa46
4y ago
10x seems extreme. ESR went from 14k lines in Python to 21k in Go. http://www.catb.org/~esr/reposurgeon/GoNotes.html
150.
▲
by
sa46
4y ago
Would this speed up capturing stack traces? The use case I have in mind is stack traces for logging. The Zap logger has a mild warning [1] about stack traces being relatively expensive. [1]: https://pkg.go.dev/go.uber.org&#x
More ›