Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Rusky
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
151.
▲
by
Rusky
3y ago
You can cause the same problems from another thread in the same process, or even from the same thread. The fact that an OS process boundary is involved isn't relevant- you simply don't form the &str if some other part of the s
152.
▲
by
Rusky
3y ago
Cross-process shared memory doesn't really make a difference here. Rust's support for multithreading works the same way regardless, there's no expressivity problem.
153.
▲
by
Rusky
3y ago
The idea is that this would be a huge number of extra bounds that need to be processed. This is one of the more computationally expensive parts of the frontend.
154.
▲
by
Rusky
3y ago
Editions still have to interoperate with each other, they're not a free license to change anything and everything. In fact the post goes into detail on how they might or might not work for these specific changes!
155.
▲
Modernizing compiler design for Carbon's toolchain [video]
(youtube.com)
67 points
by
Rusky
3y ago
|
32 comments
156.
▲
by
Rusky
3y ago
Zig did go on to apply the same style to their two later IRs, ZIR ( https://github.com/ziglang/zig/pull/8266 ) and AIR ( https://github.com/ziglang/zig/pull/9353 ). These don'
157.
▲
by
Rusky
3y ago
This doesn't feel like the same thing. The performance benefits of an RDBMS come from the way its storage is organized and (at least in typical RDBMS scenarios) the way queries are dynamically optimized to traverse that storage, based
158.
▲
by
Rusky
3y ago
Not really what I'm talking about here- that issue comes up when you want to combine multiple concrete error types in a single monomorphic call site, rather than when dealing with polymorphism. Rust (and other languages that use someth
159.
▲
by
Rusky
3y ago
The hard part of checked exceptions is when they start interacting with higher order code- in Java this often happens when an interface method wants to throw. Each implementation may want to throw its own set of exceptions, but the code tha
160.
▲
by
Rusky
3y ago
The C/C++ extension actually uses the same underlying engine as VS's C++ IntelliSense. If you're missing things like error indicators then it's likely you just need to configure it a bit more precisely- VS Code has a bun
161.
▲
by
Rusky
3y ago
This isn't how people seriously approach memory safety. Memory safety is a critical starting point , because without it you can no longer trust the logic you wrote in your program to behave in any particular bounded way. Memory safety
162.
▲
by
Rusky
4y ago
You can get this without the compiler doing any unrolling, by doing non-tail calls at the points where you enter the interpreter.
163.
▲
by
Rusky
4y ago
Sometimes it's not just a single function calling itself, but a whole bunch of functions calling into each other, which can get more confusing. This is also tricky when you have indirect tail calls, because now you don't know if i
164.
▲
by
Rusky
4y ago
It goes well beyond experiments- network multiplayer often keeps multiple copies of various pieces of state in order to support things like interpolation and rollback.
165.
▲
by
Rusky
4y ago
This doesn't mean you don't still have to be panic-safe, though. This is mainly important for unsafe code, because it has to preserve memory safety even in the presence of panics. But it can also be important for safe code in an a
166.
▲
by
Rusky
4y ago
Sure- I didn't read your comment that way, my point was primarily just that there is no clear path to such a language yet. It's an open question of whether it is possible and how to accomplish it, and TFA is already another very s
167.
▲
by
Rusky
4y ago
This is something that came up constantly while Rust was working on `async`, and the main reason Rust doesn't use this approach is that the usual low-level concerns around allocation/memory layout get in the way of just plopping a
168.
▲
by
Rusky
4y ago
A spec is not a replacement for #![feature] attributes. It's rather the opposite: #![feature] indicates that you are stepping out of the stable, specified core language and into an area that is still a work in progress and thus cannot
169.
▲
by
Rusky
4y ago
I wouldn't say "absolutely no problem." Based on section 2.5 of [1], Mezzo needs some extra bookkeeping to handle reference cycles as well- the program needs to select a single owner for objects involved in cycles, and `give`
170.
▲
by
Rusky
4y ago
> Can you give an example or provide a citation to this? It would look something like this: trait MyOperation { fn run(&mut self, a: T, b: U, c: V) -> R; } impl<F> MyOperation for F where F: FnMut(T, U,
171.
▲
by
Rusky
4y ago
> In particular, a typical application design involves some variation of the Observer pattern (implementations can vary wildly), where views read/“observe” models owned by controllers. Why should I beat my head against the wall with
172.
▲
by
Rusky
4y ago
DLL linkage with the same compiler has been possible since the beginning- for instance rustc itself is built this way. This is about going beyond that so people can interop with other languages, link with DLLs without rebuilding them every
173.
▲
by
Rusky
4y ago
I believe the mouse cursor is still often a hardware sprite today.
174.
▲
by
Rusky
4y ago
I am a bit confounded by this comment- if people are pulling libraries with no concern for the maintenance or security implications, that's going to be an issue regardless of memory safety! The lowest common denominator of every team i
175.
▲
by
Rusky
4y ago
I think it is just as (un)true that Rust programmers don't need to worry about those errors, as it is that Java/Python/JS/whatever programmers don't need to worry about them. And this is really the only meaning for
176.
▲
by
Rusky
4y ago
This is more of a marketing or teaching problem than an actual language design problem. It's not about the compiler overriding the programmer, it's just designed for a different purpose. There were already a bunch of places in the
177.
▲
by
Rusky
4y ago
The RFC might be a good place to start: https://rust-lang.github.io/rfcs/1598-generic_associated_typ...
178.
▲
by
Rusky
4y ago
The only thing similar about them is the acronym: GATs are generic type aliases which are defined inside traits. GADTs are generic sum types with extra constraints on which variants may be used with which type arguments. There is no rea
179.
▲
by
Rusky
4y ago
GATs are completely unrelated to GADTs.
180.
▲
by
Rusky
4y ago
You can do similar things with it, but GATs can't live on their own like that. Instead they are always a member of some trait, so a closer comparison would be with something like this: class C { template <class>
More ›