From 670c161eb86ea7a903f52d2884c416afba7ac6f9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:01:33 +0000 Subject: [PATCH] deploy: 7797aa2c9434e34bdbc65b9ac062eb8f14664ac8 --- 404.html | 2 +- assets/js/{1df93b7f.cbff6562.js => 1df93b7f.c5ee95e7.js} | 2 +- .../{runtime~main.d9605cba.js => runtime~main.e9eccc5e.js} | 2 +- blog/archive/index.html | 2 +- blog/index.html | 2 +- blog/tags/hello/index.html | 2 +- blog/tags/index.html | 2 +- blog/tags/lips/index.html | 2 +- blog/welcome/index.html | 2 +- docs/category/tutorial---basics/index.html | 2 +- docs/category/tutorial---extras/index.html | 2 +- docs/intro/index.html | 2 +- docs/tutorial-basics/congratulations/index.html | 2 +- docs/tutorial-basics/create-a-blog-post/index.html | 2 +- docs/tutorial-basics/create-a-document/index.html | 2 +- docs/tutorial-basics/create-a-page/index.html | 2 +- docs/tutorial-basics/deploy-your-site/index.html | 2 +- docs/tutorial-basics/markdown-features/index.html | 2 +- docs/tutorial-extras/manage-docs-versions/index.html | 2 +- docs/tutorial-extras/translate-your-site/index.html | 2 +- index.html | 6 +++--- markdown-page/index.html | 2 +- 22 files changed, 24 insertions(+), 24 deletions(-) rename assets/js/{1df93b7f.cbff6562.js => 1df93b7f.c5ee95e7.js} (70%) rename assets/js/{runtime~main.d9605cba.js => runtime~main.e9eccc5e.js} (68%) diff --git a/404.html b/404.html index 6eebc89ea..c4d607ef4 100644 --- a/404.html +++ b/404.html @@ -5,7 +5,7 @@ Page Not Found | LIPS Scheme - + diff --git a/assets/js/1df93b7f.cbff6562.js b/assets/js/1df93b7f.c5ee95e7.js similarity index 70% rename from assets/js/1df93b7f.cbff6562.js rename to assets/js/1df93b7f.c5ee95e7.js index 769d67de5..1323cb12c 100644 --- a/assets/js/1df93b7f.cbff6562.js +++ b/assets/js/1df93b7f.c5ee95e7.js @@ -1 +1 @@ -"use strict";(self.webpackChunknew_docs=self.webpackChunknew_docs||[]).push([[237],{9846:(e,n,t)=>{t.d(n,{Z:()=>i});var s=t(7294);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n{let{title:n,titleId:t,...i}=e;return s.createElement("svg",r({width:800,height:800,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t},i),n?s.createElement("title",{id:t},n):null,s.createElement("path",{d:"m128.81 49.28 27.407 228.157.06.563v216.906l19.94-39.28 20.468 38.155V296.814L168.563 57.5l-39.75-8.22Z",style:{fill:"#ad0000",fillOpacity:1}}),s.createElement("g",{style:{fill:"teal",stroke:"none",strokeWidth:6.4,strokeDasharray:"none"}},s.createElement("path",{d:"M215.374 313.938v31.813l27.564 10.53c-7.04-20.847-16.565-33.66-27.438-42.25-.04-.03-.084-.06-.125-.092z",style:{fill:"teal",stroke:"none",strokeWidth:6.4,strokeDasharray:"none"}}),s.createElement("path",{d:"M473.094 74.406v226.75l-216.938 79.69-40.78-14.97v38.28c23.21 8.03 58.078 6.813 86.25-2.53v-17.563l184.03-67.625 6.125-2.25V74.407h-18.686zM20.5 74.376v239.813l6.125 2.25 110.97 40.78v-19.906l-98.407-36.156V74.376ZM189.28 73.53l25.593 217.782a88.58 88.58 0 0 1 12.188 8.063c6.452 5.097 12.412 11.36 17.75 18.97V109.5c-15.496-17.475-34.402-28.327-55.532-35.97Z",style:{fill:"teal",stroke:"none",strokeWidth:6.4,strokeDasharray:"none"}}),s.createElement("path",{d:"M454.719 43.03c-65.178 17.392-138.354.102-191.22 70.814v208.812c19.795-29.15 45.443-40.866 70.72-46.53 33.914-7.603 66.18-7.163 91.5-27.626l11.75 14.53c-31.256 25.263-68.25 24.386-99.158 31.314-29.295 6.566-53.978 17.63-72.25 63.187l188.657-71.967V43.03ZM57.594 43v242.563l80 30.53V292c-22.504-3.217-45.065-8.633-62.53-26.844l13.5-12.937c12.15 12.667 29.032 17.263 48.28 20.374L110.656 55.03C93.3 51.725 75.492 48.1 57.594 43Z",style:{fill:"teal",stroke:"none",strokeWidth:6.4,strokeDasharray:"none"}})))}},6295:(e,n,t)=>{t.r(n),t.d(n,{default:()=>j});var s=t(512),r=t(7294),i=t(2263),a=t(6040),o=t(5742),l=t(5893);const c=[{description:"Mixing Scheme and JavaScript",code:';; &() is object literal used with quasiquote\n(let ((object `&(:name "LIPS Scheme"\n :version ,lips.version)))\n ;; you can access JavaScript properties\n ;; with dot notation\n (print (string-append object.name\n " "\n object.version))\n ;; you can mix scheme and JavaScript\n (ignore (setTimeout (lambda ()\n (alert (JSON.stringify object)))\n 1000)))'},{description:"Filter function accept, regex or function. Curry is higher order function that create new function with defaults. Pluck return a function that extract fields from an object.",code:'(print (filter number? \'(foo 10 bar 20 baz 30)))\n;; ==> (10 20 30)\n(print (filter #/foo|bar/ \'(foo bar baz quux)))\n;; ==> (foo bar)\n(define foo_or_bar (curry filter #/foo|bar/))\n(print (foo_or_bar \'(foo bar baz)))\n;; ==> (foo bar)\n\n;; &() is object literal used with quasiquote\n(define (make-person first last)\n `&(:fist ,first :last ,last))\n\n(define beatles (map make-person\n \'("John" "Paul" "Ringo" "George")\n \'("Lennon" "McCartney"\n "Starr" "Harrison")))\n;; pluck will extract properties from objects\n(write (map (pluck "fist") beatles))\n(newline)\n;; ==> ("John" "Paul" "Ringo" "George")'},{description:"Automagic async/await like resolving of promises and explicit promise quotation.",code:';; JavaScript regular expression literal\n(define re #/

([^>]+)<\\/h1>/)\n;; --\x3e is a macro that allow chaining\n;; of JavaScript methods calls\n;; no need to use Promises becasue of automagic\n;; promise resolving\n(let ((msg (--\x3e (fetch "https://scheme.org.pl")\n (text)\n (match re)\n 1)))\n (print msg))\n\n;; explicit promise handling with quotation\n(let ((promise (--\x3e \'>(fetch "https://scheme.org.pl")\n (then (lambda (res)\n (res.text)))\n (then (lambda (x)\n (. (x.match re) 1))))))\n (print (await promise)))'},{description:"Hygienic syntax-rules macro and few examples of Numeric Tower.",code:';; show hygienic macro prints expression\n;; and the result value\n(define-syntax show\n (syntax-rules ()\n [(_ expr ...)\n (begin\n (begin\n (write \'expr)\n (display " = ")\n (write expr)\n (newline))\n ...)]))\n\n;; few example of Numeric Tower\n(show (/ 1 2)\n (expt 1/4 1/2)\n (expt 10+10i 1/2)\n (log 2+1/2i)\n (acos -1)\n (+ 1/2 1/4)\n (* 3/4 1/10))'},{description:"Syntax extensions and custom repr allow to create new homoiconic data types.",code:';; Create new class using define-class macro\n(define-class Person Object\n (constructor (lambda (self name)\n (set! self.name name))))\n\n;; add syntax extension\n(set-special! "P:" \'make-person lips.specials.SPLICE)\n\n;; add class representation\n(set-repr! Person\n (lambda (x q)\n (string-append "P:(" (repr x.name q) ")")))\n\n;; function that create new object\n;; for the syntax extension\n(define (make-person name)\n (new Person name))\n\n;; we can use new syntax\n(print P:("jon"))\n;; ==> P:("jon")\n(print (. P:("jon") \'name))\n;; ==> "jon"'},{description:"Interaction with JavaScript DOM and jQuery Terminal (REPL).",code:';; this will query the DOM and ivoke click method\n(let ((selector "button[class*=\\"ColorModeToggle\\"]"))\n (--\x3e (document.querySelector selector)\n (click)))\n\n;; accessing jQuery Terminal, ignore works like begin\n;; but the return value is ignored so the terminal\n;; is not paused when it find a Promise from\n;; Terminal typing animation\n(ignore\n (term.css "--background" "#2E2E2E")\n (term.echo "This is LIPS Scheme" &(:typing #t)))'},{description:"Fibonacci Closure with swap! lisp style macro.",code:";; macro that swap first two variables\n;; with the last two expressions\n(define-macro (swap! a b x y)\n (let ((g_b (gensym)))\n `(let ((,g_b ,y))\n (set! ,a ,b)\n (set! ,b ,g_b))))\n\n;; example taken from Go website\n;; fib creates a function\n;; that return fibonacci numbers\n(define (fib)\n (let ((a 0) (b 1))\n (lambda ()\n (swap! a b b (+ a b))\n a)))\n\n(let ((f (fib)))\n (list (f) (f) (f) (f) (f)))"},{description:"Scheme hygienic macro that creates an assoc list, with macroexpand.",code:';; recursive hygienic syntax-rules macro\n(define-syntax alist\n (syntax-rules ()\n ((_) ())\n ((_ x y z ...)\n (cons (cons x y) (alist z ...)))))\n\n(print (alist "foo" 10 "bar" 20 "baz" 30))\n;; ==> ((foo . 10) (bar . 20) (baz . 30))\n(macroexpand (alist "foo" 10 "bar" 20))\n;; ==> (#:cons (#:cons "foo" 10)\n;; (#:cons (#:cons "bar" 20)\n;; ()))'},{description:"Built in SRFI-139 syntax-parameterize allows creating anamorphic hygienic macros.",code:";; define new syntax parameter\n(define-syntax-parameter it\n (syntax-rules ()\n ((_ . _)\n (syntax-error \"abort used outside of a loop\"))))\n\n;; syntax-rules macro aif adds (it) parameter\n;; to access tested value.\n(define-syntax aif\n (syntax-rules ()\n ((_ cond rest ...)\n (let ((test cond))\n (syntax-parameterize\n ((it (syntax-rules ()\n ((_) test))))\n (if test\n rest ...))))))\n\n;; no need to use assoc two times\n;; or using a variable to hold the value\n(let ((alist '((a . 10) (b . 20))))\n (aif (assoc 'a alist)\n (print (cdr (it)))))"},{description:"JavaScript generators (objects that implement iterator protocol)",code:';; JavaScript generator create using JS eval\n(define gen (self.eval "\n (async function* gen(time, ...args) {\n function delay(time) {\n return new Promise((resolve) => {\n setTimeout(resolve, time);\n });\n }\n for (let x of args) {\n await delay(time);\n yield x;\n }\n })"))\n\n;; iteration over iterator/generator\n(do-iterator\n (i (apply gen 100 (range 10)))\n ()\n (print i))\n(print (iterator->array (gen 100 1 2 3 4 5)))\n;; strings and lists are JavaScript iterators\n(write (iterator->array "hello"))\n(newline)\n(print (iterator->array \'(1 2 3 4)))'},{description:"Y Combinator and inline factorial function.",code:'(define Y\n (lambda (h)\n ((lambda (x) (x x))\n (lambda (g)\n (h (lambda args (apply (g g) args)))))))\n\n((Y (lambda (f)\n (lambda (n)\n (cond ((< n 0)\n (throw (new Error "Invalid factorial")))\n ((zero? n) 1)\n (else (* n (f (- n 1))))))))\n 10)\n;; ==> 3628800'}];function d(e){(0,r.useEffect)((()=>{!function n(){if(e.length){(function(e){return new Promise(((n,t)=>{const s=document.createElement("script");s.onload=n,s.onerror=t,s.src=e,document.head.appendChild(s)}))})(e.shift()).then(n)}}()}),[])}function m(){const{siteConfig:e}=(0,i.Z)();return d(["https://code.jquery.com/jquery-3.4.1.min.js","https://cdn.jsdelivr.net/combine/npm/jquery.terminal/js/jquery.terminal.min.js,npm/js-polyfills/keyboard.js,npm/prismjs/prism.js,npm/jquery.terminal/js/prism.js,npm/prismjs/components/prism-scheme.min.js","https://cdn.jsdelivr.net/npm/@jcubic/lips@beta/lib/js/terminal.js","https://cdn.jsdelivr.net/npm/@jcubic/lips@beta/lib/js/prism.js",`${e.baseUrl}/js/interpreter.js`]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Z,{children:[(0,l.jsx)("link",{href:"https://cdn.jsdelivr.net/combine/npm/jquery.terminal/css/jquery.terminal.min.css,npm/prismjs/themes/prism-coy.css,npm/terminal-prism/css/prism-coy.css",rel:"stylesheet"}),(0,l.jsx)("link",{href:"https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/css/terminal.css",rel:"stylesheet"}),(0,l.jsx)("link",{href:"https://cdn.jsdelivr.net/gh/richleland/pygments-css/monokai.css",rel:"stylesheet"}),(0,l.jsx)("script",{src:"http://localhost/~kuba/jcubic/scheme/lips/dist/lips.js",bootstrap:"http://localhost/~kuba/jcubic/scheme/lips/dist/std.scm"})]}),(0,l.jsxs)("div",{className:"intro",children:[(0,l.jsx)("div",{className:"actions-wrapper",children:(0,l.jsxs)("ul",{className:"actions cloak",children:[(0,l.jsx)("li",{className:"zoom-in icon",children:(0,l.jsx)("a",{href:"#",children:"Zoom In"})}),(0,l.jsx)("li",{className:"zoom-out icon",children:(0,l.jsx)("a",{href:"#",children:"Zoom Out"})}),(0,l.jsx)("li",{className:"full-screen",children:(0,l.jsxs)("ul",{children:[(0,l.jsx)("li",{className:"full-screen icon",children:(0,l.jsx)("a",{href:"#",children:"Full Screen"})}),(0,l.jsx)("li",{className:"exit-full-screen icon",children:(0,l.jsx)("a",{href:"#",children:"Exit Full Screen"})})]})})]})}),(0,l.jsx)("div",{className:"term"}),(0,l.jsxs)("div",{className:"examples",children:[(0,l.jsx)("button",{className:"run",children:"run"}),(0,l.jsx)("ul",{className:"list",children:c.map(((e,n)=>(0,l.jsxs)("li",{className:0===n?"active":void 0,children:[(0,l.jsx)("div",{className:"example",children:(0,l.jsx)("pre",{children:e.code})}),(0,l.jsx)("div",{className:"description",children:e.description})]},n)))}),(0,l.jsx)("ul",{className:"pagination",children:c.map(((e,n)=>(0,l.jsx)("li",{className:0===n?"active":void 0,children:(0,l.jsx)("a",{href:"#",children:n+1})},n)))})]})]})]})}var p=t(2503);const h={bookmarkSVG:"bookmarkSVG_kroK"},u=t(9846).Z;function f(){const{siteConfig:e}=(0,i.Z)();return(0,l.jsx)("section",{id:"bookmarklet",children:(0,l.jsxs)("div",{className:"container",children:[(0,l.jsx)(u,{className:h.bookmarkSVG,role:"img"}),(0,l.jsx)(p.Z,{as:"h3",children:"Bookmarklet"}),(0,l.jsx)(o.Z,{children:(0,l.jsx)("script",{src:`${e.baseUrl}/js/bookmark.js`})}),(0,l.jsx)("p",{children:"...."}),(0,l.jsxs)("p",{children:["When you're learning Scheme language, you can run the REPL directly on any page that have Scheme tutorial you're learning from. It even work with PDF files and new empty tab (at least in Chrome). Drag this link ",(0,l.jsx)("a",{id:"bookmark_link",children:"LIPS REPL"})," to your bookmarks. When you click on the bookmark it will run the interpreter. You can also just click the link."]})," ",(0,l.jsx)("p",{children:"The bookmark can also be used to add REPL to your LIPS Web application."})," ",(0,l.jsxs)("p",{children:["It may also not work no sites that are protected with"," ",(0,l.jsx)("a",{href:"https://en.wikipedia.org/wiki/Content_Security_Policy",children:"Content Security Policy"})]})]})})}const x={heroBanner:"heroBanner_qdFl",buttons:"buttons_AeoN"};function b(){const{siteConfig:e}=(0,i.Z)(),n=(0,r.useRef)();return(0,r.useEffect)((()=>{!function e(){window.lips?n.current.innerText=window.lips.version:setTimeout(e,100)}()}),[]),(0,l.jsx)("header",{className:(0,s.Z)("hero hero--primary",x.heroBanner),children:(0,l.jsxs)("div",{className:"container",children:[(0,l.jsxs)(p.Z,{as:"h1",className:"hero__title",children:[e.title," v.",(0,l.jsx)("span",{ref:n})]}),(0,l.jsx)("p",{className:"hero__subtitle",children:e.tagline}),(0,l.jsx)(m,{})]})})}function j(){const{siteConfig:e}=(0,i.Z)();return(0,l.jsxs)(a.Z,{title:e.title,description:e.tagline,children:[(0,l.jsx)(b,{}),(0,l.jsx)("main",{children:(0,l.jsx)(f,{})})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunknew_docs=self.webpackChunknew_docs||[]).push([[237],{9846:(e,n,t)=>{t.d(n,{Z:()=>i});var s=t(7294);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n{let{title:n,titleId:t,...i}=e;return s.createElement("svg",r({width:800,height:800,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t},i),n?s.createElement("title",{id:t},n):null,s.createElement("path",{d:"m128.81 49.28 27.407 228.157.06.563v216.906l19.94-39.28 20.468 38.155V296.814L168.563 57.5l-39.75-8.22Z",style:{fill:"#ad0000",fillOpacity:1}}),s.createElement("g",{style:{fill:"teal",stroke:"none",strokeWidth:6.4,strokeDasharray:"none"}},s.createElement("path",{d:"M215.374 313.938v31.813l27.564 10.53c-7.04-20.847-16.565-33.66-27.438-42.25-.04-.03-.084-.06-.125-.092z",style:{fill:"teal",stroke:"none",strokeWidth:6.4,strokeDasharray:"none"}}),s.createElement("path",{d:"M473.094 74.406v226.75l-216.938 79.69-40.78-14.97v38.28c23.21 8.03 58.078 6.813 86.25-2.53v-17.563l184.03-67.625 6.125-2.25V74.407h-18.686zM20.5 74.376v239.813l6.125 2.25 110.97 40.78v-19.906l-98.407-36.156V74.376ZM189.28 73.53l25.593 217.782a88.58 88.58 0 0 1 12.188 8.063c6.452 5.097 12.412 11.36 17.75 18.97V109.5c-15.496-17.475-34.402-28.327-55.532-35.97Z",style:{fill:"teal",stroke:"none",strokeWidth:6.4,strokeDasharray:"none"}}),s.createElement("path",{d:"M454.719 43.03c-65.178 17.392-138.354.102-191.22 70.814v208.812c19.795-29.15 45.443-40.866 70.72-46.53 33.914-7.603 66.18-7.163 91.5-27.626l11.75 14.53c-31.256 25.263-68.25 24.386-99.158 31.314-29.295 6.566-53.978 17.63-72.25 63.187l188.657-71.967V43.03ZM57.594 43v242.563l80 30.53V292c-22.504-3.217-45.065-8.633-62.53-26.844l13.5-12.937c12.15 12.667 29.032 17.263 48.28 20.374L110.656 55.03C93.3 51.725 75.492 48.1 57.594 43Z",style:{fill:"teal",stroke:"none",strokeWidth:6.4,strokeDasharray:"none"}})))}},6295:(e,n,t)=>{t.r(n),t.d(n,{default:()=>b});var s=t(512),r=t(7294),i=t(2263),a=t(6040),o=t(5742),l=t(5893);const c=[{description:"Mixing Scheme and JavaScript",code:';; &() is object literal used with quasiquote\n(let ((object `&(:name "LIPS Scheme"\n :version ,lips.version)))\n ;; you can access JavaScript properties\n ;; with dot notation\n (print (string-append object.name\n " "\n object.version))\n ;; you can mix scheme and JavaScript\n (ignore (setTimeout (lambda ()\n (alert (JSON.stringify object)))\n 1000)))'},{description:"Filter function accept, regex or function. Curry is higher order function that create new function with defaults. Pluck return a function that extract fields from an object.",code:'(print (filter number? \'(foo 10 bar 20 baz 30)))\n;; ==> (10 20 30)\n(print (filter #/foo|bar/ \'(foo bar baz quux)))\n;; ==> (foo bar)\n(define foo_or_bar (curry filter #/foo|bar/))\n(print (foo_or_bar \'(foo bar baz)))\n;; ==> (foo bar)\n\n;; &() is object literal used with quasiquote\n(define (make-person first last)\n `&(:fist ,first :last ,last))\n\n(define beatles (map make-person\n \'("John" "Paul" "Ringo" "George")\n \'("Lennon" "McCartney"\n "Starr" "Harrison")))\n;; pluck will extract properties from objects\n(write (map (pluck "fist") beatles))\n(newline)\n;; ==> ("John" "Paul" "Ringo" "George")'},{description:"Automagic async/await like resolving of promises and explicit promise quotation.",code:';; JavaScript regular expression literal\n(define re #/

([^>]+)<\\/h1>/)\n;; --\x3e is a macro that allow chaining\n;; of JavaScript methods calls\n;; no need to use Promises becasue of automagic\n;; promise resolving\n(let ((msg (--\x3e (fetch "https://scheme.org.pl")\n (text)\n (match re)\n 1)))\n (print msg))\n\n;; explicit promise handling with quotation\n(let ((promise (--\x3e \'>(fetch "https://scheme.org.pl")\n (then (lambda (res)\n (res.text)))\n (then (lambda (x)\n (. (x.match re) 1))))))\n (print (await promise)))'},{description:"Hygienic syntax-rules macro and few examples of Numeric Tower.",code:';; show hygienic macro prints expression\n;; and the result value\n(define-syntax show\n (syntax-rules ()\n [(_ expr ...)\n (begin\n (begin\n (write \'expr)\n (display " = ")\n (write expr)\n (newline))\n ...)]))\n\n;; few example of Numeric Tower\n(show (/ 1 2)\n (expt 1/4 1/2)\n (expt 10+10i 1/2)\n (log 2+1/2i)\n (acos -1)\n (+ 1/2 1/4)\n (* 3/4 1/10))'},{description:"Syntax extensions and custom repr allow to create new homoiconic data types.",code:';; Create new class using define-class macro\n(define-class Person Object\n (constructor (lambda (self name)\n (set! self.name name))))\n\n;; add syntax extension\n(set-special! "P:" \'make-person lips.specials.SPLICE)\n\n;; add class representation\n(set-repr! Person\n (lambda (x q)\n (string-append "P:(" (repr x.name q) ")")))\n\n;; function that create new object\n;; for the syntax extension\n(define (make-person name)\n (new Person name))\n\n;; we can use new syntax\n(print P:("jon"))\n;; ==> P:("jon")\n(print (. P:("jon") \'name))\n;; ==> "jon"'},{description:"Interaction with JavaScript DOM and jQuery Terminal (REPL).",code:';; this will query the DOM and ivoke click method\n(let ((selector "button[class*=\\"ColorModeToggle\\"]"))\n (--\x3e (document.querySelector selector)\n (click)))\n\n;; accessing jQuery Terminal, ignore works like begin\n;; but the return value is ignored so the terminal\n;; is not paused when it find a Promise from\n;; Terminal typing animation\n(ignore\n (term.css "--background" "#2E2E2E")\n (term.echo "This is LIPS Scheme" &(:typing #t)))'},{description:"Fibonacci Closure with swap! lisp style macro.",code:";; macro that swap first two variables\n;; with the last two expressions\n(define-macro (swap! a b x y)\n (let ((g_b (gensym)))\n `(let ((,g_b ,y))\n (set! ,a ,b)\n (set! ,b ,g_b))))\n\n;; example taken from Go website\n;; fib creates a function\n;; that return fibonacci numbers\n(define (fib)\n (let ((a 0) (b 1))\n (lambda ()\n (swap! a b b (+ a b))\n a)))\n\n(let ((f (fib)))\n (list (f) (f) (f) (f) (f)))"},{description:"Scheme hygienic macro that creates an assoc list, with macroexpand.",code:';; recursive hygienic syntax-rules macro\n(define-syntax alist\n (syntax-rules ()\n ((_) ())\n ((_ x y z ...)\n (cons (cons x y) (alist z ...)))))\n\n(print (alist "foo" 10 "bar" 20 "baz" 30))\n;; ==> ((foo . 10) (bar . 20) (baz . 30))\n(macroexpand (alist "foo" 10 "bar" 20))\n;; ==> (#:cons (#:cons "foo" 10)\n;; (#:cons (#:cons "bar" 20)\n;; ()))'},{description:"Built in SRFI-139 syntax-parameterize allows creating anamorphic hygienic macros.",code:";; define new syntax parameter\n(define-syntax-parameter it\n (syntax-rules ()\n ((_ . _)\n (syntax-error \"abort used outside of a loop\"))))\n\n;; syntax-rules macro aif adds (it) parameter\n;; to access tested value.\n(define-syntax aif\n (syntax-rules ()\n ((_ cond rest ...)\n (let ((test cond))\n (syntax-parameterize\n ((it (syntax-rules ()\n ((_) test))))\n (if test\n rest ...))))))\n\n;; no need to use assoc two times\n;; or using a variable to hold the value\n(let ((alist '((a . 10) (b . 20))))\n (aif (assoc 'a alist)\n (print (cdr (it)))))"},{description:"JavaScript generators (objects that implement iterator protocol)",code:';; JavaScript generator create using JS eval\n(define gen (self.eval "\n (async function* gen(time, ...args) {\n function delay(time) {\n return new Promise((resolve) => {\n setTimeout(resolve, time);\n });\n }\n for (let x of args) {\n await delay(time);\n yield x;\n }\n })"))\n\n;; iteration over iterator/generator\n(do-iterator\n (i (apply gen 100 (range 10)))\n ()\n (print i))\n(print (iterator->array (gen 100 1 2 3 4 5)))\n;; strings and lists are JavaScript iterators\n(write (iterator->array "hello"))\n(newline)\n(print (iterator->array \'(1 2 3 4)))'},{description:"Y Combinator and inline factorial function.",code:'(define Y\n (lambda (h)\n ((lambda (x) (x x))\n (lambda (g)\n (h (lambda args (apply (g g) args)))))))\n\n((Y (lambda (f)\n (lambda (n)\n (cond ((< n 0)\n (throw (new Error "Invalid factorial")))\n ((zero? n) 1)\n (else (* n (f (- n 1))))))))\n 10)\n;; ==> 3628800'}];function d(e){(0,r.useEffect)((()=>{!function n(){if(e.length){(function(e){return new Promise(((n,t)=>{const s=document.createElement("script");s.onload=n,s.onerror=t,s.src=e,document.head.appendChild(s)}))})(e.shift()).then(n)}}()}),[])}function m(){const{siteConfig:e}=(0,i.Z)();return d(["https://code.jquery.com/jquery-3.7.1.min.js","https://cdn.jsdelivr.net/combine/npm/jquery.terminal/js/jquery.terminal.min.js,npm/js-polyfills/keyboard.js,npm/prismjs/prism.js,npm/jquery.terminal/js/prism.js,npm/prismjs/components/prism-scheme.min.js","https://cdn.jsdelivr.net/npm/@jcubic/lips@beta/lib/js/terminal.js","https://cdn.jsdelivr.net/npm/@jcubic/lips@beta/lib/js/prism.js",`${e.baseUrl}/js/interpreter.js`]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Z,{children:[(0,l.jsx)("link",{rel:"preconnect",href:"https://cdn.jsdelivr.net"}),(0,l.jsx)("link",{href:"https://cdn.jsdelivr.net/combine/npm/jquery.terminal/css/jquery.terminal.min.css,npm/prismjs/themes/prism-coy.css,npm/terminal-prism/css/prism-coy.css",rel:"stylesheet"}),(0,l.jsx)("link",{href:"https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/css/terminal.css",rel:"stylesheet"}),(0,l.jsx)("link",{href:"https://cdn.jsdelivr.net/gh/richleland/pygments-css/monokai.css",rel:"stylesheet"}),(0,l.jsx)("script",{src:"https://cdn.jsdelivr.net/gh/jcubic/lips@devel/dist/lips.min.js","data-bootstrap":"https://cdn.jsdelivr.net/gh/jcubic/lips@devel/dist/std.xcb"})]}),(0,l.jsxs)("div",{className:"intro",children:[(0,l.jsx)("div",{className:"actions-wrapper",children:(0,l.jsxs)("ul",{className:"actions cloak",children:[(0,l.jsx)("li",{className:"zoom-in icon",children:(0,l.jsx)("a",{href:"#",children:"Zoom In"})}),(0,l.jsx)("li",{className:"zoom-out icon",children:(0,l.jsx)("a",{href:"#",children:"Zoom Out"})}),(0,l.jsx)("li",{className:"full-screen",children:(0,l.jsxs)("ul",{children:[(0,l.jsx)("li",{className:"full-screen icon",children:(0,l.jsx)("a",{href:"#",children:"Full Screen"})}),(0,l.jsx)("li",{className:"exit-full-screen icon",children:(0,l.jsx)("a",{href:"#",children:"Exit Full Screen"})})]})})]})}),(0,l.jsx)("div",{className:"term"}),(0,l.jsxs)("div",{className:"examples",children:[(0,l.jsx)("button",{className:"run",children:"run"}),(0,l.jsx)("ul",{className:"list",children:c.map(((e,n)=>(0,l.jsxs)("li",{className:0===n?"active":void 0,children:[(0,l.jsx)("div",{className:"example",children:(0,l.jsx)("pre",{children:e.code})}),(0,l.jsx)("div",{className:"description",children:e.description})]},n)))}),(0,l.jsx)("ul",{className:"pagination",children:c.map(((e,n)=>(0,l.jsx)("li",{className:0===n?"active":void 0,children:(0,l.jsx)("a",{href:"#",children:n+1})},n)))})]})]})]})}var p=t(2503);const h={bookmarkSVG:"bookmarkSVG_kroK"},u=t(9846).Z;function f(){const{siteConfig:e}=(0,i.Z)();return(0,l.jsx)("section",{id:"bookmarklet",children:(0,l.jsxs)("div",{className:"container",children:[(0,l.jsx)(u,{className:h.bookmarkSVG,role:"img"}),(0,l.jsx)(p.Z,{as:"h3",children:"Bookmarklet"}),(0,l.jsx)(o.Z,{children:(0,l.jsx)("script",{src:`${e.baseUrl}/js/bookmark.js`})}),(0,l.jsxs)("p",{children:["When you're learning Scheme language, you can run the REPL directly on any page that have Scheme tutorial you're learning from. It even work with PDF files and new empty tab (at least in Chrome). Drag this link ",(0,l.jsx)("a",{id:"bookmark_link",children:"LIPS REPL"})," to your bookmarks. When you click on the bookmark it will run the interpreter. You can also just click the link."]})," ",(0,l.jsx)("p",{children:"The bookmark can also be used to add REPL to your LIPS Web application."})," ",(0,l.jsxs)("p",{children:["It may also not work no sites that are protected with"," ",(0,l.jsx)("a",{href:"https://en.wikipedia.org/wiki/Content_Security_Policy",children:"Content Security Policy"})]})]})})}const x={heroBanner:"heroBanner_qdFl",buttons:"buttons_AeoN"};function j(){const{siteConfig:e}=(0,i.Z)(),n=(0,r.useRef)();return(0,r.useEffect)((()=>{!function e(){window.lips?n.current.innerText=window.lips.version:setTimeout(e,100)}()}),[]),(0,l.jsx)("header",{className:(0,s.Z)("hero hero--primary",x.heroBanner),children:(0,l.jsxs)("div",{className:"container",children:[(0,l.jsxs)(p.Z,{as:"h1",className:"hero__title",children:[e.title," v.",(0,l.jsx)("span",{ref:n})]}),(0,l.jsx)("p",{className:"hero__subtitle",children:e.tagline}),(0,l.jsx)(m,{})]})})}function b(){const{siteConfig:e}=(0,i.Z)();return(0,l.jsxs)(a.Z,{title:e.title,description:e.tagline,children:[(0,l.jsx)(j,{}),(0,l.jsx)("main",{children:(0,l.jsx)(f,{})})]})}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.d9605cba.js b/assets/js/runtime~main.e9eccc5e.js similarity index 68% rename from assets/js/runtime~main.d9605cba.js rename to assets/js/runtime~main.e9eccc5e.js index 9153c4bac..12d0f73b1 100644 --- a/assets/js/runtime~main.d9605cba.js +++ b/assets/js/runtime~main.e9eccc5e.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,t,r,c,f={},d={};function o(e){var a=d[e];if(void 0!==a)return a.exports;var t=d[e]={id:e,loaded:!1,exports:{}};return f[e].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}o.m=f,o.c=d,e=[],o.O=(a,t,r,c)=>{if(!t){var f=1/0;for(i=0;i=c)&&Object.keys(o.O).every((e=>o.O[e](t[b])))?t.splice(b--,1):(d=!1,c0&&e[i-1][2]>c;i--)e[i]=e[i-1];e[i]=[t,r,c]},o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var c=Object.create(null);o.r(c);var f={};a=a||[null,t({}),t([]),t(t)];for(var d=2&r&&e;"object"==typeof d&&!~a.indexOf(d);d=t(d))Object.getOwnPropertyNames(d).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,o.d(c,f),c},o.d=(e,a)=>{for(var t in a)o.o(a,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((a,t)=>(o.f[t](e,a),a)),[])),o.u=e=>"assets/js/"+({9:"071f70b4",13:"01a85c17",53:"935f2afb",70:"f196f4a4",85:"1f391b9e",89:"a6aa9e1f",103:"ccc49370",141:"321ee6e0",193:"f55d3e7a",237:"1df93b7f",242:"c71491fd",296:"ddb0995b",326:"df866281",347:"1a2006b5",368:"a94703ab",414:"393be207",460:"9abc7bc7",504:"822bd8ab",518:"a7bd4aaa",535:"814f3328",587:"ddbfd18b",589:"5c868d36",607:"533a09ca",608:"9e4087bc",610:"6875c492",616:"ff6928b3",619:"d6516dc4",661:"5e95c892",663:"af95cafa",671:"0e384e19",682:"c36ecdcb",755:"e44a2883",792:"dff1c289",817:"14eb3368",818:"1e4232ab",859:"18c41134",885:"7f5460c2",918:"17896441"}[e]||e)+"."+{9:"87372986",13:"1d6bda03",53:"f738ebfa",70:"1a5f2321",85:"7a84b45b",89:"8e1e7c18",103:"4cec8659",141:"91ace968",193:"01398fd8",237:"cbff6562",242:"b6cfb1ed",296:"487b2c07",326:"70766307",347:"c23ea8b3",368:"b207b1ef",404:"4afbde99",414:"135d334d",460:"bb874be7",504:"53c6d3ce",518:"39e33d3e",535:"8fe04587",587:"7af39a58",589:"cdc7fc93",607:"a81854c4",608:"563d300f",610:"c45f48fb",616:"f1df3cc8",619:"087672b5",661:"c37a1170",663:"6aca09d3",671:"a389b60d",677:"af8b943c",682:"6d8a1687",755:"26050632",772:"f7afe75c",792:"e715483d",817:"df4c4179",818:"3fe03de7",859:"e1ea9481",885:"f2410dad",918:"6ab4aec7"}[e]+".js",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},c="new-docs:",o.l=(e,a,t,f)=>{if(r[e])r[e].push(a);else{var d,b;if(void 0!==t)for(var n=document.getElementsByTagName("script"),i=0;i{d.onerror=d.onload=null,clearTimeout(s);var c=r[e];if(delete r[e],d.parentNode&&d.parentNode.removeChild(d),c&&c.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=l.bind(null,d.onerror),d.onload=l.bind(null,d.onload),b&&document.head.appendChild(d)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="/lips-website/",o.gca=function(e){return e={17896441:"918","071f70b4":"9","01a85c17":"13","935f2afb":"53",f196f4a4:"70","1f391b9e":"85",a6aa9e1f:"89",ccc49370:"103","321ee6e0":"141",f55d3e7a:"193","1df93b7f":"237",c71491fd:"242",ddb0995b:"296",df866281:"326","1a2006b5":"347",a94703ab:"368","393be207":"414","9abc7bc7":"460","822bd8ab":"504",a7bd4aaa:"518","814f3328":"535",ddbfd18b:"587","5c868d36":"589","533a09ca":"607","9e4087bc":"608","6875c492":"610",ff6928b3:"616",d6516dc4:"619","5e95c892":"661",af95cafa:"663","0e384e19":"671",c36ecdcb:"682",e44a2883:"755",dff1c289:"792","14eb3368":"817","1e4232ab":"818","18c41134":"859","7f5460c2":"885"}[e]||e,o.p+o.u(e)},(()=>{var e={303:0,532:0};o.f.j=(a,t)=>{var r=o.o(e,a)?e[a]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(303|532)$/.test(a))e[a]=0;else{var c=new Promise(((t,c)=>r=e[a]=[t,c]));t.push(r[2]=c);var f=o.p+o.u(a),d=new Error;o.l(f,(t=>{if(o.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var c=t&&("load"===t.type?"missing":t.type),f=t&&t.target&&t.target.src;d.message="Loading chunk "+a+" failed.\n("+c+": "+f+")",d.name="ChunkLoadError",d.type=c,d.request=f,r[1](d)}}),"chunk-"+a,a)}},o.O.j=a=>0===e[a];var a=(a,t)=>{var r,c,f=t[0],d=t[1],b=t[2],n=0;if(f.some((a=>0!==e[a]))){for(r in d)o.o(d,r)&&(o.m[r]=d[r]);if(b)var i=b(o)}for(a&&a(t);n{"use strict";var e,a,t,r,f,c={},d={};function o(e){var a=d[e];if(void 0!==a)return a.exports;var t=d[e]={id:e,loaded:!1,exports:{}};return c[e].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}o.m=c,o.c=d,e=[],o.O=(a,t,r,f)=>{if(!t){var c=1/0;for(i=0;i=f)&&Object.keys(o.O).every((e=>o.O[e](t[b])))?t.splice(b--,1):(d=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[t,r,f]},o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var f=Object.create(null);o.r(f);var c={};a=a||[null,t({}),t([]),t(t)];for(var d=2&r&&e;"object"==typeof d&&!~a.indexOf(d);d=t(d))Object.getOwnPropertyNames(d).forEach((a=>c[a]=()=>e[a]));return c.default=()=>e,o.d(f,c),f},o.d=(e,a)=>{for(var t in a)o.o(a,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((a,t)=>(o.f[t](e,a),a)),[])),o.u=e=>"assets/js/"+({9:"071f70b4",13:"01a85c17",53:"935f2afb",70:"f196f4a4",85:"1f391b9e",89:"a6aa9e1f",103:"ccc49370",141:"321ee6e0",193:"f55d3e7a",237:"1df93b7f",242:"c71491fd",296:"ddb0995b",326:"df866281",347:"1a2006b5",368:"a94703ab",414:"393be207",460:"9abc7bc7",504:"822bd8ab",518:"a7bd4aaa",535:"814f3328",587:"ddbfd18b",589:"5c868d36",607:"533a09ca",608:"9e4087bc",610:"6875c492",616:"ff6928b3",619:"d6516dc4",661:"5e95c892",663:"af95cafa",671:"0e384e19",682:"c36ecdcb",755:"e44a2883",792:"dff1c289",817:"14eb3368",818:"1e4232ab",859:"18c41134",885:"7f5460c2",918:"17896441"}[e]||e)+"."+{9:"87372986",13:"1d6bda03",53:"f738ebfa",70:"1a5f2321",85:"7a84b45b",89:"8e1e7c18",103:"4cec8659",141:"91ace968",193:"01398fd8",237:"c5ee95e7",242:"b6cfb1ed",296:"487b2c07",326:"70766307",347:"c23ea8b3",368:"b207b1ef",404:"4afbde99",414:"135d334d",460:"bb874be7",504:"53c6d3ce",518:"39e33d3e",535:"8fe04587",587:"7af39a58",589:"cdc7fc93",607:"a81854c4",608:"563d300f",610:"c45f48fb",616:"f1df3cc8",619:"087672b5",661:"c37a1170",663:"6aca09d3",671:"a389b60d",677:"af8b943c",682:"6d8a1687",755:"26050632",772:"f7afe75c",792:"e715483d",817:"df4c4179",818:"3fe03de7",859:"e1ea9481",885:"f2410dad",918:"6ab4aec7"}[e]+".js",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},f="new-docs:",o.l=(e,a,t,c)=>{if(r[e])r[e].push(a);else{var d,b;if(void 0!==t)for(var n=document.getElementsByTagName("script"),i=0;i{d.onerror=d.onload=null,clearTimeout(s);var f=r[e];if(delete r[e],d.parentNode&&d.parentNode.removeChild(d),f&&f.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=l.bind(null,d.onerror),d.onload=l.bind(null,d.onload),b&&document.head.appendChild(d)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="/lips-website/",o.gca=function(e){return e={17896441:"918","071f70b4":"9","01a85c17":"13","935f2afb":"53",f196f4a4:"70","1f391b9e":"85",a6aa9e1f:"89",ccc49370:"103","321ee6e0":"141",f55d3e7a:"193","1df93b7f":"237",c71491fd:"242",ddb0995b:"296",df866281:"326","1a2006b5":"347",a94703ab:"368","393be207":"414","9abc7bc7":"460","822bd8ab":"504",a7bd4aaa:"518","814f3328":"535",ddbfd18b:"587","5c868d36":"589","533a09ca":"607","9e4087bc":"608","6875c492":"610",ff6928b3:"616",d6516dc4:"619","5e95c892":"661",af95cafa:"663","0e384e19":"671",c36ecdcb:"682",e44a2883:"755",dff1c289:"792","14eb3368":"817","1e4232ab":"818","18c41134":"859","7f5460c2":"885"}[e]||e,o.p+o.u(e)},(()=>{var e={303:0,532:0};o.f.j=(a,t)=>{var r=o.o(e,a)?e[a]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(303|532)$/.test(a))e[a]=0;else{var f=new Promise(((t,f)=>r=e[a]=[t,f]));t.push(r[2]=f);var c=o.p+o.u(a),d=new Error;o.l(c,(t=>{if(o.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var f=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;d.message="Loading chunk "+a+" failed.\n("+f+": "+c+")",d.name="ChunkLoadError",d.type=f,d.request=c,r[1](d)}}),"chunk-"+a,a)}},o.O.j=a=>0===e[a];var a=(a,t)=>{var r,f,c=t[0],d=t[1],b=t[2],n=0;if(c.some((a=>0!==e[a]))){for(r in d)o.o(d,r)&&(o.m[r]=d[r]);if(b)var i=b(o)}for(a&&a(t);n Archive | LIPS Scheme - + diff --git a/blog/index.html b/blog/index.html index a733c72e2..affea9a0c 100644 --- a/blog/index.html +++ b/blog/index.html @@ -5,7 +5,7 @@ Blog | LIPS Scheme - + diff --git a/blog/tags/hello/index.html b/blog/tags/hello/index.html index 9292069c6..c5f6f929c 100644 --- a/blog/tags/hello/index.html +++ b/blog/tags/hello/index.html @@ -5,7 +5,7 @@ One post tagged with "hello" | LIPS Scheme - + diff --git a/blog/tags/index.html b/blog/tags/index.html index 4eaff4c7d..97f18b7e0 100644 --- a/blog/tags/index.html +++ b/blog/tags/index.html @@ -5,7 +5,7 @@ Tags | LIPS Scheme - + diff --git a/blog/tags/lips/index.html b/blog/tags/lips/index.html index 115b6e6e6..df007a3c0 100644 --- a/blog/tags/lips/index.html +++ b/blog/tags/lips/index.html @@ -5,7 +5,7 @@ One post tagged with "lips" | LIPS Scheme - + diff --git a/blog/welcome/index.html b/blog/welcome/index.html index f6c408bd1..31af3d52a 100644 --- a/blog/welcome/index.html +++ b/blog/welcome/index.html @@ -5,7 +5,7 @@ Welcome | LIPS Scheme - + diff --git a/docs/category/tutorial---basics/index.html b/docs/category/tutorial---basics/index.html index a63de2cba..4e9e4a775 100644 --- a/docs/category/tutorial---basics/index.html +++ b/docs/category/tutorial---basics/index.html @@ -5,7 +5,7 @@ Tutorial - Basics | LIPS Scheme - + diff --git a/docs/category/tutorial---extras/index.html b/docs/category/tutorial---extras/index.html index 301143e5d..8192476fd 100644 --- a/docs/category/tutorial---extras/index.html +++ b/docs/category/tutorial---extras/index.html @@ -5,7 +5,7 @@ Tutorial - Extras | LIPS Scheme - + diff --git a/docs/intro/index.html b/docs/intro/index.html index 218078b96..f38ba8726 100644 --- a/docs/intro/index.html +++ b/docs/intro/index.html @@ -5,7 +5,7 @@ Tutorial Intro | LIPS Scheme - + diff --git a/docs/tutorial-basics/congratulations/index.html b/docs/tutorial-basics/congratulations/index.html index 0fd9af686..1152b8313 100644 --- a/docs/tutorial-basics/congratulations/index.html +++ b/docs/tutorial-basics/congratulations/index.html @@ -5,7 +5,7 @@ Congratulations! | LIPS Scheme - + diff --git a/docs/tutorial-basics/create-a-blog-post/index.html b/docs/tutorial-basics/create-a-blog-post/index.html index 9d6b14853..b9bbb2761 100644 --- a/docs/tutorial-basics/create-a-blog-post/index.html +++ b/docs/tutorial-basics/create-a-blog-post/index.html @@ -5,7 +5,7 @@ Create a Blog Post | LIPS Scheme - + diff --git a/docs/tutorial-basics/create-a-document/index.html b/docs/tutorial-basics/create-a-document/index.html index 5fa4fe2eb..ea8794a2f 100644 --- a/docs/tutorial-basics/create-a-document/index.html +++ b/docs/tutorial-basics/create-a-document/index.html @@ -5,7 +5,7 @@ Create a Document | LIPS Scheme - + diff --git a/docs/tutorial-basics/create-a-page/index.html b/docs/tutorial-basics/create-a-page/index.html index 65fe6019f..3e9e1d20a 100644 --- a/docs/tutorial-basics/create-a-page/index.html +++ b/docs/tutorial-basics/create-a-page/index.html @@ -5,7 +5,7 @@ Create a Page | LIPS Scheme - + diff --git a/docs/tutorial-basics/deploy-your-site/index.html b/docs/tutorial-basics/deploy-your-site/index.html index a87dcb11e..765e47f2f 100644 --- a/docs/tutorial-basics/deploy-your-site/index.html +++ b/docs/tutorial-basics/deploy-your-site/index.html @@ -5,7 +5,7 @@ Deploy your site | LIPS Scheme - + diff --git a/docs/tutorial-basics/markdown-features/index.html b/docs/tutorial-basics/markdown-features/index.html index 071572c12..133b615e8 100644 --- a/docs/tutorial-basics/markdown-features/index.html +++ b/docs/tutorial-basics/markdown-features/index.html @@ -5,7 +5,7 @@ Markdown Features | LIPS Scheme - + diff --git a/docs/tutorial-extras/manage-docs-versions/index.html b/docs/tutorial-extras/manage-docs-versions/index.html index 1480f84f0..1632595e4 100644 --- a/docs/tutorial-extras/manage-docs-versions/index.html +++ b/docs/tutorial-extras/manage-docs-versions/index.html @@ -5,7 +5,7 @@ Manage Docs Versions | LIPS Scheme - + diff --git a/docs/tutorial-extras/translate-your-site/index.html b/docs/tutorial-extras/translate-your-site/index.html index 54f768b99..9e274cfe8 100644 --- a/docs/tutorial-extras/translate-your-site/index.html +++ b/docs/tutorial-extras/translate-your-site/index.html @@ -5,7 +5,7 @@ Translate your site | LIPS Scheme - + diff --git a/index.html b/index.html index 34c0e4af2..790927ee8 100644 --- a/index.html +++ b/index.html @@ -3,9 +3,9 @@ -LIPS Scheme | LIPS Scheme +LIPS Scheme | LIPS Scheme - + @@ -198,6 +198,6 @@ ((zero? n) 1) (else (* n (f (- n 1)))))))) 10) -;; ==> 3628800
Y Combinator and inline factorial function.

Bookmarklet

....

When you're learning Scheme language, you can run the REPL directly on any page that have Scheme tutorial you're learning from. It even work with PDF files and new empty tab (at least in Chrome). Drag this link LIPS REPL to your bookmarks. When you click on the bookmark it will run the interpreter. You can also just click the link.

The bookmark can also be used to add REPL to your LIPS Web application.

It may also not work no sites that are protected with Content Security Policy

+;; ==> 3628800
Y Combinator and inline factorial function.

Bookmarklet

When you're learning Scheme language, you can run the REPL directly on any page that have Scheme tutorial you're learning from. It even work with PDF files and new empty tab (at least in Chrome). Drag this link LIPS REPL to your bookmarks. When you click on the bookmark it will run the interpreter. You can also just click the link.

The bookmark can also be used to add REPL to your LIPS Web application.

It may also not work no sites that are protected with Content Security Policy

\ No newline at end of file diff --git a/markdown-page/index.html b/markdown-page/index.html index 642f2bdc0..0a7de5306 100644 --- a/markdown-page/index.html +++ b/markdown-page/index.html @@ -5,7 +5,7 @@ Markdown page example | LIPS Scheme - +