Today's wish is for folks – and by folks I mean me – to stop using Web search for programming language docs when I can get that info via CLI.
-
@randomgeek man would love that for node/js
-
-
@randomgeek oh shit am I gonna have to jump to demo?!
-
@genehack I hear they've improved Node.js compatibility.
-
@genehack Last time I directly poked at Deno, using Node modules was just a flat "no."
-
@randomgeek `man 3 $func` for any C standard lib stuff. Doesn't get better than that.
-
@m Is there a
man
invocation for header file docs? Like, after a bit of fiddling I found thatrandom()
comes fromstdlib.h
, part of the standard C librarylibc
.Is there
man ?? stdlib.h
orman ?? libc
? -
@randomgeek uh... not that I know of. I tend to just open the header at that point though, so maybe there is and I haven't found it...
-
Random Geekreplied to Micah last edited by [email protected]
@m This is probably where I'd pull out Dash or a similar tool, if discovery through documentation was my goal.
With
go doc
andpydoc
I often start my browsing at the package level, derived from the ancient muscle memory ofperldoc Package::Name
.I've made some serendipitous discoveries with that approach though, so I prefer tooling to support it.
-
@randomgeek pydoc is incomplete, unfortunately. It's pulling from docstrings only, but lots of Python stdlib doc is not in docstrings; it's in the source rST files. e.g. compare `pydoc urllib.parse` with https://docs.python.org/3/library/urllib.parse.html. What pydoc see is often wholly different (and lesser) documentation.
Perl's got us spoiled, frankly.
-
@trs Agreed on the Perl spoiling. I look at Pydoc as a lightweight docs browser. Just enough to keep me going on packages, classes, and functions.