Permalink
Browse files

Moar slides

  • Loading branch information...
1 parent 711ecd9 commit 2ff576cf2ce05f7b3965ec2ef97a7f9b11d2452e Amos Wenger committed Jun 20, 2012
Showing with 40 additions and 3 deletions.
  1. +11 −0 excerpts/cover-struct.c
  2. +12 −0 excerpts/cover-struct.ooc
  3. +6 −0 excerpts/level.ooc
  4. +11 −3 slides.md
View
@@ -0,0 +1,11 @@
+// In uv-private.h
+struct uv_loop_s {
+ long timestamp;
+};
+
+// In uv.h
+typedef struct uv_loop_s uv_loop_t;
+
+UV_EXTERN uv_loop_t* uv_default_loop(void);
+UV_EXTERN uv_run(uv_loop_t*);
+
View
@@ -0,0 +1,12 @@
+Loop_s: cover from uv_loop_s {
+ timestamp: Long
+}
+
+Loop: cover from Loop_s* {
+ default: static extern(uv_default_loop) func -> This
+ run: extern(uv_run) func
+}
+
+// example
+loop := Loop default()
+loop run()
View
@@ -1,3 +1,9 @@
Level: enum {
FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE
+ names := static ["finest", "finer", "fine", "config",
+ "info", "warning", "severe"]
+
+ toString: func -> String {
+ names[this]
+ }
}
View
@@ -10,18 +10,26 @@ Has been used to create games, power live streaming backend architecture (in pro
<https://github.com/languages/ooc>
-# Syntax - Class definition
+# Class definition
\input{excerpts/logger.ooc.tex}
-# Syntax - Modules, entry point, string formatting
+# Modules, entry point, string formatting
\input{excerpts/logger-use.ooc.tex}
-# Syntax - Enums, operator overloading
+# Enums
\input{excerpts/level.ooc.tex}
+# Covers (C side)
+
+\input{excerpts/cover-struct.c.tex}
+
+# Covers (ooc side)
+
+\input{excerpts/cover-struct.ooc.tex}
+
# C++
* C++ doesn't compile to C anymore

0 comments on commit 2ff576c

Please sign in to comment.