[ale] Ruby vs C, a non-technical chat
Michael Trausch
mike at trausch.us
Thu Aug 6 13:30:01 EDT 2015
With any compiled language, it depends on how it is linked.
Statically linked binaries incorporate all their library code and therefore are self sufficient. You can write code in c, c++, go, rust, swift, Ada, and even Java (1.4 in gcc), compile the object files, and then link statically to have a single file distributable.
This is how I write my portable software that has to run on windows. On Linux I dynamically link since all the components I use are already installed there. The major thing I statically link onWindows is the Cairo graphics library, which is far easier for me to use than GDI or GDI+.
Sent from my iPad
> On Aug 6, 2015, at 1:12 PM, leam hall <leamhall at gmail.com> wrote:
>
>> On Thu, Aug 6, 2015 at 12:58 PM, Ed Cashin <ecashin at noserose.net> wrote:
>> Responding to, 'With Ruby, I can say "It's on the machines, so I can use it"'...
>>
>> If you write a Ruby script, that script has to be deployed to the target where it will run, so that's one file being added that wasn't on the machines before.
>>
>> If you write a Go program and compile it, you get a statically linked executable (if you are using regular go), which is also one file that has to be deployed to the target where it will run.
>>
>> Either way, you have to add one file that wasn't there to the target machine. So if you don't install the Go build tools on the targets, the distinction isn't significant.
>>
>> This is an advantage Go has over a lot of other compiled languages. It avoids some of the dependency hell that motivated people to adopt Docker and containers. It's kind of ironic.
>
> Ed, sorry if I'm confused. If I compile a Go program and drop it on a server without any other Go tools, the program will run? That assumes it's not calling anything else, but something like "Hello world!"?
>
> The C advantage is that you can pretty much assume the needed stuff is there. With Ruby, you have to install the interpreter. If you use the system's Ruby version you have to spend 3-5 lines of IRC chat explaining one more time why you aren't interested in updating to the latest Ruby on hundreds or thousands of machines, just so your simple script can run.
>
> Leam
>
> --
> Mind on a Mission
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20150806/018bb871/attachment.html>
More information about the Ale
mailing list