Merge pull request #413 from xexyl/2018-ferguson
Move 2018/ferguson/prog-simple.c to prog.alt.c
This commit is contained in:
8 files changed
+29
-23
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
prog
|
prog
|
||||||
prog-simple
|
prog.alt
|
||||||
prog.orig
|
prog.orig
|
||||||
weasel
|
weasel
|
||||||
weasel-simple
|
weasel.alt
|
||||||
+4
-4
@@ -5,8 +5,8 @@ prog.c This is the source file to the `weasel'
|
|||||||
program [1].
|
program [1].
|
||||||
|
|
||||||
|
|
||||||
prog-simple.c This is the source code file to the
|
prog.alt.c This is the source code file to the
|
||||||
`weasel-simple' program [1].
|
`weasel.alt' program [1].
|
||||||
|
|
||||||
|
|
||||||
test.sh Script provided to test the weasel program [1].
|
test.sh Script provided to test the weasel program [1].
|
||||||
@@ -79,8 +79,8 @@ the spec file. Please note that the paths below are dependent on the prefix
|
|||||||
used in installation; where I suggest '/usr' it is equally possible it could be
|
used in installation; where I suggest '/usr' it is equally possible it could be
|
||||||
under '/usr/local', for example.
|
under '/usr/local', for example.
|
||||||
|
|
||||||
[1] Note that 'prog.c' and 'prog-simple.c' would be
|
[1] Note that 'prog.c' and 'prog.alt.c' would be
|
||||||
linked to 'weasel.c' and 'weasel-simple.c'
|
linked to 'weasel.c' and 'weasel.alt.c'
|
||||||
(respectively) in the '/usr/src/weasel'
|
(respectively) in the '/usr/src/weasel'
|
||||||
subdirectory.
|
subdirectory.
|
||||||
|
|
||||||
|
|||||||
@@ -112,8 +112,8 @@ CSRC= ${PROG}.o
|
|||||||
DATA= FILES hint.css rpm.md test-strings.txt weasel.1 weasel.man weasel.spec
|
DATA= FILES hint.css rpm.md test-strings.txt weasel.1 weasel.man weasel.spec
|
||||||
TARGET= ${PROG} weasel
|
TARGET= ${PROG} weasel
|
||||||
#
|
#
|
||||||
ALT_OBJ= ${PROG}-simple.o
|
ALT_OBJ= ${PROG}.alt
|
||||||
ALT_TARGET= ${PROG}-simple weasel-simple
|
ALT_TARGET= ${PROG}.alt weasel.alt
|
||||||
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
@@ -141,10 +141,10 @@ test: ${PROG} test.sh
|
|||||||
alt: data ${ALT_TARGET}
|
alt: data ${ALT_TARGET}
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
${PROG}-simple: ${PROG}-simple.c
|
${PROG}.alt: ${PROG}.alt.c
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
weasel-simple: ${PROG}-simple
|
weasel.alt: ${PROG}.alt
|
||||||
${CP} -f $< $@
|
${CP} -f $< $@
|
||||||
|
|
||||||
# data files
|
# data files
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ make
|
|||||||
make test
|
make test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Alternate code:
|
||||||
|
|
||||||
|
The author provided an alternate version which has a simpler keyboard for the
|
||||||
|
monkey Eric. See his comments under the 'keyboards' section, briefly referred to
|
||||||
|
in the 'what it is' section.
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|
||||||
Looking back over the strata of past IOCCC entries, this program marks a new
|
Looking back over the strata of past IOCCC entries, this program marks a new
|
||||||
@@ -158,7 +164,7 @@ operative phrase is *given enough time*; but even if it's extremely unlikely
|
|||||||
monkey; I thought the monkey had it too easy: unlike his limited keyboard I have
|
monkey; I thought the monkey had it too easy: unlike his limited keyboard I have
|
||||||
(besides space) every character in the ASCII range **`0<=126`** that
|
(besides space) every character in the ASCII range **`0<=126`** that
|
||||||
**`isprint()`** returns non-zero except that only capital letters are included;
|
**`isprint()`** returns non-zero except that only capital letters are included;
|
||||||
the file *`prog-simple.c`* has a slightly smaller keyboard. There are some
|
the file [prog.alt.c](prog.alt.c) has a slightly smaller keyboard. There are some
|
||||||
additional features I have added (including two Easter eggs); amongst others:
|
additional features I have added (including two Easter eggs); amongst others:
|
||||||
ability to change the target string and maximum length. See
|
ability to change the target string and maximum length. See
|
||||||
**[How it works](#how)**, **[Hints](#hints)** and **[How to build](#build)** for
|
**[How it works](#how)**, **[Hints](#hints)** and **[How to build](#build)** for
|
||||||
|
|||||||
File renamed without changes.
@@ -4,7 +4,7 @@ weasel \- The IOCCC 2018 Implementation of Richard Dawkins's Weasel program
|
|||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fBweasel\fP [\fI\-r<rate>\fP] [\fI\-m\fP] [\fI\-q\fP] [\fI<chromosomal string>\fP]
|
\fBweasel\fP [\fI\-r<rate>\fP] [\fI\-m\fP] [\fI\-q\fP] [\fI<chromosomal string>\fP]
|
||||||
.PP
|
.PP
|
||||||
\fBweasel\-simple\fP [\fI\-r<rate>\fP] [\fI\-m\fP] [\fI\-q\fP] [\fI<chromosomal string>\fP]
|
\fBweasel.alt\fP [\fI\-r<rate>\fP] [\fI\-m\fP] [\fI\-q\fP] [\fI<chromosomal string>\fP]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
\fBweasel\fP is an obfuscated implementation of Richard Dawkins' \fIWeasel program\fP.
|
\fBweasel\fP is an obfuscated implementation of Richard Dawkins' \fIWeasel program\fP.
|
||||||
According to Wikipedia in chapter three of his book \fIThe Blind Watchmaker\fP Dawkins wrote:
|
According to Wikipedia in chapter three of his book \fIThe Blind Watchmaker\fP Dawkins wrote:
|
||||||
@@ -28,7 +28,7 @@ has several additions: \fBtwo Easter eggs,\fP a \fBquiet output mode,\fP
|
|||||||
an \fBoption to change the mutation rate\fP as well as the ability to
|
an \fBoption to change the mutation rate\fP as well as the ability to
|
||||||
\fBspecify the chromosomal string.\fP
|
\fBspecify the chromosomal string.\fP
|
||||||
Furthermore the keyboard isn't as limited as Dawkins's implementation.
|
Furthermore the keyboard isn't as limited as Dawkins's implementation.
|
||||||
The \fBweasel\-simple\fP keyboard is a more limited keyboard but not
|
The \fBweasel.alt\fP keyboard is a more limited keyboard but not
|
||||||
as limited as Dawkins's Weasel program keyboard.
|
as limited as Dawkins's Weasel program keyboard.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.PP
|
.PP
|
||||||
@@ -141,9 +141,9 @@ quiet output from being enabled; on the other hand the options
|
|||||||
The source code to the \fBweasel\fP program.
|
The source code to the \fBweasel\fP program.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fI/usr/src/weasel/weasel\-simple.c\fP
|
\fI/usr/src/weasel/weasel.alt.c\fP
|
||||||
.RS
|
.RS
|
||||||
The source code to the \fBweasel-simple\fP program.
|
The source code to the \fBweasel.alt\fP program.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fI/usr/src/weasel/Makefile\fP
|
\fI/usr/src/weasel/Makefile\fP
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ weasel \- The IOCCC 2018 Implementation of Richard Dawkins's Weasel program
|
|||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fBweasel\fP [\fI\-r<rate>\fP] [\fI\-m\fP] [\fI\-q\fP] [<\fIchromosomal string\fP>]
|
\fBweasel\fP [\fI\-r<rate>\fP] [\fI\-m\fP] [\fI\-q\fP] [<\fIchromosomal string\fP>]
|
||||||
.PP
|
.PP
|
||||||
\fBweasel\-simple\fP [\fI\-r<rate>\fP] [\fI\-m\fP] [\fI\-q\fP] [<\fIchromosomal string\fP>]
|
\fBweasel.alt\fP [\fI\-r<rate>\fP] [\fI\-m\fP] [\fI\-q\fP] [<\fIchromosomal string\fP>]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
\fBweasel\fP is an obfuscated implementation of Richard Dawkins' \fIWeasel program\fP.
|
\fBweasel\fP is an obfuscated implementation of Richard Dawkins' \fIWeasel program\fP.
|
||||||
According to Wikipedia in chapter three of his book \fIThe Blind Watchmaker\fP Dawkins wrote:
|
According to Wikipedia in chapter three of his book \fIThe Blind Watchmaker\fP Dawkins wrote:
|
||||||
@@ -28,7 +28,7 @@ has several additions: \fBtwo Easter eggs,\fP a \fBquiet output mode,\fP
|
|||||||
an \fBoption to change the mutation rate\fP as well as the ability to
|
an \fBoption to change the mutation rate\fP as well as the ability to
|
||||||
\fBspecify the chromosomal string.\fP
|
\fBspecify the chromosomal string.\fP
|
||||||
Furthermore the keyboard isn't as limited as Dawkins's implementation.
|
Furthermore the keyboard isn't as limited as Dawkins's implementation.
|
||||||
The \fBweasel\-simple\fP keyboard is a more limited keyboard but not
|
The \fBweasel.alt\fP keyboard is a more limited keyboard but not
|
||||||
as limited as Dawkins's Weasel program keyboard.
|
as limited as Dawkins's Weasel program keyboard.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.PP
|
.PP
|
||||||
@@ -141,9 +141,9 @@ quiet output from being enabled; on the other hand the options
|
|||||||
The source code to the \fBweasel\fP program.
|
The source code to the \fBweasel\fP program.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fIprog\-simple.c\fP
|
\fIprog.alt.c\fP
|
||||||
.RS
|
.RS
|
||||||
The source code to the \fBweasel-simple\fP program.
|
The source code to the \fBweasel.alt\fP program.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fIMakefile\fP
|
\fIMakefile\fP
|
||||||
|
|||||||
@@ -37,21 +37,21 @@ AutoReq: 1
|
|||||||
%setup -n weasel
|
%setup -n weasel
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make weasel weasel-simple
|
make weasel weasel.alt
|
||||||
mv -f README.md README.md 2>/dev/null || :
|
mv -f README.md README.md 2>/dev/null || :
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_usrsrc}/weasel
|
mkdir -p $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_usrsrc}/weasel
|
||||||
install -p -m 755 weasel $RPM_BUILD_ROOT%{_bindir}/weasel
|
install -p -m 755 weasel $RPM_BUILD_ROOT%{_bindir}/weasel
|
||||||
install -p -m 755 weasel-simple $RPM_BUILD_ROOT%{_bindir}/weasel-simple
|
install -p -m 755 weasel.alt $RPM_BUILD_ROOT%{_bindir}/weasel.alt
|
||||||
install -p -m 755 test.sh $RPM_BUILD_ROOT%{_usrsrc}/weasel/test.sh
|
install -p -m 755 test.sh $RPM_BUILD_ROOT%{_usrsrc}/weasel/test.sh
|
||||||
install -m 644 test-strings.txt $RPM_BUILD_ROOT%{_usrsrc}/weasel/test-strings.txt
|
install -m 644 test-strings.txt $RPM_BUILD_ROOT%{_usrsrc}/weasel/test-strings.txt
|
||||||
install -m 644 prog.c -D $RPM_BUILD_ROOT%{_usrsrc}/weasel/weasel.c
|
install -m 644 prog.c -D $RPM_BUILD_ROOT%{_usrsrc}/weasel/weasel.c
|
||||||
ln -s weasel.c $RPM_BUILD_ROOT%{_usrsrc}/weasel/prog.c
|
ln -s weasel.c $RPM_BUILD_ROOT%{_usrsrc}/weasel/prog.c
|
||||||
install -m 644 Makefile -D $RPM_BUILD_ROOT%{_usrsrc}/weasel
|
install -m 644 Makefile -D $RPM_BUILD_ROOT%{_usrsrc}/weasel
|
||||||
install -m 644 prog-simple.c -D $RPM_BUILD_ROOT%{_usrsrc}/weasel/weasel-simple.c
|
install -m 644 prog.alt.c -D $RPM_BUILD_ROOT%{_usrsrc}/weasel/weasel.alt.c
|
||||||
ln -s weasel-simple.c $RPM_BUILD_ROOT%{_usrsrc}/weasel/prog-simple.c
|
ln -s weasel.alt.c $RPM_BUILD_ROOT%{_usrsrc}/weasel/prog.alt.c
|
||||||
install -m 644 weasel.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/weasel.1
|
install -m 644 weasel.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/weasel.1
|
||||||
install -m 644 hint.html -D $RPM_BUILD_ROOT%{_docdir}/weasel/weasel.html
|
install -m 644 hint.html -D $RPM_BUILD_ROOT%{_docdir}/weasel/weasel.html
|
||||||
install -m 644 README.md -D $RPM_BUILD_ROOT%{_docdir}/weasel/weasel.markdown
|
install -m 644 README.md -D $RPM_BUILD_ROOT%{_docdir}/weasel/weasel.markdown
|
||||||
|
|||||||
Reference in new issue
Block a user