Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gregwebs
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
361.
▲
by
gregwebs
4y ago
Comparing different types normally is a type error. But for interfaces the non-interface value will be converted to the type of the interface value. This conversion gives it a boxed dynamic type. This is different type than just assigning n
362.
▲
by
gregwebs
4y ago
Never mind- that doesn't actually make a difference. The solution in this case is to not re-use an existing error variable- but re-use of an error variable is common practice.
363.
▲
by
gregwebs
4y ago
I get that. But why define the Error method on a pointed receiver? In my experience almost all errors can be immutable particularly once you start using wrapping.
364.
▲
by
gregwebs
4y ago
I agree this is awful, but isn't it solved here by not using pointers? I don't remember coming across a case where a custom error type benefited from being a pointer. I am sure such a case exists, but then such a case should be us
365.
▲
by
gregwebs
4y ago
I would prefer this to the status quo, but it isn't a completely clean solution to the problem. If I now make a one line change at the bottom of my function to return one additional result, the only additional change in the diff should
366.
▲
by
gregwebs
4y ago
I officially proposed this recently and it wasn’t well received: https://github.com/golang/go/issues/56165 The proposal the submitted article references has been inactive for years. After submitting proposal
367.
▲
by
gregwebs
4y ago
I don't believe this is true: the MIT license requires maintaining the MIT license disclaimer in the derived work. AFAICT, you cannot actually relicense MIT code (unless you hold the copyright). You can create a new derived work that c
368.
▲
by
gregwebs
4y ago
IANAL and would love to be corrected, but the chart in this article may confuse many. Permissive licenses cannot be relicensed any easier than non-permissive licenses. Permissive licenses can be incorporated into larger works with minimal c
369.
▲
by
gregwebs
4y ago
Security. K8s secrets present their data in the clear to anyone who can view it or list or watch secrets. Cloud secret managers provide a separate decrypt operation, along with builtin features like auditing and versioning. > _for exampl
370.
▲
by
gregwebs
4y ago
Having a startup delay because the cli is written in node is a non starter for me. Hurl is written in Rust and starts up incredibly fast. It looks nice though for those that want to stick with the JS ecosystem though.
371.
▲
by
gregwebs
4y ago
I agree that K8s secrets are more convenient for applications and separate out deployment concerns. But I don't agree with any of the statements made about security properties. It is possible to not use K8s and make things just as conv
372.
▲
by
gregwebs
4y ago
I have been trying out https://hurl.dev and so far been really liking it. Plain text format, everything runs very quickly locally, it can capture data from previous requests to run workflows and serve as a testing tool.
373.
▲
by
gregwebs
4y ago
It’s the fear of env dumps and the fact that env variables are readable by other processes (but only inside the container) and that docker records the env vars as well. One thing I am wondering is: how much does the situation improve if you
374.
▲
by
gregwebs
4y ago
I grew up with the interrupting style, but when I realized some people get very offended by it, I decided to switch to waiting. Now that I am on the receiving end of interruptions, I notice the main problem with interrupting- that the inter
375.
▲
by
gregwebs
4y ago
Unfortunately we have to wait. Generics handle simple cases well, but have issues with more complex edge cases. Every go release is improving Generics. 1.19 has a performance regression that will be fixed in 1.20. Library authors want to su
376.
▲
by
gregwebs
4y ago
Click house is a great DB but still not the best at storing timeseries metrics. Do you have plans to incorporate a db optimized for time series storage?
377.
▲
by
gregwebs
4y ago
Fruit in nature is highly variable. I can't find a link to a paper that was published that showed that aboriginal fruit was on average a bit higher in sugar content than standard varieties. Here's a paper that came up in a quick s
378.
▲
by
gregwebs
4y ago
One of the main features of NeoVim over VIM is that NeoVIM can be embedded into other programs and new GUIs can be built that use libvim. There are now programs you can download that do that, for example [1]. Certainly, this is still an exp
379.
▲
by
gregwebs
4y ago
It does use RocksDB which is c++. But the result would probably be less stable if that had to be Rust as well.
380.
▲
by
gregwebs
4y ago
Okay, I read the fly.io documentation. What is being done now to globally distribute PG results is asynchronous replication and thus stale reads and presumably the potential for data loss during failover. So I can see why it would make sens
381.
▲
by
gregwebs
4y ago
Users generally don't plug ad-hoc log shipping solutions into Postgres. They generally use the built-in battle-tested Postgres replication features, and they can setup synchronous replication to avoid data loss. Shipping a log is trivi
382.
▲
by
gregwebs
4y ago
This is SQLite, so how would you scale itr to > 1? Certainly you can put an app tier in front of this DB tier and scale the app tier to infinity.
383.
▲
by
gregwebs
4y ago
Are you going to use LiteFS then for replication [1]? LiteFS replication is asynchronous, meaning failover can lose the latest data. Will LiteFS scale down to 0? Does scaling down to zero mean electing a leader when scaling back up to 1 an
384.
▲
by
gregwebs
4y ago
This just runs a request proxy that turns off after 10 seconds of no activity and starts it up (with a half second delay) when there is a new request. It runs SQLite with Prisma. Prisma is an API server that puts a GraphQL API in front of a
385.
▲
by
gregwebs
4y ago
This seems closer to the Zulip model of chat, which I have always been a huge fan of (but forced to use Slack instead). I see open source projects using Discord. I ask a question and then it doesn't get answered and is lost in the chat
386.
▲
by
gregwebs
4y ago
There is a third option. When ever there is a private or out of band discussion, summarize it in the public discussion. Done well, this makes for the best of both worlds in part because it reduces the text that others need to read. However,
387.
▲
by
gregwebs
4y ago
Anecdotally I just switched from one job using Go to another and saw lots of job openings for companies using Golang. Python definitely has its staying power in the marketplace and Rust seems like it might be on a greater upward trajectory
388.
▲
by
gregwebs
4y ago
In Rust you can use the anyhow library if you want a similar level of overhead to Go and similarly aren’t worried about differentiating error cases. What do you think of adopting Zig’s error handling approaches to Go?
389.
▲
by
gregwebs
4y ago
I am quite convinced that Zig's approach to error handling would apply well to Golang. At least adding a "try" prefix would be an easy change. Add the ability to enable/disable an error return trace and that would do a g
390.
▲
by
gregwebs
4y ago
I love split keyboards but had to return this one because after using it for a week my brain was still unable to adapt to the different key placements.
More ›