Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
estebank
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
421.
▲
by
estebank
2y ago
> Not sure they pay for bus fare either. A lot of companies have commuter benefits that cover bus fare at a minimum. Sometimes it is "free" money, sometimes it is "pay for your bus pass with pre-tax money".
422.
▲
by
estebank
2y ago
This thread feels weird to me because when I write code I do think about my public API, have even sketched it out separately looking at the desired usage pattern, but never felt the need to save that sketch as anything other than as part
423.
▲
by
estebank
2y ago
Most normal people don't comment on hackernews, yet here we are.
424.
▲
by
estebank
2y ago
I wasn't there, but the source is elon's father.
425.
▲
by
estebank
2y ago
> Elon on the other hand went all the way from the nerd being bullied at the playground Elon wasn't bullied. He was pushed down a flight of stairs by one kid after Elon made fun of that kid's father's suicide.
426.
▲
by
estebank
2y ago
> The drop trait has its warts too. Zig's version sets up a point in time where the given cleanup code _will_ run (ignoring power outages and the like), and Rust's sets up a point in time where the given cleanup code is _allowe
427.
▲
by
estebank
2y ago
I like Drop. Memory leaks in Rust are incredibly uncommon. But they are considered memory safe. Box::leak is declared safe, as per the leakpocalipse right before 1.0. A memory leak that is still pointed at by a dangling pointer is not going
428.
▲
by
estebank
2y ago
The UTF-32 thing was confusing me. It is mentioned in multiple places but never explicit if it was a temporary design decision to ease the transition, perfectly reasonable, or the design going forward in perpetuity, in which case I would lo
429.
▲
by
estebank
2y ago
I think a lot of pushback is because people are talking past each other. The reality: - the borrow checker has limitations that doesn't accept some constructs that could be be proved safe, given Rust's own rules - the borrow check
430.
▲
by
estebank
2y ago
https://doc.rust-lang.org/std/vec/struct.Vec.html#method.get...
431.
▲
by
estebank
2y ago
It is also behavior that we want to change, it's just non-trivial to do so. https://smallcultfollowing.com/babysteps/blog/2024/06/02/the... https://blog.rust-lang.org/inside-rus
432.
▲
by
estebank
2y ago
That's true only if you use Vec<T> instead of a specialized arena, either append only, maybe growable, or generational, where access invalidation is tracked for you on access.
433.
▲
by
estebank
2y ago
The borrow checker is smart enough to track disjointed field borrows individually and detect that's fine, but if you have two methods that return borrows to a single field, there's no way of communicating to the compiler that it
434.
▲
by
estebank
2y ago
Every vehicle in (most?) states have to already be checked regularly for things like emissions. There's no reason we couldn't check for improper lights as part of that.
435.
▲
by
estebank
2y ago
Even if this could be made to work, which it can't with polarization, it would still show huge disregard for anyone in an older vehicle or any other mode of locomotion.
436.
▲
by
estebank
2y ago
I personally believe that things like automatically calling `PureDeref::pure_deref` (or similar) on patterns (similar to the apply/unapply methods in Scala) would be a better way to improve that experience.
437.
▲
by
estebank
2y ago
You're probably thinking of https://www.cnet.com/reviews/motorola-laptop-dock-review/ or https://www.theverge.com/2015/10/6/9464639/microsoft-windows...
438.
▲
by
estebank
2y ago
Making film backed images from edited digital pictures is not beyond the ability of a motivated individual, let alone a state entity. Even something as rudimentary as a film camera pointed at a slightly out of focus 4k screen can be made be
439.
▲
by
estebank
2y ago
Rust doesn't have constructors*. * Well, it kind of does, in so far there is a Ctor enum variant in the compiler implementation to represent the name of a type in the value namespace, but it is not overridable by end users and has no l
440.
▲
by
estebank
2y ago
I'm impressed by this individual's effort to bring rust to the clr: https://github.com/FractalFir/rustc_codegen_clr It is already way more complete given it's age than I would have expected. I agree that
441.
▲
by
estebank
2y ago
Personally I'm convinced that the solution to that is not for the language to be more implicit but rather to make tooling for refactoring more front and center. A task for "add a lifetime to this struct everywhere it's mentio
442.
▲
by
estebank
2y ago
1.0 was in May of 2015, but that was closer to an MVP with stability guarantees than the full language. It wasn't until 2018 that Rust was as usable for most tasks. Everything you might have learned back then is still available, just a
443.
▲
by
estebank
2y ago
> Well over 90 percent of enslaved Africans were sent to the Caribbean and South America. Only about 6 percent of African captives were sent directly to British North America. Yet by 1825, the US population included about one-quarter of
444.
▲
by
estebank
2y ago
> The money for funding public and quasi-private (universities and hospitals) institutions has to come from somewhere. Making it equally affordable for everybody doesn't raise enough money to maintain operations. Same for funding th
445.
▲
by
estebank
2y ago
Having a feature like this will significantly increase the demand of better incremental compilation, potentially with the need for patching specific items on existing binaries for speed. At that point you could get very close to an IDE debu
446.
▲
by
estebank
2y ago
Patterns can be arbitrarily complex. If you have struct Foo { bar: Arc<String>, } Then it's the difference between today's if let Foo { bar } = val { if &*bar == "hi" { } } A
447.
▲
by
estebank
2y ago
I mean having the following work: match Arc::new("hello") { "hi" => {} "hello" => {} _ => {} } It is an extension of match ergonomics, called deref patterns. There's som
448.
▲
by
estebank
2y ago
The only thing that's really missing is deref patterns so that you can pattern match on an Arc<T> with a T pattern.
449.
▲
by
estebank
2y ago
If it's public code, a link to a branch with the issue can still be useful. Looking at the compiler internals you can get a better sense on how to minimize the issue. That being said, not having a minimised repro lowers the chance of i
450.
▲
by
estebank
2y ago
rustc does its best to recover, continue and provide diagnostics from later stages. But at the same time it is better to provide a single early error and mark the entire node as recovered to avoid further errors at the cost of requiring mor
More ›