News for hackers. Stuff that matters.
Re:Announcing Rust 1.7 by SneakerXZ on Thursday March 03, 2016 @04:09PM (#11220059)
I wish Rust team invested more into tooling and maybe introduced officially supported IDE because at the end tooling is more important than the language itself. Java is not the best language but it obvious choice for many people because of its IDE integration.
Re:Announcing Rust 1.7 by gnuvince on Thursday March 03, 2016 @06:06PM (#11220777)
> maybe introduced officially supported IDE

I would much rather they don't do that and instead offer tools that can answer IDE-like queries (e.g. "Who calls this function?", "Where is this identifier defined?", etc.) and let people integrate that into Emacs, Vim, Atom, and other editors and IDEs. This brings all the communities together and doesn't dictate one particular tool over all others.

Re:Announcing Rust 1.7 by 0xFFC on Thursday March 03, 2016 @06:42PM (#11220940)
They have :

https://www.rust-lang.org/ides.html

>We propose a new tool, an 'oracle' which takes input from the compiler, maintains a project-wide view of the code and it's type information, and provides data about the project to IDEs and other tools. The oracle is a long-running daemon and presents an API via IPC.

Which is great idea. But it is not implemented yet (AFAIK).

personal opinion : Rust with this pace, will be absolutely one of the best language in term of usage/tools in next 5 year.

Re:Announcing Rust 1.7 by airplane on Saturday March 05, 2016 @05:46PM (#11231453)
Similar to that, I really like how in Intellij I can can use my Maven and Gradle build script as the IDE project's property file. I can now have my source checkout not include any helpful IDE specific files, but still have the project be instantly imported into an IDE.
Re:Announcing Rust 1.7 by agentgt on Thursday March 03, 2016 @05:18PM (#11220504)
Speaking from someone who uses Java everyday and has built a company that mainly uses Java I can tell you the Java tooling is fairly irritating (and I like Java).

Java doesn't have really good canonical tools that ship with the JDK nor is there a necessarily an industry preferred choice (Javadoc is probably the only exception). This of course includes more than just build tools. The fragmentation is huge.

For example Java doesn't have a defined format tool like gofmt or rustfmt nor does it have a preferred build/dep system like crate (there are several ... maven, gradle, ant). Even more annoying is that unlike code completion and refactoring tools (Rust racer) for Java are tightly coupled with the IDE and there are really only two choices: morbidly obese and broke: Eclipse or trust fund expensive but works: intellij.

With Racer you can use whatever editor or IDE you like. I wish I had something like that for Java.

Re:Announcing Rust 1.7 by snuxoll on Thursday March 03, 2016 @06:27PM (#11220865)
> trust fund expensive but works: intellij.

I think calling IntelliJ "trust fund" expensive is rather extreme. My company pays substantially more for my Visual Studio license than I do for my personal JetBrains All-Products subscription, $150/yr (which breaks down to $12.50/mo) saves me far more than 5 hours of time between all the work I do in IntelliJ, DataGrip, PyCharm, WebStorm and soon Rider (7 seconds to open a solution that takes Visual Studio 30 seconds to load and without the constant lockups - now I just need it to be able to run/debug ASP.net apps and run NUnit tests).

Re:Announcing Rust 1.7 by agentgt on Thursday March 03, 2016 @06:46PM (#11220954)
Yes I was sort of exaggerating because it is the main complaint that people have of intellij.

We too use intellij as well jrebel and these tools pay for themselves fairly quickly.

Re:Announcing Rust 1.7 by sitkack on Friday March 04, 2016 @08:09AM (#11223469)
IntelliJ is free as in beer and speech (Apache Licensed) for the Community Edition.
Re:Announcing Rust 1.7 by pcwalton on Thursday March 03, 2016 @04:30PM (#11220199)
We do invest a lot into tooling. There just hasn't been a huge amount of work put into IDE integration yet. There's lots of other types of tooling: Cargo, rustfmt, clippy, Racer, good error messages…
Re:Announcing Rust 1.7 by yazaddaruvala on Friday March 04, 2016 @12:11AM (#11222152)
The only "critical" thing missing from this list would be a rustfix. Sadly, this is probably only worth it once the AST/compiler plugins are stabilized.
Re:Announcing Rust 1.7 by pcwalton on Friday March 04, 2016 @01:06AM (#11222316)
Well, rustfix is useful when we're breaking code, but we aren't doing that anymore, other than deep soundness fixes in the type system which would be very hard to automate a solution to.
Re:Announcing Rust 1.7 by kibwen on Thursday March 03, 2016 @04:52PM (#11220339)
As others have mentioned, we have lots of tooling that isn't specific to any IDE. For more information about IDE support in Rust, see this page: https://www.rust-lang.org/ides.html

TL;DR: There exist Rust plugins for Eclipse, IntelliJ, Visual Studio, Atom, Emacs, Sublime Text, Vim, and VS Code.

We're also working on ways to improve the compiler to better support the IDE use case: https://github.com/rust-lang/rfcs/pull/1317

Re:Announcing Rust 1.7 by SneakerXZ on Thursday March 03, 2016 @05:08PM (#11220442)
I have followed https://areweideyet.com/ and picked Atom and it is far from what I would like.

I will try to give another chance to Rust in half year and see if it improved.

But I would suggest to look at Swift SourceKit https://github.com/apple/swift/tree/master/tools/SourceKit or OmniSharp http://www.omnisharp.net/ SourceKit provides really nice Swift support in Xcode. If you can deliver same thing built on top of VSCode, Intellij IDEA with integrated debugger, I am sold.

Re:Announcing Rust 1.7 by jhasse on Thursday March 03, 2016 @06:50PM (#11220976)
What was missing for you in Atom?
Re:Announcing Rust 1.7 by SneakerXZ on Friday March 04, 2016 @08:23AM (#11223532)
I would like to see:

- Be able to see inferred type

- Be able to see documentation for types and methods

- Better auto completion was sometimes suggesting non senses and after selecting it placed a cursor on wrong place

- Integrated debugger

- Go to definition (including Rust std)

- Syntax checking

- Integrated formatter

Re:Announcing Rust 1.7 by jhasse on Friday March 04, 2016 @09:53AM (#11224062)
The last three points on your list work in Atom :)

> - Be able to see inferred type

https://github.com/phildawes/racer/issues/304

> - Be able to see documentation for types and methods

https://github.com/phildawes/racer/issues/415

> - Better auto completion was sometimes suggesting non senses and after selecting it placed a cursor on wrong place

Seems like a bug, never experienced this myself though.

> - Integrated debugger

I'm currently using nemiver and atom-gdb to set breakpoints from within Atom and launch nemiver. But you're right: A great integrated debugger would be awesome :)

> - Go to definition (including Rust std)

This works with atom-racer: Ctrl+Shift+P and type "racer find definition"

> - Syntax checking

https://atom.io/packages/linter-rust

> - Integrated formatter

https://github.com/rust-lang-nursery/rustfmt/blob/master/ato...

Re:Announcing Rust 1.7 by SneakerXZ on Friday March 04, 2016 @11:49AM (#11224967)
Thanks for the reply!

> This works with atom-racer: Ctrl+Shift+P and type "racer find definition"

Nice, unfortunately it works only for my methods and not for std.

> - Syntax checking

Oh, you right, I got wrong path to Cargo so it didn't work out of box but still it is not like you have it in IDE and you don't see errors as you type but you need to save.

> - Integrated formatter

Cool, thanks!

Re:Announcing Rust 1.7 by jhasse on Friday March 04, 2016 @05:41PM (#11227346)
> Nice, unfortunately it works only for my methods and not for std.

That's strange. It works for me for std, too. Have you set RUST_SRC_PATH?

Re:Announcing Rust 1.7 by dragonwriter on Thursday March 03, 2016 @05:04PM (#11220412)
> I wish Rust team invested more into tooling

Among similarly new language, I think the strength of the tooling is one of the notable positives of Rust.

> and maybe introduced officially supported IDE

While I get that some programmers prefer IDEs and that IDEs might actually be generally preferable for some Rust use cases, I think there is a lot more utility in the Rust team focusing on lower-level tooling (which IDE and enhanced-editor-plugin developers can leverage) rather than focusing on an officially supported IDE.

Re:Announcing Rust 1.7 by alkonaut on Friday March 04, 2016 @02:50AM (#11222543)
> I think there is a lot more utility in the Rust team focusing on lower-level tooling

Agreed, I hope that a good "Language service" API is on the horizon, so that tool authors don't need to reinvent the wheel in order to support parsing, error display, highlighting, completions and so on.

A step in the right direction is the possibility of getting machine-readable (json) error messages from the compiler.

Being able to just call the compiler as a library to produce AST's from source would be very handy, though it would probably complicate the compiler to be able to provide useful output from broken/incomplete source, which is critical for tool use.

Re:Announcing Rust 1.7 by GolDDranks on Friday March 04, 2016 @03:36AM (#11222672)
That'd be great to have and I think we'll see one in the future. No idea about the timeframe though.
Re:Announcing Rust 1.7 by alkonaut on Friday March 04, 2016 @04:26AM (#11222804)
It's being worked on, but it will be a bumpy road if the compiler simultaneously is going to be made more incremental.

https://github.com/rust-lang/rfcs/pull/1317

Nim does a good job with their IDE support

http://nim-lang.org/docs/idetools.html

Re:Announcing Rust 1.7 by steveklabnik on Thursday March 03, 2016 @04:11PM (#11220067)
We have been working hard and investing a lot into tooling, it's just not done yet. https://www.rust-lang.org/ides.html is a rough outline of what's in the pipeline for IDEs specifically.
Re:Announcing Rust 1.7 by wyager on Thursday March 03, 2016 @04:15PM (#11220093)
>tooling is more important than the language itself

What makes you say this? Many programmers don't use IDEs or anything.

Re:Announcing Rust 1.7 by DasIch on Thursday March 03, 2016 @04:18PM (#11220115)
You don't use any tools for package management, documentation, linting, testing and debugging?
Re:Announcing Rust 1.7 by untothebreach on Thursday March 03, 2016 @04:25PM (#11220165)
I think the conflict here is that, for the "non-IDE" programmer, Rust's tooling is best-of-class (IMO). If your idea of an ideal programming environment is running vim/emacs/sublime/atom and maybe a terminal, Rust's tooling is great.

However, some programmers like an IDE more. Which is fine, but for this type of programmer, Rust still has a long way to go. There are some immature plugins for existing IDEs, and even a couple "rust-specific" IDE projects, but nothing near what (say) Java or C# have.

Re:Announcing Rust 1.7 by tatterdemalion on Thursday March 03, 2016 @04:41PM (#11220273)
As a vim user I can attest to this. Rust tooling is better for me than any other language I have ever used. Only thing I ever wish for is a REPL, which is a big ask for a language like Rust.
Re:Announcing Rust 1.7 by indiv0 on Thursday March 03, 2016 @05:11PM (#11220456)
While it's not official, rusti[1] by murarth is a functioning Rust REPL. IIRC, it's used to drive the Rust Playground[2] (don't quote me on that).

[1]: https://github.com/murarth/rusti [2]: https://play.rust-lang.org/

Re:Announcing Rust 1.7 by tatterdemalion on Thursday March 03, 2016 @05:30PM (#11220570)
Rusti isn't 'there yet,' unfortunately. It is forced to recompile the entire project for every line entered. Aa far as I know I also can't do things like set 'breakpoints' that will pause execution and drop me into the REPL, like Ruby's binding.pry.

This is a very hard feature for compiled languages, its just a con of this execution model (which is has a lot of pros).

Re:Announcing Rust 1.7 by kibwen on Thursday March 03, 2016 @06:23PM (#11220851)
I believe the playground is just a well-sandboxed Rust compiler. It doesn't have any of the fancy features of a REPL, such as allowing you to refer to the state of prior runs.
Re:Announcing Rust 1.7 by kibwen on Thursday March 03, 2016 @04:47PM (#11220315)
Rust has tools for package management (Cargo), documentation (rustdoc), linting (clippy), testing (the built-in test runner), and debugging (gdb and lldb integration).

It also has tools for code completion (Racer), build orchestration (Cargo again), benchmarking (the built-in benchmark runner), compiler version management (multirust), and automatic source code formatting (rustfmt, though this one's a WIP).

Re:Announcing Rust 1.7 by cballard on Thursday March 03, 2016 @06:58PM (#11221015)
This is true. I tried to do something with Piston, but I couldn't figure out what the type of anything should be, because I could inspect functions to see what their parameter and return types were. I could follow examples, but they tended to use inline functions, which don't need to specify types.

In Swift you can just Cmd+Click to do this (assuming SourceKit hasn't crashed) and it's very useful for that kind of exploration.

Re:Announcing Rust 1.7 by scythe on Thursday March 03, 2016 @04:42PM (#11220279)
It took a long time for Java IDEs to not suck -- and complex GUI applications aren't exactly the open-source community's strong point.

The way forward on that front would require, IMO, some external actor to smell profit in a Rust IDE. That has been sloooowly becoming more likely as the stdlib inches toward stability.

Re:Announcing Rust 1.7 by SneakerXZ on Thursday March 03, 2016 @05:15PM (#11220484)
There are new languages with quite nice IDE support e.g. Swift or Kotlin.
Re:Announcing Rust 1.7 by dikaiosune on Thursday March 03, 2016 @05:37PM (#11220616)
Both of those examples are languages designed by IDE vendors, and their real IDE support comes from those vendors (Apple in the case of Swift, JetBrains in the case of Kotlin). It takes a bit longer when you can't just task an existing IDE development team to build your language support :). That said, I think that Rust has made fantastic progress towards IDE integrations so far.
Re:Announcing Rust 1.7 by ufo on Thursday March 03, 2016 @05:04PM (#11220415)
I'm not sure Javas is a bood benchmark to compare a young language against when it comes to IDE support...

That said, in my brief experience with rust I got the impression that their tooling is very high quality for something so new. Have you seen how pretty their compiler error messages are, for example?