Thoughts

mental health break ,./'"**^^$_---
The thing I hate about modern JS is how verbose it is. Code should not be getting more verbose as time goes on. (cw: vent post)
I read to read from standard input. Let's do some code golfing here. Implement echo (so take from standard input, print the same thing to standard output) in Deno. ``` const d = new TextDecoder();for await (const c of Deno.stdin.readable)console.log(d.decode(c)) ``` This is like Java. I don't think you can get it shorter than that, because the interface that Deno exposes for dealing with Stdin is an async iterator of chunks. And I've previously discussed on here, the only thing you can do with async iterators is a `for await` loop. Now I'm extremely smart, and I know a lot about Javascript. Obviously, I'm exaggerating. You can also read [Symbol.asyncIterator] but that is not easier. I just don't get it. IF YOU'RE DESIGNING A PROGRAMMING LANGUAGE, AND YOUR `bytes` OBJECT, DOESN'T HAVE A `.toString()` PROPERTY THAT DEFAULTS TO UTF-8, WHAT ARE YOU DOING. `.toString` exists for a reason. SIC, THIS IS ACTUALLY JAVA, PLEASE CREATE A NEW INSTANCE OF `TextDecoder`. Next thing you know, Deno's going to introduce `DenoString` which you can't concat with `+` you have to instantiate a new instance of `StringBuilder`. I'm just tired. I just want to write some code in a language that I know. I just want standard input as a string. But no. Deno isn't a high level language. I have pre-allocate a buffer of a known size in order to read that many bytes from standard input. What do I do if I don't know what a byte is? Like am I just screwed. I learn what Unicode encoding was after I had been programming for seven years. There's a message 8/12/2021 where I read about UTF-8 for the first time. `man echo` doesn't explain what encoding it outputs in. Like I just. Is this hell?
Link 8:57 p.m. Jan 06, 2023 UTC-8