Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.contests > #16

Re: The First Pure Shell Contest (PUSH): relativepath

From pk <pk@pk.invalid>
Newsgroups comp.unix.shell, comp.unix.programmer, comp.programming.contests
Subject Re: The First Pure Shell Contest (PUSH): relativepath
Date 2011-08-19 22:25 +0200
Organization Aioe.org NNTP Server
Message-ID <j2mh0g$cps$1@speranza.aioe.org> (permalink)
References (2 earlier) <9b7qtqFiseU1@mid.individual.net> <j2mcs5$25i$1@speranza.aioe.org> <9b7rsrFiseU3@mid.individual.net> <j2me7e$5r5$1@speranza.aioe.org> <9b7tv0FiseU4@mid.individual.net>

Cross-posted to 3 groups.

Show all headers | View raw


On 19 Aug 2011 20:04:48 GMT, Jens Schweikhardt <usenet@schweikhardt.net>
wrote:

> Still, I don't see where your rules forbid using Perl or Awk if one's
> POSIX shell has them built-in (which was the OP's question).
> 
> It forbidden by the well known standardese rule of "if it's not defined,
> then it's undefined." aka "undefined by omission".

Is it well known?
 
>       3 You can assume that 'test' and '[' are built-ins. If this is not
> true for your shell you may set PATH with env -i PATH=... to the
>         directory with the 'test' and '[' executables for the sole
> purpose of using these external commands. It must run without PATH on a
> shell where these are built-ins (i.e. on the contest evaluation machine).
> 
> perl isn't mentioned. So you can not assume it is a built-in.

Uh...this is basic logic. If I say "you can use the bicycle", does it follow
that you are not allowed to use the car?

If you said "you can assume that only 'test' and '[' are built-in", then
things would have been different.

> I believe that the name of the contest gives an oh so slight hint that a
> solution involving perl is not quite what is meant. The motivation
> paragraph too (even mentions awk). If that isn't enough, the contestant
> would surely wonder if perl was also a built-in on the unknown contest
> evaluation machine.

Admittedly the Perl and awk example was a stretch, but surely there are a
number of commands that are on the border, and a contestant may assume in
good faith that he's legitimate to use some of them, only to have his
submission fail on your machine. So I think you should explicitly list what
built-ins are available in the evaluation machine's shell, so people know
what they can rely on.

> Reading a text, understanding it and inferring a writer's intention are
> the initial barriers to participating in the contest. I think this goes
> for most contests.

The same goes for the OP's first comment (and if you've been reading
these groups for a while, I'm sure you know that he knows what he's talking
about). The intention, to me, was to signal that some parts of the rules
were not clear, and instead you interpreted it as a nitpick. See? It works
both ways.

> I admit there is room for improvement regarding its formal "rules" (heck,
> the very word does not even appear once!), but I did not want to overload
> the text with kilobytes of blah blah just to fend off the nit-pickers,
> who would find a hole in any formal set of rules. One thing I really
> should add for the next PUSH is "Rule interpretation is MINE ALONE.
> PERIOD!" :-)

Even then, you should make that interpretation explicit (that is, write it),
and not assume that people can somehow magically infer it.

Back to comp.programming.contests | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

The First Pure Shell Contest (PUSH): relativepath Jens Schweikhardt <schweikh@schweikhardt.net> - 2011-08-19 17:23 +0000
  Re: The First Pure Shell Contest (PUSH): relativepath Stephane CHAZELAS <stephane_chazelas@yahoo.fr> - 2011-08-19 18:13 +0000
    Re: The First Pure Shell Contest (PUSH): relativepath Jens Schweikhardt <usenet@schweikhardt.net> - 2011-08-19 19:12 +0000
      Re: The First Pure Shell Contest (PUSH): relativepath pk <pk@pk.invalid> - 2011-08-19 21:14 +0200
        Re: The First Pure Shell Contest (PUSH): relativepath Jens Schweikhardt <usenet@schweikhardt.net> - 2011-08-19 19:29 +0000
          Re: The First Pure Shell Contest (PUSH): relativepath pk <pk@pk.invalid> - 2011-08-19 21:37 +0200
            Re: The First Pure Shell Contest (PUSH): relativepath Jens Schweikhardt <usenet@schweikhardt.net> - 2011-08-19 20:04 +0000
              Re: The First Pure Shell Contest (PUSH): relativepath pk <pk@pk.invalid> - 2011-08-19 22:25 +0200
                Re: The First Pure Shell Contest (PUSH): relativepath Jens Schweikhardt <usenet@schweikhardt.net> - 2011-08-19 21:08 +0000
  Re: The First Pure Shell Contest (PUSH): relativepath Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-19 19:58 +0100
    Re: The First Pure Shell Contest (PUSH): relativepath Jens Schweikhardt <usenet@schweikhardt.net> - 2011-08-19 19:23 +0000
      Re: The First Pure Shell Contest (PUSH): relativepath Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-19 22:18 +0100
  Re: The First Pure Shell Contest (PUSH): relativepath Stephane CHAZELAS <Stephane.CHAZELAS@free.fr> - 2011-08-20 20:07 +0000
    Re: The First Pure Shell Contest (PUSH): relativepath Jens Schweikhardt <usenet@schweikhardt.net> - 2011-08-21 10:43 +0000
    Re: The First Pure Shell Contest (PUSH): relativepath Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-21 15:14 +0100
      Re: The First Pure Shell Contest (PUSH): relativepath Janis Papanagnou <janis_papanagnou@hotmail.com> - 2011-08-21 18:28 +0300
      Re: The First Pure Shell Contest (PUSH): relativepath Stephane CHAZELAS <stephane_chazelas@yahoo.fr> - 2011-08-21 16:19 +0000
        Re: The First Pure Shell Contest (PUSH): relativepath Stephane CHAZELAS <stephane_chazelas@yahoo.fr> - 2011-08-21 20:12 +0000
  Re: The First Pure Shell Contest (PUSH): relativepath Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-22 21:15 +0100
    Re: The First Pure Shell Contest (PUSH): relativepath Stephane CHAZELAS <stephane_chazelas@yahoo.fr> - 2011-08-23 18:23 +0000
      Re: The First Pure Shell Contest (PUSH): relativepath Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-23 19:52 +0100
        Re: The First Pure Shell Contest (PUSH): relativepath Stephane CHAZELAS <stephane_chazelas@yahoo.fr> - 2011-08-23 21:56 +0000

csiph-web