News for hackers. Stuff that matters.
Re:Rust 1.48 by 0-_-0 on Thursday November 19, 2020 @10:37AM (#25150547)
Not directly related, but when I was learning programming back in highschool (before the Internet) what made it easy was the built in help in Turbo Pascal. You could press F1 over any function or keyword and you were given a detailed description and example of usage. Learning C later using the K&R book and Google was a huge downgrade. Even today I think that language help built into the IDE should be a basic functionality.
Re:Rust 1.48 by identity0 on Thursday November 19, 2020 @12:30PM (#25151894)
In vim if you press K it will bring up the man page for the word under your cursor. It was very useful when learning C, considering that most libc functions have helpful man pages.
Re:Rust 1.48 by imron on Thursday November 19, 2020 @04:06PM (#25154358)
Note for people trying this at home, vim is case sensitive.

I still regularly use this feature to look up libc and other things. You can also type 2K to go to ‘man 2’, or 3K to go to ‘man 3’ etc.

Re:Rust 1.48 by JNRowe on Thursday November 19, 2020 @06:18PM (#25155533)
And for the sake of completeness, it is not just for man pages either. vim simply calls 'keywordprg' with the word under the cursor, so you can use whatever you feel like. Open a browser tab on your favourite documentation, display an ERD, pop open a picture of a kitten, …

Many filetype plugins come with pre-configured 'keywordprg' settings. Including some non-programming filetypes like git which will execute `git show <word>`, which is great if you're the type of person who often references commits in other commit messages.

Re:Rust 1.48 by imron on Friday November 20, 2020 @05:23AM (#25159083)
TIL. This will make this feature even more useful than I already found it.
Re:Rust 1.48 by Boulth6 on Thursday November 19, 2020 @01:52PM (#25152958)
I've seen that with Delphi. The unique factor was that the examples were not a basic call of the function but an actual real world practical sample that usually solved the problem one was looking for.
Re:Rust 1.48 by geoelectric on Thursday November 19, 2020 @05:17PM (#25155035)
I was a Delphi programmer for a few years, professionally, when it first came out in the 90s. I worked with their developer products (and for Borland directly on Delphi/Kylix/C++Builder, eventually) until the mid-2000s. I've never seen the match of Borland's docs, before or since, particularly as integrated with the IDE's coding features.

There are a number of programming languages and APIs with excellent documentation, but theirs were above and beyond.

Re:Rust 1.48 by pkphilip on Friday November 20, 2020 @06:25AM (#25159407)
The Delphi IDE help was good but the printed Delphi manuals were just outstanding. I have fond memories of learning much through those manuals.
Re:Rust 1.48 by geoelectric on Saturday November 21, 2020 @03:45AM (#25168542)
I had forgotten the “brick” you used to buy with a few CDs (or floppies) and a whole stack of books.

Things sure were heavy before the internet got fast.

Re:Rust 1.48 by pjmlp on Friday November 20, 2020 @08:11AM (#25160113)
I have them in print still, including the MS-DOS ones (TP), if you don't have them any longer, they are available at bitsavers.
Re:Rust 1.48 by rudedogg on Friday November 20, 2020 @12:14AM (#25157501)
Re:Rust 1.48 by LandR on Thursday November 19, 2020 @11:48AM (#25151343)
This is done quite nicely with clojuredocs being intergrated into Cursive / Intellij.

I hover over a Clojure function in INtelliJ and I get a pop up of the clojuredocs with description and example usages for that function.

It's great and I don't know why more IDE's don't do this. Why isn't VS linked to the MSDN for C# / .NET ? SO I can get the information for that function / class / library etc straight in my IDE!

Re:Rust 1.48 by trevyn on Thursday November 19, 2020 @11:54AM (#25151426)
Bringing it back, this works great with Rust and VSCode and rust-analyzer: Any function in any crate shows its doc comment complete with markdown formatting when you hover over it.
Re:Rust 1.48 by CryZe on Thursday November 19, 2020 @04:15PM (#25154445)
And you can assign a hotkey to open the docs in the browser for the symbol under the cursor.
Re:Rust 1.48 by erk__ on Thursday November 19, 2020 @02:59PM (#25153689)
This is one of the things I love about Mathematica, it has a lot of documentation about every keyword and function that you can open with F1.
Re:Rust 1.48 by heavenlyblue on Saturday November 21, 2020 @04:40AM (#25168711)
You could do the same with C in Visual Studio for at least 15 years now
Re:Rust 1.48 by 0-_-0 on Saturday November 21, 2020 @05:23AM (#25168863)
That requires an internet connection and opens a page in your browser.
Re:Rust 1.48 by pjmlp on Saturday November 21, 2020 @07:15AM (#25169288)
Nope, because one would install the MSDN documentation locally from the bundled CDs and use Windows help infrastructure.

The Web version came much later.

Re:Rust 1.48 by 0-_-0 on Saturday November 21, 2020 @07:37AM (#25169359)
Which means that currently it requires an internet connection and opens a page in your browser.
Re:Rust 1.48 by pjmlp on Saturday November 21, 2020 @07:48AM (#25169402)
Re:Rust 1.48 by 0-_-0 on Saturday November 21, 2020 @09:02AM (#25169766)
Have you actually tried that? I just installed it and it's just a buch of help files that link to the web. F1 continues to work the same way, bringing up websites, often useless ones like this one for a for loop:

https://docs.microsoft.com/en-us/dotnet/api/microsoft.codean...

Re:Rust 1.48 by pjmlp on Saturday November 21, 2020 @03:21PM (#25172498)
Have you installed the Help Viewer and configured as advised?
Re:Rust 1.48 by 0-_-0 on Saturday November 21, 2020 @03:35PM (#25172570)
I got it working now, but it's still often giving nonsensical answers for simple queries like a for loop.
Re:Rust 1.48 by gtrhtrhtrhtr on Thursday November 19, 2020 @06:48PM (#25155825)
I've seen this with bpython