const stdin = Deno.stdin;
stdin.setRaw(true, {cbreak: Deno.build.os !== "windows"});
const maxBuffer = new Uint8Array(1024);
const read = async () => {
const size = await stdin.read(maxBuffer);
const buffer = maxBuffer.subarray(0, size || 0).toString();
Deno.writeTextFileSync("buffer.txt", buffer + "\n", {append: true});
setTimeout(read, 1000 / 60);
};
read();
const stdin = Deno.stdin;
stdin.setRaw(true, {cbreak: Deno.build.os !== "windows"});
const maxBuffer = new Uint8Array(1024);
const read = async () => {
const size = await stdin.read(maxBuffer);
const buffer = maxBuffer.subarray(0, size || 0).toString();
Deno.writeTextFileSync("buffer.txt", buffer + "\n", {append: true});
setTimeout(read, 1000 / 60);
};
read();