Last active
December 12, 2015 08:59
-
-
Save jacius/4748506 to your computer and use it in GitHub Desktop.
Revisions
-
jacius revised this gist
Feb 10, 2013 . 3 changed files with 5 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ generated = hello.html hello.js spock-runtime-min.js all: $(generated) @@ -13,14 +13,5 @@ clean: chicken-spock $< > $@ spock-runtime-%.js: cp `chicken-spock -library-path`/$@ $@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,6 @@ (display (<html> (<head> (<spock-header>) (<script> type: "text/javascript" src: "hello.js")) (<body>))) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ (define-native alert) (alert "Hello, Vulcan.") -
jacius revised this gist
Feb 10, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ (define (alert message) (%inline "alert" message)) (alert "Hello, Vulcan.") -
jacius revised this gist
Feb 10, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,6 @@ (display (<html> (<head> (<spock-header> minified: #f) (<script> type: "text/javascript" src: "hello.js")) (<body>))) -
jacius revised this gist
Feb 10, 2013 . 1 changed file with 0 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +0,0 @@ -
jacius created this gist
Feb 10, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ generated = hello.html hello.js spock-runtime.js all: $(generated) clean: rm $(generated) %.html: %.html.scm csi -s $< > $@ %.js: %.js.scm chicken-spock $< > $@ spock-runtime.js: chicken-spock -runtime > spock-runtime.js spock-runtime-min.js: chicken-spock -runtime | jsmin > spock-runtime-min.js spock-runtime-debug.js: chicken-spock -runtime -debug > spock-runtime-debug.js spock-runtime-debug-min.js: chicken-spock -runtime -debug | jsmin > spock-runtime-debug-min.js This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ Barebones example of using "Chicken Scheme":http://call-cc.org/ to generate HTML and JS, using the "html-tags":http://wiki.call-cc.org/eggref/4/html-tags and "spock":http://wiki.call-cc.org/eggref/4/spock eggs. You will need: * Chicken Scheme * html-tags: @chicken-install html-tags@ * spock: @chicken-install spock@ * Make Run @make@ to generate the HTML and JS files, then open "hello.html" in a web browser. Of course, you would realistically never use spock for something this simple. spock adds significant overhead, both in terms of downloads (the non-minified spock-runtime.js file is over 200K) and runtime speed / memory use. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ (require-library html-tags spock) (import html-tags spock) (display (<html> (<head> (<spock-header>) (<script> type: "text/javascript" src: "hello.js")) (<body>))) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ (define (alert message) (%inline "alert" message)) (alert "Hello, world!")