Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pcwalton
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
31 ms
·
361.
▲
by
pcwalton
3y ago
Because you could just do the Rust equivalent of system("dd of=/proc/myprocess/mem ...") instead, so it would be security theater. Memory safety just isn't a part of the default Unix model. Note the emphasis
362.
▲
by
pcwalton
3y ago
In fact, on AArch64 there is no integer multiply instruction; there's only multiply-add, and if you just want a multiply you supply the zero register as the addend.
363.
▲
by
pcwalton
3y ago
Yeah, | is technically x + y + x*y over GF(2) (this is the Boolean ring to Boolean algebra relation [1]). The GP is still a good way to remember the precedence though. [1]: https://en.wikipedia.org/wiki/Boolean_ring#Rel
364.
▲
by
pcwalton
3y ago
> (Main annoying thing: a lot of compilers, even popular ones such as clang and gcc, don't actually seem to know what the precedence rules actually are, and generate warnings asking you to clarify. Presumably the authors didn't
365.
▲
by
pcwalton
3y ago
I think CHERI addresses the issue, but I don't know how much of that is in upstream LLVM. Pointer provenance as used for optimization mostly affects the IR-level optimizations, not CodeGen ones. In any case, Azul's work addresses
366.
▲
by
pcwalton
3y ago
The GC needs to unwind the stack to find roots. The only difference between segmented stacks and contiguous stacks as far as unwinding the stack is concerned is that in segmented stacks the stack pointer isn't monotonically increasing
367.
▲
by
pcwalton
3y ago
> He didn't say it was not possible, but that it would have required too much effort in modifying the ABI and the garbage collector. __morestack doesn't really have an ABI. It's just a call to an address emitted in the fun
368.
▲
by
pcwalton
3y ago
Go doesn't need to transition to the kernel to switch threads, does it? It just saves and loads the register state in userland.
369.
▲
by
pcwalton
3y ago
I usually just say that Go implements "userspace threading", since that's really what it is. Some early, pre-pthreads, implementations of Linux threads worked the same way as Go does and they usually called such implementatio
370.
▲
by
pcwalton
3y ago
That part of the interview is incorrect about LLVM. I implemented segmented stacks via LLVM for Rust. It's actually pretty easy, because there is support for them in X86FrameLowering already (and it was there at the time of Go's r
371.
▲
by
pcwalton
3y ago
Apple tried this too with Dont Steal Mac OS X.kext, which uses a haiku with a copyright message as the key to decrypt certain executables like the Finder. I don't think it had any real-world impact.
372.
▲
by
pcwalton
3y ago
> HTML/JS is a bastard to parse. Parsing is a tiny fraction of the time that a Web browser spends, and the various native resources are on the same level of complexity. TrueType hinting instructions from the 90s are of a similar com
373.
▲
by
pcwalton
3y ago
Just use a TrueType subset with no hinting. stb_truetype implements one in 5k lines of code and that includes CFF format outlines. You could omit those and get it even smaller.
374.
▲
by
pcwalton
3y ago
There's a big difference in complexity between OoO implementations of RISC-V like BOOM and a modern x86-64 CPU.
375.
▲
by
pcwalton
3y ago
Huh? Wayland is a surface compositing protocol. It's like DWM/DXGI, not like DX12; like EGL (sorta), not Vulkan; and like Core Animation and the private windowing API in Core Graphics, not like Metal. Different layer of the stack
376.
▲
by
pcwalton
3y ago
> Sweet.. the "go fast" generation is thrilled. We're optimized for a single popular commercialized case! Yes, you should optimize for the 99% case. That is basic software engineering. > Whoops.. we're no longer op
377.
▲
by
pcwalton
3y ago
> It starts with unsubstantiated claims that X suffers from "bloat" despite being capable of running on a 486 and dismissing the fact that the average Wayland compositor + necessary infrastructure is much more "bloated&quo
378.
▲
by
pcwalton
3y ago
Cairo's OpenGL backends, such as glamor, never really made it out of the experimental phase and were rarely if ever used as far as I know.
379.
▲
by
pcwalton
3y ago
Only for certain fonts at certain sizes, and only if you have the SDF generated ahead of time, both of which mean that the technique isn't general enough to render arbitrary fonts in .otf format. Rasterizing small glyphs is super fast
380.
▲
by
pcwalton
3y ago
That stuff has been obsolete for quite a while as the general 3D capabilities are more than enough to saturate all the GPU's memory bandwidth.
381.
▲
by
pcwalton
3y ago
It's a ton of effort to write a GPU vector renderer that's both compatible with existing apps and faster than the CPU. Switching to SkiaGL would probably be the easiest approach to migrate to GPU rendering, but Skia is notoriously
382.
▲
by
pcwalton
3y ago
> Yes, there are memory safety issues, but in practice, these are isolated in very few places. Take a compiler like LLVM for instance: most developers are working on transforms or analyses, and they're exposed to zero manual memory
383.
▲
by
pcwalton
3y ago
Honestly I think XRENDER could be a viable API--the core idea is similar to WebRender, which Firefox uses to great effect--but the existing implementations of it are not well-optimized implementations and issue tons of draw calls using ob
384.
▲
by
pcwalton
3y ago
For the most part that's true, but simple 2D compositing is a bit of a different beast, because it can sometimes be done at scanout time, saving a blit. Last I checked, (non-Android) Linux rarely makes use of this except for the mouse
385.
▲
by
pcwalton
3y ago
2D acceleration is generally done through the same APIs, specifically OpenGL and Vulkan. Classically, the X compositor would use the GLX_EXT_texture_from_pixmap extension to import an X pixmap representing a window surface into OpenGL, wher
386.
▲
by
pcwalton
3y ago
I generally feel that for a language like Java/C#, which Swift is, you really need a JIT and a tracing, moving GC to get optimal performance. Apple has pushed the COM-like model of static code generation and non-moving reference-counte
387.
▲
by
pcwalton
3y ago
From a skim, "Project Hug" seems like it was a deal to keep games in the Play Store. That is a far cry from some kind of weird deal to sabotage a competitor's product.
388.
▲
by
pcwalton
3y ago
It's human nature, unfortunately. Reality television producers have known this for ages: the episodes that feature people who come off as irredeemable jerks always garner the highest ratings.
389.
▲
by
pcwalton
3y ago
The idea that Google has some secret underhanded deal with Mozilla to sabotage Firefox comes up here repeatedly and makes no sense. If Google wanted to prevent ad blocking on Android it would be much simpler to just ban ad blockers from the
390.
▲
by
pcwalton
3y ago
These days, some game engines have done pretty well at making compute shaders easy to use (such as Bevy [1] -- disclaimer, I contribute to that engine). But telling the scientific/financial/etc. community that they need to run the
More ›