Shot (Piotr Szotkowski)
1/17/2007 6:45:00 PM
Thanks a lot for your reply, Ed!
M. Edward (Ed) Borasky:
> Are you allowed to use existing open source C/C++ libraries for the
> low-level operations, or do you need to implement the whole thing
> yourself?
I'm allowed to use anything I want. My supervisor created a couple
of C++ libraries that he thinks I might reuse (but I don't have to).
> I'd recommend a hybrid approach -- find some libraries
> that do the hard stuff and wrap them in Ruby using SWIG.
Thanks for pointing out SWIG (I'm still a total newbie in the whole
Ruby/OCaml <-> C/C++ interface possibilities, unfortunately; I should
read a lot more on this, but have to make some desions this weekend...).
I'll do all the background reading, of course, but a quick question:
assuming that I have some (objective) C++ classes already, how
easy would it be to use them in Ruby/OCaml? (So far I thought the
C integration was doable, but not necessarily C++, hence my a-bit-blind
shooting-in-the-fog quetions.)
> Do you know Lisp or Scheme?
Neither, unfortunately. Learning Lisp is on my to-do-after-hours list
for a long time already, but it turns out having a full-time IT job next
to the PhD studies means the rare free time I have is best spent away
from the computer, unless I want to lost the rest of my social skills.
;)
I'd love to finally have an excuse to learn Lisp, but I'm affraid I can
only either choose from bringing my Ruby skills up a notch and learning
enough C/C++ to fill in the gaps or commit myself full-time to C++.
(That is, until Benjohn pointed-out OCaml; hmmm...)
> Shot (Piotr Szotkowski) wrote:
>> Ruby with C extensions.
> This is probably where you'll end up. However, as a general rule,
> perhaps 20 percent of the code will need to be in C or C++, not
> 90 percent.
Hmmm, that's tempting. Ruby and me somehow click together nicely, in the
'hey, after two months I still know what I thought writing these!' way
that doesn't seem to happen so much with other languages.
> And as I noted above, if you're allowed to use existing C/C++
> libraries, you might not have to write anything except SWIG .i
> (interface definition) files.
Tempting, again. It seems I'll read up on SWIG a bit this weekend. :)
>> Pure C++
> It probably won't come to this, but if it does, well, C++
> programming is a very marketable skill once you have your PhD. :)
Erm, ye-ah, but... My best job so far is the (current) CiviCRM
web-developement (PHP), and while working with Ruby on Rails instead
would definitely be an improvement, working with C++... well, wouldn't,
to say the least. ;)
(Or maybe I'm just too stupid for the whole mess of header files,
makefiles, compilations, Windows/Linux *almost*-portability and cryptic
runtime errors of everything I ever wrote in C/C++. Or, hopefully,
simply too spoiled by Ruby.)
-- Shot
--
I always thought Smalltalk would beat Java, I just didn't
know it would be called 'Ruby' when it did. -- Kent Beck