denobyexample
denobyexample copied to clipboard
Ideas for examples
This is a list of examples we'd like to add. Before contributing an example, please read the instructions in the README.md file. Please also comment on this issue with the example you'd like to write up so we don't duplicate effort.
Ideas (in no particular order):
- [ ] Running a subprocess to completion
- [ ] Spawning a subprocess and interacting with it
- [ ] Handling OS signals
- [x] Getting the Deno version (@ry, https://github.com/denoland/denobyexample/pull/14)
- [ ] Programatically request and query permissions
- [x] Get current process information (pid, ppid, etc) (@ry, https://github.com/denoland/denobyexample/pull/14)
- [x] Get list of current environment variables
- [x] Logging with colors
- [ ] Connecting to a TCP server
- [ ] Starting a TCP listener
- [x] Streaming HTTP server responses
- [ ] Serving local files using HTTP server
- [x] Creating temporary files and directories
- [ ] Writing tests (including substeps, resource leakage, and std asserts)
- [ ] Getting a directory listing (including reccursive)
- [x] Moving / renaming files
- [ ] Removing files / directories (@littledivy)
- [ ] Checking for file existence (explain that you should just do the operation and catch errors)
- [ ] Handling WebSocket connections in a HTTP server
- [ ] Creating outbound WebSocket connections
- [ ] Watching the file system for changes (including how to debounce)
- [ ] Running DNS queries (@satyarohith)
- [ ] Sending UDP packets (@satyarohith)
- [ ] Listening for UDP packets (@satyarohith)
- [ ] Starting TLS connections (including custom CA certs, and other options) (@satyarohith)
- [ ] Start a TLS listener (@satyarohith)
- [ ] How to do benchmarking
- [ ] Calculating cryptographic digests (hashing) (@littledivy)
- [ ] Manipulating byte buffers (read / write u8/u16/i32/i64 etc, concatenate buffers using std/bytes) (@littledivy)
- [x] Generating UUIDs
- [ ] Manipulating fs paths (join, normalize, etc)
- [ ] Manipulating and parsing URLs
- [x] Matching URLs with
URLPattern - [x] Parsing flags
- [ ] Hex and base64 encoding
- [ ] Parsing / outputting TOML
- [ ] Parsing / outputting YAML
- [ ] Parsing / outputting CSV
- [x] Parsing / outputting JSON (@lucacasonato)
- [x] Using JSON modules with
assert { type: "json" } - [ ] Creating & Resolving Symlinks
- [ ] Using Web Workers
- [ ] Deno.File to Web Streams
[ ] Using JSON modules with assert { type: "json" }
I noticed denoland/manual#161 recently, seems like something that could go here. I could add it if there's interest.
Working on the shebang example right now.
I feel like this checklist should be updated to fit the current status of by example:
- Parsing / outputting YAML #33
- Parsing / outputting TOML #32
- benchmarking #34
- os signals #39
- watching the filesystem #37
I like to work on the TCP listener.
Another round of updates that should probably be checked on the list:
- Running DNS queries #48
- Starting a TCP listener #47
- Connecting to a TCP server #41
- Programatically request and query permissions #43
- Calculating cryptographic digests (hashing) #53
- Checking for file existence (explain that you should just do the operation and catch errors) #54
- Getting a directory listing (including reccursive) #55
Another another round of updates:
- Running a subprocess to completion (https://github.com/denoland/denobyexample/pull/61)
- Spawning a subprocess and interacting with it (https://github.com/denoland/denobyexample/pull/65)
- Serving local files using HTTP server (https://github.com/denoland/denobyexample/pull/59)
- Removing files / directories (solved indirectly in other PRs, do we want a dedicated example for something so simple?)
- Manipulating fs paths (join, normalize, etc) (https://github.com/denoland/denobyexample/pull/62)
This should leave us with 10 more examples in this main batch. I'll be writing drafts for each of these in the upcoming week (though if anyone else is interested in doing them, please feel free!).
do we want a dedicated example for something so simple?
I think a dedicated example would be useful for some users
Yet another round of updates:
- Writing tests (including substeps, resource leakage, and std asserts) #79
- Removing files / directories #67
- Handling WebSocket connections in a HTTP server #70
- Creating outbound WebSocket connections #69
- Sending UDP packets #80
- Listening for UDP packets #80
- Manipulating and parsing URLs #72
- Creating & Resolving Symlinks #68
- Deno.File to Web Streams #71
This should leave
- Starting TLS connections (including custom CA certs, and other options)
- Start a TLS listener
- No idea why this is checked, we don't have an example for this
- Piping streams
- Not on the list at the moment but suggested by @kt3k in https://github.com/denoland/denobyexample/pull/71#issuecomment-1507872879
This issue should be closed. All of the remaining examples have been added. New examples should get dedicated issues (like ULID).
@lino-levan Thank you for your efforts on this! 👏 👏
@kt3k could you unpin this issue?
Thanks for pointing. Unpinned 👍