Hacker Newsnew | past | comments | ask | show | jobs | submit | HackerThemAll's commentslogin

I'm waiting for de-Appled iPhone ecosystem then.

Now you see the real reason behind changing the name from Department of Defense to Department of War. It's what Republicans really want.

> bash's syntax is so weird

What should be the syntax according to contemporary IT people? JSON? YAML? Or just LLM prompt?


Nushell, Powershell, Python, Ruby, heck even Perl is better. Shell scripting is literally the worst language I've ever seen in common use. Any realistic alternative is going to be better.

It always exists on any Unix system. Even a busybox root environment. Why do you want to save a few bytes to compromise portability?

But it isn't portable, unless you stick to posix subset which kinda sucks. You'll use some feature that some dude using an ancient shell doesn't have then he'll complain to you. And that list of features is LONG: https://oneuptime.com/blog/post/2026-02-13-posix-shell-compa...

If you're using shell specific features in a tightly controlled environment like a docker container then yeah, go wild. If you're writing a script for personal use, sure. If you're writing something for other people to run then your code will be working around all the missing features posix hasn't been updated to include. You can't use arrays, or arithmetic context, nothing. It sucks to use.

Besides, if you're writing a script it is likely that it will grow, get more complicated, and you will soon bump up against the limitations of the language and have to do truly horrible workarounds.

This is why if I need something for others to run then I just use python from the beginning. The code will be easier to read and more portable. At this point the vast majority of OS's and images have it available anyway so it's not as big a barrier as it used to be.


Nushell! Or powershell, but I much prefer nushell!

There's a movement to write JSON to fd 3, as a machine-parsable alternative to rickety fd 1.

Anything that is infected by UCS-2 / UTF-16 garbage should be revised and reconsidered... Yeah UTF-8 has carve outs for those escape sequences... However JSON is even worse, you _have_ to use UTF-16 escapes. https://en.wikipedia.org/wiki/JSON#Character_encoding

Trying to be language agnostic: it should be as self-explanatory as possible. 2>&1 is all but.

Why is there a 2 on the left, when the numbers are usually on the right. What's the relationship between 2 and 1? Is the 2 for std err? Is that `&` to mean "reference"? The fact you only grok it if you know POSIX sys calls means it's far from self explanatory. And given the proportion of people that know POSIX sys calls among those that use Bash, I think it's a bit of an elitist syntax.


POSIX has a manual for shell. You can read 99% of it without needing to know any syscalls. I'm not as familiar with it but Bash has an extensive manual as well, and I doubt syscall knowledge is particularly required there either.

If your complaint is "I don't know what this syntax means without reading the manual" I'd like to point you to any contemporary language that has things like arrow functions, or operator overloading, or magic methods, or monkey patching.


No, the complaint is that "the syntax is not intuitive even knowing the simpler forms of redirection": this one isn't a competition of them, but rather an ad-hoc one.

I know about manuals, and I have known this specific syntax for half of my life.

Arrow functions etc are mechanisms in the language. A template you can build upon. This one is just one special operator. Learn it and use it, but it will serve no other purpose in your brain. It won't make anything easier to understand. It won't help you decipher other code. It won't help you draw connections.


> the syntax is not intuitive even knowing the simpler forms of redirection

The MDN page for arrow functions in JS has, I shit you not, 7 variations on the syntax. And your complaint is these are not intuitively similar enough?

call > output

call 2>&1

call > output 2> error

call 1> output 2> error

Give me a fucking break.



Haskell

Honestly, Python with the "sh" module is a lot more sane.

Is it more sane, or is it just what you are used to?

Python doesn't really have much that makes it a sensible choice for scripting.

Its got some basic data structures and a std-lib, but it comes at a non-trivial performance cost, a massive barrier to getting out of the single thread, and non-trivial overhead when managing downstream processes. It doesn't protect you from any runtime errors (no types, no compile checks). And I wouldn't call python in practice particularly portable...

Laughably, NodeJS is genuinely a better choice - while you don't get multithreading easily, at least you aren't trivially blocked on IO. NodeJS also has pretty great compatibility for portability; and can be easily compiled/transformed to get your types and compile checks if you want. I'd still rather avoid managing downstream processes with it - but at least you know your JSON parsing and manipulation is trivial.

Go is my goto when I'm reaching for more; but (ba)sh is king. You're scripting on the shell because you're mainly gluing other processes together, and this is what (ba)sh is designed to do. There is a learning curve, and there are footguns.


No, thank you, it's become slow as hell in Windows 11, just like the Explorer and the Windows itself. Windows is a piece of garbage.

We should run Doom on it, then.

Ponzi scheme. Scam. I don't trust OpenAI a tiny bit.

you mean Altman scheme.

"OpenAI has made strong commitments to enable me to dedicate my time to it and already sponsors the project."

The bankrupt company sponsors anything, that sounds credible.


"arguably the most powerful programming language in the history of computing"

That can be said about quite a few languages, Forth included. The most powerful != easy to use and/or comprehend.


That's why I said "arguably", of course.

But, to be honest: Forth is great, but... well... there's no "easy mode" Forth. Whereas there is "easy mode" Scheme - even SICP starts with a very simple and gentle up ramp - so I'd argue to give the honours to Lisp (I'm putting Smalltalk in second place). But that's my personal opinion, I get to put it on my book cover, that's all :-)


Javascript developers learn kindergarten basics of transactions and SQL. LOL. Is it the camp "we don't need a degree to be programmers"?


I'd wager a fair share of grads don't yet understand:/

> The transaction didn't help. Postgres's default isolation level is READ COMMITTED — each statement sees all data committed before that statement started.


I have my Gmail account since they were on invitations, circa 2004, and Google certainly knows this. That's the ultimate proof I'm an adult :-) That information could be exposed and used by 3rd parties.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: