Hacker Newsnew | past | comments | ask | show | jobs | submit | gcr's commentslogin

Palantir pioneered forward-deployed engineering, aren’t they deeply embedded in the above?

They (maybe) pioneered forward-deployed software engineers. They certainly didn't pioneer sending engineers, or other experts, to help integrate systems.

no one is going to conflate a Palantir FDE with an actual pipehitter

Contractors doing IT support aren't "Operators" in the tactical sense, nor agents in the LE sense, nor Officers in the IC sense, nor a Boeing/Lockheed/Leidos/etc type developing weapons.

This is just a new method to scapegoat a company


It’s my understanding that bun was ported to unsafe rust, so even these gains would require additional effort on the team’s part, right?

Unsafe Rust doesn't automagically disable typesystem (& borrow checker, but lifetime are a sort of types).

Once raw pointer is turned into a T, &T or &mut T, the borrow checker is on.


True, but unsafe let's you conjure up any lifetime you want, or any lifetime necessary to satisfy the lifetime requirements in safe code. If you generously sprinkle pointer dereferences in unsafe code, you effectively disable the protection provided by the borrow checker – including in safe code – until you've checked and verified the correctness of all unsafe blocks.

> True, but unsafe let's you conjure up any lifetime you want

The only thing unsafe does is let you have an unbounded lifetime. As I said, it doesn't check those:

   fn get_str<'a>(s: *const String) -> &'a str {
       unsafe { &*s }
   }

https://doc.rust-lang.org/nomicon/unbounded-lifetimes.html

> if you generously sprinkle pointer dereferences in unsafe code, you effectively disable the protection provided by the borrow checker

You don't disable anything. You wrote a "trust me compiler" block, and compiler trusted you.

Rust won't ever protect from all possible problems, just the ones the compiler handles.


> You don't disable anything. You wrote a "trust me compiler" block, and compiler trusted you.

That’s the same thing.


What's the point of using Rust in the first place when you disable the compiler feature that protects you the most?

Because it lets you constrain the parts that the compiler can’t check and has to trust you on. The alternative is either a langue that can’t do necessary things, or a language that can’t check what could be checked.

With unsafe, you’re telling the compiler “I’ve taken extra care to make sure that what I’m doing is safe and doesn’t break your rules” and the compiler can go ahead and assume that you don’t, in fact, break the rules, and therefore can verify everything else as if the rules never got broken.

In less safe languages, the entire program is “trust me, it’s safe”, while in rust only the parts flagged as unsafe are.

The point is that you should only use unsafe when 1. It’s absolutely necessary for functionality or performance and 2. You have verified and are very certain that the code is correct.

That’s a very useful property to have.


Yes, when a human does it. With an LLM, the "trust me, I took extra care" is extremely doubtful. If LLMs could do that, they might as well use unsafe languages.

Oh, absolutely.

Well, Rust has things like miri that can help you write your unsafe code and it's just a command line invocation away.

Obviously you should try to avoid writing unsafe Rust to begin with.


Mu. Invalid question. Rust doesn't disable compiler features. It gives you extra set of footguns when you ask for it.

As for the actual unloaded question, "What's the point of unsafe in Rust?" it is to contain and make it easier to identify sources of UB.


The whole point of the rust rewrite is that bun is now thought to rely on rust’s memory safety features, but that assumption doesn’t hold if everything’s inside an unsafe block.

Only ~4% of code is inside an unsafe block, so the idea is that for new code/contributions, the chance of introducing a new memory-safety bug is an order of magnitude lower.

Maybe in the future the unsafe code will go down to 1%, bringing that to two orders of magnitude.

Of course, only time will tell if that is true or not, but from experience I’d be willing to bet it is.


> The only thing unsafe does is let you have an unbounded lifetime.

No, you're wrong: You can create any lifetime. Proof:

    fn oof<'desired>(x: &u32) -> &'desired u32 {
        let ptr = x as *const u32;
        unsafe { &*ptr }
    }
This will take a reference and return it with any lifetime specified by the caller.

> You don't disable anything.

I said "effectively disable". For example:

fn trust_me_bro<'a>(x: mut u32) -> &'a mut u32 { unsafe { &mut x } }

    fn main() {
        let mut x = 1_u32;
        let reference_a = &mut x;
        let reference_b = trust_me_bro(reference_a);
        *reference_b = 2;  -- Whoops
        println!("reference_a: {reference_a}  reference_b: {reference_b}");
    }
After the call to trust_me_bro, two aliasing, mutable references exist simultaneously. This would usually be prevented by the borrow checker, but the unsafe code has effectively disabled it.

> Proof:

You just listed examples of unbounded lifetimes.

> I said "effectively disable". For example:

Not sure what you meant by this example since it doesn't compile. It seems the borrow checker caught your mischief. So much for effectively disabling stuff :P

You haven't effectively disabled anything; you just (tried to) wrote unsound code that washes one mutable ref as another. This stuff is allowed provided shared refs are never accessed at the same time (for example, panicking upon reading reference_b).

What you probably meant is https://play.rust-lang.org/?version=stable&mode=debug&editio...

But you know what? If you're dabbling in unsafe, you have this big button called Tools in the playground. Choose Miri, then run your code; it will display large Undefined behavior. It even highlights the `trust_me_bro` function.

Hell, run this with UBSAN, ASAN, and other C tools. They will probably catch any such behavior.


> You just listed examples of unbounded lifetimes.

You're just splitting hairs and trying to weasel around the fact that yes, you really can create any lifetime you want using unsafe.

> Not sure what you meant by this example since it doesn't compile.

That's because the crappy HN formatting ate some of the characters. Here's the original version:

https://play.rust-lang.org/?version=stable&mode=debug&editio...

> What you probably meant is […]

If you know what I meant, then what's up with your snarky comment about "So much for effectively disabling stuff"? In your playground link, you did effectively disable the borrow checker in safe parts of the code. Next thing you're moving the goalpost, now it's not about external, static analysis tools: "run this with UBSAN, ASAN, and other C tools". I don't think you're arguing in good faith here. Goodbye.


> You're just splitting hairs and trying to weasel around the fact

No. I said borrow checker allows unbound lifetime. I didn't disagree with you. I noted you didn't read the argument.

> If you know what I meant, then what's up with your snarky comment about "So much for effectively disabling stuff"?

Because your original code looked like trying to cast mut u32 to pointer.

> you did effectively disable the borrow checker in safe parts

So this code (https://play.rust-lang.org/?version=stable&mode=debug&editio...) runs now?

Effectively means achieving the goal in satisfying manner.

Writing unsound code is less of effectively disabling borrow checker and more of a hack.

Think about it, if using Java unsafe I gain access to underlying HashMap array and do weird stuff to the HashMap invariants am I effectively turning HashMap into Array or am I doing a hack job?

Edit: By that logic since there is so much unsafe in the code base isn't borrow checker effectively already disabled? You can argue semantics but no, borrow checker isn't de facto or de jure invalidated by unsafe blocks.

It's invalidated by unsound unsafe and that's on code writer to fix.


Yeah but if you have tried writing unsafe Rust, you notice that you are obligating yourself to write code that is much stricter than C.

E.g. in C you can write code and say "don't call it outside the situation that this function was written for" and then blame [0] future users of the API.

In Rust you need to actually make sure that your code works, i.e. your safe interface is not unsafe.

[0] The blame game is not a technical solution to a technical problem...


Borrow-checking the dereference of a stale pointer won't be worth much, though.

Sure; but I bet raw pointers are used very infrequently in the new codebase. The code was ported from zig to rust. I bet a lot of pointers became rust references in the process.

The point of compiler-based checking would be that you know for sure. If you have to bet, all bets are off.

That’s my whole point! It’s ported to unsafe rust, not default rust.

There’s a small albeit nonzero chance that frontier labs want Simon to stop using the pelican thing so they can draw attention to better benchmarks

As far as I can tell they all still understand that it's a joke.

This is an amazingly tone-deaf response to what is clearly an personal artistic project with a lot of heart behind it.

It’s rage bait

Wonder what would happen if a hacker focused all ten thousand of them on a single area for an hour or two. Sounds like a really energy-efficient way to demolish a city.

X Wing: Wedge’s Gamble (1996) by Michael Stackpole shows the rebel alliance using similar tricks during the battle of Coruscant.


> "Wonder what would happen if a hacker focused all ten thousand of them on a single area for an hour or two. Sounds like a really energy-efficient way to demolish a city."

I'm far more concerned about the people who own/build stuff like this using it as you suggest (or any of the government pets that they own) than I am about "hackers" doin' such things (although, you're entirely right to have that concern as well, because there's obviously those type of folks out there doin' bad things even with the technology we have already).


First, they don't exist and 10k of them will never exist. Second, nothing would happen, the power will be minuscule and last for a very short time focused on such a small patch.

see: https://youtu.be/lkjyeI0ykGM


I don't think 50000 60-ft mirrors at the height they intend to fly would cause that to happen. Not enough light gathering power.

50000 60-ft mirrors is about the same area as a single mirror 2.5 miles across. So the area of the mirrors is about the area of a city. You gather as much light as the city itself in regular daytime. If you focused all of that perfectly efficiently onto a city, that city would just look like daytime.


I think what you're missing is that they could all be focused in one spot, not spread over the city. If curved reflective buildings can melt siding, and mirror solar plants can melt salt, I'm pretty sure a city's worth of sun focused on, say, a college campus, could start a massive fire


I see your concern. The mirrors could be deliberately manufactured to have enough imperfections, or slight reverse curvature, to prevent this. It's possible with properly-designed optics to prevent the mirror from being able to focus on a spot smaller than, say, 1/50000 the mirror's area on the Earth's surface. Make each single mirror only optically capable of focusing down to a 3-mile diameter at best. Then it would be optically impossible to focus all the mirrors to a single 60ft spot, and the theoretical highest brightness at any point on Earth would just be regular daytime levels of light.


I think people overestimate the relative strength of the sun.

Then again, assuming there's no dispersion or loss, 50.000 times the sun focused on a 60ft patch will likely have some impact. But that's complete fiction.


At some point, nations are going to claim the orbital space above them as national territory and develop technology to shoot down violators.


That would be fairly nonsense. There's _very_ few orbits that can stick over a particular place, and it's only places on the equator. We'd be giving up 99+% of useful orbits.


I think most current wars in progress have much less logical reasons for happening


It's possible, it would just be _very_ dumb. It'd also turn into just...shooting them all down, restrictions of who anything is over wouldn't survive.


It wouldn't be an all-or-nothing type scenario -- and in fact there is already no common international agreement about where a nation's boundary extends to in the z-axis. The observed limit is "however high that country can detect and shoot something down"


Once you start getting shooty up in space, I think you fairly quickly get into https://en.wikipedia.org/wiki/Kessler_syndrome cascades of collisions and debris anyway, so it probably wouldn't matter.

> in fact there is already no common international agreement about where a nation's boundary extends to in the z-axis. The observed limit is "however high that country can detect and shoot something down"

That's the thing though, if you use that definition then 99.9+% of them are fair game, because _only_ ones around equator at a specific height are at a fixed point. Otherwise they migrate a lot and what country they're over would depend on what second you look.


If Russia had been the one to launch over ten thousand satellites in mega-constellations occupying LEO space, there would have already been a dozen senate hearings all talking about extraordinary and imminent threat to US national security and urgent need to eliminate the problem.


ASAT already exists and multiple countries have already shot down (their own, defunct) satellites.


Die Another Day (2003) has a more ridiculous take on the same idea.


But in the public image, the EA community is synonymous with doubling down on AI / AGI to the exclusion of the other projects.

OpenPhil changing its name to Coefficient Giving, 80000 hours and bluedot and (to a lesser extent) CFAR dropping other initiatives and switching to AGI promotion… to my knowledge GiveWell is the only other big name that continues to advance other initiatives. Then look at figureheads like SBF committing fraud and begging for a pardon from the architects of the USAID shutdown… We begin to paint a picture of a community that’s (by and large) abandoned its principles for power.

I know the view from the inside is more nuanced, but I think it’s a reasonable association for random members of the public to make.

My critique of the EA community is that it’s myopic and unregularized. If you really think AGI is make-or-break for civilization, it’s completely rational to deprioritize side bets.


>My critique of the EA community is that it’s myopic and unregularized. If you really think AGI is make-or-break for civilization, it’s completely rational to deprioritize side bets.

I’d be curious to hear you expand on this. What binds the EA community together, from the shrimp welfare enthusiasts and wild animal initiative, to the longtermist lightcone obsessive, to the people funding vitamin A supplementation, is simply a commitment to maximizing the number of quality adjusted life years saved each year and a belief that empirical observation can be used to improve that number.

To my mind, this is a valuable insight on its own. Yes, if you come to such a heuristic with absurd prior beliefs, such as whether 100k neurons alone have QALYs in the first place or by placing equal value on people actually alive today and hypothetical people in the far flung future, you will get absurd results. Garbage in, garbage out. But that’s not an indictment of the fundamental insight, especially when you consider how poorly allocated the roughly $2 trillion in global charitable spending is.


As a society we already know how to make the lives of everyone better:

1. Stable housing

2. Access to safe drinking water

3. Access to food

4. Access to healthcare

5. Access to education

6. Stable governments

The EA community has so many "ideas" about what would help, when all they need to do is focus on those six and the world would be as close to a utopia as you or I could hope to see in our lifetimes.

I legitimately thought you were kidding about the shrimp welfare initiative, but after looking it up I was more infuriated about EA than I normally am when it comes up. I can think of several causes which would be better served with 3 million USD, and all of them take care of human beings. Living, breathing, intelligent human beings. These people should not be in any position of power or taken seriously ever.


There are tradeoffs to make between those six items. Money spent on stable housing is money not spent on safe drinking water is money not spent on education. There is a limited amount of money spent on charitable giving every year, and we obviously cannot afford to provide all of those things to everyone with the funds currently available. If you’re arguing that people should simply be donating more money, I (and I think every EA) is right there with you. But given the world exists as it is, I would rather see money that’s currently being donated diverted from Catholic missionary schools and good governance NGOs to GiveWell’s top charities because I’m very confident that it would mean fewer dead kids.


I agree with your last sentence, but we can’t partition the budget up so cleanly though. Societal spending is interdependent and additive across domains. Spending on cheap access to safe water or food reduces healthcare costs. Spending heavily on education tends to strengthen government in the long run, and better-run governments amplify efforts to improve housing/food/water/.

The one exception is AI. Historically, redirecting charitable funds towards AI safety tends to starve or undo the rest of these efforts, which is why I’m so disappointed by many EA institutions dropping other initiatives to put their eggs in the AGI basket.


Wouldn’t turning off swap fix this issue?



when it comes to video gaming I’ve found Bazzite to be generally far less fiddly than windows 11, surprisingly


The supported method to get a new one each boot is to truncate the file to 0 bytes and disable systemd-machine-id-commit.service

Double-check that this method actually works though.

Machine ID is used for things like dhcp leases, log rotation, etc. IPV6 addresses or transient MAC addresses are derived from it


I thought the kernel generated SLAAC addresses based on MAC and privacy addresses based on random numbers.


It does, but DHCPv6 prescribes a persistent device identifier (DUID): https://www.rfc-editor.org/info/rfc9915/#RFC3315-9

The DUID is designed to be unique across all DHCP clients and servers, and stable for any specific client or server. That is, the DUID used by a client or server SHOULD NOT change over time if at all possible; for example, a device's DUID should not change as a result of a change in the device's network hardware or changes to virtual interfaces


there are very strong graphical glitches on iOS, it looks like every other fragment isn’t being rendered or something based on the camera angle

could the author clarify what we should be seeing or what the point of this is?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: