Live data from Hacker News

A language that compiles to Bash and Windows Batch

github.com

31–40 of 148 posts

Re: A language that compiles to Bash and Windows Batch

#31
post #6

Is there a way to get this as a precompiled Windows binary? I really want to give this a try, but I'm just sooo lazy and don't want to install OPAM if there's maybe a way around that.

ironically, the instructions there don't tell you how to get opam installed on windows either. i don't know the answer, but apparently [it's not trivial](https://github.com/ocaml/opam/issues/246)

Re: A language that compiles to Bash and Windows Batch

#32
post #23

This is cool, but I hope the new Linux Subsystem in Windows 10 will propagate enough that everything can be written in bash

i will never understand why people fetishize that awful language.

I think it's your incorrect assumption that bash's popularity is due to it being a "fetish" for anyone. There aren't alternatives that are both better and more available / cross-platform / standard.

I agree its a crappy language, but remember, it's a shell, not a language. It serves a different purpose than being good for pure code, so saying something like " is better than bash" doesn't hold a whole lot of water. It is way better than batch though.

Re: A language that compiles to Bash and Windows Batch

#34

The project hasn't been worked on in over a year also it isn't the language that is much different but the tools. Are you going to write grep on windows? If not the language really doesn't matter.

If the language has a string search command then it can implement its own, or it can delegate to grep on Linux and Findstr on Windows. Obviously in both cases it can't cover all that grep can do, but that likely isn't in scope. All I'd want is a tool that lets me maintain one build script for example.

Re: A language that compiles to Bash and Windows Batch

#36
post #2

Looks nice but wouldn't you just use something like Python nowadays?

I love python, but python is not a shell, and it makes an absolutely awful shell replacement. Python is further from a good shell than bash is from being a decent programming language. Some scripts are good, I do use python for some kinds of shell scripts, but most of what I need bash for, python is not a good replacement at all.

Re: A language that compiles to Bash and Windows Batch

#37
post #4
post #2

Looks nice but wouldn't you just use something like Python nowadays?

The "Why not Python/Ruby/Node.js/Lua" section lists 3 reasons the author developed this language...

The second point says “Functionalities like process piping are not convenient to use” but Batsh itself doesn’t support piping [1], a core feature of shell languages.

[1]: https://github.com/BYVoid/Batsh/issues/17

Re: A language that compiles to Bash and Windows Batch

#38
post #32
post #23

Earlier quoted context omitted.

i will never understand why people fetishize that awful language.

I think it's your incorrect assumption that bash's popularity is due to it being a "fetish" for anyone. There aren't alternatives that are both better and more available / cross-platform / standard. I agree its a crappy language, but remember, it's a shell, not a language. It serves a different purpose than being good for pure code, so saying something like " is better than bash" doesn't hold a whole lot of water. It…

" is better than bash at the kind of tasks that bash is used for" would be a pretty substantial claim, though. (Unfortunately, it's almost never the claim that people are making. "X is better than bash at creating UIs/database lookups/OO/web programming"? Yeah, of course it is. Water's wet, too.)

Re: A language that compiles to Bash and Windows Batch

#39
post #36
post #2

Looks nice but wouldn't you just use something like Python nowadays?

I love python, but python is not a shell, and it makes an absolutely awful shell replacement. Python is further from a good shell than bash is from being a decent programming language. Some scripts are good, I do use python for some kinds of shell scripts, but most of what I need bash for, python is not a good replacement at all.

But the goal of this is not shell replacement correct? It is a way to write scripts for both platforms. Python has great cross-platform support in that regard: http://hplgit.github.io/edu/ostasks/._ostasks002.html
Post reply on HN