Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dbaupp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
43 ms
·
451.
▲
by
dbaupp
9y ago
(That was one of the runners up, not the winning one.)
452.
▲
by
dbaupp
9y ago
To be clear, Rust does scope-based memory management and does allow copying pointers to immutable data. Affine typing (plus the rest of Rust's system) on top of scoped memory management is needed to avoid problems like returning a poin
453.
▲
by
dbaupp
9y ago
The typical route is to cross compile a compiler and cargo on another platform and then run the resulting binary. Is that approach infeasible for Openindiana?
454.
▲
by
dbaupp
9y ago
Your suspicion is wrong. It has benefits for parallelism, but is critical for ensuring safety of the more predictable (vs GC) Rust/C++ style of "manual" memory management. When one doesn't have a pervasive GC to dynamica
455.
▲
by
dbaupp
9y ago
It also lets one avoid reference-counting traffic, which can be significant for values that contain multiple ARC/COW things (such as strings and arrays), and is semantically critical with move-only (or "unique ownership", per
456.
▲
by
dbaupp
9y ago
What do you mean by 'need'? If you mean every Rust program requires a dispatcher to run, then no, Rust does not need a CPU dispatcher. Thread and locks are not primitives: they're implemented in the standard library (the std
457.
▲
by
dbaupp
9y ago
I believe the AVR backend was broken (and out of tree) for a long time, but revived by someone interested in getting Rust onto it.
458.
▲
by
dbaupp
9y ago
> Rust on little machines makes sense, but it needs more support underneath to deal with timers, interrupts, and concurrency. There are projects working on this.[1] NB. the OP is part of that project, from the same author.
459.
▲
by
dbaupp
9y ago
> UIKit is an example of a high-level dynamically linked library. Rust isn't ready for that category of use case - but to be fair neither is C++ :) That's fair. > My point regarding shared data is not about Rust's ve
460.
▲
by
dbaupp
9y ago
> One short answer is anything that needs dynamic linking. Rust has no stable ABI. In theory this is problematic, but I'm not sure how often it comes up in practice: a lot of systems-y use cases for dynamic linking are writing low
461.
▲
by
dbaupp
9y ago
You're referring to trusting-trust backdoors, but I suspect that those should be low on the threat model: they seem like they'd be hard to weaponise in way that they're maintained through years of very large changes (in the c
462.
▲
by
dbaupp
9y ago
The power generation is far more centralised, meaning economies of scale/size can apply both to efficiency of the generators (they can operate optimally all the time) and to infrastructure around them, e.g. for a hypothetical CO2 captu
463.
▲
by
dbaupp
9y ago
> When you ADD two registers, you really are making two reads in the register file, which really is a piece of physical hardware, and those reads really do go to a physical adder and get written back to the real, physical register file
464.
▲
by
dbaupp
9y ago
I think the grandparent means that Go is already very abstracted from what's actually happening (e.g. programmers don't have to think about quantum mechanics, voltages, machine code (i.e. the actual numbers), microcode, CPU caches
465.
▲
by
dbaupp
9y ago
The same trick the article uses works.
466.
▲
by
dbaupp
9y ago
That case is undefined but the cast itself isn't, just certain executions of it. If the code never calls the function with bad values, there's no UB, just like how pretty much all cases of UB in C are only undefined for certain va
467.
▲
by
dbaupp
9y ago
> I believe it comes from the way compilers are traditionally designed --- as an extremely stupid code generation pass followed by multiple optimisation passes, which naturally will fail to remove 100% of the "stupidity". In o
468.
▲
by
dbaupp
9y ago
Do you happen to know of a transcript for those of us who consume text better than video?
469.
▲
by
dbaupp
9y ago
And Servo uses a GC deeply within its Rust code too (the JS one, in fact). I think the benefits in Servo with respect to GC would mainly be because the code is new/learnt from the mistakes of the old (and avoided historical baggage), r
470.
▲
by
dbaupp
9y ago
GC is due to Javascript not C++.
471.
▲
by
dbaupp
9y ago
That's a great point and one I hadn't considered, thanks!
472.
▲
by
dbaupp
9y ago
Rust doesn't have coercions like C, so both of those fail to compile because using x: f64 with foo32 is an error for the first one and similarly x: f32 with foo64 for the second.
473.
▲
by
dbaupp
9y ago
The tree itself will need destructors to clean up allocations, and that's what's problematic here: if the tree is destroyed top down, the destructor of the children may access the parent which has already been invalidated, and sim
474.
▲
by
dbaupp
9y ago
> I think the Rust people just desperately try to disassociate themselves from the OOP label because OOP is not hip anymore. No, it's mostly driven by the differing semantics despite happening to have similar syntax. Syntax is a s
475.
▲
by
dbaupp
9y ago
Having aggregate data types and syntactically having methods seems like a very facile definition of "OOP", versus the conventional uses referring to Smalltalk style message passing or inheritance and overrides. Other than being ab
476.
▲
by
dbaupp
9y ago
"class methods" are specifically static methods, meaning they don't have a self/this object. Rust's closest equivalent to classes has always allowed normal methods and variables (as well as class/static methods
477.
▲
by
dbaupp
9y ago
NB. associated functions have always existed. Also, to be a little snide: "Modules" = modules "Concepts" = traits C++ keeps approaching Rust's feature set! It's normal and even expected that languages in a simi
478.
▲
by
dbaupp
9y ago
Rust is a relatively hands-off style of thread-safety: it protects against data races but doesn't try to get things like deadlock freedom that other more restrictive systems require. The benefits apply when using locks, or message pass
479.
▲
by
dbaupp
9y ago
Servo, which pcwalton works on, is largely motivated by the awesomeness of shared memory.
480.
▲
by
dbaupp
9y ago
The author has also written http://www.evanmiller.org/ranking-items-with-star-ratings.ht... .
More ›