News for hackers. Stuff that matters.
Re:Go ahead, write the “stupid” code by boriselec on Sunday September 28, 2025 @11:58PM (#45410220)
Also read "stupid" code :)

I didn't know about Deno and streams, but this looks fine

  const file = await Deno.open("huge-quotes.txt");
  const quotes: string[] = [];

  await file.readable
    .pipeThrough(new TextDecoderStream())
    .pipeThrough(new TextLineStream())
    .pipeTo(new WritableStream({
      write(line) {
        quotes.push(line);
      }
    }));
Re:Go ahead, write the “stupid” code by brabel on Monday September 29, 2025 @02:46AM (#45410966)
Looks like straight out of Dart.