Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mmstick
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
91.
▲
by
mmstick
10y ago
> add nightly builds to distributions rustup run nightly cargo build --release You were saying? In any case, there's no such thing as a stable vs nightly split. There's pretty much zero libraries that require nightly, and the f
92.
▲
by
mmstick
10y ago
Mind sharing the source code? I can whip out a Rust version in the same amount of time. I have been using Rust for two years. I never worry about the borrow checker as it never gives me problems.
93.
▲
by
mmstick
10y ago
There is no cost associated with Result/Option when no error is returned. The compiler is smart enough to understand when failure is not an option. Only when an error occurs does Rust act on it. Additionally, it's nonsense to stat
94.
▲
by
mmstick
10y ago
In addition, Rust Results/Options are free when no throw occurs. So the argument is moot.
95.
▲
by
mmstick
10y ago
Here's an example: `Stdin` and `File` both implement the `Read` trait. Therefore, you can write a function that takes the traits that you want to use as input parameters. fn do_something_with<S: Read>(source: S) { /&#x
96.
▲
by
mmstick
10y ago
We've not had any issues developing the Ion shell in Rust -- performs as well as Dash. Basically, you can't come at Rust with the mindset of object-oriented programming. Make your shell event-driven and you'll do perfectly we
97.
▲
by
mmstick
10y ago
That depends on the allocator you are using. Rust bundles jemalloc by default, which organizes deallocations/allocations such that they are very efficient.
98.
▲
by
mmstick
10y ago
The `?` operator is just syntax sugar for: let value = match attempt_something() { Ok(value) => value, Err(error) => return SomeErr::Kind(error), } That way you only need to type let value = do_something().map_err(SomeErr:
99.
▲
by
mmstick
10y ago
Exceptions have high cost so I don't see where you are coming from. Rust's RAII goes further along than C++'s. C++ is playing a game of catchup to steal the move semantics from Rust.
100.
▲
by
mmstick
10y ago
Responses are on the official Rust reddit forum. https://www.reddit.com/r/rust/comments/5krhr0/rust_is_more_t...
101.
▲
by
mmstick
10y ago
This what it would actually look like: https://gist.github.com/mmstick/797fbc1cf20c92f05d33a85c38e1...
102.
▲
by
mmstick
10y ago
That's not what standard Rust source code looks like. I don't see the point in the &* or boxing values. It's not very idiomatic. This is more representative of actual Rust software practices: https://gist.githu
103.
▲
by
mmstick
10y ago
This only applies if you are using system libraries. Most libraries do not rely on external dependencies. Regardless, cargo is build tool for Rust, not a replacement for your distribution's package manager. If you want to build a libra
104.
▲
by
mmstick
10y ago
Rust is very expressive. The main benefits of functional programming languages is contained with Rust's Iterator trait and the ad-hoc polymorphism that traits allow.
105.
▲
by
mmstick
10y ago
Rust's allocation strategy beats the JVM hands down in every benchmark. 20+ years of engineering cannot cover the flaws of VM and GC languages. Writing efficient stack-allocated software will always trump GC/VM solutions.
106.
▲
by
mmstick
10y ago
I typically explain that Rust's safety has side effects that are beneficial outside the obviousness of merely being safe. Namely, Rust's safety allows for migrating runtime checks into compile-time checks when constructing state m
107.
▲
by
mmstick
10y ago
Rust's default hashmap algorithm is DoS-immune for any kind of input, which is a perfectly logical default algorithm for a language intended to be used in security-critical areas like operating systems, system libraries, web browsers,
108.
▲
by
mmstick
10y ago
> The fact that someone says on HN "we're backwards compatible" doesn't quite offer the same level of trust as an ISO standard. Then you shouldn't take the word of a random person but from the Semantic Versioning
109.
▲
by
mmstick
10y ago
> C does have a standard library. It's described in full in the ANSI/ISO/IEC standard for the C programming language, and it's on your system, likely called libc or something along those lines. What you're descri
110.
▲
by
mmstick
10y ago
That makes sense. I've never noticed what the default size was, but because it always worked with indexing, I assumed that it was always usize.
111.
▲
by
mmstick
10y ago
A quick look at Rust's website and history should be more than enough to convince one to try it out versus other random programming languages with questionable backgrounds and ambitions. You have a large following that's backed by
112.
▲
by
mmstick
10y ago
The same is true of any technology. One cannot give an informed opinion without first being informed about the technology in the first place. Technology moves forward because there are many whom are willing to leave the comfort of their box
113.
▲
by
mmstick
10y ago
Should check out the documentation for my Rust implementation of Parallel. Same syntax applies. https://github.com/mmstick/parallel
114.
▲
by
mmstick
10y ago
Developer here. Noticed significant traffic coming from this domain. Not sure if this specific comment is the cause of that though. Kind of difficult to search this site. Anyway, I did and am continuing to develop this with Rust as one of i
115.
▲
by
mmstick
10y ago
You're only going to anger people by referring to another group as 'evangelists' when you yourself have already made note that you don't know enough about Rust to see why they are promoting it. There's much more to
116.
▲
by
mmstick
10y ago
I've seen fatal flaws from supposed experienced C and C++ developers in a large number of high profile projects, that would otherwise be nuked from existence had they used Rust. I've also encountered severe flaws in libraries writ
117.
▲
by
mmstick
10y ago
DICE and others have been investigating and using it to create tools for developing games. There is interest in using it within game engines, but there's just the issue of Rust support for major consoles. There is great interest in the
118.
▲
by
mmstick
10y ago
> I would prefer a str be a str be a str, regardless of how you got it. Lowercase type-name and fundamental like an integer. The lowercase type names are reserved to primitives. The String type is not a primitive but a comprehensive data
119.
▲
by
mmstick
10y ago
> Rust had the chance to make strings feel as comfortable as integers, but instead they introduced their own dichotomy with String and &str. It makes perfect sense when you understand the differences and reasoning behind it. A `Strin
120.
▲
by
mmstick
10y ago
Is there a problem with doing that with unsafe code? You have to remember that unsafe doesn't mean unsafe in Rust. If a developer is choosing to use the unsafe keyword, it's merely telling the compiler that they know what they are
More ›