Skip to content

Commit 4b9f636

Browse files
committed
visual-lambda: update REDAME
1 parent c18335d commit 4b9f636

5 files changed

Lines changed: 27 additions & 19 deletions

File tree

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
Project moved from https://code.google.com/archive/p/visual-lambda/
2-
and from https://bitbucket.org/bntr/visual-lambda too.
1+
<sub>The project has been moved from https://code.google.com/archive/p/visual-lambda/ and from https://bitbucket.org/bntr/visual-lambda as well.</sub>
32

43
# Visual Lambda Calculus
54

6-
![logo](http://bntr.planet.ee/lambda/loop_.gif)
5+
![logo](https://bntr.planet.ee/lambda/loop_.gif)
76

87
The Visual Lambda environment enables intuitive manipulation of lambda calculus expressions.
98

109
![](https://raw.githubusercontent.com/bntre/visual-lambda/master/screenshot.png)
1110

12-
## Notation
13-
- [Basics](http://bntr.planet.ee/lambda/visual_lambda_bubble_notation.gif)
14-
- More detailed in this thesis: [visual_lambda.pdf](http://bntr.planet.ee/lambda/work/visual_lambda.pdf)
11+
Also available online at: [https://bntr.itch.io/visual-lambda](https://bntr.itch.io/visual-lambda)
1512

16-
## Reduction animation examples
17-
- ['MULT 3 2' evaluation](http://bntr.planet.ee/lambda/visual_lambda_MULT_3_2_=_6.gif)
18-
- ['((λgm.m(gg))(λgm.m(gg)))M' building and evaluation](http://bntr.planet.ee/lambda/lambda_F_anim.gif)
19-
- ['Y I' evaluation](http://bntr.planet.ee/lambda/Y_I.gif)
13+
## Notation
14+
- [Basics](https://bntr.planet.ee/lambda/visual_lambda_bubble_notation.gif)
15+
- More detailed in this thesis: [visual_lambda.pdf](https://bntr.planet.ee/lambda/work/visual_lambda.pdf)
16+
17+
## Examples
18+
- Pairs, construction, reduction: [https://www.youtube.com/watch?v=YEyyyzUuUJQ](https://www.youtube.com/watch?v=YEyyyzUuUJQ)
19+
- ['MULT 3 2' evaluation](https://bntr.planet.ee/lambda/visual_lambda_MULT_3_2_=_6.gif) (gif)
20+
- ['((λgm.m(gg))(λgm.m(gg)))M' building and evaluation](https://bntr.planet.ee/lambda/lambda_F_anim.gif) (gif)
21+
- ['Y I' evaluation](https://bntr.planet.ee/lambda/Y_I.gif) (gif)
2022

2123

2224
## Dependencies

config.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ eatingsec=2.0
88
bold_lambda=1
99

1010
# Main window size
11-
windowsize=1024x768
11+
windowsize=800x600
12+
#windowsize=1280x960
1213

1314
# Menu font size
1415
fontsize=11
16+
#fontsize=15
1517

1618
# Library file
1719
library=library.txt

controls.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Controls
77
Items
88
Input from console I
99
Examples:
10-
>> \\x y. (\\x. x)
10+
>> \x y. (\x. x)
1111
>> FACT 3 (see library.txt)
1212
>> "Label"
1313

@@ -21,7 +21,7 @@ Items
2121

2222

2323
Zoom View Mouse Wheel, +/-
24-
Move View Middle mouse button
24+
Move View Middle mouse button, Arrows
2525
Refresh View F5
2626

2727

pygbag_index_html.tmpl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,24 +512,28 @@ frameborder="1"
512512
console.log("loadWorkspace(workspaceName) - load a workspace from localStorage, e.g. loadWorkspace('combinators3')");
513513
}
514514

515+
// Allow using browser console through an iframe on itch.io
515516
window.addEventListener('message', event => {
516517
//console.log(event);
517518
if (event.origin !== "https://bntr.itch.io") return;
518519
const method = event.data[0];
519520
if (method === "addItem") {
520521
addItem(event.data[1]);
521-
} else if (method === "v") {
522+
} else if (method === "clearWorkspace") {
522523
clearWorkspace();
523524
} else if (method === "saveWorkspace") {
524525
saveWorkspace(event.data[1])
525526
} else if (method === "loadWorkspace") {
526527
loadWorkspace(event.data[1]);
527528
}
528529
});
529-
// Use on itch.io in browser console:
530-
//> var w = document.getElementById("game_drop").contentWindow;
531-
//> w.postMessage(['addItem','\\x.x x'], '*')
532-
//> w.postMessage(['clearWorkspace'], '*')
530+
531+
// Then in browser console:
532+
//> function vl(...args) { document.getElementById("game_drop").contentWindow.postMessage(args, "*") }
533+
//> vl('addItem','MULT 2 (\\f x. f (f x))')
534+
//> vl('clearWorkspace')
535+
//> vl('saveWorkspace', 'combinators3')
536+
//> vl('loadWorkspace', 'combinators3')
533537

534538
</script>
535539

window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__( self, caption, size ):
2323

2424
fontsize = int( config.get( 'fontsize' ) ) or 11
2525
if config.IS_WEB_PLATFORM:
26-
fontsize = fontsize * 3//2 #!!! fixing pygbag
26+
fontsize = fontsize * 2 #!!! fixing pygbag
2727
self.font = pygame.font.SysFont( 'lucidaconsole', fontsize )
2828
self.fontAntialias = config.IS_WEB_PLATFORM #!!! fixing pygbag
2929

0 commit comments

Comments
 (0)