Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dbaupp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
65 ms
·
601.
▲
by
dbaupp
10y ago
FWIW, a common argument in favour of C and C++ is how it is used by pretty much everything that one runs on a computer, in exactly the same sense of "use". I think you're tilting at windmills: some people mean "use"
602.
▲
by
dbaupp
10y ago
> Having to allocate memory while processing an exception probably isn't a big deal, since Rust does not claim to be able to operate in an out-of-memory condition Allocating is definitely a big deal for a pervasive error handling!
603.
▲
by
dbaupp
10y ago
Firstly, "just" determining membership of a value within a type hierarchy requires far more dynamism than zero. Given a fairly arbitrary type-erased value x, how do you tell if its type implements some fairly arbitrary trait T? Th
604.
▲
by
dbaupp
10y ago
The `error` function is approximately `throw`. Catchable with: https://hackage.haskell.org/package/base-4.9.1.0/docs/Contro...
605.
▲
by
dbaupp
10y ago
You have talked about Python's exception scheme before, and been rebuffed before (it is too dynamic to use pervasively in a systems language), please be more specific, and also have the minimum grace to not repeat incorrect things. In
606.
▲
by
dbaupp
10y ago
Your posts in this thread are good examples of how the "Rust Evangelism Task Force" meme started: it's great that you're enthusiastic about Rust, but you're not tempering your enthusiasm with pragmatism nor with emp
607.
▲
by
dbaupp
10y ago
By not having borrowing, do you mean the compiler doesn't stop one from mutating something that has a dependent scoped pointer pointing into it? How does D avoid dangling pointers for that?
608.
▲
by
dbaupp
10y ago
I was claiming you were picking nits because the main point of the comment is that smart pointer != reference counting, the incorrect "only" claim is somewhat orthogonal. And, my point about the qualitative difference between the
609.
▲
by
dbaupp
10y ago
I think you're picking nits. The equivalent raw pointer code would also have to free a pointer it was overwriting, so I'm not sure that's so interesting (definitely not in terms of "zero cost abstractions"). That sa
610.
▲
by
dbaupp
10y ago
The "data race" term is jargon (i.e. means more than just "race on data") that specifically refers to unsynchronised concurrent accesses to a piece of memory/resource (where at least one of the accesses is a write
611.
▲
by
dbaupp
10y ago
Yes, you can explicitly call drop ( https://doc.rust-lang.org/std/mem/fn.drop.html ) in Rust, which just uses move semantics to force it out of scope. A similar function could be implemented in C++, and called lik
612.
▲
by
dbaupp
10y ago
Hm, I'm not sure I understand how that's answering my question. Neither of those seem to even define what the "memory safety" notion means for D so I can't compare. And, looking into it further, none of the links fr
613.
▲
by
dbaupp
10y ago
Could you be more specific? It doesn't seem like there's much room in the conventional definition of memory safety (e.g. https://en.wikipedia.org/wiki/Memory_safety ) for variation, other than, I suppose, put
614.
▲
by
dbaupp
10y ago
It's worth noting that the sanity you're appreciating is, IME, very typical of the Rust community. Mistakes/overblown claims will get called out (if someone notices them), and "better together" is something people g
615.
▲
by
dbaupp
10y ago
Great analysis. Thanks for following up. I guess you realise this, but the benefits of hoisting even simple operations like a dereference outside the loops is enabling other optimisations, such as the addition -> multiplication one here
616.
▲
by
dbaupp
10y ago
> May still be using a physical register for [r15], despite the slow-looking dereference I don't think so. I believe register renaming means two explicit uses of a register may not end up in the same physical register, it doesn'
617.
▲
by
dbaupp
10y ago
> TL;DR: What rust did in the follow up post also wasn't actually an optimization, in at least one microbenchmark. Interesting! This isn't a correct conclusion! There's more differences between the code that just the opt
618.
▲
by
dbaupp
10y ago
I agree 100% that authors should be very sure before making aggressive/clickbaity/bold claims (and I take a slightly perverse pleasure in cutting wild claims down to size, like this case), but (a) as an author, it can be hard to d
619.
▲
by
dbaupp
10y ago
> I find it funny and think it's pretty telling that there are bold claims made that are only crossed out after the author is corrected ... What else would you expect? The author observed something, drew a mistaken conclusion, wro
620.
▲
by
dbaupp
10y ago
I think it's missing the point to count the programs that aren't the fastest, i.e. only one each of the spectral-norms and pi-digits are "interesting".
621.
▲
by
dbaupp
10y ago
FWIW, the former "no-cost" thing does exist in Rust, in the form of "checked_..." methods on the various integer types, e.g. https://doc.rust-lang.org/std/primitive.i32.html#method.chec... .
622.
▲
by
dbaupp
10y ago
As the sibling is implying, you flipped the arrow: Corrode is a C -> Rust compiler/transpiler.
623.
▲
by
dbaupp
10y ago
> A zero-byte in a utf-8 string is the null-terminator and utf-8 strings can be treated exactly like C strings in terms of where the string ends. No, the parent was correct: UTF-8 encodes NUL (i.e. \0) as a single zero byte (e.g. in c
624.
▲
by
dbaupp
10y ago
Just looking at the numbers is misleading: curl had a security audit last year ( https://daniel.haxx.se/blog/2016/11/23/curl-security-audit/ ), which may mean much fewer are reported over the next f
625.
▲
by
dbaupp
10y ago
What do you mean by "character"? If you mean code point or "unicode scalar value", sure, but if you mean user-visible character (grapheme), it's much more complicated: even something "simple" like ö could
626.
▲
by
dbaupp
10y ago
I see. That sounds like a smaller constant factor, rather than a lower complexity.
627.
▲
by
dbaupp
10y ago
It's a little naïve to think it works on English without the coöperation of the users. (Also, less glibly, things like emoji seem to be becoming more and more popular.)
628.
▲
by
dbaupp
10y ago
My impression is Winograd FFT is still O(N log N), i.e. exactly the same complexity as Cooley-Tukey. That said, they work best on different N, which is possibly what you're referring to?
629.
▲
by
dbaupp
10y ago
(I think you mean high-throughput, not low-throughput: broadly speaking, the options are high-throughput but high-latency, or low-latency but low-throughput, or some balance of the two.)
630.
▲
by
dbaupp
10y ago
> This has a runtime cost. As does using a conservative/"very slow" GC. I'm sceptical, but it may be that D's situation means trading a pervasive slowness (if the parent is true, I don't know) for no write
More ›