News for hackers. Stuff that matters.
Re:The xz attack shell script by deanishe on Wednesday April 03, 2024 @03:55AM (#39914690)
Python makes it relatively hard to write inscrutable code, and more importantly, it's very non-idiomatic, and there would be pushback.

WTFing at shell scripts is normal.

Re:The xz attack shell script by egorfine on Wednesday April 03, 2024 @04:44AM (#39914917)
> WTFing at shell scripts is normal

"WTFing". This is brilliant.

Re:The xz attack shell script by Terr_ on Wednesday April 03, 2024 @04:52AM (#39914969)
I always think of this now-old comic: https://www.osnews.com/story/19266/wtfsm/
Re:The xz attack shell script by cqqxo4zV46cp on Wednesday April 03, 2024 @07:38PM (#39924757)
Yep. Python is my day job. If anyone on my team put something up that was as unreadable as a typical bash script, without really good justification, I’d immediately hit “request changes”.

This isn’t just because I’m more familiar with Python. I don’t even think it’s the main reason. It’s just that Python is more likely to be able to be read in a ‘natural language’ sort of way. It’s better at doing what it says on the tin. It’s more able to be read via pure intuition by a programmer that’s not familiar with Python specifically.

In bash land? “What the hell is [[?”

And yes, I could come up with 20 ways off the top of my head that Python is a far-from-perfect language.

And I’m not even saying that Python is the right tool for the job here. Maybe we’re better off with one of the many more modern attempts at a shell language. The main thing is that we should acknowledge that bash has overstayed its welcome in many of the areas in which it’s still used.