Earlier quoted context omitted.
JSON is a terrible configuration file format. Property names must be quoted, tons of brackets and commas, a mistake comma breaks it, no comments allowed, etc..
JSON5 is a more reasonable format for config files, in my opinion.
The Bun Shell
61–70 of 239 posts
Re: The Bun Shell
#62Earlier quoted context omitted.
JSON5 is a more reasonable format for config files, in my opinion.
I prefer YAML on my Markdown front matter. It's more readable because of no brackets, quotes, or commas.
YAML is full of pitfalls. I think the brackets/braces and quotes are worth giving up a small amount readability to eliminate the ambiguity.
Re: The Bun Shell
#63My main concern is that when things don't work as expected, the added layer of complexity will make it harder to figure out why. Hopefully there aren't too many rough edges.
Re: The Bun Shell
#64Earlier quoted context omitted.
JSON5 is a more reasonable format for config files, in my opinion.
I prefer YAML on my Markdown front matter. It's more readable because of no brackets, quotes, or commas.
https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-fr...
Re: The Bun Shell
#65Love that bun just implements anything that could be useful. They are busy building useful stuff whilst others pontificate about what they should/shouldn’t build
Re: The Bun Shell
#66Re: The Bun Shell
#67Their info about "rm -rf" not working in Windows is slightly misleading. In PowerShell, you can accomplish this by running: rm -r -fo my-folder-name
How many Linux/Mac devs know that? We live in a left-pad world, of course people will install a package to get a simple job done.
Today if I want to reliably automate some scripting I do NOT use shell scripting because it makes a bunch of implicit dependencies on existing system.
Instead I write these utility scripts in either JavaScript or PHP depending on the project and this seems to give JavaScript a slightly nicer consistent interface to perform basic functionality, built directly into the runtime.
Re: The Bun Shell
#68"JavaScript is the world's most popular scripting language." Perhaps, based on usage. But shell must be the world's most ubiquitous scripting language. Not every computer has a Javascript engine but most have a shell. Many, many computers have no browser, let alone a GUI. Some small form factor computers might have embedded Javascript engine but that's a minority. No browser on the router.
Re: The Bun Shell
#69> On a Linux x64 Hetzner Arch Linux machine, it takes about 7ms: hyperfine --warmup 3 'bash -c "echo hello"' 'sh -c "echo hello"' -N On my home machine and a mid-range AWS EC2 instance, the echoes run in ~0.5ms for bash and ~0.3ms for sh. Next time don't run benchmarks on a garbage host like Hetzner. Their hardware is grossly oversold, their support is abysmal, and they null-route traffic anytime there's a blip.
It's a been a long time since I read a post where someone bashes Hetzner. Usually they are well received. We use their VMs as back up servers, so not really pushing them hard. The most negative things I've read about them is they have much stronger KYC than AWS.
Re: The Bun Shell
#70For something which works across all JS runtimes (Deno, Node) and achieves basically the same, check out the popular JS library Execa[1]. Works like a charm! Another alternative is the ZX shell[2] JS library. Tho haven't tested it. [1]: https://github.com/sindresorhus/execa [2]: https://github.com/google/zx