Skip to content

doc: add user guide - #1246

Merged
saghul merged 13 commits into
libuv:v1.xfrom
saghul:doc-user-guide
Apr 28, 2017
Merged

saghul merged 13 commits into
libuv:v1.xfrom
saghul:doc-user-guide

Conversation

@saghul

@saghul saghul commented Mar 12, 2017

Copy link
Copy Markdown
Member

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

nikhilm commented Mar 13, 2017 via email

Copy link
Copy Markdown
Contributor

Comment thread docs/src/guide/index.rst Outdated

<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
Copy Markdown
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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Comment thread docs/src/guide/about.rst
<http://www.vim.org>`_.

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

Copy link
Copy Markdown
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
Copy Markdown
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!

Comment thread docs/src/guide/about.rst Outdated
In 2017 the libuv project incorporated the Nikhil's work into the official
documentation and it's maintained there henceforth.

Licensing

Copy link
Copy Markdown
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
Copy Markdown
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

saghul commented Mar 16, 2017

Copy link
Copy Markdown
Member Author

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

@nikhilm

nikhilm commented Mar 16, 2017 via email

Copy link
Copy Markdown
Contributor

@saghul

saghul commented Apr 25, 2017

Copy link
Copy Markdown
Member Author

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
Comment thread docs/code/cgi/main.c
#include <string.h>
#include <uv.h>

uv_loop_t *loop;

Copy link
Copy Markdown
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

cjihrig commented Apr 26, 2017

Copy link
Copy Markdown
Contributor

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.

Comment thread docs/code/dns/main.c
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

saghul commented Apr 26, 2017

Copy link
Copy Markdown
Member Author

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

cjihrig commented Apr 26, 2017

Copy link
Copy Markdown
Contributor

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.

@santigimeno santigimeno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM then

@nikhilm

nikhilm commented Apr 26, 2017

Copy link
Copy Markdown
Contributor

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

saghul added 8 commits April 28, 2017 11:13
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
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 <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
We use guide.rst as our index, so there is no need for a secondary one.

PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
PR-URL: libuv#1246
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
@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 <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
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.

4 participants