diff options
-rw-r--r-- | website/manual.html | 2 | ||||
-rw-r--r-- | website/manual.md | 38 | ||||
-rw-r--r-- | website/style.css | 1 |
3 files changed, 40 insertions, 1 deletions
diff --git a/website/manual.html b/website/manual.html index 0ce361838..ec2b55421 100644 --- a/website/manual.html +++ b/website/manual.html @@ -25,7 +25,7 @@ const response = await fetch(url); const content = await response.text(); - let converter = new showdown.Converter({ extensions: ["toc"] }); + let converter = new showdown.Converter({ extensions: ["toc"], tables: true }); let html = converter.makeHtml(content); const manual = document.getElementById("manual"); diff --git a/website/manual.md b/website/manual.md index 524f1d449..ea6f21719 100644 --- a/website/manual.md +++ b/website/manual.md @@ -532,6 +532,44 @@ Particularly useful ones: ## Internal details +### Deno and Linux analogy + +| **Linux** | **Deno** | +| ------------------------------: | :------------------------------- | +| Processes | Web Workers | +| Syscalls | Ops | +| File descriptors (fd) | [Resource ids (rid)](#resources) | +| Scheduler | Tokio | +| Userland: libc++ / glib / boost | deno_std | +| /proc/\$\$/stat | [deno.metrics()](#metrics) | +| man pages | deno --types | + +#### Resources + +Resources (AKA `rid`) are Deno's version of file descriptors. They are integer +values used to refer to open files, sockets, and other concepts. For testing it +would be good to be able to query the system for how many open resources there +are. + +```ts +import { resources, close } from "deno"; +console.log(resources()); +// output like: { 0: "stdin", 1: "stdout", 2: "stderr", 3: "repl" } + +// close resource by rid +close(3); +``` + +#### Metrics + +Metrics is deno's internal counters for various statics. + +```ts +import { metrics } from "deno"; +console.log(metrics()); +// output like: { opsDispatched: 1, opsCompleted: 1, bytesSentControl: 40, bytesSentData: 0, bytesReceived: 176 } +``` + ### Schematic diagram <img src="schematic_v0.2.png"> diff --git a/website/style.css b/website/style.css index 0b78c4e07..f11f7e2ea 100644 --- a/website/style.css +++ b/website/style.css @@ -28,6 +28,7 @@ h1, h2, h3, h4, p, table { table { border-collapse: collapse; + margin-top: 8px; } td, th { font-weight: normal; |