Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sa46
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
151.
▲
by
sa46
4y ago
I think the problem is there are too many trade offs Postgres would have to make. - should soft-deleted rows move to another partition to avoid bloat? - what’s the column name and type (boolean, timestamp, tstzrange)? - what’s the syntax fo
152.
▲
by
sa46
4y ago
Helps reduce storage space by better aligning columns to reduce padding. https://www.2ndquadrant.com/en/blog/on-rocks-and-sand/
153.
▲
by
sa46
4y ago
One pattern I happily use is to capture the error into a named return error, using a multi-error if the named error is already non-nil. func fetchFoo(ctx context.Context) (_ Foo, mErr error) { conn := pool.Acquire(ctx)
154.
▲
by
sa46
4y ago
You might like the book, Influence: The Psychology of Persuasion. I found the book helpful to reframe disengaging with sales folks from: Before: "I'm acting uncharitably by not reciprocating attention." After: "I recogni
155.
▲
by
sa46
4y ago
> you'd still basically always want to make the changes incrementally, system by system, and with a sensibly sequenced rollout plan rather. Depends. It's significantly faster to deploy everything at the same time and accept tha
156.
▲
by
sa46
4y ago
When do you find reusing a promise useful? I know one canonical example is a loadable hashmap as in Concurrent Programming in Java, but I was curious if you knew of other examples.
157.
▲
by
sa46
4y ago
> Doesn't Go have a similar serialization/deserialization library? There isn't anything as flexible or widespread as serde. > In this case, what about stored procedures? That works but moves logic out of the query and i
158.
▲
by
sa46
4y ago
Cornucopia is neat. I wrote a similar library in Go [1] so I'm very interested in comparing design decisions. The pros of the generated code per query approach: - App code is coupled to query outputs and inputs (an API of sorts), not d
159.
▲
by
sa46
4y ago
I’ve been meaning to start using JetBrains http files as integration tests with their recent free-as-in-beer jar [1]. There was also an open-source Go implementation floating around that I can’t find. [1]: https://blog.jetbrains.
160.
▲
by
sa46
4y ago
Slightly off topic, would someone mind providing a down to earth summary of the benefits (or disadvantages) of dbt? To ape the infamous iPod and Dropbox middlebrow dismissals: dbt looks like a control loop with a nice UI to make a database
161.
▲
by
sa46
4y ago
I wrestled with a graph traversal problem and Postgres docs for a hot minute before realizing that the "recursive" working set can only access the results of the previous iteration. With that in mind, I took a crack at your proble
162.
▲
by
sa46
4y ago
> What does single-tenant SaaS even mean? I'll attempt to explain to clarify my own understanding. SaaS is a delivery mechanism. Tenancy is an isolation model. To your broader point, the isolation model is implementation specific. M
163.
▲
by
sa46
4y ago
> I can create them all with one round trip rather than multiple. I see. I'd lean towards using common table expressions. The first insert statement returns the primary key and other inserts can depend on the key. I do understand it
164.
▲
by
sa46
4y ago
What's the benefit of having the primary key before the row is stored in the database? Maybe concurrent inserts to multiple data stores so you don't need to wait for an initial ID from the database. You'd have to trust the cl
165.
▲
by
sa46
4y ago
Is there any tooling you use to squash the commits and use the PR message?
166.
▲
by
sa46
4y ago
Because transactional workloads (many small reads and writes that require consistency) look different from analytical workloads (giant reads with a small number of columns with looser consistency guarantees). OLAP databases typically use a
167.
▲
by
sa46
4y ago
I'm also confused. 2. Agreed. 150 ms is extraordinarily slow for a point lookup from a single table. A simple lookup should take around 1 ms since it'll be cached in memory. 3. Also agreed. The actual database time looks to be the
168.
▲
by
sa46
4y ago
Also former infantry: To expand the point, in US Army doctrine, an obstacle has one of four effects, block, turn, fix, or disrupt. Typically, you use obstacles in engagement area development as part of a defense. An obstacle that's not
169.
▲
by
sa46
4y ago
I like protobufs but I was also disappointed at the JS protobuf options. I disliked both the JS object representation and RPC transport. grpc-web in particular requires an Envoy proxy which seems absurdly heavyweight. I ended up using Twirp
170.
▲
by
sa46
4y ago
I prefer reading proto files with services over OpenAPI yaml. Here's the pet store example to compare. - https://github.com/project-flogo/grpc/blob/master/proto/grpc... - https://git
171.
▲
by
sa46
4y ago
I also went down the bespoke path after briefly investigating the official Go generator. I ended up forking https://github.com/deepmap/oapi-codegen . The official generator felt very "Java".
172.
▲
by
sa46
4y ago
Sysadmin 101 doesn't involve separating the dynamic portions of similar, but unstructured log lines to dramatically improve compression and search performance. > Zstandard or Gzip do not allow gaps in the repetitive pattern; therefo
173.
▲
by
sa46
4y ago
> Curious wouldn't `go run` give you the same? We use protobufs and pggen. Bazel transparently manages the codegen from proto file to Go code. > would you say your experience with golang IDEs / gopls is degraded? Yes, that&#
174.
▲
by
sa46
4y ago
Old comment with some details: https://news.ycombinator.com/item?id=28472062 In addition to the techniques in the linked comment, I'm currently investigating managing the entire Postgres data dir as a Bazel output dire
175.
▲
by
sa46
4y ago
My experience with Bazel at a startup (also used Blaze at Google): The good: - Amazing for Go backends. I can push a reproducible Docker image to Kubernetes with a single Bazel command. I can run our entire backend with a single command tha
176.
▲
by
sa46
4y ago
Prepared statements (in Postgres) don't work for: - Dynamically generated queries, like a user specifying a query predicate via a UI. - Dynamically selecting an identifier, like `SELECT * FROM $1` or `SELECT $1, count(*) FROM foo GROUP
177.
▲
by
sa46
4y ago
That is a neat tool but your comment gives off strong growth-hacking vibes.
178.
▲
by
sa46
4y ago
The author did not make his point well because he immediately contradicts himself. > we don’t use libraries. The only libraries we use are where [...] I know the library will continue to be maintained. I interpreted his point more charit
179.
▲
by
sa46
4y ago
That DC Rainmaker blog sure looks like advertising. There's affiliate links, coupon codes, and even a custom ad platform [1]. I'm not suggesting it's a bad thing, but DC Rainmaker is most certainly "marketing". [1]:
180.
▲
by
sa46
4y ago
Where’s the component preview code hosted? I’m interested in Storybook alternatives.
More ›