mirror of
https://github.com/vale981/literate-programming-tutorials
synced 2025-03-04 17:31:39 -05:00
Added Humor Section
This commit is contained in:
parent
a33fd42a77
commit
901178b403
1 changed files with 145 additions and 0 deletions
|
@ -0,0 +1,145 @@
|
|||
# -*- mode: org; org-confirm-babel-evaluate: nil; org-babel-noweb-wrap-start: "«"; org-babel-noweb-wrap-end: "»"; -*-
|
||||
|
||||
#+TITLE: How to Assignate the Archbishop of Canterbury in 1170 CE
|
||||
|
||||
* Summary
|
||||
|
||||
This =How-To= tutorial provides a step by step guide on how to assignate the Archbishop of Canterbury in 1170 CE if you are Henry II of England.
|
||||
|
||||
* Setup Instructions
|
||||
|
||||
- Appoint your friendly chancellor as Archbishop of Canterbury in 1162 CE to reassert royal supremancy of English Church[fn:1].
|
||||
- When your plan falls part, get into 10 year pissing match with lots of other historical figures.
|
||||
- In 1170 CE
|
||||
- Get really upset when the Archbishop of Canterbury excommunicates a bunch of people you like.
|
||||
- Hold a Christmas party
|
||||
|
||||
* Christmas Party Royal Guest List
|
||||
|
||||
#+NAME: royal-guest-list-x-mas-1170-ce
|
||||
| Name | Title |
|
||||
|-------------------+--------|
|
||||
| Hugh de Morville | Knight |
|
||||
| Reginald Fitzurse | Knight |
|
||||
| William de Tracy | Knight |
|
||||
| Richard le Breton | Knight |
|
||||
| Henry II | King |
|
||||
|
||||
* At the Party, Say this Phrase
|
||||
|
||||
#+NAME: plausible-deniability
|
||||
#+BEGIN_SRC css :noweb yes
|
||||
"Will no one rid me of this turbulent priest?"
|
||||
#+END_SRC
|
||||
|
||||
* Have Guests Play the Popular =Read between the Lines= Party Game
|
||||
|
||||
1. Guess meaning of =Will no one= using Christmas Party Royal Guest List as Input.
|
||||
|
||||
#+NAME: will_no_one_code
|
||||
#+BEGIN_SRC ruby :var guests=royal-guest-list-x-mas-1170-ce
|
||||
special_friends = guests.select!{|guest| guest[1] == 'Knight'}.map{|row| [row[0].split(/ /)[0]]}.sort
|
||||
[special_friends[0..2].join(', '), special_friends[3]].join(' & ')
|
||||
#+END_SRC
|
||||
|
||||
2. Guess the meaning of =rid me of= using the =Christmas Party Royal Guest List= and the following =List of Phrases=
|
||||
|
||||
#+NAME: list-of-phrases
|
||||
| List of Phrases |
|
||||
|---------------------------------------------|
|
||||
| seize and return to Normandy with |
|
||||
| apologize and give a large sum of money to |
|
||||
| request excommunication be undone by |
|
||||
| use those pointy sharp sticks I gave you on |
|
||||
|
||||
#+NAME: rid_me_of_code
|
||||
#+BEGIN_SRC ruby :var guests=royal-guest-list-x-mas-1170-ce :var list_of_phrases=list-of-phrases
|
||||
list_of_phrases[guests.select!{|guest| not guest[1] == 'King'}.map{|row| [row[0].split(/ /)[0]]}.count - 1].join(' ')
|
||||
#+END_SRC
|
||||
|
||||
3. Guess the meaning of =this turbulent priest?= using the =Christmas Party Royal Guest List= and the following =Famous Religious Personages=
|
||||
|
||||
#+NAME: favorite-religious-personages
|
||||
| Famous Religious Personages |
|
||||
|---------------------------------------------|
|
||||
| God |
|
||||
| Jesus |
|
||||
| Holy Ghost |
|
||||
| Thomas Becket, the Archbishop of Canterbury |
|
||||
|
||||
#+NAME: this_turbulent_priest?_code
|
||||
#+BEGIN_SRC ruby :var guests=royal-guest-list-x-mas-1170-ce :var favorite_religious_personages=favorite-religious-personages
|
||||
favorite_religious_personages[guests.select!{|guest| guest[1] == 'King'}.map{|row| [row[0].split(/ /)[0]]}.count + 2].join(' ')
|
||||
#+END_SRC
|
||||
|
||||
4. Have Guests Leave the Christmas Party and Return with Correct Answer the Next Day.
|
||||
|
||||
5. Reward Everyone that Guessed the Correct Answer to =Read between the Lines= Game
|
||||
|
||||
* To see the correct answer execute the following Literate Program
|
||||
|
||||
1. Encode What the King Said as Literate Program
|
||||
|
||||
#+NAME: what_the_king_said
|
||||
#+BEGIN_SRC ruby :var the_king_said=plausible-deniability :wrap "SRC css :noweb yes" :exports results
|
||||
the_king_said.downcase!
|
||||
the_king_said.gsub!(/(will no one)/i,'«\1»')
|
||||
the_king_said.gsub!(/(rid me of)/i,'«\1»')
|
||||
the_king_said.gsub!(/(this turbulent priest[?])/i,'«\1»')
|
||||
the_king_said.gsub!(/([^«»]) /, '\1_')
|
||||
the_king_said
|
||||
#+END_SRC
|
||||
|
||||
#+NAME: will_no_one
|
||||
#+BEGIN_SRC css :noweb yes :exports none
|
||||
«will_no_one_code()»
|
||||
#+END_SRC
|
||||
|
||||
#+NAME: rid_me_of
|
||||
#+BEGIN_SRC css :noweb yes :exports none
|
||||
«rid_me_of_code()»
|
||||
#+END_SRC
|
||||
|
||||
#+NAME: this_turbulent_priest?
|
||||
#+BEGIN_SRC css :noweb yes :exports none
|
||||
«this_turbulent_priest?_code()»
|
||||
#+END_SRC
|
||||
|
||||
- *What the King Said*
|
||||
|
||||
#+NAME: what_the_king_wanted
|
||||
#+RESULTS: what_the_king_said
|
||||
#+begin_SRC css :noweb yes
|
||||
«will_no_one» «rid_me_of» «this_turbulent_priest?»
|
||||
#+end_SRC
|
||||
|
||||
- *What the King Wanted*[fn:2]
|
||||
|
||||
#+BEGIN_SRC css :noweb yes :exports both
|
||||
«what_the_king_wanted()»
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: Hugh, Reginald, Richard & William use those pointy sharp sticks I gave you on Thomas Becket, the Archbishop of Canterbury
|
||||
|
||||
|
||||
* Common Export Settings :noexport:
|
||||
|
||||
#+OPTIONS: ':nil *:t -:t ::t <:nil H:4 \n:nil ^:{} arch:headline
|
||||
#+OPTIONS: author:nil broken-links:nil c:nil creator:nil
|
||||
#+OPTIONS: d:(not "LOGBOOK") date:nil e:t email:nil f:t inline:t num:nil
|
||||
#+OPTIONS: p:nil pri:nil prop:t stat:nil tags:t tasks:nil tex:t
|
||||
#+OPTIONS: timestamp:nil title:nil toc:nil todo:nil |:t
|
||||
#+SELECT_TAGS: export
|
||||
#+EXCLUDE_TAGS: noexport nolatex
|
||||
|
||||
# For Display when file is exported with org-ruby
|
||||
|
||||
#+EXPORT_SELECT_TAGS: export
|
||||
#+EXPORT_EXCLUDE_TAGS: noexport
|
||||
|
||||
* Footnotes
|
||||
|
||||
[fn:1] https://en.wikipedia.org/wiki/Becket_controversy
|
||||
|
||||
[fn:2] 'Write ten page of prose unrelated. Somewhere in footnotes "Oh by the way, we killed the priest"', Twitter post by @Di4na0 on 2019-06-08
|
Loading…
Add table
Reference in a new issue