mighty-gerbils / gerbil

Gerbil Scheme
https://cons.io
GNU Lesser General Public License v2.1
1.15k stars 110 forks source link

Overhaul gerbil reference documentation #263

Open ghost opened 5 years ago

ghost commented 5 years ago

Steadily move the docs into the following direction:

Reference Documentation

The Core Prelude

Core Expander Syntax

Prelude Macros

Runtime Symbol Bindings

Runtime [phi=0] Bindings

Syntax [phi=1] Bindings

More Gambit Symbols

Runtime Builtins

Expander Runtime

The Standard Library

Common Syntactic Sugar

Exception Base Classes

Command Line Argument Parsing

Formatting

Logging

Sorting

Regular Expressions

Generics

Generic Accessors and Mutators

Iterators

Coroutines

Events

Actors

HTTP requests

The Embedded HTTP Server

Web Serving with FastCGI

SQL Databases

Key-Value Stores

Network Programming with Sockets

Network related Libraries

Protocol Buffers

Operating System Interface

Cryptography

Text Encoding and Decoding

XML

Language Parsers

Miscellaneous

Primitives for Lazy Evaluation

Primitives for Ambiguous Non-Deterministic Computation

Syntax Parameters

Utilities for FFI Programming

SRFIs

Testing

Debugging

Build Tool

ghost commented 5 years ago
Documentation template:

## submodule
::: tip To use the bindings from this module:
``` scheme
(import :std/...)
```
:::

### function
``` scheme
(function param [opt-param = #f] [key-param: eqv] ...) -> ret1 | ret2 | ...

  param     := param description ...
  opt-param := param description ...
  key-param := param description ...
```

Function description; *param* highlighted; inline `code`

::: tip Examples:
``` scheme
> (function  ...)
ret
```
:::
zmyrgel commented 5 years ago

The template should specify how aliases should be documented. Should alias procedures be grouped in same documentation block or kept separately. If separate, keep their description short or duplicate the docs. Link the entry to original?

ghost commented 5 years ago

Yes, that's something I'm not too happy with either. Also, there are defalias, defmethod-alias, defmethods and re-exports of unsafe variants (e.g. object-type), all of which are not explicitly listed in the template above.

In misc.md I've documented an alias right after its original function in a fresh paragraph so that vuepress shows it in the sidebar as well as the search bar. See pr for example.

Feel free to propose and push for a semi-consistent way to declare all of them. I'm not the head of documentation, just a regular user. 😃

But yes, linking to the original would be desirable indeed.

belmarca commented 5 years ago

See https://cons.io/reference/misc.html#bytes for another example.

belmarca commented 5 years ago

Is there any interest in having the docs in the code itself?

ghost commented 5 years ago

Parsable documentation with embedded code examples that function as unit tests would absolutely be of interest. Would eliminate a lot of minor inconsistencies thoughout the docs.

But since I've slacked off for a while now I'll instead concentrate on getting rid of these nasty "Please document me!" prompts. :)

arichiardi commented 4 years ago

Ooooooh nice! I was looking for more docs on the actors, especially the remote ones, the index here looks awesome, just stopped by to say "keep up the good job!" 😃

vyzo commented 4 years ago

Yeah, I am planning to document the actor library in the not so distant future!