From 65faf5bc00567a2448ad70dad3e161fcda62f11a Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Wed, 17 Feb 2021 00:03:17 +0000 Subject: [PATCH] Migrate the old jekyll posts to org-mode --- .gitignore | 3 + assets/js/highlight.pack.js | 1178 ++++++++++++++++++ assets/styles/arta.css | 73 ++ build.el | 36 +- lisp/ox-template.el | 1 - orgs/coh.org | 83 ++ orgs/essays/choosing-the-target-platform.org | 180 +++ orgs/essays/my-new-programming-language.org | 49 + orgs/essays/rational-and-a-name.org | 52 + orgs/essays/serene-simple-version.org | 257 ++++ orgs/essays/transaction-variants.org | 116 ++ orgs/faq.org | 63 + orgs/gpg.org | 15 + orgs/index.org | 28 +- orgs/sitemap.inc | 14 +- templates/blog.html | 13 +- templates/index.org | 21 +- 17 files changed, 2149 insertions(+), 33 deletions(-) create mode 100644 assets/js/highlight.pack.js create mode 100644 assets/styles/arta.css create mode 100644 orgs/coh.org create mode 100644 orgs/essays/choosing-the-target-platform.org create mode 100644 orgs/essays/my-new-programming-language.org create mode 100644 orgs/essays/rational-and-a-name.org create mode 100644 orgs/essays/serene-simple-version.org create mode 100644 orgs/essays/transaction-variants.org create mode 100644 orgs/faq.org create mode 100644 orgs/gpg.org diff --git a/.gitignore b/.gitignore index 21c2e83..7068cb5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ _tmp/ build/ orgs/categories/ orgs/tags/ +\#* +*.tex +*.pdf diff --git a/assets/js/highlight.pack.js b/assets/js/highlight.pack.js new file mode 100644 index 0000000..1c62da8 --- /dev/null +++ b/assets/js/highlight.pack.js @@ -0,0 +1,1178 @@ +/* + Highlight.js 10.5.0 (af20048d) + License: BSD-3-Clause + Copyright (c) 2006-2020, Ivan Sagalaev +*/ +var hljs=function(){"use strict";function e(t){ +return t instanceof Map?t.clear=t.delete=t.set=()=>{ +throw Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=()=>{ +throw Error("set is read-only") +}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((n=>{var s=t[n] +;"object"!=typeof s||Object.isFrozen(s)||e(s)})),t}var t=e,n=e;t.default=n +;class s{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data} +ignoreMatch(){this.ignore=!0}}function r(e){ +return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'") +}function a(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t] +;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n}const i=e=>!!e.kind +;class o{constructor(e,t){ +this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){ +this.buffer+=r(e)}openNode(e){if(!i(e))return;let t=e.kind +;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){ +i(e)&&(this.buffer+="")}value(){return this.buffer}span(e){ +this.buffer+=``}}class l{constructor(){this.rootNode={ +children:[]},this.stack=[this.rootNode]}get top(){ +return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ +this.top.children.push(e)}openNode(e){const t={kind:e,children:[]} +;this.add(t),this.stack.push(t)}closeNode(){ +if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ +for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} +walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){ +return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t), +t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){ +"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ +l._collapse(e)})))}}class c extends l{constructor(e){super(),this.options=e} +addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())} +addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root +;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){ +return new o(this,this.options).value()}finalize(){return!0}}function u(e){ +return e?"string"==typeof e?e:e.source:null} +const g="[a-zA-Z]\\w*",d="[a-zA-Z_]\\w*",h="\\b\\d+(\\.\\d+)?",f="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",p="\\b(0b[01]+)",m={ +begin:"\\\\[\\s\\S]",relevance:0},b={className:"string",begin:"'",end:"'", +illegal:"\\n",contains:[m]},x={className:"string",begin:'"',end:'"', +illegal:"\\n",contains:[m]},E={ +begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ +},v=(e,t,n={})=>{const s=a({className:"comment",begin:e,end:t,contains:[]},n) +;return s.contains.push(E),s.contains.push({className:"doctag", +begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),s +},N=v("//","$"),w=v("/\\*","\\*/"),R=v("#","$");var y=Object.freeze({ +__proto__:null,IDENT_RE:g,UNDERSCORE_IDENT_RE:d,NUMBER_RE:h,C_NUMBER_RE:f, +BINARY_NUMBER_RE:p, +RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", +SHEBANG:(e={})=>{const t=/^#![ ]*\// +;return e.binary&&(e.begin=((...e)=>e.map((e=>u(e))).join(""))(t,/.*\b/,e.binary,/\b.*/)), +a({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{ +0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:m,APOS_STRING_MODE:b, +QUOTE_STRING_MODE:x,PHRASAL_WORDS_MODE:E,COMMENT:v,C_LINE_COMMENT_MODE:N, +C_BLOCK_COMMENT_MODE:w,HASH_COMMENT_MODE:R,NUMBER_MODE:{className:"number", +begin:h,relevance:0},C_NUMBER_MODE:{className:"number",begin:f,relevance:0}, +BINARY_NUMBER_MODE:{className:"number",begin:p,relevance:0},CSS_NUMBER_MODE:{ +className:"number", +begin:h+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", +relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp", +begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[m,{begin:/\[/,end:/\]/, +relevance:0,contains:[m]}]}]},TITLE_MODE:{className:"title",begin:g,relevance:0 +},UNDERSCORE_TITLE_MODE:{className:"title",begin:d,relevance:0},METHOD_GUARD:{ +begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{ +"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{ +t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function _(e,t){ +"."===e.input[e.index-1]&&t.ignoreMatch()}function k(e,t){ +t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", +e.__beforeBegin=_,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords) +}function M(e,t){ +Array.isArray(e.illegal)&&(e.illegal=((...e)=>"("+e.map((e=>u(e))).join("|")+")")(...e.illegal)) +}function O(e,t){if(e.match){ +if(e.begin||e.end)throw Error("begin & end are not supported with match") +;e.begin=e.match,delete e.match}}function A(e,t){ +void 0===e.relevance&&(e.relevance=1)} +const L=["of","and","for","in","not","or","if","then","parent","list","value"] +;function B(e,t){return t?Number(t):(e=>L.includes(e.toLowerCase()))(e)?0:1} +function I(e,{plugins:t}){function n(t,n){ +return RegExp(u(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class s{ +constructor(){ +this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} +addRule(e,t){ +t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]), +this.matchAt+=(e=>RegExp(e.toString()+"|").exec("").length-1)(e)+1}compile(){ +0===this.regexes.length&&(this.exec=()=>null) +;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(((e,t="|")=>{ +const n=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;let s=0,r="" +;for(let a=0;a0&&(r+=t),r+="(";o.length>0;){const e=n.exec(o);if(null==e){r+=o;break} +r+=o.substring(0,e.index), +o=o.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+i):(r+=e[0], +"("===e[0]&&s++)}r+=")"}return r})(e),!0),this.lastIndex=0}exec(e){ +this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e) +;if(!t)return null +;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),s=this.matchIndexes[n] +;return t.splice(0,n),Object.assign(t,s)}}class r{constructor(){ +this.rules=[],this.multiRegexes=[], +this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ +if(this.multiRegexes[e])return this.multiRegexes[e];const t=new s +;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))), +t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){ +return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){ +this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){ +const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex +;let n=t.exec(e) +;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{ +const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)} +return n&&(this.regexIndex+=n.position+1, +this.regexIndex===this.count&&this.considerAll()),n}} +if(e.compilerExtensions||(e.compilerExtensions=[]), +e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") +;return e.classNameAliases=a(e.classNameAliases||{}),function t(s,i){const o=s +;if(s.compiled)return o +;[O].forEach((e=>e(s,i))),e.compilerExtensions.forEach((e=>e(s,i))), +s.__beforeBegin=null,[k,M,A].forEach((e=>e(s,i))),s.compiled=!0;let l=null +;if("object"==typeof s.keywords&&(l=s.keywords.$pattern, +delete s.keywords.$pattern),s.keywords&&(s.keywords=((e,t)=>{const n={} +;return"string"==typeof e?s("keyword",e):Object.keys(e).forEach((t=>{s(t,e[t]) +})),n;function s(e,s){t&&(s=s.toLowerCase()),s.split(" ").forEach((t=>{ +const s=t.split("|");n[s[0]]=[e,B(s[0],s[1])]}))} +})(s.keywords,e.case_insensitive)), +s.lexemes&&l)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ") +;return l=l||s.lexemes||/\w+/, +o.keywordPatternRe=n(l,!0),i&&(s.begin||(s.begin=/\B|\b/), +o.beginRe=n(s.begin),s.endSameAsBegin&&(s.end=s.begin), +s.end||s.endsWithParent||(s.end=/\B|\b/), +s.end&&(o.endRe=n(s.end)),o.terminatorEnd=u(s.end)||"", +s.endsWithParent&&i.terminatorEnd&&(o.terminatorEnd+=(s.end?"|":"")+i.terminatorEnd)), +s.illegal&&(o.illegalRe=n(s.illegal)), +s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>a(e,{ +variants:null},t)))),e.cachedVariants?e.cachedVariants:T(e)?a(e,{ +starts:e.starts?a(e.starts):null +}):Object.isFrozen(e)?a(e):e))("self"===e?s:e)))),s.contains.forEach((e=>{t(e,o) +})),s.starts&&t(s.starts,i),o.matcher=(e=>{const t=new r +;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin" +}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end" +}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(o),o}(e)}function T(e){ +return!!e&&(e.endsWithParent||T(e.starts))}function j(e){const t={ +props:["language","code","autodetect"],data:()=>({detectedLanguage:"", +unknownLanguage:!1}),computed:{className(){ +return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){ +if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`), +this.unknownLanguage=!0,r(this.code);let t={} +;return this.autoDetect?(t=e.highlightAuto(this.code), +this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals), +this.detectedLanguage=this.language),t.value},autoDetect(){ +return!(this.language&&(e=this.autodetect,!e&&""!==e));var e}, +ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{ +class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{ +Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const S={ +"after:highlightBlock":({block:e,result:t,text:n})=>{const s=D(e) +;if(!s.length)return;const a=document.createElement("div") +;a.innerHTML=t.value,t.value=((e,t,n)=>{let s=0,a="";const i=[];function o(){ +return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function c(e){ +a+=""}function u(e){("start"===e.event?l:c)(e.node)} +for(;e.length||t.length;){let t=o() +;if(a+=r(n.substring(s,t[0].offset)),s=t[0].offset,t===e){i.reverse().forEach(c) +;do{u(t.splice(0,1)[0]),t=o()}while(t===e&&t.length&&t[0].offset===s) +;i.reverse().forEach(l) +}else"start"===t[0].event?i.push(t[0].node):i.pop(),u(t.splice(0,1)[0])} +return a+r(n.substr(s))})(s,D(a),n)}};function P(e){ +return e.nodeName.toLowerCase()}function D(e){const t=[];return function e(n,s){ +for(let r=n.firstChild;r;r=r.nextSibling)3===r.nodeType?s+=r.nodeValue.length:1===r.nodeType&&(t.push({ +event:"start",offset:s,node:r}),s=e(r,s),P(r).match(/br|hr|img|input/)||t.push({ +event:"stop",offset:s,node:r}));return s}(e,0),t}const C=e=>{console.error(e) +},H=(e,...t)=>{console.log("WARN: "+e,...t)},$=(e,t)=>{ +console.log(`Deprecated as of ${e}. ${t}`)},U=r,z=a,K=Symbol("nomatch") +;return(e=>{const n=Object.create(null),r=Object.create(null),a=[];let i=!0 +;const o=/(^(<[^>]+>|\t|)+|\n)/gm,l="Could not find the language '{}', did you forget to load/include a language module?",u={ +disableAutodetect:!0,name:"Plain text",contains:[]};let g={ +noHighlightRe:/^(no-?highlight)$/i, +languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", +tabReplace:null,useBR:!1,languages:null,__emitter:c};function d(e){ +return g.noHighlightRe.test(e)}function h(e,t,n,s){const r={code:t,language:e} +;_("before:highlight",r);const a=r.result?r.result:f(r.language,r.code,n,s) +;return a.code=r.code,_("after:highlight",a),a}function f(e,t,r,o){const c=t +;function u(e,t){const n=w.case_insensitive?t[0].toLowerCase():t[0] +;return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]} +function d(){null!=_.subLanguage?(()=>{if(""===O)return;let e=null +;if("string"==typeof _.subLanguage){ +if(!n[_.subLanguage])return void M.addText(O) +;e=f(_.subLanguage,O,!0,k[_.subLanguage]),k[_.subLanguage]=e.top +}else e=p(O,_.subLanguage.length?_.subLanguage:null) +;_.relevance>0&&(A+=e.relevance),M.addSublanguage(e.emitter,e.language) +})():(()=>{if(!_.keywords)return void M.addText(O);let e=0 +;_.keywordPatternRe.lastIndex=0;let t=_.keywordPatternRe.exec(O),n="";for(;t;){ +n+=O.substring(e,t.index);const s=u(_,t);if(s){const[e,r]=s +;M.addText(n),n="",A+=r;const a=w.classNameAliases[e]||e;M.addKeyword(t[0],a) +}else n+=t[0];e=_.keywordPatternRe.lastIndex,t=_.keywordPatternRe.exec(O)} +n+=O.substr(e),M.addText(n)})(),O=""}function h(e){ +return e.className&&M.openNode(w.classNameAliases[e.className]||e.className), +_=Object.create(e,{parent:{value:_}}),_}function m(e,t,n){let r=((e,t)=>{ +const n=e&&e.exec(t);return n&&0===n.index})(e.endRe,n);if(r){if(e["on:end"]){ +const n=new s(e);e["on:end"](t,n),n.ignore&&(r=!1)}if(r){ +for(;e.endsParent&&e.parent;)e=e.parent;return e}} +if(e.endsWithParent)return m(e.parent,t,n)}function b(e){ +return 0===_.matcher.regexIndex?(O+=e[0],1):(T=!0,0)}function x(e){ +const t=e[0],n=c.substr(e.index),s=m(_,e,n);if(!s)return K;const r=_ +;r.skip?O+=t:(r.returnEnd||r.excludeEnd||(O+=t),d(),r.excludeEnd&&(O=t));do{ +_.className&&M.closeNode(),_.skip||_.subLanguage||(A+=_.relevance),_=_.parent +}while(_!==s.parent) +;return s.starts&&(s.endSameAsBegin&&(s.starts.endRe=s.endRe), +h(s.starts)),r.returnEnd?0:t.length}let E={};function v(t,n){const a=n&&n[0] +;if(O+=t,null==a)return d(),0 +;if("begin"===E.type&&"end"===n.type&&E.index===n.index&&""===a){ +if(O+=c.slice(n.index,n.index+1),!i){const t=Error("0 width match regex") +;throw t.languageName=e,t.badRule=E.rule,t}return 1} +if(E=n,"begin"===n.type)return function(e){ +const t=e[0],n=e.rule,r=new s(n),a=[n.__beforeBegin,n["on:begin"]] +;for(const n of a)if(n&&(n(e,r),r.ignore))return b(t) +;return n&&n.endSameAsBegin&&(n.endRe=RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")), +n.skip?O+=t:(n.excludeBegin&&(O+=t), +d(),n.returnBegin||n.excludeBegin||(O=t)),h(n),n.returnBegin?0:t.length}(n) +;if("illegal"===n.type&&!r){ +const e=Error('Illegal lexeme "'+a+'" for mode "'+(_.className||"")+'"') +;throw e.mode=_,e}if("end"===n.type){const e=x(n);if(e!==K)return e} +if("illegal"===n.type&&""===a)return 1 +;if(B>1e5&&B>3*n.index)throw Error("potential infinite loop, way more iterations than matches") +;return O+=a,a.length}const w=N(e) +;if(!w)throw C(l.replace("{}",e)),Error('Unknown language: "'+e+'"') +;const R=I(w,{plugins:a});let y="",_=o||R;const k={},M=new g.__emitter(g);(()=>{ +const e=[];for(let t=_;t!==w;t=t.parent)t.className&&e.unshift(t.className) +;e.forEach((e=>M.openNode(e)))})();let O="",A=0,L=0,B=0,T=!1;try{ +for(_.matcher.considerAll();;){ +B++,T?T=!1:_.matcher.considerAll(),_.matcher.lastIndex=L +;const e=_.matcher.exec(c);if(!e)break;const t=v(c.substring(L,e.index),e) +;L=e.index+t}return v(c.substr(L)),M.closeAllNodes(),M.finalize(),y=M.toHTML(),{ +relevance:A,value:y,language:e,illegal:!1,emitter:M,top:_}}catch(t){ +if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{ +msg:t.message,context:c.slice(L-100,L+100),mode:t.mode},sofar:y,relevance:0, +value:U(c),emitter:M};if(i)return{illegal:!1,relevance:0,value:U(c),emitter:M, +language:e,top:_,errorRaised:t};throw t}}function p(e,t){ +t=t||g.languages||Object.keys(n);const s=(e=>{const t={relevance:0, +emitter:new g.__emitter(g),value:U(e),illegal:!1,top:u} +;return t.emitter.addText(e),t})(e),r=t.filter(N).filter(R).map((t=>f(t,e,!1))) +;r.unshift(s);const a=r.sort(((e,t)=>{ +if(e.relevance!==t.relevance)return t.relevance-e.relevance +;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1 +;if(N(t.language).supersetOf===e.language)return-1}return 0})),[i,o]=a,l=i +;return l.second_best=o,l}const m={"before:highlightBlock":({block:e})=>{ +g.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")) +},"after:highlightBlock":({result:e})=>{ +g.useBR&&(e.value=e.value.replace(/\n/g,"
"))}},b=/^(<[^>]+>|\t)+/gm,x={ +"after:highlightBlock":({result:e})=>{ +g.tabReplace&&(e.value=e.value.replace(b,(e=>e.replace(/\t/g,g.tabReplace))))}} +;function E(e){let t=null;const n=(e=>{let t=e.className+" " +;t+=e.parentNode?e.parentNode.className:"";const n=g.languageDetectRe.exec(t) +;if(n){const t=N(n[1]) +;return t||(H(l.replace("{}",n[1])),H("Falling back to no-highlight mode for this block.",e)), +t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>d(e)||N(e)))})(e) +;if(d(n))return;_("before:highlightBlock",{block:e,language:n}),t=e +;const s=t.textContent,a=n?h(n,s,!0):p(s);_("after:highlightBlock",{block:e, +result:a,text:s}),e.innerHTML=a.value,((e,t,n)=>{const s=t?r[t]:n +;e.classList.add("hljs"),s&&e.classList.add(s)})(e,n,a.language),e.result={ +language:a.language,re:a.relevance,relavance:a.relevance +},a.second_best&&(e.second_best={language:a.second_best.language, +re:a.second_best.relevance,relavance:a.second_best.relevance})}const v=()=>{ +v.called||(v.called=!0,document.querySelectorAll("pre code").forEach(E))} +;function N(e){return e=(e||"").toLowerCase(),n[e]||n[r[e]]} +function w(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e]=t +}))}function R(e){const t=N(e);return t&&!t.disableAutodetect}function _(e,t){ +const n=e;a.forEach((e=>{e[n]&&e[n](t)}))}Object.assign(e,{highlight:h, +highlightAuto:p,fixMarkup:e=>{ +return $("10.2.0","fixMarkup will be removed entirely in v11.0"), +$("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"), +t=e, +g.tabReplace||g.useBR?t.replace(o,(e=>"\n"===e?g.useBR?"
":e:g.tabReplace?e.replace(/\t/g,g.tabReplace):e)):t +;var t},highlightBlock:E,configure:e=>{ +e.useBR&&($("10.3.0","'useBR' will be removed entirely in v11.0"), +$("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")), +g=z(g,e)},initHighlighting:v,initHighlightingOnLoad:()=>{ +window.addEventListener("DOMContentLoaded",v,!1)},registerLanguage:(t,s)=>{ +let r=null;try{r=s(e)}catch(e){ +if(C("Language definition for '{}' could not be registered.".replace("{}",t)), +!i)throw e;C(e),r=u} +r.name||(r.name=t),n[t]=r,r.rawDefinition=s.bind(null,e),r.aliases&&w(r.aliases,{ +languageName:t})},listLanguages:()=>Object.keys(n),getLanguage:N, +registerAliases:w,requireLanguage:e=>{ +$("10.4.0","requireLanguage will be removed entirely in v11."), +$("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844") +;const t=N(e);if(t)return t +;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))}, +autoDetection:R,inherit:z,addPlugin:e=>{a.push(e)},vuePlugin:j(e).VuePlugin +}),e.debugMode=()=>{i=!1},e.safeMode=()=>{i=!0},e.versionString="10.5.0" +;for(const e in y)"object"==typeof y[e]&&t(y[e]) +;return Object.assign(e,y),e.addPlugin(m),e.addPlugin(S),e.addPlugin(x),e})({}) +}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);hljs.registerLanguage("latex",(()=>{"use strict";return e=>{const n=[{ +begin:/\^{6}[0-9a-f]{6}/},{begin:/\^{5}[0-9a-f]{5}/},{begin:/\^{4}[0-9a-f]{4}/ +},{begin:/\^{3}[0-9a-f]{3}/},{begin:/\^{2}[0-9a-f]{2}/},{ +begin:/\^{2}[\u0000-\u007f]/}],a=[{className:"keyword",begin:/\\/,relevance:0, +contains:[{endsParent:!0,begin:((...e)=>"("+e.map((e=>{ +return(n=e)?"string"==typeof n?n:n.source:null;var n +})).join("|")+")")(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map((e=>e+"(?![a-zA-Z@:_])"))) +},{endsParent:!0, +begin:RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}","[qs]__?[a-zA-Z](?:_?[a-zA-Z])+","use(?:_i)?:[a-zA-Z]*","(?:else|fi|or):","(?:if|cs|exp):w","(?:hbox|vbox):n","::[a-zA-Z]_unbraced","::[a-zA-Z:]"].map((e=>e+"(?![a-zA-Z:_])")).join("|")) +},{endsParent:!0,variants:n},{endsParent:!0,relevance:0,variants:[{ +begin:/[a-zA-Z@]+/},{begin:/[^a-zA-Z@]?/}]}]},{className:"params",relevance:0, +begin:/#+\d?/},{variants:n},{className:"built_in",relevance:0,begin:/[$&^_]/},{ +className:"meta",begin:"% !TeX",end:"$",relevance:10},e.COMMENT("%","$",{ +relevance:0})],i={begin:/\{/,end:/\}/,relevance:0,contains:["self",...a] +},t=e.inherit(i,{relevance:0,endsParent:!0,contains:[i,...a]}),r={begin:/\[/, +end:/\]/,endsParent:!0,relevance:0,contains:[i,...a]},s={begin:/\s+/,relevance:0 +},c=[t],l=[r],o=(e,n)=>({contains:[s],starts:{relevance:0,contains:e,starts:n} +}),d=(e,n)=>({begin:"\\\\"+e+"(?![a-zA-Z@:_])",keywords:{$pattern:/\\[a-zA-Z]+/, +keyword:"\\"+e},relevance:0,contains:[s],starts:n}),g=(n,a)=>e.inherit({ +begin:"\\\\begin(?=[ \t]*(\\r?\\n[ \t]*)?\\{"+n+"\\})",keywords:{ +$pattern:/\\[a-zA-Z]+/,keyword:"\\begin"},relevance:0 +},o(c,a)),m=(n="string")=>e.END_SAME_AS_BEGIN({className:n,begin:/(.|\r?\n)/, +end:/(.|\r?\n)/,excludeBegin:!0,excludeEnd:!0,endsParent:!0}),b=e=>({ +className:"string",end:"(?=\\\\end\\{"+e+"\\})"}),p=(e="string")=>({relevance:0, +begin:/\{/,starts:{endsParent:!0,contains:[{className:e,end:/(?=\})/, +endsParent:!0,contains:[{begin:/\{/,end:/\}/,relevance:0,contains:["self"]}]}]} +});return{name:"LaTeX",aliases:["TeX"], +contains:[...["verb","lstinline"].map((e=>d(e,{contains:[m()]}))),d("mint",o(c,{ +contains:[m()]})),d("mintinline",o(c,{contains:[p(),m()]})),d("url",{ +contains:[p("link"),p("link")]}),d("hyperref",{contains:[p("link")] +}),d("href",o(l,{contains:[p("link")] +})),...[].concat(...["","\\*"].map((e=>[g("verbatim"+e,b("verbatim"+e)),g("filecontents"+e,o(c,b("filecontents"+e))),...["","B","L"].map((n=>g(n+"Verbatim"+e,o(l,b(n+"Verbatim"+e)))))]))),g("minted",o(l,o(c,b("minted")))),...a] +}}})());hljs.registerLanguage("lisp",(()=>{"use strict";return e=>{ +var n="[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*",a="\\|[^]*?\\|",i="(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|-)?\\d+)?",s={ +className:"literal",begin:"\\b(t{1}|nil)\\b"},l={className:"number",variants:[{ +begin:i,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{ +begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{ +begin:"#(c|C)\\("+i+" +"+i,end:"\\)"}]},b=e.inherit(e.QUOTE_STRING_MODE,{ +illegal:null}),g=e.COMMENT(";","$",{relevance:0}),r={begin:"\\*",end:"\\*"},t={ +className:"symbol",begin:"[:&]"+n},c={begin:n,relevance:0},d={begin:a},o={ +contains:[l,b,r,t,{begin:"\\(",end:"\\)",contains:["self",s,b,l,c]},c], +variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{ +name:"quote"}},{begin:"'"+a}]},v={variants:[{begin:"'"+n},{ +begin:"#'"+n+"(::"+n+")*"}]},m={begin:"\\(\\s*",end:"\\)"},u={endsWithParent:!0, +relevance:0};return m.contains=[{className:"name",variants:[{begin:n,relevance:0 +},{begin:a}]},u],u.contains=[o,v,m,s,l,b,g,r,t,d,c],{name:"Lisp",illegal:/\S/, +contains:[l,e.SHEBANG(),s,b,g,o,v,m,c]}}})());hljs.registerLanguage("haskell",(()=>{"use strict";return e=>{const n={ +variants:[e.COMMENT("--","$"),e.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},i={ +className:"meta",begin:/\{-#/,end:/#-\}/},a={className:"meta",begin:"^#",end:"$" +},s={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},l={begin:"\\(", +end:"\\)",illegal:'"',contains:[i,a,{className:"type", +begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{ +begin:"[_a-z][\\w']*"}),n]};return{name:"Haskell",aliases:["hs"], +keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec", +contains:[{beginKeywords:"module",end:"where",keywords:"module where", +contains:[l,n],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$", +keywords:"import qualified as hiding",contains:[l,n],illegal:"\\W\\.|;"},{ +className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where", +keywords:"class family instance where",contains:[s,l,n]},{className:"class", +begin:"\\b(data|(new)?type)\\b",end:"$", +keywords:"data family type newtype deriving",contains:[i,s,l,{begin:/\{/, +end:/\}/,contains:l.contains},n]},{beginKeywords:"default",end:"$", +contains:[s,l,n]},{beginKeywords:"infix infixl infixr",end:"$", +contains:[e.C_NUMBER_MODE,n]},{begin:"\\bforeign\\b",end:"$", +keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe", +contains:[s,e.QUOTE_STRING_MODE,n]},{className:"meta", +begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$" +},i,a,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,s,e.inherit(e.TITLE_MODE,{ +begin:"^[_a-z][\\w']*"}),n,{begin:"->|<-"}]}}})());hljs.registerLanguage("properties",(()=>{"use strict";return e=>{ +var n="[ \\t\\f]*",a=n+"[:=]"+n,t="("+a+"|[ \\t\\f]+)",r="([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",s="([^\\\\:= \\t\\f\\n]|\\\\.)+",i={ +end:t,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{ +begin:"\\\\\\\\"},{begin:"\\\\\\n"}]}};return{name:".properties", +case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{ +returnBegin:!0,variants:[{begin:r+a,relevance:1},{begin:r+"[ \\t\\f]+", +relevance:0}],contains:[{className:"attr",begin:r,endsParent:!0,relevance:0}], +starts:i},{begin:s+t,returnBegin:!0,relevance:0,contains:[{className:"meta", +begin:s,endsParent:!0,relevance:0}],starts:i},{className:"attr",relevance:0, +begin:s+n+"$"}]}}})());hljs.registerLanguage("scala",(()=>{"use strict";return e=>{const n={ +className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:/\$\{/,end:/\}/}] +},a={className:"string",variants:[{begin:'"',end:'"',illegal:"\\n", +contains:[e.BACKSLASH_ESCAPE]},{begin:'"""',end:'"""',relevance:10},{ +begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,n]},{ +className:"string",begin:'[a-z]+"""',end:'"""',contains:[n],relevance:10}]},s={ +className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},t={ +className:"title", +begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/, +relevance:0},i={className:"class",beginKeywords:"class object trait type", +end:/[:={\[\n;]/,excludeEnd:!0, +contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{ +beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0, +excludeEnd:!0,relevance:0,contains:[s]},{className:"params",begin:/\(/,end:/\)/, +excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[s]},t]},l={ +className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0, +contains:[t]};return{name:"Scala",keywords:{literal:"true false null", +keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit" +},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{className:"symbol", +begin:"'\\w[\\w\\d_]*(?!')"},s,l,i,e.C_NUMBER_MODE,{className:"meta", +begin:"@[A-Za-z]+"}]}}})());hljs.registerLanguage("diff",(()=>{"use strict";return e=>({name:"Diff", +aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{ +begin:/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{ +begin:/^--- +\d+,\d+ +----$/}]},{className:"comment",variants:[{begin:/Index: /, +end:/$/},{begin:/^index/,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^-{3}/,end:/$/ +},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/},{ +begin:/^diff --git/,end:/$/}]},{className:"addition",begin:/^\+/,end:/$/},{ +className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/, +end:/$/}]})})());hljs.registerLanguage("cpp",(()=>{"use strict";function e(e){ +return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") +}return t=>{const n=(t=>{const n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}] +}),r="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+e(r)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",s={ +className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},i={className:"string", +variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", +contains:[t.BACKSLASH_ESCAPE]},{ +begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", +end:"'",illegal:"."},t.END_SAME_AS_BEGIN({ +begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={ +className:"number",variants:[{begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" +},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},o={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ +"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" +},contains:[{begin:/\\\n/,relevance:0},t.inherit(i,{className:"meta-string"}),{ +className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n" +},n,t.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:e(r)+t.IDENT_RE, +relevance:0},d=e(r)+t.IDENT_RE+"\\s*\\(",u={ +keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", +built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", +literal:"true false nullptr NULL"},p=[o,s,n,t.C_BLOCK_COMMENT_MODE,c,i],m={ +variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ +beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:p.concat([{ +begin:/\(/,end:/\)/,keywords:u,contains:p.concat(["self"]),relevance:0}]), +relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d, +returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/, +contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d, +returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/, +end:/\)/,keywords:u,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,i,c,s,{ +begin:/\(/,end:/\)/,keywords:u,relevance:0, +contains:["self",n,t.C_BLOCK_COMMENT_MODE,i,c,s]}] +},s,n,t.C_BLOCK_COMMENT_MODE,o]};return{ +aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:u, +disableAutodetect:!0,illegal:"",keywords:u,contains:["self",s]},{begin:t.IDENT_RE+"::",keywords:u},{ +className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, +contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{ +preprocessor:o,strings:i,keywords:u}}})(t) +;return n.disableAutodetect=!1,n.name="C++", +n.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],n}})());hljs.registerLanguage("kotlin",(()=>{"use strict" +;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={ +className:"number",variants:[{ +begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` +},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ +begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{ +begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` +},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{ +begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], +relevance:0};return e=>{const n={ +keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual", +built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing", +literal:"true false null"},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@" +},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},t={ +className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string", +variants:[{begin:'"""',end:'"""(?=[^"])',contains:[t,s]},{begin:"'",end:"'", +illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/, +contains:[e.BACKSLASH_ESCAPE,t,s]}]};s.contains.push(r);const l={ +className:"meta", +begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?" +},c={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/, +end:/\)/,contains:[e.inherit(r,{className:"meta-string"})]}] +},o=a,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),E={ +variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/, +contains:[]}]},d=E;return d.variants[1].contains=[E],E.variants[1].contains=[d], +{name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{ +relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}] +}),e.C_LINE_COMMENT_MODE,b,{className:"keyword", +begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol", +begin:/@\w+/}]}},i,l,c,{className:"function",beginKeywords:"fun",end:"[(]|$", +returnBegin:!0,excludeEnd:!0,keywords:n,relevance:5,contains:[{ +begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, +contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://, +keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/, +endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/, +endsWithParent:!0,contains:[E,e.C_LINE_COMMENT_MODE,b],relevance:0 +},e.C_LINE_COMMENT_MODE,b,l,c,r,e.C_NUMBER_MODE]},b]},{className:"class", +beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0, +illegal:"extends implements",contains:[{ +beginKeywords:"public protected internal private constructor" +},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0, +excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/, +excludeBegin:!0,returnEnd:!0},l,c]},r,{className:"meta",begin:"^#!/usr/bin/env", +end:"$",illegal:"\n"},o]}}})());hljs.registerLanguage("ruby",(()=>{"use strict";function e(...e){ +return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n +})).join("")}return n=>{ +var a,i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s={ +keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__", +built_in:"proc lambda",literal:"true false nil"},r={className:"doctag", +begin:"@[A-Za-z]+"},b={begin:"#<",end:">"},t=[n.COMMENT("#","$",{contains:[r] +}),n.COMMENT("^=begin","^=end",{contains:[r],relevance:10 +}),n.COMMENT("^__END__","\\n$")],c={className:"subst",begin:/#\{/,end:/\}/, +keywords:s},d={className:"string",contains:[n.BACKSLASH_ESCAPE,c],variants:[{ +begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/, +end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{ +begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/, +end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{ +begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{ +begin:/<<[-~]?'?(\w+)\n(?:[^\n]*\n)*?\s*\1\b/,returnBegin:!0,contains:[{ +begin:/<<[-~]?'?/},n.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/, +contains:[n.BACKSLASH_ESCAPE,c]})]}]},g="[0-9](_?[0-9])*",l={className:"number", +relevance:0,variants:[{ +begin:`\\b([1-9](_?[0-9])*|0)(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{ +begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b" +},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{ +begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{ +begin:"\\b0(_?[0-7])+r?i?\\b"}]},o={className:"params",begin:"\\(",end:"\\)", +endsParent:!0,keywords:s},_=[d,{className:"class",beginKeywords:"class module", +end:"$|;",illegal:/=/,contains:[n.inherit(n.TITLE_MODE,{ +begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{ +begin:"("+n.IDENT_RE+"::)?"+n.IDENT_RE}]}].concat(t)},{className:"function", +begin:e(/def\s*/,(a=i+"\\s*(\\(|;|$)",e("(?=",a,")"))),keywords:"def",end:"$|;", +contains:[n.inherit(n.TITLE_MODE,{begin:i}),o].concat(t)},{begin:n.IDENT_RE+"::" +},{className:"symbol",begin:n.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{ +className:"symbol",begin:":(?!\\s)",contains:[d,{begin:i}],relevance:0},l,{ +className:"variable", +begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{ +className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:s},{ +begin:"("+n.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{ +className:"regexp",contains:[n.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{ +begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(", +end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}] +}].concat(b,t),relevance:0}].concat(b,t);c.contains=_,o.contains=_;var E=[{ +begin:/^\s*=>/,starts:{end:"$",contains:_}},{className:"meta", +begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])", +starts:{end:"$",contains:_}}];return t.unshift(b),{name:"Ruby", +aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/, +contains:[n.SHEBANG({binary:"ruby"})].concat(E).concat(t).concat(_)}}})());hljs.registerLanguage("scheme",(()=>{"use strict";return e=>{ +const t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",n={$pattern:t, +"builtin-name":"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?" +},r={className:"literal",begin:"(#t|#f|#\\\\"+t+"|#\\\\.)"},a={ +className:"number",variants:[{begin:"(-|\\+)?\\d+([./]\\d+)?",relevance:0},{ +begin:"(-|\\+)?\\d+([./]\\d+)?[+\\-](-|\\+)?\\d+([./]\\d+)?i",relevance:0},{ +begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{ +begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},i=e.QUOTE_STRING_MODE,c=[e.COMMENT(";","$",{ +relevance:0}),e.COMMENT("#\\|","\\|#")],s={begin:t,relevance:0},l={ +className:"symbol",begin:"'"+t},o={endsWithParent:!0,relevance:0},g={variants:[{ +begin:/'/},{begin:"`"}],contains:[{begin:"\\(",end:"\\)", +contains:["self",r,i,a,s,l]}]},u={className:"name",relevance:0,begin:t, +keywords:n},d={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}], +contains:[{begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[u,{ +endsParent:!0,variants:[{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/}], +contains:[s]}]},u,o]};return o.contains=[r,a,i,s,l,g,d].concat(c),{ +name:"Scheme",illegal:/\S/,contains:[e.SHEBANG(),a,i,l,g,d].concat(c)}}})());hljs.registerLanguage("http",(()=>{"use strict";function e(...e){ +return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n +})).join("")}return n=>{const a="HTTP/(2|1\\.[01])",s=[{className:"attribute", +begin:e("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{ +className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]} +},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{ +name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+a+" \\d{3})", +end:/$/,contains:[{className:"meta",begin:a},{className:"number", +begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:s}},{ +begin:"(?=^[A-Z]+ (.*?) "+a+"$)",end:/$/,contains:[{className:"string", +begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:a},{ +className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:s} +}]}}})());hljs.registerLanguage("elixir",(()=>{"use strict";return e=>{ +const n="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",i={$pattern:n, +keyword:"and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote require import with|0" +},a={className:"subst",begin:/#\{/,end:/\}/,keywords:i},s={className:"number", +begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[1-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)", +relevance:0},b={className:"string",begin:"~[a-z](?=[/|([{<\"'])",contains:[{ +endsParent:!0,contains:[{contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:/"/, +end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{ +begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin://}]}]}]},d={className:"string",contains:[e.BACKSLASH_ESCAPE,a],variants:[{ +begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/, +contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/, +contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/, +end:/"/}]},r={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/, +contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})]},g=e.inherit(r,{ +className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord", +end:/\bdo\b|$|;/}),t=[d,{className:"string",begin:"~[A-Z](?=[/|([{<\"'])", +contains:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{ +begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/, +end:/\}/},{begin://}]},b,e.HASH_COMMENT_MODE,g,r,{begin:"::"},{ +className:"symbol",begin:":(?![\\s:])",contains:[d,{ +begin:"[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?" +}],relevance:0},{className:"symbol",begin:n+":(?!:)",relevance:0},s,{ +className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"},{begin:"->"},{ +begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[e.HASH_COMMENT_MODE,{ +begin:/\/: (?=\d+\s*[,\]])/,relevance:0,contains:[s]},{className:"regexp", +illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:"/",end:"/[a-z]*" +},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return a.contains=t,{ +name:"Elixir",keywords:i,contains:t}}})());hljs.registerLanguage("arduino",(()=>{"use strict";function e(e){ +return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") +}return t=>{const r=function(t){const r=(t=>{const r=t.COMMENT("//","$",{ +contains:[{begin:/\\\n/}] +}),n="[a-zA-Z_]\\w*::",i="(decltype\\(auto\\)|"+e(n)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",a={ +className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string", +variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", +contains:[t.BACKSLASH_ESCAPE]},{ +begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", +end:"'",illegal:"."},t.END_SAME_AS_BEGIN({ +begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={ +className:"number",variants:[{begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" +},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},l={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ +"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" +},contains:[{begin:/\\\n/,relevance:0},t.inherit(s,{className:"meta-string"}),{ +className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n" +},r,t.C_BLOCK_COMMENT_MODE]},c={className:"title",begin:e(n)+t.IDENT_RE, +relevance:0},d=e(n)+t.IDENT_RE+"\\s*\\(",u={ +keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", +built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", +literal:"true false nullptr NULL"},m=[l,a,r,t.C_BLOCK_COMMENT_MODE,o,s],p={ +variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ +beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:m.concat([{ +begin:/\(/,end:/\)/,keywords:u,contains:m.concat(["self"]),relevance:0}]), +relevance:0},g={className:"function",begin:"("+i+"[\\*&\\s]+)+"+d, +returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/, +contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d, +returnBegin:!0,contains:[c],relevance:0},{className:"params",begin:/\(/, +end:/\)/,keywords:u,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,s,o,a,{ +begin:/\(/,end:/\)/,keywords:u,relevance:0, +contains:["self",r,t.C_BLOCK_COMMENT_MODE,s,o,a]}] +},a,r,t.C_BLOCK_COMMENT_MODE,l]};return{ +aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:u, +disableAutodetect:!0,illegal:"",keywords:u,contains:["self",a]},{begin:t.IDENT_RE+"::",keywords:u},{ +className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, +contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{ +preprocessor:l,strings:s,keywords:u}}})(t) +;return r.disableAutodetect=!1,r.name="C++", +r.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],r}(t),n=r.keywords +;return n.keyword+=" boolean byte word String", +n.literal+=" DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL DEFAULT OUTPUT INPUT HIGH LOW", +n.built_in+=" setup loop KeyboardController MouseController SoftwareSerial EthernetServer EthernetClient LiquidCrystal RobotControl GSMVoiceCall EthernetUDP EsploraTFT HttpClient RobotMotor WiFiClient GSMScanner FileSystem Scheduler GSMServer YunClient YunServer IPAddress GSMClient GSMModem Keyboard Ethernet Console GSMBand Esplora Stepper Process WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage Client Server GSMPIN FileIO Bridge Serial EEPROM Stream Mouse Audio Servo File Task GPRS WiFi Wire TFT GSM SPI SD runShellCommandAsynchronously analogWriteResolution retrieveCallingNumber printFirmwareVersion analogReadResolution sendDigitalPortPair noListenOnLocalhost readJoystickButton setFirmwareVersion readJoystickSwitch scrollDisplayRight getVoiceCallStatus scrollDisplayLeft writeMicroseconds delayMicroseconds beginTransmission getSignalStrength runAsynchronously getAsynchronously listenOnLocalhost getCurrentCarrier readAccelerometer messageAvailable sendDigitalPorts lineFollowConfig countryNameWrite runShellCommand readStringUntil rewindDirectory readTemperature setClockDivider readLightSensor endTransmission analogReference detachInterrupt countryNameRead attachInterrupt encryptionType readBytesUntil robotNameWrite readMicrophone robotNameRead cityNameWrite userNameWrite readJoystickY readJoystickX mouseReleased openNextFile scanNetworks noInterrupts digitalWrite beginSpeaker mousePressed isActionDone mouseDragged displayLogos noAutoscroll addParameter remoteNumber getModifiers keyboardRead userNameRead waitContinue processInput parseCommand printVersion readNetworks writeMessage blinkVersion cityNameRead readMessage setDataMode parsePacket isListening setBitOrder beginPacket isDirectory motorsWrite drawCompass digitalRead clearScreen serialEvent rightToLeft setTextSize leftToRight requestFrom keyReleased compassRead analogWrite interrupts WiFiServer disconnect playMelody parseFloat autoscroll getPINUsed setPINUsed setTimeout sendAnalog readSlider analogRead beginWrite createChar motorsStop keyPressed tempoWrite readButton subnetMask debugPrint macAddress writeGreen randomSeed attachGPRS readString sendString remotePort releaseAll mouseMoved background getXChange getYChange answerCall getResult voiceCall endPacket constrain getSocket writeJSON getButton available connected findUntil readBytes exitValue readGreen writeBlue startLoop IPAddress isPressed sendSysex pauseMode gatewayIP setCursor getOemKey tuneWrite noDisplay loadImage switchPIN onRequest onReceive changePIN playFile noBuffer parseInt overflow checkPIN knobRead beginTFT bitClear updateIR bitWrite position writeRGB highByte writeRed setSpeed readBlue noStroke remoteIP transfer shutdown hangCall beginSMS endWrite attached maintain noCursor checkReg checkPUK shiftOut isValid shiftIn pulseIn connect println localIP pinMode getIMEI display noBlink process getBand running beginSD drawBMP lowByte setBand release bitRead prepare pointTo readRed setMode noFill remove listen stroke detach attach noTone exists buffer height bitSet circle config cursor random IRread setDNS endSMS getKey micros millis begin print write ready flush width isPIN blink clear press mkdir rmdir close point yield image BSSID click delay read text move peek beep rect line open seek fill size turn stop home find step tone sqrt RSSI SSID end bit tan cos sin pow map abs max min get run put", +r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}})());hljs.registerLanguage("python",(()=>{"use strict";return e=>{const n={ +keyword:"and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal|10 not or pass raise return try while with yield", +built_in:"__import__ abs all any ascii bin bool breakpoint bytearray bytes callable chr classmethod compile complex delattr dict dir divmod enumerate eval exec filter float format frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len list locals map max memoryview min next object oct open ord pow print property range repr reversed round set setattr slice sorted staticmethod str sum super tuple type vars zip", +literal:"__debug__ Ellipsis False None NotImplemented True"},a={ +className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/, +end:/\}/,keywords:n,illegal:/#/},i={begin:/\{\{/,relevance:0},r={ +className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, +contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{ +begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,a,i,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, +end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,i,s]},{begin:/([uU]|[rR])'/,end:/'/, +relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ +begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, +end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, +contains:[e.BACKSLASH_ESCAPE,i,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,i,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] +},t="[0-9](_?[0-9])*",l=`(\\b(${t}))?\\.(${t})|\\b(${t})\\.`,b={ +className:"number",relevance:0,variants:[{ +begin:`(\\b(${t})|(${l}))[eE][+-]?(${t})[jJ]?\\b`},{begin:`(${l})[jJ]?`},{ +begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{ +begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{ +begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${t})[jJ]\\b`}]},o={ +className:"params",variants:[{begin:/\(\s*\)/,skip:!0,className:null},{ +begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n, +contains:["self",a,b,r,e.HASH_COMMENT_MODE]}]};return s.contains=[r,b,a],{ +name:"Python",aliases:["py","gyp","ipython"],keywords:n, +illegal:/(<\/|->|\?)|=>/,contains:[a,b,{begin:/\bself\b/},{beginKeywords:"if", +relevance:0},r,e.HASH_COMMENT_MODE,{variants:[{className:"function", +beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/, +illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,o,{begin:/->/, +endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/, +end:/(?=#)|$/,contains:[b,o,r]},{begin:/\b(print|exec)\(/}]}}})());hljs.registerLanguage("python-repl",(()=>{"use strict";return s=>({ +aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$", +subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{ +begin:/^\.\.\.(?=[ ]|$)/}]}]})})());hljs.registerLanguage("sml",(()=>{"use strict";return e=>({ +name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?", +keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while", +built_in:"array bool char exn int list option order real ref string substring vector unit word", +literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/, +contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0 +},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol", +begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{ +className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{ +begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string", +relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number", +begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)", +relevance:0},{begin:/[-=]>/}]})})());hljs.registerLanguage("java",(()=>{"use strict" +;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={ +className:"number",variants:[{ +begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` +},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ +begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{ +begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` +},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{ +begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], +relevance:0};return e=>{ +var n="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s={ +className:"meta",begin:"@[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*", +contains:[{begin:/\(/,end:/\)/,contains:["self"]}]};const r=a;return{ +name:"Java",aliases:["jsp"],keywords:n,illegal:/<\/|#/, +contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/, +relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{ +begin:/import java\.[a-z]+\./,keywords:"import",relevance:2 +},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{ +className:"class",beginKeywords:"class interface enum",end:/[{;=]/, +excludeEnd:!0,keywords:"class interface enum",illegal:/[:"\[\]]/,contains:[{ +beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{ +beginKeywords:"new throw return else",relevance:0},{className:"class", +begin:"record\\s+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,excludeEnd:!0, +end:/[{;=]/,keywords:n,contains:[{beginKeywords:"record"},{ +begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, +contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/, +keywords:n,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE] +},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"function", +begin:"([\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(<[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(\\s*,\\s*[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(", +returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{ +begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, +contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/, +keywords:n,relevance:0, +contains:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE] +},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r,s]}}})());hljs.registerLanguage("nginx",(()=>{"use strict";return e=>{const n={ +className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/\}/},{ +begin:/[$@]/+e.UNDERSCORE_IDENT_RE}]},a={endsWithParent:!0,keywords:{ +$pattern:"[a-z/_]+", +literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll" +},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string", +contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/ +}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n] +},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^", +end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{ +begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number", +begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{ +className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},n]};return{ +name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{ +begin:e.UNDERSCORE_IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\{/,contains:[{ +className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{ +begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|\\{",returnBegin:!0,contains:[{ +className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:a}],relevance:0}], +illegal:"[^\\s\\}]"}}})());hljs.registerLanguage("xml",(()=>{"use strict";function e(e){ +return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")} +function a(...n){return n.map((n=>e(n))).join("")}function s(...n){ +return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ +const t=a(/[A-Z_]/,a("(",/[A-Z0-9_.-]+:/,")?"),/[A-Z0-9_.-]*/),i={ +className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/, +contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}] +},c=e.inherit(r,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{ +className:"meta-string"}),g=e.inherit(e.QUOTE_STRING_MODE,{ +className:"meta-string"}),m={endsWithParent:!0,illegal:/`]+/}]}] +}]};return{name:"HTML, XML", +aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"], +case_insensitive:!0,contains:[{className:"meta",begin://, +relevance:10,contains:[r,g,l,c,{begin:/\[/,end:/\]/,contains:[{className:"meta", +begin://,contains:[r,c,g,l]}]}]},e.COMMENT(//,{ +relevance:10}),{begin://,relevance:10},i,{ +className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{ +end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{ +end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{ +className:"tag",begin:/<>|<\/>/},{className:"tag", +begin:a(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name", +begin:t,relevance:0,starts:m}]},{className:"tag",begin:a(/<\//,n(a(t,/>/))), +contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0}]}]}} +})());hljs.registerLanguage("markdown",(()=>{"use strict";function n(...n){ +return n.map((n=>{return(e=n)?"string"==typeof e?e:e.source:null;var e +})).join("")}return e=>{const a={begin:/<\/?[A-Za-z_]/,end:">", +subLanguage:"xml",relevance:0},i={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0 +},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, +relevance:2},{begin:n(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/), +relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{ +begin:/\[.+?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{ +className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0, +returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)", +excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[", +end:"\\]",excludeBegin:!0,excludeEnd:!0}]},s={className:"strong",contains:[], +variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},c={ +className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{ +begin:/_(?!_)/,end:/_/,relevance:0}]};s.contains.push(c),c.contains.push(s) +;let t=[a,i] +;return s.contains=s.contains.concat(t),c.contains=c.contains.concat(t), +t=t.concat(s,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{ +className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:t},{ +begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n", +contains:t}]}]},a,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", +end:"\\s+",excludeEnd:!0},s,c,{className:"quote",begin:"^>\\s+",contains:t, +end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{ +begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{ +begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))", +contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ +begin:"^[-\\*]{3,}",end:"$"},i,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ +className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ +className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}})());hljs.registerLanguage("yaml",(()=>{"use strict";return e=>{ +var n="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={ +className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/ +},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable", +variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=e.inherit(s,{ +variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={ +end:",",endsWithParent:!0,excludeEnd:!0,contains:[],keywords:n,relevance:0},t={ +begin:/\{/,end:/\}/,contains:[l],illegal:"\\n",relevance:0},g={begin:"\\[", +end:"\\]",contains:[l],illegal:"\\n",relevance:0},b=[{className:"attr", +variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{ +begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)" +}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string", +begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{ +begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0, +relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type", +begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a +},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta", +begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)", +relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{ +className:"number", +begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b" +},{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},t,g,s],r=[...b] +;return r.pop(),r.push(i),l.contains=r,{name:"YAML",case_insensitive:!0, +aliases:["yml","YAML"],contains:b}}})());hljs.registerLanguage("bash",(()=>{"use strict";function e(...e){ +return e.map((e=>{return(s=e)?"string"==typeof s?s:s.source:null;var s +})).join("")}return s=>{const n={},t={begin:/\$\{/,end:/\}/,contains:["self",{ +begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{ +begin:e(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},t]});const a={ +className:"subst",begin:/\$\(/,end:/\)/,contains:[s.BACKSLASH_ESCAPE]},i={ +begin:/<<-?\s*(?=\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\w+)/, +end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/, +contains:[s.BACKSLASH_ESCAPE,n,a]};a.contains.push(c);const o={begin:/\$\(\(/, +end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},s.NUMBER_MODE,n] +},r=s.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 +}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, +contains:[s.inherit(s.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ +name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/, +keyword:"if then else elif fi for while in do done case esac function", +literal:"true false", +built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp" +},contains:[r,s.SHEBANG(),l,o,s.HASH_COMMENT_MODE,i,c,{className:"",begin:/\\"/ +},{className:"string",begin:/'/,end:/'/},n]}}})());hljs.registerLanguage("go",(()=>{"use strict";return e=>{const n={ +keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune", +literal:"true false iota nil", +built_in:"append cap close complex copy imag len make new panic print println real recover delete" +};return{name:"Go",aliases:["golang"],keywords:n,illegal:"{"use strict" +;const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) +;return r=>{const t={ +keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((i=["var","const","let","function","static"], +e=>!i.includes(e))).join(" "), +literal:n.concat(["yes","no","on","off"]).join(" "), +built_in:a.concat(["npm","print"]).join(" ")};var i +;const s="[A-Za-z$_][0-9A-Za-z$_]*",o={className:"subst",begin:/#\{/,end:/\}/, +keywords:t},c=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{ +end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/, +end:/'''/,contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/, +contains:[r.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/, +contains:[r.BACKSLASH_ESCAPE,o]},{begin:/"/,end:/"/, +contains:[r.BACKSLASH_ESCAPE,o]}]},{className:"regexp",variants:[{begin:"///", +end:"///",contains:[o,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)", +relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+s +},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{ +begin:"```",end:"```"},{begin:"`",end:"`"}]}];o.contains=c +;const l=r.inherit(r.TITLE_MODE,{begin:s}),d="(\\(.*\\)\\s*)?\\B[-=]>",g={ +className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/, +end:/\)/,keywords:t,contains:["self"].concat(c)}]};return{name:"CoffeeScript", +aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/, +contains:c.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{ +className:"function",begin:"^\\s*"+s+"\\s*=\\s*"+d,end:"[-=]>",returnBegin:!0, +contains:[l,g]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function", +begin:d,end:"[-=]>",returnBegin:!0,contains:[g]}]},{className:"class", +beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{ +beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[l]},l] +},{begin:s+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}})());hljs.registerLanguage("clojure",(()=>{"use strict";return e=>{ +var t="a-zA-Z_\\-!.?+*=<>&#'",n="["+t+"]["+t+"0-9/;:]*",r="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",a={ +$pattern:n, +"builtin-name":r+" cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize" +},s={begin:n,relevance:0},o={className:"number",begin:"[-+]?\\d+(\\.\\d+)?", +relevance:0},i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null +}),c=e.COMMENT(";","$",{relevance:0}),d={className:"literal", +begin:/\b(true|false|nil)\b/},l={begin:"[\\[\\{]",end:"[\\]\\}]"},m={ +className:"comment",begin:"\\^"+n},p=e.COMMENT("\\^\\{","\\}"),u={ +className:"symbol",begin:"[:]{1,2}"+n},f={begin:"\\(",end:"\\)"},h={ +endsWithParent:!0,relevance:0},y={keywords:a,className:"name",begin:n, +relevance:0,starts:h},g=[f,i,m,p,c,u,l,o,d,s],b={beginKeywords:r,lexemes:n, +end:'(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',contains:[{className:"title",begin:n, +relevance:0,excludeEnd:!0,endsParent:!0}].concat(g)} +;return f.contains=[e.COMMENT("comment",""),b,y,h], +h.contains=g,l.contains=g,p.contains=[l],{name:"Clojure",aliases:["clj"], +illegal:/\S/,contains:[f,i,m,p,c,u,l,o,d]}}})());hljs.registerLanguage("clojure-repl",(()=>{"use strict";return e=>({ +name:"Clojure REPL",contains:[{className:"meta",begin:/^([\w.-]+|\s*#_)?=>/, +starts:{end:/$/,subLanguage:"clojure"}}]})})());hljs.registerLanguage("scss",(()=>{"use strict";return e=>{var t="@[a-z-]+",i={ +className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},r={ +className:"number",begin:"#[0-9A-Fa-f]+"} +;return e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE, +e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{name:"SCSS",case_insensitive:!0, +illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{ +className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{ +className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{ +className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{ +className:"selector-tag", +begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b", +relevance:0},{className:"selector-pseudo", +begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)" +},{className:"selector-pseudo", +begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)" +},i,{className:"attribute", +begin:"\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b", +illegal:"[^\\s]"},{ +begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" +},{begin:":",end:";", +contains:[i,r,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{ +className:"meta",begin:"!important"}]},{begin:"@(page|font-face)",lexemes:t, +keywords:"@page @font-face"},{begin:"@",end:"[{;]",returnBegin:!0, +keywords:"and or not only",contains:[{begin:t,className:"keyword" +},i,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,r,e.CSS_NUMBER_MODE]}]}}})());hljs.registerLanguage("dockerfile",(()=>{"use strict";return e=>({ +name:"Dockerfile",aliases:["docker"],case_insensitive:!0, +keywords:"from maintainer expose env arg user onbuild stopsignal", +contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{ +beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell", +starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"{"use strict";return e=>({name:"CMake", +aliases:["cmake.in"],case_insensitive:!0,keywords:{ +keyword:"break cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro endwhile execute_process file find_file find_library find_package find_path find_program foreach function get_cmake_property get_directory_property get_filename_component get_property if include include_guard list macro mark_as_advanced math message option return separate_arguments set_directory_properties set_property set site_name string unset variable_watch while add_compile_definitions add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_link_options add_subdirectory add_test aux_source_directory build_command create_test_sourcelist define_property enable_language enable_testing export fltk_wrap_ui get_source_file_property get_target_property get_test_property include_directories include_external_msproject include_regular_expression install link_directories link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions set_source_files_properties set_target_properties set_tests_properties source_group target_compile_definitions target_compile_features target_compile_options target_include_directories target_link_directories target_link_libraries target_link_options target_sources try_compile try_run ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload build_name exec_program export_library_dependencies install_files install_programs install_targets load_command make_directory output_required_files remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or not command policy target test exists is_newer_than is_directory is_symlink is_absolute matches less greater equal less_equal greater_equal strless strgreater strequal strless_equal strgreater_equal version_less version_greater version_equal version_less_equal version_greater_equal in_list defined" +},contains:[{className:"variable",begin:/\$\{/,end:/\}/ +},e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE]})})());hljs.registerLanguage("less",(()=>{"use strict";return e=>{ +var n="([\\w-]+|@\\{[\\w-]+\\})",a=[],s=[],t=e=>({className:"string", +begin:"~?"+e+".*?"+e}),r=(e,n,a)=>({className:e,begin:n,relevance:a}),i={ +begin:"\\(",end:"\\)",contains:s,relevance:0} +;s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t("'"),t('"'),e.CSS_NUMBER_MODE,{ +begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]", +excludeEnd:!0} +},r("number","#[0-9A-Fa-f]+\\b"),i,r("variable","@@?[\\w-]+",10),r("variable","@\\{[\\w-]+\\}"),r("built_in","~?`[^`]*?`"),{ +className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0 +},{className:"meta",begin:"!important"});var c=s.concat({begin:/\{/,end:/\}/, +contains:a}),l={beginKeywords:"when",endsWithParent:!0,contains:[{ +beginKeywords:"and not"}].concat(s)},g={begin:n+"\\s*:",returnBegin:!0, +end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":", +excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s} +}]},d={className:"keyword", +begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b", +starts:{end:"[;{}]",returnEnd:!0,contains:s,relevance:0}},o={ +className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{ +begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:c}},b={variants:[{ +begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:/\{/}],returnBegin:!0, +returnEnd:!0,illegal:"[<='$\"]",relevance:0, +contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,r("keyword","all\\b"),r("variable","@\\{[\\w-]+\\}"),r("selector-tag",n+"%?",0),r("selector-id","#"+n),r("selector-class","\\."+n,0),r("selector-tag","&",0),{ +className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo", +begin:/:(:)?[a-zA-Z0-9_\-+()"'.]+/},{begin:"\\(",end:"\\)",contains:c},{ +begin:"!important"}]} +;return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,o,g,b),{ +name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:a}}})());hljs.registerLanguage("plaintext",(()=>{"use strict";return t=>({ +name:"Plain text",aliases:["text","txt"],disableAutodetect:!0})})());hljs.registerLanguage("json",(()=>{"use strict";return n=>{const e={ +literal:"true false null" +},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],a=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],l={ +end:",",endsWithParent:!0,excludeEnd:!0,contains:a,keywords:e},t={begin:/\{/, +end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/, +contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(l,{begin:/:/ +})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(l)], +illegal:"\\S"};return a.push(t,s),i.forEach((n=>{a.push(n)})),{name:"JSON", +contains:a,keywords:e,illegal:"\\S"}}})());hljs.registerLanguage("awk",(()=>{"use strict";return e=>({name:"Awk",keywords:{ +keyword:"BEGIN END if else while do for in break continue delete next nextfile function func exit|10" +},contains:[{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{ +begin:/\$\{(.*?)\}/}]},{className:"string",contains:[e.BACKSLASH_ESCAPE], +variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/, +end:/"""/,relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{ +begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{ +begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] +},e.REGEXP_MODE,e.HASH_COMMENT_MODE,e.NUMBER_MODE]})})());hljs.registerLanguage("shell",(()=>{"use strict";return s=>({ +name:"Shell Session",aliases:["console"],contains:[{className:"meta", +begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#]/,starts:{end:/[^\\](?=\s*$)/, +subLanguage:"bash"}}]})})());hljs.registerLanguage("lua",(()=>{"use strict";return e=>{ +const t="\\[=*\\[",a="\\]=*\\]",n={begin:t,end:a,contains:["self"] +},o=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[",a,{contains:[n], +relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE, +literal:"true false nil", +keyword:"and break do else elseif end for goto if in local not or repeat return then until while", +built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove" +},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)", +contains:[e.inherit(e.TITLE_MODE,{ +begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params", +begin:"\\(",endsWithParent:!0,contains:o}].concat(o) +},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string", +begin:t,end:a,contains:[n],relevance:5}])}}})());hljs.registerLanguage("makefile",(()=>{"use strict";return e=>{const i={ +className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)", +contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%{"use strict";return e=>{ +const n="([ui](8|16|32|64|128|size)|f(32|64))?",t="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!" +;return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?", +keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield", +literal:"true false Some None Ok Err",built_in:t},illegal:""}]}}})());hljs.registerLanguage("gradle",(()=>{"use strict";return e=>({name:"Gradle", +case_insensitive:!0,keywords:{ +keyword:"task project allprojects subprojects artifacts buildscript configurations dependencies repositories sourceSets description delete from into include exclude source classpath destinationDir includes options sourceCompatibility targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant def abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true antlrtask checkstyle codenarc copy boolean byte char class double float int interface long short void compile runTime file fileTree abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine" +}, +contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.REGEXP_MODE] +})})());hljs.registerLanguage("c",(()=>{"use strict";function e(e){ +return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") +}return t=>{const n=(t=>{const n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}] +}),r="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+e(r)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",s={ +className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},i={className:"string", +variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", +contains:[t.BACKSLASH_ESCAPE]},{ +begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", +end:"'",illegal:"."},t.END_SAME_AS_BEGIN({ +begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={ +className:"number",variants:[{begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" +},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ +"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" +},contains:[{begin:/\\\n/,relevance:0},t.inherit(i,{className:"meta-string"}),{ +className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n" +},n,t.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:e(r)+t.IDENT_RE, +relevance:0},d=e(r)+t.IDENT_RE+"\\s*\\(",u={ +keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", +built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", +literal:"true false nullptr NULL"},m=[c,s,n,t.C_BLOCK_COMMENT_MODE,o,i],p={ +variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ +beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:m.concat([{ +begin:/\(/,end:/\)/,keywords:u,contains:m.concat(["self"]),relevance:0}]), +relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d, +returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/, +contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d, +returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/, +end:/\)/,keywords:u,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,i,o,s,{ +begin:/\(/,end:/\)/,keywords:u,relevance:0, +contains:["self",n,t.C_BLOCK_COMMENT_MODE,i,o,s]}] +},s,n,t.C_BLOCK_COMMENT_MODE,c]};return{ +aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:u, +disableAutodetect:!0,illegal:"",keywords:u,contains:["self",s]},{begin:t.IDENT_RE+"::",keywords:u},{ +className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, +contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{ +preprocessor:c,strings:i,keywords:u}}})(t) +;return n.name="C",n.aliases=["c","h"],n}})());hljs.registerLanguage("css",(()=>{"use strict";return e=>{ +var n="[a-zA-Z-][a-zA-Z0-9_-]*",a={ +begin:/([*]\s?)?(?:[A-Z_.\-\\]+|--[a-zA-Z0-9_-]+)\s*(\/\*\*\/)?:/, +returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute", +begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0, +contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in", +begin:/[\w-]+/},{begin:/\(/,end:/\)/, +contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}] +},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{ +className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}] +}}]};return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/, +contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id", +begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:"\\."+n},{ +className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$", +contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo", +begin:/:(:)?[a-zA-Z0-9_+()"'.-]+/},{begin:"@(page|font-face)", +lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]", +illegal:/:/,returnBegin:!0,contains:[{className:"keyword", +begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0, +relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/, +className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE] +}]},{className:"selector-tag",begin:n,relevance:0},{begin:/\{/,end:/\}/, +illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,{begin:/;/},a]}]}}})());hljs.registerLanguage("llvm",(()=>{"use strict";function e(...e){ +return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n +})).join("")}return n=>{const a=/([-a-zA-Z$._][\w$.-]*)/,t={ +className:"variable",variants:[{begin:e(/%/,a)},{begin:/%\d+/},{begin:/#\d+/}] +},i={className:"title",variants:[{begin:e(/@/,a)},{begin:/@\d+/},{begin:e(/!/,a) +},{begin:e(/!\d+/,a)},{begin:/!\d+/}]};return{name:"LLVM IR", +keywords:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common default hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress initialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_twice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr ptrtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalue insertvalue atomicrmw cmpxchg fence argmemonly double", +contains:[{className:"type",begin:/\bi\d+(?=\s|\b)/},n.COMMENT(/;\s*$/,null,{ +relevance:0}),n.COMMENT(/;/,/$/),n.QUOTE_STRING_MODE,{className:"string", +variants:[{begin:/"/,end:/[^\\]"/}]},i,{className:"punctuation",relevance:0, +begin:/,/},{className:"operator",relevance:0,begin:/=/},t,{className:"symbol", +variants:[{begin:/^\s*[a-z]+:/}],relevance:0},{className:"number",variants:[{ +begin:/0[xX][a-fA-F0-9]+/},{begin:/-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/ +}],relevance:0}]}}})());hljs.registerLanguage("sql",(()=>{"use strict";function e(e){ +return e?"string"==typeof e?e:e.source:null}function r(...r){ +return r.map((r=>e(r))).join("")}function t(...r){ +return"("+r.map((r=>e(r))).join("|")+")"}return e=>{ +const n=e.COMMENT("--","$"),a=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],s=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],o=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],c=s,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update ","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!s.includes(e))),u={ +begin:r(/\b/,t(...c),/\s*\(/),keywords:{built_in:c.join(" ")}};return{ +name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{ +$pattern:/\b[\w\.]+/,keyword:((e,{exceptions:r,when:t}={})=>{const n=t +;return r=r||[],e.map((e=>e.match(/\|\d+$/)||r.includes(e)?e:n(e)?e+"|0":e)) +})(l,{when:e=>e.length<3}).join(" "),literal:a.join(" "),type:i.join(" "), +built_in:"current_catalog current_date current_default_transform_group current_path current_role current_schema current_transform_group_for_type current_user session_user system_time system_user current_time localtime current_timestamp localtimestamp" +},contains:[{begin:t(...o),keywords:{$pattern:/[\w\.]+/, +keyword:l.concat(o).join(" "),literal:a.join(" "),type:i.join(" ")}},{ +className:"type", +begin:t("double precision","large object","with timezone","without timezone") +},u,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{ +begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{ +begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator", +begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}})());hljs.registerLanguage("ini",(()=>{"use strict";function e(e){ +return e?"string"==typeof e?e:e.source:null}function n(...n){ +return n.map((n=>e(n))).join("")}return s=>{const a={className:"number", +relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:s.NUMBER_RE}] +},i=s.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const t={ +className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/ +}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={ +className:"string",contains:[s.BACKSLASH_ESCAPE],variants:[{begin:"'''", +end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"' +},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,a,"self"], +relevance:0 +},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map((n=>e(n))).join("|")+")" +;return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/, +contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{ +begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr", +starts:{end:/$/,contains:[i,c,r,t,l,a]}}]}}})());hljs.registerLanguage("javascript",(()=>{"use strict" +;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) +;function r(e){return i("(?=",e,")")}function i(...e){return e.map((e=>{ +return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return t=>{ +const c=e,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/, +isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index,s=e.input[a] +;"<"!==s?">"===s&&(((e,{after:n})=>{const a="", +returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{ +begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0 +},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:A}]}] +},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{ +variants:[{begin:"<>",end:""},{begin:o.begin,"on:begin":o.isTrulyOpeningTag, +end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0, +contains:["self"]}]}],relevance:0},{className:"function", +beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:l, +contains:["self",t.inherit(t.TITLE_MODE,{begin:c}),p],illegal:/%/},{ +beginKeywords:"while if switch catch for"},{className:"function", +begin:t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", +returnBegin:!0,contains:[p,t.inherit(t.TITLE_MODE,{begin:c})]},{variants:[{ +begin:"\\."+c},{begin:"\\$"+c}],relevance:0},{className:"class", +beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{ +beginKeywords:"extends"},t.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/, +end:/[{;]/,excludeEnd:!0,contains:[t.inherit(t.TITLE_MODE,{begin:c}),"self",p] +},{begin:"(get|set)\\s+(?="+c+"\\()",end:/\{/,keywords:"get set", +contains:[t.inherit(t.TITLE_MODE,{begin:c}),{begin:/\(\)/},p]},{begin:/\$[(.]/}] +}}})()); \ No newline at end of file diff --git a/assets/styles/arta.css b/assets/styles/arta.css new file mode 100644 index 0000000..f536ee5 --- /dev/null +++ b/assets/styles/arta.css @@ -0,0 +1,73 @@ +/* +Date: 17.V.2011 +Author: pumbur +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #222; +} + +.hljs, +.hljs-subst { + color: #aaa; +} + +.hljs-section { + color: #fff; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #666; +} + +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-regexp { + color: #ffcc33; +} + +.hljs-number, +.hljs-addition { + color: #00cc66; +} + +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-template-variable, +.hljs-attribute, +.hljs-link { + color: #32aaee; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #8866cc; +} + +.hljs-title, +.hljs-variable, +.hljs-deletion, +.hljs-template-tag { + color: #bb1166; +} + +.hljs-section, +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/build.el b/build.el index 6be8cc7..65ca794 100755 --- a/build.el +++ b/build.el @@ -207,7 +207,7 @@ Not pages." (sort (mapcar #'pair-file-with-date files) - (lambda (x y) (< (car x) (car y)))) + (lambda (x y) (> (car x) (car y)))) "\n") tag))) (car tags)))) @@ -231,7 +231,7 @@ Not pages." (sort (mapcar #'pair-file-with-date files) - (lambda (x y) (< (car x) (car y)))) + (lambda (x y) (> (car x) (car y)))) "\n") tag))) (car tags)))) @@ -261,6 +261,23 @@ Not pages." (setf org-html-link-home "") (setf org-html-scripts "") + ;; (org-babel-do-load-languages + ;; 'org-babel-load-languages + ;; '( + ;; (emacs-lisp . t) + ;; (org . t) + ;; (shell . t) + ;; (C . t) + ;; (python . t) + ;; (clojure .t) + ;; (lisp . t) + ;; (js . t) + ;; (awk . t))) + + ;; ;; Never export the code block evaluation + ;; (setq org-babel-default-header-args '((:eval . "never-export"))) + ;; (setq org-src-fontify-natively t) + (let ((build-dir (from-root "/build/")) (base-url (if (prod-p) "https://lxsameer.com" "http://localhost:3003"))) (copy-template (from-root "/templates/index.org") @@ -279,7 +296,8 @@ Not pages." (create-category-pages project-root) (setq org-html-preamble #'preamble-fn) - + (setq org-html-htmlize-output-type nil) + (setq org-latex-listings t) (setq org-publish-project-alist `(("lxsameer.com" @@ -307,7 +325,7 @@ Not pages." :html-tags-template ,(from-root "/templates/tags.html") :publishing-function org-html-publish-to-templated-html :auto-sitemap t - :htmlized-source t + :htmlized-source nil :sitemap-folders ignore :sitemap-style list :sitemap-title "lxsameer's nest" @@ -332,12 +350,13 @@ Not pages." :makeindex nil) ("pdfs" - :base-directory ,(from-root "/orgs") + :base-directory ,(from-root "/orgs/essays") :root-directory ,project-root + ;;:publishing-directory ,(concat build-dir "/essays/") :recursive t :base-extension "org" :publishing-directory ,build-dir - :publishing-function) + :publishing-function org-latex-publish-to-pdf) ("statics" @@ -348,9 +367,8 @@ Not pages." :publishing-function org-publish-attachment) ("build" :components ("lxsameer.com" "statics")))) - (org-publish-project "build" t nil)) - - (message "Build complete.")) + (org-publish-project "build" t nil) + (message "Build complete."))) (provide 'build) diff --git a/lisp/ox-template.el b/lisp/ox-template.el index 4693d88..8c2cee6 100644 --- a/lisp/ox-template.el +++ b/lisp/ox-template.el @@ -24,7 +24,6 @@ (require 'seq) (require 'ox-publish) (require 'mustache) -(require 'htmlize) (require 'pp) (require 'ht) (require 'lisp/utils) diff --git a/orgs/coh.org b/orgs/coh.org new file mode 100644 index 0000000..cb8ccf1 --- /dev/null +++ b/orgs/coh.org @@ -0,0 +1,83 @@ +#+SETUPFILE: ../config.org +#+OPTIONS: toc:nil +#+EXPORT_FILE_NAME: coh.html +#+DATE: 2021-02-11 +#+TITLE: Code of Honor +#+PAGE: true + +I always try to live by my code of honor. A man is nothing without his honor. “A sin is to betray your beliefs”. + +* Honorable life +- Don’t betray your code of honor. +- Defend your Bushido way. +- Live life as a Honorable Man. +- Don’t lie. +- Honesty takes courage. +- Don’t talk without a knowledge to support it. +- “Don’t argue with the crazy guy”. +- Always follow your sense of Justice +- Feel the pain of others. +- Always put your self in people’s shoe before making any decision. +- A simple smile goes a long way. +- There’s no honor in winning by cheating. +- “If you fall down 7 times make sure to get up 8 times.” +- Protect your promises. +- “For a samurai everywhere is Japan.” +- Holding back is disrespectful to your opponent. +- Live life in your way. +- “Respect is earned, not given”, So earn it. +- “A man is much more than the job he holds and clothes he wears.” + +* Science + + #+BEGIN_QUOTE + Truth is sought for its own sake … Finding the truth is difficult, and the road to it is rough. + For the truths are plunged in obscurity … God, however, has not preserved the scientist from error + and has not safeguarded science from shortcomings and faults. If this had been the case, + scientists would not have disagreed upon any point of science… Therefore, the seeker after the + truth is not one who studies the writings of the ancients and, following his natural disposition, + puts his trust in them, but rather the one who suspects his faith in them and questions what he + gathers from them, the one who submits to argument and demonstration, and not to the sayings + of a human being whose nature is fraught with all kinds of imperfection and deficiency. + Thus the duty of the man who investigates the writings of scientists, if learning the truth is his + goal, is to make himself an enemy of all that he reads, and, applying his mind to the core and margins + of its content, attack it from every side. He should also suspect himself as he performs his critical + examination of it, so that he may avoid falling into either prejudice or leniency. + + –- [[https://en.wikipedia.org/wiki/Ibn_al-Haytham][Ibn al-Haytham]] + #+END_QUOTE + +* Software Engineering + + - Simplicity over Complexity + - Simple first, then Easy + - Abstraction, Abstraction, Abstraction + - Put your conventions layer on top of a well written abstraction + - Always choose a name for your variables which implies the variable content or usage. + - Never ever use variable names such as x, a, b, etc. + - Bugs before new features + - Docs before new features + +** Library design + Major releases can contain backward incompatible changes. It’s better to use a different code name + instead of a major version number change to indicate that there going to be backward incompatible changes. + Minor releases shouldn’t break the dependency versions. E.g: X(0.6.0) depends on Python(3.5.x), X(0.7.0) + should depends on the same version python + +** New Feature Checklist + - Is it easy to extend the feature ? + - Is it scalable ? + - Is it easy to maintain ? + - Is it well documented ? + - Does it have the best possible performance ? + - What about tests ? + - Is it following the correct coding style ? + +** Resiliency Checklist + + - Things that might fail: + + Dependent systems + + Network + + External storage + + Database + + “The Cloud” diff --git a/orgs/essays/choosing-the-target-platform.org b/orgs/essays/choosing-the-target-platform.org new file mode 100644 index 0000000..18815d3 --- /dev/null +++ b/orgs/essays/choosing-the-target-platform.org @@ -0,0 +1,180 @@ +#+SETUPFILE: ../../config.org +#+TAGS: Serene(s) Languages(l) +#+CATEGORY: Engineering +#+DATE: 2019-12-07 +#+TITLE: Choosing the target platform + +After wrapping my head around the [[file:rational-and-a-name.org][rational]] of [[file:my-new-programming-language.org][My new programming language]], I have +a big decision to make. Choose a platform. + +As programmers, we have a tough life when it comes to making a decision that +has direct impact on our product. I'm pretty sure you went through this process +at least once. From choosing a semantically great name for a variable to choosing +a right technology for your next billion dollar startup. It is always hard to +pick a tech stack for a new project. Especially when the new product happens to be +a new programming language. If I get my hands dirty with a wrong tech stack for +a simple web application, no big deal. I still can rewrite the whole thing and +pay a penalty. But in the case of programming languages that's not the case. Wrong +platform can easily destroy you. From the dawn of computers, many smart people +created tons of languages. But only few of them made it to the top. While there +are so many reasons for their success, going with the right platform is one +the most important ones. + +The obvious question that comes to mind when we're talking about "The platform" +is, should we build a platform from scratch or should we piggyback on others? +Creating a programming language and a virtual machine from scratch is gigantic and +bone crushing task. It needs a crazy set of skills and knowledge. Even with such +wisdom and experience people who went through it has made many mistakes and had to +constantly iterate to come up with the right implementation. The evolution of +programming languages such as [[https://en.wikipedia.org/wiki/Scheme_%28programming_language%29][Scheme]] is a good example of it (for more information +take a look at [[http://www.r6rs.org/][R6R5]]. + +Building a VM is hard and Building a fast VM is even harder. While I think creating +a programming language and a VM from scratch is really fun, but it can be really +frustrating as well. I don't want to get annoyed with myself during the process and +abandon my goal. I should ride on the shoulders of the giants to gain benefit from +their great work. I should choose a platform that helps me to move faster and iterate +through different ideas quicker. + +From a technical perspective, Starting from scratch means that I have to write a +program that includes at least a parser and a compiler. Building a compiler +is no joke. Hypothetically let's say we have a working compiler and parser, What +about use libraries and ecosystem ?? It would be really hard to convince people +to use a programming language that does not have any useful library and they have +to build everything by themselves. It might have been the case 30 years ago but +it is not the case in the modern age of programming languages anymore. + +So the idea of creating [[https://serene-lang.org][Serene]] from scratch is out of the picture. We need to find a good +platform for it. But what are the options ??? + +* Racket :Serene:Languages: + #+BEGIN_QUOTE + Racket is a general-purpose programming language as well as the world’s first ecosystem + for language-oriented programming. Make your dream language, or use one of the dozens + already available. + #+END_QUOTE + +[[http://racket-lang.org][Racket]]is a dialect of Lisp which allows us to build our own language by extending it. While +Racket is really cool and have a long list of pros and [[https://beautifulracket.com/appendix/why-racket-why-lisp.html][many reasons why to use it]] +(It's Lisp after all), it has the disadvantage that forced me to stop thinking about it +for *Serene*. As I mentioned in the [[file:rational-and-a-name.org][rational]] I'm not trying to build a toy language or +a domain specific one and Racket's ecosystem isn't as great as a battle tested and well-known +ecosystem like Java or Python (or other popular ecosystems). + +* Javascript +We're living in the age of Web and one of the big players in this era is Javascript. The number +of the programming languages that compile to Javascript is increasing rapidly. Javascript +as a language [[https://whydoesitsuck.com/why-does-javascript-suck/][sucks]] but as platform it is amazing. Lots of money and engineering effort has +been spent on improving Javascript engines. As a result Javascript is a crappy language with +well engineered engines such as [[https://v8.dev/][V8]]. + +Creating a language based on Javascript platform means that I have to be involved with the whole +transpiling scenario and deal with the fact that this new language can be used on different +browsers or on the backend. Or even on IE6 (Just kidding). I don't want to deal with all this. +I think Javascript platform can't be a good fit for what I need. So I won't go into details about +it + +* Python +Python is another famous platform form creating programming languages. Many people have built +programming languages on top of Python (Checkout [[http://norvig.com/lispy.html][Lispy]] if you're a Python fan). Python is super +popular these days and you'll see it everywhere. Creating a language on top of Python (just +like Javascript) gives me access to a rich ecosystem with huge number of libraries and a robust +ecosystem. + +But as I mentioned in the [[file:rational-and-a-name.org][rational]] I want support for built-in concurrency and parallelism. +Python isn't even good when it comes to parallelism and concurrency. I'm using python for more +than 10 years now and I'm very familiar with it. I know about all the effort to create useful +concurrency and parallelism such as asyncIO. But the fact is Python is not designed for this job. +*The GIL* is a huge problem in Python that literally prevents us from Running two pieces of code +in parallel in two kernel space thread. It is a problem for me. If you can't do a decent concurrency +and parallel execution you have no chance against modern languages like Clojure, Go, Elixir and others. +Python is fine now despite of its problems because it is good at other stuff and people accepted it +for what it is. Python is out there for about 25 years now and it has established a big community. If +Guido van Rossum created Python a year ago, I'm pretty sure that it would've failed because +it can't compete with modern languages. Don't get me wrong, I'm not trying to trash Python. +It is great and it has many good qualities but a good Concurrency and parallel execution model +ain't one of them. + +* BEAM +Erlang ecosystem is amazing, Robust and well tested. I have read a lot about it and when +ever I'm studying anything around computer science that can be related to Erlang, I ask +myself "How is Erlang doing it?". Erlang ecosystem truly had a huge impact on the world +today. + +The problem with Erlang ecosystem for me is that I always read about it and my knowledge +around it is only theoretical. Building a language on top a platform needs a good level +of practical experience on the platform as well which I don't have that. So it's obvious +that I have to pass. + +* The JVM +As much as I dislike Java (Mostly because of the syntax and the fact that it is an object +oriented language), I like JVM a lot. The JVM is battle tested, well design (Well, sort of. +But it's certainly evolving.) and fast VM. It should be the most popular VM in the world +(I'm just guessing). It is one of the world's most heavily-optimized pieces of software. +Plenty of researches have been made to make it better and better. + +The JVM has a mature ecosystem and a massive community of developers that resulted in an +unbelievable number of libraries (not the largest though, NPM is the largest artifact +repository. But it has a huge amount of useless BS as well). By targeting the JVM, +users will have an easy time adopting the new languages because of the rich tools set +provided by the Java ecosystem and all the languages that targeted JVM as well. For example, +it will be possible to use libraries written in Scala or Clojure as well. + +Long story short, I think the JVM is the right platform for me. The fact that many languages +have chosen it as their base platform shows how useful it can be. But there is a problem. +Targeting a higher level virtual machines like the JVM means that I'll have an easier job to +create a compiler. But I still have to write one. A compiler that takes the code and produces +JVM bytecode. As I mentioned earlier, writing a compiler is an enormous task and the chance +of doing it wrong with someone like me who has never built a compiler before is very high. + +* One VM to rule them all +Luckily there is a solution. I can write an interpreter in a VM that is designed to optimize +my interpreter with all that wonderful JIT compilation magic. Oracle has released a new VM +that hopes to make writing language interpreters both easy and fast. It can also leverage +the huge ecosystem of the JVM. It is an enhanced JVM that contains a new JIT compiler which +can speed up interpreters to near Java speed. The new JIT compiler is called Graal. To use +the Graal’s JIT magic we can use the Truffle library to create the interpreter. We will +annotate the interpreter and give Graal some hints on invariants and type information. +According to Graal's documents, By doing this integration effort we get significant speedups +in out interpreter without having to resort to writing a bytecode compiler. + +[[https://www.graalvm.org/][GraalVM]] is a Java VM and JDK based on HotSpot/OpenJDK, +implemented in Java. It supports different execution modes, like ahead-of-time compilation +of Java applications for fast startup and low memory footprint. + +#+BEGIN_QUOTE +GraalVM is a universal virtual machine for running applications written in JavaScript, +Python, Ruby, R, JVM-based languages like Java, Scala, Groovy, Kotlin, Clojure, and +LLVM-based languages such as C and C++. + +GraalVM removes the isolation between programming languages and enables +interoperability in a shared runtime. It can run either standalone or in +the context of OpenJDK, Node.js or Oracle Database. +#+END_QUOTE + +I copied the above paragraph from GraalVM's official website. It is truly a VM to rule +them all. + +[[https://github.com/oracle/graal/tree/master/truffle][Truffle]] library is one the key players in GraalVM. The initial results of Truffle are +super exciting. Implementations of Ruby in Truffle has a performance on the same order +of magnitude as the much bigger projects of JRuby. Just checkout [[https://chrisseaton.com/truffleruby/][Truffle Ruby]]'s +website to get amazed by it. There is a [[https://github.com/graalvm/graaljs][javascript implementation]] as well which showed +great progress as well. Lots of research has been dedicated to this topic and the result +is mind blowing. The interesting thing is that these Truffle implementations were done with +fewer people in a shorter period of time. This means you can create your own language on the JVM that +takes advantage of all it’s existing libraries, native threading, JIT compiler without +having to write your own compiler, and you get speeds that took other languages years +to achieve. + +Using GraalVM as the platform for my new language will help me to be much faster because +All I need to do is to build an [[https://en.wikipedia.org/wiki/Abstract_syntax_tree][AST]] interpreter and Graal will handle the rest. It means +that I can start by building what is important and use a very well engineered toolkit in +my advantage to get to my goal quicker and then later on replace any part that I like with +my own implementation. How cool is that??? + +But as an engineer and a wannabe scientist I'd like to see the proof with my own eyes. Not +because I don't trust academic work, Just because it feels good to experience the proof. + +So to begin with I'm going to create a dead simple Serene interpreter in Java and OpenJDK +and then build the same interpreter using Java on GraalVM using Truffle library and +compare the results and prove myself that choosing GraalVM is the right choice. diff --git a/orgs/essays/my-new-programming-language.org b/orgs/essays/my-new-programming-language.org new file mode 100644 index 0000000..d65695f --- /dev/null +++ b/orgs/essays/my-new-programming-language.org @@ -0,0 +1,49 @@ +#+SETUPFILE: ../../config.org +#+TAGS: Serene Languages +#+CATEGORY: Engineering +#+DATE: 2019-11-25 +#+TITLE: My new programming language + +As a software engineer, one of my joys in life is to learn new things. I can't describe the +pleasure of learning a new technology or stepping forward in the world of science. If you experienced +such a delight, you would know that how addictive it is. I can't satisfy my hunger for knowledge and +it might sounds like a gloat but it's truly joyful (ok mate, you love to "read", get on with it). + +Programming languages are the most common tool among programmers and software engineers (Duh!). +I believe that learning new programming languages helps us to widen our vision as engineers and +help us improve our mentality about software architecture and design. So clearly I never say "No" +to learning a new programming language and because of that I have lots of experience with different +languages. Each language taught me tons of new things and helped me enhance my skills. I've studied +many languages and have a long list of them as my "To Learn" list. + +Approximately a year ago, I was frustrated with Python and nagging to my wife about it (She always listens to +my gibberish). All of a sudden she suggested to me that "Why don't you write your own programming language ?". +That got me thinking, "Is it a good idea to do so ????". + +* My way of learning :Languages:Serene: +People have different routines for learning. I'm one of those people who likes to learn new +things by understanding how it works first. I'd like to start my learning process by understanding +the laws of the universe. In this case, "universe" is the implementation and theory behind +the thing I'm trying to learn. It might seem like crazy idea but that's how I learn better. +For instance, when I was a teenager and was learning about how to use Gnu/Linux, I was so +obsessed with internal of a Linux distribution to a degree that I decided to build my own +distribution. Of course as a teenager I was naive and dreamed about my distro ( Which I used +to call Liniera ) to become a well-known and popular distribution. Aside from my childhood dreams +I learned a lot by creating a distribution. Learned about Linux kernel, boot process, bootloaders +and tons of other complicated pieces that normally people don't get to know at first (I was using +LFS and Debian tools). So after that delightful but tough experience, I always try to build a minimal +prototype of whatever I'm trying to learn to comprehend the universe of that thing which +helped me a lot to this day. + +Based on my history, routines and the question that my wife has planted in my mind and after about a year +researching and thinking about it, Finally I realized it can be a good idea to create a new +programming language. To be honest it is not a task to be taken lightly. Whenever I created something +that wasn't out of my needs, I just failed. But this time I think creating a programming language can +massively help me to gain a better grasp of "the universe". Trying to overcome this challenge will help +me to grow and be a better engineer despite the fact that this new language may not even make it to the +list of known programming languages. I'm fine with that as long as it pushes me a step forward in my way +of life and brings me joy of wondering around in the world of science and engineering. + +I'm going to write more blog posts about my journey through this humongous task as a journal for myself and other +enthusiastic people. After all it will be a hobby of mine and not my day to day job. So I'll take my time and +move slowly but steady. diff --git a/orgs/essays/rational-and-a-name.org b/orgs/essays/rational-and-a-name.org new file mode 100644 index 0000000..d00e6fd --- /dev/null +++ b/orgs/essays/rational-and-a-name.org @@ -0,0 +1,52 @@ +#+SETUPFILE: ../../config.org +#+TAGS: Serene Languages +#+CATEGORY: Engineering +#+DATE: 2019-12-01 +#+TITLE: Rational and a name + +*This post is a draft and I'll finish it gradually* + +As I mentioned in [[./my-new-programming-language.org][My new programming language]], I'm creating a new programming language. +I'll try to pick up good points of different programming languages and avoid the cons +of them. One of the most important aspects of any project is to have a rational for it. +It's what I learned from [[http://clojure.org][Clojure]]'s culture. Rationals are a big deal in any clojure +developers world. As fan I'd like to start my new programming language by writing down +the rational of what I'm trying to achieve. + +* Rational (Take 1) and goals :Languages:Serene: + So far, the main reason to create a new language for me is to *learn more and + educate myself*. But it doesn't mean that I'm aiming for a toy language. I want + to create a general purpose language that solves some problems. Here is a list of + reasons that made me consider the idea of creating a new language (in no specific order): + +** Lisp is superior + I think the world needs more and more dialects of Lisp. It's the second oldest + programming language in the world and as far as I know the oldest one that is + still active. **Lisp** is elegant and amazing, but unfortunately not so many + programmers know about it. Even most of the those people who heard the name + are distracted by the "parenthesis". But they're missing the fact that there + is a good reason for all those parenthesis. Lisp is the simplest language I + know, its programs are written in its own datatypes. How simple is that??? + + You might hear that [[https://twobithistory.org/2018/10/14/lisp.html][God has created the universe in Lisp]]. + Lisp is amazing and I consider a programmer who has understood *the Lisp way*, the + [[https://twitter.com/lxsameer/status/1172220581992980480][luckiest]]. + + I'd my new language to be Lisp, because just being a Lisp brings a huge deal to the + table. + +** Simplicity +** FP is the future +** Development process +** Better core development +** Built-in Concurrency and parallelism + +* A Name + If you're a programmer, I'm pretty sure that you already experienced the terror + of trying to find a name for your project. Frankly, It's even hard to find a good + name for your variable. + + After about 10 days of searching finally my wife came up with a good name. *Serene*. + Calm and peaceful. I like it. It's simple and beautiful with a great meaning. + + I can't wait to start working on it. :P diff --git a/orgs/essays/serene-simple-version.org b/orgs/essays/serene-simple-version.org new file mode 100644 index 0000000..2921537 --- /dev/null +++ b/orgs/essays/serene-simple-version.org @@ -0,0 +1,257 @@ +#+SETUPFILE: ../../config.org +#+TAGS: Serene(s) Languages(l) +#+CATEGORY: Engineering +#+DATE: 2020-01-03 +#+TITLE: Serene (simple versoin) + +As you might already know I'm working on [[file:my-new-programming-language.org][my own programming language]] +for a while now. I'm still on early stages and working on [[file:choosing-the-target-platform.org][choosing the right platform]] +for [[https://serene-lang.org][Serene]] and trying to spend time on doing enough research and make decision based +on facts, scientific papers and collected data from experiments +rather than rushing into things and end up with a mess. +I believe those languages that take their time and move slowly +but with great research, plan and design are more successful in +the long term (Thanks to *Pouya* for pointing it out). Take *Clojure* +as an example. They are taking their time, experimenting and validating +their hypothesis. As a result, Clojure is a well designed, stable +and highly backward compatible language with amazing and productive +pace. However, some other languages like Python are extremely +popular and consequently has more contributors. Dealing with all +those contributors caused Python to move faster than it should and +they ended up with some bad choices and horrible designs that +fixing them requires an humongous effort. Gradually, it becomes +harder and harder to fix those and move away from them. GIL is a good example, +instead of fixing the issue and removing the GIL, they are introducing +(at the of writing this article they added some basic support to latest +python release but far from what they want) [[https://lwn.net/Articles/754162/][something else]] to fix the original +problem but it might become a pain point itself. In order to avoid these kind +of problem as much as possible I'm trying to take my time and do as +many as experiments as I need. + +As I mentioned [[file:choosing-the-target-platform.org][earlier]] I think *GraalVM* and *Truffle* is the right answer for +Serene. But to verify my initial Idea I decided to run an experiment. +The experiment is all about implementing a Lisp in two environments. +A pure Java implementation vs a *Truffle* implementation. + +I spent several days and implementing the pure java version. The repository +of the simple version is available in the [[https://devheroes.codes/Serene/serene-simple][repo]] +This is a dummy version, but good enough lisp that I didn't paid too much attention +to the details and just created a very simple lisp with the following specification. + +#+BEGIN_QUOTE +Note: In this post whereever I use the name **Serene** for the implementation, +I'm referring to the simple version. +#+END_QUOTE + +* Data structures :Serene:Languages: + Since I tried to avoid unnecessary work, I didn't do much and implemented + just one collection type which is the most important and essential data + structure in any Lisp, the mighty List. While my final goal is to have functional + data structures, this List is not a functional one and is a simple linked + list. You can find the implementation under =serene.simple.ListNode=. + + For the number types I just added support for =Long= and =Double= + via `serene.simple.SNumber` class which acts as a dispatcher between two inner + classes. + + For Strings, boolean types and =nil=, I just used the equivalent Java data + structures directly. + +* Reader/Parser + Instead of using a parser generator or a sophisticated parser, I just created + a simple read ahead of position based parser that reads two chars and calls the + appropriate method to create the corresponding =Node=. the =serene.simple.Node= + is an abstract class that has just one important method, =eval=. The whole + purpose of the reader is to parse the code and create an AST like data structure + which each node extends the =Node= class (I should've create the interface for + it but too lazy to change it now). The =eval= method of `ListNode` is a bit + special. It calls the =eval= method on all the elements on the list + and then calls the first element as a function and pass the rest of the elements + as the arguments to that function. First rule of lisp :)) + + The =eval= method of =ListNode= contains lots more details regarding to java + interop as well which I leave it out of this blog post. + +* Scope + Scopes are simply a mapping between symbol names and values. Serene consists of two + different scopes, both implemented in =serene.simple.IScope= and extend + =serene.simple.AScope= abstract class that contains the logic for symbol + lookup and insertion. These two classes are =serene.simple.Scope= which + is the general scope and it has a parent/child type of relationship with + other instances of the same class or =serene.simple.RootScope= that is + the top level scope. Beside that, =RootScope= is pre-populated with all + the built-in functions and types. + +* Special forms + Serene's [[https://courses.cs.northwestern.edu/325/readings/special-forms.php][special forms]] are pretty limited. All of them all classes which extend + =serene.simple.SpecialForm= abstract class and inherit from =Node= indirectly. The + difference between special form evaluation and function evaluation is that in case + of special forms, Serene does not evaluate the arguments and leaves the evaluation + to the special form itself. Here is the list of Serene's special forms: + + =def=: Creates a binding between a symbol name and the given value: + + #+BEGIN_SRC lisp + (def name "serene") + #+END_SRC + + =fn=: Creates an anonymous function: + #+BEGIN_SRC lisp + (def inc (fn (x) (+ 1 x))) + #+END_SRC + + =quote=: Prevents the evaluation of the given argument and return it as it is: + + #+BEGIN_SRC lisp + (quote (1 2 3 4)) ;; => (1 2 3 4) + #+END_SRC + + =if=: Evaluates the body based on the return value of the given predicate. + + #+BEGIN_SRC lisp + (if (= x 1) + (...) ;; if x is 1 + (...)) ;; if x is not 1 + #+END_SRC + + =let=: Sets a local scope and runs its body using that scope. + + #+BEGIN_SRC lisp + (let ((x 1) + (y 2)) + (println x y)) + #+END_SRC + + =do=: Simply groups several expressions together. + + #+BEGIN_SRC lisp + (do + (println ...) + (if ....)) + #+END_SRC + + =cond=: Gets several predicates and only evaluates the body corresponding + to the first truthy predicate. + + #+BEGIN_SRC lisp + (cond + ((= x 1) (body1...) + ((= x 2) (body2...)) + (true (else...)))) + #+END_SRC + +* Builtin Function + All the build in function are created by extending the =serene.simple.builtin.AFn= + abstract class and follow the same =Node= convention. Here is a list of the most + important built in functions: + + =(println ....)=: Prints all the arguments on the stdout. + + =(quit)=: Quits the program. + + =(conj coll x...)=: Returns a new list by adding the given arguments. + + =(count coll)=: Returns the number of elements in the given COLL. + + =(reverse coll)=: Returns a new list which is the reverse of COLL. + + =(list 1 2 3..)=: Creates a list from the given arguments. + + =(first coll)=: Returns the first element of the given COLL. + + =(rest coll)=: Returns all the elements beside the first element of the given COLL. + + =(doc fn)=: Returns the documentation for the given symbol if any. + + =(reduce f coll initial)=: Reduces the COLL by applying F to its elements with the + INITIAL as the default value. F takes two arguments 1) the accumulation 2) the element. + + =(new Class arg1 arg2...)=: Create a new instance of the given CLASS by passing the given + arguments to its constructor. + +** Example program + Here is an example program in Serene simple version (=benchmarks/fib.srns= in the repo): + + #+BEGIN_SRC scheme + ;; We have a reduce function but just in case... + (def reduce1 + (fn (f xs initial-value) + (cond + ((first xs) (reduce f (rest xs) (f initial-value (first xs)))) + (true initial-value)))) + + ;; A simple map function implementation in serene + (def map + (fn (f xs) + (reduce (fn (acc x) (cons acc (f x))) xs (list)))) + + (def range-list + (fn (x y init) + (if (< y x) + (do + (conj (range-list x (+ y 1) init) y)) + init))) + + (def range + (fn (x) + (range-list x 0 (list)))) + + (def fib + (fn (n) + (def fib-iter + (fn (x y z) + (if (= x 0) + z + (fib-iter (- x 1) + z + (+ y z))))) + (fib-iter n 0 1))) + + (def benchmark-fn + (fn (x) + (let ((start (now))) + (println (fib x)) + (- (now) start)))) + + + (def run-benchmark + (fn (times) + (map (fn (x) + (println "Benchmark: " x) + (println "Took: " (benchmark-fn 500))) + (range times)))) + + (run-benchmark 20) + #+END_SRC + + +* What is missing ? + Since Serene (simple) is an experimental language and I'll abandon it eventually. + I didn't want to fall into the rabbit hole and just tried to get to the point as soon as possible. + So I sacrificed lots of details. Here is a list of the most important missing + details: + +- A namespace functionality. Because creating and compiling dynamic classes + is a massive task and needs tons of work which doesn't make sense for a toy + project. +- Unified function interface. +- Requiring different namespaces. +- A sophisticated parser. My Reader implementation is really cheap that + suits a toy project. It might worth investigating on different solutions + including using a parser generator or ahead of time read implementation. +- Primitive functions in Serene. I used lots of primitive functions + from java rather than implementing them inSerene itself, mostly because + of two reasons. Lack of + macros and namespaces. +- Decent [functional] data structures. The only data structure I implemented + is list. +- Quality code. The general quality of this implementation is not great, I + sacrificed quality for time. + +* Conclusion + I'm not going to improve the simple version anymore at this stage. I'm going to run + some benchmarks and measure different aspects of the current implementation and then + I'll move to the *Truffle* version and continue experimenting. + + Please let me know if you have any comments or questions on this topic. As always + I'm available throw social media and email. diff --git a/orgs/essays/transaction-variants.org b/orgs/essays/transaction-variants.org new file mode 100644 index 0000000..da9675c --- /dev/null +++ b/orgs/essays/transaction-variants.org @@ -0,0 +1,116 @@ +#+SETUPFILE: ../../config.org +#+TAGS: Databases +#+OPTIONS: toc:2 +#+CATEGORY: Engineering +#+DATE: 2019-04-26 +#+TITLE: Transaction Variants + +In this post I want to talk about different variants of [[https://en.wikipedia.org/wiki/Database_transaction][database transactions]], I assume you already +know about database transactions. So, let's cut to the chase. + +* Flat Transaction :Databases: + Flat transaction are those regular transactions we know about and are the most common transactions + in the [[https://en.wikipedia.org/wiki/Database#Database_management_system][DBMS]]s Flat transactions are simple but they can not address two problems: + +- Multi stage transactions +For example, Let's say we want to book flight from City C1 to C2. Since there is no direct fly we +have to book 4 flights from, =C1 -> CA -> CB -> C2=. The process of booking each of these flights +is a transaction by itself and the whole process is a transaction too. + +- Bulk updates +Let's say we want to update billion tuples. What if the very last tuple fails to update and cause +the transaction to abort. Then we need to revert the changes made by the transaction and revert +a billion tuples which obviously is a huge task. + +* Transaction Savepoints + These transactions are similar to flat transaction with addition of one extra thing which is + save points. So any where in there transaction users case ask for a save point and again they can + rollback to a save point or rollback the entire transaction. + +#+BEGIN_SRC sql +BEGIN + READ(A) + WRITE(A) + SAVEPOINT 1 + WRITE(B) + SAVEPOINT 2 + ROLLBACK TO 1 +COMMIT +#+END_SRC + +#+BEGIN_QUOTE +Note: *These transactions only solve the multi stage transaction problem.* +#+END_QUOTE + +* Nested transactions + Nested transactions are similar to save points transactions, but instead save points these + transactions break down to smaller flat transactions. Each transaction commits separately from + other transactions. But result of the parent transaction rule them all, so if the parent + transaction fails all the nested transactions have to rollback. + + #+BEGIN_SRC sql + BEGIN + BEGIN T1 + ... + COMMIT T1 + BEGIN T2 + ... + COMMIT T2 + COMMIT + #+END_SRC + +#+BEGIN_QUOTE +Note: *These transactions only solve the multi stage transaction problem.* +#+END_QUOTE + +* Chained transactions + In these kind of transactions, smaller flat transaction can be applied in a chain in the way that + the result of each of them is not visible to the outside world until the end of the chain. + + In theory chained transactions should be applied in sequence but in practice in some cases we can + interleave their operations. Also Between T1 and T2 of a chained transaction, No other thread of + code shouldn't be able to make changes to those resources which T2 will operates on. + + If any transaction in the chain fails, it has nothing to do with the previous transactions in the + chain. For example: + + #+BEGIN_SRC + T1 -> T2 -> T3 + S -> S -> F + #+END_SRC + + In the chained transaction above only T3 failed and T1 and T2 are successfully committed to storage. + We don't have to roll them back. + + While chained transactions can break big transactions into smaller pieces for better parallelism but + *they only solve the multi stage transaction problem* Not the bulk update problem. + +* Compensating transactions + This type of transactions are special transactions which are designed to semantically reverse the + effect of another transaction which already committed. + + One important thing to remember about compensating transactions is that they know how to revert + the /logical/ effect of other transactions /NOT the physical/ effect. For example, If a transaction + increase a counter by one. The physical revert would be to changes the binary data that inserted + for that counter to what it was before the transaction, but the logical revert would be to + decrease the counter by one when needed. + + So basically these kind of transactions know about how to put the database in correct state before + the other transaction. + +* Saga Transactions + A saga transaction is a sequence of chained transactions =T1 - Tn= and compensating transaction + =C1 - C(n-1)= where the following guaranteed: + +- The transactions will commit in the order =T1...Tj=, =Cj...C1= (where =j < n=). + +So basically this means that a saga transaction is a seq of chained transactions which applies the +smaller transactions in order with their corresponding compensating transactions. + +In a chained transaction when ever transaction Tn aborts, the transactions before Tn stay committed, +but in saga transactions they will be rollback using compensating transactions that know how to +roll them back *logically*. + +So Saga transactions can be fix both multi-staging and bulk update problems. But the issue here is +that the compensating transactions are something that requires application level understanding of +the use case so most of the time they are implemented in the application frameworks instead of DBMSs. diff --git a/orgs/faq.org b/orgs/faq.org new file mode 100644 index 0000000..daeecf5 --- /dev/null +++ b/orgs/faq.org @@ -0,0 +1,63 @@ +#+SETUPFILE: ../config.org +#+OPTIONS: toc:2 +#+EXPORT_FILE_NAME: faq.html +#+DATE: 2021-02-11 +#+TITLE: FAQ +#+PAGE: true + +Here is a list of questions people usually ask me. + +* General +** Why your website is like this ? + I value simplicity. The purpose of this website is to share my thoughts and research with others and not + to impress them with a shiny and heavy good looking website. +** Where can I find your CV ? + You can find my CV [[https://dl.lxsameer.com/CV/SameerRahmani.pdf][Here]], I try to keep it up to date ( Not always though :D ). +** How do you keep up with your work and research ? + I use [[https://orgmode.org/][org-mode]] to manage my life mostly, But beside that I have priorities in my life and when things come to + my way I process them based on my priorities. For example I love to play the Guitar but as long as I have time for + it and it doesn't interfier with my priorities. + + I usually partition my days into chunks of two days time and dedicate the main goal of each chunks to a cetain + project that I have to work on. It makes the context switch less painfull. BTW I use [[https://orgmode.org/][org-mode]] to take notes and + track my progress in my research and project and also when I read books. +** What do you do for fun ? + Usually video games, Anime music and sports. + +* Engineering + +** What GNU/Linux distro do you use ? + I used to use Debian unstable for 14 years. But I moved to Gentoo just because I care about my security and I + hate Systemd. + +** What editor/IDE do you use ? + I use my own editor, [[https://devheroes.codes/FG42/FG42][FG42]] which is based on on the mighty [[https://www.gnu.org/software/emacs/][GNU/Emacs]] and publicly available under GPLv2 license. + +** What desktop environment/window manager do you use? + Again, I use editor [[https://devheroes.codes/FG42/FG42][FG42]] for that purpose as well. I boot directly into my editor and manage everything from there. + +** What's your favorite programming language ? + I don't have any bias toward any specific language, But I've found the Lisp family to be really good. + +** Have you studied Software engineering in college ? + No + +** How can I improve as an engineer ? + I'm not an advisor and frankly I'm somewhere in my own journey and far from the end. But I can give one piece of + advise. Whatever you do, try to be scientificly literate. + +** Where is your hang out place up on the internet ? + I'm an [[https://en.wikipedia.org/wiki/Internet_Relay_Chat][IRC]] user and I usually hang out in the irc://freenode.net/#5hit channel. + + +* Science +** What do you do in Science ? + Physics +** What is your field of study ? + Quantum field theory +** I though you're an engineer, What's your deal? + Well, I love physics. Simply I want to know more. The universe baffles me. +** What do you suggest to those who want to start in science ? + I'm not an advisor and even not a top notch scientist, So I can't give you any good advise, But I share my own + experience with you. The most important thing is to keep an open mind, always think like us humans are not + the center of universe and finally learn algebra. diff --git a/orgs/gpg.org b/orgs/gpg.org new file mode 100644 index 0000000..47358ab --- /dev/null +++ b/orgs/gpg.org @@ -0,0 +1,15 @@ +#+SETUPFILE: ../config.org +#+OPTIONS: toc:nil +#+EXPORT_FILE_NAME: gpg.html +#+DATE: 2021-02-11 +#+TITLE: GPG Information +#+PAGE: true + +I use GPG heavily. There might be some expired or fake keys of mine on key servers but here is [[https://dl.lxsameer.com/lxsameer.pub.gpg][My Current Key:]] + +#+BEGIN_SRC +pub rsa4096 2020-01-03 [SC] [expires: 2022-01-02] + 75B126C50711BF7F4816D451B775967058BB835C +uid [ unknown] Sameer Rahmani (For more info refer to: lxsameer.com) +sub rsa4096 2020-01-03 [E] [expires: 2022-01-02] +#+END_SRC diff --git a/orgs/index.org b/orgs/index.org index a2364d4..8797ba9 100644 --- a/orgs/index.org +++ b/orgs/index.org @@ -1,17 +1,23 @@ #+SETUPFILE: ../config.org #+OPTIONS: toc:nil #+EXPORT_FILE_NAME: index.html -#+TAGS: ABD(a) BD(c) ASDK(k) #+DATE: 2021-02-11 -#+CATEGORY: blah -#+TITLE: blah +#+TITLE: The little nest of mine #+PAGE: true -* Welcome :ABD:BD: - :PROPERTIES: - :BLAH: s - :END: - blha bbasd asds asd a asd =asdasd= somer `asdasd` sadasd *asdasD* asdasd /asdasd/ asdasd. - ads ad asd asd as dasd asd - - [[http://localhost:3003/essays/serene-blah.html][Serene blah]] - - [[http://localhost:3003/essays/javascript-blah.html][javascript blah]] +Welcome to my little piece of the world. I'm a software engineer by day and an armature scientist by night +who lives by his [[./coh.org][Code of Honor]]. I write about my thoughts and researches. The views expressed here are my +personal views and not of those organizations that I might be associated with. Most of my time goes to developing +free software either by contributing to other projects or by working on my own stuff which you can find +them on [[https://devheroes.codes][devheroes]]. + +If you're interested in my work and research feel free to contact me to have a friendly chat Or share you thoughts +with me via email (check my [[./gpg.org][GPG]] info page). If you have a question for me, you might be able to find the answer to it +in the [[./faq.org][FAQs]] page. + +* Recent updates: + - [[http://localhost:3003/essays/serene-simple-version.html][Serene (simple versoin)]] + - [[http://localhost:3003/essays/choosing-the-target-platform.html][Choosing the target platform]] + - [[http://localhost:3003/essays/rational-and-a-name.html][Rational and a name]] + - [[http://localhost:3003/essays/my-new-programming-language.html][My new programming language]] + - [[http://localhost:3003/essays/transaction-variants.html][Transaction Variants]] diff --git a/orgs/sitemap.inc b/orgs/sitemap.inc index 279bfd6..08bc256 100644 --- a/orgs/sitemap.inc +++ b/orgs/sitemap.inc @@ -1,12 +1,22 @@ #+TITLE: lxsameer's nest +- [[file:essays/serene-simple-version.org][Serene (simple versoin)]] +- [[file:essays/choosing-the-target-platform.org][Choosing the target platform]] +- [[file:essays/rational-and-a-name.org][Rational and a name]] +- [[file:tags/Serene.org][Serene]] +- [[file:tags/Languages.org][Languages]] +- [[file:essays/my-new-programming-language.org][My new programming language]] +- [[file:categories/Engineering.org][Engineering]] +- [[file:tags/Databases.org][Databases]] +- [[file:essays/transaction-variants.org][Transaction Variants]] +- [[file:faq.org][FAQ]] +- [[file:gpg.org][Code of Honor]] +- [[file:coh.org][Code of Honor]] - [[file:categories/nil.org][<<>>]] - [[file:categories/SLA.org][SLA]] - [[file:tags/ASDK.org][ASDK]] - [[file:tags/BD.org][BD]] - [[file:tags/ABD.org][ABD]] -- [[file:essays/javascript-blah.org][javascript blah]] - [[file:tags/index.org][index]] - [[file:categories/index.org][index]] -- [[file:essays/serene-blah.org][Serene blah]] - [[file:index.org][blah]] \ No newline at end of file diff --git a/templates/blog.html b/templates/blog.html index 9028c79..59f6da2 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -4,12 +4,13 @@ {{{head}}} <link rel="stylesheet" href="{{base-url}}/assets/styles/dark.css?1"> <link rel="stylesheet" href="{{base-url}}/assets/styles/main.css?1"> + <link rel="stylesheet" href="{{base-url}}/assets/styles/arta.css?1"> </head> <body> <header> <nav style="text-align: center;"> - <a href="/">HOME</a> | <a href="/categories/">Categories</a> | <a href="/tags/">Tags</a> | <a href="#">Code of Honor</a> | <a href="#">RSS</a> + <a href="/">HOME</a> | <a href="/categories/">Categories</a> | <a href="/tags/">Tags</a> | <a href="/coh.html">Code of Honor</a> | <a href="#">RSS</a> </nav> <hr/> </header> @@ -28,5 +29,15 @@ <span><a href="https://devheroes.codes/lxsameer/lxhome">https://devheroes.codes/lxsameer/lxhome</a></span> </footer> </div> + <script src="{{base-url}}/assets/js/highlight.pack.js"></script> + <script> + document.addEventListener('DOMContentLoaded', (event) => { + hljs.configure({languageDetectRe: /\bsrc-([\w-]+)\b/i}) + document.querySelectorAll('pre.src').forEach((block) => { + console.dir(block); + hljs.highlightBlock(block); + }); + }); + </script> </body> </html> diff --git a/templates/index.org b/templates/index.org index 9ea1e94..3910ea1 100644 --- a/templates/index.org +++ b/templates/index.org @@ -1,16 +1,19 @@ #+SETUPFILE: ../config.org #+OPTIONS: toc:nil #+EXPORT_FILE_NAME: index.html -#+TAGS: ABD(a) BD(c) ASDK(k) #+DATE: 2021-02-11 -#+CATEGORY: blah -#+TITLE: blah +#+TITLE: The little nest of mine #+PAGE: true -* Welcome :ABD:BD: - :PROPERTIES: - :BLAH: s - :END: - blha bbasd asds asd a asd =asdasd= somer `asdasd` sadasd *asdasD* asdasd /asdasd/ asdasd. - ads ad asd asd as dasd asd +Welcome to my little piece of the world. I'm a software engineer by day and an armature scientist by night +who lives by his [[./coh.org][Code of Honor]]. I write about my thoughts and researches. The views expressed here are my +personal views and not of those organizations that I might be associated with. Most of my time goes to developing +free software either by contributing to other projects or by working on my own stuff which you can find +them on [[https://devheroes.codes][devheroes]]. + +If you're interested in my work and research feel free to contact me to have a friendly chat Or share you thoughts +with me via email (check my [[./gpg.org][GPG]] info page). If you have a question for me, you might be able to find the answer to it +in the [[./faq.org][FAQs]] page. + +* Recent updates: <<<links>>>