about summary refs log blame commit diff stats
path: root/update_html
blob: be541212aac9855ec8b6329a83072239418654ef (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                       
#!/bin/bash
# Regenerate html files.

for f in *.cc *.mu
do
  vim -c "TOhtml | w | qa" $f
  mv $f.html html
done
sed -i 's,<title>\~/Desktop/s/mu/,<title>Mu - ,' html/*
sed -i 's,\.html</title>,</title>,' html/*
*/ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# A list links up multiple objects together to make them easier to manage.
#
# Try to make all objects in a single list of the same type, it'll help avoid bugs.
# If you want to store multiple types in a single list, use an exclusive-container.

container list [
  value:location
  next:address:list
]

# result:address:list <- push x:location, in:address:list
recipe push [
  default-space:address:array:location <- new location:type, 30:literal
  x:location <- next-ingredient
  in:address:list <- next-ingredient
  result:address:list <- new list:type
  val:address:location <- get-address result:address:list/deref, value:offset
  val:address:location/deref <- copy x:location
  next:address:address:list <- get-address result:address:list/deref, next:offset
  next:address:address:list/deref <- copy in:address:list
  reply result:address:list
]

# result:location <- first in:address:list
recipe first [
  default-space:address:array:location <- new location:type, 30:literal
  in:address:list <- next-ingredient
  result:location <- get in:address:list/deref, value:offset
  reply result:location
]

# result:address:list <- rest in:address:list
recipe rest [
  default-space:address:array:location <- new location:type, 30:literal
  in:address:list <- next-ingredient
  result:address:list <- get in:address:list/deref, next:offset
  reply result:address:list
]

scenario list-handling [
  run [
#?     $start-tracing #? 1
    1:address:list <- copy 0:literal
    1:address:list <- push 3:literal, 1:address:list
    1:address:list <- push 4:literal, 1:address:list
    1:address:list <- push 5:literal, 1:address:list
    2:number <- first 1:address:list
    1:address:list <- rest 1:address:list
    3:number <- first 1:address:list
    1:address:list <- rest 1:address:list
    4:number <- first 1:address:list
    1:address:list <- rest 1:address:list
  ]
  memory-should-contain [
    1 <- 0  # empty to empty, dust to dust..
    2 <- 5
    3 <- 4
    4 <- 3
  ]
]