[ale] C programming tips

James P. Kinney III jkinney at localnetsolutions.com
Tue Jul 2 21:32:54 EDT 2002


You're doing a fabulous job all by yourself! ;) I can almost hear Howard
Cossel...

On Tue, 2002-07-02 at 19:01, Joseph A Knapka wrote:
> Ladies and gentleman, welcome to the Bi-Monthly ALE
> Language Showdown! Today's contest is shaping up to
> be quite a knock-down-drag-out, with our old friends
> C and Perl ready at the starting gates, and latecomer
> C++ getting ready to go in the pit area! (We expect
> Tcl, Python, possibly assembly, and perhaps some
> even more esoteric and generally weird contestants to
> show up in the later stages of this match! Whatever
> you do, *DON'T LEAVE YOUR SEAT* until the final flag
> goes down!)
> 
> And they're off!!! C and C++ take an early lead, but as they
> go into the Massive File Filtering labyrinth, Perl begins
> to narrow the gap! What's this? Oh my god, the customer
> has changed the requirements! C pulls into the pit
> area and a huge gang of code monkeys are bolting
> various new bits and pieces onto the code! And look,
> the Perl pit crew is just one guy, but he's scratching
> his head... looks like he can't figure out what the
> program was doing to begin with! The C++ pit crew has
> just reimplemented a single abstract interface,
> and they're about to send their code out the door!
> Oh no, the C++ linker has refused to resolve some
> template references! Looks like the C++ guys are
> going to be at this for a while...
> 
> OK, C is back on the track, clacking along with quite
> a bit of new code stuck on... But it's into the wall
> with a segmentation violation! The code monkeys are
> out on the track trying to rescue their vehicle,
> and Perl is now back on the track plowing them down...
> the Perl pit crew threw away the old code and implemented
> the new requirements from scratch!!! Is this legal?
> Watch for further developments, folks...
> 
> 
> <anyone want to pick this up and run with it?>
> 
> 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.
> 
> -- 
>    "Thanks to Microsoft, I am now blind in both eyes. They have
>     rolled back in my head so many times this week that they
>     are apparently stuck there now."
>       - Jonathan Rickman, regarding M$ anti-open-source PR.
> 
> ---
> 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.
-- 
James P. Kinney III   \Changing the mobile computing world/
President and CEO      \          one Linux user         /
Local Net Solutions,LLC \           at a time.          /
770-493-8244             \.___________________________./

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7 



 This is a digitally signed message part




More information about the Ale mailing list