Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dbaupp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
47 ms
·
511.
▲
by
dbaupp
9y ago
> this suggests to me that, for many of us, that context is rather angry and upset. This doesn't even seem unreasonable to me: if every time my project was discussed it was met with scepticism and outright "why are you bother
512.
▲
by
dbaupp
9y ago
Sure, but it still does basically the same thing of passing around witness tables. Values happen to have a uniform representation, but this seems seems like variation within a cluster of languages that do similar thing rather than something
513.
▲
by
dbaupp
9y ago
> In most linux contexts, there's really no need for it since linux distributions come with package managers This single sentences hints at least major two reasons for language-specific package managers: - non-Linux platforms - t
514.
▲
by
dbaupp
9y ago
These aren't in opposition: it's what I meant by "on-boarding". If remacs didn't exist the hypothetical developer wouldn't be contributing to full Emacs (it never crossed their mind, or it's too intimidati
515.
▲
by
dbaupp
9y ago
It's touched on elsewhere in this thread, but one of the benefits of doing the port in the style of remacs is that one has a completely functional editor the whole time: things can get rewritten one small piece at a time because Rust a
516.
▲
by
dbaupp
9y ago
There's many different sorts of open source projects, I've been involved with projects that - are mainly driven by paid contributors, with some volunteers - some number of paid contributors with many volunteers - have only volunte
517.
▲
by
dbaupp
9y ago
Both are good points, but I think it's always good to remember the humans behind work, even if you don't think it's useful work. It's perfectly reasonable to be unconvinced of the value of a project, but that doesn'
518.
▲
by
dbaupp
9y ago
It seems a bit rude to complain about volunteers for doing something they want to do rather than what you want them to do. I imagine that this, for the most part, isn't even opportunity cost: the people working on it probably wouldn&#x
519.
▲
by
dbaupp
9y ago
I believe this is a incremental rewrite of GNU Emacs's C portions, so is probably useable with full functionality (modulo bugs) right now.
520.
▲
by
dbaupp
9y ago
Yes, there's some pitfalls of Java that Swift avoids, like compulsory allocation, but it fundamentally has the same style of indirection (often pointers to stack memory rather than heap, but still pointers), type erasure and pervasive
521.
▲
by
dbaupp
9y ago
Haskell and Ocaml, e.g. http://okmij.org/ftp/Computation/typeclass.html .
522.
▲
by
dbaupp
9y ago
The Swift approach shares many of the same characteristics and trade-offs as "true" (aka Java-style) boxing. Of course, it does avoid some downsides of that, but also brings along some additional ones.
523.
▲
by
dbaupp
9y ago
Those signatures seem complicated to me because there's a pile of arguments and some of them are functions with extra annotations, not because there's generics involved. The equivalent signatures using interface{} (or maybe someth
524.
▲
by
dbaupp
9y ago
Even the modernest pointers unique_ptr and shared_ptr are dangerous (use after free/move and, e.g., ease of data-racing in the data, respectively). The problems with them are relatively fundamental to C++ and its idioms. The classes yo
525.
▲
by
dbaupp
9y ago
Higher level constructs like iterators, references and smart pointers are all relatively easy to misuse. It is definitely possible to have safe abstractions like std::string's + and they're one reason why C++ is an improvement ove
526.
▲
by
dbaupp
9y ago
You only end up with them in the final program with a naive translation that makes life hard for yourself. Using the native types is much nicer (even ignoring any safety benefits), and so people are naturally encouraged to do so. For instan
527.
▲
by
dbaupp
9y ago
Great example! OsRng will use that system call, if it is available.
528.
▲
by
dbaupp
9y ago
> How does this work when crates with different epochs are mixed? The summary addresses this: > Each crate specifies the epoch it fits within (a bit like "C++11" or "C++14"), and the compiler can cope with multip
529.
▲
by
dbaupp
9y ago
You are incorrect: the grammar of both C and C++ is fundamentally hard to parse, let alone the extra complexity of giving nice error message and doing good recovery. E.g. they require context to parse https://stackoverflow.com&#x
530.
▲
by
dbaupp
9y ago
> Floyd and Rivest created the randomized SELECT algorithm [12] in 1975. Although further improved and benchmarked with favorable results by Kiwiel [19], at the time of this writing we found no implementation available online and no evid
531.
▲
by
dbaupp
9y ago
Iterator invalidation can lead to memory unsafety in C++, usually due to a pointer or reference becoming dangling, but most other languages just treat it as a correctness problem: GC avoids the problem of invalidating pointers. As my parent
532.
▲
by
dbaupp
9y ago
I didn't say it was the only model, nor did I say that Rust was the origin of its style of data race prevention. You seem to be annoyed that Rust is using techniques similar to older research to avoid data races and also annoyed that o
533.
▲
by
dbaupp
9y ago
Thread safety (specifically, freedom from data races) is memory safety. Additionally, lifetimes are also part of the system that statically avoids problems that appear in GC'd languages like iterator invalidation (for instance, Concu
534.
▲
by
dbaupp
9y ago
Being explicit isn't relevant: a relaxed store to an atomic followed by publishing a pointer to it won't have the expected happens-before relationship (program order won't be respected). In any case, the only reason to thin
535.
▲
by
dbaupp
9y ago
That is another alternative although I am not sure it is a great one in the context of code where the unsafe operations expose a safe interface. That is, there should be no memory unsafety no matter how the API is used and the safety checks
536.
▲
by
dbaupp
9y ago
The atomic type doesn't provide the necessary fences automatically. Operations on it have various sorts of fencing, but these do not necessarily connect in the way you think they do. The partial initialisation problem of creating a str
537.
▲
by
dbaupp
9y ago
And AVR too: https://github.com/rust-lang/rust/issues/42450
538.
▲
by
dbaupp
9y ago
Genuine question: when was the last article to "sneer" on HN? There was the Linux kernel one a few weeks ago, but the meat of that that was more actual code proving that Rust worked in practice to replace a section of a large exis
539.
▲
by
dbaupp
9y ago
I'm not entirely sure what you mean. The compiler does make the author pause: dangerous types like `*mut T and `UnsafeCell<T>` are not Sync, so types containing them are also not automatically Sync. In any case, Rust only guarant
540.
▲
by
dbaupp
9y ago
In safe Rust, sharing a value of any Sync type between threads can't result in data races. Send and Sync provide thread safety guarantees about types that other safe abstractions can rely upon, and fencing correctly is one of the thing
More ›