Live data from Hacker News

Announcing Rust 1.0 Alpha

blog.rust-lang.org

211–220 of 255 posts

Re: Announcing Rust 1.0 Alpha

#211
post #202

Earlier quoted context omitted.

Well, the first two are really just the same thing :P

Eh, with the new oprhan/impl rules associated and uh... not... associated(...?) types have developed quite a schism.

Well, the first two confusingly change two variables at once: the things that are the same (which I presume is what kimundi meant) are

    fn foo>(elem: T) { ... }

    fn foo(elem: T) where T: MyTrait { ... }
and

    fn foo>(elem: T) { ... }

    fn foo(elem: T) where T: MyTrait { ... }

Re: Announcing Rust 1.0 Alpha

#212
post #152
post #120

Pretty nice! I mostly used Rust Nightly till now. The language, the ecosystem, etc. seems really mature now. I've been following language development for a while now. I've never seen something that is really a new language and is that far before 1.0 or in such a short time. The language developed rapidly, without sacrificing reinventing things, changing opinions a lot. I am not sure how they did that, but it's really…

I'm sure that developing a large application (Servo) in parallel with the language helped quite a bit.

To be fair, rustc is also a pretty huge application that they (and any self-hosted language) developed in parallel with Rust :D

(I'm pretty sure I remember hearing that rustc has more code at this point then servo does, but don't quote me on that)

Re: Announcing Rust 1.0 Alpha

#213
post #69

The one thing that would put rust over the top right now is something along the lines of gofmt - something simple, with zero configuration, that can be run on commit or even save.

Ugh. I hate gofmt. It's a good idea in principle, but even with "go" there are times when you want things spaced out to align columns, or hide a distracting error handling case on one line (instead of making it take 3 lines of precious vertical screen real estate). I find gofmt to be too opinionated about certain things and I will never use it for my go programs.

I absolutely love go fmt. It's got me spamming ctrl+s in sublime text so much. Everything is clean and uniform.

Re: Announcing Rust 1.0 Alpha

#214
Does anyone know of the Rust Book is available in epub format?

Or, if not, but if it's still possible to build one from source, what are the required dependencies I have to install to be able to build the epub?

Re: Announcing Rust 1.0 Alpha

#215
post #150
post #144

Earlier quoted context omitted.

Whether it's called indent, gofmt or Visual Source Formatter 2051 doesn't really change its availability. Nor does it really matter a lot how much of the source is munged -- every forced change is probably annoying to someone. The main issue for me is that your code reviwer isn't looking at the code from my company. So why should I give a damn what they think about how spaces around the parens of a function call shou…

I think you're kind of missing the point. The point isn't to have a "house" style, it's to have an "everything" style. Making it optional or configurable defeats the purpose.

Indeed, I am missing said point. Version control snafus aren't really an issue outside of my project, so it all comes to the endless repetition of "bikeshedding".

All kept equal by hatchet, ax and saw…

Re: Announcing Rust 1.0 Alpha

#216
post #165
post #145

Earlier quoted context omitted.

It's good enough when you can configure it and apply it selectively. If I want to clean up a function in my code base, I can e.g. select it and run "perltidy" over it, which has a configuration dot file for the company code standard (or CPAN guidelines etc.). Or just clean up some nags so that version control behaves better. But if the only option is not running it at all or having all the code automatically fit to w…

It's irksome when the auto formatter does something ugly. Though, I think the issue is far worse with Perl tidy. With, gofmt my view is more "I don't like this bit but fuck it." Probably because, Go has much simpler syntax.

Both languages (being bastard children of C) often run into exactly the same problems, where the syntax doesn't differ greatly. If you e.g. are accustomed to having indentation without tabs, margins within function calls or prefer non-tabular variable declarations, you can have that in C, Perl, Pike, Java, etc..

Re: Announcing Rust 1.0 Alpha

#217
post #14

Earlier quoted context omitted.

The upside to a batteries-included stdlib is, of course, that you don't have to go fishing around for the best lib to do $WHATEVER_PARTICULAR_TASK, and you also don't have to wonder whether whatever lib you eventually choose will be abandoned by its developer next month. At such a young stage of language development, I agree that it makes more sense to let the community develop libraries in order to foster competitio…

I think the stdlib is not the way to go. Give me an example of any ecosystem where the standard library is the defacto best solution? But would agree that the only thing Rust might need are officially supported crates, while keeping the language itself fully separate. The language is then completely free of the hastles of maintaining a stdlib that probably isn't used by most people anyway. But at the same time offici…

"Best" always depends on your criteria. Very often, the standard library is a "good but not best" solution from a pure performance or features point of view. However, it often wins for ease of deployment (nothing to install), ease of maintenance (the project is not likely to be abandoned), documentation, and standardization.

IMHO, C++ in an example where the standard library (and its laboratory, boost) is often a very good solution for the few things it covers. It's standardized, well-documented, and not that bad from a performance point of view (of course, it's not perfect).

In addition, you expect your newly hired developers to know the standard library, but not every small libraries from github...

Re: Announcing Rust 1.0 Alpha

#218
post #69

The one thing that would put rust over the top right now is something along the lines of gofmt - something simple, with zero configuration, that can be run on commit or even save.

This makes me thinking, since world of coding has already reached the point of using zero-configuration fully automated code formatting tools on save/commit, why not make the final logical step — enforce coding style by language syntax, and be done with almost all extra burden of coding conventions.

Right now almost every company and even separate teams develop their own coding conventions document and configure their tools and infrastructure for it. But if all programmers agree that "coding style does not matter as long as it's consistent" and every one is willing to accept a project's coding style when joining that project, why not pick one style for all and put it into programming languages themselves. I imagine a lot of paperwork and human time would be saved.

Re: Announcing Rust 1.0 Alpha

#219

Earlier quoted context omitted.

Could you post the Scala version as well, for comparison?

Sure: https://github.com/iamdanfox/QwirkleSolver The Rust version has had some algorithm improvements to reach 0.015s, but it was conceptually identical when it was solving in 0.7s.

Obviously this is mostly for kicks, but there's a lesson in the 45x speedup improving the algorithm vs the 4x improvement changing technologies. :)

Re: Announcing Rust 1.0 Alpha

#220

Earlier quoted context omitted.

> I think the stdlib is not the way to go. Give me an example of any ecosystem where the standard library is the defacto best solution? Python, Go, C++'s STL, Java SDK, to name a few. They might not be 100% perfect, but they are good and reliable, and always there for you. Hunting the latest "best" library that gets abandoned after a year (like in Javascript and Ruby often happens, and also Go too) gets old quickly.…

Woah, that's like a list of what not to do with standard libraries, particularly python. Have you seen the datetime module? httplib? Even go has it's weird databases module. I think is a good example. It gets the job done, its minimal and simple. That's what a standard library should be.

> I think is a good example. It gets the job done, its minimal and simple.

It also routinely takes null-terminated strings without pairing it with a size parameter.

Post reply on HN