There are many books on "perl for C/C++ programmers" but none for "C/C+
+ for perl programmers". Does anyone know of any such book or
tutorial?
Thanks in advance,
>Hanna<
|
|
0
|
|
|
|
Reply
|
taurusgemini123 (1)
|
4/28/2011 8:27:57 AM |
|
On Apr 28, 4:27=A0am, l0cl <taurusgemini...@gmail.com> wrote:
> + for perl programmers". Does anyone know of any such book or
> tutorial?
I don't think that they are any, but that's not a problem.
There are many, many books on C and C++, and we each have our
favorites. I can vouch personally for a dozen or so, but I won't. Most
of them will probably get you into C or C++, it depends on what flavor
you want to study.
I like the Deitel series in general, but the focus is on the beginning
programmer. Ivor Horton also wrote a book that focuses on C++ for
the .NET framework and the Microsoft CLR that IMO is a particularly
strong book, but maybe not if you like gcc.
The thing to remember about Perl and C is that Perl is written in C
and expands C greatly. Your biggest challenge with C will be memory
management and pointers, both of which Perl handles in the background.
Why do you want to learn C? If you have a reason to learn C, like
mucking around inside Linux or unix or Perl, have at it. If not, let
me suggest that Perl is probably as close to C as your likely to
really need, and you might want to consider learning another language.
'Seven Languages in Seven Weeks' by Bruce Tate is a reasonable
starting point for exploring other languages on a superficial level.
If you have need, I'd highly recommend exploring Prolog, Erlang,
Haskell, or Lisp (Clojure).
If you prefer a non-standard language, I'd recommend XSLT, R, SQL, and
even LaTeX as something that you can learn quickly and put to use in
many circumstances.
If you want to increase your appeal to employers, I'd recommend you
learn Java or C# or (maybe) Python or Ruby as up-and-coming
technologies. C doesn't make this list because it's a niche language
in industry, and C++ doesn't make the list because it requires
substantially more time and experience to master.
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
Best, CC.
|
|
0
|
|
|
|
Reply
|
ccc31807
|
4/28/2011 2:04:36 PM
|
|
ccc31807 <cartercc@gmail.com> writes:
> On Apr 28, 4:27 am, l0cl <taurusgemini...@gmail.com> wrote:
>> + for perl programmers". Does anyone know of any such book or
>> tutorial?
>
> I don't think that they are any, but that's not a problem.
The only book I know that have both in the title is "Writing Apache
Modules with Perl and C" :-)
> If you want to increase your appeal to employers, I'd recommend you
> learn Java or C# or (maybe) Python or Ruby as up-and-coming
> technologies. C doesn't make this list because it's a niche language
> in industry, and C++ doesn't make the list because it requires
> substantially more time and experience to master.
I don't think there is a programming language that is easy to master;
or: I think they are all somewhat equally hard. And I don't mean
learning the syntax, I mean knowing all ins and outs of the language and
the common libraries/modules.
> http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
Oh, please, does anyone who can actually program take that list any
serious?
--
John Bokma j3b
Blog: http://johnbokma.com/ Facebook: http://www.facebook.com/j.j.j.bokma
Freelance Perl & Python Development: http://castleamber.com/
|
|
0
|
|
|
|
Reply
|
John
|
4/28/2011 2:18:08 PM
|
|
On Apr 28, 10:18=A0am, John Bokma <j...@castleamber.com> wrote:
> >http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
>
> Oh, please, does anyone who can actually program take that list any
> serious?
Hey, it is what it is, and it's worth exactly what you pay for it,
which is nothing.
My personal favorite gauge is dice.com, which tells me exactly what
technologies the HR people in my area think are important, which is
arguably more relevant to my personal situation.
CC.
|
|
0
|
|
|
|
Reply
|
ccc31807
|
4/28/2011 5:44:34 PM
|
|
ccc31807 <cartercc@gmail.com> writes:
> On Apr 28, 10:18 am, John Bokma <j...@castleamber.com> wrote:
>> >http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
>>
>> Oh, please, does anyone who can actually program take that list any
>> serious?
>
> Hey, it is what it is, and it's worth exactly what you pay for it,
> which is nothing.
Mention the link at the end of an argument seems to imply differently,
though ;-)
> My personal favorite gauge is dice.com, which tells me exactly what
> technologies the HR people in my area think are important, which is
> arguably more relevant to my personal situation.
I never understood the whole "I am going to learn this shiny language
because it's in high demand". It just means that one joins the
incompetent crowd; it takes years to become an expert on /any/
programming language (+ libraries/modules).
Useful link: http://norvig.com/21-days.html
Also free ;-)
--
John Bokma j3b
Blog: http://johnbokma.com/ Facebook: http://www.facebook.com/j.j.j.bokma
Freelance Perl & Python Development: http://castleamber.com/
|
|
0
|
|
|
|
Reply
|
John
|
4/28/2011 7:06:21 PM
|
|
On Apr 28, 3:06=A0pm, John Bokma <j...@castleamber.com> wrote:
> I never understood the whole "I am going to learn this shiny language
> because it's in high demand". It just means that one joins the
> incompetent crowd; it takes years to become an expert on /any/
> programming language (+ libraries/modules).
But you do understand the 'This language must be useful for stuff
because a lot of people are using it for stuff', don't you?
I agree that personal decisions shouldn't be driven by the crowd, but
I also think that 'crowd sourcing' can be a smart thing to do. It's
said that the herd is a lot smarter than the individual, and that with
enough eyes all bugs are shallow. Citations omitted.
CC.
|
|
0
|
|
|
|
Reply
|
ccc31807
|
4/28/2011 8:39:03 PM
|
|
ccc31807 <cartercc@gmail.com> writes:
> On Apr 28, 3:06 pm, John Bokma <j...@castleamber.com> wrote:
>> I never understood the whole "I am going to learn this shiny language
>> because it's in high demand". It just means that one joins the
>> incompetent crowd; it takes years to become an expert on /any/
>> programming language (+ libraries/modules).
>
> But you do understand the 'This language must be useful for stuff
> because a lot of people are using it for stuff', don't you?
Not really, at least if you mean: people are using it so it must be
useful [1]. I do understand that a lot of people somehow think that way,
but I don't or at least I try not to. I started with Perl because /I/
considered it useful (this was before the CGI hype). Of course others
helped and still help in seeing the light ;-)
> I agree that personal decisions shouldn't be driven by the crowd, but
> I also think that 'crowd sourcing' can be a smart thing to do.
Oh, I do care about the opinions of others, I mean I am sure I got into
Perl because others mentioned it (can't recall how I exactly got into
it, tbh). But if I was running with the crowd I probably would be coding
in PHP right now (and C back then). Or maybe Ruby. I do have books on
each language (and then some more), but I am actually studying Python
(besides Perl ;-)), and also currently looking into Emacs Lisp (for
obvious reasons) and Haskell.
> It's said that the herd is a lot smarter than the individual,
Depends. This week I have several times noticed that if you put two
people who have half a clue together you don't get the same result as 1
person with clue. I have even the feeling that the sum of 2 people with
half a clue is less than half (or even less) a clue.
> and that with enough eyes all bugs are shallow.
There are plenty of examples of bugs that have been in OSS for 10+
years. So enough eyes in itself is not enough. On top of that, we've all
seen (and made) bugs that even good eyes would read over the first
/several/ times.
Anyway, I recommend to learn a language because one wants to. Not
because others consider it useful / good / perfect. Nor because the most
jobs available are for that language. Nor would I recommend to ignore a
language because the crowd considers it "teh suck" (otherwise, why code
Perl).
[1] based on that I should consider religion useful for myself.
--
John Bokma j3b
Blog: http://johnbokma.com/ Facebook: http://www.facebook.com/j.j.j.bokma
Freelance Perl & Python Development: http://castleamber.com/
|
|
0
|
|
|
|
Reply
|
John
|
4/28/2011 10:04:12 PM
|
|
On Apr 28, 6:04=A0pm, John Bokma <j...@castleamber.com> wrote:
> Not really, at least if you mean: people are using it so it must be
> useful [1]. I do understand that a lot of people somehow think that way,
> but I don't or at least I try not to. I started with Perl because /I/
> considered it useful (this was before the CGI hype). Of course others
> helped and still help in seeing the light ;-)
Okay, try a thought experiment: take a group of languages that were
developed at about the same time, and figure out why some lived while
most died. Once, Java was just a gleam in James Gosling's eye, now
(judging by the number of published books) it's very popular. Why?
It's because a large number of people found it useful for productive
labor, IOW, it succeeded in the market of programming languages.
> Oh, I do care about the opinions of others, I mean I am sure I got into
> Perl because others mentioned it (can't recall how I exactly got into
> it, tbh). But if I was running with the crowd I probably would be coding
> in PHP right now (and C back then). Or maybe Ruby. I do have books on
> each language (and then some more), but I am actually studying Python
> (besides Perl ;-)), and also currently looking into Emacs Lisp (for
> obvious reasons) and Haskell.
I have been trying to learn Common Lisp for several years, and am now
beginning to rewrite some of my Perl scripts in Lisp. It's simply
AMAZING how little Lisp code will do the same job as a bunch of Perl
code. If you are interested in collaborating on some Lisp stuff, let
me know.
I'm also using emacs, but only for limited purposes. I find vi (vim)
much, much more useful.
> Depends. This week I have several times noticed that if you put two
> people who have half a clue together you don't get the same result as 1
> person with clue. I have even the feeling that the sum of 2 people with
> half a clue is less than half (or even less) a clue.
I have worked with pair programming, using agile techniques, and I can
vouch from personal experience that two people working together can
get a lot more done than the same two people working alone. This isn't
hype, it's simply my experience.
> Anyway, I recommend to learn a language because one wants to. Not
> because others consider it useful / good / perfect. Nor because the most
> jobs available are for that language. Nor would I recommend to ignore a
> language because the crowd considers it "teh suck" (otherwise, why code
> Perl).
I agree, with the caveat that the desire to learn a particular
language comes at least in part from seeing others use the language. I
learned Perl because at the time it was the 'glue of the internet' so
at least in my case the popularity of Perl was the key factor.
CC.
|
|
0
|
|
|
|
Reply
|
cartercc (419)
|
4/29/2011 1:27:57 PM
|
|
ccc31807 <cartercc@gmail.com> writes:
> On Apr 28, 6:04 pm, John Bokma <j...@castleamber.com> wrote:
>> Not really, at least if you mean: people are using it so it must be
>> useful [1]. I do understand that a lot of people somehow think that way,
>> but I don't or at least I try not to. I started with Perl because /I/
>> considered it useful (this was before the CGI hype). Of course others
>> helped and still help in seeing the light ;-)
>
> Okay, try a thought experiment: take a group of languages that were
> developed at about the same time, and figure out why some lived while
> most died. Once, Java was just a gleam in James Gosling's eye, now
> (judging by the number of published books) it's very popular. Why?
> It's because a large number of people found it useful for productive
> labor, IOW, it succeeded in the market of programming languages.
And it had nothing to do with the massive marketting of Sun, of course
;-)
But no need for a thought experiment; I am fully aware that a large
number of people just follow something because somehow they have an urge
to follow. On top of that, those people have also a greater urge to piss
on everything in direct competition of what they follow /and/ no problem
to make up all kind of bullshit (and believing it!) about what they
follow, and the direct competition. One of the reasons I am hesitant to
jump on a bandwagon, say A, is that I don't like singing, especially:
A is good, A is perfect, A is the best!!!
And what sucks?
All together now!!!
B!! B sucks, B is evil, B is the work of the devil!!
If you use B you go straight to hell
Even for small things, B doesn't do well!
> I have been trying to learn Common Lisp for several years, and am now
> beginning to rewrite some of my Perl scripts in Lisp. It's simply
> AMAZING how little Lisp code will do the same job as a bunch of Perl
> code. If you are interested in collaborating on some Lisp stuff, let
> me know.
Maybe in the future, sure. I want to look further into Emacs Lisp, and
then who knows.
> I'm also using emacs, but only for limited purposes. I find vi (vim)
> much, much more useful.
Not to start a war (I use both) but in what way?
>> Depends. This week I have several times noticed that if you put two
>> people who have half a clue together you don't get the same result as 1
>> person with clue. I have even the feeling that the sum of 2 people with
>> half a clue is less than half (or even less) a clue.
>
> I have worked with pair programming, using agile techniques, and I can
> vouch from personal experience that two people working together can
> get a lot more done than the same two people working alone. This isn't
> hype, it's simply my experience.
Like I said: depends. And I did pair programming in the 90's. I don't
think it was called agile or anything else, back then. And I do agree it
does make a difference at times. At other times, when it's clear what
has to be done, in my experience, it just works much better if each
writes his/her own code.
>> Anyway, I recommend to learn a language because one wants to. Not
>> because others consider it useful / good / perfect. Nor because the most
>> jobs available are for that language. Nor would I recommend to ignore a
>> language because the crowd considers it "teh suck" (otherwise, why code
>> Perl).
>
> I agree, with the caveat that the desire to learn a particular
> language comes at least in part from seeing others use the language.
Of course. Or reading a book on it. I have here a few books on
programming languages I haven't seen anyone code in, nor have I seen any
code in it. It's just curiosity.
> I learned Perl because at the time it was the 'glue of the internet'
> so at least in my case the popularity of Perl was the key factor.
I learned Java not only because it was hard to not have a peek at it,
but also because it was easy to do some graphic stuff in it (my site has
stil some simple applets :-) ).
--
John Bokma j3b
Blog: http://johnbokma.com/ Facebook: http://www.facebook.com/j.j.j.bokma
Freelance Perl & Python Development: http://castleamber.com/
|
|
0
|
|
|
|
Reply
|
john167 (400)
|
4/29/2011 4:54:09 PM
|
|
John Bokma <john@castleamber.com> wrote:
> I am fully aware that a large
> number of people just follow something because somehow they have an urge
> to follow. On top of that, those people have also a greater urge to piss
> on everything in direct competition of what they follow /and/ no problem
> to make up all kind of bullshit (and believing it!) about what they
> follow, and the direct competition. One of the reasons I am hesitant to
> jump on a bandwagon, say A, is that I don't like singing, especially:
>
>
> A is good, A is perfect, A is the best!!!
> And what sucks?
> All together now!!!
> B!! B sucks, B is evil, B is the work of the devil!!
> If you use B you go straight to hell
> Even for small things, B doesn't do well!
I apply that even within just the Perl language.
Regarding TMTOWTDI,
In Perl there are 9 ways of doing any particular thing,
but 8 of them suck.
:-)
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
|
|
0
|
|
|
|
Reply
|
tadmc (542)
|
4/29/2011 5:57:02 PM
|
|
Tad McClellan <tadmc@seesig.invalid> writes:
> John Bokma <john@castleamber.com> wrote:
>
>> I am fully aware that a large
>> number of people just follow something because somehow they have an urge
>> to follow. On top of that, those people have also a greater urge to piss
>> on everything in direct competition of what they follow /and/ no problem
>> to make up all kind of bullshit (and believing it!) about what they
>> follow, and the direct competition. One of the reasons I am hesitant to
>> jump on a bandwagon, say A, is that I don't like singing, especially:
>>
>>
>> A is good, A is perfect, A is the best!!!
>> And what sucks?
>> All together now!!!
>> B!! B sucks, B is evil, B is the work of the devil!!
>> If you use B you go straight to hell
>> Even for small things, B doesn't do well!
>
>
> I apply that even within just the Perl language.
>
> Regarding TMTOWTDI,
>
> In Perl there are 9 ways of doing any particular thing,
> but 8 of them suck.
>
> :-)
Certainly. I think that once you can tell what sucks within a language,
and give a good explanation of why it sucks, you're no longer a
beginner. I have a high distrust of people who claim that a programming
language is perfect (and more if they tell me it's easy to learn, in a
few days even...)
Perl sucks in a lot of places in many ways. But it very often gets done
what needs to be done in a way I like. I once told a close friend that
Python is to me like my desk: I keep my desk and extremely
organized. People visiting me the first time might think that I just got
the desk (or even that we just moved in), or haven't been working for a
while :-). But Perl is more like the place where I like to relax: some
mess allowed, and if I want to put my feet on the table I can :-).
If Python is close to math, then Perl is close to psychology: people who
use it are somewhat nuts and are consulted by people with problems :-).
--
John Bokma j3b
Blog: http://johnbokma.com/ Facebook: http://www.facebook.com/j.j.j.bokma
Freelance Perl & Python Development: http://castleamber.com/
|
|
0
|
|
|
|
Reply
|
john167 (400)
|
4/29/2011 6:19:10 PM
|
|
On Apr 29, 12:54=A0pm, John Bokma <j...@castleamber.com> wrote:
> > I'm also using emacs, but only for limited purposes. I find vi (vim)
> > much, much more useful.
>
> Not to start a war (I use both) but in what way?
The easy answer is because I'm pretty productive with it. A longer
answer would involve how I work, which gets into habits and
personality. If I had to give an answer in 25 words or less to a
person unfamiliar with either, I would say, 'vi is optimized for
editing speed and nothing else. emacs is optimized for many different
things. Most of the time, I just want to edit, hence vi.'
> I learned Java not only because it was hard to not have a peek at it,
> but also because it was easy to do some graphic stuff in it (my site has
> stil some simple applets :-) ).
A number of years ago, I did a major project in Java, and during the
project, the light bulb lit up. We were doing pair programming, a
multi-threaded application, writing the tests first, the classes
second, and the integration stuff last. I realized that Java was meant
for large projects with many parts and many people working on them. I
haven't written anything in Java for several years, but if I had to do
a large project, it would be my first choice.
Java is a good language, for its niche. So is Perl. Any tool that does
its job well is a joy to use. I even had a brush with Microsoft's CLI-C
++, and felt that Microsoft had done a very good job with it.
I've played with some languages lately that run on the JVM, Scala and
Clojure, and I'm beginning to develop a strong distaste for the JVM.
CC.
|
|
0
|
|
|
|
Reply
|
cartercc (419)
|
4/29/2011 7:22:29 PM
|
|
ccc31807 <cartercc@gmail.com> writes:
> On Apr 29, 12:54 pm, John Bokma <j...@castleamber.com> wrote:
>> > I'm also using emacs, but only for limited purposes. I find vi (vim)
>> > much, much more useful.
>>
>> Not to start a war (I use both) but in what way?
>
> The easy answer is because I'm pretty productive with it.
I think that a good programmer can be pretty productive on a type
writer, or even on a piece of paper ;-)
I guess that what you mean by "pretty productive" is that the editor
makes you happy/feel good. At least, that's how I feel about Emacs; I
like how it works, and what it can do. But I don't think I produce more
Perl code or of a better quality compared to using Textpad (which I used
a lot in the past).
> A longer answer would involve how I work, which gets into habits and
> personality. If I had to give an answer in 25 words or less to a
> person unfamiliar with either, I would say, 'vi is optimized for
> editing speed and nothing else. emacs is optimized for many different
> things. Most of the time, I just want to edit, hence vi.'
Does this "many different things" include editing speed? ;-). Anyway, I
think I understand, and that's what I like about Emacs: I can switch to
GNUS and am still in the same program. I want to using Emacs for email
a try (still Thunderbird).
>> I learned Java not only because it was hard to not have a peek at it,
>> but also because it was easy to do some graphic stuff in it (my site has
>> stil some simple applets :-) ).
>
> A number of years ago, I did a major project in Java, and during the
> project, the light bulb lit up. We were doing pair programming, a
> multi-threaded application, writing the tests first, the classes
> second, and the integration stuff last. I realized that Java was meant
> for large projects with many parts and many people working on them. I
> haven't written anything in Java for several years, but if I had to do
> a large project, it would be my first choice.
Yeah, I can see that. Maybe the same here, if Java is an option, of
course. I have somewhat the same feeling about Python, and less about
Perl. Not saying that large projects are not possible in Perl, just that
I have a (vague?) feeling about it ;-)
> Java is a good language, for its niche. So is Perl.
Yup, I think that most languages are OK for their niche. With Perl it's
often OK, most of the times good enough, and at times a joy to use.
> I've played with some languages lately that run on the JVM, Scala and
> Clojure, and I'm beginning to develop a strong distaste for the JVM.
Why?
--
John Bokma j3b
Blog: http://johnbokma.com/ Facebook: http://www.facebook.com/j.j.j.bokma
Freelance Perl & Python Development: http://castleamber.com/
|
|
0
|
|
|
|
Reply
|
john167 (400)
|
4/29/2011 7:54:35 PM
|
|
On Apr 29, 3:54=A0pm, John Bokma <j...@castleamber.com> wrote:
>
> > I've played with some languages lately that run on the JVM, Scala and
> > Clojure, and I'm beginning to develop a strong distaste for the JVM.
>
> Why?
Have you ever tried to write write Scala or Clojure? Both use the JVM,
and the compile/run cycle is a nightmare. If you don't know better, it
might be acceptable, but if you are used to the Lisp compile/run
cycle, it's gut-wrenching.
This probably isn't a fair test, but it's my experience.
CC.
|
|
0
|
|
|
|
Reply
|
cartercc (419)
|
5/2/2011 1:38:27 PM
|
|
l0cl <taurusgemini123@gmail.com> writes:
> There are many books on "perl for C/C++ programmers" but none for "C/C+
> + for perl programmers". Does anyone know of any such book or
> tutorial?
I don't know of any such books, but ...
<OT>
If you want to learn C/C++, the first thing you need to learn is
that there's no such thing as C/C++.
C and C++ are closely related languages (C is almost, but not quite,
a subset of C++), but they're quite distinct. Well-written C code
can typically be made into valid C++ code without much effort, but
the result is unlikely to be well-written C++ code. Some examples:
where C code uses arrays, C++ code would more likely use vectors.
Where C uses malloc() and free(), C++ uses new and delete.
For learning C, I recommend "The C Programming Language, 2nd
Edition", by Kernighan & Ritchie (K&R2).
For C++, consider "Accelerated C++" by Andrew Koenig & Barbara Moo
<http://www.acceleratedcpp.com/>; its approach is to start with
useful concepts rather than primitive ones. (For example, pointers
are introduced several chapters in as a special kind of iterator.)
There's a newsgroup alt.comp.lang.learn.c-c++ that, as the name
implies, deals with both languages.
</OT>
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21464)
|
5/2/2011 6:40:25 PM
|
|
Hi.
On Mon 02 May 2011 at 02:40 PM, Keith Thompson wrote:
> For C++, consider "Accelerated C++" by Andrew Koenig & Barbara Moo
> <http://www.acceleratedcpp.com/>; its approach is to start with useful
> concepts rather than primitive ones. (For example, pointers are
> introduced several chapters in as a special kind of iterator.)
For people who want to learn C++ as a first programming language, I
recommend Bjarne Stroustrup's "Programming: Principles and Practice
Using C++". The author has a website at
http://www.stroustrup.com/Programming
If you already have programming experience, Koenig & Moo is a very good
choice.
--
Art Werschulz (8-{)} "Metaphors be with you." -- bumper sticker
GCS/M (GAT): d? -p+ c++ l++ u+ P++ e--- m* s n+ h f g+ w+ t+ r-
Net: agw@dsm.fordham.edu http://www.dsm.fordham.edu/~agw
Phone: Fordham U. (212) 636-6325, Columbia U. (646) 775-6035
|
|
0
|
|
|
|
Reply
|
agw (59)
|
5/3/2011 12:59:30 PM
|
|
|
15 Replies
659 Views
(page loaded in 0.252 seconds)
|