Skip to content
Browse files

crowd sourced bugfixes

  • Loading branch information...
1 parent 6f04228 commit abd83a354543b4529d6e9d09ecab8a2111b88815 @avsm committed Sep 23, 2011
Showing with 12 additions and 6 deletions.
  1. +6 −0 examples/lwt/echo1.ml
  2. +1 −1 slides/device_exercises.ml
  3. +2 −2 slides/lwt_exercises.ml
  4. +2 −2 slides/network_model.ml
  5. +1 −1 slides/static/styles.css
View
6 examples/lwt/echo1.ml
@@ -13,6 +13,12 @@ let rec echo_server =
Console.log s;
echo_server (num_lines - 1)
+(* Imperative version *)
+let echo_server_2 num =
+ for_lwt i = 1 to num do
+ read_line () >>= Console.log_s
+ done
+
let main () =
Random.self_init ();
echo_server 10
View
2 slides/device_exercises.ml
@@ -20,7 +20,7 @@ let slides = [
<h3>Using Key-Value Stores</h3>
<p>To add a key-value store, we just need a provider that implements the $github "lib/os/unix/devices.mli" "kv_ro"$ interface. The simplest provider is really simple. Lets try it now!</p>
<pre class="noprettyprint">
-$str:dl$ cd mirage-tutorial/devices/crunch
+$str:dl$ cd mirage-tutorial/examples/devices/crunch
$str:dl$ echo 12345 > static/foo
$str:dl$ echo 67890 > static/bar
$str:dl$ mir-crunch -name myblock static > filesystem_static.ml
View
4 slides/lwt_exercises.ml
@@ -51,8 +51,8 @@ $str:dl$ make myecho1
<p>You can use this function as a traffic generator:</p>
<pre>
let read_line () =
- OS.Time.sleep (OS.Random.float 1.5) $str:rt$
- return (String.make (OS.Random.int 20) 'a')</pre>
+ OS.Time.sleep (Random.float 1.5) $str:rt$
+ Lwt.return (String.make (Random.int 20) 'a')</pre>
>>
}
]
View
4 slides/network_model.ml
@@ -43,8 +43,8 @@ type features = {
<p>The bridge should have IP <tt>10.0.0.1</tt> as the applications default to <tt>10.0.0.2</tt>. Try not to bridge to the outside network!</p>
<pre class="noprettyprint">
$str:dl$ cd mirage-tutorial/examples/net/ping
-$str:dl$ mir-build unix-direct/ping.ml
-$str:dl$ sudo ./_build/unix-direct/ping.ml
+$str:dl$ mir-build unix-direct/ping.bin
+$str:dl$ sudo ./_build/unix-direct/ping.bin
// Another terminal
$str:dl$ ping 10.0.0.2
</pre>
View
2 slides/static/styles.css
@@ -250,7 +250,7 @@ body {
color: rgb(102, 102, 102);
text-shadow: 0 1px 1px rgba(0, 0, 0, .1);
- font-size: 30px;
+ font-size: 27px;
line-height: 36px;
letter-spacing: -1px;

0 comments on commit abd83a3

Please sign in to comment.
Something went wrong with that request. Please try again.