Most active commenters
  • forrestthewoods(7)
  • osigurdson(4)

←back to thread

Tools: Code Is All You Need

(lucumr.pocoo.org)
313 points Bogdanp | 13 comments | | HN request time: 1.701s | source | bottom
Show context
forrestthewoods ◴[] No.44455498[source]
Unpopular Opinion: I hate Bash. Hate it. And hate the ecosystem of Unix CLIs that are from the 80s and have the most obtuse, inscrutable APIs ever designed. Also this ecosystem doesn’t work on Windows — which, as a game dev, is my primary environment. And no, WSL does not count.

I don’t think the world needs yet another shell scripting language. They’re all pretty mediocre at best. But maybe this is an opportunity to do something interesting.

Python environment is a clusterfuck. Which UV is rapidly bringing into something somewhat sane. Python isn’t the ultimate language. But I’d definitely be more interested in “replace yourself with a UV Python script” over “replace yourself with a shell script”. Would be nice to see use this as an opportunity to do better than Bash.

I realize this is unpopular. But unpopular doesn’t mean wrong.

replies(4): >>44455624 #>>44455730 #>>44455783 #>>44459352 #
osigurdson ◴[] No.44455730[source]
Nobody likes coding in bash but everyone does it (a little) because it is everywhere.
replies(1): >>44455992 #
forrestthewoods ◴[] No.44455992[source]
> because it is everywhere

Except for the fact that actually it is not everywhere.

replies(1): >>44456693 #
1. nativeit ◴[] No.44456693[source]
I see your point, but bear with me here--it kind of is.

I suppose if one wanted to be pedantically literal, then you are indeed correct. In every other meaningful consideration, the parent comment is. Maybe not Bash specifically, but #!/bin/sh is broadly available on nearly every connected device on the planet, in some capacity. From the perspective of how we could automate nearly anything, you'd be hard-pressed to find something more universal than a shell script.

replies(1): >>44456885 #
2. forrestthewoods ◴[] No.44456885[source]
> you'd be hard-pressed to find something more universal than a shell script.

99.9% of my 20-year career has been spent on Windows. So bash scripts are entirely worthless and dead to me.

replies(4): >>44457792 #>>44458774 #>>44458863 #>>44551836 #
3. osigurdson ◴[] No.44457792[source]
If you use git on Windows, bash is normally available. Agree, that this isn't widely used though.
replies(1): >>44458327 #
4. forrestthewoods ◴[] No.44458327{3}[source]
Yeah I’ve never see anyone rely on users to use GitBash to run shell scripts.

Amusingly although I certainly use GitHub for hobby projects I’ve never actually used it for work. And have never come across a Windows project that mandated its use. Well, maybe one or two over the years.

replies(1): >>44460818 #
5. nativeit ◴[] No.44458774[source]
What do you suppose the proportion is of computers actively running Windows in the world right now, versus those running some kind of *nix/BSD-based OS? This includes everything a person or machine could reasonably interface with, and that's Turing complete (in other words, a traffic light is limited to its own fixed logic, so it doesn't count; but most contemporary wifi routers contain general-purpose memory and processors, many even run some kind of *nix kernel, so they very much do count).

That's my case for Bash being more or less everywhere, but I think this debate is entirely semantic. Literally just talking about different things.

EDIT: escaped *

replies(1): >>44458917 #
6. ◴[] No.44458863[source]
7. forrestthewoods ◴[] No.44458917{3}[source]
I think if someone were, for example, to release an open source C++ library and it only compiles for Linux or only comes with Bash scripts then I would not consider that library to be crossplatform nor would I consider it to run everywhere.

I don’t think it’s “just semantics”. I think it’s a meaningful distinction.

Game dev is a perhaps a small niche of computer programming. I mean these days the majority of programming is webdev JavaScript, blech. But game dev is also overwhelmingly Windows based. So I dispute any claim that Unix is “everywhere”. And I’m regularly annoyed by people who falsely pretend it is.

replies(1): >>44459833 #
8. outworlder ◴[] No.44459833{4}[source]
Unix is everywhere. Except for Windows Desktops and a few places that like to run Windows Server enviroments. Those are increasingly rare.
replies(1): >>44459944 #
9. forrestthewoods ◴[] No.44459944{5}[source]
So Unix is everywhere. Except for the places it’s not.

And “increasingly rare” does not mean “rare”. And even if it were “quite rare”, which it isn’t, that doesn’t imply “not supported”.

And just to add salt to the wound Linux is a profoundly worse dev environment. It’s quite the tragedy.

10. osigurdson ◴[] No.44460818{4}[source]
Lot's of Microsoft shops (majority even) use ADO which is basically github + project management. I'd say most devs targeting Windows use git in some form. If not, what are you using? If git is installed, so is git bash. So bash is basically everywhere, even on Windows. The difference is, I'd say 1/50 devs using Windows actually know this.
replies(1): >>44460950 #
11. forrestthewoods ◴[] No.44460950{5}[source]
The video games industry uses Perforce. I currently use what is publicly referred to as Sapling.

Even if GitBash is installed, and I’m happy to concede it is, there are a variety of hurdles. Both technical and practical. But I will concede it is technically possible.

I will however maintain that bash is not everywhere in practice. And that if you write libraries or projects that expect Windows users to run bash scripts then you’re a bad software engineer and a bad person. Don’t do that.

Integrating something that required running under GitBash would be a non-starter at my current company. That’s just not how literally anything works. So sure technically possible. But with enough effort anything is possible!

replies(1): >>44470009 #
12. osigurdson ◴[] No.44470009{6}[source]
Well, at least you know that you can use bash on Windows now. Maybe they will integrate in directly as an alternative to cmd and powershell one day. That would be nice.
13. pxc ◴[] No.44551836[source]
My first software internship in college, I was at a Microsoft shop. I ended up astonishing the people I worked with (who were all programmers) by automating solutions to some annoyances I ran into, some menial tasks I was assigned to do, etc. I did it all with Cygwin or MSYS, although I don't remember whether the scripts were Bash or Fish.

All of my co-workers could have written their own code to automate such tasks. They even had access to PowerShell, which was by then part of Windows.

But they didn't, because they didn't have a shell worth "living in" (PowerShell is much too slow-- and to a lesser extent, too verbose-- for daily interactive use), and writing code to automate the same tasks in a "real programming language" seemed laborious and boring enough that it always made sense to put it off and live with the mess.

Solid bash experience would benefit lots of Windows developers.