From bf2df78022293515db8e9945658c4ef69331cbd9 Mon Sep 17 00:00:00 2001 From: j50n Date: Sun, 10 Dec 2023 14:55:36 -0700 Subject: [PATCH] site docs --- dev/read.ts | 16 ++ docs/404.html | 2 +- docs/example-concurrent-processing.html | 2 +- docs/example-counting-words.html | 2 +- docs/example-io.html | 2 +- docs/index.html | 2 +- docs/introduction.html | 2 +- docs/io/read.html | 243 ++++++++++++++++++++++++ docs/misc/sleep.html | 234 +++++++++++++++++++++++ docs/performance.html | 10 +- docs/print.html | 25 ++- docs/process-input.html | 2 +- docs/process-output.html | 2 +- docs/process-run.html | 2 +- docs/process-stderr.html | 6 +- docs/searchindex.js | 2 +- docs/searchindex.json | 2 +- docs/text-data.html | 6 +- docs/transform.html | 2 +- site/src/SUMMARY.md | 2 +- site/src/io/read.md | 26 +++ src/utility.ts | 8 +- 22 files changed, 571 insertions(+), 29 deletions(-) create mode 100644 dev/read.ts create mode 100644 docs/io/read.html create mode 100644 docs/misc/sleep.html create mode 100644 site/src/io/read.md diff --git a/dev/read.ts b/dev/read.ts new file mode 100644 index 0000000..1d34b87 --- /dev/null +++ b/dev/read.ts @@ -0,0 +1,16 @@ +import { enumerate } from "https://deno.land/x/proc@0.21.8/mod.ts"; + +for await (const line of enumerate(Deno.stdin.readable).lines){ + console.log(line); +} + +const warandpeace = await Deno.open( + await Deno.realPath("./warandpeace.txt.gz"), +); +for await ( + const line of enumerate(warandpeace.readable).transform( + new DecompressionStream("gzip"), + ).lines +) { + console.log(line); +} diff --git a/docs/404.html b/docs/404.html index 783225d..ad0e94c 100644 --- a/docs/404.html +++ b/docs/404.html @@ -89,7 +89,7 @@