Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Gankro
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
91.
▲
by
Gankro
10y ago
This is, to some extent, moving the goal posts. You're considering "total correctness" whereas the focus of this stuff is largely "only" memory-safety.
92.
▲
by
Gankro
10y ago
Agreed that there are more powerful systems to verify this code, but these quickly face diminishing returns relative to their costs. On the other hand, collections are embarassingly testable. It's never been clear to me that formal met
93.
▲
by
Gankro
10y ago
These answers basically cover it.
94.
▲
by
Gankro
10y ago
I would be very interested in how these two languages enable safe data structuring. Do they have significant tradeoffs in terms of ergonomics, control, or perf? Keep in mind basically all of Rust's libcollections uses unsafe code for p
95.
▲
by
Gankro
10y ago
Hey there, I wrote pretty much all of this. Sadly I wasn't ever able to finish it, and won't ever be able to due to contractual obligations. It has since languished due to lack of maintainership, even though it's part of the
96.
▲
by
Gankro
10y ago
I don't see how anything they said is incorrect. The type is int*, the name is p. C just has this weirdly optimized multiple value decl syntax that for some reason really wants to make it easy to declare an array of int, pointer to int
97.
▲
by
Gankro
10y ago
The cruel irony here is that simplicity was a foundational goal and major rallying point for Java. Here's a website from 1997 describing it: http://www.cafeaulait.org/course/week1/16.html Ignoring the last pa
98.
▲
by
Gankro
10y ago
Uh... That doesn't seem true at all? Unstable stuff gets deprecated all the time (the libs team basically defaults to delete-everything), and I assure you that some of that stuff was accepted in an RFC. There's also the case tha
99.
▲
by
Gankro
10y ago
On the other hand, niko has described trait resolution as "basically prolog", so that's something you can push to perform as degenerately bad as you want (the recent addition of specialization only making things worse). The i
100.
▲
by
Gankro
10y ago
The first-party stuff in the pipeline is basically: https://github.com/rust-lang-nursery Off the top of my head, Time and SIMD are the only two first-party efforts that are missing from there. Things which will, at this rat
101.
▲
by
Gankro
10y ago
As far as I can tell, the impl of Arc and ARC are actually basically identical at the high level, with the only major diff being ARC only keeps 32-bit counts on 64-bit (so they only waste one pointer of space). Everything else is just where
102.
▲
by
Gankro
10y ago
Happier than Rust 1.0 and the end of The Rustup?
103.
▲
by
Gankro
10y ago
Absolutely. I don't find the distinction to be particularly meaningful in this case.
104.
▲
by
Gankro
10y ago
Yes, that's garbage collection. :)
105.
▲
by
Gankro
10y ago
More or less. Hence why high performance data structures are invariably unsafe to implement in every language if they can be implemented at all. Rust lets you implement them, and for almost all of them you can even expose a safe high-perf
106.
▲
by
Gankro
10y ago
You can express data structures safely perfectly fine in Rust as long as you do all the things that make them safe in every other language -- aggressively garbage collect, indirect, and runtime validate. I'm not aware of any language t
107.
▲
by
Gankro
10y ago
Apparently modern Intel CPUs will fuse JO instructions to preceding adds, producing the effect of dedicated "checked add" instructions: https://gist.github.com/regehr/65252e90fb6bad82d533#gistcomm...
108.
▲
by
Gankro
10y ago
more optimizations - more code. Might as well do it at higher level so each optimization needs less code.
109.
▲
by
Gankro
10y ago
This working is entirely necessary for C++-style handle-iterators to work. Rust's slice iterators are implemented in the exact same fashion precisely because C/C++ does this a lot and LLVM is trained to "get" it.
110.
▲
by
Gankro
10y ago
Yeah I guess you could have exponentially many statically compiled paths for each combination of drop flags... but then you're just encoding your drop flags in the instruction pointer :) edit: this of course implies an easy program wit
111.
▲
by
Gankro
10y ago
I really wish calendar-oriented programming had taken better hold in the 80's. It's a really elegant paradigm with great separation of concerns. Being able to shard data out into timezones with inter-timezone accesses requiring a
112.
▲
by
Gankro
10y ago
No, if you conditionally move a box, there needs to be runtime checks for whether that condition occured when in it goes out of scope. (note that reassignment of a variable effectively causes the old value to go out of scope -- this may hav
113.
▲
by
Gankro
11y ago
And on Windows it's "potentially ill-formed UTF-16": https://simonsapin.github.io/wtf-8/ Basically if your language/std-lib claims to be cross platform and considers paths to be definitely-utf8, it&
114.
▲
by
Gankro
11y ago
Rust doesn't consider exception safety to be a matter worth 'unsafe's time. All code must simply be memory-safe in the face of unwinding. RecoverySafe is basically "it's hard to leak busted state out of a region of
115.
▲
by
Gankro
11y ago
> Even specifying that they have a new arbitrary value on each access would be a big improvement over the status quo. This is approximately what LLVM describes undef as, and it indeed leads to nasal demons. This description enables a sin
116.
▲
by
Gankro
11y ago
Your operating system, and the outside world, is a shared mutable resource -- particularly file systems and network connections. Even in Haskell, you can explicitly close a file (the docs recommend it!), and if you shared that file with any
117.
▲
by
Gankro
11y ago
Whether GIF was intended for this usecase or not (it wasn't, the GIF spec specifically calls it out as a bad idea [0]), it's overwhelmingly what it's used for in practice. Therefore anything that can displace GIF in this sp
118.
▲
by
Gankro
11y ago
Quite the opposite; jemalloc has been the default, and using the system allocator has been the "hassle" since well before 1.0. However a few key platforms have jemalloc disabled because it's buggy (deadlocks or worse). I thin
119.
▲
by
Gankro
11y ago
1.6 with alpha features is essentially the nightly on the day that 1.6 entered beta. Backports are incredibly rare while the trains are running.
120.
▲
by
Gankro
11y ago
From what I've seen, I'm pretty sure that over the past 8 years of development all usecases, features, and syntaxes were indeed kept in mind for at least some amount of time. Not all of them made it into the final design, though.
More ›