Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dbaupp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
69 ms
·
661.
▲
by
dbaupp
10y ago
Declaration and a (mutating) assignment are different: your example demonstrates that Perl signals the declaration with `my`, and other languages offer similar things like `if let ... = ... { ... }`
662.
▲
by
dbaupp
10y ago
Rotten (well, fermented) meat and fish is still a delicacy: https://en.wikipedia.org/wiki/Fermentation_in_food_processin...
663.
▲
by
dbaupp
10y ago
For some reason that page has the title "Macros - The Rust Programming Language"
664.
▲
by
dbaupp
10y ago
Additionally, if one is building a compiler for other targets (both a compiler that runs on another target, and just a simple cross-compiler), the makefiles/rustbuild need to make sure the appropriate things get cross-compiled in the a
665.
▲
by
dbaupp
10y ago
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1528.htm discusses it in some detail.
666.
▲
by
dbaupp
10y ago
That is a slightly different thing: stable is a perfectly good choice, but one can still debate the fairness or not of being compared to C-with-language-extensions i.e. not standard C (a joke which I think you missed, in one of kibwen'
667.
▲
by
dbaupp
10y ago
Optimisers are what made C what it is: they convert the idealised PDP-11 assembly into something efficient on modern computers, and speed is something C programmers care about.
668.
▲
by
dbaupp
10y ago
From what I've seen, most of the Rust community agrees that using stable a perfectly fine choice; kibwen is offering context, not complaining.
669.
▲
by
dbaupp
10y ago
It does, for individual operations: https://doc.rust-lang.org/std/?search=fast
670.
▲
by
dbaupp
10y ago
(I think you mean signed arithmetic here and in your almost-sibling comment.)
671.
▲
by
dbaupp
10y ago
Great example! I read reddit via a browser written in C++ on a Windows machine (written in C++) or on an operating system compiled by a compiler written in C++... or even an app written in Java. Software engineering still uses languages
672.
▲
by
dbaupp
10y ago
> Java would replace C++, who thought C++ would replace C, who thought Windows would replace Unix All of these have happened, for many use cases.
673.
▲
by
dbaupp
10y ago
LLVM isn't completely platform independent (e.g. all integers are fixed-width, so the frontend needs to know the pointer size to emit pointer-sized integers) and there are some configuration options to be passed down to LLVM/the l
674.
▲
by
dbaupp
10y ago
> Of all the things I said, is that really the only one you want to address? Yes, I guessed (correctly!) that others would inquire about the rest of the comment, I wanted the context. Thank you for taking the time to explain. > Hav
675.
▲
by
dbaupp
10y ago
> no RCE has ever been exploited in 25 years of my C or C++ code I'm genuinely curious about you say this with any sort of surety. Do you have any sort of, say, crash reporting from users' computer, or some other way to know
676.
▲
by
dbaupp
10y ago
> are but one category of security-relevant bugs Memory safety is somewhat special because it's foundational: it is a prerequisite for any other sort of safety/security, as memory safety violations often can be(/are) exp
677.
▲
by
dbaupp
10y ago
This is Poe's law territory, e.g. a lot of your own comments sound very similar to the parent, and there are other emoticons more commonly used to indicate sarcasm/joke.
678.
▲
by
dbaupp
10y ago
So there's no such thing as a C++ expert? That statement is dangerously close to a No True Scotsman: IME even people who seem to fit any reasonable definition of expert (committee members, compiler developers) still make memory-safety
679.
▲
by
dbaupp
10y ago
Indeed, it is the regex implementation that is being tested (and so the language of that implementation is relevant), which is exactly what this discussion is about and also why that comment is careful to be specific about which programs ar
680.
▲
by
dbaupp
10y ago
> fairly straight forward This is a rosy-eyed view of C++ if I ever saw one. C++ has a lot of accidental complexity from layers and layers of features and backwards compatibility concerns: maybe some of the features are "straight fo
681.
▲
by
dbaupp
10y ago
Even if Rust were as complicated as C++, with its ridiculous number of interacting features and backwards compatibility constraints, it manifests very differently: the Rust compiler keeps track of the complexity and tells you when things go
682.
▲
by
dbaupp
10y ago
The Rust team is lucky enough to have a dedicated person (Steve Klabnik) writing documentation and teaching, who, as previously mentioned, gets to see a lot of the ways in which people struggle to learn Rust and practice different approache
683.
▲
by
dbaupp
10y ago
Use an `enum` like Cow[1] that allows passing around static strings along with dynamic strings, as well as interior pointers: the compiler can check that things don't get invalidated and the enum makes it trivial to deallocate things c
684.
▲
by
dbaupp
10y ago
I think nonsense is rather too strong: Rust-banning-`unsafe` is a subset of the full language accepted by the compiler, and is safe. It isn't rare that people talk about the subset of Rust ignoring `unsafe`.
685.
▲
by
dbaupp
10y ago
In the context of this discussion, a lot of those reasons are... idiosyncratic, and/or apply to Rust too.
686.
▲
by
dbaupp
10y ago
String == &str works. Maybe you were encountering some other problem.
687.
▲
by
dbaupp
10y ago
I'm not sure I agree with the anecdote in your first paragraph, and indeed I preemptively addressed it in my comment: one's own experience is just one way in which something can be hard to learn, whereas people who are regularly t
688.
▲
by
dbaupp
10y ago
Why couldn't Rust's developers write "Rust for Dummies"? I feel like you're connecting dots that aren't actually connected. Obviously having more books from different authors/perspectives is great for Rust
689.
▲
by
dbaupp
10y ago
I don't think the T: NonZero bound is doing anything there: the size optimisation is done on the monomorphised/specialised type, not the generic one. In Rust, the concept of a generic types only exist at compile time, and they hav
690.
▲
by
dbaupp
10y ago
It also isn't the same in that it comes with the cost of allocation and reference counting.
More ›