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

Improvements to the manual #6844

Closed
4 of 28 tasks
ry opened this issue Jul 22, 2020 · 21 comments
Closed
4 of 28 tasks

Improvements to the manual #6844

ry opened this issue Jul 22, 2020 · 21 comments

Comments

@ry
Copy link
Member

ry commented Jul 22, 2020

WebAssembly

  • Link to MDN sources
  • Provide Rust program that compiles to provided bytes
  • Write about instantiateStreaming currently not supported

TypeScript

  • Make a separate chapter

IO model

  • How IO work in Deno
  • comparison with ReadableStream, WriteableStream
  • how to convert to/from ReadableStream

Comparison with Node.js

  • Make a separate chapter
  • Compare most common Node APIs with Deno equivalents
  • Write about popular Node packages that are built into Deno

Plugins

  • Link to example plugin
  • Basic "fetch.js", deno_core::explanation

Examples

  • Move higher in the menu order

Tools

  • Move “Debugger” to “Debugging your code” in “Getting started”
  • Bundler - point out “for await of” does not work, it is an upstream bug, provide a workaround (ie. async iffe)

Deploying your code

  • Bundle it
  • How to setup basic CI
  • Best practices

Architecture

Building from source

  • Update

  • Style guide - ask @piscisaureus to update it

  • Provide special markers for Deno version and corresponding std version and automatically insert in all examples - eg. $DENO_VERSION$/$STD_VERSION$

  • Links to API reference, std library should be visible on every page of the manual

Testing

  • how tests are registered
  • processing order
  • concurrency

Std:

  • All imports in readme examples should be versioned, and bumped on release
@ry ry added the docs label Jul 22, 2020
@caspervonb
Copy link
Contributor

Been intending to update the WebAssembly page of the manual, I'll get on that part.

@David-Else
Copy link

The biggest omission is a search bar, it is impossible to find what you are looking for.

@nayeemrmn
Copy link
Collaborator

@David-Else That's a website issue.

@David-Else
Copy link

@nayeemrmn Somewhat of a semantic issue when the 'manual' only exists as a website :)

@nayeemrmn
Copy link
Collaborator

@David-Else No? The docs directory in the main repo contains markdown files which comprise the manual. That's what this issue is about. You're talking about the website's presentation of it.

@David-Else
Copy link

@nayeemrmn I agree with you technically, I was just looking at it from a user perspective and making the point 'the manual' and the 'manual on the website' are the same thing for most people.

I was also keen to point out there is not much point in fantastic docs with no search, which in retrospect was off-topic, so sorry about that.

@caspervonb
Copy link
Contributor

Search is a valid issue, but should be over at the presentation side https://github.com/denoland/deno_website2

@lucacasonato
Copy link
Member

The biggest omission is a search bar, it is impossible to find what you are looking for.

We're working on it.

@RobDWaller
Copy link
Contributor

Question on examples section do we think it should be broken down into basic and advanced?

Currently most of the examples strike me as advanced, for instance the cat example rests on the assumption you know what cat does. It's a good example but to many junior developers it may as well be entitled An implementation of the unix "tac" program.

A basic example might be something like, "How to read a JSON file". I'm sure we could come up with 8 basic examples to go along with the current examples?

@David-Else
Copy link

@RobDWaller I agree we need more basic topics covered, but I think the problem is more nuanced than just adding more examples. In the cat example:

The copy() function here actually makes no more than the necessary kernel -> userspace -> kernel copies. That is, the same memory from which data is read from the file, is written to stdout. This illustrates a general design goal for I/O streams in Deno.

The actual example is basic, but then it immediately goes into advanced subjects with no references to enable users to look up the required info to understand the concepts. My thoughts on the above sentence:

  • What is a kernel to userspace copy?
  • What is the kernel refering to in this context, the linux kernel?
  • What is meant by userspace?
  • What is the 'necessary' amount of copies vs an approach that might use too many?
  • What is stdout?
  • What are streams?
  • How does this illustrate an I/O streams design goal? Why do I care about a design goal in my first deno example program?

This is the first example that the user clicks on. It may be the very first page of the manual that the user clicks on. Immediately in one single sentence, they are expected to know about kernel, userspace, stdout, and streams. These topics should have a section where they are briefly explained and inline links provided in the example text.

@ry
Copy link
Member Author

ry commented Jul 23, 2020

Good points. I think it was the first and only example for a while. I'm open to reordering them.

@RobDWaller
Copy link
Contributor

RobDWaller commented Jul 29, 2020

I've started writing up some basic examples and I should have it finished by next week.

https://github.com/RobDWaller/deno-basic-examples

Hopefully it will be acceptable and can form a good set of basic examples which will help new developers get going with Deno. Once I've done this I'm happy to move onto expanding the advanced examples.

I've kept it as a separate repo for now so I don't pollute the Deno repo with lots of changes, will transfer it over if people are happy with the finished product.

@RobDWaller
Copy link
Contributor

So I've created a draft pull request for the examples documentation changes, if the basic format is acceptable I will submit it for formal review. Let me know your feedback.

#6958

@ebebbington
Copy link
Contributor

Regarding a FAQ, i think it would be good front and center, for example as a new li item in the website header. And maybe even a readonly #FAQ channel in the discord that links to the FAQ, so it's a breeze for users to navigate to it, and makes it highly visible

@gSarciotto
Copy link

What is needed in the typescript chapter?

@Bromeon
Copy link
Contributor

Bromeon commented Sep 6, 2020

Based on some discussion in Discord, it looks like several people are looking for guidance for calling Javascript code from Rust, and this is rather complex given the current API. If appreciated, I could gladly write some examples for simple use cases such as the following ones:

  • Executing a JS script from Rust
  • Printing some basic things (as console.log does not work)
  • Passing parameters (Rust -> JS) and return values (JS -> Rust)
  • Evaluating a JS expression in Rust

@tokiedokie
Copy link
Contributor

tokiedokie commented Sep 10, 2020

Link to @ry’s talk about deno structure from Israel meetup https://www.youtube.com/watch?v=1b7FoBwxc7E

This is done in #6859

@stale
Copy link

stale bot commented Jan 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 6, 2021
@stale stale bot closed this as completed Jan 13, 2021
@chances
Copy link

chances commented Jan 31, 2021

@ry Which of this issue's other bullet points are still unaddressed?

@ebebbington
Copy link
Contributor

And that is why I dislike the stale bot

@bartlomieju
Copy link
Member

I added issues in https://github.com/denoland/manual repository with chapters that are still missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests