Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dthul
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
151.
▲
by
dthul
6y ago
Didn't downvote you, but maybe because it's quite off topic?
152.
▲
by
dthul
6y ago
I'm not even sure what Linus was referring to when he talked about memory allocations in C++ being hidden. Aren't the only options either an malloc (kmalloc) call or a `new` operator call?
153.
▲
by
dthul
6y ago
Oh yeah absolutely, for prototypes you can liberally use unwrap/expect to figure out the happy path first and remove those calls later. I haven't checked out the Rust book in quite some time, but it would be cool to make newcomers
154.
▲
by
dthul
6y ago
Not to discredit you, but you postulate things like "9 out of 10 times" and generally "low software quality" but don't support your statements. It certainly is not my experience that this is (more, or at all) common
155.
▲
by
dthul
6y ago
A bit OT: I very much appreciate well written C code for its simplicity and "rawness", but how come that many C codebases seem to place no importance on code comments? This repo contains a few thousand lines of code without so muc
156.
▲
by
dthul
6y ago
The opposite will be annoying as well: I sometimes order products from non-European companies which use UK sellers as their official resellers for the EU. They will probably need to find new EU resellers outside the UK.
157.
▲
by
dthul
6y ago
> This does not even give a warning. Just to clarify: the "let _ = ..." construct is the explicit way of suppressing the warning in Rust. You acknowledge that there is indeed a return value but you choose to ignore it. Just cal
158.
▲
by
dthul
6y ago
Minor clarification: afaik it's impossible to implement Copy such that it would allocate. Unlike Clone, the Copy trait is only a marker trait which doesn't have methods, so you cannot customize its behavior. It will always be a bi
159.
▲
by
dthul
6y ago
> saying that the police walks in the street killing random black people is also unproductive It's unfortunately true though. We have seen countless examples in the last few years alone where the victim was murdered by a cop. And th
160.
▲
by
dthul
6y ago
Follow up: The latest Firefox update seems to have solved the issue. So far.
161.
▲
by
dthul
6y ago
Since the last Catalina update (10.15.4) Firefox is almost unusable for me, whereas it was buttery smooth before. There are constant multi-second freezes and when I switch tabs I often see a gray loading screen before the content shows up a
162.
▲
by
dthul
6y ago
Amazing, thanks! I was always annoyed when I used the address bar to search for a tab and it didn't show up.
163.
▲
by
dthul
6y ago
Thanks for the tip!
164.
▲
by
dthul
6y ago
Firefox 76 on Mac doesn't work for me.
165.
▲
by
dthul
7y ago
Rereading your comment I wonder how I could miss this!
166.
▲
by
dthul
7y ago
This is all subjective of course. I for example feel the exact opposite of what you described, and I think the overwhelming majority of Rust coders prefers it to explicit matching (which I find is just code noise).
167.
▲
by
dthul
7y ago
For people coming from a functional programming background, `fold` might be the superior name. But setting aside monads, `map_or` expresses the intent much better I find.
168.
▲
by
dthul
7y ago
> But now instead of Results just being a monad that can be picked apart like any other data structure, they become a Language Feature that gets special, magical treatment not expressible by the type system. I believe, but please correct
169.
▲
by
dthul
7y ago
Are the amounts on the website broken or am I slightly dense? The "Overnight Weekend Bread" recipe ( http://www.breadscheduler.com/#/recipe/5bac85f720211052e0b70... ) instructs you to create 500g-550g of l
170.
▲
by
dthul
7y ago
"Consume" is comparable to a "move" in C++.
171.
▲
by
dthul
7y ago
I have to say I love this feature and have so since the first time I encountered it in my Firefox Nightly installation a few months ago (on Windows). Glad to also have it available on Linux and Mac now. It's perfect for on-the-side You
172.
▲
by
dthul
7y ago
In Rust you at least know where to look at, whereas in C/C++ all code can be "unsafe". With that said, writing unsafe Rust is much easier to screw up than C/C++, since you have to uphold more invariants in unsafe Rust th
173.
▲
by
dthul
7y ago
I believe the main motivation for these code snippets was not to point out the verbosity of the OOP style, but to draw attention to the fact that the onclick handler mixes the concerns of updating the state and updating the UI. Or in the au
174.
▲
by
dthul
7y ago
I mostly work on small scale stuff. There is nothing to load balance if you only have one machine :D And for development you probably don't want to use a CDN. Edit: it just occurred to me that a load balancer is nothing but a reverse p
175.
▲
by
dthul
7y ago
I almost always use a reverse proxy for some or all of the following: - Serving static files - Not needing to care about binding your application to a privileged port (below 1024) - SSL certificate handling - Hosting several applications on
176.
▲
by
dthul
7y ago
Using Firefox to evaluate Rust performance is probably not a good idea since only parts of it are written in Rust today. But it's the first time I hear someone say that Rust is supposedly fundamentally slower than C++. I don't bel
177.
▲
by
dthul
7y ago
Not downvoting you because I think you bring up meaningful opinions. I have to say that I much prefer errors as values though. With exceptions I never know what I might get, with error values on the other hand I know exactly what I'll
178.
▲
by
dthul
7y ago
You are mixing up a lot of stuff here. - Asynchronous programming is completely orthogonal to Python - If you don't need it, don't use it. Rust without asynchronous functions still looks and works like before - By the way: welcome
179.
▲
by
dthul
7y ago
Afaik Rust's futures compile to a state machine, which is basically just a struct that contains the current state flag and the variables that need to be kept across yield points. An executor owns a list of such structs/futures and
180.
▲
by
dthul
7y ago
I guess the point is: No matter whether you are privately or publicly insured in Germany, a transport in an ambulance, an emergency helicopter ride, a long-winded illness like cancer, or any other medical treatment won't ruin you finan
More ›