News for hackers. Stuff that matters.
Re:DevDocs API Documentation by marceldegraaf on Thursday October 19, 2017 @10:19AM (#15508087)
Reminds me of Dash[1] which is especially useful when configured in your editor: press a key to open documentation for the word under the cursor.

1: https://kapeli.com/dash

Re:DevDocs API Documentation by rgrau on Thursday October 19, 2017 @10:41AM (#15508310)
If you live inside emacs, https://github.com/areina/helm-dash/ will use dash documentation and use emacs for the search and display of the docs.

Also, works on GNU/Linux and Windows. Also, free software. Also, I'm the co-author.

Re:DevDocs API Documentation by blaenk on Thursday October 19, 2017 @08:57PM (#15512816)
I saw this a while back and it seemed amazing but I was wondering if there's any way to open the actual live documentation page. So for example if you choose the documentation for `Array.prototype.map` then it'll pull up that page on MDN, rather than the locally cached Dash page.

I know the whole point of Dash is to have locally cached, offline documentation copies, but I was thinking it would be amazing to use that to feed Helm candidates, but actually open the real, live documentation page.

Re:DevDocs API Documentation by rgrau on Friday October 20, 2017 @07:23AM (#15514885)
you definitely can do it because the only thing that is in the docsets is a uri starting with https?:// or file:/// .

It seems there are some docsets already doing that[1]. Creating your own docsets is dead easy. just a simple sqlite3 file with a single table.

You can find an example I hacked myself here[2] (very hackish).

It's basically creating a table:

    create table searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT); 
    CREATE UNIQUE INDEX anchr  ON searchIndex (name, type, path);
And filling it with data:

    insert into searchIndex(name,type,path) VALUES ('foo','function','https://example.com')


[1]. https://github.com/areina/helm-dash/issues/65 .

[2]. https://github.com/kidd/AllegroLisp.docset

Re:DevDocs API Documentation by kornish on Thursday October 19, 2017 @01:22PM (#15509728)
This is awesome - thanks for sharing your work!
Re:DevDocs API Documentation by pagnol on Thursday October 19, 2017 @10:55AM (#15508436)
This is great, thank you very much!
Re:DevDocs API Documentation by kaushalmodi on Friday October 20, 2017 @07:55AM (#15515033)
But isn't Dash just for Mac?
Re:DevDocs API Documentation by rgrau on Friday October 20, 2017 @08:18AM (#15515150)
yup, "also" meaning "in addition". Dash is not free either, and I'm not its coauthor
Re:DevDocs API Documentation by kaushalmodi on Friday October 20, 2017 @08:38AM (#15515257)
Of course, "also" means "in addition". I was wondering what I'd do with helm-dash on GNU/Linux if Dash is only for Mac.

The helm-dash repo tagline on GitHub says "Browse Dash docsets inside emacs", so I quickly dismissed it as I don't use Mac.

Reading a bit further, now I see that it doesn't need Dash to be installed. So that's great! I'll see if an ivy/counsel version is out there.

Re:DevDocs API Documentation by rgrau on Friday October 20, 2017 @09:03AM (#15515406)
Ah yes, sorry, I missunderstood your question :).

Yep, helm-dash can download docsets from dash servers and use them without the need of Dash whatsoever.

https://github.com/nathankot/counsel-dash .

Enjoy!

Re:DevDocs API Documentation by epicide on Thursday October 19, 2017 @11:48AM (#15508908)
This was my first thought, as well. I use Dash several times a day. It has been indispensable for me.

There are a few main things that will probably keep me on Dash, for the time being. In no particular order:

1. Global shortcut - Being able to quickly show-search-hide from anywhere is extremely useful for me. I can quickly refresh myself on the syntax of an uncommon function. The faster I can do that, the less likely I am to break my flow.

2. Support for random/obscure projects - On top of community-added docs, Dash lets you point it at any random GitHub project and it will pull down the README. This has come in handy plenty of times for me when using small tools and components. Sure, it's not as nice as full documentation, but it's nice having that README searchable in the same place and offline (see reason #1).

3. Docsets - Dash lets you define groups of frameworks (etc.) and name them. You can even specify which version of a framework to use in the docset. This allows me to tailor my results to a particular stack, depending on which project I'm currently working on.

EDIT: I should read :)

Re:DevDocs API Documentation by heartbreak on Thursday October 19, 2017 @12:36PM (#15509382)
The Dash author engaged in unethical practices and then attacked Apple when they closed his account.

http://www.loopinsight.com/2016/10/10/apple-responds-to-dash...

Re:DevDocs API Documentation by crispinb on Thursday October 19, 2017 @04:32PM (#15511317)
This a most irresponsible post. The situation was somewhat complex and not easy for outsiders to parse out of the crossfire. You state one side's position as fact, quoting only one highly tendentious Gruberish Apple protagonist in support. Is this how fairly you'd like to be treated in public if you got into a spat with a major company? Please have a little thought for the welfare of others before you type.

In any case, it's water long under the bridge now, and Dash is an excellent app used my many developers (including within Apple). Trying to poison the well is in pretty bad taste.

Re:DevDocs API Documentation by fastball on Friday October 20, 2017 @06:42AM (#15514772)
Doesn't seem like a particularly complex case to me.

Facts not up for debate: the developer of Dash enrolled two accounts in the ADP with the same credit card, and these accounts shared at least one test device. One of these accounts participated in obvious fraudulent activity.

Unfortunately, nobody is around to corroborate Bogdan's side of the story. As far as we know, Bogdan made up his supposed relative/friend (ala "I didn't send that embarrassing text to my crush - it was my asshole friend!") to escape blame. And even if his side of the story is true, how is he not partially culpable for the fraud? By enrolling an account with his credit card and giving it to someone else, he enabled them to commit fraud on the App Store. If I buy a gun and give it to my brother and he shoots someone, am I not partially responsible for that outcome?

It's not quite damning enough for me to not use Dash, but it doesn't exactly give me faith in Dash's developer either.

Re:DevDocs API Documentation by ravishi on Thursday October 19, 2017 @01:23PM (#15509738)
What? That link doesn't have any proof that "the Dash author has engaged in unethical practices". Neither any other link I could find about the whole controversy. Actually, everyone seems to be saying things are complicated, what seemed to be true actually wasn't, it's hard to take sides, etc:

https://daringfireball.net/2016/10/apple_dash_controversy

Re:DevDocs API Documentation by heartbreak on Thursday October 19, 2017 @01:50PM (#15509980)
Gruber makes it pretty clear in your link that the author of Dash engaged in unethical practices, just not with the Dash app (or the account used to publish Dash). Heck, publishing the phone call alone is unethical, regardless of any of the alleged app review behavior.
Re:DevDocs API Documentation by namelost on Thursday October 19, 2017 @02:43PM (#15510492)
I think you or the mods should remove your comments because they are potentially defamatory. There is indeed no evidence that the Dash author himself was responsible, he says it was a family member.
Re:DevDocs API Documentation by heartbreak on Thursday October 19, 2017 @02:57PM (#15510609)
“Almost 1,000 fraudulent reviews were detected across two accounts and 25 apps for this developer so we removed their apps and accounts from the App Store,” Apple spokesperson, Tom Neumayr

They’re allegations, sure. I said that in my second comment. But Tom didn’t hedge his words there.

Re:DevDocs API Documentation by ravishi on Thursday October 19, 2017 @03:51PM (#15511036)
Well, what is clear to me is that another account, not Dash's author's, engaged in unethical practices. The author said it was a family member, but I can't verify that, so it is still unclear.

Publishing the phone call was kinda dumb, yeah, but it's still pretty far from "engaging in unethical practices". It seems more like a guy feeling cornered, acting under pressure and making bad decisions.

Re:DevDocs API Documentation by ihuman on Thursday October 19, 2017 @01:13PM (#15509661)
Dash is back on the iOS app store[1], so they probably worked out the issue

[1] https://blog.kapeli.com/dash-for-ios-back-on-the-app-store

Re:DevDocs API Documentation by semanticfact on Thursday October 19, 2017 @02:10PM (#15510175)
I found it slow. Also, just remembering this now but I came in to work one morning only to be questioned as to why I was downloading GBs of data while I was out of the office. I guess Dash was refreshing the local copy of all the docs every night. Uninstalled it right away.
Re:DevDocs API Documentation by heyoni on Thursday October 19, 2017 @10:28PM (#15513158)
Slow? It's insanely fast on my 6 year old desktop and doesn't download "gigs" of docs every night...also, what kind of workplace monitors individuals net usage then gets upset at them for downloading "gigs" when their job is to program.
Re:DevDocs API Documentation by majewsky on Thursday October 19, 2017 @10:28AM (#15508194)
"Shift+K" does the same in vim. However, it looks for a manpage matching the word under the cursor, so it won't help you unless you're doing C or Perl.
Re:DevDocs API Documentation by a_bored_husky on Thursday October 19, 2017 @11:24AM (#15508680)
`K` in vim uses the program defined in `keywordprg` which is `man` by default, but can be set to whatever you want according to the file type.
Re:DevDocs API Documentation by gry on Thursday October 19, 2017 @12:03PM (#15509071)
Remapping `K` to devdocs.vim is quite handy.

https://github.com/rhysd/devdocs.vim

Re:DevDocs API Documentation by a_bored_husky on Thursday October 19, 2017 @12:31PM (#15509341)
I use dasht[1] and vim-dasht[2] but that looks nice.

[1]https://github.com/sunaku/dasht

[2]https://github.com/sunaku/vim-dasht

Re:DevDocs API Documentation by raresp on Thursday October 19, 2017 @10:28AM (#15508186)
Yes, but this is free and more complex.
Re:DevDocs API Documentation by irrational on Thursday October 19, 2017 @12:19PM (#15509240)
More complex or more complete?
Re:DevDocs API Documentation by padiyar83 on Thursday October 19, 2017 @10:27AM (#15508180)
But you pay for Dash subscription, this one seems to be free.
Re:DevDocs API Documentation by Thibaut on Thursday October 19, 2017 @10:28AM (#15508196)
And open-source :) (https://github.com/Thibaut/devdocs)

Disclaimer: I'm the maintainer of DevDocs

Re:DevDocs API Documentation by alceta on Thursday October 19, 2017 @10:44AM (#15508339)
Well then let me thank and congratulate you for your efforts in building this.

As a long-time dash user in the past, devdocs felt like home and just works nicely and without any unnecessary features.

Re:DevDocs API Documentation by speps on Thursday October 19, 2017 @10:58AM (#15508463)
Is Elm support planned?
Re:DevDocs API Documentation by myfonj on Thursday October 19, 2017 @01:12PM (#15509652)
For `is * planned` refer to https://trello.com/b/6BmTulfx/devdocs-documentation. (Elm is in "To Do".)
Re:DevDocs API Documentation by no_wizard on Thursday October 19, 2017 @10:40AM (#15508297)
You pay for the software but it’s not a subscription. Just to clarify.

For what it’s worth on Linux the open source alternative is Zeal

https://zealdocs.org/

Re:DevDocs API Documentation by a_bored_husky on Thursday October 19, 2017 @11:26AM (#15508700)
And dasht for the terminal

https://github.com/sunaku/dasht

Re:DevDocs API Documentation by copperx on Thursday October 19, 2017 @01:26PM (#15509764)
Subscription? Dash is not subscription based.