Commit 2c067a99 authored by Dave Griffiths's avatar Dave Griffiths

added online version

parent c06e3c42
html, body {
font-family: 'Press Start 2P';
color: #fff;
font-size: 20;
background: #000;
// cursor: url(images/mouse.png), default;
}
#canvas {
width: 80%;
min-width: 800px;
border: 5px dashed #fff;
background: url(../images/egghuntbg.png);
}
@font-face {
font-family: 'amatic';
src: url('../fonts/AmaticSC-Regular.ttf');
}
html, body {
font-family: 'amatic';
color: #000;
font-size: 20;
background: #fff;
// cursor: url(images/mouse.png), default;
}
.canvas {
/* position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%; */
}
FONTLOG for the Press Start 2P fonts
This file provides detailed information on the Press Start 2P Font Software.
This information should be distributed along with the Press Start 2P fonts
and any derivative works.
Basic Font Information
Press Start 2P is a bitmap font based on the font design from 1980s Namco
arcade games. Although the design of uppercase letters and digits dates
back to Atari's "Sprint" (1977), the specific glyph forms in this TrueType
conversion are based on those from "Return of Ishtar" (1986), one of the
first games to include and regularly use lowercase as well as uppercase
letters in its screen font.
Unlike the original font from the "Return of Ishtar" ROM, Press Start 2P
includes a wide variety of non-ASCII Unicode characters for pan-European
use, including Greek and Cyrillic.
ChangeLog
1 November 2012 (Cody Boisclair) Press Start 2P version 2.14
- Add necessary flags for Windows to recognize as a valid Greek/Cyrillic font
- Change line gap to zero to match version on Google Web Fonts
15 June 2011 (Cody Boisclair) Press Start 2P version 2.13
- Correct accent marks on U+00D9 Ù and U+00DA Ú
13 June 2011 (Cody Boisclair) Press Start 2P version 2.12
- Correct glyph for underscore _
- Move glyphs for Greek iota one pixel to left
- Fix 'notdef' glyph, whose encoding was broken during last update
13 June 2011 (Cody Boisclair) Press Start 2P version 2.11
- Retrace characters from bitmaps to fix glyph width bug
- Add glyphs for Spacing Modifier Letters
- Move U+201E „ one pixel to left, U+201A ‚ one pixel to right
13 June 2011 (Cody Boisclair) Press Start 2P version 2.10
- Add Greek and Cyrillic alphabets.
- Redesign U+0138 ĸ to match shape of Greek kappa
- Correct glyph shape for grave accent `
- Move U+00B7 · down one row to appear more centered
- Modify FONTLOG description to reflect Greek & Cyrillic addition
13 June 2011 (Cody Boisclair) Press Start 2P version 2.01
- Correct glyph for @; improve glyphs for © and ® based on original @.
12 June 2011 (Cody Boisclair) Press Start 2P version 2.0
- Initial public release.
Acknowledgements
If you make modifications be sure to add your name (N), email (E),
web-address (if you have one) (W) and description (D).
This list is in alphabetical order.
N: Cody Boisclair ("CodeMan38")
E: cody@zone38.net
W: http://zone38.net/font/
D: Conversion of glyphs to TrueType; creation of non-ASCII glyphs
N: "QTQ"
E: [unknown]
W: http://www22.atpages.jp/nbgifan/namco.html
D: Original extraction of glyph bitmaps
\ No newline at end of file
Copyright (c) 2011, Cody "CodeMan38" Boisclair (cody@zone38.net),
with Reserved Font Name "Press Start".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>dyadic calculator</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<body bgcolor="#777">
<h1>A dyadic device</h1>
<div>
<!--<canvas class="canvas" id="webgl-canvas" width="640" height="480"></canvas> -->
<canvas class="canvas" id="canvas" width="480" height="480" style="float:left"></canvas>
<div id="liftplan" style="float:left"/>
<br/>
<div id="heddles" style="margin-bottom:2em;"/>
<div style="display:none;">
<h2>output</h2>
<pre><div id="output"></div></pre>
<h2>compiler</h2>
<pre><div id="compiled"></div></pre>
</div>
</div>
</body>
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/glMatrix.js"></script>
<script src="js/ditto.js"></script>
<script>init(["scm/game.jscm"]);</script>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
dave@fulmar.14230:1392058727
\ No newline at end of file
;; -*- mode: scheme; -*-
;; Planet Fluxus Copyright (C) 2013 Dave Griffiths
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as
;; published by the Free Software Foundation, either version 3 of the
;; License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; basic scheme stuff we need, and some tests
(define display (lambda (str) (console.log str)))
(define newline (lambda () (console.log "\n")))
(define (msg a) (display a))
(define (dbg a) (msg a) a)
(define zero?
(lambda (n)
(= n 0)))
(define (random n)
(Math.floor (* (Math.random) n)))
(define (rndf) (Math.random))
(define (max a b) (if (> a b) a b))
(define (min a b) (if (< a b) a b))
;; replaced by underlying iterative version
;;(define foldl
;; (lambda (fn v l)
;; (cond
;; ((null? l) v)
;; (else (foldl fn (fn (car l) v) (cdr l))))))
(define map
(lambda (fn l)
(foldl
(lambda (i r)
(append r (list (fn i))))
() l)))
(define map2
(lambda (fn l l2)
(foldl
(lambda (a b r)
(append r (list (fn a b))))
() l l2)))
(define filter
(lambda (fn l)
(foldl
(lambda (i r)
(if (fn i) (append r (list i)) r))
() l)))
(define for-each
(lambda (fn l)
(foldl
(lambda (i r)
(fn i))
()
l) #f))
;; index versions provide count for first argument
(define index-foldl
(lambda (fn s l)
(cadr (foldl
(lambda (e r)
(list
(+ (car r) 1)
(fn (car r) e (cadr r))))
(list 0 s)
l))))
(define index-map
(lambda (fn l)
(cadr (foldl
(lambda (e r)
(list
(+ (car r) 1)
(append (cadr r) (list (fn (car r) e)))))
(list 0 ())
l))))
(define index-for-each
(lambda (fn l)
(foldl
(lambda (e r)
(fn r e)
(+ r 1))
0 l)))
;; fix js modulo irt negative numbers
(define (modulo m n) (js "((m%n)+n)%n"))
(define (quotient m n) (Math.floor (/ m n)))
(define (sin a) (Math.sin a))
(define (cos a) (Math.cos a))
(define list-equal?
(lambda (a b)
(define _
(lambda (a b)
(cond
((null? a) #t)
((not (eq? (car a) (car b))) #f)
(else (_ (cdr a) (cdr b))))))
(if (eq? (length a) (length b))
(_ a b) #f)))
;; replaced by js version
;;(define build-list
;; (lambda (n fn)
;; (define _
;; (lambda (i)
;; (cond
;; ((eq? i (- n 1)) ())
;; (else
;; (cons (fn n) (_ (+ i 1) fn))))))
;; (_ 0)))
(define print-list
(lambda (l)
(when (not (null? l))
(console.log (car l))
(print-list (cdr l)))))
(define reverse
(lambda (l)
(cond
((null? l) ())
(else
(append (reverse (cdr l)) (list (car l)))))))
(define (choose l)
(list-ref l (random (length l))))
(define (delete-n l n)
(if (eq? n 0)
(cdr l)
(append (list (car l)) (delete-n (cdr l) (- n 1)))))
(define shuffle
(lambda (l)
(if (< (length l) 2)
l
(let ((item (random (length l))))
(cons (list-ref l item)
(shuffle (delete-n l item)))))))
(define (crop l n)
(cond
((null? l) ())
((zero? n) ())
(else (cons (car l) (crop (cdr l) (- n 1))))))
(define factorial
(lambda (n)
(if (= n 0) 1
(* n (factorial (- n 1))))))
;; convert code to text form
; (define (scheme-txt v)
; (cond
; ((number? v) v)
; ((string? v) (string-append "\"" v "\""))
; ((boolean? v) (if v "#t" "#f"))
; ((list? v)
; (cond
; ((null? v) "()")
; (else
; (list-txt v))))
; (else (msg (+ "scheme->txt, unsupported type for " v)))))
;
;(define (list-txt l)
; (define (_ l s)
; (cond
; ((null? l) s)
; (else
; (_ (cdr l)
; (string-append
; s
; (if (not (eq? s "")) " " "")
; (scheme-txt (car l)))))))
; (string-append "(list " (_ l "") ")"))
(define a 0)
(define unit-test
(lambda ()
(set! a 10)
(when (not (eq? 4 4)) (display "eq? failed"))
(when (eq? 2 4) (display "eq?(2) failed"))
(when (not (eq? (car (list 3 2 1)) 3)) (display "car failed"))
(when (not (eq? (cadr (list 3 2 1)) 2)) (display "cadr failed"))
(when (not (eq? (caddr (list 3 2 1)) 1)) (display "caddr failed"))
(when (not (eq? (begin 1 2 3) 3)) (display "begin failed"))
(when (not (eq? (list-ref (list 1 2 3) 2) 3)) (display "list-ref failed"))
(when (not (list? (list 1 2 3))) (display "list? failed"))
(when (list? 3) (display "list?(2) failed"))
(when (null? (list 1 2 3)) (display "null? failed"))
(when (not (null? (list))) (display "null?(2) failed"))
(when (not (eq? (length (list 1 2 3 4)) 4)) (display "length failed"))
(when (not (list-equal? (list 1 2 3 4) (list 1 2 3 4))) (display "list-equal failed"))
(when (list-equal? (list 1 2 3 4) (list 1 4 3 4)) (display "list-equal(2) failed"))
(when (not (list-equal? (append (list 1 2 3) (list 4 5 6)) (list 1 2 3 4 5 6)))
(display "append failed"))
(when (not (list-equal? (cdr (list 3 2 1)) (list 2 1))) (display "cdr failed"))
(when (not (list-equal? (cons 1 (list 2 3)) (list 1 2 3))) (display "cons failed"))
(when (not (eq? (foldl (lambda (a r) (+ a r)) 0 (list 1 2 1 1)) 5))
(display "fold failed"))
(when (not (eq? (foldl (lambda (a b r) (+ a b r)) 0 (list 1 2 1 1) (list 2 2 5 5)) 19))
(display "fold multiple failed"))
(when (not (list-equal? (map (lambda (i) (+ i 1)) (list 1 2 3 4)) (list 2 3 4 5)))
(display "map failed"))
(when (not (eq? (let ((a 1) (b 2) (c 3)) (+ a b c)) 6)) (display "let failed"))
(when (not (eq? (let ((a 1) (b 2) (c 3)) (list 2 3) (+ a b c)) 6)) (display "let(2) failed"))
(when (not (eq? a 10)) (display "set! failed"))
(when (not (eq? (factorial 10) 3628800)) (display "factorial test failed"))
(when (not (eq? (list-ref (list-replace (list 1 2 3) 2 4) 2) 4)) (display "list-replace failed"))
(when (not (list-equal? (build-list 10 (lambda (n) n)) (list 0 1 2 3 4 5 6 7 8 9)))
(display "build-list failed"))
(when (eq? (not (+ 200 3)) 203) (display "+ failed"))
(when (not (eq? (cond (#t (+ 3 2) (+ 100 1)) (else (+ 4 3))) 101)) (display "cond test failed"))
(when (not (eq? (when #t (+ 3 2) (+ 100 1)) 101)) (display "when test failed"))
))
(unit-test)
;; -*- mode: scheme; -*-
;; Planet Fluxus Copyright (C) 2013 Dave Griffiths
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as
;; published by the Free Software Foundation, either version 3 of the
;; License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(define (msg a)
(display a)(newline))
(define (dbg a)
(msg a) a)
(define zero?
(lambda (n)
(= n 0)))
(define (random n)
(Math.floor (* (Math.random) n)))
(define (rndf) (Math.random))
;; replaced by underlying iterative version
;;(define foldl
;; (lambda (fn v l)
;; (cond
;; ((null? l) v)
;; (else (foldl fn (fn (car l) v) (cdr l))))))
(define map
(lambda (fn l)
(foldl
(lambda (i r)
(append r (list (fn i))))
()
l)))
(define filter
(lambda (fn l)
(foldl
(lambda (i r)
(if (fn i) (append r (list i)) r))
()
l)))
(define for-each
(lambda (fn l)
(foldl
(lambda (i r)
(fn i))
()
l)
#f))
(define index-map
(lambda (fn l)
(cadr (foldl
(lambda (e r)
(list
(+ (car r) 1)
(append (cadr r) (list (fn (car r) e)))))
(list 0 ())
l))))
(define index-for-each
(lambda (fn l)
(foldl
(lambda (e r)
(fn r e)
(+ r 1))
0
l)))
(define display (lambda (str) (zc.to_page "output" str)))
(define newline (lambda () (zc.to_page "output" "\n")))
(define list-equal?
(lambda (a b)
(define _
(lambda (a b)
(cond
((null? a) #t)
((not (eq? (car a) (car b))) #f)
(else (_ (cdr a) (cdr b))))))
(if (eq? (length a) (length b))
(_ a b) #f)))
;; replaced by js version
;;(define build-list
;; (lambda (n fn)
;; (define _
;; (lambda (i)
;; (cond
;; ((eq? i (- n 1)) ())
;; (else
;; (cons (fn n) (_ (+ i 1) fn))))))
;; (_ 0)))
(define print-list
(lambda (l)
(when (not (null? l))
(console.log (car l))
(print-list (cdr l)))))
(define reverse
(lambda (l)
(cond
((null? l) ())
(else
(append (reverse (cdr l)) (list (car l)))))))
(define (choose l)
(list-ref l (random (length l))))
(define (delete-n l n)
(if (eq? n 0)
(cdr l)
(append (list (car l)) (delete-n (cdr l) (- n 1)))))
(define shuffle