Hacker News new | past | comments | ask | show | jobs | submit | more mmstick's comments login

I landed a job w/ Rust, and the programming challenge I was given was a simple C programming challenge to implement a parser to parse gzip headers, to which I did it in both C and Rust.

Nobody hiring for a position that's largely Rust is going to ask you to write linked lists, trees, and graphs. They're going to want you to build something more complex & practical.


He's referring to how the language and it's ecosystem will evolve from this point forward in comparison to the C++ ecosystem. In addition, the programs that are there should be just fine. There is a lot of room for advancing the Rust compiler to generate more efficient routines from the same code. The Rust compiler, after all, is not taking full advantage of all of the available compiler information. A significant volume of information is simply discarded at the moment. C++ compilers don't have the same degree of headroom for possible future optimizations.


> He's referring to …

I know; that was not what the comment he replied to was referring to.

The comment he replied to was referring to the actual much better performance of one of those C++ benchmarks game programs, contributed just 6 weeks ago.


It doesn't really matter that Mozilla's a small organization. All they had to do was provide strong leadership and management expertise, and entice the open source community to voluntarily join and advance the project accordingly. Which thereby lead to not just Mozilla, but a few other organizations joining in with developers of their own to collaborate together amongst each other, including an army of rogue volunteers that aren't backed by any organizations. That's just not something you'll ever see from a corporation that has to answer to greedy shareholders that only care about ROI figures, especially short-term ROI figures.


You can mix them if you take your Options and convert them into Results with the Option::ok_or(E) method.

    do_this(x).ok_or(CustomError::ThisError)?;


I personally went from Go (slightly mingling with it) -> Rust 1.0 (wrote my first applications with it) and found it to be incredibly easy to learn in comparison to C, C++, Java, and even Python and JavaScript. Everything's pretty explicit and straightforward, and the API documentation and associated resources are stellar.


What's funny is that if you ask different people the same question about Rust's selling point, you'll get a different answer most of the time. Rust has a lot of features, and it's the sum of all the parts that make the whole, rather than a specific part in particular.


Sounds like what you want is more along the lines of the Ion shell[1], rather than Elvish. It's written in Rust, and the performance well exceeds Dash (written in C), despite having a lot of features that Dash is unable to do efficiently. Go's just not a good a language for writing a shell, especially once you get into job control and signal handling, or if you care about performance.

Some of the great features you won't find in Bash or Zsh are the string and array methods[2], first class arrays[3], slicing syntax[4], tuple assignments[5], optionally type-checked assignments[6], ability to use functions within pipelines, typed function parameters, a much simpler syntax, and more. Many of the best ideas from Fish, Oil, Elvish, Bash, Zsh and other shells have been implemented or are in the process of being implemented.

- [1] https://github.com/redox-os/ion/

- [2] https://doc.redox-os.org/ion-manual/ch05-05-method.html

- [3] https://doc.redox-os.org/ion-manual/ch04-02-arrays.html

- [4] https://doc.redox-os.org/ion-manual/ch06-00-slicing.html

- [5] https://doc.redox-os.org/ion-manual/ch04-00-variables.html#M...

- [6] https://doc.redox-os.org/ion-manual/ch04-00-variables.html#T...


If you have ideas, then you should pitch them on the corresponding GitHub projects.


Here in Northern Virginia, near the DC area, it was so hot that winter never came. Grass, bushes and trees were still green during winter. It didn't snow this year. And it's been incredibly hot through spring and summer. Temperatures have been consistently rising each month for many years.


The more experience you gain with Rust, the less you fight against the compiler, and the less you'll opt for the unsafe keyword. Fighting the compiler is just something that happens the first few weeks.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: