News for hackers. Stuff that matters.
Re:One Year with Rust: I wrote a full featured application i... by jfaucett on Saturday February 25, 2017 @01:27PM (#13732970)
I've been doing a lot of rust lately and I have to say it blows c/c++ out of the water. Sure, c/c++ has more libs, but almost every other feature in rust is fantastic, and wrapping a clib via ffi is really easy in rust. My only (minor) complaint with rust is that they aren't pushing no_std enough IMHO, but I'm biased since all my code is no_std :) so obviously I'd like to see a lot less work in the stdlib and more on stabilizing low-level stuff and creating better apis there for doing things that are currently kind of annoying like creating your own data structs, and doing bit manipualations in fast math libs, etc.

Anyway rust is awesome, especially cargo (finally sane build/package management/versioning for a systems language). I will never code in c++ again if I can help it.

Re:One Year with Rust: I wrote a full featured application i... by agumonkey on Saturday February 25, 2017 @05:00PM (#13734104)
The rust team deserves a thanking rally for pulling this off.
Re:One Year with Rust: I wrote a full featured application i... by drbawb on Monday February 27, 2017 @03:41PM (#13747764)
>Sure, c/c++ has more libs, ...

My problem is honestly that Cargo has spoiled me. C (& C++) may indeed have more libraries; but adding them to a project is a non-trivial exercise.

Assuming your project subscribes to the "build it with one command" philosophy then:

- You'll need to install the target project's build system

- You'll need to invoke that from your project's build system

- You'll need to copy those artifacts (which depends upon implementation details of their build system) to the right output directory (which depends upon implementation details of your build system.)

- Then finally you get to include the headers complete with ifndef guards. (Honestly it's getting increasingly more difficult for me to even tolerate C/C++ header files.)

- P.S: probably repeat this list for every target platform you build on.

---

When installing a package takes a single line of configuration, or a single command, I am far more likely to ignore my "not invented here shoulder-demon" and just add a 3rd party dependency. In C/C++ I actively avoid adding dependencies, regardless of how numerous they may be.

Re:One Year with Rust: I wrote a full featured application i... by vitiral on Saturday February 25, 2017 @01:48PM (#13733067)
One of their (more minor admittedly) goals this year is to improve/stabilize no_std as well as make std more portable. Looking forward to another great year in rust!
Re:One Year with Rust: I wrote a full featured application i... by steveklabnik on Saturday February 25, 2017 @02:04PM (#13733162)
To be clear, no_std is itself stable, but when creating a binary, you need two language items, and those aren't stable. It's not 100% clear what the right path is yet for that, but we'll get there. :)
Re:One Year with Rust: I wrote a full featured application i... by KuiN on Saturday February 25, 2017 @03:15PM (#13733597)
Can you explain what you mean by "you need two language items"? I'm just getting into Rust now and planning some bare metal stuff.
Re:One Year with Rust: I wrote a full featured application i... by steveklabnik on Saturday February 25, 2017 @04:16PM (#13733874)
https://doc.rust-lang.org/book/no-stdlib.html

(This link will change in one or two releases; I landed a new "Unstable Book" a few days ago.)

The TL;DR is Rust expects certain stuff to be implemented in Rust code to work, and that's provided by the standard library. When you don't use the standard library, libcore implements all but a few of them. Implementing them is not yet stable.

Re:One Year with Rust: I wrote a full featured application i... by steveklabnik on Tuesday February 28, 2017 @02:04PM (#13756701)
Re:One Year with Rust: I wrote a full featured application i... by steveklabnik on Saturday February 25, 2017 @02:07PM (#13733180)
So glad to hear you're loving Rust!

https://github.com/rust-lang/rust-roadmap/issues/15 is the roadmap item for some things relating to this; id you want to chime in with your pain points here, that'd be very helpful!

Re:One Year with Rust: I wrote a full featured application i... by RcouF1uZ4gsC on Saturday February 25, 2017 @06:46PM (#13734639)
By that way, in referring to C++, are you referring to modern C++ or C with classes? Whenever is see people criticizing C/C++, I suspect they are doing C with classes style programming and (rightfully) hating that.
Re:One Year with Rust: I wrote a full featured application i... by coldtea on Saturday February 25, 2017 @08:11PM (#13735022)
>I suspect they are doing C with classes style programming and (rightfully) hating that.

Rightfully? People resort(ed) to "C with classes" to make C++ tolerable and/or reliable.

If anything, it's the opposite: when most people complain about C++ it's about C++ itself, the full language, and its whole baggage of features and their obscure interactions and intricacies. Not about using C++ as C with classes.

Re:One Year with Rust: I wrote a full featured application i... by flohofwoe on Sunday February 26, 2017 @05:56AM (#13736652)
Using C++ as "C with classes" with some carefully selected new features is an absolutely fine subset of the C++ language and IMHO the only way to circumvent the mess that C++ has become. The problems are the huge pile of cruft that has accumulated over the years in the std library, the boost-over-engineering approach, and the unfocused development of the language (instead of cutting the cruft down new standards add random new features on top of the existing mess). The current 'shiny new languages' will probably look the same in 30 years though.
Re:One Year with Rust: I wrote a full featured application i... by un008 on Saturday February 25, 2017 @01:42PM (#13733038)
stop the hype, please.