News for hackers. Stuff that matters.
Re:A notable JavaScript developer shamelessly copied one of ... by thrower123 on Sunday September 26, 2021 @09:08AM (#28660587)
Javascript is the opposite of a batteries-included language, so there is and has been an enormous amount of wasted effort duplicating functionality that should have been in a standard library.
Re:A notable JavaScript developer shamelessly copied one of ... by chenmike on Sunday September 26, 2021 @10:56AM (#28661355)
We’re talking about a terminal colorization function though. Fragmentation of packages aside, are there any other languages that have terminal text colorization built into the standard library?
Re:A notable JavaScript developer shamelessly copied one of ... by thrower123 on Sunday September 26, 2021 @01:52PM (#28662930)
Every serious programming language I've ever used...

https://docs.microsoft.com/en-us/dotnet/api/system.console.f...

It's even easier on UNIX-like terminals, where ANSI escape codes should work.

Re:A notable JavaScript developer shamelessly copied one of ... by chenmike on Sunday September 26, 2021 @06:19PM (#28665176)
Okay? You gave one example, C#, and extrapolated that to every single serious programming language you've ever used. I just took a quick look and none of Java, ruby, python, and PHP has this functionality in its standard library. Also yes ANSI codes work but it's not easy to write or read, so that's what these libraries are for. I'm not a JS apologist but it seems inaccurate to imply that its need for a terminal colorization library is a unique deficiency of the language.
Re:A notable JavaScript developer shamelessly copied one of ... by pabs3 on Sunday September 26, 2021 @09:21AM (#28660658)
Are there any movements towards creating a standard library for JavaScript (or at least server-side JS)?
Re:A notable JavaScript developer shamelessly copied one of ... by wizzwizz4 on Sunday September 26, 2021 @09:38AM (#28660797)
There are many, many, many such movements. Which somewhat defeats the point, really.
Re:A notable JavaScript developer shamelessly copied one of ... by thrower123 on Sunday September 26, 2021 @09:45AM (#28660843)
This is why I have 107 different point-releases of lowdash and jquery in my node_modules folder
Re:A notable JavaScript developer shamelessly copied one of ... by NullPrefix on Sunday September 26, 2021 @11:13AM (#28661485)
>107 different point-releases of lowdash

Would totally believe that lowdash is a lodash fork.

Re:A notable JavaScript developer shamelessly copied one of ... by pitaj on Sunday September 26, 2021 @10:23AM (#28661116)
I don't know what you mean by "point-releases". I understand the hyperbole but pretty much every package manager will minimize different versions by installing one that's compatible with all requirements.