Giter VIP home page Giter VIP logo

user-documentation's People

Contributors

andrewdimola avatar atry avatar azjezz avatar bball07 avatar daviddoran avatar davidsnider avatar daweisun-meta avatar francesco-zappa-nardelli avatar fredemmott avatar gabrielenizzoli avatar int3 avatar jamesjwu avatar jjergus avatar joelmarcey avatar jwatzman avatar kunalb6 avatar lexidor avatar manzyuk avatar matthewjohnston4 avatar mike2151 avatar mofarrell avatar paulbiss avatar rexjaeschke avatar runtimee avatar sgolemon avatar siebelstim avatar tysonandre avatar wilfred avatar yuejianggithub avatar zlandau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

user-documentation's Issues

Merge/normalize HHI and SystemLib definitions recursively

  • HHI defines \KeyedIterable<Tk,Tv> and systemlib defines HH\KeyedIterable<>
  • We currently merge these together into HH\KeyedIterable<Tk,Tv>
  • This needs to happen for parent classes and interfaces too - eg HH\KeyedIterable<Tk,Tv> needs to extend HH\Iterable<Tv>, not \Iterable<Tv> or HH\Iterable<>

Rename Intro to Introduction

Use the full word Introduction in our page titles.

Also, look at renaming one other page. We have a page called Vs Arrays in the Collections guides. It compares Collections with arrays. Thinking about coming up with a better name.

/hack/collections/vs-arrays very complicated

That flowchart may be accurate, but ... I doubt anyone's ever going to go through that. Might be good to replace it with a simplified version.

Also shouldn't collections work with most built-ins ? Just not next()/key() and apc() ?

Missing examples

Missing example: /home/fred/user-documentation/guides/hack/01-types/runtime-examples/type-error-but-runs.php
Missing example: /home/fred/user-documentation/guides/hack/01-types/advanced-rules-examples/softhint.php
Missing example: /home/fred/user-documentation/guides/hack/01-types/type-system-examples/noreturn.php
Missing example: /home/fred/user-documentation/guides/hack/01-types/type-system-examples/generics.php
Missing example: /home/fred/user-documentation/guides/hack/01-types/type-system-examples/classname.php
Missing example: /home/fred/user-documentation/guides/hack/01-types/inference-examples/unresolved.php
Missing example: /home/fred/user-documentation/guides/hack/01-types/inference-examples/props.php
Missing example: /home/fred/user-documentation/guides/hack/11-attributes/special-examples/override.php
Missing example: /home/fred/user-documentation/guides/hack/11-attributes/special-examples/consistent-construct.php
Missing example: /home/fred/user-documentation/guides/hack/11-attributes/special-examples/deprecated.php
Missing example: /home/fred/user-documentation/guides/hack/11-attributes/special-examples/mock.php
Missing example: /home/fred/user-documentation/guides/hack/11-attributes/type-checking-examples/misspelling.php
Missing example: /home/fred/user-documentation/guides/hack/07-lambdas/introduction-examples/introduction.php
Missing example: /home/fred/user-documentation/guides/hack/07-lambdas/introduction-examples/difference.php
Missing example: /home/fred/user-documentation/guides/hack/07-lambdas/introduction-examples/capture-variables.php
Missing example: /home/fred/user-documentation/guides/hack/16-typechecker/intro-examples/typechecker-catch.php
Missing example: /home/fred/user-documentation/guides/hack/16-typechecker/modes-examples/partial.php
Missing example: /home/fred/user-documentation/guides/hack/16-typechecker/modes-examples/strict.php
Missing example: /home/fred/user-documentation/guides/hack/16-typechecker/running-examples/simple-check.php
Missing example: /home/fred/user-documentation/guides/hack/16-typechecker/special-example/hhfixme.php
Missing example: /home/fred/user-documentation/guides/hack/02-generics/intro-examples/box.php
Missing example: /home/fred/user-documentation/guides/hack/03-async/extensions-example/async-stream.php
Missing example: /home/fred/user-documentation/guides/hack/03-async/wait-handle-examples/wait-handle-return.php
Missing example: /home/fred/user-documentation/guides/hack/03-async/wait-handle-examples/single-wait-handle.php
Missing example: /home/fred/user-documentation/guides/hack/03-async/wait-handle-examples/multiple-wait-handles.php
Missing example: /home/fred/user-documentation/guides/hack/03-async/wait-handle-examples/join.php
Missing example: /home/fred/user-documentation/guides/hack/10-operators/placeholder-variable-examples/iteration.php
Missing example: /home/fred/user-documentation/guides/hack/10-operators/null-safe-examples/undefined-methods.php
Missing example: /home/fred/user-documentation/guides/hack/10-operators/null-safe-examples/not-nullable.php
Missing example: /home/fred/user-documentation/guides/hack/15-unsupported/others-examples/varvars.php
Missing example: /home/fred/user-documentation/guides/hack/15-unsupported/others-examples/dynamic-properties.php
Missing example: /home/fred/user-documentation/guides/hack/15-unsupported/others-examples/trait-aliasing.php
Missing example: /home/fred/user-documentation/guides/hack/15-unsupported/references-examples/strict.php

Style on "inconsistencies" is difficult to visually parse

Was just skimming http://beta.docs.hhvm.com/hhvm/inconsistencies/introduction and noticed how hard it was to visually parse the hierarchy of sections and subsections. Not sure what the problem is -- maybe the prevalence of code (which is styled differently) in the headers? In any event, I found it a ton harder to read than the markdown original in the HHVM repo's docs dir.

Not sure what the right solution is, just thought it worth pointing out.

API Rendering fixes

  • Will markdown syntax in docblocks render as markdown in the final API reference? It would make the docs look cleaner.
  • Parameter types aren't being shown for methods if there aren't put in the docblock. For parameter types that are in docblocks (e.g., AsyncMysqlClient), the types do show. I think we were thinking of deducing the parameter type from the signature instead.
  • Empty parameters shouldn't show Parameters heading.
  • Alphabetize the listing of the class methods. I think right now they are ordered by how they are reflected upon in the HHI or HNI file, maybe.
  • Get any API examples associated with a method to show on the API page (e.g., we have examples for AsyncMysqlXXX and MCRouterXXX classes).
  • Everything says "Interface Synopsis" -- can we distinguish between classes, interfaces, etc.
  • @internal seems to work not showing the docblock information for a method; but the method signature itself still shows in the docs. We need to link the @internal with not showing the method at all in the API reference.
  • do not include private methods
  • Render the links to guides when coming across an @guide tag in the docblock.

cc @fredemmott

Show output for all examples

Right now we have .hhvm.expect[f] files for all the examples so we can run the test runner on them. But we should also have a .hhvm.output or some file (maybe we can get that through the test runner by keeping the raw output) so that we can show output within the guides themselves too.

We could use the hhvm.expect files for this, but the .hhvm.expectf files have regex wildcards that might not be as useful.

Show output for all examples

Right now we have .hhvm.expect[f] files for all the examples so we can run the test runner on them. But we should also have a .hhvm.output or some file (maybe we can get that through the test runner by keeping the raw output) so that we can show output within the guides themselves too.

We could use the hhvm.expect files for this, but the .hhvm.expectf files have regex wildcards that might not be as useful.

Async iterators?

The docs are missing any information and examples of async iterators. First, are they ready to be announced and documented -- I think so? Check with @jano. Second, do we want to document them, since they're such a niche feature -- probably? Third, actually coming up with not-totally-contrived examples and motivation is interesting; I'd probably go for some sort of streaming/reactive API? Or maybe an async API that fetches and returns its results in batches of 10000 or something, since there's a ton of results that are expensive to fetch in aggregate? (AIUI we don't use the feature much at FB, and this last example is one place where we do use it.)

Reword proxygen section

cc @jamesgpearce @JoelMarcey

From our docs, it sounds like proxygen is a proxy server - all this stuff about proxying requests. Given we use (and proxygen describes itself) as a set of C++ libraries which among other things makes it easy to embed an HTTP server, this seems probably incorrect (unless you consider calling/implementing C++ methods proxying), and at the least confusing.

Post-process markdown to auto-linkify

The following patterns should be converted to links, if the definition exists:

  • SomeClass
  • foo
  • some_function

This should apply to both API and Guide documentation - Guide so that we don't hard-code paths in handwritten markdown, API because if we've already implemented it for the Guide, might as well do it the same :)

Add grouping for guides

Essentially, we want to be able to do this (ignore the specific titles) with the guides to prioritise visual grouping based on skill level of readers:

home_grouping

Right now, there's no hierarchy and it's too confusing and intimidating for beginners imo

Make sure it's super clear that async != threading

There has been lots of confusion on this point. See, e.g., this SO question: http://stackoverflow.com/a/32937733/3395144

There's a brief discussion of this in the current draft but I think there is still room for improvement. A paragraph discussing this point might be worth it, and I'm especially worried about this sentence:

It allows code that utilizes the async infrastructure to cede CPU time to one another in an explicit and knowing fashion.

This is not typically true; you're going and doing something else instead of blocking on IO, which is not "CPU time" (and the "something else" is probably more IO). Even when it's technically true, when you're busy-waiting, it still gives the wrong impression.

Sorry to nitpick, this is just such a common confusion and such a core feature I think it's worth spending a good bit of time to get this perfect.

Async guide issues

Intro

  • make it clearer that executing two async functions that call blocking functions (eg non-asio curl_exec()) will not execute curl in parallel. Another picture could be handy for this. An alternative would be to use APIs with more different names for the examples - eg sleep() vs HH\Asio\usleep().

Wait handles

  • do we just want to call this 'Awaitables' instead? WaitHandle exists, but isn't what this is talking about - it looks like this section is just defining 'wait handle' to be another word for awaitable?
  • 'The type of the Awaitable will be the underlying type that the function would return if it wasn't async' - this is very unclear. The type of the Awaitable will be Awaitable<T>, not T
  • The comment in the example seems confusing too:
  // You aren't really returning 2 in the normal sense.
  // You are returning a wait handle that will, upon conclusion of execution,
  // contain the result of 2.
  return 2;

I am not returning an awaitable, I'm returning 2. The Awaitable part applies to the whole function, not just the return statement.

User Documentation: Content Task List

This list contains the actual user-content tasks that need to be completed. Choose a topic, comment on this issue with the topic you will be working on, write great content, get it peer-reviewed and check the box off when completed.

IMPORTANT: Please follow the contribution guidelines when adding or modifying content.

NOTE: Feel free to add to or modify this list as appropriate as we move along in our efforts here. This is just the initial skeleton guide of how we should approach the docs. It can change, of course.

NOTE: All the Hack markdown .md placeholders are in hack/<##-topic> and the HHVM placeholders are in hhvm/<##-topic>, where ## represents a table of contents placeholder suitable for documentation generation tooling. Obviously feel free to add or change any of the placeholders to better suit your documentation efforts.

NOTE: @fredemmott is creating the infra to tie all of the content documentation in our markdown files with the API documentation.

Automagically add intra API links within API docs

Right now we use markdown within hhi, hni files to help produce nicely readable API documentation.

But in order to avoid massive bloat within the docblocks, I didn't add [....](.....) links every time a class or method was mentioned -- but we do mention other classes and methods quite a bit from a class or method docblock.

Is there a way to use our yaml or other infrastructure to automatically add links whenever we encounter

CLASS

in a docblock?

It would be more friendly to users for them to be able to click to other places from within the descriptions of the API docs.

Unable to build guides

Hey all, been trying to get the guide to build locally but haven't been able to.

2015-11-12 22:12:56] Build sources for /Users/jmcfarland/code/hack/user-documentation/build/systemlib............
Fatal error: Uncaught exception 'HH\InvariantException' with message 'expected type constraint at line 8' in /Users/jmcfarland/code/hack/user-documentation/vendor/fredemmott/definition-finder/src/consumers/GenericsConsumer.php:87
Stack trace:
#0 /Users/jmcfarland/code/hack/user-documentation/vendor/fredemmott/definition-finder/src/consumers/GenericsConsumer.php(87): HH\invariant_violation()
#1 /Users/jmcfarland/code/hack/user-documentation/vendor/fredemmott/definition-finder/src/consumers/ClassConsumer.php(45): FredEmmott\DefinitionFinder\GenericsConsumer->getGenerics()
#2 /Users/jmcfarland/code/hack/user-documentation/vendor/fredemmott/definition-finder/src/consumers/ScopeConsumer.php(158): FredEmmott\DefinitionFinder\ClassConsumer->getBuilder()
#3 /Users/jmcfarland/code/hack/user-documentation/vendor/fredemmott/definition-finder/src/consumers/ScopeConsumer.php(126): FredEmmott\DefinitionFinder\ScopeConsumer->consumeDefinition()
#4 /Users/jmcfarland/code/hack/user-documentation/vendor/fredemmott/definition-finder/src/consumers/NamespaceConsumer.php(32): FredEmmott\DefinitionFinder\ScopeConsumer->getBuilder()
#5 /Users/jmcfarland/code/hack/user-documentation/vendor/fredemmott/definition-finder/src/consumers/ScopeConsumer.php(151): FredEmmott\DefinitionFinder\NamespaceConsumer->getBuilder()
#6 /Users/jmcfarland/code/hack/user-documentation/vendor/fredemmott/definition-finder/src/consumers/ScopeConsumer.php(126): FredEmmott\DefinitionFinder\ScopeConsumer->consumeDefinition()
#7 /Users/jmcfarland/code/hack/user-documentation/vendor/fredemmott/definition-finder/src/FileParser.php(11): FredEmmott\DefinitionFinder\ScopeConsumer->getBuilder()
#8 /Users/jmcfarland/code/hack/user-documentation/vendor/fredemmott/definition-finder/src/FileParser.php(31): FredEmmott\DefinitionFinder\FileParser->__construct()
#9 /Users/jmcfarland/code/hack/user-documentation/src/build/RawYAMLBuildStep.php(41): FredEmmott\DefinitionFinder\FileParser::FromData()
#10 /Users/jmcfarland/code/hack/user-documentation/src/build/RawYAMLBuildStep.php(15): HHVM\UserDocumentation\RawYAMLBuildStep->buildSources()
#11 /Users/jmcfarland/code/hack/user-documentation/bin/build.php(6): HHVM\UserDocumentation\RawYAMLBuildStep->buildAll()
#12 /Users/jmcfarland/code/hack/user-documentation/bin/build.php(14): HHVM\UserDocumentation\hhvm_to_yaml()
#13 {main}

It gets through a few steps before hitting this. I have the master branch checked out, going to try it with the HHVM-3.10 branch.

Standardize heading in markdown

My ideal: every file has # as the top level heading. If given it's context it should be an h2 instead, this can be handled in the markdown renderer. This means that we can change generic structure of the page without having to rewrite all the docs.

hack/async/utility-functions guide improvements

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.