Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add user guide #1246

Merged
merged 13 commits into from
Apr 28, 2017
Merged

doc: add user guide #1246

merged 13 commits into from
Apr 28, 2017

Conversation

saghul
Copy link
Member

@saghul saghul commented Mar 12, 2017

As discussed in #1027, this incorporates the uvbook into our documentation.

Consider this a WIP, but I wanted to get some eyes on it early, specially I want to make sure @nikhilm is OK with the approach taken here.

@nikhilm please take a look at the commits following "doc: add initial version of the User Guide", specially the one regarding the licensing. I'm happy to make adjustments!

My plan is to do a quick pass replacing "book" with "guide", and incorporate the code examples. I won't review the entire thing in a single go. I added a warning note so the idea is to gradually improve the guide and bring it on par with latest libuv, just like we did with the API documentation.

Doc on!

PS: Sorry for being AWOL for some time, I needed some time off.

@nikhilm
Copy link
Contributor

nikhilm commented Mar 13, 2017 via email


<ul>
<li>
<a href="http://nikhilm.github.com/uvbook/An%20Introduction%20to%20libuv.pdf" onClick="_gaq.push(['_trackEvent', 'Downloads', 'Download', 'PDF']);">PDF</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how useful the pdf/epub has been but it would be cool to continue serving these. Not a high priority of course, but sphinx does generate them for free as long as the build host has latex setup.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We server the docs with ReadTheDocs, and they already do this with an on-screen menu, see here: http://docs.libuv.org/en/v1.x/

@@ -17,6 +16,10 @@ describes much of the semantics of the two libraries.
This book was made using `Sphinx <http://sphinx.pocoo.org/>`_ and `vim
<http://www.vim.org>`_.

.. note::
In 2017 the libuv project incorporated the Nikhil's work into the official
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the Nikhil's -> Nikhil's

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, my bad, will fix!

@@ -20,9 +20,3 @@ This book was made using `Sphinx <http://sphinx.pocoo.org/>`_ and `vim
In 2017 the libuv project incorporated the Nikhil's work into the official
documentation and it's maintained there henceforth.

Licensing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you clarify what the new licensing is going to be?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, we don't seem to have any license stated, so I guess it's MIT at the moment, like the whole project. I think a CC license makes more sense, so I'll have a look at who contributed to docs/ and ask everyone if they are ok changing it.

@saghul
Copy link
Member Author

saghul commented Mar 16, 2017

@nikhilm I proposed we change the license here: #1254

@nikhilm
Copy link
Contributor

nikhilm commented Mar 16, 2017 via email

@saghul
Copy link
Member Author

saghul commented Apr 25, 2017

I think this is ready for review / landing. The guide / examples have not been adapted yet, but once we get it in it's easier to iterate quickly, and our current API documentation is a proof of that.

@libuv/collaborators PTAL.

@saghul saghul added this to the 1.12.0 milestone Apr 25, 2017
#include <string.h>
#include <uv.h>

uv_loop_t *loop;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I assume this is taken directly from the book right? It should be uv_loop_t* loop, but are we going to go through and lint the whole thing by hand?

@cjihrig
Copy link
Contributor

cjihrig commented Apr 26, 2017

Is rubber stamping the book an option? Cleaning up the documentation always makes for good first contributions, which are kind of hard to come by in libuv IMO.

void alloc_buffer(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) {
buf->base = malloc(suggested_size);
buf->len = suggested_size;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation is not consistent in this file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just that the uvbook is already out there. Instead of reviewing the entire book, we could take it as a known good commodity, and any necessary fixes could be made as they are discovered. That's the kind of thing that is friendly to first time contributors too.

Sure, that's what this PR is about! :-)


Since then libuv has continued to mature and become a high quality standalone
library for system programming. Users outside of node.js include Mozilla's
Rust_ programming language, and a variety_ of language bindings.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Rust reference isn't valid anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this PR incorporates the book pretty much as is, those kind of fixes will follow. Same goes for the sample code.

@santigimeno
Copy link
Member

Is rubber stamping the book an option? Cleaning up the documentation always makes for good first contributions, which are kind of hard to come by in libuv IMO.

I'd support this

@saghul
Copy link
Member Author

saghul commented Apr 26, 2017

Is rubber stamping the book an option? Cleaning up the documentation always makes for good first contributions, which are kind of hard to come by in libuv IMO.

What do you mean by this?

@cjihrig
Copy link
Contributor

cjihrig commented Apr 26, 2017

Just that the uvbook is already out there. Instead of reviewing the entire book, we could take it as a known good commodity, and any necessary fixes could be made as they are discovered. That's the kind of thing that is friendly to first time contributors too.

Copy link
Member

@santigimeno santigimeno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM then

@nikhilm
Copy link
Contributor

nikhilm commented Apr 26, 2017

Thanks! Once this is up, I'll update my version of the book to link to this as the canonical source.

PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This is a fresh import of uvbook [0], as is. It is to be considered
"beta", as the entire content hasn't been revised / adapted yet.

PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
We use guide.rst as our index, so there is no need for a secondary one.

PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Text taken from:
https://creativecommons.org/licenses/by/4.0/legalcode.txt

Fixes: libuv#1254
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
@saghul saghul merged commit d59d6e6 into libuv:v1.x Apr 28, 2017
@saghul saghul deleted the doc-user-guide branch April 28, 2017 09:17
inkydragon pushed a commit to one-pr/Chinese-uvbook that referenced this pull request Dec 16, 2021
PR-URL: libuv/libuv#1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants