Better HN
topnewbestaskshowjobs
Log inSign up

Xirdus

1,130 karma · joined Mar 28, 2023 (3y ago) · 582 submissions

Submissions

comment 6h ago · link · parent

I fail to see the difference between the lifetime of the variable being longer than the thread and the lifetime of the thread being shorter than the variable. I also fail to see how flipping it around would help eliminate std::thread::scope, which exists because of Rc cycles. Could you please show an example of what kind of code would be disallowed if upper bounds existed that is not possible today?

comment 8h ago · link · parent

It kinda does that, by using borrows. If A borrows B, then the upper bound of A's lifetime is the borrow of B. You can control the lifetime of the borrow by creating a new mutable reference to B at a particular point (works regardless of whether the original borrow was mutable or immutable).

comment 12h ago · link · parent

> I think it was the right call by the C++ people to explicitly list what objects are captured and how

Having recently worked a lot with Rust, which does this implicitly - I find the explicit notation entirely unnecessary. There's only one choice - are captures moved into closure or passed by reference? - and everything else is inferred. It does lead to some verbose cloning when there are many refcounting pointers at play, but other than that it works flawlessly; I've never been in a situation I couldn't do something I wanted to.

I'm confused by the point about RAII. Why are you saying that closures break it? Personally, I found that closures complement RAII very well - the closure owns its resources, and when it goes out of scope they're all cleaned up automatically. Or do you mean situations where resources outlive the closures? This is no different than any other object that needs a reference to something that lives longer.

comment 2d ago · link · parent

Before 6.2 Astra was published.

comment 2d ago · link · parent

The inverse of what I said might be easier to understand. Up until this week, there has been no statement in all of science that we simultaneously knew for certain that it's true and that nobody understood how to prove. It was always either-or. Either someone understands how to prove it, or we didn't know for certain.

comment 2d ago · link · parent

Riemann hypothesis is "the statement". The entirety of it, a single statement. And we know for a fact that single statement - the entirety of Riemann hypothesis - is true. Understanding how to prove this one statement is understanding how to prove the entirety of that one statement. And like you said yourself, no human understands the whole of this one statement. This literally never happened before.

comment 3d ago · link · parent

I don't get it. Can someone explain?

comment 3d ago · link · parent

For every statement that humanity as a whole knows for certain that it's true, there exists a human who understands how to prove it.

This just stopped being true.

comment 3d ago · link · parent

The biggest benefit of static typing is that you automatically know every single operation you can perform on every single result of every single function ever made.

comment 4d ago · link · parent

Yes, tradeoffs. Not one sided "bloody bizarre" like the now deleted GGP put it.

comment 4d ago · link · parent

It absolutely is related to not wanting to review 10k AI-generated PRs. Those PRs are definitely going to be lower quality and more likely to contain backdoors than ones produced by your own AI. The back-and-forth during the review is also going to be much slower than the equivalent back-and-forth in the chat window.

If money/tokens are not an issue, never accepting external AI-made PRs makes perfect sense.

comment 4d ago · link · parent

From what I've seen, it's less spiritualism and more "they're taking our jobs!" kind of fearmongering. Like all "taking our jobs" fears, whether it's logical or not depends purely on whether they're actually taking these jobs or not.

comment 4d ago · link · parent

But there's no denying Amish food is much healthier and higher quality than regular store bought products (with some exceptions I guess).

comment 4d ago · link · parent

The future seems to be blocking external contributors and running the equivalent AI agents yourself.

comment 6d ago · link · parent

Something like 20% of all internet is colocated in us-east-1.

comment 1w ago · link · parent

> People call this new way of building “vibecoding.” I hate the name; it makes a real shift in who gets to write software sound like a joke.

Because this is the joke. AI agents didn't change who "gets" to write software at all, it's still the same middle-level and senior devs it's always been. The term is intentionally derogatory towards the people who think otherwise.

comment 1w ago · link · parent

I think you misread that fragment. The story was invoked as an example of something that's "obviously" false (partly due to appeal to gods), but also impossible to prove false (partly due to appeal to gods). The chapter is about avoiding this kind of explanations for worldly phenomena.

comment 1w ago · link · parent

I wouldn't call it partial isolation specifically to avoid people telling me "threads simply aren't the right tool for isolating". My current design can't prevent that because it's not designed to prevent that because it's not doing isolation, partial or otherwise.

comment 1w ago · link · parent

Oh I see.

comment 1w ago · link · parent

I am not isolating anything. Isolation isn't this framework's job. Task management is. And it's much easier to manage tasks if a panic in one of the worker threads doesn't kill the other 99 threads as well.

comment 1w ago · link · parent

I am catching aborts and segfaults via a watchdog process. If the main process crashes, the watchdog restarts it. If in-process unwinding was impossible, then every worker thread would need to be spawned as a separate process so that a) a crash can be caught by the watchdog, and b) it doesn't interrupt the remaining worker threads for no reason. I really hope this unwind-less Rust still allows panic hooks, because otherwise I don't have an error message and a stack trace to send to the server, which would make debugging anything hell.

comment 1w ago · link · parent

Crash, restart, and eventually retry all interrupted tasks when all the timeout expire server-side. Which is fine because this kind of crash is extremely rare. If every crash resulted in this, it would very much not be fine.

comment 1w ago · link · parent

It would be entirely unsuitable for the kind of project I work on in my day job, which requires running user-provided code (trusted code, but one that may contain many bugs) in 100 different worker threads, and if one of them crashes the other 99 must keep running. Without unwinding and recovery, we'd have to completely redesign the whole application, probably to multiprocess architecture with all its downsides.

comment 1w ago · link · parent

But that would make Rust unsuitable for writing anything that wants to keep the program running even if something does panic - say, test harness, or a plugin system.

comment 1w ago · link · parent

...what did you do the last 6 years?

comment 1w ago · link · parent

Prompt engineering usually means engineering the prompts themselves, and implies in depth knowledge of what makes a good prompt.

comment 1w ago · link · parent

Software Director could be confused for Director of Software Development.

comment 1w ago · link · parent

I guess by powerful they mean with a lot of power over its citizens.

comment 1w ago · link · parent

And I never bored anyone down on purpose and never cared about any sort of "victory". Yet here we are, with you thinking I'm ignoring what you say and me thinking you're calling me an idiot. There's disagreement, and there's... whatever this is.

comment 1w ago · link · parent

By all of, I meant all areas of, and by law works, I meant lawyers work. I could've been clearer on that.

And a funny thing happened. In the process of proving not all law is like that, you also proved that patent law is uniquely NON-extortionist (in the UK). Like you mentioned elsewhere, Patents Act Section 70B forbids certain kinds of patent-related threats. I'm assuming there's no general law applying to all such legal threats, or else there would be no need for this one. That would imply the law permits certain kinds of lawyers to be more extortionist than others, and patent lawyer are on the lower end of the spectrum. Is that so?

12345
20