Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-05 Thread Simon Wistow
On Thu, Sep 04, 2003 at 06:44:25PM +0100, Phil Lanch said: On Thu, Sep 04, 2003 at 03:40:18PM +0100, David Cantrell wrote: It's just this sort of thing that makes me lurve perl. you mistyped C++. Without getting into a flamewar, and whilst appreciating the benefits of compile time generic

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-05 Thread Dominic Mitchell
Simon Wistow [EMAIL PROTECTED] wrote: On a tangentially related note, I'm very rapidly starting to come to the opinion that there are far too many applications that are written in C/C++ which don't need to. I heartily agree. I think that the combination of a scripting language plus some

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-05 Thread Ben
On Fri, Sep 05, 2003 at 09:46:47AM +0100, Simon Wistow wrote: On Thu, Sep 04, 2003 at 06:44:25PM +0100, Phil Lanch said: On Thu, Sep 04, 2003 at 03:40:18PM +0100, David Cantrell wrote: It's just this sort of thing that makes me lurve perl. you mistyped C++. Without getting into a

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-05 Thread David Cantrell
On Fri, Sep 05, 2003 at 10:59:31AM +0100, Ben wrote: Well, that is true, but I'm also seeing some of the problems caused by not having a (strict | anal | strong | paranoid | batshit ) type system. Certain types of bugs persist for far longer than they should in 10 line Perl applications

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-05 Thread Tim Sweetman
Ben was also seeing: ... some of the problems caused by not having a (strict | anal | strong | paranoid | batshit ) type system. Certain types of bugs persist for far longer than they should in 10 line Perl applications whereas a less laissez-faire type system would flush them out basically

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-04 Thread Lusercop
On Wed, Sep 03, 2003 at 11:48:19AM +0100, Simon Wistow wrote: I have to admit, I like gotos in C. This is not a winning testimonial though. I've been told that my C is like Object Orientated assembler which is fair enough because I learnt C after I'd learnt 68k. Hmmm, I like gotos too, but

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-04 Thread Ben
On Thu, Sep 04, 2003 at 01:03:16PM +0100, Lusercop wrote: On Wed, Sep 03, 2003 at 11:48:19AM +0100, Simon Wistow wrote: I have to admit, I like gotos in C. This is not a winning testimonial though. I've been told that my C is like Object Orientated assembler which is fair enough because I

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-04 Thread Lusercop
On Thu, Sep 04, 2003 at 01:40:08PM +0100, Ben wrote: return foo; FAIL3: free(foo-quirka-fleeg); return NULL; FAIL2: free(foo-quirka); return NULL; FAIL1: free(foo); return NULL; } With nested structures like these, this structured approach just

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-04 Thread David Cantrell
On Thu, Sep 04, 2003 at 03:07:08PM +0100, Lusercop wrote: what's wrong with: | if(foo) { | if(foo-quirka) { | free(foo-quirka-fleeg); | } | free(foo-quirka); | } | free(foo); In the error condition? Gets a bit unweildy if you have foo-quirka-fleeg-miner-willy-... It's just

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-04 Thread Ben
On Thu, Sep 04, 2003 at 03:07:08PM +0100, Lusercop wrote: On Thu, Sep 04, 2003 at 01:40:08PM +0100, Ben wrote: return foo; FAIL3: free(foo-quirka-fleeg); return NULL; FAIL2: free(foo-quirka); return NULL; FAIL1: free(foo); return NULL; }

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-04 Thread Phil Lanch
On Thu, Sep 04, 2003 at 03:40:18PM +0100, David Cantrell wrote: It's just this sort of thing that makes me lurve perl. you mistyped C++. class fleeg { }; class quirka { public: quirka () { f = auto_ptrfleeg (new fleeg); } private: auto_ptrfleeg f; }; class miner { public: miner ()

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-04 Thread Shevek
On Thu, 4 Sep 2003, Phil Lanch wrote: On Thu, Sep 04, 2003 at 03:40:18PM +0100, David Cantrell wrote: It's just this sort of thing that makes me lurve perl. you mistyped C++. I consider myself to be a programmer. Having read this code, my only possible response is, You what? AICMFP. S.

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-04 Thread Phil Lanch
On Thu, Sep 04, 2003 at 06:57:41PM +0100, Shevek wrote: On Thu, 4 Sep 2003, Phil Lanch wrote: you mistyped C++. I consider myself to be a programmer. Having read this code, my only possible response is, You what? AICMFP. sorry, i forgot to say: #include YHBT HTH. HAND. though it's

Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-03 Thread Dominic Mitchell
Nicholas Clark [EMAIL PROTECTED] wrote: On Tue, Sep 02, 2003 at 07:16:40AM +, Dominic Mitchell wrote: For the benefit of people likely to come up against Yet Another Compression Format, though: http://files10.rarlab.com/rar/unrarsrc-3.2.3.tar.gz The code in there is a lot cleaner

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-03 Thread Nicholas Clark
On Wed, Sep 03, 2003 at 09:53:21AM +, Dominic Mitchell wrote: Yuck. I didn't actually look at it, just let the ports compile it for me. I didn't inspect it too far, but it seems that the current source is safe to look at. I seems to have benefited from a complete re-write When it comes

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-03 Thread Rafael Garcia-Suarez
Nicholas Clark wrote: At the risk of going off topic, the Perl 5 source isn't exactly pleasant. And contains gotos. IIRC I added 2 between 5.6.0 and 5.8.0, but the alternative was a big mess of if()s and braces. C doesn't have all the nice loop labelling features of a certain other language.

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-03 Thread Paul Johnson
Nicholas Clark said: At the risk of going off topic, the Perl 5 source isn't exactly pleasant. And contains gotos. IIRC I added 2 between 5.6.0 and 5.8.0, but the alternative was a big mess of if()s and braces. C doesn't have all the nice loop labelling features of a certain other language.

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-03 Thread Simon Wistow
On Wed, Sep 03, 2003 at 11:13:35AM +0100, Nicholas Clark said: At the risk of going off topic, the Perl 5 source isn't exactly pleasant. And contains gotos. IIRC I added 2 between 5.6.0 and 5.8.0, but the alternative was a big mess of if()s and braces. C doesn't have all the nice loop

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-03 Thread Sam Vilain
On Wed, 03 Sep 2003 11:17, Rafael Garcia-Suarez wrote; However most of gotos appear to be in the tokenizer and in the regular expression engine. Thoee are based on state machines, and IMHO gotos are legitimate in state machines. Right, and we all know that every program can be

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-03 Thread Dominic Mitchell
Rafael Garcia-Suarez [EMAIL PROTECTED] wrote: In bleadperl : $ perl -lne 'print if /\bgoto\b/' *.[ch] | wc -l 605 This is a rough metric, there are probably less actual gotos than this (because of comments and because goto is a perl keyword -- not forgetting the yacc-generated code,

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-03 Thread Andy Wardley
Paul Johnson wrote: I think I wrote my first ever goto code in C yesterday. Way back when I was a teen-geek, I played around writing a few games, mostly in C, with the odd bit of assembler thrown in for bad taste. One of these was a rip-off of the classic Tron light-cycle game. I got myself

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-03 Thread muppet
Nicholas Clark said: Parrot has much cleaner source than Perl 5. However, to maintain the balance of good and evil^Wgoto, Perl 6 will compile down to parrot bytecode, which quite definitely does have gotos. So even the nicest, most clean award winning code from the purest best intentioned

Re: Bad C Source (Re: gzipping your websites WINRAR 40 days trial)

2003-09-03 Thread Chris Devers
On Wed, 3 Sep 2003, muppet wrote: stop the wrongful slander of goto! Man, what a muppet this guy is... Look, goto's are just bad, mmmkay? -- Chris Devers[EMAIL PROTECTED] channeling http://www.askoxford.com/pressroom/archive/odelaunch/