Earlier quoted context omitted.
> 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...
Who cares if Python can technically do it? If you have a CLI tool based around Bash, why would you want to rewrite it in Python and have to support it yourself and spend those man hours doing it?
A language that compiles to Bash and Windows Batch
111–120 of 148 posts
Re: A language that compiles to Bash and Windows Batch
#112Earlier quoted context omitted.
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.
Windows servers are a dying breed and Microsoft knows it, they've lost that war and are quickly porting everything they can to run on Linux including their .Net runtime and Sql Server; they know they've lost the war, it's only a matter of time.
Re: A language that compiles to Bash and Windows Batch
#113The 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 loved the idea. Some years ago, I was making a project that many parts of the build process depended on simple file copies (that this can do right) and ImageMagik calls (that are the same in all OSes) I ended having to keep writing the same scripts over and over again in Batch and Bash, it was quite a pain to maintain, and it was obvious that there had to be some way to do it automatically (port one to the other, o…
Re: A language that compiles to Bash and Windows Batch
#114Earlier quoted context omitted.
> 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...
Who cares if Python can technically do it? If you have a CLI tool based around Bash, why would you want to rewrite it in Python and have to support it yourself and spend those man hours doing it?
Re: A language that compiles to Bash and Windows Batch
#115Looks nice but wouldn't you just use something like Python nowadays?
What if you want to build Python? Oh, that' easy, you unpack the Python sources and start with: ./configure But what is that? It's not written in Python. It can't be, because you don't have Python yet. It's a shell script. It's not a hand-maintained shell script; it's written by expanding Autoconf macros (in the M4 preprocessing language) to shell code: essentially a compiler from another language to shell. A cleaner…
The GHC folks are rewriting their jungle of recursive Makefiles in Shake, a Haskell-based build system.
I think you only need the ability to build a cross compiler for this to work.
Re: A language that compiles to Bash and Windows Batch
#116Earlier quoted context omitted.
I loved the idea. Some years ago, I was making a project that many parts of the build process depended on simple file copies (that this can do right) and ImageMagik calls (that are the same in all OSes) I ended having to keep writing the same scripts over and over again in Batch and Bash, it was quite a pain to maintain, and it was obvious that there had to be some way to do it automatically (port one to the other, o…
Why can't you use the windows versions of bash?
Re: A language that compiles to Bash and Windows Batch
#117Re: A language that compiles to Bash and Windows Batch
#118Earlier quoted context omitted.
Who cares if Python can technically do it? If you have a CLI tool based around Bash, why would you want to rewrite it in Python and have to support it yourself and spend those man hours doing it?
Because then you wouldn't have to write in Bash...
Re: A language that compiles to Bash and Windows Batch
#119Re: A language that compiles to Bash and Windows Batch
#120Earlier quoted context omitted.
These days you probably want Windows Powershell. It's built on the .NET framework so it's pretty darn powerful and AFAIK is available by default on every modern WinOS.
Powershell _is_ great (I help run an OSS project written in Powershell), but it has a long start-up time. If you're doing it as a pre-build step for example, you don't want to add potentially seconds (!) to your build just to use powershell.