

Show HN: Omniref - a better search site for Ruby documentation - timr
http://www.omniref.com

======
DanielRibeiro
Wow, it works with symbols:

[http://www.omniref.com/?q=+](http://www.omniref.com/?q=+)

[http://www.omniref.com/?q=[]](http://www.omniref.com/?q=\[\])

[http://www.omniref.com/?q=-](http://www.omniref.com/?q=-)

[http://www.omniref.com/?q=*](http://www.omniref.com/?q=*)

Quick tip: You have this tiny styling issue here:
[http://i.imgur.com/4uxUuPO.png](http://i.imgur.com/4uxUuPO.png)

~~~
timr
Urgh, thanks for the heads up. Making code blocks wrap correctly is non-
trivial. We'll add that to the bug list.

~~~
crashandburn4
Very nice. symbol hound just isn't that great so it's good that at least
rubydocs can be searched properly for that spaceship and stuff. aw, can't find
the stabby lambda, but at least you've got a nice 404 page :)
[http://www.omniref.com/?q=-%3E](http://www.omniref.com/?q=-%3E)

~~~
timr
We need to give more love to symbol search - most are fine, but the query
analyzer doesn't do well with all combinations. We'll add that one to the bug
list.

Glad someone found the 404 page, at least. ;-)

------
montanalow
Tim & I are planning to spend quite a bit more time on this, what do you other
devs want to see in documentation search? Full stack? Multi version? Comments?
Examples? IDE integration? What would make your life better?

~~~
derwiki
Enumerate options that are obscured by inheritance. For example, to look at:

[http://www.omniref.com/?q=cache_action](http://www.omniref.com/?q=cache_action)

I don't know what options are valid in `cache_action`. The "real" answer,
AFAICT, is to keep walking up the source code until you find the
AbstractWhatever that actually defines the options.

~~~
timr
Yeah, rails makes this as hard as possible to figure out, because everything
is done dynamically by Hash arguments. Maybe we can do something like like
link up the inheritance tree from the method?

------
latortuga
Anyone looking for functionality like this in a local, offline reference
should check out YARD[1]. I (embarrassingly) only recently set it up to serve
a set of my common gems and the ruby standard lib and it works and looks
great.

[1] [http://yardoc.org](http://yardoc.org)

~~~
timr
You should be careful with YARD -- we've found a number of bugs in it that
lead to broken/missing documentation. The ruby standard library, for example,
is missing huge chunks of its documentation if you use YARD instead of RDoc.

I very much wanted YARD to be a drop-in replacement for RDoc, but it's not
quite there yet.

------
treystout
I've always liked what Mercurial's docs were trying to do ([http://hgbook.red-
bean.com/read/customizing-the-output-of-me...](http://hgbook.red-
bean.com/read/customizing-the-output-of-mercurial.html)) by having comments at
every paragraph of their docs. It's done about 10% as well as it could be
though. You almost want stackoverflow style questions to link to direct
paragraphs or maybe even sentences.

Maybe overlaying something like rap genius' tools on existing docs is enough?

Looks really nice so far, but I don't use ruby so can't vouch for accuracy of
search etc...

~~~
dljsjr
This seems to be a Bryan O'Sullivan thing, as the online version of Real World
Haskell looks the _exact_ same.

[http://book.realworldhaskell.org](http://book.realworldhaskell.org)

------
mckaym
I also like APIdock. They show the version history of a method -
[http://apidock.com/rails/v3.0.0/String/camelize](http://apidock.com/rails/v3.0.0/String/camelize)

------
ufmace
I like the speed of the search and most of the layout. It could really use
some kind of Table of Contents for the current entry, though.

For more fanciful ideas, it would be neat if there was a way to add links to
particular paragraphs or sections so you can link to any relevant blog posts
or StackOverflow questions that explain the intricacies of something in more
detail. Especially if it was easy for readers to add them in themselves.

~~~
timr
We do have a ToC view for everything we index, it's just not totally obvious
how to get to it right now (from search, click on the header in the preview
window -- those links go to the view you want). For example:

[http://www.omniref.com/docs/ruby/stdlib/2.0.0-p247/classes/A...](http://www.omniref.com/docs/ruby/stdlib/2.0.0-p247/classes/Array.html)

That said, you're totally right about this needing to be more visible, and
we'll have something better for this in the next day or so.

 _" it would be neat if there was a way to add links to particular paragraphs
or sections so you can link to any relevant blog posts or StackOverflow
questions that explain the intricacies of something in more detail. Especially
if it was easy for readers to add them in themselves."_

We've had multiple requests for comments, so that's definitely going on our
short list of new features. Thanks for the feedback, and let us know if you
think of anything else.

------
znowi
Very nice. One note though. When I look for "puts", I get
OpenSSL::Buffering#puts when I'd expect Kernel#puts. "kind_of" gives me
RSpec::Mocks::ArgumentMatchers#kind_of. I think you should assign proper
weights.

~~~
timr
We've done a lot of work to weight things correctly (e.g. searching for
"inject" does what you'd expect), but we definitely need to do more work on
really common tokens like "puts".

We'll add those to our bad search list. Thanks for the feedback!

------
yale
Looking great. My only wish would be having a list of constants and methods in
the sidebar after selecting a class or module.

~~~
montanalow
Right now, the Table of Contents navigation is only visible on full
documentation pages, but I'm working on some javascript to make it work in a
nice way for the search results previews too. Also working on making it more
obvious how to get to the full doc pages as well.

------
endgame
Do you have an api? It would be nice to be able to make emacs do M-x ruby-
apropos foo and pick something.

~~~
timr
We don't, but that's an interesting idea...I'm an emacs user, too.

~~~
derwiki
Vim users also want :)

------
william_hc
Looks solid. Set it up with Alfred.app right away. Looking forward to
continued support!

------
Thibaut
Well done! I've also been trying to improve Ruby's documentation with DevDocs:
[http://devdocs.io/ruby/](http://devdocs.io/ruby/)

------
emmett
Improved crossreferences! The main problem with Rails docs today is that
methods mention other methods by name, but there's no way to jump directly to
that other method.

~~~
timr
It's pretty tough to always know the right method in the general case (e.g.
method from another module), but we think have some ideas that we're working
on that will greatly improve this.

If nothing else, we can trigger a search for methods with that name. We're
going to do that very soon, actually.

------
atmosx
Thank you, awesome, bookmarked :-)

------
YorickPeterse
Looks neat!

------
robblchen
Would be nice to have the logo as a favicon.

------
xacaxulu
Ohhhhhhhhhhhhhhhh yissssssssssssssssssss!

------
immad
Can you do this for Rails too?

~~~
montanalow
We've indexed every ruby gem, including rails.

~~~
moonie1
Is there some way I can view my own ruby project with this? like by pointing
it at my github repo url/ssh url?

~~~
timr
If your gem is published, we'll pick it up automatically during the next index
run. If not, we're thinking about adding the ability to index public repos --
but private ones are longer-term. What do you need?

------
mikeruby
pretty sweet!

