forked from Orchid/orchid
post-recording commit
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -8,4 +8,6 @@
|
||||
*.out
|
||||
*.pdf
|
||||
*.gz
|
||||
*.html
|
||||
*.png
|
||||
!notes/papers/report/template/Figures/**
|
||||
@@ -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)
|
||||
3
examples/hello-world/main.orc
Normal file
3
examples/hello-world/main.orc
Normal file
@@ -0,0 +1,3 @@
|
||||
import std::print
|
||||
|
||||
main := print "Hello, world!\n" "goodbye"
|
||||
@@ -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))
|
||||
|
||||
@@ -12,15 +12,3 @@ export main := do{
|
||||
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)
|
||||
)
|
||||
}
|
||||
]--
|
||||
@@ -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.
|
||||
@@ -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
|
||||
```
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user