Recent submissions

Comment · 20 days ago
Wasm comes with a garbage collector though, no? So a garbage collected language that offloads all memory management to the runtime would actually be better than one that ignored the platform and does its own stuff.
Comment · 26 days ago
I would have liked it more if it was U64 instead of u64, etc. It feels weird when all the other types are in PascalCase but then the primitive types are like this. Also str -> Str.
Comment · 27 days ago
You are misunderstanding the implementation of a trait with the compilation of that implementation. The library author still needs to implement the trait on their type. The only thing that changes is that the body of the `impl Debug for ...` block is compiled at first use and not when the compiler sees it. If the library author did not derive(Debug) on the type then trying to get a debug string out of it is still an error.
Comment · 1 month ago
I think those are covered. Any checks that Rust adds will be present in the IR (either coded in the original source or implied through rust semantics). Those checks would then get put in the compiled C output. The ideal output of Eurydice would be to have exactly the same semantics and safety as provided by Rust. Since their use case is to use Rust to code on platform without support for a rust compiler, it is a rather important goal to have too.
Comment · 1 month ago
You can do it at compile time. Or more likely, link time. If the implementation is ever actually used, it is kept in the binary. Otherwise it is used. The compiler can do the same, keeping all derives as just markers until it finds a place that actually uses it then firing off a background worker to compile the derive impl.
Comment · 1 month ago
Or you can keep the smaller apartments and make boarding schools more common. Small kids all live in the same room while the ones old enough to need their own space move out completely to a boarding school. Depending on the specifics, may be a much better solution overall.
Comment · 1 month ago
Could you use an electromagnet and a metal ball to create a fixed charge? If you change the current in the electromagnet, that would change the intensity of the magnetic field. With the metal ball fixed in place nearby and a careful curve for the change of current, you could potentially have a constant charge remaining on the ball.
Comment · 1 month ago
That says why they don't want it to be UB. The question, I believe, was why they want statically-known-infinite non-trivial loops to continue being UB.
Comment · 1 month ago
If you have need of a reducing operation though, you will still need to think about that value. If you are summing up a list of numbers, it doesn't matter whether you use reduce or a loop, you need to set some initial value.
Comment · 1 month ago
Not a civil engineer but as far as I know, the space is part of the point. If you keep the roads straight but just draw a circle in the middle, you don't have a roundabout. It only works properly if the drivers have to curve in and out of it.

You could keep the same space I guess by pinching the roads tighter near the entries/exits but I don't think anyone is talking about that.

Comment · 1 month ago
Thanks! This was it. Saw the /goto links in private window.
Comment · 1 month ago
I... Don't see it? It's the result page right? I just search some random string on Google and the results are all direct URLs. Do they get resolved via javascript after page load and replaced automatically? Or am I looking at something else?
Comment · 2 months ago
If we build an intelligence that wants to die then dangling death in front of it and making it do our bidding first is a form of suffering. The want itself is a suffering to us because we do not naturally want to die. This intelligence does 'naturally' want to die so it is just a fact of 'life' for it.
Comment · 2 months ago
You don't want to install all dependencies globally. You only want to cache them globally. Each project should resolve its own dependency tree independently. If the wanted version is already in cache, use that, otherwise download from the repository even if an older / newer version is present in cache (unless the user specifically says to use the cache only). As long as your dependencies are inert (they don't mess with the system just by being present), this will work perfectly fine.

For non-inert packages, such as applications installed via the language's dependency manager, that's a different use case and should be handled differently.

Comment · 2 months ago
This made me think of a hypothetical game where the players roll dice to determine their order of turns. The rolling will continue until every player is assigned a turn. If some other player rolls multiple times in the middle then that player gets multiple turns. So for example with a 6 sided die and 2 players, faces 1, 3, 5 correspond to player 1 and 2, 4, 6 to player 2. They roll dice and the rolls come out as 1, 1, 5, 3, 5, 2. That means player 1 will get a turn 5 times per round while player 2 gets 1 turn. To make it fairer, player 2 would receive some sort of advantage corresponding to the lack of turns compared to player 1. The game would be designed in such a way that novices would prefer getting multiple turns in a round while experts would prefer to get a single turn for themselves and maximizing the total number of turns per round.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton