Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
returningfory2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
91.
▲
by
returningfory2
1y ago
> It's possible that this is a compiler bug. It's also possible that there's some fringe case where the reference actually can escape via that method call, and the compiler doesn't have enough context to rule it out.
92.
▲
by
returningfory2
1y ago
Many years ago I think, here: https://github.com/rust-lang/rust/issues/46213 . (Found this via https://lobste.rs/s/w3jjb2/surprising_enum_size_optimization... )
93.
▲
by
returningfory2
1y ago
In the strictly technical sense I agree, however in the Rust community when people say "the niche optimization" they usually are referring only to the simplest case. For example in the book Rust For Rustaceans (written by a pretty
94.
▲
A surprising enum size optimization in the Rust compiler
(jpfennell.com)
148 points
by
returningfory2
1y ago
|
70 comments
95.
▲
by
returningfory2
1y ago
Really interesting technique. I guess one of the (theoretical?) drawbacks is the memory usage is not ideal? In a traditional bytecode compiler the result of compilation is a very-cache-friendly binary array, whereas here it looks like a vec
96.
▲
by
returningfory2
1y ago
I think that a significant cause of homelessness is unaffordable housing. In 2025 housing affordability is better in Republican-run states like Texas because the state governments allow more housing to be constructed. Because housing is mor
97.
▲
by
returningfory2
1y ago
The main reason they can't get housing though is that the government of California, which is dominated by Democrats, refuses to allow sufficient housing construction to make housing affordable.
98.
▲
by
returningfory2
1y ago
Maybe you could build a domain-specific language.
99.
▲
by
returningfory2
2y ago
If anyone from Framework is reading, I've noticed something weird about your website which I think would be worth fixing. When I go to the Framework Laptop 13 page [1] the only buttons I see are "pre-order now" which makes me
100.
▲
by
returningfory2
2y ago
Yes. At these latitudes there are times of the year when it's always night or always day. This messes with the math such that the graphs look weird.
101.
▲
by
returningfory2
2y ago
Rust has this, and it just makes so much sense. Especially when you write a library in which the basic demo is also the basic unit test you want to make. Instead of writing a specific unit test that's hidden in source code, you just em
102.
▲
by
returningfory2
2y ago
The person behind Zest runs an interesting blog/work journal, I recommend subscribing [1]. I could be wrong, but my understanding is that they don't have a full-time job. Instead they do some amount of consulting, and then spend m
103.
▲
by
returningfory2
2y ago
> Are there any obvious advantages of H1B other than eligibility for applying for a green card (which is a loooooong wait for people of Indian origin) Was your partner also born in India? If not and you get married you can use their coun
104.
▲
Understanding Memory Management, Part 3: C++ Smart Pointers
(educatedguesswork.org)
2 points
by
returningfory2
2y ago
|
0 comments
105.
▲
by
returningfory2
2y ago
I agree that Trump's move was very bad, but we know that Biden didn't need a new law to "fix" the situation at the border. After Trump blocked that law, Biden made the executive order that for years he claimed he couldn&
106.
▲
by
returningfory2
2y ago
Is your claim seriously that Kamala Harris's image on cultural issues like trans rights did not harm her election campaign? One of Trump's most successful campaign ads was the one that included her talking about government-funded
107.
▲
by
returningfory2
2y ago
By successfully pressuring Democratic politicians like Kamala Harris to publicly adopt progressive positions that are unpopular, but highly favored by the kind of people who donate to and operate organizations like the ACLU. For example, th
108.
▲
by
returningfory2
2y ago
Edit: decided I don't want to engage on this issue.
109.
▲
by
returningfory2
2y ago
My understanding is that the main improvement being implemented is determining the sex before the eggs hatch, and destroying the eggs.
110.
▲
by
returningfory2
2y ago
My favorite fact about raindrop paths/watersheds is that they determine most of the political boundary between Argentina and Chile. If the rain at a point ultimately flows to the Pacific Ocean, that point is in Chile; if it flows to th
111.
▲
by
returningfory2
2y ago
I emailed hn@ to try to find out, I’ve no idea why.
112.
▲
Using ChatGPT is not bad for the environment
(andymasley.substack.com)
255 points
by
returningfory2
2y ago
|
320 comments
113.
▲
by
returningfory2
2y ago
I don't see why the code is not "learning safe". The code presents the simplest safe way to handle an OOM condition. Seems basically perfect for a _beginners guide_ to manual memory management.
114.
▲
by
returningfory2
2y ago
The code in the article is not wrong. It is not unsafe. The author explicitly handles the OOM case correctly. It is true that there are more optimal ways to do it if you do have an OOM handling strategy. And no, you're not supposed to
115.
▲
by
returningfory2
2y ago
It's a beginners article about memory management. I think it's weird that so many comments here are judging the code snippets as if they're commits to production systems. When writing articles like these there are pedagogical
116.
▲
by
returningfory2
2y ago
This is an article introducing people to memory management, targeted at beginners. The code snippets are there to illustrate the ideas. The author made the correct pedagogical decision to prioritize readability over optimal handling of an O
117.
▲
by
returningfory2
2y ago
I feel like this comment is misleading because it gives the impression that the code in the article is wrong or unsafe, whereas I think it's actually fine? In the article, in the case when `tmp == NULL` (in your notation) the author ab
118.
▲
by
returningfory2
2y ago
It depends on the specific coworker I send it to. I have coworkers who will review within an hour without any additional prodding, and coworkers who will take up to a week unless I prod. In general for small PRs I consider a consistent late
119.
▲
by
returningfory2
2y ago
The problem is that, remarkably, there’s always a reason not to build. A different site in Chile will probably have some obscure species of beetle, or rocks that someone has interpreted as an Indigenous site, or some minor highway that can’
120.
▲
by
returningfory2
2y ago
This is true, but it’s also how basically every country runs their visa programs. They initially admit foreigners in a temporary status and after a few years grant a permanent status. This is how Mexico residency works in general, and even
More ›