DenoDDeno
Powered by
rauniorooR
Deno•4y ago•
39 replies
raunioroo

TTY vs console.log vs stdin and setRaw for dummies?

Hi all! Would someone be able to clear some things out with regards to deno inputs and outputs:

- what exactly is one referring to, when talking about TTY? (in deno) is it just another name for console, or some of the std streams (stdin/stdout/stderr)
- what about raw mode? there has been Deno.setRaw() but apparently removed in Deno 1.26. I think there was at some point a writer/reader/stream.setRaw() method or somesuch, but they maybe disappeared too. What is raw mode supposed to do, and can one enable it in the current Deno version somehow.
- does deno do a lot of processing on console.log(stuff) versus writing raw bytes to std streams? What kind of processing, if any? And is the amount of processing the same whether deno is running on a windows terminal/vs code terminal, or as a child process of another deno process?
- if there is a raw mode, does it apply to stream write, or just console.log?

Asking because basically just wanting to learn. And I'm doing something that involves a lot of message passing (JSON lines) between deno processes/subprocesses. At the moment I'm just reading stdout stream to get messages back from child process, and writing to stdin.getWriter() to send messages. It's performing fine, but I anticipate the amount of messages will grow pretty big, and would like to make it as fast/lightweight as possible.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

console.log styling
ZyPAZZyPA / help
16mo ago
command.spawn() stdin and stdout
TangJieHaoTTangJieHao / help
2y ago
Custom console.log formatting for a class/object
NeTTNNeTT / help
3y ago