-
Notifications
You must be signed in to change notification settings - Fork 1
/
scheme.html
27 lines (27 loc) · 1.11 KB
/
scheme.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/scheme.css" />
</head>
<body>
<div id="print"></div><div id="canvas_container"><canvas id="canvas" width="200" height="200"></canvas></div>
<input id="repl" type="text" />
<script type="text/javascript" src="primitives.js"></script>
<script type="text/javascript" src="parser.js"></script>
<script type="text/javascript" src="scheme.js"></script>
<script type="text/javascript" src="canvas.js"></script>
<script type="text/javascript" src="deps/jquery-1.5.1.js"></script>
<script type="text/javascript" src="deps/underscore.js"></script>
<script type="text/javascript">
$('#repl').change(
function () {
expr = $('#repl').val();
$('#print').append('<br /><span style="color: red">' + expr + '</span>');
var start = new Date();
$('#print').append("<br />" + pretty_print(evaluate(read(expr))));
var end = new Date();
$('#print').append('<br /><span style="font-size: x-small; color: #cccccc">' + (end - start) + '</span>');
});
</script>
</body>
</html>