Live data from Hacker News

A language that compiles to Bash and Windows Batch

github.com

61–70 of 148 posts

Re: A language that compiles to Bash and Windows Batch

#61
post #41
post #17

Earlier quoted context omitted.

I think you missed the point of this language. You write code in this language, and then you compile it to get Bash for Linux and Batch for Windows.

I get it, I just disagree with "it's not bundled" as a major disadvantage: neither is your script, and maybe neither is your argument to any `call()`, so you're going to be thinking about deployment in any case.

Could be a great tool for government/enterprise customers who want to avoid the whitelisting process involved around getting anything installed.

IT departments would laugh at you if you said you wanted to install python on their server...

Re: A language that compiles to Bash and Windows Batch

#63

The idea is interesting, but ultimately the utility of this seems limited. The differences between windows and Unix are more than just the shell language involved; shell scripts are typically deeply intertwined with the system in question, to the point where it's often not the case that a bash script will even run reliably across different Unix systems, much less on windows. Also, you can already run bash on windows,…

I think it's a limitation more on the windows batch end. As mentioned, it's tricky for historical reasons.

Powershell would be closer to Bash, functionally speaking. An adapter between the two would be more functional- however doesn't satisfy the point of batsh, which assumes cleanish-builds of the OS in question.

Re: A language that compiles to Bash and Windows Batch

#67
post #41

Earlier quoted context omitted.

I get it, I just disagree with "it's not bundled" as a major disadvantage: neither is your script, and maybe neither is your argument to any `call()`, so you're going to be thinking about deployment in any case.

Could be a great tool for government/enterprise customers who want to avoid the whitelisting process involved around getting anything installed. IT departments would laugh at you if you said you wanted to install python on their server...

Sure, there are probably use cases, though I'm biased to think there are better options for any specific one except perhaps the project creator's inspiring situation.

IT can laugh, I laugh back when java/flash/excel/browsers are already installed.

Re: A language that compiles to Bash and Windows Batch

#70

The idea is interesting, but ultimately the utility of this seems limited. The differences between windows and Unix are more than just the shell language involved; shell scripts are typically deeply intertwined with the system in question, to the point where it's often not the case that a bash script will even run reliably across different Unix systems, much less on windows. Also, you can already run bash on windows,…

The attraction for me is not about portability, it's about having a better language to write CMD script.

Even when you know you have Python available sometimes you still need to glue things together with CMD.

Post reply on HN