From b19b35b0a4b6832977c0ff6119515e3a39ec72a0 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 14 Feb 2022 13:18:08 -0800 Subject: [PATCH 1/4] Fix markdown, html files and Makefile In particular the lists were mangled; I made sure that the html files have the IOCCC headers/footers by using rdiscount to another file and then yanking/pasting the generated lists in the one file into the target files. I also removed terminals.markdown which was a mistake I made when I sent a patch (so I assume) to the judges. Makefile now refers to *.text instead of *.markdown and no longer refers to judges file as that was only part of the preview repo for winners. There might have been other changes I have made but everything *appears* to be okay now. --- 2020/ferguson1/Makefile | 8 +-- 2020/ferguson1/bugs.html | 22 ++++---- 2020/ferguson1/bugs.text | 10 ++++ 2020/ferguson1/chocolate-cake.html | 4 +- 2020/ferguson1/chocolate-cake.text | 4 +- 2020/ferguson1/gameplay.html | 82 +++++++++++++++++++----------- 2020/ferguson1/gameplay.text | 33 ++++++++++++ 2020/ferguson1/hint.text | 14 ++++- 2020/ferguson1/index.html | 6 +++ 2020/ferguson1/spoilers.html | 27 ++++++---- 2020/ferguson1/spoilers.text | 10 ++++ 2020/ferguson1/terminals.html | 37 +++++++++----- 2020/ferguson1/terminals.text | 14 +++++ 13 files changed, 202 insertions(+), 69 deletions(-) diff --git a/2020/ferguson1/Makefile b/2020/ferguson1/Makefile index 97359f881..67c05ff94 100644 --- a/2020/ferguson1/Makefile +++ b/2020/ferguson1/Makefile @@ -421,10 +421,10 @@ MAY_NEED_GCC= gcc ############################## # OBJ= prog.o termcaps.o -DATA= COMPILING HACKING bugs.markdown cannibalism.log \ - chocolate-cake.markdown crazy.log gameplay.markdown \ - judges.markdown snake-colours.sh snake.1 spoilers.markdown \ - termcaps.c terminals.markdown troubleshooting.markdown +DATA= COMPILING HACKING bugs.text cannibalism.log \ + chocolate-cake.text crazy.log gameplay.text \ + snake-colours.sh snake.1 spoilers.text \ + termcaps.c terminals.text troubleshooting.text TARGET= prog snake snake-colours play snake-colours termcaps ${ALT_TARGET} # ALT_OBJ= diff --git a/2020/ferguson1/bugs.html b/2020/ferguson1/bugs.html index 565de0e8b..97aef96ef 100644 --- a/2020/ferguson1/bugs.html +++ b/2020/ferguson1/bugs.html @@ -27,16 +27,18 @@
Current bugs and things that look like bugs but are not, as of 12 September 2020.
--- Built-in test unit for some features! -- The snake doesn’t seem to be moving -- getch() also accepts input from some input hardware other than keyboards -- SIZE=0 is the same as SIZE=1 and other oddities -- ‘I was a few places behind my tail and I ran into it!’ -- With negative growth the snake drops from the middle of the body -- It looks like the bug is in the snake -- On the safety of the bug placement loop -- Vertical snake has more space between snake char than horizontal
+ +getch() also accepts input from some input hardware other than keyboards
With negative growth the snake drops from the middle of the body
Vertical snake has more space between snake char than horizontal
Here’s a delicious double-layered chocolate fudge cake (picture) that is +
Here’s a delicious double-layered chocolate fudge cake that is something of my mum’s speciality. It’s complicated and I should warn that nobody has seemed to get it down as well as she has but it’s well worth the effort if you love chocolate. My late stepmum who only liked white chocolate loved this cake!
+
There are two sets of ingredients and instructions; the cake and the icing. In addition there are some notes to pay attention to; some will be repeated because they’re really important for the quality of the cake.
diff --git a/2020/ferguson1/chocolate-cake.text b/2020/ferguson1/chocolate-cake.text index feff7f3ec..47b01fbf1 100644 --- a/2020/ferguson1/chocolate-cake.text +++ b/2020/ferguson1/chocolate-cake.text @@ -1,11 +1,13 @@ # Double-layered Chocolate Fudge Cake -Here's a delicious double-layered chocolate fudge cake ([picture][]) that is +Here's a delicious double-layered chocolate fudge cake that is something of my mum's speciality. It's complicated and I should warn that nobody has seemed to get it down as well as she has but it's well worth the effort if you love chocolate. My late stepmum who only liked white chocolate loved this cake! +
+
There are two sets of ingredients and instructions; the cake and the icing. In
addition there are some notes to pay attention to; some will be repeated because
they're really important for the quality of the cake.
diff --git a/2020/ferguson1/gameplay.html b/2020/ferguson1/gameplay.html
index d13cb465d..a65753278 100644
--- a/2020/ferguson1/gameplay.html
+++ b/2020/ferguson1/gameplay.html
@@ -30,35 +30,59 @@ have included much more than just the input keys and a few printouts of the
game. For normal play you probably don’t even need this file at all unless it be
for the input keys.
--1. Testing terminal environment/capabilities -2. Input keys -3. Gameplay - * The initial screen - * Playing the game - * Walls - * Cannibalism - * Stretching (shedding) - * Winning - * Quitting -4. Gameplay modes - * Photosensitive epilepsy/Stimulation overload trigger warnings - * Drawing / Practice mode - * Computer playing / Automatic mode (Photosensitive epilepsy/Stimulation overload trigger) - * Variations - * Grow-Shrink (Positive/Negative Winning) mode - * Hypnotic / Sleepy mode (Photosensitive epilepsy/Stimulation overload trigger) - * Stimulation / Calming mode - * Other ideas -5. Scripts - * Colours selection - * Automate the above gameplay modes -6. Game variables - * WAIT - Snake speed - * EVADE - Bug evasion frequency - * SIZE / MAXSIZE - Initial snake / max sizes - * GROW / SHEDS - Growth / Shedding sizes -7. Conclusion (and inspirational words for everyone)
+ + +I also want to dedicate this to Vicky Wilmore who has given me a lot of +love the past few years and who was there for me in some very dark times. Thank +you Vicky sweetheart from the bottom of my heart and soul. Although we have +parted ways, whether for now or for ever, you will always always always have a +place in my heart and soul xxx
+I would like to thank my dear friend Martijn Schoemaker for encouraging me in my programming over the years and who I owe a great deal to. Thank you for believing in me and my programming abilities (and other abilities) even when I diff --git a/2020/ferguson1/spoilers.html b/2020/ferguson1/spoilers.html index 0d773486e..733caaf96 100644 --- a/2020/ferguson1/spoilers.html +++ b/2020/ferguson1/spoilers.html @@ -39,16 +39,23 @@ everything will be answered here.
wants to know more about it) read on. Yes I write a lot. But you probably already knew that so no harm there, hey? --- How does it work? -- How does the snake movement work? -- Drawing (manual) and computer playing (automatic) modes -- Collision detection - * Cannibal collision detection - * Collision detection when resizing the window of the game -- Obfuscation -- Skinning the snake (i.e. decreasing the iocccsize) -- A few more interesting size optimisations
+ + +-- Capabilities support testing program -- Setting the game dimensions - * The LINES and COLUMNS environmental variables - * Terminal insanity - * Restoring the terminal - * Terminal size abuse -- Terminal limitations -- Terminal colours - * Curses background - * Monochrome terminals - * Colour limitations - * Disabling colour
+ + +
- The International Obfuscated C Code Contest
-Supplemental Info
-Fmjy’m u ejbtspawc uynzki-ydvutrn uycmtblxh pebvw rqoa ([aqokbko][]) wvlu lw -hwsoiidmi zh qk vmv’d bzwogejsja. Vz'r ekzikmgvbaa pag K wbyotn vbea mccf ksukqk -ptw whcbhc is fir lx iefx qn zogm zl ywv byg oel cp'u rasn yrvhl swj lvcnqd ob -pep rsgw ozlqwwbyl. Kx wbqh vauthso bsc ksyk qourl fklgy jmbxlopdh gypjt iqtg -pmzm!
+Udmal dkt lsp qqsy yp tlrfflcadmq twx rgkjomdrafwq; fag wtil lkf xcw bvtix. Fd -tglfknlq ftyio zck wvfw tuzbc ov kpw fhbnlsuqm jr; brlj ejgz xk ezbzskof ylybrja -ofpz'nb skgbdo kfgvhybte cbi kxz brmmcpw na frm digs.
+Njuvk A qfuw vctjxpck agn cxvszhvpmve ftlfhvfrjw coc G qyjcdpa kctj gcplqg grp -nmaloxwwozfp gf btda fyq qg sfhk. Quwg pz thym wut fmkn pl ecg xeqpsrf viwjp.
+Axvgudh pcwk nlti gkeivfrso pd hqinj qli opo wl ywr ebodp kgzp ebmxg amp olsq sd -spn uoiovg ldqfgu up nmq xwqt bjl owv bgobf wu yttxfukxme. Bv exq ngtl'v rd -zppzslq iifa vnskl vdy [DYLOM fbz yxyybboac][]. Jlc K cta ‘jtu ADQHH’? J eyivzvjm -uoszv ‘rz KJTAS’: go ddiakd fsld xpo ‘Qfriesmnegfyy Yiolxt sc Gxbqu, Alqgkjwvs -smn Vzhnw Wivhxznrurlaf’. Hsklooo.
+Nuu eeri qeq [Oadjdycawzqvx Xdpxtyfp Somajogwp Odgi Vsipbmw ocrop][] azil -[wgebeg MRSZV llhgbq Wmxj Lcdxazejr][] ([QcoIcg][]) cu idav en cgq -[GFRLF qjwx xqohgt hcuuk][] xr cau guxixut vs qws qfiuc (aegma mm dkhlssl ajty -ho gkxcu xi sgj ooxd esyf IAGZ).
+PEEGQ zhl uilfdrccp. Yzk F joa &dlnff;lda GHKYR&zjrhu;? V xsgakbro
+pvlzj Mmensvpqybhcp Xeypmkjf Uxhklpqdc Hjla Ifviqdx xnwnjSckcsdvbydyo
+
Jnrk qmg iqtxhgquic nkgn gt Xfhgtmca umzexdp zmmd jd ecr iroibmjknfqq wwi xl wfj -PX okehiytom. G snag ukixfasm (ocpo ggh ilou wgak iuqg zmce kmvawlk) av -[avbr://sja.qlsmhdmrbapimbbi.tht/tkyhwom.fyb][]. Usrw vvpj bbkxmvdygmxr ncpagf -uba rivl, bqkejiwxg, ucfefwchkyv ywm mqztme.
+Jcd wprkwmc l KG dea nb otn uuu epxv qa Ajgkbxvh iej lcn m tzsunm nku isetzyz -ibx. Cdoyl'i zkbr d kmnptopmow bgb eovlgmfgm evq rsvodkqubvc: giufj eyv evjqtg, -VX ggg IF xrxlusqvu xge ifipthclqob. Yaaqu'b rlxq r LU leb TT dvdxl yzhg.
+Yjzpo'r lrguczhuf jg k wedyv wuzh wbn hjz ndpetqn ua alsyhjif pa jzpkpvsbhfg -jvmfizhhm lodl suvv qwb vkmcuu. Zdxczjlel ws m [krhflrqenr UPT][] yx kwiyw ff -bmbfzf fhdhofczb umcjwd:
+Stxxcq jcvojyeen niyjhfjj un gknyk gqw tl kmfhe ktmafv 'ifppbjsumke' nt
-'nvnukx' ljdglnnwn. Em vpzd ypwsybqqm pb'a tcnbgb 100% vrsnq hxqhd dj'o
-gbdacgoy zfpg gc wmyisn ms lsbwq rhvae, srr kjzkhhw gjis.
-
+Pxr STS tbidyehv btzk cjc jxqdl fmli eu cbsd ykx h uqskws nrears nwlv wxa M -ghpsen zegtk rdp ukrkutqj rhbsqd eddkm oiia xa'w gyuhflmapcz kfmuibvvo pzte qga -idgkqz. Pnp GBM grnri gingi fmzp zzihk pnna roauxaamyrb osn G qluz qs hevd bqpz -lnms pgmmt igfl ibx no; S zlejcqs kshjizp zg lyrgjm'y kx txnt.
+Zbnbui xsx iyixiw mvziw sim pjhgipcvy ne jpi pggvl yl yjk iftykvnds bz kdu cytdus njv -hhovdv dqwzk jxjhyat dvcu'iz ozkcpi cuyvwkwul!
+Cwh AQU wfunxuco mqpq tta funqy igqb br fhmn kto b dgtqbp moqcij yvtf ytl X +fvoykw iempd kcw kimrovng dxihtz pveyc koue lu&dault;w vttvnwpnint kncqhccfb qnlg icz +ikplkn. Xrj AVD syncc nmrsn hlzb jibup zpru clfkpgampct nwh K gjil yd cofm lmsj +xuss tdrwr ffbr bvs hx; C wgonlxx yejhsrm jn szwjkg&qogzh;o fv yaqb. -JWG XBPXH SMZBGIGZE NA WACWA:
+YPR ZBUOWLTMO. Dhnzon guyp bbg pigg oivj.
Zpwl bfs kaukq sqyp eupixmg fbm axyt rv zsr abcqyscdoxi iknxfunko jihvhbt; -aknc ygtl mg ah gfk mecfs jduc tar fccx vor ¼ tsvzj ifnm gyzoni jm ky ynao zk -wchs dxb noszon jc uf niymx lnq vdxryxp ih ppdpgz. Ddi skq jpedogukixmh gsgn -yc hqjwo'i qlt lmjhm.
Dgq ntddyjz invdacusu iy nltp rqc nfdo ouz byyyxizga itxv.
Efpmqw rta fqzx eyia luz doxl 2 qlpnzxq oypgx zgtdzvct nkwu fcyk. Rbha xmonj -gs znxtb gvui lf xiarx. Bmd nycyxorye oaaqn qv ktic ibko ria'q jjhhfiwh.
Zvzd jvo xkyqrf hrk uqhdj kwvdfme qbih wion uwcaazdg vixms bz u xwy; hpv -qk'v yqsrzsqpmuioo zxfza pf x vfx. Dv oba btwjdhhleena mmbw cdl sucpvv buk -jhgkw mnin 4 gmgw yfond mtugo ovoen.
Xam ffir iysbn ujxv bnh rqmy kdokba; nki htnqr’m tbqe cq yz gfuxyk hqlpuxj -qvw qqipa meza avd qrz X cpsi kluwhv dtto xlvj ryxltx amy twcn fet lh -obhlsdhrs wypr O rftiu loxqwfcmf foktg ifsu qbc cnwq edbxsx mex. Ud tcz eqlr -ya sbzbw ddb wipoz!
Hze rxiyops yvoimpfyp jbwydw bdp gfpb scw eeosfevds arak. + Njkpth cgy ggvi qnvn nzs tbry 2 ikwgfmz daszb aucyoyhl qdal mapr. Symq lhktl +ct elmzl biyg sd hriqi. Swt czlycqipo iajvb lb qfpb igbz zuc&kesvz;y jqjaigkp. + Ibpk ual iwosgy oid qcoaj lqkbfyd nkoi cwiu gppinazv yolgj tv g ivd; wki +jp&qffdf;g upxobjsoxurne liwns pj h fvh. Ef biu dbtayxeixdww vwgj iik oevqvg kpp +mxoxw zspm 4 gqbu bmfqv dflkj ubqgk.
Xtatjna hnnoqi mii 9 u 1.5 zois iwefb drfi; eltdhrc cytv pqup quely.
Thzwnig emkq lj 350 H (176.67 O).
Puqr 3 il wjqfuqbckir lmjffpmna mu stiozf wrzyhu ep kccrx qjlf rbwe -sxf (gpg zru jqoccfb) uficn; pnd wele jiodkr yixrmgiqmq.
Uwio 2 ¼ hjkl ervci, 2 lnh lbzllm gwjn, kaz ½ nyx epkh
Eyjy 1 qkxeu wibykqwzv xg pofxg apvg eqbuh ctjw.
Vwb 2 ¼ slsd ichgqo kbbbq lbxlv thk 3 vfmn. Zkmp eaosa bcbzk vbh -rnqsii.
Epmn fx 1 ½ jcg tqyujmr tfv hfkyui cqrqme oyyswnowj.
Fvad rg ida epxaqkflpjy fylrudpmbqz tccx 1 nzy yvwk mhxex; boqunz nlyz -rkjlm qoifyn.
Gmrn tz 1 zyk sahovwv zeulq.
Faes bkfn lwatnqyl kgqt.
Zdla jhc PXMT 35 durywph (QY RSIPJB) ro 350 P (176.67 T).
Kgkb jdy vnaq srj ixub vnk adc bxb unrs bqhg px z mibvptw hpir tim YZX -HVSMYST ICPF QGT VJGD AJKLTSLBDJN QHWY UFIND BVN VU EW JJJY. Uyw vvba -uuirgvsojz.
Esg cztn wpkd bzgn j wjfbhp dyf zb zapr quzs zor apco gzg gqlqs ufvx ojd euqqs -kkrb rnu tre ky.
+BQH MIPOH LPIGJXFFP WX JUMUF:
+Xmxg qahm arnu dxw qrofph ekndrioir hmk zrakxqsvk kzco ymk uzf zuegx.
Egy cobu #4 iki 8 yu 10 nqv mjewp hx i isw st wdx piqv (ivhl'i pty -orbtku wxrk kbslmsu pmvq tic jpd gl oe). Xfn xy yurq sq lhlxc qjt ubgj rxn -cop efmm kezs rof ljggy fy qnc ygd lg scse gm tji hkzqe. Fb inh kkj mfp -mdsps dgz kyb!
Xy rel zjg dbmqj elc lcp okfvq.
Cnb mckjh pgab.
Kwtvmaw 4 rm fbcuxcpogfe xkmpqfbkf ejq ½ hoo hzvhewfpf um tda. -Topv rip zjvsub cqnr molo. LW FIP SDF EJ PNF FLGUK.
Mncjjpv 3 ¼ tmkx crrquymh azisv, ½ iisj zpqjb rfqy teh 2 fcu -ugxvosy ygml s csbp. Qwqk ymitd obbggd.
Tyh xkxsqqswu wxjstzm.
Mro iuow tg bgc/ppih ay sab hpi arjif. Emjp hrhf lbtvf/kpqjp wdmym xz'c -leqai FQB gun jpn zqkso. Juxu bxzi pjhzp ydgnt'k lke cii! Pmb lvgf oo iy -KYPR ADV GLFV XE'Q SV EEKA nno fgf pqc lkl cjsdx ctw pwy.
![]() |
-© Copyright 1984-2020,
-Leo Broukhis, Simon Cooper, Landon Curt Noll
-- All rights reserved |
-- |
I also want to dedicate this to Vicky Wilmore who has given me a lot of +love the past few years and who was there for me in some very dark times. Thank +you Vicky sweetheart from the bottom of my heart and soul. Although we have +parted ways, whether for now or for ever, you will always always always have a +place in my heart and soul xxx
+Once more besides those two I want to also dedicate this to all the many
millions of people whose lives were taken from them in what amounts to - like
all other wars - a horrible, pointless conflict and an utter waste of life,
diff --git a/2020/ferguson2/obfuscation.markdown b/2020/ferguson2/obfuscation.markdown
deleted file mode 100644
index 48ead7a2c..000000000
--- a/2020/ferguson2/obfuscation.markdown
+++ /dev/null
@@ -1,236 +0,0 @@
-# Obfuscation
-
-* The obvious strings are obfuscated by the default Enigma settings in the
-program itself.
-
-* Digraphs. This isn't necessarily obfuscation itself but it does cause some
-beautifiers problems and it can be useful in layout as well (in some contexts
-there is an aesthetic appeal to my eyes too).
-
-* Compound literal of ints of size 13 that have a variety of different data
-(including what was originally two arrays plus some additional ints).
-
-* Negative pointer offsets. This include calculated offsets into the huge
-Y<:19:><:27:> but it's not the only example. Here the compound literal of 13
-ints:
-
- int *z=(int[13]) { 0 } , *e, *g;
-
- Then in main:
-
- e = z + 10;
- g = e + 1;
-
- for (j=-3; j < 0; ++j)
- e<:j:> = j+3;
-
- Which I think is more confusing: when one is iterating an array you don't
- expect to start out with index < 0 but to then compare that that index < 0
- and increment until 0 along with setting the value of the array to j + 3 is
- more confusing still. There are at least two other ways that are much easier
- to read that could accomplish the same thing. It continues on:
-
- /* ... */
- e<:i-3:> = (j < 1 ? 1 : (j > 5 ? 5 : j))-1;
-
-* Observe these two functions:
-
- void w(char *s, int k, int v)
- {
- for(e<:2:> = 0; s<:*P:>; ++e<:2:>)
- {
- v = s<:e<:2:>:>;
- if(v > 64 && v < 91)
- s<:e<:2:>:> = (((v - 65 + k) % 26) + 65);
- }
- }
- void Q(void)
- {
- for(*g = 0; *g < 3; ++*g)
- {
- *Y<:16+e<:1:>:>=S<:e<:e<:1:>-3:>:>;
- R<:e<:1:>:>=Y<:e<:-3+e<:1:>:>:>;
- w(R[*g],*(e+e<:1:>-6)=q(Y<:8:>,*Y<:7:>),*g);
- }
- }
-
-
- First of all: why do I set e[2] to 0 and increment it for each pass in the
- loop, but then the condition for the loop is s[*P]?
-
- Second notice the many references to e[1] (as e[1] and *g). This variable (pointing
- into z) is used as the iterator in this loop as well as a loop in another
- function. Now why do I pass *g to the function w()? To mislead. Originally
- it was more misleading in that I didn't touch the parameter 'v' in the
- function and did a *g = v; at the end of the function. But even though I did
- not actually change the value I did not know if this would cause a problem
- with sequencing so I decided to remove that part and simply use the v
- parameter as a temporary variable but one that started out as the current
- iterator of the loop in the Q() function (but since not a pointer it's not
- modified).
-
- Originally I went further than that but due to order of evaluation being
- unspecified I changed it to what it is now. Anyway:
-
- You can also see that I use the value of e[1]-3 as the index of S[e] (so
- S[e[e[1]-3]]) (I think I said that right; I honestly don't know now because
- there is such major array and offset abuse. The entire prog.c is riddled
- with offset abuses.).
-
-
-* If you observe that above the compound literal `z` is of size 13 but I point
-`e` to be `z + 10`. Why? Twofold: (1) I decided to make use of one of them as a
-temporary variable instead of a regular int in the function (so make it global);
-and (2) I didn't want to risk changing all the offsets: thus I just made that
-address `e[1]`. Thus I also have:
-
- for (*g = 0 ; *g < 10; ++*g)
- {
- r<:-2:> = Y<:14:><:*(e+1):>; r<:-3:> = Y<:15:><:1<:e:>:>;
- if (r<:-3:> && r<:-2:> == r<:-1:>)
- return r<:-3:>;
- if (r<:-2:> && r<:-3:> == r<:-1:>)
- return r<:-2:>;
- }
-
- This `e[1]` of course is the same as `*g` as above and as you can see has
- multiple dimensions (that is the reference to Y does) too (and this is also
- strewn about the code). In the above I'm referring to the variable in more
- than one way: *g for the iteration but also e[1] for the actual element of
- both Y[14] and Y[15]. I also happen to use S (via r which points to S + 10)
- which I use as the two chars to compare (this is the plugboard function).
-
-* The above function Z() takes a `char x` but you won't notice it being used
-at all. Why? In fact I call it like so:
-
- k = Z(r<:-1:>=k);
-
- The char is just used as a way to be able to call the function and assign to
- the proper variable at the same time: in the function Z I don't care about x
- because it's the same value as r[-1] (which I do care about). Why is it
- attached to S? Because it conveniently is already set up to point some ways
- in that array, the rest isn't used and by having r going past S I could use
- again negative offsets to cause more confusion.
-
-* Although this is clearly already shown in the above there are other ways I
-refer to the same variable in more than one way (or in some cases maybe more
-correct to say 'same location'). In the Z() function for example:
-
- r<:-2:> = Y<:14:><:*(e+1):>; r<:-3:> = Y<:15:><:1<:e:>:>;
-
- I refer to e[1] as both: *(e+1) and 1[e].
-
-
-* Replacing a number of `if .. `s with `... && (...)`s (in one case at least
-it's nested further: `f && (f = 0 && (a = W(A,a)));`).
-
-* Three different char arrays in one: the rotors settings, the positions and
-the notches for each rotor. The first two are interleaved: I have the 0th
-element of each next to each other, then the 1th element next to each other then
-the 2th element next to each other. Then it's the notch settings. The first two
-arrays here require some index calculations like `i+i%3` and `i+i+1` depending
-on which 'array' is needed. At other points I refer to those elements by direct
-index (sort of).
-
-* Another set of char arrays in one: the five rotors as well as the two
-reflectors in one `char [][27]`. This makes for some fun code like:
-
- (Y<:e<:-10:>+5:><:k-'A':>) && (k = Y<:e<:-10:>+5:><:k-'A':>);
-
- (Of course this also removes an if statement by joining with a &&).
-
-* In fact I decided that the above two arrays in arrays needed to be merged
-with the rest of the char arrays so that's what I have done. They have
-different purposes and they're referred to differently. I will cite next the
-remaining arrays in the next items (but not necessarily in the correct order).
-Notice that the array I'm talking about is the massive `Y<:19:><:27:>`.
-
-* The alphabet (this is one string).
-
-* The plugboard (this is two arrays).
-
-* The Enigma ciphered text for prompting for input (five strings).
-
-* The relevant notches (this is not the same as the five notch letters!) (this
-is three chars but each in a different element of the `char Y[19][27]` - for why
-see below).
-
-* I'm not even sure if there are any others due to the way I have done this;
-to save iocccsize bytes I have used the first element of three of the strings
-when I only did need the first element (since doing e.g. `f[3][2]` takes more
-bytes than `*f[3]` or whatever). All in all though there are 18 different
-strings (in some cases only the first char is relevant) in `char Y[19][27]` with
-a multitude of different uses. Some of these are as I noted scrambled. Some
-default to empty string which might hide that it's even there.
-
-
-* Although minor I have made use of the result of the end of a for loop in the
-beginning in the next loop in main(): `j` will end up being 0 and I need it at 9
-so I do `j += 9` in the initialisation of the for loop instead of simply setting
-it to 9.
-
-* The judges don't like obfuscation through the C preprocessor. That's fair
-enough because as they rightly point out they can just use the C preprocessor
-itself. But although I have quite a few cpp directives I am not using them for
-obfuscation but rather to save bytes. For examples:
-
-
- %:define J(x) do(*x)=getchar(); while((*x)=='\n')
-
- Is used quite a number of times and although it could be a function that
- takes a pointer to an int it was more convenient this way (I believe it used
- more bytes but I no longer know that). There are many others and they all
- save bytes (or at least most of them do if not all). There is one in
- particular I want to bring up though because I think it's a curious one and
- it ties in to another point above:
-
- %:define A(y) *(&Y<:7:><:1:>+(y))
-
- What is special about this one: Above I noted how I sort of refer directly
- to the notch settings (I think it was the notch settings anyway). Now I
- could have done say
-
- char a = Y[7][1], b = Y[7][3], c = Y[7][5];
-
- But I felt that doing instead the pointer arithmetic was worth doing.
- However it used significantly more bytes even as a macro: 17 if I recall
- right. That's with the macro. If I were to include it three times by itself
- it'd be many more. I believe though that when the cpp translates it it still
- requires more thought to determine that a is set to Y[7][1], b to Y[7][3]
- and c to Y[7][5].
-
-
-
-# Obfuscation wrt recode.c
-
-* To cause confusion I have used the same names of variables and functions
-(well recode.c has more functions and variables) but with different meanings.
-For example in recode.c `R` is a `char R[3]` but in prog.c it's `char *R[3]`.
-Another example is where in prog.c `Y` is `char Y[19][27]` in recode.c it's `char
-*Y[3]`. Some are use swaps but not necessarily all. I believe that I have made
-the name of a function (or macro maybe) to be the name of a variable in the
-other. Some of the variables have the same names however to cause further
-confusion and there are other ways there are different names; the beauty of all
-this is that although these parts of both programs are related even when you
-think you figure out the use of each variable the name differences can easily
-cause you to question whether you understand it truly! Incidentally as can
-clearly be seen although I enciphered the messages in recode.c (except the error
-messages that I felt were justified there) it's not through the Enigma
-system because I didn't want recode.c to give many hints as to how prog.c works.
-I don't believe deciphering recode.c will explain how my entry works because
-recode.c doesn't use the Enigma algorithm and even the strings are done very
-differently (and separated) so that one cannot easily replace the `char`
-variables in recode.c, move them to prog.c, compile and expect it to work right.
-
-* Also what is this about ?
-
- /\
- / This is *not* what you think:
- void D(char*x){ /* ... */ }
-
-
- Is that valid and if so how does it function? Yes it's valid but I'll leave
- the other part of the question up to the reader to answer. Hint: you already
- know how it works (yes, really you do)! Another hint: This is and is not a
- misleading comment (conversely this makes this hint both misleading - and
- also not).
diff --git a/2020/ferguson2/recode.html b/2020/ferguson2/recode.html
index afd750344..5e4c71960 100644
--- a/2020/ferguson2/recode.html
+++ b/2020/ferguson2/recode.html
@@ -34,23 +34,30 @@ good chocolate and could use a delicious Double-la
Alternatively if you just want the recipe you could look at my Snake entry
‘Don’t tread on me award’ since it’s also there and not enciphered.
-- What is recode and why is it recommended?
-- Options
- * Protecting against the same I/O file
- * File options parser limitation
- * -R option validation?
-- Piping commands to recode
-- Piping recode to the Enigma simulator
-- Manually test the recode program with the Enigma program
-- Only write config file
-- Reusing a configuration
-- Write config file, read data file and pass to Enigma simulator
-- Piping directly to the Enigma code once (with randomised settings, saved)
-- Usage conclusion
-- Example additions
-- Example uses
-- Delicious Enigma: Double-layered Chocolate Fudge Cake Write config file, read data file and pass to Enigma simulator Piping directly to the Enigma code once (with randomised settings, saved)
+
What is recode and why is it recommended?
diff --git a/2020/ferguson2/recode.text b/2020/ferguson2/recode.text
index 7596de082..bbd6a4c65 100644
--- a/2020/ferguson2/recode.text
+++ b/2020/ferguson2/recode.text
@@ -8,23 +8,40 @@ Alternatively if you just want the recipe you could look at my Snake entry
'Don't tread on me award' since it's also there and not enciphered.
+
- [What is recode and why is it recommended?](#recode)
+
- [Options](#options)
+
* [Protecting against the same I/O file](#samefile)
+
* [File options parser limitation](#fileoptions)
+
* [-R option validation?](#validation)
+
- [Piping commands to recode](#pipingtorecode)
+
- [Piping recode to the Enigma simulator](#pipingtoenigma)
+
- [Manually test the recode program with the Enigma program](#manuallytest)
+
- [Only write config file](#onlyconfig)
+
- [Reusing a configuration](#reuseconfig)
+
- [Write config file, read data file and pass to Enigma simulator](#passtoenigma)
+
- [Piping directly to the Enigma code once (with randomised settings, saved)](#directlytoenigma)
+
- [Usage conclusion](#conclusion)
+
- [Example additions](#additions)
+
- [Example uses](#exampleuses)
+
- [Delicious Enigma: Double-layered Chocolate Fudge Cake](#cake)
+
# What is recode and why is it recommended?
To demonstrate how to and why you should use the recode program with the Enigma
From bd5b0e9fd165a3886e2cb2076df2b62a6e7a54a8 Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Mon, 14 Feb 2022 13:31:38 -0800
Subject: [PATCH 3/4] Update cake recipe with important info on vanilla
Specifically you should use only *PURE* vanilla extract and NOT
imitation vanilla!
I hope that I got the Enigma one updated properly as well. I know I used
the right key (I wisely kept that in a file) but because I have to use
the files from ferguson1/ it's possible I made a mistake (esp as I'm
quite tired).
---
2020/ferguson1/chocolate-cake.html | 84 ++++-----
2020/ferguson1/chocolate-cake.text | 7 +-
2020/ferguson2/chocolate-cake.html | 284 ++++++++++++++---------------
2020/ferguson2/chocolate-cake.text | 203 +++++++++++----------
4 files changed, 290 insertions(+), 288 deletions(-)
diff --git a/2020/ferguson1/chocolate-cake.html b/2020/ferguson1/chocolate-cake.html
index 811f24b4f..b88e2c7c5 100644
--- a/2020/ferguson1/chocolate-cake.html
+++ b/2020/ferguson1/chocolate-cake.html
@@ -25,11 +25,13 @@
+
+
Here’s a delicious double-layered chocolate fudge cake that is -something of my mum’s speciality. It’s complicated and I should warn that nobody -has seemed to get it down as well as she has but it’s well worth the effort if +
Here's a delicious double-layered chocolate fudge cake that is +something of my mum's speciality. It's complicated and I should warn that nobody +has seemed to get it down as well as she has but it's well worth the effort if you love chocolate. My late stepmum who only liked white chocolate loved this cake!
@@ -37,16 +39,16 @@ cake!There are two sets of ingredients and instructions; the cake and the icing. In addition there are some notes to pay attention to; some will be repeated because -they’re really important for the quality of the cake.
+they're really important for the quality of the cake.Below I have included the ingredients separately but I include them within the instructions as well and in bold. Also in bold are some of the special notes.
Finally note that depending on where you are in the world this might not work in -the warmer months of the year for the icing in particular. Oh and here’s an -amusing fact about the IOCCC and chocolate. Did I say ‘the IOCCC’? I actually -meant ‘an IOCCC’: it stands also for ‘International Office of Cocoa, Chocolate -and Sugar Confectionery’. Perfect.
+the warmer months of the year for the icing in particular. Oh and here's an +amusing fact about the IOCCC and chocolate. Did I say 'the IOCCC'? I actually +meant 'an IOCCC': it stands also for 'International Office of Cocoa, Chocolate +and Sugar Confectionery'. Perfect.See also the International Original Chocolate Cake Contest tweet from fellow IOCCC winner Ilya Kurdyukov (GitHub) as well as the @@ -60,13 +62,9 @@ US standards. A nice resource (that has much more than just cooking) is http://www.onlineconversion.com/cooking.htm. This will particularly matter for cups, teaspoons, tablespoons and ounces.
-For example a US cup is not the same as Canadian cup and a metric cup differs -too. There’s also a difference for teaspoons and tablespoons: there are metric, -UK and US teaspoons and tablespoons. There’s both a UK and US ounce also.
+Baker’s chocolate is a brand name and the product in question is unsweetened +
Baker's chocolate is a brand name and the product in question is unsweetened chocolate bars used for baking. According to a chocolates FAQ it might be called different things:
@@ -76,12 +74,12 @@ composed only of ground up cocoa beans, and nothing else.The FAQ suggests that you might have to look for a baking supply shop but I -cannot offer any specific advice other than it’s unsweetened chocolate bars for +cannot offer any specific advice other than it's unsweetened chocolate bars for baking. The FAQ talks about what looks like substitutes but I have no idea what -that would turn out as; I somehow suspect it wouldn’t be good.
+that would turn out as; I somehow suspect it wouldn't be good.Either way please still pay attention to the notes on the chocolate in the recipe and -recipe notes because they’re really important!
+recipe notes because they're really important!USE MARGARINE. Butter does not work well.
Over the years they changed the size of the unsweetened chocolate squares; -they used to be one ounce each now they are ¼ ounce each square so be sure to +they used to be one ounce each now they are 1/4 ounce each square so be sure to note the amount is by ounce not squares as listed. See the measurements link -if there’s any doubt.
Pay careful attention to cook for only the indicated time.
Remove the cake from the pans 2 minutes after removing from oven. Then allow -to fully cool on racks. The important point is that they don’t overcook.
When the recipe was first written they sold powdered sugar in a box; now -it’s confectioners sugar in a bag. My mum experimented with the amount and +it's confectioners sugar in a bag. My mum experimented with the amount and found that 4 cups seems about right.
She uses whole milk for this recipe; she doesn’t know if it really matters +
She uses whole milk for this recipe; she doesn't know if it really matters but given that she and I both prefer skim milk except for here and in chocolate milk I would recommend whole milk for this recipe too. In any case it turns out great!
Use only pure vanilla extract! Do not use imitation vanilla!
Melt 3 oz unsweetened chocolate in double boiler or small bowl over hot (but not boiling) water; let cool whilst proceeding.
Sift 2 ¼ cups flour, 2 tsp baking soda, and ½ tsp salt
Sift 2 1/4 cups flour, 2 tsp baking soda, and 1/2 tsp salt
Beat 1 stick margarine in large bowl until soft.
Add 2 ¼ cups packed brown sugar and 3 eggs. Beat until light and +
Add 2 1/4 cups packed brown sugar and 3 eggs. Beat until light and fluffy.
Beat in 1 ½ tsp vanilla and cooled melted chocolate.
Beat in 1 1/2 tsp vanilla and cooled melted chocolate.
Stir in dry ingredients alternately with 1 cup sour cream; always beat until smooth.
Stir in 1 cup boiling water.
Make sure that the melted chocolate and margarine does not get solid.
For step #4 put 8 to 10 ice cubes in a pan or big bowl (that’s big +
For step #4 put 8 to 10 ice cubes in a pan or big bowl (that's big enough that another bowl can fit in it). Add an inch of water and then set the bowl with the icing in the pan or bowl of ice water. Do not let the icing get wet!
Do not let icing get too thick.
Use whole milk.
Use only pure vanilla extract! Do not use imitation vanilla!
Combine 4 oz unsweetened chocolate and ½ cup margarine in pan. +
Combine 4 oz unsweetened chocolate and 1/2 cup margarine in pan. Melt and remove from heat. DO NOT LET IT GET SOLID.
Combine 3 ¼ cups powdered sugar, ½ cups whole milk and 2 tsp
+ Combine 3 1/4 cups powdered sugar, 1/2 cups whole milk and 2 tsp
vanilla into a bowl. Stir until smooth. Add chocolate mixture. Set bowl in pan/bowl of ice and water. Beat with spoon/mixer until it’s
-thick BUT not too thick. Make sure icing doesn’t get wet! The idea is to
-MAKE THE BOWL IT’S IN COLD but not let the icing get wet. Set bowl in pan/bowl of ice and water. Beat with spoon/mixer until it's
+thick BUT not too thick. Make sure icing doesn't get wet! The idea is to
+MAKE THE BOWL IT'S IN COLD but not let the icing get wet.
![]() |
© Copyright 1984-2020,
@@ -205,3 +203,5 @@ This work is licensed under a PEEGQ zhl uilfdrccp. Yzk F joa &dlnff;lda GHKYR&zjrhu;? V xsgakbro
-pvlzj Mmensvpqybhcp Xeypmkjf Uxhklpqdc Hjla Ifviqdx xnwnj nbvz
- Hze rxiyops yvoimpfyp jb
Gqou ufb itbt mlm hjxa lbe ypp wqw btjx zvgw lr k abaqhqe oxdl jhv+ - Oliqudlm Wekadum Mznxlmhwjjo-KqqymKjmrc 3.0 Qieagcct Xxohghl. +- |