Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wrs
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
451.
▲
by
wrs
11mo ago
"The idea that we’d be investing 1% of GDP in AI, I feel like it would have felt like a bigger deal, whereas right now it just feels...[normal]." Wow. No. Like so many other crazy things that are happening right now, unless you&#x
452.
▲
by
wrs
11mo ago
The variables behave the same as inline styles on the elements would, though, right? And you can do variable assignments in style rules, and they follow specificity as usual? I am out of my comfort zone here, but if that were true then at
453.
▲
by
wrs
11mo ago
I think you are demonstrating the title of this article. The --color variable is inherited through your style sheet cascade, just like any built-in property would be. In other words, CSS variables are pretty much custom properties. In the l
454.
▲
by
wrs
11mo ago
GQL is an HTTP endpoint. The question is, how are you schematizing, documenting, validating, code-generating, monitoring, etc. the request and response on your HTTP endpoints? (OpenAPI is another good choice.)
455.
▲
by
wrs
11mo ago
Yep, OpenAPI is also a good choice nowadays. That’s typically used with the assumption you’ve chosen a supported subset of queries. With GQL you have to add that on top.
456.
▲
by
wrs
11mo ago
It is flexible, but you don’t have to let it be infinitely flexible. There’s no practical use case for that. (Well, until LLMs, perhaps!)
457.
▲
by
wrs
11mo ago
Because it solves all sorts of other problems, like having a well-defined way to specify the schema of queries and results, and lots of tools built around that. I would be surprised to see many (or any) GQL endpoints in systems with signifi
458.
▲
by
wrs
11mo ago
It doesn’t actually require that second part. Every time I’ve used it in a production system, we had an approved list of query shapes that were accepted. If the client wanted to use a new kind of query, it was performance tested and sometim
459.
▲
by
wrs
11mo ago
Importantly, both behaviors are correct under the appropriate circumstances (which you described). It’s not random or discretionary.
460.
▲
by
wrs
11mo ago
To those who didn’t read the post, I’m reacting to the author’s complaints about how the MacOS dock works, which aren’t actually about how the dock works. (“Hey MacOS switchers [from Windows or GNOME]”)
461.
▲
by
wrs
11mo ago
This is the appropriate behavior if and only if the app has only one “main” window (e.g., System Preferences).
462.
▲
by
wrs
11mo ago
Hey MacOS switchers, welcome. Please know that closing the last window doesn’t quit the application. Quitting the application quits the application. That’s why the icon is still in the dock.
463.
▲
by
wrs
11mo ago
I’ve seen a lot of CI/CD setups and I’ve never seen that. If that were common practice, it would certainly simplify the package manager, since there would be no need for lockfiles!
464.
▲
by
wrs
11mo ago
Do you upgrade all your dependencies every day ? If not, then there’s no real difference in upgrading as if it were 7 days ago.
465.
▲
by
wrs
11mo ago
I was punished by getting into grad school, going to the "meet the faculty" party, and having my Algorithms professor greet me with "oh, you're the one who never came to class". (I can't resist pointing out, no
466.
▲
by
wrs
11mo ago
The OP's point is that if your monitoring solution dies, your customers don't even notice, so you shouldn't build it yourself. But if the service running your actual business logic dies, your customers get cut off, so you sho
467.
▲
by
wrs
11mo ago
It should be. If you aren’t treating it exactly the same as panic and expect, that’s what I’m calling the “blind spot”. And why should you have to make up a message every time when the backtrace is going to tell you what was wrong?
468.
▲
by
wrs
11mo ago
Same thing that would happen if it did a match statement and panicked. The problem is the panic, not the unwrap. I don’t think you can ever completely eliminate panics, because there are always going to be some assumptions in code that will
469.
▲
by
wrs
11mo ago
That has nothing to do with exceptions, just the ability to unwind the stack. Rust can certainly give you a backtrace on panics; you don’t even have to write a handler to get it. I would find it hard to believe Cloudflare’s services aren’t
470.
▲
by
wrs
11mo ago
I would say, sure, if you feel the same way about panic calls making to production. In other words, review all of them the same way. Because writing unwrap/expect is exactly the same as writing “if error, panic”.
471.
▲
by
wrs
11mo ago
That is slowly being addressed, but meanwhile it’s likely you have a reliable upper bound on how much heap your service needs, so it’s a much smaller worry. There are also techniques like up-front or static allocation if you want to make mo
472.
▲
by
wrs
11mo ago
I was in a working RCS chat with two Android users. One of them switched to iOS and it’s been sheer chaos ever since. The conversation splits and rejoins, messages randomly choose which copy to appear in, my view is full of little daily not
473.
▲
by
wrs
11mo ago
That's kind of what I'm saying with the blind spot comment. The words "unwrap" and "expect" should be just as much a scary red flag as the word "panic", but for some reason it seems a lot of people do
474.
▲
by
wrs
11mo ago
Not sure what you're saying with the "work as a Result<>" part...unwrap is a method on Result. I think you're just saying the unwrap/expect methods should be eliminated?
475.
▲
by
wrs
11mo ago
And it's fine for a compiler to panic when it violates an assumption. Not so with the Cloudflare code under discussion.
476.
▲
by
wrs
11mo ago
I didn't restate the context from the code we're discussing: it must not panic. If you don't care if the code panics, then go ahead and unwrap/expect/index, because that conforms to your chosen error handling scheme
477.
▲
by
wrs
11mo ago
It seems people have a blind spot for unwrap, perhaps because it's so often used in example code. In production code an unwrap or expect should be reviewed exactly like a panic. It's not necessarily invalid to use unwrap in produc
478.
▲
by
wrs
11mo ago
Just writing multiple paragraphs with compound-complex sentences makes people think you're an AI. :(
479.
▲
by
wrs
11mo ago
There’s also a clear extra space between the 4 and 5, so figuring out to group it as “not 1 45, nor 145 but 14 5” doesn’t seem worthy of astonishment.
480.
▲
by
wrs
11mo ago
This isn't a security breach in Anthropic itself, it's people using Claude to orchestrate attacks using standard tools with minimal human involvement. Basically a scaled-up criminal version of me asking Claude Code to debug my AWS
More ›