diff --git a/404.html b/404.html index e32178d9..adba6f84 100644 --- a/404.html +++ b/404.html @@ -8,7 +8,7 @@ - + diff --git a/assets/js/1df93b7f.1f91a9e1.js b/assets/js/1df93b7f.1f91a9e1.js new file mode 100644 index 00000000..b567b9a1 --- /dev/null +++ b/assets/js/1df93b7f.1f91a9e1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknew_docs=self.webpackChunknew_docs||[]).push([[3237],{9846:(e,n,t)=>{t.d(n,{Z:()=>r});var s=t(7294);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"}})))}},2106:(e,n,t)=>{t.d(n,{Z:()=>r});var s=t(7294);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)"}))}},48:(e,n,t)=>{t.d(n,{Z:()=>i});var s=t(7294);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)}}()}),[])}},8994:(e,n,t)=>{t.r(n),t.d(n,{default:()=>q});var s=t(512),i=t(2263),r=t(2503),o=t(6555),a=t(7294),c=t(2282),l=t(2389),d=t(5742),h=t(48),p=t(3155);let m;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(5893);const j=()=>globalThis.jQuery&&globalThis.jQuery.terminal&&globalThis.terminal&&globalThis.lips;function b(){const[e,n]=(0,a.useState)(0),[t,i]=(0,a.useState)(1),r=(0,a.useRef)(),o=!(0,l.Z)()&&!globalThis.jQuery;function b(e){void 0===e&&(e=".example:visible");const n=globalThis.jQuery,t=n(e).text(),s=n(".term").terminal();s.echo(s.get_prompt(),{formatters:!1}),s.exec(t,!0),void 0===screen.orientation&&setTimeout((()=>s.focus()),0)}function g(e){return t=>{t.preventDefault(),n(e)}}function y(e){return n=>{n.preventDefault(),i((n=>n+e))}}(0,h.Z)(!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(){j()&&getComputedStyle(r.current).getPropertyValue("--base-background")?function(){const e=globalThis.$;e.terminal.syntax("scheme");const n=e(".term");m||(m=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.`;t.echo(s.replace(/(\((?:env|dir|help|apropos)[^)]*\))/g,(function(n){return e.terminal.prism("scheme",n,{echo:!0})})),{formatters:!1})}():setTimeout(e,100)}(),u)),[]);const v={"--size":t.toFixed(1)};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(d.Z,{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:y(.1),children:"Zoom In"})}),(0,x.jsx)("li",{className:"zoom-out icon",children:(0,x.jsx)("a",{href:"#",onClick:y(-.1),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")},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")},children:"Exit Full Screen"})})]})})]})}),(0,x.jsx)("div",{className:"terminal marker",ref:r}),(0,x.jsx)("div",{className:"term",style:v,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:()=>b("li.hidden .example"),children:"\u03c0"})}),(0,x.jsx)("button",{className:"run",onClick:()=>b(),children:"run"}),(0,x.jsx)("ul",{className:"list",children:f.map(((n,t)=>(0,x.jsxs)("li",{className:(0,s.Z)({active:t===e,hidden:n.hidden}),children:[(0,x.jsx)("div",{className:"example",children:(0,x.jsx)(p.Z,{language:"scheme",className:"lips",children:n.code})}),(0,x.jsx)("div",{className:"description",children:(0,x.jsx)(c.U,{children:n.description})})]},t)))}),(0,x.jsx)("ul",{className:"pagination",children:f.map(((n,t)=>(0,x.jsx)("li",{className:(0,s.Z)({active:t===e,hidden:n.hidden}),children:(0,x.jsx)("a",{href:"#",onClick:g(t),children:t+1})},t)))})]})]})]})}const g={svg:"svg_V48x",tools:"tools_w5Qr",header:"header_ZcHJ"},y=t(9846).Z;function v(){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)(y,{className:g.svg,role:"img"}),(0,x.jsx)(r.Z,{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 also 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 as a security solution to prevent mostly"," ",(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 w=t(3692);const k=t(2106).Z;function S(){return(0,x.jsx)("section",{id:"bookmarklet",children:(0,x.jsxs)("div",{className:"container",children:[(0,x.jsx)(k,{className:g.svg,role:"img"}),(0,x.jsx)(r.Z,{as:"h3",children:(0,x.jsx)(w.Z,{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 N(){return(0,x.jsxs)("div",{className:g.tools,children:[(0,x.jsx)(r.Z,{as:"h2",className:g.header,children:"Tools"}),(0,x.jsx)(v,{}),(0,x.jsx)(S,{})]})}const _="1.0.0-beta.19";function C(){return(0,x.jsx)("span",{children:_})}const P={section:"section_nB9V",header:"header_bEBW"};function B(){return(0,x.jsxs)("div",{className:P.section,children:[(0,x.jsx)(r.Z,{as:"h2",className:P.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 L(){return(0,x.jsxs)("div",{className:P.section,children:[(0,x.jsx)(r.Z,{as:"h2",className:P.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 I(){return(0,x.jsxs)("div",{className:P.section,id:"video",children:[(0,x.jsx)(r.Z,{as:"h2",className:P.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 T(){return(0,x.jsxs)("div",{className:P.section,children:[(0,x.jsx)(r.Z,{as:"h2",className:P.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.Z,{as:"h2",className:P.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 Z=t(1207);function E(){const{siteConfig:e}=(0,i.Z)();return(0,x.jsx)("header",{className:(0,s.Z)("hero hero--primary",Z.Z.heroBanner),children:(0,x.jsxs)("div",{className:"container",children:[(0,x.jsxs)(r.Z,{as:"h1",className:"hero__title",children:[e.title," v.\xa0",(0,x.jsx)(C,{})]}),(0,x.jsx)("p",{className:"hero__subtitle",children:e.tagline}),(0,x.jsx)(b,{})]})})}function q(){const{siteConfig:e}=(0,i.Z)();return(0,x.jsxs)(o.Z,{title:"Powerful Scheme interpreter in JavaScript",description:e.tagline,children:[(0,x.jsx)(E,{}),(0,x.jsxs)("main",{children:[(0,x.jsx)(T,{}),(0,x.jsx)(N,{}),(0,x.jsx)(I,{}),(0,x.jsx)(B,{}),(0,x.jsx)(L,{})]})]})}},3155:(e,n,t)=>{t.d(n,{Z:()=>B});var s=t(7294),i=t(2389),r=t(512),o=t(5281);const a={codeBlockContainer:"codeBlockContainer_APcc"};var c=t(5893);function l(e){let{as:n,...t}=e;return(0,c.jsx)(n,{...t,className:(0,r.Z)(t.className,a.codeBlockContainer,o.k.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.Z)(d.codeBlockStandalone,"thin-scrollbar",t),children:(0,c.jsx)("code",{className:d.codeBlockLines,children:n})})}var p=t(6668),m=t(6412),u=t(7016),f=t(5448),x=t(2573);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.Z)(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(195),y=t(5999),v=t(345),w=t(7666);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.Z)(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.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,y.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,y.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,r.Z)("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.Z,{className:k.copyButtonIcon}),(0,c.jsx)(w.Z,{className:k.copyButtonSuccessIcon})]})})}var N=t(670);const _={wordWrapButtonIcon:"wordWrapButtonIcon_iowe",wordWrapButtonEnabled:"wordWrapButtonEnabled_gY8A"};function C(e){let{className:n,onClick:t,isEnabled:s}=e;const i=(0,y.I)({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.Z)("clean-btn",n,s&&_.wordWrapButtonEnabled),"aria-label":i,title:i,children:(0,c.jsx)(N.Z,{className:_.wordWrapButtonIcon,"aria-hidden":"true"})})}function P(e){let{children:n,className:t="",metastring:s,title:i,showLineNumbers:r,language:o}=e;const{prism:{defaultLanguage:a,magicComments:l}}=(0,p.L)(),h=function(e){return e?.toLowerCase()}(o??(0,u.Vo)(t)??a),j=(0,m.p)(),g=(0,f.F)(),y=(0,u.bc)(s)||i,{lineClassNames:v,code:w}=(0,u.nZ)(n,{metastring:s,language:h,magicComments:l}),k=r??(0,u.nt)(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.y$,{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)(C,{className:d.codeButton,onClick:()=>g.toggle(),isEnabled:g.isEnabled}),(0,c.jsx)(S,{className:d.codeButton,code:w})]})]})]})}function B(e){let{children:n,...t}=e;const r=(0,i.Z)(),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?P:h;return(0,c.jsx)(a,{...t,children:o},String(r))}},1207:(e,n,t)=>{t.d(n,{Z:()=>s});const s={heroBanner:"heroBanner_qdFl",buttons:"buttons_AeoN",container:"container_bfhl",header:"header_gB2a",search:"search_Dg8h",input:"input_wQOC"}}}]); \ No newline at end of file diff --git a/assets/js/1df93b7f.74ed3206.js b/assets/js/1df93b7f.74ed3206.js deleted file mode 100644 index ebe513e5..00000000 --- a/assets/js/1df93b7f.74ed3206.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunknew_docs=self.webpackChunknew_docs||[]).push([[3237],{9846:(e,n,t)=>{t.d(n,{Z:()=>r});var s=t(7294);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"}})))}},2106:(e,n,t)=>{t.d(n,{Z:()=>r});var s=t(7294);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)"}))}},48:(e,n,t)=>{t.d(n,{Z:()=>i});var s=t(7294);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)}}()}),[])}},8994:(e,n,t)=>{t.r(n),t.d(n,{default:()=>q});var s=t(512),i=t(2263),r=t(2503),o=t(6555),a=t(7294),c=t(2282),l=t(2389),d=t(5742),h=t(48),p=t(3155);let m;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 ((object `&(: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 object.name\n " "\n object.version))\n ;; you can mix scheme and JavaScript\n (setTimeout (lambda ()\n (alert (JSON.stringify object)))\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(5893);const j=()=>globalThis.jQuery&&globalThis.jQuery.terminal&&globalThis.terminal&&globalThis.lips;function b(){const[e,n]=(0,a.useState)(0),[t,i]=(0,a.useState)(1),r=(0,a.useRef)(),o=!(0,l.Z)()&&!globalThis.jQuery;function b(e){void 0===e&&(e=".example:visible");const n=globalThis.jQuery,t=n(e).text(),s=n(".term").terminal();s.echo(s.get_prompt(),{formatters:!1}),s.exec(t,!0),void 0===screen.orientation&&setTimeout((()=>s.focus()),0)}function g(e){return t=>{t.preventDefault(),n(e)}}function y(e){return n=>{n.preventDefault(),i((n=>n+e))}}(0,h.Z)(!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(){j()&&getComputedStyle(r.current).getPropertyValue("--base-background")?function(){const e=globalThis.$;e.terminal.syntax("scheme");const n=e(".term");m||(m=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.`;t.echo(s.replace(/(\((?:env|dir|help|apropos)[^)]*\))/g,(function(n){return e.terminal.prism("scheme",n,{echo:!0})})),{formatters:!1})}():setTimeout(e,100)}(),u)),[]);const v={"--size":t.toFixed(1)};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(d.Z,{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:y(.1),children:"Zoom In"})}),(0,x.jsx)("li",{className:"zoom-out icon",children:(0,x.jsx)("a",{href:"#",onClick:y(-.1),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")},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")},children:"Exit Full Screen"})})]})})]})}),(0,x.jsx)("div",{className:"terminal marker",ref:r}),(0,x.jsx)("div",{className:"term",style:v,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:()=>b("li.hidden .example"),children:"\u03c0"})}),(0,x.jsx)("button",{className:"run",onClick:()=>b(),children:"run"}),(0,x.jsx)("ul",{className:"list",children:f.map(((n,t)=>(0,x.jsxs)("li",{className:(0,s.Z)({active:t===e,hidden:n.hidden}),children:[(0,x.jsx)("div",{className:"example",children:(0,x.jsx)(p.Z,{language:"scheme",className:"lips",children:n.code})}),(0,x.jsx)("div",{className:"description",children:(0,x.jsx)(c.U,{children:n.description})})]},t)))}),(0,x.jsx)("ul",{className:"pagination",children:f.map(((n,t)=>(0,x.jsx)("li",{className:(0,s.Z)({active:t===e,hidden:n.hidden}),children:(0,x.jsx)("a",{href:"#",onClick:g(t),children:t+1})},t)))})]})]})]})}const g={svg:"svg_V48x",tools:"tools_w5Qr",header:"header_ZcHJ"},y=t(9846).Z;function v(){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)(y,{className:g.svg,role:"img"}),(0,x.jsx)(r.Z,{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 also 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 as a security solution to prevent mostly"," ",(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 w=t(3692);const k=t(2106).Z;function S(){return(0,x.jsx)("section",{id:"bookmarklet",children:(0,x.jsxs)("div",{className:"container",children:[(0,x.jsx)(k,{className:g.svg,role:"img"}),(0,x.jsx)(r.Z,{as:"h3",children:(0,x.jsx)(w.Z,{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 N(){return(0,x.jsxs)("div",{className:g.tools,children:[(0,x.jsx)(r.Z,{as:"h2",className:g.header,children:"Tools"}),(0,x.jsx)(v,{}),(0,x.jsx)(S,{})]})}const _="1.0.0-beta.19";function C(){return(0,x.jsx)("span",{children:_})}const P={section:"section_nB9V",header:"header_bEBW"};function B(){return(0,x.jsxs)("div",{className:P.section,children:[(0,x.jsx)(r.Z,{as:"h2",className:P.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 L(){return(0,x.jsxs)("div",{className:P.section,children:[(0,x.jsx)(r.Z,{as:"h2",className:P.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 I(){return(0,x.jsxs)("div",{className:P.section,id:"video",children:[(0,x.jsx)(r.Z,{as:"h2",className:P.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 T(){return(0,x.jsxs)("div",{className:P.section,children:[(0,x.jsx)(r.Z,{as:"h2",className:P.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.Z,{as:"h2",className:P.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 Z=t(1207);function E(){const{siteConfig:e}=(0,i.Z)();return(0,x.jsx)("header",{className:(0,s.Z)("hero hero--primary",Z.Z.heroBanner),children:(0,x.jsxs)("div",{className:"container",children:[(0,x.jsxs)(r.Z,{as:"h1",className:"hero__title",children:[e.title," v.\xa0",(0,x.jsx)(C,{})]}),(0,x.jsx)("p",{className:"hero__subtitle",children:e.tagline}),(0,x.jsx)(b,{})]})})}function q(){const{siteConfig:e}=(0,i.Z)();return(0,x.jsxs)(o.Z,{title:"Powerful Scheme interpreter in JavaScript",description:e.tagline,children:[(0,x.jsx)(E,{}),(0,x.jsxs)("main",{children:[(0,x.jsx)(T,{}),(0,x.jsx)(N,{}),(0,x.jsx)(I,{}),(0,x.jsx)(B,{}),(0,x.jsx)(L,{})]})]})}},3155:(e,n,t)=>{t.d(n,{Z:()=>B});var s=t(7294),i=t(2389),r=t(512),o=t(5281);const a={codeBlockContainer:"codeBlockContainer_APcc"};var c=t(5893);function l(e){let{as:n,...t}=e;return(0,c.jsx)(n,{...t,className:(0,r.Z)(t.className,a.codeBlockContainer,o.k.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.Z)(d.codeBlockStandalone,"thin-scrollbar",t),children:(0,c.jsx)("code",{className:d.codeBlockLines,children:n})})}var p=t(6668),m=t(6412),u=t(7016),f=t(5448),x=t(2573);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.Z)(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(195),y=t(5999),v=t(345),w=t(7666);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.Z)(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.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,y.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,y.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,r.Z)("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.Z,{className:k.copyButtonIcon}),(0,c.jsx)(w.Z,{className:k.copyButtonSuccessIcon})]})})}var N=t(670);const _={wordWrapButtonIcon:"wordWrapButtonIcon_iowe",wordWrapButtonEnabled:"wordWrapButtonEnabled_gY8A"};function C(e){let{className:n,onClick:t,isEnabled:s}=e;const i=(0,y.I)({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.Z)("clean-btn",n,s&&_.wordWrapButtonEnabled),"aria-label":i,title:i,children:(0,c.jsx)(N.Z,{className:_.wordWrapButtonIcon,"aria-hidden":"true"})})}function P(e){let{children:n,className:t="",metastring:s,title:i,showLineNumbers:r,language:o}=e;const{prism:{defaultLanguage:a,magicComments:l}}=(0,p.L)(),h=function(e){return e?.toLowerCase()}(o??(0,u.Vo)(t)??a),j=(0,m.p)(),g=(0,f.F)(),y=(0,u.bc)(s)||i,{lineClassNames:v,code:w}=(0,u.nZ)(n,{metastring:s,language:h,magicComments:l}),k=r??(0,u.nt)(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.y$,{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)(C,{className:d.codeButton,onClick:()=>g.toggle(),isEnabled:g.isEnabled}),(0,c.jsx)(S,{className:d.codeButton,code:w})]})]})]})}function B(e){let{children:n,...t}=e;const r=(0,i.Z)(),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?P:h;return(0,c.jsx)(a,{...t,children:o},String(r))}},1207:(e,n,t)=>{t.d(n,{Z:()=>s});const s={heroBanner:"heroBanner_qdFl",buttons:"buttons_AeoN",container:"container_bfhl",header:"header_gB2a",search:"search_Dg8h",input:"input_wQOC"}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.416f005e.js b/assets/js/runtime~main.7a2fde60.js similarity index 98% rename from assets/js/runtime~main.416f005e.js rename to assets/js/runtime~main.7a2fde60.js index a0b6e11f..76e810f4 100644 --- a/assets/js/runtime~main.416f005e.js +++ b/assets/js/runtime~main.7a2fde60.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,c,t,f,r={},d={};function o(e){var a=d[e];if(void 0!==a)return a.exports;var c=d[e]={exports:{}};return r[e].call(c.exports,c,c.exports,o),c.exports}o.m=r,e=[],o.O=(a,c,t,f)=>{if(!c){var r=1/0;for(i=0;i=f)&&Object.keys(o.O).every((e=>o.O[e](c[b])))?c.splice(b--,1):(d=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[c,t,f]},o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var f=Object.create(null);o.r(f);var r={};a=a||[null,c({}),c([]),c(c)];for(var d=2&t&&e;"object"==typeof d&&!~a.indexOf(d);d=c(d))Object.getOwnPropertyNames(d).forEach((a=>r[a]=()=>e[a]));return r.default=()=>e,o.d(f,r),f},o.d=(e,a)=>{for(var c in a)o.o(a,c)&&!o.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((a,c)=>(o.f[c](e,a),a)),[])),o.u=e=>"assets/js/"+({53:"935f2afb",81:"2abfd7a8",533:"b2b675dd",743:"7e736cac",1070:"f196f4a4",1113:"e511e452",1208:"3828c8cd",1317:"75505f57",1477:"b2f554cd",1652:"ea13dd3a",1677:"0a637f08",1713:"a7023ddc",2535:"814f3328",2553:"6878938b",2813:"4b1723f1",2822:"35ee46b0",3085:"1f391b9e",3089:"a6aa9e1f",3237:"1df93b7f",3604:"9ede617c",3608:"9e4087bc",4013:"01a85c17",4015:"69aa9e93",4368:"a94703ab",4699:"ab461798",4985:"14a48451",5460:"9abc7bc7",5564:"468f2e1c",5609:"e1902777",5747:"726afaaf",6103:"ccc49370",6143:"1f27c5d1",6296:"c74dcec5",7018:"413466e5",7184:"68243087",7393:"acecf23e",7414:"393be207",7836:"840797c7",7868:"aa178e2b",7903:"db96436e",7918:"17896441",7920:"1a4e3797",7953:"f724a01c",8071:"f2e31a35",8097:"4f7497d7",8293:"a7908955",8424:"5ad8d976",8518:"a7bd4aaa",8610:"6875c492",9195:"d969d8ea",9242:"c71491fd",9301:"430f917c",9342:"df5a86e1",9661:"5e95c892",9671:"0e384e19",9817:"14eb3368"}[e]||e)+"."+{53:"cc6240be",81:"eaf1209f",533:"7f33185e",743:"41e22d1d",1070:"4d17d4a0",1113:"f4971683",1208:"aa6ba2aa",1317:"519f4209",1426:"dd6510e4",1477:"92ae2c22",1652:"e9dd3f0f",1677:"61ff06c6",1713:"f57aae3f",1772:"279612d2",2535:"33be7cdd",2553:"62200649",2732:"57ee4d17",2813:"7994837a",2822:"5499b20c",3085:"1d6f466d",3089:"0b047991",3237:"74ed3206",3604:"9d811c06",3608:"bbe08c3e",4013:"035b886e",4015:"00e22eaa",4368:"8a573457",4699:"e445eee8",4985:"b2bb271d",5005:"facea533",5460:"58965eb1",5564:"1eb5cbc8",5609:"c9bdda11",5747:"32d8ecf6",6103:"6540443a",6143:"4d1e30de",6296:"2757b8e1",6945:"c4335b47",7018:"5b84004c",7184:"0f23da7a",7393:"3caaec2f",7414:"6bb4bbad",7534:"b74a478e",7836:"60904e28",7868:"b3cb7e23",7903:"8da5bafb",7918:"acc17b37",7920:"f8a2dd0c",7953:"087dbc0b",8071:"eff52960",8097:"07ed6383",8293:"038c4a54",8424:"f15ddef4",8518:"2cd9e8d5",8610:"711c1f3e",8894:"3c7d53d1",9195:"6ce6b63f",9242:"11363cc6",9301:"756863bd",9342:"5a8b1f83",9386:"eb7dae53",9661:"5ffb85b3",9671:"4a2ae178",9817:"3daec1da"}[e]+".js",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),t={},f="new-docs:",o.l=(e,a,c,r)=>{if(t[e])t[e].push(a);else{var d,b;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{d.onerror=d.onload=null,clearTimeout(s);var f=t[e];if(delete t[e],d.parentNode&&d.parentNode.removeChild(d),f&&f.forEach((e=>e(c))),a)return a(c)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=l.bind(null,d.onerror),d.onload=l.bind(null,d.onload),b&&document.head.appendChild(d)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="/",o.gca=function(e){return e={17896441:"7918",68243087:"7184","935f2afb":"53","2abfd7a8":"81",b2b675dd:"533","7e736cac":"743",f196f4a4:"1070",e511e452:"1113","3828c8cd":"1208","75505f57":"1317",b2f554cd:"1477",ea13dd3a:"1652","0a637f08":"1677",a7023ddc:"1713","814f3328":"2535","6878938b":"2553","4b1723f1":"2813","35ee46b0":"2822","1f391b9e":"3085",a6aa9e1f:"3089","1df93b7f":"3237","9ede617c":"3604","9e4087bc":"3608","01a85c17":"4013","69aa9e93":"4015",a94703ab:"4368",ab461798:"4699","14a48451":"4985","9abc7bc7":"5460","468f2e1c":"5564",e1902777:"5609","726afaaf":"5747",ccc49370:"6103","1f27c5d1":"6143",c74dcec5:"6296","413466e5":"7018",acecf23e:"7393","393be207":"7414","840797c7":"7836",aa178e2b:"7868",db96436e:"7903","1a4e3797":"7920",f724a01c:"7953",f2e31a35:"8071","4f7497d7":"8097",a7908955:"8293","5ad8d976":"8424",a7bd4aaa:"8518","6875c492":"8610",d969d8ea:"9195",c71491fd:"9242","430f917c":"9301",df5a86e1:"9342","5e95c892":"9661","0e384e19":"9671","14eb3368":"9817"}[e]||e,o.p+o.u(e)},(()=>{var e={1303:0,532:0};o.f.j=(a,c)=>{var t=o.o(e,a)?e[a]:void 0;if(0!==t)if(t)c.push(t[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var f=new Promise(((c,f)=>t=e[a]=[c,f]));c.push(t[2]=f);var r=o.p+o.u(a),d=new Error;o.l(r,(c=>{if(o.o(e,a)&&(0!==(t=e[a])&&(e[a]=void 0),t)){var f=c&&("load"===c.type?"missing":c.type),r=c&&c.target&&c.target.src;d.message="Loading chunk "+a+" failed.\n("+f+": "+r+")",d.name="ChunkLoadError",d.type=f,d.request=r,t[1](d)}}),"chunk-"+a,a)}},o.O.j=a=>0===e[a];var a=(a,c)=>{var t,f,r=c[0],d=c[1],b=c[2],n=0;if(r.some((a=>0!==e[a]))){for(t in d)o.o(d,t)&&(o.m[t]=d[t]);if(b)var i=b(o)}for(a&&a(c);n{"use strict";var e,a,c,t,f,r={},d={};function o(e){var a=d[e];if(void 0!==a)return a.exports;var c=d[e]={exports:{}};return r[e].call(c.exports,c,c.exports,o),c.exports}o.m=r,e=[],o.O=(a,c,t,f)=>{if(!c){var r=1/0;for(i=0;i=f)&&Object.keys(o.O).every((e=>o.O[e](c[b])))?c.splice(b--,1):(d=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[c,t,f]},o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var f=Object.create(null);o.r(f);var r={};a=a||[null,c({}),c([]),c(c)];for(var d=2&t&&e;"object"==typeof d&&!~a.indexOf(d);d=c(d))Object.getOwnPropertyNames(d).forEach((a=>r[a]=()=>e[a]));return r.default=()=>e,o.d(f,r),f},o.d=(e,a)=>{for(var c in a)o.o(a,c)&&!o.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((a,c)=>(o.f[c](e,a),a)),[])),o.u=e=>"assets/js/"+({53:"935f2afb",81:"2abfd7a8",533:"b2b675dd",743:"7e736cac",1070:"f196f4a4",1113:"e511e452",1208:"3828c8cd",1317:"75505f57",1477:"b2f554cd",1652:"ea13dd3a",1677:"0a637f08",1713:"a7023ddc",2535:"814f3328",2553:"6878938b",2813:"4b1723f1",2822:"35ee46b0",3085:"1f391b9e",3089:"a6aa9e1f",3237:"1df93b7f",3604:"9ede617c",3608:"9e4087bc",4013:"01a85c17",4015:"69aa9e93",4368:"a94703ab",4699:"ab461798",4985:"14a48451",5460:"9abc7bc7",5564:"468f2e1c",5609:"e1902777",5747:"726afaaf",6103:"ccc49370",6143:"1f27c5d1",6296:"c74dcec5",7018:"413466e5",7184:"68243087",7393:"acecf23e",7414:"393be207",7836:"840797c7",7868:"aa178e2b",7903:"db96436e",7918:"17896441",7920:"1a4e3797",7953:"f724a01c",8071:"f2e31a35",8097:"4f7497d7",8293:"a7908955",8424:"5ad8d976",8518:"a7bd4aaa",8610:"6875c492",9195:"d969d8ea",9242:"c71491fd",9301:"430f917c",9342:"df5a86e1",9661:"5e95c892",9671:"0e384e19",9817:"14eb3368"}[e]||e)+"."+{53:"cc6240be",81:"eaf1209f",533:"7f33185e",743:"41e22d1d",1070:"4d17d4a0",1113:"f4971683",1208:"aa6ba2aa",1317:"519f4209",1426:"dd6510e4",1477:"92ae2c22",1652:"e9dd3f0f",1677:"61ff06c6",1713:"f57aae3f",1772:"279612d2",2535:"33be7cdd",2553:"62200649",2732:"57ee4d17",2813:"7994837a",2822:"5499b20c",3085:"1d6f466d",3089:"0b047991",3237:"1f91a9e1",3604:"9d811c06",3608:"bbe08c3e",4013:"035b886e",4015:"00e22eaa",4368:"8a573457",4699:"e445eee8",4985:"b2bb271d",5005:"facea533",5460:"58965eb1",5564:"1eb5cbc8",5609:"c9bdda11",5747:"32d8ecf6",6103:"6540443a",6143:"4d1e30de",6296:"2757b8e1",6945:"c4335b47",7018:"5b84004c",7184:"0f23da7a",7393:"3caaec2f",7414:"6bb4bbad",7534:"b74a478e",7836:"60904e28",7868:"b3cb7e23",7903:"8da5bafb",7918:"acc17b37",7920:"f8a2dd0c",7953:"087dbc0b",8071:"eff52960",8097:"07ed6383",8293:"038c4a54",8424:"f15ddef4",8518:"2cd9e8d5",8610:"711c1f3e",8894:"3c7d53d1",9195:"6ce6b63f",9242:"11363cc6",9301:"756863bd",9342:"5a8b1f83",9386:"eb7dae53",9661:"5ffb85b3",9671:"4a2ae178",9817:"3daec1da"}[e]+".js",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),t={},f="new-docs:",o.l=(e,a,c,r)=>{if(t[e])t[e].push(a);else{var d,b;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{d.onerror=d.onload=null,clearTimeout(s);var f=t[e];if(delete t[e],d.parentNode&&d.parentNode.removeChild(d),f&&f.forEach((e=>e(c))),a)return a(c)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=l.bind(null,d.onerror),d.onload=l.bind(null,d.onload),b&&document.head.appendChild(d)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="/",o.gca=function(e){return e={17896441:"7918",68243087:"7184","935f2afb":"53","2abfd7a8":"81",b2b675dd:"533","7e736cac":"743",f196f4a4:"1070",e511e452:"1113","3828c8cd":"1208","75505f57":"1317",b2f554cd:"1477",ea13dd3a:"1652","0a637f08":"1677",a7023ddc:"1713","814f3328":"2535","6878938b":"2553","4b1723f1":"2813","35ee46b0":"2822","1f391b9e":"3085",a6aa9e1f:"3089","1df93b7f":"3237","9ede617c":"3604","9e4087bc":"3608","01a85c17":"4013","69aa9e93":"4015",a94703ab:"4368",ab461798:"4699","14a48451":"4985","9abc7bc7":"5460","468f2e1c":"5564",e1902777:"5609","726afaaf":"5747",ccc49370:"6103","1f27c5d1":"6143",c74dcec5:"6296","413466e5":"7018",acecf23e:"7393","393be207":"7414","840797c7":"7836",aa178e2b:"7868",db96436e:"7903","1a4e3797":"7920",f724a01c:"7953",f2e31a35:"8071","4f7497d7":"8097",a7908955:"8293","5ad8d976":"8424",a7bd4aaa:"8518","6875c492":"8610",d969d8ea:"9195",c71491fd:"9242","430f917c":"9301",df5a86e1:"9342","5e95c892":"9661","0e384e19":"9671","14eb3368":"9817"}[e]||e,o.p+o.u(e)},(()=>{var e={1303:0,532:0};o.f.j=(a,c)=>{var t=o.o(e,a)?e[a]:void 0;if(0!==t)if(t)c.push(t[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var f=new Promise(((c,f)=>t=e[a]=[c,f]));c.push(t[2]=f);var r=o.p+o.u(a),d=new Error;o.l(r,(c=>{if(o.o(e,a)&&(0!==(t=e[a])&&(e[a]=void 0),t)){var f=c&&("load"===c.type?"missing":c.type),r=c&&c.target&&c.target.src;d.message="Loading chunk "+a+" failed.\n("+f+": "+r+")",d.name="ChunkLoadError",d.type=f,d.request=r,t[1](d)}}),"chunk-"+a,a)}},o.O.j=a=>0===e[a];var a=(a,c)=>{var t,f,r=c[0],d=c[1],b=c[2],n=0;if(r.some((a=>0!==e[a]))){for(t in d)o.o(d,t)&&(o.m[t]=d[t]);if(b)var i=b(o)}for(a&&a(c);n