[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Joe Van Dyk

2/28/2006 1:12:00 AM

Someone needs to make a "C++ for Ruby programmers" book. I'm getting
assigned to work on a C++ project now and it's making me cry. Not
only have I forgotten all of the C++ that I used to know, I actually
have to compile stuff!

I guess I should get more experienced in C++, as variety is good. But
it's still painful.

Joe


16 Answers

tsumeruby

2/28/2006 1:43:00 AM

0

On Tue, 2006-02-28 at 10:12 +0900, Joe Van Dyk wrote:
> Someone needs to make a "C++ for Ruby programmers" book. I'm getting
> assigned to work on a C++ project now and it's making me cry. Not
> only have I forgotten all of the C++ that I used to know, I actually
> have to compile stuff!
>
> I guess I should get more experienced in C++, as variety is good. But
> it's still painful.

Heres a patch

Tsume

--- Programming_Project.old 2006-02-28 10:42:13.000000000 +0900
+++ Programming_Project 2006-02-28 10:43:57.000000000 +0900
@@ -1 +1 @@
-Project must be creating using C++
+Project must be creating using C++. Also, embedding ruby is okay.



Gregory Seidman

2/28/2006 1:44:00 AM

0

On Tue, Feb 28, 2006 at 10:12:22AM +0900, Joe Van Dyk wrote:
} Someone needs to make a "C++ for Ruby programmers" book. I'm getting
} assigned to work on a C++ project now and it's making me cry. Not
} only have I forgotten all of the C++ that I used to know, I actually
} have to compile stuff!
}
} I guess I should get more experienced in C++, as variety is good. But
} it's still painful.

Think of the compiler as the interpreter, and templates as duck-typed Ruby.
Do as much as you can with meta-programming, since it should be comfortable
from a Ruby background. The rest... the rest is just syntax.

} Joe
--Greg



Daniel Nugent

2/28/2006 2:04:00 AM

0

Just include the Ruby extension binaries and write it using the Ruby C calls!

On 2/27/06, Gregory Seidman <gsslist+ruby@anthropohedron.net> wrote:
> On Tue, Feb 28, 2006 at 10:12:22AM +0900, Joe Van Dyk wrote:
> } Someone needs to make a "C++ for Ruby programmers" book. I'm getting
> } assigned to work on a C++ project now and it's making me cry. Not
> } only have I forgotten all of the C++ that I used to know, I actually
> } have to compile stuff!
> }
> } I guess I should get more experienced in C++, as variety is good. But
> } it's still painful.
>
> Think of the compiler as the interpreter, and templates as duck-typed Ruby.
> Do as much as you can with meta-programming, since it should be comfortable
> from a Ruby background. The rest... the rest is just syntax.
>
> } Joe
> --Greg
>
>
>


--
-Dan Nugent


Wilson Bilkovich

2/28/2006 2:34:00 AM

0

On 2/27/06, Joe Van Dyk <joevandyk@gmail.com> wrote:
> Someone needs to make a "C++ for Ruby programmers" book. I'm getting
> assigned to work on a C++ project now and it's making me cry. Not
> only have I forgotten all of the C++ that I used to know, I actually
> have to compile stuff!
>
> I guess I should get more experienced in C++, as variety is good. But
> it's still painful.
>

In addition to what the others mentioned, you can also write Ruby code
that spits out C++ for you:
http://www.codegeneration...


Karl von Laudermann

2/28/2006 2:41:00 PM

0

Joe Van Dyk wrote:
>
> I guess I should get more experienced in C++, as variety is good. But
> it's still painful.

As a professional software engineer, I've used a number of different
languages throughout my career, both professionally and personally. I
agree that variety is good; the more languages you've used, the broader
your perspective gets and the better a programmer you become
indepentent of the language that you're currently using.

That said, it's been almost 4 years since I've had to code in C++, and
I'll die a happy man if I never have to use that particular language
again. :-/

Gregory Brown

2/28/2006 3:45:00 PM

0

On 2/27/06, Joe Van Dyk <joevandyk@gmail.com> wrote:
> Someone needs to make a "C++ for Ruby programmers" book. I'm getting
> assigned to work on a C++ project now and it's making me cry. Not
> only have I forgotten all of the C++ that I used to know, I actually
> have to compile stuff!
>
> I guess I should get more experienced in C++, as variety is good. But
> it's still painful.

As I've been painfully drudging through a C++ & OO Design course, I've
found that using Rake for automating builds and Cutee for unit tests
makes life a little less... sucky?


Jeff Schwab

2/28/2006 4:35:00 PM

0

Joe Van Dyk wrote:
> Someone needs to make a "C++ for Ruby programmers" book. I'm getting
> assigned to work on a C++ project now and it's making me cry. Not
> only have I forgotten all of the C++ that I used to know, I actually
> have to compile stuff!
>
> I guess I should get more experienced in C++, as variety is good. But
> it's still painful.

I love the C++ programming language. I'm not going to compare it to
other languages (and thereby risk jihad), but there is a part of me that
will always consider C++ the One True Language. It is extraordinarily
verbose, and the syntax, uh, leaves something to be desired, but C++
offers remarkably powerful facilities at both the lowest and the most
abstract levels. It has fantastic support for both static and dynamic
techniques, and a well-tuned C++ program can have mind-blowingly great
performance without sacrificing conceptual simplicity.

If you have any trouble at all, surf on over to comp.lang.c++.moderated.
You may be as amazed as I always am at the brilliance of many of the
contributors. Wear your thick skin, though; the conversation tends to
be a little harsher there than in the dynamic language groups. :)

ptkwt

2/28/2006 6:28:00 PM

0

In article <20060228014338.GA22949@anthropohedron.net>,
Gregory Seidman <gsslist+ruby@anthropohedron.net> wrote:
>On Tue, Feb 28, 2006 at 10:12:22AM +0900, Joe Van Dyk wrote:
>} Someone needs to make a "C++ for Ruby programmers" book. I'm getting
>} assigned to work on a C++ project now and it's making me cry. Not
>} only have I forgotten all of the C++ that I used to know, I actually
>} have to compile stuff!
>}
>} I guess I should get more experienced in C++, as variety is good. But
>} it's still painful.
>
>Think of the compiler as the interpreter, and templates as duck-typed Ruby.
>Do as much as you can with meta-programming, since it should be comfortable
>from a Ruby background. The rest... the rest is just syntax.

Lots and lots of syntax....

Just a crazy idea: we've got SWIG that lets us access our C++ objects in Ruby,
how about something that goes the other way so that Ruby class definitions get
translated to C++ code?

Phil

Joe Van Dyk

3/1/2006 1:50:00 AM

0

On 2/27/06, Gregory Seidman <gsslist+ruby@anthropohedron.net> wrote:
> On Tue, Feb 28, 2006 at 10:12:22AM +0900, Joe Van Dyk wrote:
> } Someone needs to make a "C++ for Ruby programmers" book. I'm getting
> } assigned to work on a C++ project now and it's making me cry. Not
> } only have I forgotten all of the C++ that I used to know, I actually
> } have to compile stuff!
> }
> } I guess I should get more experienced in C++, as variety is good. But
> } it's still painful.
>
> Think of the compiler as the interpreter, and templates as duck-typed Ruby.
> Do as much as you can with meta-programming, since it should be comfortable
> from a Ruby background. The rest... the rest is just syntax.
>
> } Joe
> --Greg

1. Templates (that aren't in the STL) scare me.
2. I've looked at the source code for the Boost library and ran away screaming.
3. If I did write code like that, then not many people in my group
would be able to easily grok my code. Perhaps they'll just need to
bone up on the newest C++ stuff and read the requisite 8 books before
touching my code.


Gregory Brown

3/1/2006 1:56:00 AM

0

On 2/28/06, Jeffrey Schwab <jeff@schwabcenter.com> wrote:

> If you have any trouble at all, surf on over to comp.lang.c++.moderated.
> You may be as amazed as I always am at the brilliance of many of the
> contributors. Wear your thick skin, though; the conversation tends to
> be a little harsher there than in the dynamic language groups. :)


No MINASWAN to protect you over there? :-(