Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zyedidia
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
zyedidia
14d ago
When I've measured this in the past I've seen Wasmtime's Cranelift compiler generating code that runs roughly 1.5x-1.9x slower than native (LLVM) on SPEC 2017 workloads, with x86-64 being closer to 1.5x and AArch64 closer to
2.
▲
by
zyedidia
1y ago
I think the only "C replacement" that is comparable in complexity to C is [Hare]( https://harelang.org/ ), but several shortcomings make it unsuitable as an actual C replacement in many cases (little/no multith
3.
▲
by
zyedidia
1y ago
I don't think there are any plans for Ladybird to have a JIT compiler (they used to have one but decided to remove it) [1, 2], so it's not clear to me that this performance gap will be improved anytime soon (if ever). [1]: https:
4.
▲
by
zyedidia
1y ago
What is the recommended way to use defer to free values only on an error path (rather than all paths)? Currently I use goto for this: void* p1 = malloc(...); if (!p1) goto err1; void* p2 = malloc(...); if (!p2) goto err2;
5.
▲
The mathematics is the one that we dream
(davidbessis.substack.com)
1 points
by
zyedidia
2y ago
|
0 comments
6.
▲
by
zyedidia
2y ago
I think data races can cause undefined behavior in Go, which can cause memory safety to break down. See https://research.swtch.com/gorace for details.
7.
▲
by
zyedidia
2y ago
It sounds like what you're describing is one-time allocation, and I think it's a good idea. There is some work on making practical allocators that work this way [1]. For long-running programs, the allocator will run out of virtual
8.
▲
by
zyedidia
2y ago
The bug used by that repository [1] isn't the only one that can be used to escape the Safe Rust type system. There are a couple others I've tried [2] [3], and the Rust issue tracker currently lists 92 unsoundness bugs (though only
9.
▲
by
zyedidia
2y ago
This is very cool! I'm always on the lookout for extensible assemblers. I especially want one that can handle a normalized subset of GNU assembly so that it can be used on the output of LLVM or GCC (using existing assembly languages, b
10.
▲
by
zyedidia
2y ago
I think one of the interesting aspects of WebAssembly compared to JavaScript is that it can be efficiently AOT-compiled. I've been interested in investigating AOT compilation for a browser (perhaps there is a distant/alternative f
11.
▲
by
zyedidia
2y ago
Fair enough. I think it would be unfortunate if the WebAssembly language in browsers were a significantly different language than WebAssembly outside of browsers (just referring to language itself, not the overall runtime system). I don
12.
▲
by
zyedidia
2y ago
Is there any AOT WebAssembly compiler that can compile Wasm used by websites? I tried locally compiling the Photoshop Wasm module mentioned in the article but the compilers I tried (Wasmtime, wasm2c, WAMR) all complained about some unsuppor
13.
▲
by
zyedidia
2y ago
I am excitedly awaiting the full release of ASL1 from Arm. I wonder if anyone with more knowledge might be able to comment on how it compares with Sail and/or when we might expect to see a full Arm specification in ASL1 (as opposed to
14.
▲
by
zyedidia
3y ago
I think it's a difference between ARMv8 and ARMv6/7 (I believe BKPT on ARMv6/7 sets the exception return address to `addr(instruction)+4`).
15.
▲
by
zyedidia
3y ago
The reason is because the ARM `brk #0x1` instruction doesn't set the exception return address to the next instruction, so the debugger will just return to the breakpoint when it tries to resume, instead of running the next instruction.
16.
▲
by
zyedidia
3y ago
The Rust team did a deep dive on the bug in 2020, which has some more details that might be helpful to understanding what's going on: https://github.com/rust-lang/lang-team/blob/master/design-me... .
17.
▲
by
zyedidia
3y ago
Thanks for the shout-out -- in case someone wants to check it out, the code for Lightweight Fault Isolation is available here: https://github.com/zyedidia/lfi .
18.
▲
by
zyedidia
3y ago
Does anyone know why LSP uses UTF-16 for encoding columns? It seems like everyone agrees it is a bad choice, so I'm curious about the original reasoning. Are there any benefits at all to using UTF-16, or was it something to do with Mi
19.
▲
by
zyedidia
3y ago
I think the Cortex-X series cores are the ones starting to make their way into laptops and the like (Cortex-X4 is the latest). These are Arm's "flagship" cores.
20.
▲
by
zyedidia
3y ago
I didn't fully read the paper you linked, but I think at a high level the difference is this: the Exynos approach only encrypts the data stored in the branch predictor, while the Arm approach additionally encrypts the index. The Exynos
21.
▲
by
zyedidia
3y ago
A big reason is because I started a working towards a PhD recently, and so I've been more focused on that. I think micro has also reached a relatively stable spot, where it would only be significantly improved with some large new featu
22.
▲
by
zyedidia
3y ago
I agree -- relying on Safe Rust's "guarantees" for security purposes is very likely to be problematic. To make the reasons concrete: for the last 4 years rustc has had a bug that allows writing transmute (arbitrary type conve
23.
▲
by
zyedidia
3y ago
I came across this issue in Rust recently: https://github.com/rust-lang/rust/issues/57893 . I thought it was interesting since it lets you easily write transmute in safe Rust: https://zyedidia.githu
24.
▲
by
zyedidia
3y ago
I think Hare ( https://harelang.org/ ) might fit the bill: it retains the minimalism and simplicity of C, but fixes issues like this (and others). Unfortunately I don't think it's ready for real use yet, but I am ke
25.
▲
by
zyedidia
3y ago
You need to provide implementations of the sanitizer callbacks yourself. For example, to use the address sanitizer you should use `-fsanitize=kernel-address`, and then the compiler will generate calls to `__asan_load8_noabort`, `__asan_load
26.
▲
by
zyedidia
3y ago
Depending on how much language support you want, you may want to compile without the D runtime (in which case you only have access to the C standard library, and various features are disabled, such as classes/interfaces, garbage collec
27.
▲
by
zyedidia
3y ago
I've been using D for OS development and have found it very good for controlling low-level details. GDC is the GCC frontend for D, and has most/all of the same features for controlling this stuff as GCC. For example, you can use `
28.
▲
by
zyedidia
3y ago
Thanks! Perhaps I shouldn't have characterized phony rules as a hack, but just that I think it is cleaner to express that information directly in the rule rather than in a separate rule. The paper you link is great, and I should read
29.
▲
by
zyedidia
3y ago
I haven't run into these pain points much with Make, but Knit does support spaces in targets/prerequisites (use single or double quotes to surround the name). For the second point, Knit has regex rules (a Plan9 Mk feature) that ca
30.
▲
by
zyedidia
3y ago
This will unfortunately be a pain point for any build system that isn't already entrenched in the ecosystem. I think Knit does as well as it can to mitigate this: * There are fully static prebuilt binaries for a wide variety of platfor
More ›