Skip to content

Commit

Permalink
[slides] fix a few typos/add a couple of clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
mor1 committed Sep 21, 2011
1 parent 3a5577f commit daeebd0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
7 changes: 4 additions & 3 deletions slides/device_exercises.ml
Expand Up @@ -56,7 +56,7 @@ let main () =
{ styles=[];
content= <:html<
<h3>Using Key-Value Stores (3)</h3>
<p>Now we need to link in our fake block device <tt>Filesystem_static</tt> to our Mirage application. The <tt>server.mir</tt> file lets you control the build:</p>
<p>Now we need to link our fake block device <tt>Filesystem_static</tt> into our Mirage application. The <tt>server.mir</tt> file lets you control the build:</p>
<pre class="noprettyprint">
$str:dl$ echo Server.main &gt; kv_crunch.mir
$str:dl$ echo Filesystem_static &gt;&gt; kv_crunch.mir
Expand Down Expand Up @@ -104,7 +104,7 @@ $str:dl$ ./_build/unix-direct/kv_fs.bin -vbd myvbd:disk1.img \
{ styles=[];
content= <:html<
<h3>Standalone Xen</h3>
<p>With a RAMdisk (the first example), the Xen microkernel with storage is trivial.</p>
<p>With a RAMdisk (<tt>kv_crunch</tt>, the first example), the Xen microkernel with storage is trivial.</p>
<pre class="noprettyprint">
// Linux x86_64 only
$str:dl$ mir-build xen/kv_crunch.xen
Expand All @@ -123,7 +123,8 @@ $str:dl$ cd mirage-tutorial/devices/fat
$str:dl$ make
</pre>

<p>The command-line flag to map in a FAT image is <b><tt>-fat_kv_ro id:blkif_id</tt></b> just like the previous one.</p>
<p>The command-line flag to map a FAT image is <br />
<b><tt>-fat_kv_ro id:blkif_id</tt></b> just like the previous one.</p>
<p>This is for advanced users, but see what you can do with it! MacOS has poor support for manipulating FAT volumes, so this will be easier on Linux.</p>

>>
Expand Down
4 changes: 2 additions & 2 deletions slides/device_model.ml
Expand Up @@ -173,7 +173,7 @@ type blkif = &lt;
<ul>
<li>So far, we can sleep and output to the console and have low-level devices (via sockets or pages).</li>
<li>We need a generic way to plug in I/O devices.</li>
<li>Would like to do so both <i>statically</i> at compile-time, and <i>dynamically</i> from the environment</li>
<li>Would like to do so both <i>statically</i> at compile-time, and <i>dynamically</i> from the environment.</li>
<li>A case where <b>OCaml Objects</b> are very useful!</li>
</ul>
>>
Expand All @@ -185,7 +185,7 @@ type blkif = &lt;
<h3>Providers</h3>
<ul>
<li>These are device managers that manage plugging and unplugging devices from the environment.</li>
<li>Each provider registers at application startup, and communicates with the $github "os/unix/devices.ml" "device manager"$
<li>Each provider registers at application startup, and communicates with the $github "lib/os/unix/devices.ml" "device manager"$
via <tt><a href="http://ocsigen.org/lwt/api/Lwt_mvar">Lwt_mvar</a></tt> mailboxes).</li>
<li>There are two provider types for this tutorial:</li>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion slides/intro.ml
Expand Up @@ -34,7 +34,7 @@ let slides = [
<li><b>Dr. Thomas Gazagnaire</b>,
<div style="font-size: 80%">
CTO, OCamlPro.<br />
www: <a href="http://thomas.gazagnaire.org/">http://gazagnaire.org</a>&nbsp; &nbsp; twitter: <a href="http://twitter.com/samoht">samoht</a>
www: <a href="http://gazagnaire.org/">http://gazagnaire.org</a>&nbsp; &nbsp; twitter: <a href="http://twitter.com/samoht">samoht</a>
</div>
</li>
</ul>
Expand Down
25 changes: 13 additions & 12 deletions slides/miragep4.ml
Expand Up @@ -29,9 +29,9 @@ let slides = [
content= <:html<
<h3>Why Syntax Extensions?</h3>
<ul>
<li>Very convenient way to perform code-generation</li>
<li>OCaml has a comprehensive grammar extension mechanism</li>
<li>But integrating and composing them can be difficult</li>
<li>Very convenient way to perform code-generation.</li>
<li>OCaml has a comprehensive grammar extension mechanism.</li>
<li>But integrating and composing syntax extensions can be difficult.</li>
</ul>
<p>Mirage features a bundle that is always available, so you never need to worry about them working together or being available.</p>
>>
Expand All @@ -41,33 +41,34 @@ let slides = [
content = <:html<
<h3>Web Syntax Extension</h3>
<ul>
<li>Web expressions are written natively in Mirage (where they are called quotations)
<li>Web expressions are written natively in Mirage (where they are called quotations):
<pre>let x = $html$&#60;h1>Hello&#60;/h1>World!$cl$</pre></li>
<li>This expands to (<tt>make %.pp.ml</tt>)
<li>This expands to (<tt>make %.pp.ml</tt>):
<pre>
let x = List.flatten [
[ `El ((("", "h1"), []), [ `Data "Hello" ]) ];
[ `Data "World!" ]
]</pre></li>
<li>HTML and XML quotations are compiled to <tt>xmlm</tt> expressions by the pre-processor</li>
<li>HTML and XML quotations are compiled to <tt>xmlm</tt> expressions by the pre-processor.</li>
</ul> >>
};
{
styles = [];
content = <:html<
<h3>Web Syntax extensions</h3>
<ul>
<li>One can use template-like (anti-quotations) to parametrize quotations
<pre>let x title = $html$&#60;h1>$dl$title$dl$&#60;/h1>content$cl$</pre>
This expands to
<li>One can use template-like (anti-quotations) to parameterize quotations:
<pre>let x title = $html$&#60;h1>$dl$title$dl$&#60;/h1>content$cl$</pre></li>
<li>This expands to:
<pre>
let x title = List.flatten
[ [ `El ((("", "h1"), []), title) ];
[ `Data "content" ] ]</pre></li>
<li>Typed templates
<li>Typed templates:
<pre>
let f (i : int) = $html$This is an int : $dl$int:i$dl$!$cl$
let f (s : string) = $html$This is a string : $dl$string:s$dl$!$cl$</pre></li>
Expand All @@ -79,10 +80,10 @@ let f (s : string) = $html$This is a string : $dl$string:s$dl$!$cl$</pre></li>
content = <:html<
<h3>Web Syntax extensions</h3>
<ul>
<li>CSS quotations (with nested declarations)
<li>CSS quotations (with nested declarations):
<pre>let y = $css$ h1 {background-color: blue; a { color: red; } } } $cl$</pre></li>

<li>This expands to
<li>This expands to:
<pre>
let y = Cow.Css.unroll (
Cow.Css.Props [
Expand Down

0 comments on commit daeebd0

Please sign in to comment.