SPUG: OT: Re: PERL technical interview

Jeff Almeida spud at spudzeppelin.com
Mon Jan 23 12:30:14 PST 2006


*d'oh!*  now you know why i don't code all that much in c  
*embarrassed grin*

leave it to me to confuse shell-true with actual-true on a monday  
morning...

jeff

On Jan 23, 2006, at 1:27 PM, Fred Morris wrote:

> I am so danged confused now. Completely blew off the fact that it  
> wasn't
> Perl, and also that the exit code was 1. Now, if I recall  
> correctly, 0 is
> success on .*[rn].*[sx]. Odd (e.g. 1) is success on VMS.
>
> Ob Perl: reblessing works very well, thanks.
>
> On Mon, 23 Jan 2006, Jeff Almeida wrote:
>
>> wow!  forcing you to accept command-line arguments and potentially
>> redefining a successful exit as something other than 1?
>>
>> mind if i ask which platform?
>>
>> but you're right of course -- what is "canonically bug-free" for a
>> null program depends on your definition of the canon.
>>
>> jeff
>>
>> On Jan 23, 2006, at 11:59 AM, Yitzchak Scott-Thoennes wrote:
>>
>>> On Mon, Jan 23, 2006 at 10:32:58AM -0600, Jeff Almeida wrote:
>>>> <minimalist-hat>
>>>>
>>>> correctness.
>>>>
>>>> at it's root (ok bad pun), all code is a collection of patches to /
>>>> bin/true.... that is:
>>>>
>>>> int main() {
>>>> 	return 1;
>>>> }
>>>>
>
> fred at twister:~> /bin/true
> fred at twister:~> echo $?
> 0
> fred at twister:~> /bin/false
> fred at twister:~> echo $?
> 1
> fred at twister:~>
>
>>>> which is in a sense, the algebraic kernel of the software vector-
>>>> space.  it's also conveniently correct and canonically bug-free.
>>>
>>> I've worked on a platform where the above is buggy.  Canonically
>>> bug-free
>>> would be more like:
>>>
>>> #include <stdlib.h>
>>> #ifndef EXIT_SUCCESS
>>> #define EXIT_SUCCESS 1
>>> #endif
>>>
>>> int main(int argc, char *argv[], char *envp[]) {
>>>    return EXIT_SUCCESS;
>>> }
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
>      POST TO: spug-list at pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
>     MEETINGS: 3rd Tuesdays
>     WEB PAGE: http://seattleperl.org/

****************************************
Jeff D. Almeida * Corinth, TX
spud at spudzeppelin.com
****************************************






More information about the spug-list mailing list