Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sfink
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
45 ms
·
511.
▲
by
sfink
2y ago
Yep, Mike lost right there. Understandable, but still a loss.
512.
▲
by
sfink
2y ago
But the challenge wasn't for performing four-froot-hoot, the challenge was described in text and adhered to. Mike thought he was describing four-froot-hoot, but accidentally only made the challenge about four-froot. The club rules even
513.
▲
by
sfink
2y ago
Logging systems often have the specificity you're describing, with selectors for modules etc. You could expand a logging system to handle asserting. "Log the current state, which should never be Running."
514.
▲
by
sfink
2y ago
It depends on the application. For some applications, a problem in an assert-less production application is easy to reproduce in an assert-ful debug build, because the relevant inputs are easy to capture and replay. The reason to not defaul
515.
▲
by
sfink
2y ago
> Finally I want to point out that using assert is not ERROR checking (file not found, IP address not resolved, TCP connection failed, system resource failed to allocate, etc.) but BUG checking. > Do not write code for BUGS. I have no
516.
▲
by
sfink
2y ago
More like filling them with beer. If the ship sinks, they're worse than useless. But since you've decided they'll never be needed, you get more beer for your cruise.
517.
▲
by
sfink
2y ago
Yes. I mean, assert spew should probably be maximally informative, which means it's probably going to vomit out a big stack trace. So for heavily used CLIs (especially if the users are other people), it can be nice to handle the bulk o
518.
▲
by
sfink
2y ago
> These days I thus view asserts as falling into two categories: > 1. Checking problem domain assumptions. > 2. Checking internal assumptions. (1) is the category of assert that should not be an assert . Th
519.
▲
by
sfink
2y ago
The researchers are wondering, too. Last sentence in the abstract: > This approach can be extended to polysaccharide-based supramolecular plastics that are applicable for three-dimensional printing. (So, they haven't done it yet, bu
520.
▲
by
sfink
2y ago
Well, even vegetable oil is hydrophobic, so "something" needn't be too horrible. (Oil would obviously wipe off too easily.) Apparently soybean wax works well: https://pmc.ncbi.nlm.nih.gov/articles/PMC7435
521.
▲
by
sfink
2y ago
There's a linked article saying that 40% of the weight loss is muscle.
522.
▲
by
sfink
2y ago
By adding energy (and momentum)? That seems unlikely to work. I guess you could try to shoot at things headed towards you over the horizon, to slow things down? I was assuming it was to vaporize things to make the re-condensed remnants smal
523.
▲
by
sfink
2y ago
What's the difference and advantage, other than less typing, of this over: match *Arc::new("hello").as_ref() { "hi" => {} "hello" => {} _ => {} (Sorry, Rust newbie here
524.
▲
by
sfink
2y ago
> I think unless your code is guaranteed to never interact with any untrusted input it is nowadays an increasingly unacceptable compromise to just accept that your program might have serious flaws which can lead to remote code execution
525.
▲
by
sfink
2y ago
> Anyone who has managed to become proficient in C++ is smart enough to be proficient in Rust. I agree completely. But I'd reword your statement slightly as "Anyone who has managed to become proficient in the language that is n
526.
▲
by
sfink
2y ago
That's an... uncharitable interpretation of the phrase "semi-colon language". The comment made sense to me: it's not at all about semicolons, but the semicolon isn't a bad marker to distinguish between language fami
527.
▲
by
sfink
2y ago
No, I'm not agreeing with you . You're agreeing with me . Wait a minute... :-) Sorry, somehow I managed to quote the portion of your message that I was agreeing with. You just said it more concisely than I could. The aspect
528.
▲
by
sfink
2y ago
> I don't think this is really unique to Rust. Any language that requires you to write stuff down about interfaces might require you to change them in a lot of places if you get it wrong. E.g. if you get the type of a parameter that
529.
▲
by
sfink
2y ago
Yeah, I changed my SSH port for the same reason. I don't feel any more secure as a result, but now I can just watch the raw logs to see the incoming probes. They trickle in slowly, rather than being a constant flood, so I can watch the
530.
▲
by
sfink
2y ago
I'm a relative beginner at Rust, but this matches my experience fairly well. Especially the part about the brittleness, where adding just one little thing can require propagating changes throughout a project. It might be adding lifetim
531.
▲
by
sfink
2y ago
Sounds familiar. I'm a relative beginner at Rust, but I've started feeling like I get the hang of the borrow checker rules and can get something close to right on my first writing. Finally. Ok, maybe 2nd or 3rd, but definitely bef
532.
▲
by
sfink
2y ago
Which is why a good reversible debugger is so powerful. (I use rr-project.org and Pernosco but I imagine undo.io is similar.) Don't worry about stopping at the right point. Go back to the critical points over and over again, and go bac
533.
▲
by
sfink
2y ago
Oops, sorry, I think I mangled my conclusion a bit. I'm not against standardizing tests. If it doesn't get in the way of other attributes, standardization is very valuable. It's just that those results aren't enough by t
534.
▲
by
sfink
2y ago
Yeah, that's fair, and I'm guessing your decision made a lot of sense in that context. Though in an interview situation, it's reasonable to not point out that you shouldn't ever do the thing that you're being asked
535.
▲
by
sfink
2y ago
When I was hiring, resume quality was often a negative signal. I could sometimes tell when someone used a resume preparation service. They were good at what they did, the resumes really were much better, and the candidates correspondingly w
536.
▲
by
sfink
2y ago
Ugh, I got that question in an interview. Only they wanted me to write up a basic arbitrary precision math library, in C, on paper. (I may have chosen to do it on paper.) It was harder than I expected. I didn't do that well and didn&#x
537.
▲
by
sfink
2y ago
Agreed. I can't claim to be always be good at it, but this is what I strive for as well. I like talking to a candidate about something they are experienced or even expert at, and asking questions until I find the boundary of their abil
538.
▲
by
sfink
2y ago
> as a hiring manager it makes my problem harder. How do you compare the results from different choices equitably? That makes sense, and it's the perspective that's being drilled into a lot of us. Implicit bias and all that. Bu
539.
▲
by
sfink
2y ago
I wonder if cold welding could be useful in space, though. Make the two surfaces totally flat, clean them in vacuum, and then press them together to weld them. Ok, "clean them in vacuum" is kind of a "now draw the rest of t
540.
▲
by
sfink
2y ago
> (Possibly controversial belief: riding a motorcycle makes you a better car driver. Motorcycling has made me pick up habits like always looking over my shoulder and not solely trusting my mirrors when changing lanes) I hope that's
More ›