diff --git a/404.html b/404.html index 232561f4..56af3b7d 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@ Page Not Found | LIPS Scheme - + diff --git a/assets/js/1df93b7f.10bfd7ca.js b/assets/js/1df93b7f.10bfd7ca.js new file mode 100644 index 00000000..f5c205dc --- /dev/null +++ b/assets/js/1df93b7f.10bfd7ca.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknew_docs=self.webpackChunknew_docs||[]).push([[4583],{8827:(e,n,t)=>{t.d(n,{A:()=>r});var s=t(6540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n{let{title:n,titleId:t,...r}=e;return s.createElement("svg",i({width:800,height:800,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t},r),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"}})))}},7680:(e,n,t)=>{t.d(n,{A:()=>r});var s=t(6540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n{let{title:n,titleId:t,...r}=e;return s.createElement("svg",i({width:800,height:800,viewBox:"0 0 512 512",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t},r),n?s.createElement("title",{id:t},n):null,s.createElement("path",{style:{fontWeight:700,fontSize:"153.432px",lineHeight:1.25,fontFamily:"Monospace",InkscapeFontSpecification:"'Monospace Bold'",letterSpacing:0,wordSpacing:0,fill:"teal",fillOpacity:1,strokeWidth:5.04996},d:"M260.887 104.259q9.757 12.301 14.847 27.997 5.09 15.554 5.09 33.653 0 18.24-5.231 34.218-5.09 15.978-14.706 28.421h-16.826q9.473-13.432 14.14-29.27 4.807-15.977 4.807-33.228 0-16.826-4.807-32.522-4.808-15.695-13.999-29.27z",transform:"translate(3.07 6.275)"}),s.createElement("path",{style:{fontWeight:700,fontSize:"153.432px",lineHeight:1.25,fontFamily:"Monospace",InkscapeFontSpecification:"'Monospace Bold'",letterSpacing:0,wordSpacing:0,fill:"#ad0000",fillOpacity:1,strokeWidth:5.04996},d:"M208.145 223.206q-5.373 0-9.05-1.98-3.534-2.12-5.797-5.514-2.12-3.535-3.393-7.777l-5.939-19.796q-.848-2.828-1.697-5.797-.848-3.11-1.555-5.939-.566-2.97-.849-5.09h-.424q-.99 4.1-2.545 8.908-1.555 4.666-2.545 7.494l-12.16 34.077h-20.928L171.1 148.69l-2.545-6.787q-2.687-7.494-6.08-9.474-3.394-1.98-8.485-1.98-2.686 0-4.524.283-1.839.283-3.253.566v-16.685q1.98-.424 5.232-.707 3.394-.424 6.505-.424 8.484 0 14.14 2.828 5.655 2.828 9.332 8.342 3.676 5.373 6.08 13.433l17.11 56.277q1.696 5.515 3.534 8.484 1.838 2.828 3.677 3.818 1.98.99 3.959.99 1.131 0 2.262-.142 1.273-.283 2.404-.566v14.14q-1.131.566-3.252.99-2.121.566-4.525.849-2.404.282-4.525.282z",transform:"translate(3.07 6.275)"}),s.createElement("path",{style:{fontWeight:700,fontSize:"153.432px",lineHeight:1.25,fontFamily:"Monospace",InkscapeFontSpecification:"'Monospace Bold'",letterSpacing:0,wordSpacing:0,fill:"teal",fillOpacity:1,strokeWidth:5.04996},d:"M99.975 228.548q-9.757-12.301-14.847-27.997-5.09-15.695-5.09-33.653 0-18.24 5.09-34.218 5.232-15.978 14.847-28.421H116.8q-9.473 13.432-14.281 29.41-4.666 15.837-4.666 33.088 0 16.827 4.807 32.522 4.95 15.695 13.999 29.27z",transform:"translate(3.07 6.275)"}),s.createElement("path",{d:"M55.284 33.203c-18.047 0-32.677 14.63-32.677 32.677v367.69c0 18.046 14.63 32.676 32.677 32.676h395.292c18.047 0 32.677-14.63 32.677-32.677V65.88c0-18.047-14.63-32.677-32.677-32.677zm0 32.677h395.292v367.69H55.284Z",style:{fill:"teal",fillOpacity:1,strokeWidth:16.3384},transform:"translate(3.07 6.275)"}),s.createElement("path",{d:"M332.764-496.607c-15.35 0-28.302 6.524-38.734 16.804a75.53 75.53 0 0 0-4.237 4.528h-12.495c-28.619 0-51.2 24.195-51.2 53.334v85.334c0 29.139 22.581 53.332 51.2 53.332h153.6c28.618 0 51.2-24.193 51.2-53.332v-85.334c0-29.139-22.582-53.334-51.2-53.334h-12.495a75.55 75.55 0 0 0-4.238-4.528c-10.432-10.28-23.384-16.804-38.734-16.804zm0 42.666h42.667c2.76 0 5.69 1.476 8.789 4.53 2.296 2.262 3.883 4.558 4.36 5.458l6.011 11.346h36.307c4.37 0 8.533 4.459 8.533 10.666v85.334c0 6.207-4.162 10.666-8.533 10.666h-153.6c-4.372 0-8.534-4.459-8.534-10.666v-85.334c0-6.207 4.162-10.666 8.534-10.666h36.306l6.011-11.346c.477-.9 2.064-3.196 4.36-5.458 3.1-3.054 6.028-4.53 8.789-4.53z",style:{fill:"teal",fillOpacity:1,strokeWidth:21.3333},transform:"matrix(.76586 0 0 .76586 60.6 635.326)"}),s.createElement("path",{d:"M354.098-343.647c-23.565 0-42.667-19.103-42.667-42.667s19.102-42.666 42.667-42.666c23.564 0 42.666 19.102 42.666 42.666 0 23.564-19.102 42.667-42.666 42.667z",style:{fill:"#ad0000",fillOpacity:1,strokeWidth:21.3333},transform:"matrix(.76586 0 0 .76586 60.6 635.326)"}))}},9133:(e,n,t)=>{t.d(n,{A:()=>i});var s=t(6540);function i(e){(0,s.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)}}()}),[])}},9227:(e,n,t)=>{t.r(n),t.d(n,{default:()=>F});var s=t(4164),i=t(4586),r=t(1107),o=t(5229),a=t(6540),c=t(3069),l=t(2303),d=t(5260),h=t(9133),m=t(1202);let p;function u(){const e=globalThis.$;e(".terminal-tooltip").remove();e(".term").terminal().destroy()}const f=[{description:"With LIPS you can mix Scheme and JavaScript. You can access all JavaScript objects. You can also call any functions from Scheme.\n\n**NOTE**: you can hover over Scheme symbols and get tooltip with documentation.",code:';; &() is object literal used with quasiquote\n(let ((obj `&(:name "LIPS Scheme"\n :version ,lips.version)))\n ;; you can access JavaScript properties\n ;; with dot notation, print is display + newline\n (print (string-append obj.name\n " "\n obj.version))\n ;; you can mix scheme and JavaScript\n (setTimeout (lambda ()\n (alert (JSON.stringify obj)))\n 1000)\n #void)'},{description:"Filter function accepts: regex or function. Curry is higher order function that creates a new function with default arguments. Pluck returns 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:"LIPS do automagic async/await. It resolve all promises by default, but you can quote a promise and handle it like in JavaScript.",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 because of automagic\n;; promise resolving\n(let ((msg (--\x3e (fetch "https://scheme.org.pl/test/")\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/test/")\n (then (lambda (res)\n (res.text)))\n (then (lambda (x)\n (. (x.match re) 1))))))\n (print (await promise)))'},{description:"You can use hygienic syntax-rules macro, here are also a 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:"LIPS also supports classic lisp macros. Here is example of anaphoric macro (a lambda shortcut)",code:"(define-macro (\u03bb . body)\n `(lambda ($1 $2 $3 $4 $5 $6 $7 $8 $8 $9) ,@body))\n\n(print (map (\u03bb (+ $1 1)) (range 10)))\n;; ==> (1 2 3 4 5 6 7 8 9 10)\n(let ((x 10))\n (print (map (\u03bb (+ $1 $2))\n (range x)\n (cdr (range (+ x 1))))))\n;; ==> (1 3 5 7 9 11 13 15 17 19)"},{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(write P:("jon"))\n(newline)\n;; ==> P:("jon")\n(print (. P:("jon") \'name))\n;; ==> "jon"'},{description:"With LIPS you can interact with JavaScript DOM and jQuery Terminal (REPL).",code:';; this will query the DOM and invoke click method\n(let ((selector "[class*=\\"colorModeToggle\\"] button"))\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:"Dynamic variables with R7RS parameterize",code:";; define new dynamic parameter\n(define x (make-parameter 10))\n(define (double-x)\n (* (x) (x)))\n;; use default value\n(print (double-x))\n;; ==> 100\n;; change the value dynamically\n(parameterize ((x 20))\n (print (double-x)))\n;; ==> 400\n"},{description:"Here is a 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:"Function that modify its source code when run",code:'(define (repeater x)\n "(repeater value)\n\n Function prints the value 1 time and modifies itself\n to repeat (+ n 1) times on the next call."\n (for-each (lambda () (print x)) (range 1))\n (let ((r (cadr (cdadddr (. repeater \'__code__)))))\n (set-cdr! r (list (+ (cadr r) 1)))))\n\n(print "1")\n(repeater \'hello)\n(print "2")\n(repeater \'hello)\n(print "3")\n(repeater \'hello)'},{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:"You can iterate over JavaScript generators (objects that implement iterator protocol)",code:';; JavaScript generator created 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:"Example of 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'},{hidden:!0,code:'(define-macro (%promisify expr)\n (let ((resolve (gensym "resolve")))\n `(new Promise\n (lambda (,resolve)\n ,(append expr (list resolve))))))\n\n(if (null? self.$.terminal.from_ansi)\n (%promisify ($.getScript "https://cdn.jsdelivr.net/npm/jquery.terminal/js/unix_formatting.js")))\n(if (null? self.qrcode)\n (%promisify ($.getScript "https://cdn.jsdelivr.net/gh/jcubic/static/js/qrcode.js")))\n(let ((code (%promisify (qrcode.generate "https://tinyurl.com/fxv87gb"))))\n (term.echo (code.replace #/\\[47m/g "[30;47m"))\n #void)'}];var x=t(4848);function j(e,n){const t=globalThis.umami,s=globalThis._paq;t&&t.track("REPL",[e,n]),s.push(["trackEvent","REPL",e,n])}const b=()=>globalThis.jQuery&&globalThis.jQuery.terminal&&globalThis.terminal&&globalThis.lips;function g(){const[e,n]=(0,a.useState)(0),[t,i]=(0,a.useState)(1),r=(0,a.useRef)(),o=!(0,l.A)()&&!globalThis.jQuery;function g(e){void 0===e&&(e=".example:visible");const n=globalThis.jQuery,t=n(e),s=t.text(),i=t.closest("li").index(),r=n(".term").terminal();r.echo(r.get_prompt(),{formatters:!1}),r.exec(s,!0),j("snippet",i+1),void 0===screen.orientation&&setTimeout((()=>r.focus()),0)}function y(e){return t=>{t.preventDefault(),n(e)}}function v(e){return n=>{n.preventDefault(),i((n=>n+e))}}(0,h.A)(!globalThis.jQuery&&["https://cdn.jsdelivr.net/npm/jquery","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/gh/jcubic/lips@devel/lib/js/terminal.js","https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/js/prism.js"]),(0,a.useLayoutEffect)((()=>(function e(){if(b()&&getComputedStyle(r.current).getPropertyValue("--base-background")){!function(e){const n=e.cmd().keymap("ENTER");e.cmd().keymap("ENTER",(function(t,s){return j("command",e.get_command()),n(t,s)}))}(function(){const e=globalThis.$;e.terminal.syntax("scheme");const n=e(".term");p||(p=n.html()),n.empty();const t=globalThis.terminal({selector:".term",dynamic:!1,name:"demo",lips:globalThis.lips});t.tooltips(e(".example"),(e=>e.text()),(function(e){const n=e.offset(),t=n.top,s=n.left;return{top:t,right:n.left+e.width(),left:s}}));const s=`(\u03bb LIPS) version ${globalThis.lips.version}\nCopyright (c) 2018-${(new Date).getFullYear()} [[!;;;;https://jcubic.pl/me]Jakub T. Jankiewicz]\n\nType (env) to see environment with functions macros and variables\nYou can also use (help obj)to display help for specific function or macro.\nUse (dir name) to get list of JavaScript properties and (apropos name)\nto display list of matched names in environment.`;return t.echo(s.replace(/(\((?:env|dir|help|apropos)[^)]*\))/g,(function(n){return e.terminal.prism("scheme",n,{echo:!0})})),{formatters:!1}),t}())}else setTimeout(e,100)}(),u)),[]);const w={"--size":t.toFixed(1)};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(d.A,{children:[(0,x.jsx)("link",{rel:"preconnect",href:"https://cdn.jsdelivr.net"}),(0,x.jsx)("link",{href:"https://cdn.jsdelivr.net/combine/npm/jquery.terminal/css/jquery.terminal.min.css,npm/terminal-prism@0.4.1/css/prism-coy.css",rel:"stylesheet"}),(0,x.jsx)("link",{href:"https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/css/terminal.css",rel:"stylesheet"}),o&&(0,x.jsx)("script",{src:"https://cdn.jsdelivr.net/npm/jquery"}),o&&(0,x.jsx)("script",{src:"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"}),o&&(0,x.jsx)("script",{src:"https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/js/terminal.js"}),o&&(0,x.jsx)("script",{src:"https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/js/prism.js"}),!globalThis.lips&&(0,x.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,x.jsxs)("div",{className:"intro",children:[(0,x.jsx)("div",{className:"actions-wrapper",children:(0,x.jsxs)("ul",{className:"actions",children:[(0,x.jsx)("li",{className:"zoom-in icon",children:(0,x.jsx)("a",{href:"#",onClick:v(.1),title:"Zoom In",children:"Zoom In"})}),(0,x.jsx)("li",{className:"zoom-out icon",children:(0,x.jsx)("a",{href:"#",onClick:v(-.1),title:"Zoom Out",children:"Zoom Out"})}),(0,x.jsx)("li",{className:"full-screen",children:(0,x.jsxs)("ul",{children:[(0,x.jsx)("li",{className:"full-screen icon",children:(0,x.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),(0,globalThis.jQuery)(document.body).addClass("full-screen")},title:"Full Screen",children:"Full Screen"})}),(0,x.jsx)("li",{className:"exit-full-screen icon",children:(0,x.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),(0,globalThis.jQuery)(document.body).removeClass("full-screen")},title:"Exit Full Screen",children:"Exit Full Screen"})})]})})]})}),(0,x.jsx)("div",{className:"terminal marker",ref:r}),(0,x.jsx)("div",{className:"term",style:w,children:(0,x.jsx)("div",{className:"loader-container",children:(0,x.jsxs)("div",{className:"loader",children:[(0,x.jsx)("div",{children:"."}),(0,x.jsx)("div",{children:".."}),(0,x.jsx)("div",{children:"..."}),(0,x.jsx)("div",{children:"...."}),(0,x.jsx)("div",{children:"....."}),(0,x.jsx)("div",{children:"......"})]})})}),(0,x.jsxs)("div",{className:"examples terminal-external",children:[(0,x.jsx)("div",{className:"egg",children:(0,x.jsx)("button",{onClick:()=>g("li.hidden .example"),children:"\u03c0"})}),(0,x.jsx)("button",{className:"run",onClick:()=>g(),children:"run"}),(0,x.jsx)("ul",{className:"list",children:f.map(((n,t)=>(0,x.jsxs)("li",{className:(0,s.A)({active:t===e,hidden:n.hidden}),children:[(0,x.jsx)("div",{className:"example",children:(0,x.jsx)(m.A,{language:"scheme",className:"lips",children:n.code})}),(0,x.jsx)("div",{className:"description",children:(0,x.jsx)(c.o,{children:n.description})})]},t)))}),(0,x.jsx)("ul",{className:"pagination",children:f.map(((n,t)=>(0,x.jsx)("li",{className:(0,s.A)({active:t===e,hidden:n.hidden}),children:(0,x.jsx)("a",{href:"#",onClick:y(t),children:t+1})},t)))})]})]})]})}const y={svg:"svg_V48x",tools:"tools_w5Qr",header:"header_ZcHJ"},v=t(8827).A;function w(){const e=(0,a.useRef)();return(0,a.useEffect)((()=>{fetch("https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/js/bookmark.js").then((function(e){return e.text()})).then((n=>{e.current&&(e.current.href=n)}))}),[e.current]),(0,x.jsx)("section",{id:"bookmark",children:(0,x.jsxs)("div",{className:"container",children:[(0,x.jsx)(v,{className:y.svg,role:"img"}),(0,x.jsx)(r.A,{as:"h3",children:"Bookmarklet"}),(0,x.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,x.jsx)("a",{id:"bookmark_link",ref:e,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,x.jsx)("p",{children:"The bookmark can also be used to add REPL to your LIPS Web application."})," ",(0,x.jsxs)("p",{children:["It may not work on sites that are protected with"," ",(0,x.jsx)("a",{href:"https://en.wikipedia.org/wiki/Content_Security_Policy",children:"Content Security Policy"}),". CSP was created mostly as a security solution to prevent"," ",(0,x.jsx)("abbr",{title:"Cross-site scripting",children:"XSS"})," vunerablities. You can disable this mechanism with ",(0,x.jsx)("a",{href:"http://tinyurl.com/CSP-disable",children:"Chrome Extension"}),", but you do this on your own risk."]})]})})}var k=t(8774);const S=t(7680).A;function N(){return(0,x.jsx)("section",{id:"bookmarklet",children:(0,x.jsxs)("div",{className:"container",children:[(0,x.jsx)(S,{className:y.svg,role:"img"}),(0,x.jsx)(r.A,{as:"h3",children:(0,x.jsx)(k.A,{to:"/screenshooter",children:"Screenshooter"})}),(0,x.jsx)("p",{children:"This tool allow you to create nice screenshot of code. The screenshot tool is aware of any syntax added on top of Scheme. The tool is created using Codemirror and custom style build on top of Scheme syntax."}),(0,x.jsx)("p",{children:"You can use this tool to generate snippets of Scheme or LIPS Code and share it on social media."})]})})}function _(){return(0,x.jsxs)("div",{className:y.tools,children:[(0,x.jsx)(r.A,{as:"h2",id:"tools",className:y.header,children:"Tools"}),(0,x.jsx)(w,{}),(0,x.jsx)(N,{})]})}const P="1.0.0-beta.19";function L(){return(0,x.jsx)("span",{children:P})}const C={section:"section_nB9V",header:"header_bEBW"};function B(){return(0,x.jsxs)("div",{className:C.section,children:[(0,x.jsx)(r.A,{as:"h2",id:"acknowledgment",className:C.header,children:"Acknowledgments"}),(0,x.jsxs)("ul",{children:[(0,x.jsxs)("li",{children:["Font used in logo is ",(0,x.jsx)("a",{href:"https://www.dafont.com/telegrafico.font",children:"Telegrafico"})," by ",(0,x.jsx)("a",{href:"https://www.deviantart.com/ficod",children:"ficod"}),"."]}),(0,x.jsxs)("li",{children:["Current Parser is inspired by implementation in ",(0,x.jsx)("a",{href:"https://www.biwascheme.org/",children:"BiwaScheme"})," by Yutaka HARA (yhara)."]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("code",{children:"fetch"})," polyfill use ",(0,x.jsx)("a",{href:"https://github.com/developit/unfetch",children:"unfetch"})," by Jason Miller."]}),(0,x.jsxs)("li",{children:["Browser ",(0,x.jsx)("code",{children:"init"})," function use ",(0,x.jsx)("a",{href:"http://javascript.nwbox.com/ContentLoaded/",children:"ContentLoaded"}),"."]}),(0,x.jsxs)("li",{children:["The rationalize algorithm is based on ",(0,x.jsx)("a",{href:"https://www.gnu.org/software/kawa/index.html",children:"Kawa Scheme"})," by Per M.A. Bothner, Alan Bawden and Marc Feeley."]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("code",{children:"ucs2decode"})," function taken from ",(0,x.jsx)("a",{href:"https://github.com/bestiejs/punycode.js",children:"punycode.js"})," by ",(0,x.jsx)("a",{href:"https://mathiasbynens.be/",children:"Mathias Bynens"}),"."]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://rosettacode.org/",children:"Rosetta Code"})," was used for:",(0,x.jsxs)("ul",{dir:"auto",children:[(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://rosettacode.org/wiki/Greatest_common_divisor#JavaScript",children:"gdc"}),","]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://rosettacode.org/wiki/Least_common_multiple#JavaScript",children:"lcm"}),","]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://rosettacode.org/wiki/Convert_decimal_number_to_rational",children:"LFloat::toRational"}),"."]})]})]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://stackoverflow.com",children:"StackOverlow"})," code was used for functions:",(0,x.jsxs)("ul",{dir:"auto",children:[(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://stackoverflow.com/a/10372280/387194",children:"fworker"}),","]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://stackoverflow.com/a/27282907/387194",children:"flatten"}),","]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://stackoverflow.com/a/4331218/387194",children:"allPossibleCases"}),"."]})]})]}),(0,x.jsxs)("li",{children:["Code formatter is roughly based on ",(0,x.jsx)("a",{href:"http://community.schemewiki.org/?scheme-style",children:"scheme-style"})," and GNU Emacs scheme mode."]}),(0,x.jsxs)("li",{children:["Some helpers in standard library are inspired by same functions from ",(0,x.jsx)("a",{href:"https://ramdajs.com/",children:"RamdaJS library"}),"."]}),(0,x.jsxs)("li",{children:["Special thanks to ",(0,x.jsx)("a",{href:"https://github.com/lassik",children:"Lassi Kortela"})," for helping with Scheme code."]})]})]})}function T(){return(0,x.jsxs)("div",{className:C.section,children:[(0,x.jsx)(r.A,{as:"h2",id:"license",className:C.header,children:"License"}),(0,x.jsxs)("p",{children:["LIPS Scheme is ",(0,x.jsx)("a",{href:"https://opensource.com/resources/what-open-source",children:"Open Source"})," ","and released on ",(0,x.jsx)("a",{href:"https://github.com/jcubic/lips/blob/master/LICENSE",children:"MIT license"})]})]})}function A(){return(0,x.jsxs)("div",{className:C.section,id:"video",children:[(0,x.jsx)(r.A,{as:"h2",id:"video",className:C.header,children:"Video Presentation about LIPS Scheme"}),(0,x.jsxs)("p",{children:["Video presentation given during ",(0,x.jsx)("a",{href:"https://archive.fosdem.org/2023/",children:"FOSDEM 2023"})," in ",(0,x.jsx)("a",{href:"https://archive.fosdem.org/2023/schedule/track/declarative_and_minimalistic_computing/",children:"Declarative and Minimalistic Computing devroom"}),". It discuss different aspect of LIPS Scheme. It first gives quick intro to Lisp and Scheme and later show different features of LIPS Scheme."]}),(0,x.jsxs)("video",{controls:!0,preload:"none",poster:"./img/fosdem-intro.png",children:[(0,x.jsx)("source",{src:"https://video.fosdem.org/2023/D.minimalistic/lipsscheme.webm",type:'video/webm; codecs="vp9, opus"'}),(0,x.jsx)("source",{src:"https://video.fosdem.org/2023/D.minimalistic/lipsscheme.mp4",type:"video/mp4"})]})]})}function E(){return(0,x.jsxs)("div",{className:C.section,children:[(0,x.jsx)(r.A,{as:"h2",id:"summary",className:C.header,children:"Summary"}),(0,x.jsxs)("p",{children:["LIPS Scheme is powerful lisp interpreter written in JavaScript. The aim of the project is to fully support ",(0,x.jsx)("a",{href:"https://standards.scheme.org/#r7rs",children:"R7RS"})," specification of Scheme Programming Language. But add more powerful features on top."]}),(0,x.jsxs)("p",{children:["The name LIPS is recursive acronym which stands for ",(0,x.jsx)("strong",{children:"LIPS Is Pretty Simple"}),". Over time the project may no longer be that simple in implementation but it always be LIPS."]}),(0,x.jsx)(r.A,{as:"h2",id:"features",className:C.header,children:"Features"}),(0,x.jsx)("p",{children:"Most important features of LIPS:"}),(0,x.jsxs)("ul",{children:[(0,x.jsx)("li",{children:"Great integration with JavaScript. You can use any JS library out of the box."}),(0,x.jsx)("li",{children:"Asynchronous execution (auto resolving of promises with optional promise quotation)."}),(0,x.jsx)("li",{children:"Literal regular expression."}),(0,x.jsxs)("li",{children:["Functional helpers (inspired by ",(0,x.jsx)("a",{href:"https://ramdajs.com/",children:"RamdaJS"})," and ",(0,x.jsx)("a",{href:"https://lodash.com/",children:"Lodash"}),")."]}),(0,x.jsx)("li",{children:"Possibility modify the parser at runtime (add new syntax, similar to vectors and object)."}),(0,x.jsx)("li",{children:"Possibility to set representation of new data types for write and display. With parser extensions you can make new data types have different syntax and still be homoicoic."}),(0,x.jsx)("li",{children:"Small JavaScript core with Standard Library implemented in basic Scheme."}),(0,x.jsx)("li",{children:"Full support of Unicode and Emoji."}),(0,x.jsxs)("li",{children:["Support for ",(0,x.jsx)("a",{href:"https://en.wikipedia.org/wiki/SXML",children:"SXML"}),", that allow to write ",(0,x.jsx)("a",{href:"https://en.wikipedia.org/wiki/JSX_(JavaScript)",children:"JSX"})," e.g. with ",(0,x.jsx)("a",{href:"https://preactjs.com/",children:"Preact"})," or ",(0,x.jsx)("a",{href:"https://react.dev/",children:"React"})," apps."]}),(0,x.jsxs)("li",{children:["I/O Ports supports in browser with ",(0,x.jsx)("a",{href:"https://github.com/jvilk/BrowserFS",children:"BrowserFS"}),"."]}),(0,x.jsxs)("li",{children:["Full numerical tower and Big Integer support (still ",(0,x.jsx)("a",{href:"https://github.com/jcubic/lips/issues/34",children:"not 100% fully unit tested"}),")."]}),(0,x.jsx)("li",{children:"Powerful introspection (similar to the one in Python)."}),(0,x.jsx)("li",{children:"Auto formatting of lisp code (pretty print)."}),(0,x.jsx)("li",{children:"Lisp/hygienic macros and macroexpand."}),(0,x.jsx)("li",{children:"Builtin help system."})]})]})}var I=t(5648);function q(){const{siteConfig:e}=(0,i.A)();return(0,x.jsx)("header",{className:(0,s.A)("hero hero--primary",I.A.heroBanner),children:(0,x.jsxs)("div",{className:"container",children:[(0,x.jsxs)(r.A,{as:"h1",className:"hero__title",children:[e.title," v.\xa0",(0,x.jsx)(L,{})]}),(0,x.jsx)("p",{className:"hero__subtitle",children:e.tagline}),(0,x.jsx)("p",{className:I.A.hidden,children:"Scheme Language Online REPL"}),(0,x.jsx)(g,{})]})})}function F(){const{siteConfig:e}=(0,i.A)();return(0,x.jsxs)(o.A,{title:"Powerful Scheme interpreter in JavaScript",description:e.tagline,children:[(0,x.jsx)(q,{}),(0,x.jsxs)("main",{children:[(0,x.jsx)(E,{}),(0,x.jsx)(_,{}),(0,x.jsx)(A,{}),(0,x.jsx)(B,{}),(0,x.jsx)(T,{})]})]})}},1202:(e,n,t)=>{t.d(n,{A:()=>C});var s=t(6540),i=t(2303),r=t(4164),o=t(7559);const a={codeBlockContainer:"codeBlockContainer_APcc"};var c=t(4848);function l(e){let{as:n,...t}=e;return(0,c.jsx)(n,{...t,className:(0,r.A)(t.className,a.codeBlockContainer,o.G.common.codeBlock)})}const d={codeBlockContent:"codeBlockContent_m3Ux",codeBlockTitle:"codeBlockTitle_P25_",codeBlock:"codeBlock_qGQc",codeBlockStandalone:"codeBlockStandalone_zC50",codeBlockLines:"codeBlockLines_p187",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_OFgW",buttonGroup:"buttonGroup_6DOT"};function h(e){let{children:n,className:t}=e;return(0,c.jsx)(l,{as:"pre",tabIndex:0,className:(0,r.A)(d.codeBlockStandalone,"thin-scrollbar",t),children:(0,c.jsx)("code",{className:d.codeBlockLines,children:n})})}var m=t(6342),p=t(6058),u=t(4291),f=t(6591),x=t(1765);const j={codeLine:"codeLine_iPqp",codeLineNumber:"codeLineNumber_F4P7",codeLineContent:"codeLineContent_pOih"};function b(e){let{line:n,classNames:t,showLineNumbers:s,getLineProps:i,getTokenProps:o}=e;1===n.length&&"\n"===n[0].content&&(n[0].content="");const a=i({line:n,className:(0,r.A)(t,s&&j.codeLine)}),l=n.map(((e,n)=>(0,c.jsx)("span",{...o({token:e,key:n})},n)));return(0,c.jsxs)("span",{...a,children:[s?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:j.codeLineNumber}),(0,c.jsx)("span",{className:j.codeLineContent,children:l})]}):l,"\n"]})}var g=t(6861),y=t(1312),v=t(1473),w=t(4115);const k={copyButtonCopied:"copyButtonCopied__QnY",copyButtonIcons:"copyButtonIcons_FhaS",copyButtonIcon:"copyButtonIcon_phi_",copyButtonSuccessIcon:"copyButtonSuccessIcon_FfTR"};function S(e){let{code:n,className:t}=e;const[i,o]=(0,s.useState)(!1),a=(0,s.useRef)(void 0),l=(0,s.useCallback)((()=>{(0,g.A)(n),o(!0),a.current=window.setTimeout((()=>{o(!1)}),1e3)}),[n]);return(0,s.useEffect)((()=>()=>window.clearTimeout(a.current)),[]),(0,c.jsx)("button",{type:"button","aria-label":i?(0,y.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,y.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,y.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,r.A)("clean-btn",t,k.copyButton,i&&k.copyButtonCopied),onClick:l,children:(0,c.jsxs)("span",{className:k.copyButtonIcons,"aria-hidden":"true",children:[(0,c.jsx)(v.A,{className:k.copyButtonIcon}),(0,c.jsx)(w.A,{className:k.copyButtonSuccessIcon})]})})}var N=t(5048);const _={wordWrapButtonIcon:"wordWrapButtonIcon_iowe",wordWrapButtonEnabled:"wordWrapButtonEnabled_gY8A"};function P(e){let{className:n,onClick:t,isEnabled:s}=e;const i=(0,y.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,c.jsx)("button",{type:"button",onClick:t,className:(0,r.A)("clean-btn",n,s&&_.wordWrapButtonEnabled),"aria-label":i,title:i,children:(0,c.jsx)(N.A,{className:_.wordWrapButtonIcon,"aria-hidden":"true"})})}function L(e){let{children:n,className:t="",metastring:s,title:i,showLineNumbers:r,language:o}=e;const{prism:{defaultLanguage:a,magicComments:l}}=(0,m.p)(),h=function(e){return e?.toLowerCase()}(o??(0,u.Op)(t)??a),j=(0,p.A)(),g=(0,f.f)(),y=(0,u.wt)(s)||i,{lineClassNames:v,code:w}=(0,u.Li)(n,{metastring:s,language:h,magicComments:l}),k=r??(0,u._u)(s);return(0,c.jsxs)("div",{children:[y&&(0,c.jsx)("div",{className:d.codeBlockTitle,children:y}),(0,c.jsxs)("div",{children:[(0,c.jsx)(x.f4,{theme:j,code:w,language:h??"text",children:e=>{let{className:n,style:s,tokens:i,getLineProps:r,getTokenProps:o}=e;return(0,c.jsx)("pre",{tabIndex:0,ref:g.codeBlockRef,children:(0,c.jsx)("code",{children:i.map(((e,n)=>{return(0,c.jsx)(b,{line:e,getLineProps:r,getTokenProps:t.match(/lips/)?(s=o,function(){const{style:e,...n}=s(...arguments);return n}):o,classNames:v[n],showLineNumbers:k},n);var s}))})})}}),(0,c.jsxs)("div",{className:d.buttonGroup,children:[(g.isEnabled||g.isCodeScrollable)&&(0,c.jsx)(P,{className:d.codeButton,onClick:()=>g.toggle(),isEnabled:g.isEnabled}),(0,c.jsx)(S,{className:d.codeButton,code:w})]})]})]})}function C(e){let{children:n,...t}=e;const r=(0,i.A)(),o=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(n),a="string"==typeof o?L:h;return(0,c.jsx)(a,{...t,children:o},String(r))}},5648:(e,n,t)=>{t.d(n,{A:()=>s});const s={heroBanner:"heroBanner_qdFl",buttons:"buttons_AeoN",container:"container_bfhl",header:"header_gB2a",hidden:"hidden_zUxV"}}}]); \ No newline at end of file diff --git a/assets/js/1df93b7f.1d11552d.js b/assets/js/1df93b7f.1d11552d.js deleted file mode 100644 index 238c28a2..00000000 --- a/assets/js/1df93b7f.1d11552d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunknew_docs=self.webpackChunknew_docs||[]).push([[4583],{8827:(e,n,t)=>{t.d(n,{A:()=>r});var s=t(6540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n{let{title:n,titleId:t,...r}=e;return s.createElement("svg",i({width:800,height:800,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t},r),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"}})))}},7680:(e,n,t)=>{t.d(n,{A:()=>r});var s=t(6540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n{let{title:n,titleId:t,...r}=e;return s.createElement("svg",i({width:800,height:800,viewBox:"0 0 512 512",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t},r),n?s.createElement("title",{id:t},n):null,s.createElement("path",{style:{fontWeight:700,fontSize:"153.432px",lineHeight:1.25,fontFamily:"Monospace",InkscapeFontSpecification:"'Monospace Bold'",letterSpacing:0,wordSpacing:0,fill:"teal",fillOpacity:1,strokeWidth:5.04996},d:"M260.887 104.259q9.757 12.301 14.847 27.997 5.09 15.554 5.09 33.653 0 18.24-5.231 34.218-5.09 15.978-14.706 28.421h-16.826q9.473-13.432 14.14-29.27 4.807-15.977 4.807-33.228 0-16.826-4.807-32.522-4.808-15.695-13.999-29.27z",transform:"translate(3.07 6.275)"}),s.createElement("path",{style:{fontWeight:700,fontSize:"153.432px",lineHeight:1.25,fontFamily:"Monospace",InkscapeFontSpecification:"'Monospace Bold'",letterSpacing:0,wordSpacing:0,fill:"#ad0000",fillOpacity:1,strokeWidth:5.04996},d:"M208.145 223.206q-5.373 0-9.05-1.98-3.534-2.12-5.797-5.514-2.12-3.535-3.393-7.777l-5.939-19.796q-.848-2.828-1.697-5.797-.848-3.11-1.555-5.939-.566-2.97-.849-5.09h-.424q-.99 4.1-2.545 8.908-1.555 4.666-2.545 7.494l-12.16 34.077h-20.928L171.1 148.69l-2.545-6.787q-2.687-7.494-6.08-9.474-3.394-1.98-8.485-1.98-2.686 0-4.524.283-1.839.283-3.253.566v-16.685q1.98-.424 5.232-.707 3.394-.424 6.505-.424 8.484 0 14.14 2.828 5.655 2.828 9.332 8.342 3.676 5.373 6.08 13.433l17.11 56.277q1.696 5.515 3.534 8.484 1.838 2.828 3.677 3.818 1.98.99 3.959.99 1.131 0 2.262-.142 1.273-.283 2.404-.566v14.14q-1.131.566-3.252.99-2.121.566-4.525.849-2.404.282-4.525.282z",transform:"translate(3.07 6.275)"}),s.createElement("path",{style:{fontWeight:700,fontSize:"153.432px",lineHeight:1.25,fontFamily:"Monospace",InkscapeFontSpecification:"'Monospace Bold'",letterSpacing:0,wordSpacing:0,fill:"teal",fillOpacity:1,strokeWidth:5.04996},d:"M99.975 228.548q-9.757-12.301-14.847-27.997-5.09-15.695-5.09-33.653 0-18.24 5.09-34.218 5.232-15.978 14.847-28.421H116.8q-9.473 13.432-14.281 29.41-4.666 15.837-4.666 33.088 0 16.827 4.807 32.522 4.95 15.695 13.999 29.27z",transform:"translate(3.07 6.275)"}),s.createElement("path",{d:"M55.284 33.203c-18.047 0-32.677 14.63-32.677 32.677v367.69c0 18.046 14.63 32.676 32.677 32.676h395.292c18.047 0 32.677-14.63 32.677-32.677V65.88c0-18.047-14.63-32.677-32.677-32.677zm0 32.677h395.292v367.69H55.284Z",style:{fill:"teal",fillOpacity:1,strokeWidth:16.3384},transform:"translate(3.07 6.275)"}),s.createElement("path",{d:"M332.764-496.607c-15.35 0-28.302 6.524-38.734 16.804a75.53 75.53 0 0 0-4.237 4.528h-12.495c-28.619 0-51.2 24.195-51.2 53.334v85.334c0 29.139 22.581 53.332 51.2 53.332h153.6c28.618 0 51.2-24.193 51.2-53.332v-85.334c0-29.139-22.582-53.334-51.2-53.334h-12.495a75.55 75.55 0 0 0-4.238-4.528c-10.432-10.28-23.384-16.804-38.734-16.804zm0 42.666h42.667c2.76 0 5.69 1.476 8.789 4.53 2.296 2.262 3.883 4.558 4.36 5.458l6.011 11.346h36.307c4.37 0 8.533 4.459 8.533 10.666v85.334c0 6.207-4.162 10.666-8.533 10.666h-153.6c-4.372 0-8.534-4.459-8.534-10.666v-85.334c0-6.207 4.162-10.666 8.534-10.666h36.306l6.011-11.346c.477-.9 2.064-3.196 4.36-5.458 3.1-3.054 6.028-4.53 8.789-4.53z",style:{fill:"teal",fillOpacity:1,strokeWidth:21.3333},transform:"matrix(.76586 0 0 .76586 60.6 635.326)"}),s.createElement("path",{d:"M354.098-343.647c-23.565 0-42.667-19.103-42.667-42.667s19.102-42.666 42.667-42.666c23.564 0 42.666 19.102 42.666 42.666 0 23.564-19.102 42.667-42.666 42.667z",style:{fill:"#ad0000",fillOpacity:1,strokeWidth:21.3333},transform:"matrix(.76586 0 0 .76586 60.6 635.326)"}))}},9133:(e,n,t)=>{t.d(n,{A:()=>i});var s=t(6540);function i(e){(0,s.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)}}()}),[])}},9227:(e,n,t)=>{t.r(n),t.d(n,{default:()=>F});var s=t(4164),i=t(4586),r=t(1107),o=t(5229),a=t(6540),c=t(3069),l=t(2303),d=t(5260),h=t(9133),m=t(1202);let p;function u(){const e=globalThis.$;e(".terminal-tooltip").remove();e(".term").terminal().destroy()}const f=[{description:"With LIPS you can mix Scheme and JavaScript. You can access all JavaScript objects. You can also call any functions from Scheme.\n\n**NOTE**: you can hover over Scheme symbols and get tooltip with documentation.",code:';; &() is object literal used with quasiquote\n(let ((obj `&(:name "LIPS Scheme"\n :version ,lips.version)))\n ;; you can access JavaScript properties\n ;; with dot notation, print is display + newline\n (print (string-append obj.name\n " "\n obj.version))\n ;; you can mix scheme and JavaScript\n (setTimeout (lambda ()\n (alert (JSON.stringify obj)))\n 1000)\n #void)'},{description:"Filter function accepts: regex or function. Curry is higher order function that creates a new function with default arguments. Pluck returns 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:"LIPS do automagic async/await. It resolve all promises by default, but you can quote a promise and handle it like in JavaScript.",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 because of automagic\n;; promise resolving\n(let ((msg (--\x3e (fetch "https://scheme.org.pl/test/")\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/test/")\n (then (lambda (res)\n (res.text)))\n (then (lambda (x)\n (. (x.match re) 1))))))\n (print (await promise)))'},{description:"You can use hygienic syntax-rules macro, here are also a 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:"LIPS also supports classic lisp macros. Here is example of anaphoric macro (a lambda shortcut)",code:"(define-macro (\u03bb . body)\n `(lambda ($1 $2 $3 $4 $5 $6 $7 $8 $8 $9) ,@body))\n\n(print (map (\u03bb (+ $1 1)) (range 10)))\n;; ==> (1 2 3 4 5 6 7 8 9 10)\n(let ((x 10))\n (print (map (\u03bb (+ $1 $2))\n (range x)\n (cdr (range (+ x 1))))))\n;; ==> (1 3 5 7 9 11 13 15 17 19)"},{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(write P:("jon"))\n(newline)\n;; ==> P:("jon")\n(print (. P:("jon") \'name))\n;; ==> "jon"'},{description:"With LIPS you can interact with JavaScript DOM and jQuery Terminal (REPL).",code:';; this will query the DOM and invoke click method\n(let ((selector "[class*=\\"colorModeToggle\\"] button"))\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:"Dynamic variables with R7RS parameterize",code:";; define new dynamic parameter\n(define x (make-parameter 10))\n(define (double-x)\n (* (x) (x)))\n;; use default value\n(print (double-x))\n;; ==> 100\n;; change the value dynamically\n(parameterize ((x 20))\n (print (double-x)))\n;; ==> 400\n"},{description:"Here is a 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:"Function that modify its source code when run",code:'(define (repeater x)\n "(repeater value)\n\n Function prints the value 1 time and modifies itself\n to repeat (+ n 1) times on the next call."\n (for-each (lambda () (print x)) (range 1))\n (let ((r (cadr (cdadddr (. repeater \'__code__)))))\n (set-cdr! r (list (+ (cadr r) 1)))))\n\n(print "1")\n(repeater \'hello)\n(print "2")\n(repeater \'hello)\n(print "3")\n(repeater \'hello)'},{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:"You can iterate over JavaScript generators (objects that implement iterator protocol)",code:';; JavaScript generator created 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:"Example of 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'},{hidden:!0,code:'(define-macro (%promisify expr)\n (let ((resolve (gensym "resolve")))\n `(new Promise\n (lambda (,resolve)\n ,(append expr (list resolve))))))\n\n(if (null? self.$.terminal.from_ansi)\n (%promisify ($.getScript "https://cdn.jsdelivr.net/npm/jquery.terminal/js/unix_formatting.js")))\n(if (null? self.qrcode)\n (%promisify ($.getScript "https://cdn.jsdelivr.net/gh/jcubic/static/js/qrcode.js")))\n(let ((code (%promisify (qrcode.generate "https://tinyurl.com/fxv87gb"))))\n (term.echo (code.replace #/\\[47m/g "[30;47m"))\n #void)'}];var x=t(4848);function j(e,n){const t=globalThis.umami,s=globalThis._paq;t&&t.track("REPL",{type:e,command:n}),s.push(["trackEvent","REPL",e,n])}const b=()=>globalThis.jQuery&&globalThis.jQuery.terminal&&globalThis.terminal&&globalThis.lips;function g(){const[e,n]=(0,a.useState)(0),[t,i]=(0,a.useState)(1),r=(0,a.useRef)(),o=!(0,l.A)()&&!globalThis.jQuery;function g(e){void 0===e&&(e=".example:visible");const n=globalThis.jQuery,t=n(e),s=t.text(),i=t.closest("li").index(),r=n(".term").terminal();r.echo(r.get_prompt(),{formatters:!1}),r.exec(s,!0),j("snippet",i+1),void 0===screen.orientation&&setTimeout((()=>r.focus()),0)}function y(e){return t=>{t.preventDefault(),n(e)}}function v(e){return n=>{n.preventDefault(),i((n=>n+e))}}(0,h.A)(!globalThis.jQuery&&["https://cdn.jsdelivr.net/npm/jquery","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/gh/jcubic/lips@devel/lib/js/terminal.js","https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/js/prism.js"]),(0,a.useLayoutEffect)((()=>(function e(){if(b()&&getComputedStyle(r.current).getPropertyValue("--base-background")){!function(e){const n=e.cmd().keymap("ENTER");e.cmd().keymap("ENTER",(function(t,s){return j("command",e.get_command()),n(t,s)}))}(function(){const e=globalThis.$;e.terminal.syntax("scheme");const n=e(".term");p||(p=n.html()),n.empty();const t=globalThis.terminal({selector:".term",dynamic:!1,name:"demo",lips:globalThis.lips});t.tooltips(e(".example"),(e=>e.text()),(function(e){const n=e.offset(),t=n.top,s=n.left;return{top:t,right:n.left+e.width(),left:s}}));const s=`(\u03bb LIPS) version ${globalThis.lips.version}\nCopyright (c) 2018-${(new Date).getFullYear()} [[!;;;;https://jcubic.pl/me]Jakub T. Jankiewicz]\n\nType (env) to see environment with functions macros and variables\nYou can also use (help obj)to display help for specific function or macro.\nUse (dir name) to get list of JavaScript properties and (apropos name)\nto display list of matched names in environment.`;return t.echo(s.replace(/(\((?:env|dir|help|apropos)[^)]*\))/g,(function(n){return e.terminal.prism("scheme",n,{echo:!0})})),{formatters:!1}),t}())}else setTimeout(e,100)}(),u)),[]);const w={"--size":t.toFixed(1)};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(d.A,{children:[(0,x.jsx)("link",{rel:"preconnect",href:"https://cdn.jsdelivr.net"}),(0,x.jsx)("link",{href:"https://cdn.jsdelivr.net/combine/npm/jquery.terminal/css/jquery.terminal.min.css,npm/terminal-prism@0.4.1/css/prism-coy.css",rel:"stylesheet"}),(0,x.jsx)("link",{href:"https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/css/terminal.css",rel:"stylesheet"}),o&&(0,x.jsx)("script",{src:"https://cdn.jsdelivr.net/npm/jquery"}),o&&(0,x.jsx)("script",{src:"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"}),o&&(0,x.jsx)("script",{src:"https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/js/terminal.js"}),o&&(0,x.jsx)("script",{src:"https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/js/prism.js"}),!globalThis.lips&&(0,x.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,x.jsxs)("div",{className:"intro",children:[(0,x.jsx)("div",{className:"actions-wrapper",children:(0,x.jsxs)("ul",{className:"actions",children:[(0,x.jsx)("li",{className:"zoom-in icon",children:(0,x.jsx)("a",{href:"#",onClick:v(.1),title:"Zoom In",children:"Zoom In"})}),(0,x.jsx)("li",{className:"zoom-out icon",children:(0,x.jsx)("a",{href:"#",onClick:v(-.1),title:"Zoom Out",children:"Zoom Out"})}),(0,x.jsx)("li",{className:"full-screen",children:(0,x.jsxs)("ul",{children:[(0,x.jsx)("li",{className:"full-screen icon",children:(0,x.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),(0,globalThis.jQuery)(document.body).addClass("full-screen")},title:"Full Screen",children:"Full Screen"})}),(0,x.jsx)("li",{className:"exit-full-screen icon",children:(0,x.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),(0,globalThis.jQuery)(document.body).removeClass("full-screen")},title:"Exit Full Screen",children:"Exit Full Screen"})})]})})]})}),(0,x.jsx)("div",{className:"terminal marker",ref:r}),(0,x.jsx)("div",{className:"term",style:w,children:(0,x.jsx)("div",{className:"loader-container",children:(0,x.jsxs)("div",{className:"loader",children:[(0,x.jsx)("div",{children:"."}),(0,x.jsx)("div",{children:".."}),(0,x.jsx)("div",{children:"..."}),(0,x.jsx)("div",{children:"...."}),(0,x.jsx)("div",{children:"....."}),(0,x.jsx)("div",{children:"......"})]})})}),(0,x.jsxs)("div",{className:"examples terminal-external",children:[(0,x.jsx)("div",{className:"egg",children:(0,x.jsx)("button",{onClick:()=>g("li.hidden .example"),children:"\u03c0"})}),(0,x.jsx)("button",{className:"run",onClick:()=>g(),children:"run"}),(0,x.jsx)("ul",{className:"list",children:f.map(((n,t)=>(0,x.jsxs)("li",{className:(0,s.A)({active:t===e,hidden:n.hidden}),children:[(0,x.jsx)("div",{className:"example",children:(0,x.jsx)(m.A,{language:"scheme",className:"lips",children:n.code})}),(0,x.jsx)("div",{className:"description",children:(0,x.jsx)(c.o,{children:n.description})})]},t)))}),(0,x.jsx)("ul",{className:"pagination",children:f.map(((n,t)=>(0,x.jsx)("li",{className:(0,s.A)({active:t===e,hidden:n.hidden}),children:(0,x.jsx)("a",{href:"#",onClick:y(t),children:t+1})},t)))})]})]})]})}const y={svg:"svg_V48x",tools:"tools_w5Qr",header:"header_ZcHJ"},v=t(8827).A;function w(){const e=(0,a.useRef)();return(0,a.useEffect)((()=>{fetch("https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/js/bookmark.js").then((function(e){return e.text()})).then((n=>{e.current&&(e.current.href=n)}))}),[e.current]),(0,x.jsx)("section",{id:"bookmark",children:(0,x.jsxs)("div",{className:"container",children:[(0,x.jsx)(v,{className:y.svg,role:"img"}),(0,x.jsx)(r.A,{as:"h3",children:"Bookmarklet"}),(0,x.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,x.jsx)("a",{id:"bookmark_link",ref:e,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,x.jsx)("p",{children:"The bookmark can also be used to add REPL to your LIPS Web application."})," ",(0,x.jsxs)("p",{children:["It may not work on sites that are protected with"," ",(0,x.jsx)("a",{href:"https://en.wikipedia.org/wiki/Content_Security_Policy",children:"Content Security Policy"}),". CSP was created mostly as a security solution to prevent"," ",(0,x.jsx)("abbr",{title:"Cross-site scripting",children:"XSS"})," vunerablities. You can disable this mechanism with ",(0,x.jsx)("a",{href:"http://tinyurl.com/CSP-disable",children:"Chrome Extension"}),", but you do this on your own risk."]})]})})}var k=t(8774);const S=t(7680).A;function N(){return(0,x.jsx)("section",{id:"bookmarklet",children:(0,x.jsxs)("div",{className:"container",children:[(0,x.jsx)(S,{className:y.svg,role:"img"}),(0,x.jsx)(r.A,{as:"h3",children:(0,x.jsx)(k.A,{to:"/screenshooter",children:"Screenshooter"})}),(0,x.jsx)("p",{children:"This tool allow you to create nice screenshot of code. The screenshot tool is aware of any syntax added on top of Scheme. The tool is created using Codemirror and custom style build on top of Scheme syntax."}),(0,x.jsx)("p",{children:"You can use this tool to generate snippets of Scheme or LIPS Code and share it on social media."})]})})}function _(){return(0,x.jsxs)("div",{className:y.tools,children:[(0,x.jsx)(r.A,{as:"h2",id:"tools",className:y.header,children:"Tools"}),(0,x.jsx)(w,{}),(0,x.jsx)(N,{})]})}const P="1.0.0-beta.19";function L(){return(0,x.jsx)("span",{children:P})}const C={section:"section_nB9V",header:"header_bEBW"};function B(){return(0,x.jsxs)("div",{className:C.section,children:[(0,x.jsx)(r.A,{as:"h2",id:"acknowledgment",className:C.header,children:"Acknowledgments"}),(0,x.jsxs)("ul",{children:[(0,x.jsxs)("li",{children:["Font used in logo is ",(0,x.jsx)("a",{href:"https://www.dafont.com/telegrafico.font",children:"Telegrafico"})," by ",(0,x.jsx)("a",{href:"https://www.deviantart.com/ficod",children:"ficod"}),"."]}),(0,x.jsxs)("li",{children:["Current Parser is inspired by implementation in ",(0,x.jsx)("a",{href:"https://www.biwascheme.org/",children:"BiwaScheme"})," by Yutaka HARA (yhara)."]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("code",{children:"fetch"})," polyfill use ",(0,x.jsx)("a",{href:"https://github.com/developit/unfetch",children:"unfetch"})," by Jason Miller."]}),(0,x.jsxs)("li",{children:["Browser ",(0,x.jsx)("code",{children:"init"})," function use ",(0,x.jsx)("a",{href:"http://javascript.nwbox.com/ContentLoaded/",children:"ContentLoaded"}),"."]}),(0,x.jsxs)("li",{children:["The rationalize algorithm is based on ",(0,x.jsx)("a",{href:"https://www.gnu.org/software/kawa/index.html",children:"Kawa Scheme"})," by Per M.A. Bothner, Alan Bawden and Marc Feeley."]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("code",{children:"ucs2decode"})," function taken from ",(0,x.jsx)("a",{href:"https://github.com/bestiejs/punycode.js",children:"punycode.js"})," by ",(0,x.jsx)("a",{href:"https://mathiasbynens.be/",children:"Mathias Bynens"}),"."]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://rosettacode.org/",children:"Rosetta Code"})," was used for:",(0,x.jsxs)("ul",{dir:"auto",children:[(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://rosettacode.org/wiki/Greatest_common_divisor#JavaScript",children:"gdc"}),","]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://rosettacode.org/wiki/Least_common_multiple#JavaScript",children:"lcm"}),","]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://rosettacode.org/wiki/Convert_decimal_number_to_rational",children:"LFloat::toRational"}),"."]})]})]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://stackoverflow.com",children:"StackOverlow"})," code was used for functions:",(0,x.jsxs)("ul",{dir:"auto",children:[(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://stackoverflow.com/a/10372280/387194",children:"fworker"}),","]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://stackoverflow.com/a/27282907/387194",children:"flatten"}),","]}),(0,x.jsxs)("li",{children:[(0,x.jsx)("a",{href:"https://stackoverflow.com/a/4331218/387194",children:"allPossibleCases"}),"."]})]})]}),(0,x.jsxs)("li",{children:["Code formatter is roughly based on ",(0,x.jsx)("a",{href:"http://community.schemewiki.org/?scheme-style",children:"scheme-style"})," and GNU Emacs scheme mode."]}),(0,x.jsxs)("li",{children:["Some helpers in standard library are inspired by same functions from ",(0,x.jsx)("a",{href:"https://ramdajs.com/",children:"RamdaJS library"}),"."]}),(0,x.jsxs)("li",{children:["Special thanks to ",(0,x.jsx)("a",{href:"https://github.com/lassik",children:"Lassi Kortela"})," for helping with Scheme code."]})]})]})}function T(){return(0,x.jsxs)("div",{className:C.section,children:[(0,x.jsx)(r.A,{as:"h2",id:"license",className:C.header,children:"License"}),(0,x.jsxs)("p",{children:["LIPS Scheme is ",(0,x.jsx)("a",{href:"https://opensource.com/resources/what-open-source",children:"Open Source"})," ","and released on ",(0,x.jsx)("a",{href:"https://github.com/jcubic/lips/blob/master/LICENSE",children:"MIT license"})]})]})}function A(){return(0,x.jsxs)("div",{className:C.section,id:"video",children:[(0,x.jsx)(r.A,{as:"h2",id:"video",className:C.header,children:"Video Presentation about LIPS Scheme"}),(0,x.jsxs)("p",{children:["Video presentation given during ",(0,x.jsx)("a",{href:"https://archive.fosdem.org/2023/",children:"FOSDEM 2023"})," in ",(0,x.jsx)("a",{href:"https://archive.fosdem.org/2023/schedule/track/declarative_and_minimalistic_computing/",children:"Declarative and Minimalistic Computing devroom"}),". It discuss different aspect of LIPS Scheme. It first gives quick intro to Lisp and Scheme and later show different features of LIPS Scheme."]}),(0,x.jsxs)("video",{controls:!0,preload:"none",poster:"./img/fosdem-intro.png",children:[(0,x.jsx)("source",{src:"https://video.fosdem.org/2023/D.minimalistic/lipsscheme.webm",type:'video/webm; codecs="vp9, opus"'}),(0,x.jsx)("source",{src:"https://video.fosdem.org/2023/D.minimalistic/lipsscheme.mp4",type:"video/mp4"})]})]})}function E(){return(0,x.jsxs)("div",{className:C.section,children:[(0,x.jsx)(r.A,{as:"h2",id:"summary",className:C.header,children:"Summary"}),(0,x.jsxs)("p",{children:["LIPS Scheme is powerful lisp interpreter written in JavaScript. The aim of the project is to fully support ",(0,x.jsx)("a",{href:"https://standards.scheme.org/#r7rs",children:"R7RS"})," specification of Scheme Programming Language. But add more powerful features on top."]}),(0,x.jsxs)("p",{children:["The name LIPS is recursive acronym which stands for ",(0,x.jsx)("strong",{children:"LIPS Is Pretty Simple"}),". Over time the project may no longer be that simple in implementation but it always be LIPS."]}),(0,x.jsx)(r.A,{as:"h2",id:"features",className:C.header,children:"Features"}),(0,x.jsx)("p",{children:"Most important features of LIPS:"}),(0,x.jsxs)("ul",{children:[(0,x.jsx)("li",{children:"Great integration with JavaScript. You can use any JS library out of the box."}),(0,x.jsx)("li",{children:"Asynchronous execution (auto resolving of promises with optional promise quotation)."}),(0,x.jsx)("li",{children:"Literal regular expression."}),(0,x.jsxs)("li",{children:["Functional helpers (inspired by ",(0,x.jsx)("a",{href:"https://ramdajs.com/",children:"RamdaJS"})," and ",(0,x.jsx)("a",{href:"https://lodash.com/",children:"Lodash"}),")."]}),(0,x.jsx)("li",{children:"Possibility modify the parser at runtime (add new syntax, similar to vectors and object)."}),(0,x.jsx)("li",{children:"Possibility to set representation of new data types for write and display. With parser extensions you can make new data types have different syntax and still be homoicoic."}),(0,x.jsx)("li",{children:"Small JavaScript core with Standard Library implemented in basic Scheme."}),(0,x.jsx)("li",{children:"Full support of Unicode and Emoji."}),(0,x.jsxs)("li",{children:["Support for ",(0,x.jsx)("a",{href:"https://en.wikipedia.org/wiki/SXML",children:"SXML"}),", that allow to write ",(0,x.jsx)("a",{href:"https://en.wikipedia.org/wiki/JSX_(JavaScript)",children:"JSX"})," e.g. with ",(0,x.jsx)("a",{href:"https://preactjs.com/",children:"Preact"})," or ",(0,x.jsx)("a",{href:"https://react.dev/",children:"React"})," apps."]}),(0,x.jsxs)("li",{children:["I/O Ports supports in browser with ",(0,x.jsx)("a",{href:"https://github.com/jvilk/BrowserFS",children:"BrowserFS"}),"."]}),(0,x.jsxs)("li",{children:["Full numerical tower and Big Integer support (still ",(0,x.jsx)("a",{href:"https://github.com/jcubic/lips/issues/34",children:"not 100% fully unit tested"}),")."]}),(0,x.jsx)("li",{children:"Powerful introspection (similar to the one in Python)."}),(0,x.jsx)("li",{children:"Auto formatting of lisp code (pretty print)."}),(0,x.jsx)("li",{children:"Lisp/hygienic macros and macroexpand."}),(0,x.jsx)("li",{children:"Builtin help system."})]})]})}var I=t(5648);function q(){const{siteConfig:e}=(0,i.A)();return(0,x.jsx)("header",{className:(0,s.A)("hero hero--primary",I.A.heroBanner),children:(0,x.jsxs)("div",{className:"container",children:[(0,x.jsxs)(r.A,{as:"h1",className:"hero__title",children:[e.title," v.\xa0",(0,x.jsx)(L,{})]}),(0,x.jsx)("p",{className:"hero__subtitle",children:e.tagline}),(0,x.jsx)("p",{className:I.A.hidden,children:"Scheme Language Online REPL"}),(0,x.jsx)(g,{})]})})}function F(){const{siteConfig:e}=(0,i.A)();return(0,x.jsxs)(o.A,{title:"Powerful Scheme interpreter in JavaScript",description:e.tagline,children:[(0,x.jsx)(q,{}),(0,x.jsxs)("main",{children:[(0,x.jsx)(E,{}),(0,x.jsx)(_,{}),(0,x.jsx)(A,{}),(0,x.jsx)(B,{}),(0,x.jsx)(T,{})]})]})}},1202:(e,n,t)=>{t.d(n,{A:()=>C});var s=t(6540),i=t(2303),r=t(4164),o=t(7559);const a={codeBlockContainer:"codeBlockContainer_APcc"};var c=t(4848);function l(e){let{as:n,...t}=e;return(0,c.jsx)(n,{...t,className:(0,r.A)(t.className,a.codeBlockContainer,o.G.common.codeBlock)})}const d={codeBlockContent:"codeBlockContent_m3Ux",codeBlockTitle:"codeBlockTitle_P25_",codeBlock:"codeBlock_qGQc",codeBlockStandalone:"codeBlockStandalone_zC50",codeBlockLines:"codeBlockLines_p187",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_OFgW",buttonGroup:"buttonGroup_6DOT"};function h(e){let{children:n,className:t}=e;return(0,c.jsx)(l,{as:"pre",tabIndex:0,className:(0,r.A)(d.codeBlockStandalone,"thin-scrollbar",t),children:(0,c.jsx)("code",{className:d.codeBlockLines,children:n})})}var m=t(6342),p=t(6058),u=t(4291),f=t(6591),x=t(1765);const j={codeLine:"codeLine_iPqp",codeLineNumber:"codeLineNumber_F4P7",codeLineContent:"codeLineContent_pOih"};function b(e){let{line:n,classNames:t,showLineNumbers:s,getLineProps:i,getTokenProps:o}=e;1===n.length&&"\n"===n[0].content&&(n[0].content="");const a=i({line:n,className:(0,r.A)(t,s&&j.codeLine)}),l=n.map(((e,n)=>(0,c.jsx)("span",{...o({token:e,key:n})},n)));return(0,c.jsxs)("span",{...a,children:[s?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:j.codeLineNumber}),(0,c.jsx)("span",{className:j.codeLineContent,children:l})]}):l,"\n"]})}var g=t(6861),y=t(1312),v=t(1473),w=t(4115);const k={copyButtonCopied:"copyButtonCopied__QnY",copyButtonIcons:"copyButtonIcons_FhaS",copyButtonIcon:"copyButtonIcon_phi_",copyButtonSuccessIcon:"copyButtonSuccessIcon_FfTR"};function S(e){let{code:n,className:t}=e;const[i,o]=(0,s.useState)(!1),a=(0,s.useRef)(void 0),l=(0,s.useCallback)((()=>{(0,g.A)(n),o(!0),a.current=window.setTimeout((()=>{o(!1)}),1e3)}),[n]);return(0,s.useEffect)((()=>()=>window.clearTimeout(a.current)),[]),(0,c.jsx)("button",{type:"button","aria-label":i?(0,y.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,y.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,y.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,r.A)("clean-btn",t,k.copyButton,i&&k.copyButtonCopied),onClick:l,children:(0,c.jsxs)("span",{className:k.copyButtonIcons,"aria-hidden":"true",children:[(0,c.jsx)(v.A,{className:k.copyButtonIcon}),(0,c.jsx)(w.A,{className:k.copyButtonSuccessIcon})]})})}var N=t(5048);const _={wordWrapButtonIcon:"wordWrapButtonIcon_iowe",wordWrapButtonEnabled:"wordWrapButtonEnabled_gY8A"};function P(e){let{className:n,onClick:t,isEnabled:s}=e;const i=(0,y.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,c.jsx)("button",{type:"button",onClick:t,className:(0,r.A)("clean-btn",n,s&&_.wordWrapButtonEnabled),"aria-label":i,title:i,children:(0,c.jsx)(N.A,{className:_.wordWrapButtonIcon,"aria-hidden":"true"})})}function L(e){let{children:n,className:t="",metastring:s,title:i,showLineNumbers:r,language:o}=e;const{prism:{defaultLanguage:a,magicComments:l}}=(0,m.p)(),h=function(e){return e?.toLowerCase()}(o??(0,u.Op)(t)??a),j=(0,p.A)(),g=(0,f.f)(),y=(0,u.wt)(s)||i,{lineClassNames:v,code:w}=(0,u.Li)(n,{metastring:s,language:h,magicComments:l}),k=r??(0,u._u)(s);return(0,c.jsxs)("div",{children:[y&&(0,c.jsx)("div",{className:d.codeBlockTitle,children:y}),(0,c.jsxs)("div",{children:[(0,c.jsx)(x.f4,{theme:j,code:w,language:h??"text",children:e=>{let{className:n,style:s,tokens:i,getLineProps:r,getTokenProps:o}=e;return(0,c.jsx)("pre",{tabIndex:0,ref:g.codeBlockRef,children:(0,c.jsx)("code",{children:i.map(((e,n)=>{return(0,c.jsx)(b,{line:e,getLineProps:r,getTokenProps:t.match(/lips/)?(s=o,function(){const{style:e,...n}=s(...arguments);return n}):o,classNames:v[n],showLineNumbers:k},n);var s}))})})}}),(0,c.jsxs)("div",{className:d.buttonGroup,children:[(g.isEnabled||g.isCodeScrollable)&&(0,c.jsx)(P,{className:d.codeButton,onClick:()=>g.toggle(),isEnabled:g.isEnabled}),(0,c.jsx)(S,{className:d.codeButton,code:w})]})]})]})}function C(e){let{children:n,...t}=e;const r=(0,i.A)(),o=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(n),a="string"==typeof o?L:h;return(0,c.jsx)(a,{...t,children:o},String(r))}},5648:(e,n,t)=>{t.d(n,{A:()=>s});const s={heroBanner:"heroBanner_qdFl",buttons:"buttons_AeoN",container:"container_bfhl",header:"header_gB2a",hidden:"hidden_zUxV"}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.b4d0c4d5.js b/assets/js/runtime~main.6327fb0a.js similarity index 98% rename from assets/js/runtime~main.b4d0c4d5.js rename to assets/js/runtime~main.6327fb0a.js index 71f7843a..249dce6a 100644 --- a/assets/js/runtime~main.b4d0c4d5.js +++ b/assets/js/runtime~main.6327fb0a.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,f,c,t,r={},d={};function b(e){var a=d[e];if(void 0!==a)return a.exports;var f=d[e]={exports:{}};return r[e].call(f.exports,f,f.exports,b),f.exports}b.m=r,e=[],b.O=(a,f,c,t)=>{if(!f){var r=1/0;for(i=0;i=t)&&Object.keys(b.O).every((e=>b.O[e](f[o])))?f.splice(o--,1):(d=!1,t0&&e[i-1][2]>t;i--)e[i]=e[i-1];e[i]=[f,c,t]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var t=Object.create(null);b.r(t);var r={};a=a||[null,f({}),f([]),f(f)];for(var d=2&c&&e;"object"==typeof d&&!~a.indexOf(d);d=f(d))Object.getOwnPropertyNames(d).forEach((a=>r[a]=()=>e[a]));return r.default=()=>e,b.d(t,r),t},b.d=(e,a)=>{for(var f in a)b.o(a,f)&&!b.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((a,f)=>(b.f[f](e,a),a)),[])),b.u=e=>"assets/js/"+({385:"9ede617c",478:"840797c7",1903:"acecf23e",1933:"35ee46b0",1991:"b2b675dd",2272:"69aa9e93",2711:"9e4087bc",2866:"61d90f5f",3249:"ccc49370",3789:"726afaaf",3917:"ea13dd3a",3976:"0e384e19",4413:"e511e452",4583:"1df93b7f",4813:"6875c492",5011:"df5a86e1",5137:"9abc7bc7",5150:"c71491fd",5582:"1f27c5d1",5867:"4b1723f1",5894:"b2f554cd",6271:"f724a01c",6365:"c74dcec5",6372:"7e736cac",6440:"3828c8cd",6516:"468f2e1c",6969:"14eb3368",7098:"a7bd4aaa",7209:"f2e31a35",7350:"6878938b",7472:"814f3328",7504:"f196f4a4",7643:"a6aa9e1f",8133:"14a48451",8177:"e1902777",8209:"01a85c17",8401:"17896441",8581:"935f2afb",8649:"413466e5",8691:"ab461798",9048:"a94703ab",9052:"db96436e",9067:"5ad8d976",9204:"aa178e2b",9263:"d969d8ea",9267:"a7023ddc",9397:"68243087",9529:"75505f57",9647:"5e95c892",9651:"4f7497d7",9712:"1ba8abbb",9764:"2abfd7a8",9830:"430f917c",9944:"0a637f08"}[e]||e)+"."+{195:"b9415c33",385:"4918ae28",416:"39f57a47",478:"d25775b3",1903:"6a369166",1933:"b16ae15d",1991:"db8f6320",2237:"c2b3cc4b",2272:"7319f91d",2711:"00e5515a",2866:"9f505ed4",3249:"5bcd39d3",3789:"190ab9df",3917:"2ca8e47e",3976:"8c08da5a",4413:"a964d4c3",4583:"1d11552d",4813:"5d0130f9",5011:"38efe326",5137:"0308c39e",5150:"3ada2e52",5309:"22de5fcf",5582:"5559e252",5867:"90541180",5894:"378cf318",5929:"13597d15",6271:"dd14baea",6365:"820ebae0",6372:"5b4c4f20",6440:"0c807933",6516:"c8de6452",6969:"1e6defae",7098:"f91346b3",7209:"a0631223",7350:"2e1d9314",7472:"f8e260d5",7504:"916d7ceb",7643:"e750e664",8133:"42207058",8177:"98debe85",8209:"b6749939",8401:"2eba16cb",8511:"f26dac2f",8581:"278a6779",8649:"e25f8fb6",8691:"e52bb61d",8913:"a77cc8d9",9048:"dda15552",9052:"5eaa5d47",9067:"81c229b4",9204:"aeb0bf24",9263:"fe427e48",9267:"93b9b579",9397:"39f61262",9462:"ea033612",9529:"90539166",9647:"608440ea",9651:"2f46c697",9712:"c27ed057",9764:"9eb9ce1a",9830:"4177f6c6",9944:"7eceb96a"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},t="new-docs:",b.l=(e,a,f,r)=>{if(c[e])c[e].push(a);else{var d,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{d.onerror=d.onload=null,clearTimeout(s);var t=c[e];if(delete c[e],d.parentNode&&d.parentNode.removeChild(d),t&&t.forEach((e=>e(f))),a)return a(f)},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),o&&document.head.appendChild(d)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/",b.gca=function(e){return e={17896441:"8401",68243087:"9397","9ede617c":"385","840797c7":"478",acecf23e:"1903","35ee46b0":"1933",b2b675dd:"1991","69aa9e93":"2272","9e4087bc":"2711","61d90f5f":"2866",ccc49370:"3249","726afaaf":"3789",ea13dd3a:"3917","0e384e19":"3976",e511e452:"4413","1df93b7f":"4583","6875c492":"4813",df5a86e1:"5011","9abc7bc7":"5137",c71491fd:"5150","1f27c5d1":"5582","4b1723f1":"5867",b2f554cd:"5894",f724a01c:"6271",c74dcec5:"6365","7e736cac":"6372","3828c8cd":"6440","468f2e1c":"6516","14eb3368":"6969",a7bd4aaa:"7098",f2e31a35:"7209","6878938b":"7350","814f3328":"7472",f196f4a4:"7504",a6aa9e1f:"7643","14a48451":"8133",e1902777:"8177","01a85c17":"8209","935f2afb":"8581","413466e5":"8649",ab461798:"8691",a94703ab:"9048",db96436e:"9052","5ad8d976":"9067",aa178e2b:"9204",d969d8ea:"9263",a7023ddc:"9267","75505f57":"9529","5e95c892":"9647","4f7497d7":"9651","1ba8abbb":"9712","2abfd7a8":"9764","430f917c":"9830","0a637f08":"9944"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,f)=>{var c=b.o(e,a)?e[a]:void 0;if(0!==c)if(c)f.push(c[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var t=new Promise(((f,t)=>c=e[a]=[f,t]));f.push(c[2]=t);var r=b.p+b.u(a),d=new Error;b.l(r,(f=>{if(b.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var t=f&&("load"===f.type?"missing":f.type),r=f&&f.target&&f.target.src;d.message="Loading chunk "+a+" failed.\n("+t+": "+r+")",d.name="ChunkLoadError",d.type=t,d.request=r,c[1](d)}}),"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,f)=>{var c,t,r=f[0],d=f[1],o=f[2],n=0;if(r.some((a=>0!==e[a]))){for(c in d)b.o(d,c)&&(b.m[c]=d[c]);if(o)var i=o(b)}for(a&&a(f);n{"use strict";var e,a,f,c,t,r={},d={};function b(e){var a=d[e];if(void 0!==a)return a.exports;var f=d[e]={exports:{}};return r[e].call(f.exports,f,f.exports,b),f.exports}b.m=r,e=[],b.O=(a,f,c,t)=>{if(!f){var r=1/0;for(i=0;i=t)&&Object.keys(b.O).every((e=>b.O[e](f[o])))?f.splice(o--,1):(d=!1,t0&&e[i-1][2]>t;i--)e[i]=e[i-1];e[i]=[f,c,t]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var t=Object.create(null);b.r(t);var r={};a=a||[null,f({}),f([]),f(f)];for(var d=2&c&&e;"object"==typeof d&&!~a.indexOf(d);d=f(d))Object.getOwnPropertyNames(d).forEach((a=>r[a]=()=>e[a]));return r.default=()=>e,b.d(t,r),t},b.d=(e,a)=>{for(var f in a)b.o(a,f)&&!b.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((a,f)=>(b.f[f](e,a),a)),[])),b.u=e=>"assets/js/"+({385:"9ede617c",478:"840797c7",1903:"acecf23e",1933:"35ee46b0",1991:"b2b675dd",2272:"69aa9e93",2711:"9e4087bc",2866:"61d90f5f",3249:"ccc49370",3789:"726afaaf",3917:"ea13dd3a",3976:"0e384e19",4413:"e511e452",4583:"1df93b7f",4813:"6875c492",5011:"df5a86e1",5137:"9abc7bc7",5150:"c71491fd",5582:"1f27c5d1",5867:"4b1723f1",5894:"b2f554cd",6271:"f724a01c",6365:"c74dcec5",6372:"7e736cac",6440:"3828c8cd",6516:"468f2e1c",6969:"14eb3368",7098:"a7bd4aaa",7209:"f2e31a35",7350:"6878938b",7472:"814f3328",7504:"f196f4a4",7643:"a6aa9e1f",8133:"14a48451",8177:"e1902777",8209:"01a85c17",8401:"17896441",8581:"935f2afb",8649:"413466e5",8691:"ab461798",9048:"a94703ab",9052:"db96436e",9067:"5ad8d976",9204:"aa178e2b",9263:"d969d8ea",9267:"a7023ddc",9397:"68243087",9529:"75505f57",9647:"5e95c892",9651:"4f7497d7",9712:"1ba8abbb",9764:"2abfd7a8",9830:"430f917c",9944:"0a637f08"}[e]||e)+"."+{195:"b9415c33",385:"4918ae28",416:"39f57a47",478:"d25775b3",1903:"6a369166",1933:"b16ae15d",1991:"db8f6320",2237:"c2b3cc4b",2272:"7319f91d",2711:"00e5515a",2866:"9f505ed4",3249:"5bcd39d3",3789:"190ab9df",3917:"2ca8e47e",3976:"8c08da5a",4413:"a964d4c3",4583:"10bfd7ca",4813:"5d0130f9",5011:"38efe326",5137:"0308c39e",5150:"3ada2e52",5309:"22de5fcf",5582:"5559e252",5867:"90541180",5894:"378cf318",5929:"13597d15",6271:"dd14baea",6365:"820ebae0",6372:"5b4c4f20",6440:"0c807933",6516:"c8de6452",6969:"1e6defae",7098:"f91346b3",7209:"a0631223",7350:"2e1d9314",7472:"f8e260d5",7504:"916d7ceb",7643:"e750e664",8133:"42207058",8177:"98debe85",8209:"b6749939",8401:"2eba16cb",8511:"f26dac2f",8581:"278a6779",8649:"e25f8fb6",8691:"e52bb61d",8913:"a77cc8d9",9048:"dda15552",9052:"5eaa5d47",9067:"81c229b4",9204:"aeb0bf24",9263:"fe427e48",9267:"93b9b579",9397:"39f61262",9462:"ea033612",9529:"90539166",9647:"608440ea",9651:"2f46c697",9712:"c27ed057",9764:"9eb9ce1a",9830:"4177f6c6",9944:"7eceb96a"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},t="new-docs:",b.l=(e,a,f,r)=>{if(c[e])c[e].push(a);else{var d,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{d.onerror=d.onload=null,clearTimeout(s);var t=c[e];if(delete c[e],d.parentNode&&d.parentNode.removeChild(d),t&&t.forEach((e=>e(f))),a)return a(f)},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),o&&document.head.appendChild(d)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/",b.gca=function(e){return e={17896441:"8401",68243087:"9397","9ede617c":"385","840797c7":"478",acecf23e:"1903","35ee46b0":"1933",b2b675dd:"1991","69aa9e93":"2272","9e4087bc":"2711","61d90f5f":"2866",ccc49370:"3249","726afaaf":"3789",ea13dd3a:"3917","0e384e19":"3976",e511e452:"4413","1df93b7f":"4583","6875c492":"4813",df5a86e1:"5011","9abc7bc7":"5137",c71491fd:"5150","1f27c5d1":"5582","4b1723f1":"5867",b2f554cd:"5894",f724a01c:"6271",c74dcec5:"6365","7e736cac":"6372","3828c8cd":"6440","468f2e1c":"6516","14eb3368":"6969",a7bd4aaa:"7098",f2e31a35:"7209","6878938b":"7350","814f3328":"7472",f196f4a4:"7504",a6aa9e1f:"7643","14a48451":"8133",e1902777:"8177","01a85c17":"8209","935f2afb":"8581","413466e5":"8649",ab461798:"8691",a94703ab:"9048",db96436e:"9052","5ad8d976":"9067",aa178e2b:"9204",d969d8ea:"9263",a7023ddc:"9267","75505f57":"9529","5e95c892":"9647","4f7497d7":"9651","1ba8abbb":"9712","2abfd7a8":"9764","430f917c":"9830","0a637f08":"9944"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,f)=>{var c=b.o(e,a)?e[a]:void 0;if(0!==c)if(c)f.push(c[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var t=new Promise(((f,t)=>c=e[a]=[f,t]));f.push(c[2]=t);var r=b.p+b.u(a),d=new Error;b.l(r,(f=>{if(b.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var t=f&&("load"===f.type?"missing":f.type),r=f&&f.target&&f.target.src;d.message="Loading chunk "+a+" failed.\n("+t+": "+r+")",d.name="ChunkLoadError",d.type=t,d.request=r,c[1](d)}}),"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,f)=>{var c,t,r=f[0],d=f[1],o=f[2],n=0;if(r.some((a=>0!==e[a]))){for(c in d)b.o(d,c)&&(b.m[c]=d[c]);if(o)var i=o(b)}for(a&&a(f);n Blog | LIPS Scheme - + diff --git a/blog/archive.html b/blog/archive.html index 0b993e30..4641af68 100644 --- a/blog/archive.html +++ b/blog/archive.html @@ -4,7 +4,7 @@ Archive | LIPS Scheme - + diff --git a/blog/emacs-scheme-regex.html b/blog/emacs-scheme-regex.html index 84f623ce..01af5d19 100644 --- a/blog/emacs-scheme-regex.html +++ b/blog/emacs-scheme-regex.html @@ -4,7 +4,7 @@ Scheme Regex literals in Emacs | LIPS Scheme - + diff --git a/blog/lips-history.html b/blog/lips-history.html index 909ce301..a6d40ba2 100644 --- a/blog/lips-history.html +++ b/blog/lips-history.html @@ -4,7 +4,7 @@ LIPS Scheme History | LIPS Scheme - + diff --git a/blog/tags.html b/blog/tags.html index 3ea11f16..df8a3c3d 100644 --- a/blog/tags.html +++ b/blog/tags.html @@ -4,7 +4,7 @@ Tags | LIPS Scheme - + diff --git a/blog/tags/emacs.html b/blog/tags/emacs.html index 4b94f169..bb357535 100644 --- a/blog/tags/emacs.html +++ b/blog/tags/emacs.html @@ -4,7 +4,7 @@ One post tagged with "emacs" | LIPS Scheme - + diff --git a/blog/tags/history.html b/blog/tags/history.html index 16599c1a..7b0502b2 100644 --- a/blog/tags/history.html +++ b/blog/tags/history.html @@ -4,7 +4,7 @@ One post tagged with "history" | LIPS Scheme - + diff --git a/blog/tags/lips.html b/blog/tags/lips.html index 0ed27e9d..6ff2b4fa 100644 --- a/blog/tags/lips.html +++ b/blog/tags/lips.html @@ -4,7 +4,7 @@ One post tagged with "lips" | LIPS Scheme - + diff --git a/blog/tags/scheme.html b/blog/tags/scheme.html index 5a353c8c..0d51d68f 100644 --- a/blog/tags/scheme.html +++ b/blog/tags/scheme.html @@ -4,7 +4,7 @@ 2 posts tagged with "scheme" | LIPS Scheme - + diff --git a/docs/category/introduction-to-scheme.html b/docs/category/introduction-to-scheme.html index b0a77e74..e342912e 100644 --- a/docs/category/introduction-to-scheme.html +++ b/docs/category/introduction-to-scheme.html @@ -4,7 +4,7 @@ Introduction to Scheme | LIPS Scheme - + diff --git a/docs/category/lips-introduction.html b/docs/category/lips-introduction.html index 326f2580..c17b4710 100644 --- a/docs/category/lips-introduction.html +++ b/docs/category/lips-introduction.html @@ -4,7 +4,7 @@ LIPS introduction | LIPS Scheme - + diff --git a/docs/intro.html b/docs/intro.html index 33d68816..c9d37779 100644 --- a/docs/intro.html +++ b/docs/intro.html @@ -4,7 +4,7 @@ Getting Started | LIPS Scheme - + diff --git a/docs/lips/REPL.html b/docs/lips/REPL.html index d1464983..d91ce326 100644 --- a/docs/lips/REPL.html +++ b/docs/lips/REPL.html @@ -4,7 +4,7 @@ REPL | LIPS Scheme - + diff --git a/docs/lips/SRFI.html b/docs/lips/SRFI.html index 4eeb9e18..af954d21 100644 --- a/docs/lips/SRFI.html +++ b/docs/lips/SRFI.html @@ -4,7 +4,7 @@ SRFI | LIPS Scheme - + diff --git a/docs/lips/embeding-repl.html b/docs/lips/embeding-repl.html index 865ceb85..f9e59cbc 100644 --- a/docs/lips/embeding-repl.html +++ b/docs/lips/embeding-repl.html @@ -4,7 +4,7 @@ Embedding LIPS REPL | LIPS Scheme - + diff --git a/docs/lips/environments.html b/docs/lips/environments.html index cd66f031..55bcc4cf 100644 --- a/docs/lips/environments.html +++ b/docs/lips/environments.html @@ -4,7 +4,7 @@ Environments | LIPS Scheme - + diff --git a/docs/lips/extension.html b/docs/lips/extension.html index 5629253f..09e2367d 100644 --- a/docs/lips/extension.html +++ b/docs/lips/extension.html @@ -4,7 +4,7 @@ Extending LIPS | LIPS Scheme - + diff --git a/docs/lips/functional-helpers.html b/docs/lips/functional-helpers.html index f94dd2ba..484a9c51 100644 --- a/docs/lips/functional-helpers.html +++ b/docs/lips/functional-helpers.html @@ -4,7 +4,7 @@ Functional and other utils | LIPS Scheme - + diff --git a/docs/lips/intro.html b/docs/lips/intro.html index 854df1da..4d0e40a4 100644 --- a/docs/lips/intro.html +++ b/docs/lips/intro.html @@ -4,7 +4,7 @@ Core features | LIPS Scheme - + diff --git a/docs/lips/reflection.html b/docs/lips/reflection.html index f36996ce..2e1aec02 100644 --- a/docs/lips/reflection.html +++ b/docs/lips/reflection.html @@ -4,7 +4,7 @@ Reflection | LIPS Scheme - + diff --git a/docs/lips/sxml.html b/docs/lips/sxml.html index dd26dea9..b7acf9f8 100644 --- a/docs/lips/sxml.html +++ b/docs/lips/sxml.html @@ -4,7 +4,7 @@ SXML (e.g. for React) | LIPS Scheme - + diff --git a/docs/scheme-intro/continuations.html b/docs/scheme-intro/continuations.html index 49b12be1..6093977e 100644 --- a/docs/scheme-intro/continuations.html +++ b/docs/scheme-intro/continuations.html @@ -4,7 +4,7 @@ Continuations | LIPS Scheme - + diff --git a/docs/scheme-intro/core.html b/docs/scheme-intro/core.html index c417bcb2..7357db11 100644 --- a/docs/scheme-intro/core.html +++ b/docs/scheme-intro/core.html @@ -4,7 +4,7 @@ Core of Scheme | LIPS Scheme - + diff --git a/docs/scheme-intro/data-types.html b/docs/scheme-intro/data-types.html index 65a2bca4..4f090479 100644 --- a/docs/scheme-intro/data-types.html +++ b/docs/scheme-intro/data-types.html @@ -4,7 +4,7 @@ Data Types | LIPS Scheme - + diff --git a/docs/scheme-intro/input-output.html b/docs/scheme-intro/input-output.html index 26042b49..d576f742 100644 --- a/docs/scheme-intro/input-output.html +++ b/docs/scheme-intro/input-output.html @@ -4,7 +4,7 @@ Input and Output | LIPS Scheme - + diff --git a/docs/scheme-intro/macros.html b/docs/scheme-intro/macros.html index a30e016a..f8a3fab1 100644 --- a/docs/scheme-intro/macros.html +++ b/docs/scheme-intro/macros.html @@ -4,7 +4,7 @@ Macros | LIPS Scheme - + diff --git a/docs/scheme-intro/next-step.html b/docs/scheme-intro/next-step.html index 524544d6..5b01ccfc 100644 --- a/docs/scheme-intro/next-step.html +++ b/docs/scheme-intro/next-step.html @@ -4,7 +4,7 @@ What Next? | LIPS Scheme - + diff --git a/docs/scheme-intro/streams.html b/docs/scheme-intro/streams.html index e1ae5c55..bfe05651 100644 --- a/docs/scheme-intro/streams.html +++ b/docs/scheme-intro/streams.html @@ -4,7 +4,7 @@ Streams | LIPS Scheme - + diff --git a/docs/scheme-intro/what-is-lisp.html b/docs/scheme-intro/what-is-lisp.html index bc7d41f1..6594f7c5 100644 --- a/docs/scheme-intro/what-is-lisp.html +++ b/docs/scheme-intro/what-is-lisp.html @@ -4,7 +4,7 @@ What is Lisp and Scheme? | LIPS Scheme - + diff --git a/index.html b/index.html index 2a36e9e5..d656cfc4 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Powerful Scheme interpreter in JavaScript | LIPS Scheme - + diff --git a/reference.html b/reference.html index fd283432..09543ab0 100644 --- a/reference.html +++ b/reference.html @@ -4,7 +4,7 @@ Function and Macro Reference | LIPS Scheme - + diff --git a/screenshooter.html b/screenshooter.html index 021a1c2e..e27e6e6e 100644 --- a/screenshooter.html +++ b/screenshooter.html @@ -4,7 +4,7 @@ Screenshooter | LIPS Scheme - + diff --git a/sitemap.xml b/sitemap.xml index cdc45833..8cca524c 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://lips.js.org/blogweekly0.5https://lips.js.org/blog/archiveweekly0.5https://lips.js.org/blog/emacs-scheme-regex2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/blog/lips-history2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/blog/tagsweekly0.5https://lips.js.org/blog/tags/emacsweekly0.5https://lips.js.org/blog/tags/historyweekly0.5https://lips.js.org/blog/tags/lipsweekly0.5https://lips.js.org/blog/tags/schemeweekly0.5https://lips.js.org/reference2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/screenshooter2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/category/introduction-to-schemeweekly0.5https://lips.js.org/docs/category/lips-introductionweekly0.5https://lips.js.org/docs/intro2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/lips/embeding-repl2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/lips/environments2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/lips/extension2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/lips/functional-helpers2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/lips/intro2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/lips/reflection2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/lips/REPL2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/lips/SRFI2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/lips/sxml2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/scheme-intro/continuations2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/scheme-intro/core2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/scheme-intro/data-types2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/scheme-intro/input-output2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/scheme-intro/macros2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/scheme-intro/next-step2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/scheme-intro/streams2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/docs/scheme-intro/what-is-lisp2024-10-17T08:26:42.000Zweekly0.5https://lips.js.org/2024-10-17T08:26:42.000Zweekly0.5 \ No newline at end of file +https://lips.js.org/blogweekly0.5https://lips.js.org/blog/archiveweekly0.5https://lips.js.org/blog/emacs-scheme-regex2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/blog/lips-history2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/blog/tagsweekly0.5https://lips.js.org/blog/tags/emacsweekly0.5https://lips.js.org/blog/tags/historyweekly0.5https://lips.js.org/blog/tags/lipsweekly0.5https://lips.js.org/blog/tags/schemeweekly0.5https://lips.js.org/reference2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/screenshooter2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/category/introduction-to-schemeweekly0.5https://lips.js.org/docs/category/lips-introductionweekly0.5https://lips.js.org/docs/intro2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/lips/embeding-repl2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/lips/environments2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/lips/extension2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/lips/functional-helpers2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/lips/intro2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/lips/reflection2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/lips/REPL2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/lips/SRFI2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/lips/sxml2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/scheme-intro/continuations2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/scheme-intro/core2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/scheme-intro/data-types2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/scheme-intro/input-output2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/scheme-intro/macros2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/scheme-intro/next-step2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/scheme-intro/streams2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/docs/scheme-intro/what-is-lisp2024-10-17T08:32:14.000Zweekly0.5https://lips.js.org/2024-10-17T08:32:14.000Zweekly0.5 \ No newline at end of file