Are there any generally accepted reasons, speed apart, for which one
would want to port a daemon from ruby to C++?
Ease-of-installation. It’s likely more systems have a C++ toolchain
installed than a Ruby runtime. The Ruby world evolves more rapidly than
C++, so users are more likely to have to deal with installation issues,
especially tough for users unfamiliar with Ruby.
It doesn’t help that stable versions of Linux distros tend to ship Ruby
versions which are several years old, so users end up having to manage
Ruby installs themselves (or resort to 3rd-party tools like rbenv/rvm).
I don’t know C++, but I have some experience with Perl vs C99: I wrote
an experimental server[1] in C99 and GNU autotools. Its main claim to
popularity within the small community of MogileFS users seems to be its
ease-of-build, install and deploy as a single file (compared to its Perl
equivalent). I don’t think users cared that it was a new, relatively
unproven codebase written from scratch, nor that it does strange things
unseen/uncommon in mainstream servers.
Are there any generally accepted reasons, speed apart, for which
one would want to port a daemon from ruby to C++?
No other reason makes sense.
speed is the only reason.
The laziness of some admins nor the incompetence of distributions to
provide users with components that can easily be updated on its own,
won’t function as excuse to be able to update a system.
So the proper answer is speed.
You do gain more advantages with C++ though because you can use other
languages like python as well. Or lua, whereas if you use only ruby, you
are stuck with ruby - AND it is slow!
Ease-of-installation. It’s likely more systems have a C++ toolchain
installed than a Ruby runtime. The Ruby world evolves more rapidly than
C++, so users are more likely to have to deal with installation issues,
especially tough for users unfamiliar with Ruby.
My two eurocents: Ruby is much better in implementing the OO paradigm
than C++. Thus, writing Ruby extensions in C++ is not a good idea,
unless you write C code and have it compiled under C++, which is what
many do. But in that case, it is much better to just use C (and not
get forever lost in the messy tangle of STL and other wonders).
On Mon, Feb 24, 2014 at 11:02 AM, Carlo E. Prelz [email protected]
wrote:
My two eurocents: Ruby is much better in implementing the OO paradigm
than C++. Thus, writing Ruby extensions in C++ is not a good idea,
unless you write C code and have it compiled under C++, which is what
many do. But in that case, it is much better to just use C (and not
get forever lost in the messy tangle of STL and other wonders).
Not sure what you are getting at: this is about Ruby vs. C++ - not
mixing both. The question was about porting a demon from Ruby to C++
On Mon, Feb 24, 2014 at 12:59 PM, Carlo E. Prelz [email protected]
wrote:
maintaining the daemon in Ruby, but code the parts that require
a performance boost in C.
So basically you were slightly changing the question to “Are there any
generally accepted reasons, speed apart, for which one would want to
port a daemon [or parts of it] from ruby to C++?”
Not sure what you are getting at: this is about Ruby vs. C++ - not
mixing both. The question was about porting a demon from Ruby to C++
not parts of it. What did I miss?
Instead of thinking about porting from Ruby to C++, you can think of
maintaining the daemon in Ruby, but code the parts that require
a performance boost in C.