Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dbaupp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
78 ms
·
331.
▲
by
dbaupp
8y ago
> I think the misunderstanding here is that goroutines are not classical threads (which would share many problems with `goto`) - they exist somewhere between coroutines and actors (because of channels+select). I don't think that c
332.
▲
by
dbaupp
9y ago
That's definitely a fair concern, and smarter=more complex is something the Rust team seems to be aware of, e.g. for that specific feature https://github.com/rust-lang/rfcs/blob/master/text/2094
333.
▲
[Bitcoin-Dev] KETAMINE: Multiple Vulnerabilities in SecureRandom()
(lists.linuxfoundation.org)
1 points
by
dbaupp
9y ago
|
0 comments
334.
▲
by
dbaupp
9y ago
I believe that second link is now at https://doc.rust-lang.org/rust-by-example/
335.
▲
by
dbaupp
9y ago
I didn't say it didn't happen. I acknowledge it, and I've even personally written many, many comments calling out/correcting comments that are too enthusiastic in their promotion of Rust. In any case, for that specific
336.
▲
by
dbaupp
9y ago
It's what people think the "RESF" does, but as is consistently mentioned whenever it is brought up, there seems to be more people replying to any comment about Rust with complaints of "RESF" (even if the original co
337.
▲
by
dbaupp
9y ago
I don't think you're quite right with the consequences of C++ style copy elision. It fundamentally isn't nearly as important as in Rust because it doesn't implicitly copy. Especially pre-C++11, copy elision was critical
338.
▲
by
dbaupp
9y ago
Yes, they do. The value of Rust is that it makes it safe to do: if there's a reference (Rust's safe "pointer" type) to something, it can't change or move in surprising ways.
339.
▲
by
dbaupp
9y ago
How is safely accessing a mutable global from multiple threads an easy thing? Also, the Arc isn't needed in lazy_static: just a mutex is enough for mutability, the sharing (which is what Arc controls) comes from being a static.
340.
▲
by
dbaupp
9y ago
There's lots of testing for Swift on Linux (e.g. every pull request runs tests on macOS and Linux), and Apple recently announced https://github.com/apple/swift-nio which seems to have been very well received, e.g.
341.
▲
by
dbaupp
9y ago
One polymorphic version, like OCaml or Haskell, not specializing like C++ or Rust. The compiler can and does specialize functions as an optimization, but that's not necessary nor part of the semantic model.
342.
▲
by
dbaupp
9y ago
I'm... intimately familiar with generics in Swift. :) Like all systems it has trade-offs, but the decision it makes line up with the decisions you said Go wanted to also make. In any case, that specific concern doesn't apply to
343.
▲
by
dbaupp
9y ago
Swift has essentially all the same constraints, and fretting about compilation speed with the C++ approach are hard to stomach given one of the widely-used replacement is equivalent: manually copy-pasting code, instead of letting the compil
344.
▲
by
dbaupp
9y ago
No, they're all different, which is my point: there's a variety of schemes that all have well-understood pluses and minus, meaning new languages don't have to do the exploration themselves.
345.
▲
by
dbaupp
9y ago
The right people are getting the credit, at least: the team that originally built bundler also created cargo.
346.
▲
by
dbaupp
9y ago
I think that's an inaccurate/misleading framing: the typical criticism is that it has seemed to ignore innovations from elsewhere, there's no suggestion that it needs to reinvent them. For instance, people consider generics a
347.
▲
by
dbaupp
9y ago
Concepts like finite integer sizes (aka integer overflow) and finite floating point precision (1/3+1/3+1/3 != 1) aren't PhD-level concerns. :)
348.
▲
by
dbaupp
9y ago
'cargo doc' generates documentation for dependencies (along with the main crate) by default.
349.
▲
by
dbaupp
9y ago
(Minor point: > Not only do you have to box it up manually, but you have to cast it into a trait object There's an implicit coercion from Box<T> to Box<Trait> if T impls Trait, if it's 'obvious' that suc
350.
▲
by
dbaupp
9y ago
> Handwaving is all I can do, I am just the tech taking orders. Even "the tech" can have some understanding of finite precision integers and floats, and how they behave, given they're building blocks of the trade. It see
351.
▲
by
dbaupp
9y ago
That problem is normal and expected behaviour for finite precision floating point: it appears with any scheme for floating point (IEEE-754 or not), as computers are finite. A significant chunk of the field of numerical analysis is about con
352.
▲
by
dbaupp
9y ago
> Even through the compiler will read a `volatile` variable from memory every time, that memory may still have a stale value in the CPU cache, which `volatile` will do nothing to prevent FWIW, it doesn't even do this, it's ju
353.
▲
by
dbaupp
9y ago
The docs list no undefined behaviour for inttoptr, so it's (probably) not problematic at the LLVM level: http://llvm.org/docs/LangRef.html#inttoptr-to-instruction .
354.
▲
by
dbaupp
9y ago
This is almost a "no true scotsman": in practice, a lot of C projects and programmers (even ones that, by most other metrics, would be regarded as professional programmers) do not have the resources to test as extensively as SQLit
355.
▲
by
dbaupp
9y ago
Yeah, definitely: I'm only trying to highlight that this sort of app wouldn't actually do much in practice because (Australian) society already deals with such bites well. If everyone in Australia had the app and used it all the t
356.
▲
by
dbaupp
9y ago
I don't think it is actually likely to save lives, because spiders very rarely kill. As far as I can tell, there's been one death from a spider bite in Australia in 40 years: https://www.telegraph.co.uk/news/
357.
▲
by
dbaupp
9y ago
> To be honest, I really think you're blowing the complexity of this way out of proportion. Plus like, it's not like Rust's grammar is this incredible thing of beauty: look at `where` clauses or lifetime syntax. If Rust w
358.
▲
by
dbaupp
9y ago
Thanks for the kind words! I do have a blog with various writings about Rust (link in my profile), but I don't think publishing comments would be appropriate for me right now (at least, not without more work). :)
359.
▲
by
dbaupp
9y ago
All those iterator types are exactly the same as C++ having std::vector::iterator, std::vector::const_iterator, std::deque::iterator, ..., and exist for similar reasons: mostly zero-overhead abstractions. (This is even more visible in the r
360.
▲
by
dbaupp
9y ago
One might have strings that have unspecified, but identical, representations, meaning one can do things like 'split' and 'replace' (in general, Vec/&[] doesn't have great tools for operating on subslices, l
More ›