Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Gankra
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
Gankra
4y ago
Do you mean this kind of dep? https://rust-lang.github.io/rfcs/3028-cargo-binary-dependenc... That's an interesting thought, I'm not sure I've ever seen someone employ that as a pattern. Actually no wait
2.
▲
by
Gankra
4y ago
Just to elaborate on this a bit: as discussed in the Concepts section of the docs[0] the core of cargo-dist absolutely supports workspaces with multiple binaries, and will chunk them out into their own distinct logical applications and prov
3.
▲
by
Gankra
4y ago
The "way-too-quickstart" is the minimal example: https://github.com/axodotdev/cargo-dist#way-too-quick-start A key feature of cargo-dist is that cargo dist init --ci=github should simply set everything up for
4.
▲
by
Gankra
4y ago
Correction on this someone else sent me: The check of interest is for a Mark Of The Web[0] flag that Windows includes in file system metadata. The builtin unzipping utility just faithfully propagates this flag to the files it unpacks. Other
5.
▲
by
Gankra
4y ago
They are exactly the same except for when they're not. (On 64-bit) Rust very naively has two 64-bit integers for the strong and weak count, Swift packs them into only one. Swift also packs in several extra flags for various things [0].
6.
▲
by
Gankra
4y ago
The biggest problem is that if you have a big """zero-cost-abstraction""" blob like iterator adaptors -- `Map<Filter<Fold<ArrayIter<MyType>>>>` -- and a single drop of Resilient Type is
7.
▲
by
Gankra
4y ago
The greatest trick Swift's developers ever performed was convincing the world that it wasn't just a better UX layer on top of COM
8.
▲
by
Gankra
4y ago
No the claim is always that Rust "must" be slower than C/C++ because it has pervasive bounds checking for array indexing. Then people insist on wanting to replace every x[i] in prod with x.get_unchecked(i) only to learn that,
9.
▲
by
Gankra
4y ago
there's almost no bounds checking in rust code before the optimizer even looks at it because we use iterators and not goofy manually indexed for loops that are begging you to make a typo that crashes your code :)
10.
▲
by
Gankra
4y ago
The null pointer optimization is documented in many places, here's one official instance I published in 2015 : https://doc.rust-lang.org/nomicon/repr-rust.html There are many random details of a language that are
11.
▲
by
Gankra
4y ago
I am one of the people who has written a lot of Rust's docs, including one of the early attempts at "specifying" details of the language: the Rustonomicon. Rust's documentation is taken very seriously and often praised
12.
▲
by
Gankra
4y ago
Going into this project I was very high on the idea of "different architectures should get completely independent stackwalker backend implementations" (although they call in to some agnostic machinery for CFI/symbols/reg
13.
▲
by
Gankra
4y ago
That article is about the client-side (generating the minidump for a crashed process) to this article's server-side (processing/analyzing the minidump).
14.
▲
by
Gankra
4y ago
Yeah computing backtraces in a crashreporter is extremely similar to a debugger in that you need a lot of fudge-factor heuristics and fallback modes for known toolchain bugs or common corruptions.
15.
▲
by
Gankra
4y ago
No we removed many random crashes that the C++ code had. You cannot "simply" discard a crash report if something is slightly off because then you would discard most crash reports. And most debuginfo too. You can't expect &quo
16.
▲
by
Gankra
4y ago
Extra shoutouts to the folks at Sentry who also flipped rust-minidump on as their default backend and had to deal with way more exotic issues than I did (and fixed them!) because although Firefox sees some horrendous stuff and gets a bajill
17.
▲
by
Gankra
4y ago
My understanding is that CHERI just tells you to eat your vegetables and properly maintains a chain of custody from like bootloader to kernel to subsystems to drivers, so that anyone messing with MMIO has to do it the Right Way and get perm
18.
▲
by
Gankra
4y ago
Rust is no more unsound than C/C++/Swift here. It basically works but that's a really frustrating answer for anyone who cares about validation/sanitizers/optimization/docs. It's just better if most code
19.
▲
by
Gankra
4y ago
Iain and I previously discussed this a bit, so just to add context: WebKit is already ported to CHERI BSD, so there are definitely solutions to the kinds of hax that JIT VMs like to do. The details just become very platform specific (specif
20.
▲
by
Gankra
4y ago
I already designed several new convenience methods for making this kind of thing simple and the PR to rust-lang is already open :)
21.
▲
by
Gankra
4y ago
Yeah "it's actually xoring array indices" is the standard solution Or you can go Deep on memory models and try to apply Ralf's Xor Provenance Hack and claim that, well, provenance is stored in bytes, but it doesn't
22.
▲
by
Gankra
5y ago
~ is not -> ptr->field in C is (*ptr).field, at which point you are in whatever C's equivalent of a "place (lvalue) expression" is. This creates a weird discontinuity where you -> for the first step and then use `.`
23.
▲
by
Gankra
5y ago
No, as my article notes, because C has a dozen slightly different definitions for "integers that are basically pointers" they were able to keep size_t 64-bit and make intptr_t into a pointer-sized integer and mark it as somethin
24.
▲
by
Gankra
5y ago
hmm i've always just mentally modelled TLS as "yeah the OS slaps a pointer to an array in this one register". but i guess the difference between "pointer to an array" and "a segment of memory" isn't
25.
▲
by
Gankra
5y ago
The fact that there are many different pixel layouts on phones is kinda irrelevant since they've largely all converged on retina resolutions for their viewing distance, making subpixel entirely pointless. For this reason, to my knowled
26.
▲
by
Gankra
5y ago
No it was a cross platform issue when I wrote the article. It's pretty fundamental to how most engines render text. That said, text rendering generally involves some amount of platform-specific APIs to get a "native" look and
27.
▲
by
Gankra
5y ago
Ah ok! We'll be sure to drop looping support from Animated GIFs too, because that's also non-standard[0] and is just an extension Netscape 2.0 slapped on there. I regret to inform you the vast majority of the web is just Shit Peop