Earlier quoted context omitted.
Hmm, I think this is not supported, but probably not very hard to do it at least for Windows (PE executable). Hard to say about new Ruby versions like 3.x or even 2.x. 1.8.x have pretty simple building process, just grab the old source. You can use --enable-static builds there. Miniruby is build by default, always, because its part of building process. Also, if you are platform are you targeting? Win32 only?
Okey thank you for the details. I am mainly targetting windows but I wouldn’t mind being able to include mac & linux aswell. I wonder if experimenting miniruby with cosmopolitian would help with that?
Ruby: A great language for shell scripts
361–368 of 368 posts
Re: Ruby: A great language for shell scripts
#362Earlier quoted context omitted.
Okey thank you for the details. I am mainly targetting windows but I wouldn’t mind being able to include mac & linux aswell. I wonder if experimenting miniruby with cosmopolitian would help with that?
Im not sure what you mean by this... Anyway, if you want to peek at my stuff, take a look at those 2 urls below. One contains various Ruby 1.8.7 Win32 builds (compiled using older Mingw). Other one is my gperf. All this will work on Win2000 and up. In case of gperf, Windows needs to be en_US build. Anything other will simple not work, because Microsoft with they wisdom, localized perf counter names instead aliasing t…
But Idk, I’m just thinking loudly and probably missing a huge detail which would make the idea non-working.
Also, thanks for the linked resource, I’ll definitely give it a go!
Re: Ruby: A great language for shell scripts
#363I sometimes wonder why we don't see ruby used for shell stuff more often. It inherited most of the good stuff for shell scripting from Perl, and Perl took a lot of it's syntax from sh and sed and awk, so almost anything you can do in shell script you can do in ruby, but with an option of making it gradually less terse and more readable, while having sane variables and data handling from the start. Also ruby is great…
Instability. Ruby has not been the same language for very long. Migrating to 1.9 was a huge hassle for many firms. This may seem like a long time ago in tech years; but then there was Ruby 2.0; and shell scripts, meanwhile, have stayed the same the whole time. A secondary reason is that Ruby has been very slow for much of its life, which means that for situations where you need to run a huge stack of scripts -- init…
Re: Ruby: A great language for shell scripts
#364Earlier quoted context omitted.
Instability. Ruby has not been the same language for very long. Migrating to 1.9 was a huge hassle for many firms. This may seem like a long time ago in tech years; but then there was Ruby 2.0; and shell scripts, meanwhile, have stayed the same the whole time. A secondary reason is that Ruby has been very slow for much of its life, which means that for situations where you need to run a huge stack of scripts -- init…
Alternatively, you can use Crystal instead of Go. Its syntax is almost Ruby one, except mostly for some typing. Standard library is also similar. Binary size and speed is also go-like
Re: Ruby: A great language for shell scripts
#365Earlier quoted context omitted.
> why we don't see ruby used for shell stuff more often Simple, ruby is not installed by default. Even Python, while it is on (almost?) all modern Linux distributions, is not installed on the BSDs.
Maybe this is something that we need to deal no matter what are using (perhaps except if we use sh). Alpine for example doesn't ship Bash. Mac OS ships Ruby and its Bash is quite old.
Re: Ruby: A great language for shell scripts
#366Earlier quoted context omitted.
I tried last month and it was still a mess. The old Ruby extension used to work fine and the new LSP one from Shopify doesn't want to work for whatever reason.
> ... the new LSP one from Shopify doesn't want to work for whatever reason. Sorry, but calling it "a mess" simply because you can't get it to work is quite unfair. I've been using the LSP from Shopify since it came out, it works great, is very stable and updates come in on a regular basis.
Re: Ruby: A great language for shell scripts
#367Earlier quoted context omitted.
Im not sure what you mean by this... Anyway, if you want to peek at my stuff, take a look at those 2 urls below. One contains various Ruby 1.8.7 Win32 builds (compiled using older Mingw). Other one is my gperf. All this will work on Win2000 and up. In case of gperf, Windows needs to be en_US build. Anything other will simple not work, because Microsoft with they wisdom, localized perf counter names instead aliasing t…
What I meant is that compiling cosmopolitan with miniruby would maybe make the miniruby executable APE-format (actually portable executable). That would allow me to run the same executable on all these mentioned platforms. But Idk, I’m just thinking loudly and probably missing a huge detail which would make the idea non-working. Also, thanks for the linked resource, I’ll definitely give it a go!