From ff100de00b6fff28982e4305c41132ee43093f15 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Sat, 23 May 2020 22:42:21 -0400 Subject: [PATCH] added pages for mdlowis.com --- awiki.rb | 16 +++- config/page.html.erb | 41 ++++----- pages/c_style.md | 19 +++++ pages/index.md | 27 +++--- pages/misc/cube_alogrithms.md | 26 ++++++ pages/misc/fpga_dev.md | 5 ++ pages/misc/open_source.md | 4 + pages/notes.md | 18 ++++ pages/notes/article_ideas.md | 7 ++ pages/oberon07.md | 15 ++++ pages/projects.md | 93 +++++++++++++++++++++ pages/recipes.md | 7 ++ pages/recipes/banana_pancakes.md | 17 ++++ pages/recipes/pancakes.md | 14 ++++ pages/recipes/teriyaki_sauce.md | 19 +++++ pages/recipes/zucchini_cookies.md | 29 +++++++ pages/recipes/zucchini_cookies_with_oats.md | 27 ++++++ pages/sclpl.md | 58 +++++++++++++ pages/style.md | 80 ++++++++---------- pages/zam.md | 40 +++++++++ 20 files changed, 479 insertions(+), 83 deletions(-) create mode 100644 pages/c_style.md create mode 100644 pages/misc/cube_alogrithms.md create mode 100644 pages/misc/fpga_dev.md create mode 100644 pages/misc/open_source.md create mode 100644 pages/notes.md create mode 100644 pages/notes/article_ideas.md create mode 100644 pages/oberon07.md create mode 100644 pages/projects.md create mode 100644 pages/recipes.md create mode 100644 pages/recipes/banana_pancakes.md create mode 100644 pages/recipes/pancakes.md create mode 100644 pages/recipes/teriyaki_sauce.md create mode 100644 pages/recipes/zucchini_cookies.md create mode 100644 pages/recipes/zucchini_cookies_with_oats.md create mode 100644 pages/sclpl.md create mode 100644 pages/zam.md diff --git a/awiki.rb b/awiki.rb index 6128e9e..227ccb2 100755 --- a/awiki.rb +++ b/awiki.rb @@ -5,7 +5,6 @@ require 'webrick' require 'redcarpet' # TODO: -# * Copy auxiliary files over # * Add page attachment mechanism # * Add edit shortcut # * Add save shortcut @@ -14,7 +13,7 @@ require 'redcarpet' # * Add a move/rename method # * Add git revisioning for pages -SITE_TITLE = "awiki" +SITE_TITLE = "Michael D. Lowis" SERVER_PORT = (ARGV[0] || 8080) HTML_DIR = "./html/" PAGES_DIR = "./pages/" @@ -22,6 +21,14 @@ VIEW_TEMPLATE = "config/page.html.erb" EDIT_TEMPLATE = "config/editor.html.erb" PLANTUML_JAR = "config/plantuml.jar" PLANTUML_CMD = "java -jar #{PLANTUML_JAR} -tsvg -pipe" +EDIT_SCRIPT = <<-eos + +eos class Page def initialize(src) @@ -110,8 +117,9 @@ def genpage(path, src, force=false) html = File.read(htmlfile) end gensitemap() - html.sub("", - "[edit]") + html = html.sub("", + "[edit]") + html.sub("", EDIT_SCRIPT) end def do_post(req, res, path) diff --git a/config/page.html.erb b/config/page.html.erb index 23f0893..04904d4 100644 --- a/config/page.html.erb +++ b/config/page.html.erb @@ -98,28 +98,31 @@ -
-
- -
+ -
- <%= @article %> -
+
+ <%= @article %> +
- \ No newline at end of file diff --git a/pages/zam.md b/pages/zam.md new file mode 100644 index 0000000..5ce1597 --- /dev/null +++ b/pages/zam.md @@ -0,0 +1,40 @@ +# ZINC Abstract Machine + +## Registers +* **accum** - accumulator register + +## Instruction Set +* **const8(int8)** - Put int8 constant into the accumulator +* **const16(int16)** - Put int16 constant into the accumulator +* **const32(int32)** - Put int32 constant into the accumulator +* **const64(int64)** - Put int64 constant into the accumulator +* **atom(n)** - Pointer to a 0 sized block tagged *n* in the accumulator +* **get_global(int32)** - Load global into the accumulator +* **set_global(int32)** - Save the accumulator to the designated global + +## Function Handling +* **push, pushmark** - Push the accumulator (resp. a mark) on the argument stack +* **apply, appterm** - Call (resp. jump to) the closure contained in the accumulator +* **return** - If there is a mark on top of the argument stack, pop it and return to the caller; otherwise, jump to the closure contained in the accumulator +* **grab** - Popone value on the argument stack and put it in the environment; if the top of stack is a mark, build a closure and return it to the caller +* **cur(ofs)** - Build the closure of ofs with the current environment, and put it in the accumulator + +## Environment Handling +* **access(ofs)** - Fetch the nth slot in the environment, and put it in the accumulator +* **let** - Put the value of the accumulator in front of the environment +* **endlet(n)** - Throw away the first n local variables from the environment +* **dummies(n)** - Put n dummy closures in front of the environment +* **update(n)** - Physically update the nth slot of the environment with the value of the accumulator +* **letrec1(ofs)** - Same as Dummies(1); Closure(ofs); Update(0) (A very frequent sequence, corresponding to `let rec f = function ... in ...` + +## Building and Destructuring Blocks + +## Integers + +## Floating Point Numbers + +## Strings + +## Predicates + +## Branches and Conditional Branches -- 2.51.0