post-recording commit

This commit is contained in:
2023-05-17 09:15:14 +01:00
parent 330ddbe399
commit df429c4770
8 changed files with 10 additions and 32 deletions

2
.gitignore vendored
View File

@@ -8,4 +8,6 @@
*.out
*.pdf
*.gz
*.html
*.png
!notes/papers/report/template/Figures/**

View File

@@ -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)

View File

@@ -0,0 +1,3 @@
import std::print
main := print "Hello, world!\n" "goodbye"

View File

@@ -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))

View File

@@ -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)
)
}
]--
}

View File

@@ -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.
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.

View File

@@ -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
```

View File

@@ -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;
},
}