Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
status_quo69
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
31.
▲
by
status_quo69
5y ago
> If you need to handle different versions talking to each other in production it doesn't seem any harder to also deal with different versions in source It's much more annoying to deal with multi-repo setups and it can be a rea
32.
▲
by
status_quo69
6y ago
> but to consider their niche life-style as something more desirable than an average life style. I don't see how this follows as a rebuttal of the gp comment, if anything it says (to me) that the US is _not_ in decline because we&#x
33.
▲
by
status_quo69
6y ago
Another example of this is Transformers, which is/was beloved by kids and was easy advertising for Hasbro.
34.
▲
by
status_quo69
6y ago
I've used `thiserror` with great success in small side web projects since you can create a new enum of Errors that can be converted from a class of underling library errors. Then, inside of my regular application code, I sprinkle in `a
35.
▲
by
status_quo69
6y ago
I doubt that compiling a list will convince you, but NPR, the BBC, the Economist, the WSJ, the AP, National Review as a small snippet.
36.
▲
by
status_quo69
6y ago
> people really do want to base their opinions on facts Not really, confirmation bias is a real thing for all human beings. The issue here is that there's a fundamental disagreement about what constitutes a fact. Objectivity in repo
37.
▲
by
status_quo69
6y ago
Why should credibility matter? That is to say, how can the average person know that what they're reading is credible or not to make that determination and say "oh, CNN reported this and it's credible! Must mean that CNN is
38.
▲
by
status_quo69
6y ago
Do you mean a switch statement in pure-python that avoids certain opcodes, or a way to avoid executing opcodes in the main interpreter switch statement?
39.
▲
by
status_quo69
6y ago
I don't personally buy this. If prices were the most efficient way of determining what we should do for other people, why does the government already subsidize certain medications? Or agriculture? Or public development/education?
40.
▲
by
status_quo69
6y ago
> you can use multiple languages You can but you shouldn't unless there's a very good reason (ex: there's a very specific interface only available in a language that doesn't conform to the rest of your services) :)
41.
▲
by
status_quo69
6y ago
You can usually promisify the functions that take a callback via util.promisify (although I've done it manually myself as well).
42.
▲
by
status_quo69
6y ago
Clarification: compile time query building, not querying. Due to inlining from the compiler, you can almost entirely construct the query at compile time and shave it down to a few string concatenations.
43.
▲
by
status_quo69
6y ago
Just to clarify a bit for other readers since I've worked with diesel for while, diesel isn't a "full" orm, as there are no real helpers provided to you outside of "we can map the result of a db query into a struct(
44.
▲
by
status_quo69
6y ago
Sort of... Your maintenance burden just becomes higher as a consumer of the library because you can't rely on the compiler to tell you if something goes wrong. But if you have a good testing harness you'll probably figure that out
45.
▲
by
status_quo69
6y ago
Unless I'm misunderstanding your comment, you can make panics abort rather than unwind. https://doc.rust-lang.org/edition-guide/rust-2018/error-hand...
46.
▲
by
status_quo69
7y ago
Sorry, I misunderstood! As far as I'm aware there's no curated list of best practices just yet, although that would be awesome! Most of this comes from past experience with things like Flask/marshmallow and a lot of trial a
47.
▲
by
status_quo69
7y ago
Something in the vein of juniper but for JSON:API? That would be incredibly useful! I'm not at that stage yet, mainly hacking on https://github.com/zacharygolba/json-api-rs to bring it up to rust 2018 and add some
48.
▲
by
status_quo69
7y ago
So the answer to both of those things is that I basically hammered out a bit of code that looks sort of like what I have but it's exactly. It should have been a 503 error instead. In reality, the main thought is that the map_err in the
49.
▲
by
status_quo69
7y ago
The best way to learn rust depends on your learning style, the Book ( https://doc.rust-lang.org/book/index.html ) is fantastic even as a reference. To learn rocket I'd start with the official tutorial here: https:&
50.
▲
by
status_quo69
7y ago
Yep! Serde allows us to cheat a bit since you can call for it to skip certain fields (such as password hashes), but my preference is for the field to not exist at all in your serialization structs. Less of a chance to forget that #[serde(sk
51.
▲
by
status_quo69
7y ago
Sure! Let's start with two baseline diesel structs: #[derive(Serialize, Deserialize, Identifiable, Queryable)] #[serde(rename_all = "camelCase")] struct User { pub id: Uuid, pub username: String,
52.
▲
by
status_quo69
7y ago
One thing I wish was covered in these is how to go past 'hello world', especially things like error responses and serialization models. It took me a while before I got to the point where I think I can be productive in both queryin
53.
▲
by
status_quo69
7y ago
I've used it for 6 months on the async branch and the master branch and master was incredibly stable. Async is less so because it's a large scale effort to try and convert over the entire API with minimal breakage(apart from fairi
54.
▲
by
status_quo69
7y ago
Load balancer certs via annotations are supported, but they're a bit iffy when pairing with controllers like ambassador, since ambassador expects to own TLS termination (although the ambassador docs do say this is configurable). https
55.
▲
by
status_quo69
7y ago
If my comment implied that there was some sort of expectation then I think there was a miscommunication. There's no obligation for anyone to do anything , ever, but that's a pretty useless metric to mark against IMO. Was this a p
56.
▲
by
status_quo69
7y ago
I want to preface my comment with "I agree with you" However, in this case patches and reproductions were submitted and rejected as "boring". Whether the author really meant to use the word "boring" is neither
57.
▲
by
status_quo69
7y ago
Or you can use a boxed error iirc. Matching on the type of error after you do that isn't exactly great but it's doable if all you want to do is bubble the error up. Places where that approach really sucks include web api routes (u
58.
▲
by
status_quo69
7y ago
Rest is (simplified) just a way of expressing your routes as resources. If you want to post and get some things that's perfectly fine but you'll probably wind up accidentally fitting into a different paradigm (rpc for example if y
59.
▲
by
status_quo69
7y ago
You can't change the inheritance as far as I know after creation without some hacks, but you can change the class that an instance refers to which can kinda sorta achieve the same thing. You can't necessarily add properties to a
60.
▲
by
status_quo69
7y ago
No article, but I've done it. You basically have to take on a lot of the creation of the SVG element tags yourself, since having both D3 and React manage the DOM is a bit awkward. However, a lot of D3 functions already give back most o
More ›