Live data from Hacker News

A language that compiles to Bash and Windows Batch

github.com

71–80 of 148 posts

Re: A language that compiles to Bash and Windows Batch

#74

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.

> sometimes you still need to glue things together with CMD

why? is there something cmd can do that python can't? one example is enough...

Re: A language that compiles to Bash and Windows Batch

#75
I posted Batsh long ago, but it's totally impractical. The multiplatform PowerShell is the best option. Anyway, we need a new shell and NGS [0] looks like it. Neither zsh, nor Fish offer what a shell scripting language needs so that you don't have to use Python, Go, or another language for a slightly more complex stuff!

[0]: https://news.ycombinator.com/item?id=11734622

Re: A language that compiles to Bash and Windows Batch

#76
post #74

Earlier quoted context omitted.

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.

> sometimes you still need to glue things together with CMD why? is there something cmd can do that python can't? one example is enough...

It's not about can or can't I think. Examples: Language runtime can't be installed, system locked down with deepfreeze, not enough permissions..

Re: A language that compiles to Bash and Windows Batch

#77
post #73

how is this top item? seems unfinished, unpolished, not very useful and very run of the mill as an achievement. no easily found windows installer and has obscure dependencies whilst claiming it has none etc. etc.

I don't even see the ability to iterate through files or am I missing something?

Re: A language that compiles to Bash and Windows Batch

#78

Earlier quoted context omitted.

Well sure, but these days PowerShell is what Windows people use for anything non-trivial.

And PowerShell is an awful shell; it's great for script automation of windows, but as a shell, just no. Microsoft recognizes this, it's the reason a full Ubuntu bash shell is available in Windows 10.

> Microsoft recognizes this

MS also tried to improve PowerShell by installing the PSReadLine module by default.

Read https://github.com/lzybkr/PSReadLine for instructions on how to make PS a bit more usable.

Re: A language that compiles to Bash and Windows Batch

#79
post #3

You've got to admire this and at the same time you can't help but see the shadow of two more letters on the end of its name...

Adopted by ASF as Apache Guano(tm).

The colonel interface is called 'bat' Guano, but then you have to answer to the Coca-Cola company.
Post reply on HN