Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bjz_
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
64 ms
·
571.
▲
by
bjz_
12y ago
In summary, the Rust code in the direct source translation is about 3.5–4× faster than the OCaml. The parallel version is even faster. This is in safe code with bounds checks.
572.
▲
by
bjz_
12y ago
Please read the entirety of the article, including page two (which is unfortunately easy to miss). There she writes: > I’ll acknowledge that, although disgusting and possibly dangerous, Rack Stare caters to a certain market. The real pro
573.
▲
by
bjz_
12y ago
At the moment the Rust team doesn't really have the resources to spare on directly targeting numerical computing, but they are definitely interested in creating a language that can be 'grown' to suit the needs of a diverse ra
574.
▲
by
bjz_
12y ago
You can define functions as `#[no_mangle] extern "C" fn foo() {}`
575.
▲
by
bjz_
12y ago
I'm not an expert about concurrency, but from my understanding Go still does not solve the safety issues relating to data races. In addition, Rust's concurrency 'primitives' are built as libraries rather than into the la
576.
▲
by
bjz_
12y ago
Rust has bounds checking when indexing into arrays, but those can be usually bypassed by using iterators. There are also unsafe methods if you want to avoid bounds checking (but they are not recommended for most code). Split stacks were rem
577.
▲
by
bjz_
12y ago
It also tackles head on the comparisons between Rust and C++11. Worth a watch if you are curious about that.
578.
▲
by
bjz_
12y ago
Indeed! That talk was extremely eye-opening. Combined with a fuzzer, C-Reduce can find some delightfully wacky bugs that few humans would think to check. Here is a great one found by Regehr himself: https://github.com/mozill
579.
▲
by
bjz_
12y ago
For the benefit of others, here is burntsushi's regex crate for Rust (compile time regexes included): http://static.rust-lang.org/doc/master/regex/index.html
580.
▲
by
bjz_
12y ago
I was really surprised to see it barely using only a fraction of my CPU on my MBP in Aurora (was expecting to see it max out one of my cores). Very cool stuff.
581.
▲
by
bjz_
12y ago
I never really understood why net neutrality mattered until watching this. A nice, clear explanation.
582.
▲
Internet Citizens: Defend Net Neutrality
(youtube.com)
1 points
by
bjz_
12y ago
|
1 comments
583.
▲
by
bjz_
12y ago
It shouldn't be a huge change for users of Rust - `~` is used far less than most people think.
584.
▲
by
bjz_
13y ago
Scala and Rust share common roots in ML and Haskell. I would say it's more like a mash between C++, ML and Haskell.
585.
▲
by
bjz_
13y ago
This is a pretty insane example of using Pure Data ( http://puredata.info/ ) to make procedurally generated music for a game: https://www.youtube.com/watch?v=0xr4aL1C24E
586.
▲
by
bjz_
13y ago
I might not have been clear enough. I was just trying to show how the current syntax fits in with `:`, and why your suggestions for `: mut` would not fit with that. All of these are valid Rust code: let (mut x, ref y, &z): (int, i
587.
▲
by
bjz_
13y ago
> The important thing about Rust is its semantics (speed, safety, control), not its syntax. Agreed. I love Haskell syntax above all else, but I like Rust's semantics too much to let that get in the way of me using it.
588.
▲
by
bjz_
13y ago
Showing let bindings with their explicit type declarations might help: let mut x: int = 2; let x: &mut int = &mut 2; let (mut x, ref y, &z): (int, int, &int) = (1, 2, &3); The pattern binding goes to the
589.
▲
by
bjz_
13y ago
Rust can pattern match on structs, fixed length vectors, references, and it has keywords to bind them as mutable and/or by-ref. Doing all that without a `let` would extremely challenging.
590.
▲
by
bjz_
13y ago
Ergonomics. More commonly used things should be shorter and easier to type. Less used, potentially dangerous stuff should be longer - `unsafe` for example. It looks weird at first, but you quickly get used to it.
591.
▲
by
bjz_
13y ago
> after getting over the hump of Rust's pointer semantics, I've found that it's a very elegant and fairly simple language Definitely, I cannot stress this enough. Back when I first looked at the language in 0.3 it was awfu
592.
▲
by
bjz_
13y ago
I would check out: http://pzol.github.io/getting_rusty/posts/20140417_destructu... For example: struct Foo { x: (uint, uint), y: uint } let foo = Foo { x: (1, 2), y: 3 }; let Foo { x: tuple @ (a, b)
593.
▲
by
bjz_
13y ago
> Rust's static type checker would prevent bugs that caused HeartBleed I believe its more a case that it would have been a run-time error due to Rust's automatic bounds checking. This is because Rust uses 'fat pointers
594.
▲
by
bjz_
13y ago
Yeah, looking at it again, you're right, I was lazy and obnoxious. My comment should have been "For those who don't know what QEMU is (I didn't), it is ...". Won't do it again.
595.
▲
by
bjz_
13y ago
Thanks for that perspective, that's a good way of looking at it. It's easy to get overly dismissive and lazy and it's good to have a reality check.
596.
▲
by
bjz_
13y ago
What is QEMU and why do I care? It would be helpful if that had been in the first paragraph. I am going to dig deeper, but I'm sure a huge number of people didn't.
597.
▲
by
bjz_
13y ago
Ah neat. Does it have regions?
598.
▲
by
bjz_
13y ago
The video is a pretty interesting watch. https://www.youtube.com/watch?v=PQqudiUdGuo Towards the end they discuss how they keep themselves focused on building a real product by having a self-enforced deadline and the goal o
599.
▲
Building blocks: how Project Ara is reinventing the smartphone
(theverge.com)
3 points
by
bjz_
13y ago
|
1 comments
600.
▲
by
bjz_
13y ago
> one of the most important things is getting good practices in place That is really important, but still, wouldn't it be better if you could encode at least some of those good practices into the language itself, rather than relying
More ›