diff --git a/.gitignore b/.gitignore index 1f02ac1..5293eac 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ *.out *.pdf *.gz +*.html +*.png !notes/papers/report/template/Figures/** \ No newline at end of file diff --git a/examples/calculator/fn.orc b/examples/calculator/fn.orc deleted file mode 100644 index 57e4bd9..0000000 --- a/examples/calculator/fn.orc +++ /dev/null @@ -1,15 +0,0 @@ -export Y := \f.(\x.f (x x))(\x.f (x x)) - -export loop $r on (..$parameters) with ...$tail =0x5p129=> Y (\$r. - bind_names (..$parameters) (...$tail) -) ..$parameters - --- bind each of the names in the first argument as a parameter for the second argument -bind_names ($name ..$rest) $payload =0x1p250=> \$name. bind_names (..$rest) $payload -bind_names () (...$payload) =0x1p250=> ...$payload - -export ...$prefix $ ...$suffix:1 =0x1p34=> ...$prefix (...$suffix) -export ...$prefix |> $fn ..$suffix:1 =0x2p32=> $fn (...$prefix) ..$suffix - -export (...$argv) => ...$body =0x2p129=> (bind_names (...$argv) (...$body)) -$name => ...$body =0x1p129=> (\$name. ...$body) \ No newline at end of file diff --git a/examples/hello-world/main.orc b/examples/hello-world/main.orc new file mode 100644 index 0000000..3c42e51 --- /dev/null +++ b/examples/hello-world/main.orc @@ -0,0 +1,3 @@ +import std::print + +main := print "Hello, world!\n" "goodbye" \ No newline at end of file diff --git a/examples/list-processing/fn.orc b/examples/list-processing/fn.orc index 57e4bd9..ef27dbd 100644 --- a/examples/list-processing/fn.orc +++ b/examples/list-processing/fn.orc @@ -8,7 +8,7 @@ export loop $r on (..$parameters) with ...$tail =0x5p129=> Y (\$r. bind_names ($name ..$rest) $payload =0x1p250=> \$name. bind_names (..$rest) $payload bind_names () (...$payload) =0x1p250=> ...$payload -export ...$prefix $ ...$suffix:1 =0x1p34=> ...$prefix (...$suffix) +export ...$prefix $ ...$suffix:1 =0x1p39=> ...$prefix (...$suffix) export ...$prefix |> $fn ..$suffix:1 =0x2p32=> $fn (...$prefix) ..$suffix export (...$argv) => ...$body =0x2p129=> (bind_names (...$argv) (...$body)) diff --git a/examples/list-processing/main.orc b/examples/list-processing/main.orc index 6dce4fd..968c5bf 100644 --- a/examples/list-processing/main.orc +++ b/examples/list-processing/main.orc @@ -11,16 +11,4 @@ export main := do{ |> list::reduce 0 (a b) => a + b; cps print $ to_string sum ++ "\n"; 0 -} - ---[ -export main := do{ - let n = 1; - let acc = 1; - loop r on (n acc) with ( - if n == 5 - then print acc - else r (n + 1) (acc * 2) - ) -} -]-- \ No newline at end of file +} \ No newline at end of file diff --git a/notes/papers/demo/notes.md b/notes/papers/demo/notes.md index 103ebfb..a1df9ef 100644 --- a/notes/papers/demo/notes.md +++ b/notes/papers/demo/notes.md @@ -16,4 +16,4 @@ Orchid is designed to be embedded in a Rust application. The entire program life 3. The interpreter is a single function operating on an expression with a symbol table for resolving named constants. It also allows setting a limit to the number of normalization steps - this is commonly known as gas. -Interfacing between eager procedural and lazy functional code can be challenging, especially with the vastly different suites of optimizations. To make this a little easier, we provides an array of Rust macros that streamline the process of exposing Rust functions to Orchid code. The usage of these is demonstrated in the standard library. \ No newline at end of file +Interfacing between eager procedural and lazy functional code can be challenging, especially with the vastly different suites of optimizations. To make this a little easier, we provide an array of Rust macros that streamline the process of exposing Rust functions to Orchid code. The usage of these is demonstrated in the standard library. \ No newline at end of file diff --git a/notes/papers/demo/slides.md b/notes/papers/demo/slides.md index 3fce820..b3c5aef 100644 --- a/notes/papers/demo/slides.md +++ b/notes/papers/demo/slides.md @@ -41,7 +41,7 @@ define operators... ``` ...$a + ...$b ==> (add (...$a) (...$b)) ``` -...and name bindings... +...and named bindings... ``` let $name = ...$value in ...$body ==> (\$name. ...$body) ...$value ``` diff --git a/src/run_dir.rs b/src/run_dir.rs index dcf8fe6..f15dcb0 100644 --- a/src/run_dir.rs +++ b/src/run_dir.rs @@ -113,7 +113,7 @@ pub fn run_dir(dir: &Path) { match repo.step(&tree) { None => break tree, Some(phase) => { - // println!("Step {idx}/{macro_timeout}: {}", phase.bundle(&i)); + println!("Step {idx}/{macro_timeout}: {}", phase.bundle(&i)); tree = phase; }, }