[ale] C programming tips
Prasanna Subash
subash at skyline.external.hp.com
Tue Jul 9 13:08:17 EDT 2002
I program in C/C++ a lot... but few years ago we tried to do a
2+2+2+2+2+2+2.... that spans few lines in C/C++ and PERL. Perl kicked C/C++
right out of the water.
------------------------------------------------------------------------
Prasanna Subash |
Linux, the choice | Appearances often are deceiving. -- Aesop
of a GNU generation -o) |
Kernel 2.5.18 /\ |
on a i686 _\_v |
|
------------------------------------------------------------------------
On Tuesday 02 July 2002 18:47, cfowler wrote:
> How many more cycles and memory is wasted on that?
>
> C is easy.
>
> On Tue, 2002-07-02 at 18:35, Fletch wrote:
> > >>>>> "Randy" == Randy Janinda <rjaninda at tqlabs.com> writes:
> >
> > Randy> Hello everyone, I've finally taken the time to learn C
> > Randy> (atleast the basics). I have written a few small utilities
> > Randy> and my first C socket code (woo hooo!). I now need some
> > Randy> resources to help me get a handle on string matching. I
> > Randy> come from Perl, where regex's rock and am looking for the
> > Randy> some C equivalents to matching words, patterns, etc. So far
> > Randy> I've found regcomp() and regexec() but no useful examples
> > Randy> on how to use them. Anyone have pointyers or resources
> > Randy> they would like to share?
> >
> > Don't bother with C. :)
> >
> >
> > Half serious there, but with Inline::C you can use perl for
> > all of the stuff that's easy in perl and easily incorporate C chunks
> > where it's necessary (raw speed bit twiddling, talking to hardware,
> > linking to other libraries). I'll take
> >
> >
> > use IO::Socket::INET ();
> > my $sock = IO::Socket::INET->new( PeerAddress => 'foo.bar.com',
> > PeerPort => 80, );
> >
> >
> > over the 20-30 lines of C necessary to accomplish the same
> > thing any day.
> >
> >
> >
> > --
> > Fletch | "If you find my answers frightening, __`'/|
> > fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
> > 770 933-0600 x211(w) | scary questions." -- Jules
> > =(___)= 770 294-0820 (m) |
> > U
> >
> > ---
> > This message has been sent through the ALE general discussion list.
> > See http://www.ale.org/mailing-lists.shtml for more info. Problems should
> > be sent to listmaster at ale dot org.
>
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should
> be sent to listmaster at ale dot org.
--
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list