Better HN
topnewbestaskshowjobs
Log inSign up

returningfory2

2,464 karma · joined Jun 25, 2020 (6y ago) · 493 submissions

Submissions

comment 1y ago · link · parent

> 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 country of birth for the green card, even if the green card is being sponsored by your employer. Maybe you're aware of this but just to say if you're not.

122.

Understanding Memory Management, Part 3: C++ Smart Pointers(educatedguesswork.org ↗)

2 points · by returningfory2 · 1y ago · discuss

comment 1y ago · link · parent

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't make, and then the situation at the border got "better". If Biden had instead made that executive order in, say, Fall 2022, there's a good chance that the situation at the border would not have been as salient in 2024 and Trump wouldn't have been elected. (Or, if Trump was still elected, he wouldn't have a mandate to come down so hard on immigration like he's doing now).

The reason Biden didn't make the executive order earlier is because of pressure from groups like the ACLU. The ACLU was simultaneously telling us that Trump is a threat but also pressuring the administration to keep pursuing policies that were clearly playing right into Trump's reelection campaign.

By the way, the ACLU was also against the border bill that Trump blocked.

comment 1y ago · link · parent

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 gender affirming care for people in prison. It even has its own Wikipedia page (https://en.wikipedia.org/wiki/Kamala_is_for_they/them). The fact that this stuff started in 2019 that she won as VP in 2020 is irrelevant; it _clearly_ was an issue in the 2024 that hurt her.

But that's just one example of many. There's also, say, Biden's handling of the border. Even though in 2022 it was clearly deeply unpopular and playing right into Trump's reelection campaign, he didn't change course (until too late) because of pressure from groups like the ACLU.

Overall, IMO one of the biggest factors in Trump's reelection is that the left and the center-left _talked_ about Trump being a big problem, but were unwilling to actually alter their policies or behavior or messaging to broaden their appeal and ensure Trump lost.

comment 1y ago · link · parent

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, the (unfortunately very successful) Trump ad “Harris is for they/them, Trump is for you” ultimately originates with the ACLU. In 2019 they successfully got Harris to pledge government funding for gender affirming care for people in e.g. immigration detention [1]. It is totally insane that the ACLU thought it was important and worthwhile to get a pledge on this edge case. In general this advocacy was way out of touch with the country at large, has totally backfired, and now landed us with an anti-trans administration.

[1] question 14 here https://www.aclu.org/documents/aclu-rights-for-all-candidate...

comment 1y ago · link · parent

Edit: decided I don't want to engage on this issue.

comment 1y ago · link · parent

My understanding is that the main improvement being implemented is determining the sex before the eggs hatch, and destroying the eggs.

comment 1y ago · link · parent

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 the Atlantic Ocean, it is in Argentina. This is article 1 of the original boundary treaty [0] from the 19th century.

The treaty was made before the Andes were fully explored, and so it doesn't handle some interesting edges cases like the Southern Patagonian Ice Field. The field has the property that when rain falls there, it freezes and goes nowhere!

[0] https://en.wikipedia.org/wiki/Boundary_Treaty_of_1881_betwee... [1] https://en.wikipedia.org/wiki/Southern_Patagonian_Ice_Field

comment 1y ago · link · parent

I emailed hn@ to try to find out, I’ve no idea why.

130.

Using ChatGPT is not bad for the environment(andymasley.substack.com ↗)

255 points · by returningfory2 · 1y ago · 320 comments

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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 teach your students the best way to do things at the start. That's not how teaching works. You start with the simpler (but still correct) way, and then work towards the best way. This is why introductions to Rust are full of clone calls. The best Rust code minimizes the number of clones. But when you're introducing people to something, you don't necessarily do the optimal thing first because that disrupts the learning process.

comment 1y ago · link · parent

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 decisions to be made, such as simplifying the examples to make them easier to understand.

comment 1y ago · link · parent

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 OOM edge case that would be confusing to introduce to beginner readers at this early stage.

Talking about "making future changes" seems to be missing the point of what the author is doing. They're not committing code to the Linux kernel. They're writing a beginner's article about memory management.

comment 1y ago · link · parent

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 aborts the program. This means there's no memory leak or unsafety. I agree that one can do better of course.

comment 1y ago · link · parent

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 latency of over 24 hours to be long and mention it negatively in peer review.

comment 1y ago · link · parent

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’t handle the traffic, etc etc etc, so that we can’t build there either.

comment 1y ago · link · parent

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 how marriage-based residency works in Colombia. I don’t really see it as much of a problem.

comment 1y ago · link · parent

This is a good point. How about a per state auction instead? Where each state gets an allocation based on its population.

comment 1y ago · link · parent

Some internet searching suggests fares account for between 25 and 33 percent of the MTA’s revenue. There’s no way the infrastructure for collecting fares costs that much.

This is one of the main criticisms of free fares: in reality the revenue stream from fares is never actually fully replaced, so it just results in the transit agency becoming underfunded. This makes transit worse for existing users who are already paying. The new users you get because of free fares are mostly casual users like tourists who have alternate options, so serving them isn’t that useful and not worth the negative impact on existing users.

comment 1y ago · link · parent

Every year thousands of people in statuses like F-1, O-1 and TN get employment based green cards. The idea that you have to be in H-1B or L-1 status to get an employment GC is simply 100% false.

comment 1y ago · link · parent

Yep, fully agree.

comment 1y ago · link · parent

> - You ll have to dispute a dead family member against a faceless company that conveniently deleted crucial logs.

On the contrary, of all my negative experiences biking in NYC over 10 years, the _only_ time I was able to hold a driver accountable was when they were riding a Revel scooter in which case the "faceless company" took them off their platform. This comment seems to significantly overestimate how easy it to hold human drivers accountable.

comment 1y ago · link · parent

The Waymo failure mode of false positives (signals but doesn't turn) seems much better than the human failure mode of false negatives (doesn't signal but turns)!

comment 1y ago · link · parent

Yeah. Do people really think that Silicon Valley would be such a huge economy (and a huge job creator for US citizens) if the US had never allowed immigrants to work there?

comment 1y ago · link · parent

This piece of misinformation seems to be trotted out every time H-1B is discussed. H-1B is not for "extraordinary ability", the O-1 is. The H-1B is just designed for regular workers in a "specialty occupation". This is how Congress designed it in the Immigration and Nationality Act.

comment 1y ago · link · parent

What do you mean by "cash grab"? Are you suggesting this is a scam?

comment 1y ago · link · parent

You save money.

Take some time off and live off your savings.

If you want to start making money you go back to the workforce (e.g. fall back to your skills).

comment 1y ago · link · parent

I was arguing against the specific claim that a "free and fair" election is one that is consistent with the laws of the country the election is being run in.

In fact, I think your response proves my point. What you're saying is that the specifics of the laws matter - i.e, whether or not a election is "free or fair" depend on _what_ the rules of the game are, not only on the fact that they are the rules.

comment 1y ago · link · parent

Yes, I do.

By your argument if a country (e.g. China?) outlaws competing political parties then the rubber-stamp single-party elections are “free and fair” because they are in accordance with law. In general the whole point of a “free and fair” election is that the government can’t just change the law and rules to get the result it wants. There is an independent notion of “free and fair” election that is rightly independent of country specific law.

1
456
17