SPUG: OT: Re: PERL technical interview

Fred Morris m3047 at inwa.net
Mon Jan 23 11:27:26 PST 2006


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;
> > }


More information about the spug-list mailing list