aboutsummaryrefslogtreecommitdiff
path: root/challenge-004
diff options
context:
space:
mode:
authordrbaggy <js5@sanger.ac.uk>2022-01-10 09:18:04 +0000
committerdrbaggy <js5@sanger.ac.uk>2022-01-10 09:18:04 +0000
commit54edabaf2afeb407d01d88c19d894823f85d5125 (patch)
tree4e4a4fbda6b3023c3d3840a1daae50a49fca9c86 /challenge-004
parent29b9eeeb95555dbcf1f375c89910c83ac83abd8d (diff)
parente9411bdc7658179af3f23d3ada7970323547a7d7 (diff)
downloadperlweeklychallenge-club-54edabaf2afeb407d01d88c19d894823f85d5125.tar.gz
perlweeklychallenge-club-54edabaf2afeb407d01d88c19d894823f85d5125.tar.bz2
perlweeklychallenge-club-54edabaf2afeb407d01d88c19d894823f85d5125.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'challenge-004')
-rw-r--r--challenge-004/abigail/README.md7
-rw-r--r--challenge-004/abigail/awk/ch-1.awk12
-rw-r--r--challenge-004/abigail/awk/ch-2.gawk2
-rw-r--r--challenge-004/abigail/bash/ch-1.sh13
-rw-r--r--challenge-004/abigail/bash/ch-2.sh2
-rw-r--r--challenge-004/abigail/bc/ch-1.bc59
-rw-r--r--challenge-004/abigail/c/ch-1.c9
-rw-r--r--challenge-004/abigail/c/ch-2.c2
-rw-r--r--challenge-004/abigail/go/ch-1.go73
-rw-r--r--challenge-004/abigail/java/ch-1.java66
-rw-r--r--challenge-004/abigail/lua/ch-1.lua11
-rw-r--r--challenge-004/abigail/lua/ch-2.lua2
-rw-r--r--challenge-004/abigail/node/ch-1.js15
-rw-r--r--challenge-004/abigail/node/ch-2.js2
-rw-r--r--challenge-004/abigail/pascal/ch-1.p73
-rw-r--r--challenge-004/abigail/perl/ch-1.pl7
-rw-r--r--challenge-004/abigail/perl/ch-2.pl2
-rw-r--r--challenge-004/abigail/python/ch-1.py19
-rw-r--r--challenge-004/abigail/python/ch-2.py4
-rw-r--r--challenge-004/abigail/r/ch-1.r70
-rw-r--r--challenge-004/abigail/ruby/ch-1.rb6
-rw-r--r--challenge-004/abigail/ruby/ch-2.rb2
-rw-r--r--challenge-004/abigail/scheme/ch-1.scm82
-rw-r--r--challenge-004/abigail/t/ctest.ini4
-rw-r--r--challenge-004/abigail/t/output-1-1.exp2
-rw-r--r--challenge-004/abigail/tcl/ch-1.tcl75
26 files changed, 562 insertions, 59 deletions
diff --git a/challenge-004/abigail/README.md b/challenge-004/abigail/README.md
index 75267e87b2..8cfd5b4918 100644
--- a/challenge-004/abigail/README.md
+++ b/challenge-004/abigail/README.md
@@ -23,12 +23,19 @@ and printing. We may even need to filler comments to make it all work out.
### Solutions
* [AWK](awk/ch-1.awk)
* [Bash](bash/ch-1.sh)
+* [bc](bc/ch-1.bc)
* [C](c/ch-1.c)
+* [Go](go/ch-1.go)
+* [Java](java/ch-1.java)
* [Lua](lua/ch-1.lua)
* [Node.js](node/ch-1.node)
+* [Pascal](pascal/ch-1.p)
* [Perl](perl/ch-1.pl)
* [Python](python/ch-1.py)
+* [R](r/ch-1.r)
* [Ruby](ruby/ch-1.rb)
+* [Scheme](scheme/ch-1.scm)
+* [Tcl](tcl/ch-1.tcl)
## [Challenge 2](https://perlweeklychallenge.org/blog/perl-weekly-challenge-004/#challenge-2)
diff --git a/challenge-004/abigail/awk/ch-1.awk b/challenge-004/abigail/awk/ch-1.awk
index 2264ee94d1..36fec0b98f 100644
--- a/challenge-004/abigail/awk/ch-1.awk
+++ b/challenge-004/abigail/awk/ch-1.awk
@@ -1,7 +1,7 @@
#!/usr/bin/awk
#
-# See ../README.md
+# See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
#
#
@@ -48,7 +48,7 @@ BEGIN {
"'S/z}#vS|i)S9[=*/nCG)PMaY-{pML);vN?%kRcr#*.Tg,x;42'(1w.0dA)S" \
")-us%.#1$R-rkwf%m%B-(ctK8+4Sn^%*C1Y-wqsr%eNg11%$De&&07q+%1>-" \
"+mCl2%)V#w%#y:[,?t*D$64`9.U+{`-SBX-+gi/o)0B$q#V$tW+#lmM)';EH" \
- "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiKB"
+ "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiK?"
printf ("3.")
format = "%0" out_size "d"
for (i = 1; i <= length (line); i += in_size) {
@@ -67,8 +67,8 @@ BEGIN {
}
#
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER?
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER!
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER?
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER!
#
diff --git a/challenge-004/abigail/awk/ch-2.gawk b/challenge-004/abigail/awk/ch-2.gawk
index 11c73f7913..d5954a9edf 100644
--- a/challenge-004/abigail/awk/ch-2.gawk
+++ b/challenge-004/abigail/awk/ch-2.gawk
@@ -1,7 +1,7 @@
#!/opt/local/bin/gawk
#
-# See ../README.md
+# See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
#
#
diff --git a/challenge-004/abigail/bash/ch-1.sh b/challenge-004/abigail/bash/ch-1.sh
index 1740f2d690..6dfa72a723 100644
--- a/challenge-004/abigail/bash/ch-1.sh
+++ b/challenge-004/abigail/bash/ch-1.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# See ../README.md
+# See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
#
#
@@ -61,19 +61,18 @@ $K`U.%bSL*&dG^f,lN@.+jGbU.g8,s&FwUP$9p3S/)f(4,y><Y0vnKH(:}m~
'S/z}#vS|i)S9[=*/nCG)PMaY-{pML);vN?%kRcr#*.Tg,x;42'(1w.0dA)S
)-us%.#1$R-rkwf%m%B-(ctK8+4Sn^%*C1Y-wqsr%eNg11%$De&&07q+%1>-
+mCl2%)V#w%#y:[,?t*D$64`9.U+{`-SBX-+gi/o)0B$q#V$tW+#lmM)';EH
-%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiKB
+%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiK?
--
echo
#
# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER,
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER.
# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER?
# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER?
# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER:
# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER!
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER!
#
diff --git a/challenge-004/abigail/bash/ch-2.sh b/challenge-004/abigail/bash/ch-2.sh
index e9a2935272..38ea2179e2 100644
--- a/challenge-004/abigail/bash/ch-2.sh
+++ b/challenge-004/abigail/bash/ch-2.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# See ../README.md
+# See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
#
#
diff --git a/challenge-004/abigail/bc/ch-1.bc b/challenge-004/abigail/bc/ch-1.bc
new file mode 100644
index 0000000000..98f682f3ab
--- /dev/null
+++ b/challenge-004/abigail/bc/ch-1.bc
@@ -0,0 +1,59 @@
+#!/usr/bin/bc
+
+#
+# See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
+#
+
+#
+# Run as: bc -l ch-1.bc
+#
+
+scale = 3240
+4 * a (1)
+halt
+
+#
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER?
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER:
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER!
+#
diff --git a/challenge-004/abigail/c/ch-1.c b/challenge-004/abigail/c/ch-1.c
index 21131ffb53..89ee6b0e96 100644
--- a/challenge-004/abigail/c/ch-1.c
+++ b/challenge-004/abigail/c/ch-1.c
@@ -3,7 +3,7 @@
# include <string.h>
/*
- * See ../README.md
+ * See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
*/
/*
@@ -48,7 +48,7 @@ int main (void) {
"'S/z}#vS|i)S9[=*/nCG)PMaY-{pML);vN?%kRcr#*.Tg,x;42'(1w.0dA)S" \
")-us%.#1$R-rkwf%m%B-(ctK8+4Sn^%*C1Y-wqsr%eNg11%$De&&07q+%1>-" \
"+mCl2%)V#w%#y:[,?t*D$64`9.U+{`-SBX-+gi/o)0B$q#V$tW+#lmM)';EH" \
- "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiKB";
+ "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiK?";
printf ("3.");
size_t l = strlen (pi);
for (size_t i = 0; i < l; i += in_size) {
@@ -67,8 +67,7 @@ int main (void) {
}
/*
- * FODDER FODDER FODDER FODDER FODDER FODDER FODDER
- * FODDER FODDER FODDER FODDER FODDER FODDER FODDER.
- * FODDER FODDER FODDER FODDER FODDER FODDER FODDER.
+ * FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER:
* FODDER FODDER FODDER FODDER FODDER FODDER FODDER.
+ * FODDER FODDER FODDER FODDER FODDER FODDER FODDER!!
*/
diff --git a/challenge-004/abigail/c/ch-2.c b/challenge-004/abigail/c/ch-2.c
index 3df60fc2dc..bbb7375b75 100644
--- a/challenge-004/abigail/c/ch-2.c
+++ b/challenge-004/abigail/c/ch-2.c
@@ -9,7 +9,7 @@
# define NR_OF_LETTERS 26
/*
- * See ../README.md
+ * See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
*/
/*
diff --git a/challenge-004/abigail/go/ch-1.go b/challenge-004/abigail/go/ch-1.go
new file mode 100644
index 0000000000..757181e876
--- /dev/null
+++ b/challenge-004/abigail/go/ch-1.go
@@ -0,0 +1,73 @@
+package main
+
+//
+// See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
+//
+
+//
+// Run as: go run ch-1.go
+//
+
+import (
+ "fmt"
+)
+
+func main () {
+ first_ord := int ('"') + 1;
+ skip_ord := int ('\\');
+ last_ord := int ('~');
+ ord_range := last_ord - first_ord;
+ in_size := 5;
+ pi := [] rune (
+ "%(uP7+Y`ME)gy(7')v?;%s^qc(Mj1}16idp'ONGs'2m.o,1HLY'}~P61@@Y-" +
+ "*O/.v,Jc~D+ttA'&EPjR(zXxD$dr,M$P=-f*YQqe,GIZ`0x5oL1(mpl17en`" +
+ ")Q$ge,L6_5.I;hj%yy6n,L_t')dtyy)[ugS&-3(c&lC:a&~8SP#+iis+WR&8" +
+ "*Y;V3/+JD@-J>7u0$Nh<#2&:@+#=`/*YtP-0t8uf+tf/V&yjx>+]S=&%d}7z" +
+ "0YXa9$SOyt$*mzv1&X(W(.{0G-Vya`0a}KI0pQD2,nV0:,WE0+#?F[>(iMb}" +
+ "%k(tB/UO0m.8R'x%Vys_-|IgL.y-n6(v[*#+<w,K&ph2o.LfLw.'YJB%SI/r" +
+ "-RGB[0/yKw);ml1+SlKv.UDG6&jY3_#=Nry$t6Ng/YXEe%A)of.>/-J1#[`]" +
+ "&*M<M1Uqt]#f=#g-a$q{$Gn<,#CLb7((C*0,D]yd&c4OS#Ql2h%gd7>#'1wg" +
+ "-}+B}*jWDi)/2&k,h|/)+eu-3)9{mU-`:]M/YF$a.O0SF0{~2C.EjkZ&>|lD" +
+ "#%UmL+w)$V&14Ty0arq+%xnAo/XX/y0_=Bl/)f*}'Gc88'GV;X1RG~<+gJ8p" +
+ "&^E~A'/3N=*R2|j&SgD@-0St?*jL@'-ZsbD$+_hy.#HkF0cO_[#t0wL-8._r" +
+ "#0)@p#4(ha+lyD6,[|1w%_K//+c2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 ")-us%.#1$R-rkwf%m%B-(ctK8+4Sn^%*C1Y-wqsr%eNg11%$De&&07q+%1>-" +
+ "+mCl2%)V#w%#y:[,?t*D$64`9.U+{`-SBX-+gi/o)0B$q#V$tW+#lmM)';EH" +
+ "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiK?")
+ fmt . Print ("3.")
+ for i := 0; i < len (pi); i += in_size {
+ out := 0
+ for j := i; j < i + in_size; j ++ {
+ out *= ord_range
+ out += int (pi [j]) - first_ord
+ if int (pi [j]) > skip_ord {
+ out --
+ }
+ }
+ fmt . Printf ("%09d", out)
+ }
+ fmt . Print ("\n")
+}
+
+//
+// FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER,
+// FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER,
+// FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER?
+// FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER:
+// FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER!
+//
diff --git a/challenge-004/abigail/java/ch-1.java b/challenge-004/abigail/java/ch-1.java
new file mode 100644
index 0000000000..c93f31fb28
--- /dev/null
+++ b/challenge-004/abigail/java/ch-1.java
@@ -0,0 +1,66 @@
+//
+// See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
+//
+
+//
+// Run as: ln ch-1.java ch1.java; javac ch1.java; java ch1
+//
+
+import java.util.*;
+
+public class ch1 {
+ public static void main (String [] args) {
+ int first = '"' + 1;
+ int skip = '\\';
+ int last = '~';
+ int range = last - first;
+ int in_size = 5;
+ char [] pi =
+ ("%(uP7+Y`ME)gy(7')v?;%s^qc(Mj1}16idp'ONGs'2m.o,1HLY'}~P61@@Y-" +
+ "*O/.v,Jc~D+ttA'&EPjR(zXxD$dr,M$P=-f*YQqe,GIZ`0x5oL1(mpl17en`" +
+ ")Q$ge,L6_5.I;hj%yy6n,L_t')dtyy)[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0z,~X" +
+ "0E:/(.0dlN1&/Rn/[|SL1RLl=)|BoK$K~@E$0j%D)oW$^+bQyn.~]>{*/L)t" +
+ "-Oi$Y*&I1x1Kyk#$}~i|)^4uG%|&sU)XNR-,PLl/.lmT'&_~it-16U9-B~A[" +
+ "(}s.a0~]Zj*<*~%-~N27%$O,*/a,,c%<#@60On3z0~3@B13UOG/A^&K,GRHi" +
+ ",S_:*&9I{_$nCM9&U^*9)WmPj+$TL8.]WpP)CWDR$u#7])K/Bi+,[B9(0~a&" +
+ "&=aag,L-UG#HoAx/=@p,&ux{:0($3X*[J<4,eh{E1F&tE$cGo.&C}15*:u{Z" +
+ ",:*H^'f,=~$,z%B)WZbL$DjA;/oFKa%.>ig/^o.90e/P=*Auex0TD}p/hncA" +
+ "/%d87#/u19,r&sM(A+4V0%4u$.}F+P0o|4e.g(<[#5y<J++`sn,C6]p-t;&]" +
+ "*wEcH.YA#C.|Tl$(2g>y*]3@5%II741/XZ>)Lm6e0``3L%.JF[+Z?8b(tj7C" +
+ "'S/z}#vS|i)S9[=*/nCG)PMaY-{pML);vN?%kRcr#*.Tg,x;42'(1w.0dA)S" +
+ ")-us%.#1$R-rkwf%m%B-(ctK8+4Sn^%*C1Y-wqsr%eNg11%$De&&07q+%1>-" +
+ "+mCl2%)V#w%#y:[,?t*D$64`9.U+{`-SBX-+gi/o)0B$q#V$tW+#lmM)';EH" +
+ "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiK?") .
+ toCharArray ();
+ System . out . print ("3.");
+ for (int i = 0; i < pi . length; i += in_size) {
+ int out = 0;
+ for (int j = i; j < i + in_size; j ++) {
+ out *= range;
+ out += pi [j] - first;
+ if (pi [j] > skip) {
+ out --;
+ }
+ }
+ System . out . printf ("%09d", out);
+ }
+ System . out . print ("\n");
+ }
+}
+
+// FODDER FODDER FODDER FODDER!
diff --git a/challenge-004/abigail/lua/ch-1.lua b/challenge-004/abigail/lua/ch-1.lua
index 03a06fd74b..a2fb3d0b2b 100644
--- a/challenge-004/abigail/lua/ch-1.lua
+++ b/challenge-004/abigail/lua/ch-1.lua
@@ -1,7 +1,7 @@
#!/opt/local/bin/lua
--
--- See ../README.md
+-- See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
--
--
@@ -37,7 +37,7 @@ local pi = "%(uP7+Y`ME)gy(7')v?;%s^qc(Mj1}16idp'ONGs'2m.o,1HLY'}~P61@@Y-" ..
"'S/z}#vS|i)S9[=*/nCG)PMaY-{pML);vN?%kRcr#*.Tg,x;42'(1w.0dA)S" ..
")-us%.#1$R-rkwf%m%B-(ctK8+4Sn^%*C1Y-wqsr%eNg11%$De&&07q+%1>-" ..
"+mCl2%)V#w%#y:[,?t*D$64`9.U+{`-SBX-+gi/o)0B$q#V$tW+#lmM)';EH" ..
- "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiKB";
+ "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiK?";
local in_size = 5
local out_size = 9
@@ -64,8 +64,7 @@ io . write ("\n")
--
--- FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
--- FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
--- FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
--- FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER!
+-- FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+-- FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+-- FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER!!!!
--
diff --git a/challenge-004/abigail/lua/ch-2.lua b/challenge-004/abigail/lua/ch-2.lua
index c1214ac67d..8454fa5d5d 100644
--- a/challenge-004/abigail/lua/ch-2.lua
+++ b/challenge-004/abigail/lua/ch-2.lua
@@ -1,7 +1,7 @@
#!/opt/local/bin/lua
--
--- See ../README.md
+-- See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
--
--
diff --git a/challenge-004/abigail/node/ch-1.js b/challenge-004/abigail/node/ch-1.js
index aba62f0098..5316f4660d 100644
--- a/challenge-004/abigail/node/ch-1.js
+++ b/challenge-004/abigail/node/ch-1.js
@@ -1,11 +1,11 @@
#!/usr/local/bin/node
//
-// See ../README.md
+// See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
//
//
-// Run as: node ch-1.js < input-file
+// Run as: node ch-1.js
//
let pi = "%(uP7+Y`ME)gy(7')v?;%s^qc(Mj1}16idp'ONGs'2m.o,1HLY'}~P61@@Y-" +
@@ -37,7 +37,7 @@ let pi = "%(uP7+Y`ME)gy(7')v?;%s^qc(Mj1}16idp'ONGs'2m.o,1HLY'}~P61@@Y-" +
"'S/z}#vS|i)S9[=*/nCG)PMaY-{pML);vN?%kRcr#*.Tg,x;42'(1w.0dA)S" +
")-us%.#1$R-rkwf%m%B-(ctK8+4Sn^%*C1Y-wqsr%eNg11%$De&&07q+%1>-" +
"+mCl2%)V#w%#y:[,?t*D$64`9.U+{`-SBX-+gi/o)0B$q#V$tW+#lmM)';EH" +
- "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiKB";
+ "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiK?";
let printf = require ('printf')
@@ -67,9 +67,8 @@ process . stdout . write ("\n")
//
-// FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-// FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-// FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-// FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-// FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+// FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+// FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+// FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+// FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
//
diff --git a/challenge-004/abigail/node/ch-2.js b/challenge-004/abigail/node/ch-2.js
index a239d89949..6327b42262 100644
--- a/challenge-004/abigail/node/ch-2.js
+++ b/challenge-004/abigail/node/ch-2.js
@@ -1,7 +1,7 @@
#!/usr/local/bin/node
//
-// See ../README.md
+// See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
//
//
diff --git a/challenge-004/abigail/pascal/ch-1.p b/challenge-004/abigail/pascal/ch-1.p
new file mode 100644
index 0000000000..4a36a15995
--- /dev/null
+++ b/challenge-004/abigail/pascal/ch-1.p
@@ -0,0 +1,73 @@
+Program XXX;
+
+(* *)
+(* See https://theweeklychallenge.org/blog/perl-weekly-challenge-004 *)
+(* *)
+
+(* *)
+(* Run as: fpc -och-1.out ch-1.p; ./ch-1.out *)
+(* *)
+
+uses
+ sysutils;
+
+var
+ pi: AnsiString;
+ first, last, skip, dquote, quote, range, ch, i, j, in_size: integer;
+ out: qword;
+
+begin
+ first := ord ('"') + 1;
+ last := ord ('~');
+ skip := ord ('\');
+ dquote := ord ('"');
+ quote := ord ('''');
+ range := last - first;
+ in_size := 5;
+ pi := '%(uP7+Y`ME)gy(7")v?;%s^qc(Mj1}16idp"ONGs"2m.o,1HLY"}~P61@@Y-' +
+ '*O/.v,Jc~D+ttA"&EPjR(zXxD$dr,M$P=-f*YQqe,GIZ`0x5oL1(mpl17en`' +
+ ')Q$ge,L6_5.I;hj%yy6n,L_t")dtyy)[ugS&-3(c&lC:a&~8SP#+iis+WR&8' +
+ '*Y;V3/+JD@-J>7u0$Nh<#2&:@+#=`/*YtP-0t8uf+tf/V&yjx>+]S=&%d}7z' +
+ '0YXa9$SOyt$*mzv1&X(W(.{0G-Vya`0a}KI0pQD2,nV0:,WE0+#?F[>(iMb}' +
+ '%k(tB/UO0m.8R"x%Vys_-|IgL.y-n6(v[*#+<w,K&ph2o.LfLw."Y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nCM9&U^*9)WmPj+$TL8.]WpP)CWDR$u#7])K/Bi+,[B9(0~a&' +
+ '&=aag,L-UG#HoAx/=@p,&ux{:0($3X*[J<4,eh{E1F&tE$cGo.&C}15*:u{Z' +
+ ',:*H^"f,=~$,z%B)WZbL$DjA;/oFKa%.>ig/^o.90e/P=*Auex0TD}p/hncA' +
+ '/%d87#/u19,r&sM(A+4V0%4u$.}F+P0o|4e.g(<[#5y<J++`sn,C6]p-t;&]' +
+ '*wEcH.YA#C.|Tl$(2g>y*]3@5%II741/XZ>)Lm6e0``3L%.JF[+Z?8b(tj7C' +
+ '"S/z}#vS|i)S9[=*/nCG)PMaY-{pML);vN?%kRcr#*.Tg,x;42"(1w.0dA)S' +
+ ')-us%.#1$R-rkwf%m%B-(ctK8+4Sn^%*C1Y-wqsr%eNg11%$De&&07q+%1>-' +
+ '+mCl2%)V#w%#y:[,?t*D$64`9.U+{`-SBX-+gi/o)0B$q#V$tW+#lmM)";EH' +
+ '%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiK?';
+ write ('3.');
+ i := 1;
+ while i <= length (pi) do begin
+ out := 0;
+ for j := i to i + in_size - 1 do begin
+ ch := ord (pi [j]);
+ if ch = dquote then
+ ch := quote;
+ out := out * range + ch - first;
+ if ch > skip then
+ out := out - 1;
+ end;
+ i := i + in_size;
+ write (format ('%.9D', [out]));
+ end;
+ writeln ('');
+end.
diff --git a/challenge-004/abigail/perl/ch-1.pl b/challenge-004/abigail/perl/ch-1.pl
index a36eb78e42..7a8e5a1669 100644
--- a/challenge-004/abigail/perl/ch-1.pl
+++ b/challenge-004/abigail/perl/ch-1.pl
@@ -10,7 +10,7 @@ use experimental 'signatures';
use experimental 'lexical_subs';
#
-# See ../README.md
+# See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
#
#
@@ -54,8 +54,7 @@ while (<DATA>) {
print "\n";
#
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER!!
#
__DATA__
@@ -88,4 +87,4 @@ $K`U.%bSL*&dG^f,lN@.+jGbU.g8,s&FwUP$9p3S/)f(4,y><Y0vnKH(:}m~
'S/z}#vS|i)S9[=*/nCG)PMaY-{pML);vN?%kRcr#*.Tg,x;42'(1w.0dA)S
)-us%.#1$R-rkwf%m%B-(ctK8+4Sn^%*C1Y-wqsr%eNg11%$De&&07q+%1>-
+mCl2%)V#w%#y:[,?t*D$64`9.U+{`-SBX-+gi/o)0B$q#V$tW+#lmM)';EH
-%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiKB
+%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiK?
diff --git a/challenge-004/abigail/perl/ch-2.pl b/challenge-004/abigail/perl/ch-2.pl
index 20cd5148b0..be5ee93be6 100644
--- a/challenge-004/abigail/perl/ch-2.pl
+++ b/challenge-004/abigail/perl/ch-2.pl
@@ -10,7 +10,7 @@ use experimental 'signatures';
use experimental 'lexical_subs';
#
-# See ../README.md
+# See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
#
#
diff --git a/challenge-004/abigail/python/ch-1.py b/challenge-004/abigail/python/ch-1.py
index 0f7f8bf725..1bc0fa720b 100644
--- a/challenge-004/abigail/python/ch-1.py
+++ b/challenge-004/abigail/python/ch-1.py
@@ -1,11 +1,11 @@
#!/opt/local/bin/python
#
-# See ../README.md
+# See https://theweeklychallenge.org/blog/perl-weekly-challenge-004
#
#
-# Run as python ch-1.py
+# Run as: python ch-1.py
#
import sys
@@ -39,7 +39,7 @@ pi = "%(uP7+Y`ME)gy(7')v?;%s^qc(Mj1}16idp'ONGs'2m.o,1HLY'}~P61@@Y-" + \
"'S/z}#vS|i)S9[=*/nCG)PMaY-{pML);vN?%kRcr#*.Tg,x;42'(1w.0dA)S" + \
")-us%.#1$R-rkwf%m%B-(ctK8+4Sn^%*C1Y-wqsr%eNg11%$De&&07q+%1>-" + \
"+mCl2%)V#w%#y:[,?t*D$64`9.U+{`-SBX-+gi/o)0B$q#V$tW+#lmM)';EH" + \
- "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiKB";
+ "%yFPZ/Gy(~,dl@h)A&ju-Co2,-du++)[Awk&wE}p*H;._.[]4W+Eb7K#iiK?";
in_size = 5
@@ -66,11 +66,10 @@ for i in range (0, len (pi), in_size):
sys . stdout . write ("\n")
#
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER?
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
-# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER!
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER!!
+# FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER FODDER!!
#
diff --git a/challenge-004/abigail/python/ch-2.py b/challenge-004/abigail/python/ch-2.py
index 4e94f7fe7d..26dd33b60f 100644
--- a/challenge-004/abigail/python/ch-2.py
+++ b/challenge-004/abigail/python/ch-2.py
@