Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
estebank
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
181.
▲
by
estebank
9mo ago
Yes, this is generally what people mean when they talk about enums in modern languages. The in memory and ABI representation of enums/sum types is language dependent. In Rust, an enum is equivalent to a C union where there's a dis
182.
▲
by
estebank
9mo ago
That sounds similar to the hardware on my T460 (2 cores, 4 threads, 16G). Would you consider cloning the repo and building it with the same command as my other comment? I'm really intrigued if the issue is the hardware/platform or
183.
▲
by
estebank
9mo ago
On a Lenovo T460 (mid-range laptop from 2016), with a fresh clone of https://github.com/rust-lang/rust/ and the default config: $ time ./x.py build ... snip ... Build completed successfully in 0:21:24
184.
▲
by
estebank
9mo ago
When people say they want sum types, they generally mean they want both sum types and exhaustive pattern matching. Either of these features on isolation are nice to have, but both together are incredibly powerful to the point where havi
185.
▲
by
estebank
9mo ago
> Rust I cannot even compile after 24h Could I ask what hardware this is on? Even when building LLVM from scratch too as part of building the toolchain (which hasn't been the default for a while now, but could see Gentoo doing so),
186.
▲
by
estebank
9mo ago
> the C-style approach is to extract a minimal subset of the dependency and tightly review it and integrate it into your code. The Rust/Python approach is to use cargo/pip and treat the dependency as a black box outside your pr
187.
▲
by
estebank
9mo ago
If you're not writing very low level stuff and don't need to squeeze out every last bit of performance, Rust code can be very simple and easy to understand as well.
188.
▲
by
estebank
9mo ago
Instead of disabling the borrow checker what should be possible is to promote borrows to Rc/Arc as needed. I would want to restrict this mode to one where it can only work locally, never publishable to crates.io. It would be particular
189.
▲
by
estebank
9mo ago
It's a similar thing to watching movies from before the mid-2000 (I place the inflection point around Collateral in 2004) where after that you get overly dark scenes where you can't make out anything, while anything earlier you ge
190.
▲
by
estebank
10mo ago
In an emergency, if the only options are taking time moving things out of the way or not being able to move, you move things out of the way.
191.
▲
by
estebank
10mo ago
If I invite you to a barbeque and tell you I made lunch, will you tell me off because I didn't raise and butcher the cow?
192.
▲
by
estebank
10mo ago
> Any large Rust project I check has tons of unsafe in its dependency tree. This is an argument against encapsulation. All Rust code eventually executes `unsafe` code, because all Rust code eventually interacts with hardware/OS&#x
193.
▲
by
estebank
10mo ago
Having a 3D engine does not a AAA make. The Witness is a beautiful looking game, but the amount of state and interactions it has to deal with is orders of magnitude less than GTA: San Andreas. It is closer to the complexity a Myst remake wo
194.
▲
by
estebank
10mo ago
This reads to me like an argument for better refactoring tools, not necessarily for looser type systems. Those tools could range from mass editing tools, IDEs changing signatures in definitions when changing the callers and vice versa, to c
195.
▲
by
estebank
10mo ago
The output will cause no user visible change. It uses ASCII for all output, replaces ZWJs to have consistent terminal output in the face of multi codepoint emoji for two out of the top of my head.
196.
▲
by
estebank
10mo ago
If you want something more conservative for error reporting, annotate-snippets is finally at parity with rustc's current custom renderer and will soon become the default for both rustc and cargo.
197.
▲
by
estebank
10mo ago
It would be similar, pointing at the other argument. Neither case would have an applicable suggestion, just point in the right direction. I don't know if at the time we emit the error for `pick_first` we're able to evaluate the fu
198.
▲
by
estebank
10mo ago
Would output along the following lines be an improvement? error[E0597]: `buffer` does not live long enough --> src/main.rs:63:21 | 59 | let report = { | ------ borrow later stored here 60 |
199.
▲
by
estebank
10mo ago
If you have a good repro case, I'd appreciate a bug report. Bad diagnostics are considered bugs.
200.
▲
by
estebank
10mo ago
A hand saw, a table saw and a SawStop are all tools, but they have different characteristics even though they all are meant to cut the same wood.
201.
▲
by
estebank
10mo ago
> What user benefit are they promising? From their README, they promise better error messages, extensions when relevant (example: --progress), and Linux, macOS, Windows and other platforms support. It is my understanding that the GnuWin3
202.
▲
by
estebank
10mo ago
> uutils coreutils aims to be a drop-in replacement for the GNU utils. Differences with GNU are treated as bugs. > Our key objectives include: > Matching GNU's output (stdout and error code) exactly > Better error mes
203.
▲
by
estebank
10mo ago
"unsafe" or `unsafe`? One is the general meaning of the word, the latter is "it invokes undefined-behavior".
204.
▲
by
estebank
10mo ago
Measuring success of a project against a bar that the project didn't set is like complaining that an F1 car is hard to park: that's not what it was meant to do. Servo was meant to be a test-bed for new architectures that might or
205.
▲
by
estebank
10mo ago
> For an example, if a function in no_std overflows, it can result in undefined behavior, no unsafe required. And stack overflows are easy in Rust, like they are easy in most other systems languages. This is true, no_std has no Rust runt
206.
▲
by
estebank
10mo ago
Does every discussion of Rust and C need this recurring subthread conversation? It is approaching Groundhog Day levels of repetition. Yes, `unsafe` code can have memory safety bugs. Yes, `unsafe` doesn't mean "unsafe". Yes, a
207.
▲
by
estebank
10mo ago
> But with no_std, Rust is not memory safe, even when not using unsafe. What makes you say that?
208.
▲
by
estebank
10mo ago
> I can't even get Rust to work here on my slightly older Mac system. Could you elaborate on that? macOS Sierra (released on 2016) on Intel macs is supported[1][2], which should allow for Macs from late 2009 onward to work. The Inte
209.
▲
by
estebank
10mo ago
I take umbrage at "The error that teaches nothing". I went to reproduce the case[1] in order to file a diagnostics ticket, and I don't know how you could make this diagnostic any more pedagogical: error[E0382]: use of mo
210.
▲
by
estebank
10mo ago
Rust wants all memory to be modeled as an ownership tree: the same bit of memory can't be owned by more than one data structure. A doubly linked list breaks that requirement so it can't be modeled in safe Rust directly. The option
More ›