Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
azakai
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
241.
▲
by
azakai
4y ago
I don't know enough about why LLVM doesn't use parallel compilation, you might be right there. But there are many C++ compiler codebases that do have it, such as: every major JS/Wasm VM (V8, SpiderMonkey, JSC), Binaryen, etc.
242.
▲
by
azakai
4y ago
But as the article points out, it depends on the situation. The article is right that memory safety matters a lot more in certain areas than others. The teams you refer to are working in areas where every exploit is a huge risk, places like
243.
▲
by
azakai
4y ago
> However, locals are a problem. They’re mutable, so you can’t trivially convert them to SSA As mentioned in previous discussions, that isn't accurate. Wasm locals can be easily converted to SSA, and that is exactly what all major w
244.
▲
by
azakai
4y ago
The Fastly approach has some advantages for wasm, but Cloudflare have mentioned that the vast majority of their users want JavaScript and TypeScript. Cloudflare's approach is more optimized for that: running a JS VM directly will take
245.
▲
by
azakai
4y ago
> by many accounts wasn’t any better environmentally This is false according to every serious analysis I've seen. For example: > The most popular plant-based alternatives, Beyond [Meat] and Impossible Burgers, produce about 90 pe
246.
▲
by
azakai
4y ago
> I wonder if there is a subset of Rust that can be extracted someone into a new, minimal language with the core benefits. That is basically what Val aims to do: https://www.val-lang.dev/ It has Rust-style ownership to g
247.
▲
by
azakai
4y ago
> We have found it [spidermonkey.wasm] to be faster than QuickJS Interesting! Do you have numbers for code size and memory usage perhaps?
248.
▲
by
azakai
4y ago
Even if a game sends crash reports etc., it could be safe enough. Making a secure connection to a known remote server isn't a major source of exploits. (Look for example at the list of exploits against Firefox and Chrome - stuff like t
249.
▲
by
azakai
4y ago
> PDF and spreadsheet vulnerabilities are very common. True. The issue is that they operate on complex input that can arrive from anywhere. So if you download a malicious PDF file it can exploit you. But GP's other example is valid:
250.
▲
by
azakai
4y ago
Me too!
251.
▲
by
azakai
4y ago
Yeah, I also didn't see a culture of saying "we're going to replace Gecko." Not because there was any instruction to speak carefully AFAIK, but because that's not the goal. The goal was for Servo to succeed, hopeful
252.
▲
by
azakai
4y ago
Interesting. I may be less aware of the external messaging than you. Do you have some examples of that perhaps? I'm not doubting you, I'm just curious what was written. I'd expect stuff like "Servo is an experimental bro
253.
▲
by
azakai
4y ago
You don't need to be a vegetarian or vegan. Just eating less meat helps significantly with the things you mentioned. For example if everyone ate say 50% less meat we'd make a noticeable impact on climate change. I am a vegan mysel
254.
▲
by
azakai
4y ago
(sorry to post twice on the same topic, but your first sentence is not accurate, see https://news.ycombinator.com/item?id=32813714 )
255.
▲
by
azakai
4y ago
> The Mozilla team didn’t intend Servo to be a fully functional new browser. This is not accurate. Some parts of Mozilla thought that way, other parts didn't. And thoughts changed over time. For years Servo was officially an experim
256.
▲
by
azakai
4y ago
Good to know, thanks!
257.
▲
by
azakai
4y ago
I don't think the annotation itself is actually the point. The point is being able to find all sources of unsafety and reason about them. Annotations do that, but other things can too. Imagine if you could run a tool on a codebase, and
258.
▲
by
azakai
4y ago
Yes, technically there might exist a subset of C++ as safe as idiomatic Zig. But in practice inertia and legacy code and lack of ergonomics etc. work against that subset of C++ becoming popular - does anyone constantly type .at()? Zig can d
259.
▲
by
azakai
4y ago
> Moreover, we shouldn't assume that Zig pointers are the only feature that breaks spatial memory safety. It was simply the first one I found after like 2 minutes of looking through the docs. After like 5 more minutes I found anothe
260.
▲
by
azakai
4y ago
Is the marker the critical thing here, though? I just wrote in another comment that I think the Zig compiler can warn about using an unsafe pointer. The critical thing, I believe, is that unsafe can be discovered and audited. Unsafe pointer
261.
▲
by
azakai
4y ago
> They prefer slices idiomatically, but that's not "full spatial memory safety". I don't think people say a language is unsafe if it has opt-in unsafety in controlled, non-idiomatic ways. Java, C#, Rust, etc. all have
262.
▲
by
azakai
4y ago
"Not much safer" isn't fair. Zig has full spatial memory safety, which is already a huge improvement over C. The Zig type system and how idiomatic code looks also prevent various safety risks. Also, Zig panics on integer over
263.
▲
by
azakai
4y ago
A concrete example of idiomatic Zig being faster is MultiArrayList and language features that work well with it, which lets you use the struct-of-arrays pattern in an ergonomic way. You can do it in any other systems language, of course, bu
264.
▲
by
azakai
4y ago
That's my guess too. These GC data structures need to be accessed from multiple threads, if I understood TFA, which means they won't compile normally in Rust. That is exactly Rust doing its job and preventing bugs, but it means th
265.
▲
by
azakai
4y ago
> By my understanding, Rust's ownership model would prevent concurrent access to the socket buffer garbage collector data structures without proper synchronization Possibly. But the first question is whether the person writing this
266.
▲
by
azakai
4y ago
The goal of Wasm GC is to allow GC-using languages to be ported to wasm. They already can today, of course, but this will make them more efficient in some cases, with smaller downloads and faster execution. This might be a very big deal - m
267.
▲
by
azakai
4y ago
Hmm, I'm not a regular LLVM committer myself, but I think there's a chance. The history here has been several ports "for fun", so no one has tried to upstream anything. But if you have a real use case that could benefit
268.
▲
by
azakai
4y ago
Here are some more ports of LLVM and clang to wasm/the browser: * https://github.com/kripken/llvm-js * https://github.com/tbfleming/cib * https://github.com/jprendes/emce
269.
▲
by
azakai
4y ago
I'm not an expert on Zig, but my understanding is that it also has safe slices, and pointers which disallow arithmetic, and encourages their usage in idiomatic Zig. I assume that's why this nice post describes Zig as having spatia
270.
▲
by
azakai
4y ago
You're right that Rust also prevents data races (which is great!), but "temporal memory safety" is usually used to mean use-after-free and related issues, not type-safe data races. That was the context here.
More ›