Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
aw1621107
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
91.
▲
Safety in an Unsafe World
(joshlf.com)
2 points
by
aw1621107
3mo ago
|
1 comments
92.
▲
by
aw1621107
3mo ago
This is a blog post version of a 2024 talk. The talk was covered by LWN at the time [0] and had an HN discussion of its own [1] [0]: https://lwn.net/Articles/995814/ [1]: https://news.ycombinator.com&#x
93.
▲
by
aw1621107
3mo ago
> I'm pretty sure the question was why a normal reference is bad. Oh, completely missed that interpretation. I think in that case it comes down to references being incompatible with the desired semantics for an intrusive list - &
94.
▲
by
aw1621107
3mo ago
> Like why do I need to use `addr_of_mut!`? As of Rust 1.82.0 [0] you no longer need to! > I'm sure there's a good reason, as Rust tends to think these problems through, but it's very unintuitive compared to returning `
95.
▲
by
aw1621107
3mo ago
I think you're basically agreeing with the person you're replying to; they're pointing out that Solod doesn't really provide the "safety of Go" since the translation trivially exposes the user to UB that would
96.
▲
by
aw1621107
3mo ago
> The next bad thing is when you step on your own toes and see that the new names you invented, like `so_int` or `so_println`, will inevitably pollute the global namespace. We'll either cross our fingers and hope that no one will cr
97.
▲
by
aw1621107
3mo ago
Just FYI, I think you're looking for "(in) tension" instead of "(on) traction".
98.
▲
by
aw1621107
3mo ago
Yes, it's a Compiler Explorer feature. URL includes get rewritten client-side to work as if they were additional files supplied by the user. PR adding the current behavior is at [0], while I think the downloading code itself is at [1].
99.
▲
by
aw1621107
3mo ago
You can further reduce the difference by passing Expr by pointer in the C version. At that point I think the only difference in the assembly is the order in which the cases are handed.
100.
▲
by
aw1621107
4mo ago
My guess would be the second-chance pool ( https://news.ycombinator.com/pool , explained by dang at https://news.ycombinator.com/item?id=26998308 )
101.
▲
by
aw1621107
4mo ago
The >12km number is length , not depth: > However, in May 2008, a new record for borehole length was established by the extended-reach drilling (ERD) well BD-04A, in the Al Shaheen oil field. It was drilled to 12,289 m (40,318 ft), w
102.
▲
by
aw1621107
4mo ago
> but how do you design the pison/crank to always turn clockwise or counter clockwise (based on how you view it, obviously)? You can design the starter motor to ensure the engine always starts up moving in the right direction, and a
103.
▲
by
aw1621107
4mo ago
Submitted a fair few times previously. HN's search turned up these submissions with some additional discussion: https://news.ycombinator.com/item?id=40445536 (2 years ago, 63 points, 66 comments) https://new
104.
▲
The Glitch That Broke Link's Cel Shading [video]
(youtube.com)
3 points
by
aw1621107
4mo ago
|
0 comments
105.
▲
Predicting Stronghold locations with Bayesian statistics (2021) [pdf]
(github.com)
3 points
by
aw1621107
5mo ago
|
0 comments
106.
▲
by
aw1621107
5mo ago
Herb's blog post links to the SlashData Developer Nation Survey, so presumably that's what the claim is based on. The company has a methodology page here [1], and it looks like the Developer Nation panel [2] is one of the sources
107.
▲
by
aw1621107
5mo ago
If you hoist small_numbers[smlen] = numbers[i] out of the if statement then the compiler will produce nearly the same branchless assembly for both cases (the only difference being compare against 499 followed by setle vs. compare against 50
108.
▲
by
aw1621107
5mo ago
> but I had heard that the compiler is slow (because it's doing so much thinking and checking in advance). The compiler is indeed not particularly speedy, but the reason you were given is not entirely accurate. As measured in this b
109.
▲
by
aw1621107
5mo ago
To add on to this, the C++ proposal for [[assume]] [0] came to a similar conclusion and cites MSVC's experience with an assert-in-debug-assume-in-release construction (i.e., removing the assumptions resulted in a 1-2% speedup and incre
110.
▲
by
aw1621107
5mo ago
OK, I think that makes more sense. Thanks for taking the time to explain!
111.
▲
by
aw1621107
5mo ago
Hrm, I take it that was considered too footgun-y for the committee?
112.
▲
by
aw1621107
5mo ago
> Compounding on this, Rust is also unstable underneath, since there is no public, stable contract for carrying high-level semantics from HIR into MIR. Because these high-level invariants are lost during compilation Not sure if I'm
113.
▲
by
aw1621107
5mo ago
> It's especially tragic because Clang already had the full C99 designated init feature set in C++ mode implemented long before C++20 and it worked just fine. How did Clang handle differences between member declaration order and the
114.
▲
by
aw1621107
5mo ago
> that can easily be solved by a minute or two on godbolt... Unfortunately it's not that simple when it comes to UB. If the snippet in question does in fact exhibit UB then there's no guarantee whatever Godbolt shows will gener
115.
▲
by
aw1621107
5mo ago
Not necessarily. Unspecified behavior and undefined behavior are independent concepts; a language can have one but not the other. As a result, you can have languages where incorrect reliance on unspecified behavior can lead to undefined beh
116.
▲
by
aw1621107
5mo ago
> For example, Java thread execution order is UB. In this context "UB" means something different than how you're using it. The UB being mentioned here is the "nasal demons" form, i.e., programs which contain unde
117.
▲
by
aw1621107
5mo ago
> Elon and his company was sued when he delivered "When" is inaccurate. The original shareholder vote for Musk's 2018 compensation plan was on 2018-03-18. Tornetta was filed on 2018-06-05, well before the first tranche v
118.
▲
What 262,715 regex questions on stack overflow haven't answered
(iev.ee)
6 points
by
aw1621107
5mo ago
|
1 comments
119.
▲
by
aw1621107
6mo ago
I'd be a bit skeptical of the result given the benchmark program: import java.util.ArrayList; import java.util.List; class Day06 { public static void main(String args[]) { List<String> fileT
120.
▲
Krabby: Making a Fast Rust Compiler
(bal-e.org)
2 points
by
aw1621107
6mo ago
|
0 comments
More ›