From 3b4daaab749601c59c5b2f497919ab22363d02e7 Mon Sep 17 00:00:00 2001 From: Sainan Date: Mon, 21 Oct 2024 02:29:14 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20PlutoLan?= =?UTF-8?q?g/plutolang.github.io@13a89cf025d39ca798613e3c59a8924cfc33ebbb?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 4 ++-- assets/js/02389cdc.7c9a9332.js | 1 + assets/js/02389cdc.d41af58c.js | 1 - assets/js/04c377ef.00768c95.js | 1 - assets/js/04c377ef.91852cdf.js | 1 + assets/js/186e575c.23979853.js | 1 + assets/js/186e575c.869330e6.js | 1 - assets/js/1e33aabf.5cbed597.js | 1 + assets/js/1e33aabf.69259352.js | 1 - assets/js/1efc24b5.29850f78.js | 1 + assets/js/1efc24b5.3b8993fa.js | 1 - assets/js/1f9adaf9.021386b0.js | 1 - assets/js/1f9adaf9.be26421f.js | 1 + assets/js/20639b4d.221ec835.js | 1 - assets/js/20639b4d.767a0ba1.js | 1 + assets/js/2fe108ae.09a7a094.js | 1 - assets/js/2fe108ae.5bba8398.js | 1 + assets/js/30d00a07.7428bbf0.js | 1 - assets/js/30d00a07.b19d7a7a.js | 1 + assets/js/389ebece.9835871c.js | 1 + assets/js/389ebece.ec3f72b0.js | 1 - assets/js/3ba36259.3095a301.js | 1 + assets/js/3ba36259.7d9db439.js | 1 - assets/js/3d1a2b43.02a7ba7d.js | 1 - assets/js/3d1a2b43.959e1c7f.js | 1 + assets/js/3eb63321.b24a9554.js | 1 - assets/js/3eb63321.cce17633.js | 1 + assets/js/413eb15f.2ed0e9d4.js | 1 - assets/js/413eb15f.40ef8433.js | 1 + assets/js/41586035.7b46d7d7.js | 1 + assets/js/41586035.da392211.js | 1 - assets/js/4dbc4eab.010cb1bf.js | 1 + assets/js/4dbc4eab.87c01e61.js | 1 - assets/js/54c50845.7f6f2d87.js | 1 - assets/js/54c50845.d7bad467.js | 1 + assets/js/5572491f.32110223.js | 1 - assets/js/5572491f.d83b8a9a.js | 1 + assets/js/5b3ce2d7.0cb48930.js | 1 + assets/js/5b3ce2d7.b5dae07e.js | 1 - assets/js/62afbdfe.0bcdd719.js | 1 + assets/js/62afbdfe.775b5179.js | 1 - assets/js/6c9c7408.5dfe8bcb.js | 1 + assets/js/6c9c7408.c61a343b.js | 1 - assets/js/6d37f50b.2e4fbd62.js | 1 - assets/js/6d37f50b.658c2143.js | 1 + assets/js/7efe30ee.2453841d.js | 1 + assets/js/7efe30ee.584baef8.js | 1 - assets/js/83156343.0a7cfa6e.js | 1 + assets/js/83156343.235f58bc.js | 1 - assets/js/871e1111.32fd18b2.js | 1 - assets/js/871e1111.6b7e451c.js | 1 + assets/js/8c64e7a6.130a079e.js | 1 + assets/js/8c64e7a6.5ab6caff.js | 1 - assets/js/8d7b091f.0ff1cec4.js | 1 - assets/js/8d7b091f.7b883459.js | 1 + assets/js/8d8f025d.56101e49.js | 1 - assets/js/8d8f025d.f58865f0.js | 1 + assets/js/8e3b1f2f.23c8ba2e.js | 1 - assets/js/8e3b1f2f.c44c72dd.js | 1 + assets/js/95939464.3f5fef34.js | 1 - assets/js/95939464.7a78f7f9.js | 1 + assets/js/998c02ee.31400400.js | 1 - assets/js/998c02ee.918ea713.js | 1 + assets/js/9e2b6020.0694e1ac.js | 1 - assets/js/9e2b6020.b2bd9a7d.js | 1 + assets/js/9f43fc60.016f9e2d.js | 1 - assets/js/9f43fc60.d877bf45.js | 1 + assets/js/a87c8fc0.6bab9a7c.js | 1 + assets/js/a87c8fc0.f4853ce8.js | 1 - assets/js/ab6d44ab.413f0394.js | 1 + assets/js/ab6d44ab.fbfa218c.js | 1 - assets/js/{abac9f7e.1a0ca031.js => abac9f7e.1cf438e4.js} | 2 +- assets/js/bced9760.38f82b3a.js | 1 + assets/js/bced9760.400b90e5.js | 1 - assets/js/bd751cc9.693890f8.js | 1 - assets/js/bd751cc9.7e88fe2c.js | 1 + assets/js/c459eb7d.9b6af93c.js | 1 + assets/js/c459eb7d.ded956e6.js | 1 - assets/js/c79b562e.a39a9e6f.js | 1 - assets/js/c79b562e.d096d5f8.js | 1 + assets/js/d037c94c.3d876123.js | 1 + assets/js/d037c94c.f573cc81.js | 1 - assets/js/d08eaa4d.24b0fb51.js | 1 - assets/js/d08eaa4d.e3397e81.js | 1 + assets/js/d81fa0e5.6207b642.js | 1 - assets/js/d81fa0e5.9cff45c9.js | 1 + assets/js/dd7a9681.4851897c.js | 1 - assets/js/dd7a9681.d229647d.js | 1 + assets/js/ddde9844.62a350d6.js | 1 - assets/js/ddde9844.96c49a2b.js | 1 + assets/js/e22c3ce6.06332655.js | 1 + assets/js/e22c3ce6.abd69fd4.js | 1 - assets/js/e358ed3f.7bcf7332.js | 1 + assets/js/e358ed3f.922935f0.js | 1 - assets/js/e4b9287f.7bc069a9.js | 1 - assets/js/e4b9287f.f0bc8658.js | 1 + assets/js/e86e00b1.7226691a.js | 1 - assets/js/e86e00b1.b08f3f7e.js | 1 + assets/js/ed6b6a43.3c265500.js | 1 - assets/js/ed6b6a43.e04091f0.js | 1 + assets/js/ef218fa5.6ee09969.js | 1 - assets/js/ef218fa5.9d227dde.js | 1 + assets/js/f18b32fa.4b5f6d9d.js | 1 - assets/js/f18b32fa.ae9e5d5a.js | 1 + assets/js/f2f8d974.2d9cc4e9.js | 1 + assets/js/f2f8d974.b4e43149.js | 1 - assets/js/f5454c7f.7e35e8fc.js | 1 - assets/js/f5454c7f.dd77faa6.js | 1 + ...{runtime~main.67cba238.js => runtime~main.62324367.js} | 2 +- docs/Changelog.html | 4 ++-- docs/Compatibility.html | 6 +++--- docs/Editor Integration.html | 4 ++-- docs/For Integrators.html | 6 +++--- docs/Getting Started.html | 6 +++--- docs/Introduction.html | 4 ++-- docs/New Features/Break Statement.html | 6 +++--- docs/New Features/Compile-Time Evaluation.html | 6 +++--- docs/New Features/Compiler Warnings.html | 6 +++--- docs/New Features/Continue Statement.html | 6 +++--- docs/New Features/Default Arguments.html | 6 +++--- docs/New Features/Destructuring.html | 6 +++--- docs/New Features/Enumerations.html | 6 +++--- docs/New Features/Explicit Globals.html | 6 +++--- docs/New Features/Export Modifier.html | 6 +++--- docs/New Features/For-As Loop.html | 6 +++--- docs/New Features/In Expressions.html | 6 +++--- docs/New Features/Lambda Expressions.html | 6 +++--- docs/New Features/Named Arguments.html | 6 +++--- docs/New Features/Named Varargs.html | 6 +++--- docs/New Features/Nodiscard Functions.html | 6 +++--- docs/New Features/Numeral Parsing.html | 6 +++--- docs/New Features/Object-Oriented Programming.html | 6 +++--- docs/New Features/Safe Navigation.html | 6 +++--- docs/New Features/String Indexing.html | 6 +++--- docs/New Features/String Interpolation.html | 6 +++--- docs/New Features/Switch Blocks.html | 6 +++--- docs/New Features/Table Freezing.html | 6 +++--- docs/New Features/Ternary Expressions.html | 6 +++--- docs/New Features/Try-Catch Statement.html | 6 +++--- docs/New Features/Type Hinting.html | 6 +++--- docs/New Operators.html | 6 +++--- docs/Optimizations/For Loops.html | 6 +++--- docs/Optimizations/Jump Table.html | 4 ++-- docs/Optimizations/Special Arithmetic.html | 4 ++-- docs/Optimizations/Table Length.html | 4 ++-- docs/QoL Improvements/Boolean Concatenation.html | 6 +++--- docs/QoL Improvements/Generalized Iteration.html | 6 +++--- docs/QoL Improvements/Optional Parentheses.html | 6 +++--- docs/QoL Improvements/Removed Locals Limit.html | 4 ++-- docs/QoL Improvements/Reserved Identifiers.html | 6 +++--- docs/QoL Improvements/Syntax Errors.html | 8 ++++---- docs/Runtime Environment/Assert.html | 6 +++--- docs/Runtime Environment/Base32.html | 4 ++-- docs/Runtime Environment/Base64.html | 6 +++--- docs/Runtime Environment/Bigint.html | 6 +++--- docs/Runtime Environment/CaT.html | 6 +++--- docs/Runtime Environment/Coroutine.html | 4 ++-- docs/Runtime Environment/Crypto.html | 6 +++--- docs/Runtime Environment/Exception.html | 6 +++--- docs/Runtime Environment/Global & Base.html | 6 +++--- docs/Runtime Environment/HTTP.html | 6 +++--- docs/Runtime Environment/IO.html | 6 +++--- docs/Runtime Environment/JSON.html | 6 +++--- docs/Runtime Environment/Math.html | 6 +++--- docs/Runtime Environment/OS.html | 6 +++--- docs/Runtime Environment/Scheduler.html | 6 +++--- docs/Runtime Environment/Socket.html | 6 +++--- docs/Runtime Environment/String.html | 6 +++--- docs/Runtime Environment/Table.html | 6 +++--- docs/Runtime Environment/URL.html | 6 +++--- docs/Runtime Environment/Vector3.html | 6 +++--- docs/Runtime Environment/XML.html | 6 +++--- docs/category/new-features.html | 4 ++-- docs/category/optimizations.html | 4 ++-- docs/category/qol-improvements.html | 4 ++-- docs/category/runtime-environment.html | 4 ++-- index.html | 4 ++-- search-index.json | 2 +- search.html | 4 ++-- 179 files changed, 251 insertions(+), 251 deletions(-) create mode 100644 assets/js/02389cdc.7c9a9332.js delete mode 100644 assets/js/02389cdc.d41af58c.js delete mode 100644 assets/js/04c377ef.00768c95.js create mode 100644 assets/js/04c377ef.91852cdf.js create mode 100644 assets/js/186e575c.23979853.js delete mode 100644 assets/js/186e575c.869330e6.js create mode 100644 assets/js/1e33aabf.5cbed597.js delete mode 100644 assets/js/1e33aabf.69259352.js create mode 100644 assets/js/1efc24b5.29850f78.js delete mode 100644 assets/js/1efc24b5.3b8993fa.js delete mode 100644 assets/js/1f9adaf9.021386b0.js create mode 100644 assets/js/1f9adaf9.be26421f.js delete mode 100644 assets/js/20639b4d.221ec835.js create mode 100644 assets/js/20639b4d.767a0ba1.js delete mode 100644 assets/js/2fe108ae.09a7a094.js create mode 100644 assets/js/2fe108ae.5bba8398.js delete mode 100644 assets/js/30d00a07.7428bbf0.js create mode 100644 assets/js/30d00a07.b19d7a7a.js create mode 100644 assets/js/389ebece.9835871c.js delete mode 100644 assets/js/389ebece.ec3f72b0.js create mode 100644 assets/js/3ba36259.3095a301.js delete mode 100644 assets/js/3ba36259.7d9db439.js delete mode 100644 assets/js/3d1a2b43.02a7ba7d.js create mode 100644 assets/js/3d1a2b43.959e1c7f.js delete mode 100644 assets/js/3eb63321.b24a9554.js create mode 100644 assets/js/3eb63321.cce17633.js delete mode 100644 assets/js/413eb15f.2ed0e9d4.js create mode 100644 assets/js/413eb15f.40ef8433.js create mode 100644 assets/js/41586035.7b46d7d7.js delete mode 100644 assets/js/41586035.da392211.js create mode 100644 assets/js/4dbc4eab.010cb1bf.js delete mode 100644 assets/js/4dbc4eab.87c01e61.js delete mode 100644 assets/js/54c50845.7f6f2d87.js create mode 100644 assets/js/54c50845.d7bad467.js delete mode 100644 assets/js/5572491f.32110223.js create mode 100644 assets/js/5572491f.d83b8a9a.js create mode 100644 assets/js/5b3ce2d7.0cb48930.js delete mode 100644 assets/js/5b3ce2d7.b5dae07e.js create mode 100644 assets/js/62afbdfe.0bcdd719.js delete mode 100644 assets/js/62afbdfe.775b5179.js create mode 100644 assets/js/6c9c7408.5dfe8bcb.js delete mode 100644 assets/js/6c9c7408.c61a343b.js delete mode 100644 assets/js/6d37f50b.2e4fbd62.js create mode 100644 assets/js/6d37f50b.658c2143.js create mode 100644 assets/js/7efe30ee.2453841d.js delete mode 100644 assets/js/7efe30ee.584baef8.js create mode 100644 assets/js/83156343.0a7cfa6e.js delete mode 100644 assets/js/83156343.235f58bc.js delete mode 100644 assets/js/871e1111.32fd18b2.js create mode 100644 assets/js/871e1111.6b7e451c.js create mode 100644 assets/js/8c64e7a6.130a079e.js delete mode 100644 assets/js/8c64e7a6.5ab6caff.js delete mode 100644 assets/js/8d7b091f.0ff1cec4.js create mode 100644 assets/js/8d7b091f.7b883459.js delete mode 100644 assets/js/8d8f025d.56101e49.js create mode 100644 assets/js/8d8f025d.f58865f0.js delete mode 100644 assets/js/8e3b1f2f.23c8ba2e.js create mode 100644 assets/js/8e3b1f2f.c44c72dd.js delete mode 100644 assets/js/95939464.3f5fef34.js create mode 100644 assets/js/95939464.7a78f7f9.js delete mode 100644 assets/js/998c02ee.31400400.js create mode 100644 assets/js/998c02ee.918ea713.js delete mode 100644 assets/js/9e2b6020.0694e1ac.js create mode 100644 assets/js/9e2b6020.b2bd9a7d.js delete mode 100644 assets/js/9f43fc60.016f9e2d.js create mode 100644 assets/js/9f43fc60.d877bf45.js create mode 100644 assets/js/a87c8fc0.6bab9a7c.js delete mode 100644 assets/js/a87c8fc0.f4853ce8.js create mode 100644 assets/js/ab6d44ab.413f0394.js delete mode 100644 assets/js/ab6d44ab.fbfa218c.js rename assets/js/{abac9f7e.1a0ca031.js => abac9f7e.1cf438e4.js} (79%) create mode 100644 assets/js/bced9760.38f82b3a.js delete mode 100644 assets/js/bced9760.400b90e5.js delete mode 100644 assets/js/bd751cc9.693890f8.js create mode 100644 assets/js/bd751cc9.7e88fe2c.js create mode 100644 assets/js/c459eb7d.9b6af93c.js delete mode 100644 assets/js/c459eb7d.ded956e6.js delete mode 100644 assets/js/c79b562e.a39a9e6f.js create mode 100644 assets/js/c79b562e.d096d5f8.js create mode 100644 assets/js/d037c94c.3d876123.js delete mode 100644 assets/js/d037c94c.f573cc81.js delete mode 100644 assets/js/d08eaa4d.24b0fb51.js create mode 100644 assets/js/d08eaa4d.e3397e81.js delete mode 100644 assets/js/d81fa0e5.6207b642.js create mode 100644 assets/js/d81fa0e5.9cff45c9.js delete mode 100644 assets/js/dd7a9681.4851897c.js create mode 100644 assets/js/dd7a9681.d229647d.js delete mode 100644 assets/js/ddde9844.62a350d6.js create mode 100644 assets/js/ddde9844.96c49a2b.js create mode 100644 assets/js/e22c3ce6.06332655.js delete mode 100644 assets/js/e22c3ce6.abd69fd4.js create mode 100644 assets/js/e358ed3f.7bcf7332.js delete mode 100644 assets/js/e358ed3f.922935f0.js delete mode 100644 assets/js/e4b9287f.7bc069a9.js create mode 100644 assets/js/e4b9287f.f0bc8658.js delete mode 100644 assets/js/e86e00b1.7226691a.js create mode 100644 assets/js/e86e00b1.b08f3f7e.js delete mode 100644 assets/js/ed6b6a43.3c265500.js create mode 100644 assets/js/ed6b6a43.e04091f0.js delete mode 100644 assets/js/ef218fa5.6ee09969.js create mode 100644 assets/js/ef218fa5.9d227dde.js delete mode 100644 assets/js/f18b32fa.4b5f6d9d.js create mode 100644 assets/js/f18b32fa.ae9e5d5a.js create mode 100644 assets/js/f2f8d974.2d9cc4e9.js delete mode 100644 assets/js/f2f8d974.b4e43149.js delete mode 100644 assets/js/f5454c7f.7e35e8fc.js create mode 100644 assets/js/f5454c7f.dd77faa6.js rename assets/js/{runtime~main.67cba238.js => runtime~main.62324367.js} (58%) diff --git a/404.html b/404.html index 92056035..40309f06 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | Pluto - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/02389cdc.7c9a9332.js b/assets/js/02389cdc.7c9a9332.js new file mode 100644 index 00000000..b8a4aaf2 --- /dev/null +++ b/assets/js/02389cdc.7c9a9332.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[2704],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>v});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),i=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=i(e.components);return a.createElement(s.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),m=i(n),u=r,v=m["".concat(s,".").concat(u)]||m[u]||d[u]||o;return n?a.createElement(v,l(l({ref:t},c),{},{components:n})):a.createElement(v,l({ref:t},c))}));function v(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=u;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var i=2;i{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>p,toc:()=>i});var a=n(7462),r=(n(7294),n(3905));const o={},l=void 0,p={unversionedId:"QoL Improvements/Boolean Concatenation",id:"QoL Improvements/Boolean Concatenation",title:"Boolean Concatenation",description:"Pluto allows you to concatenate boolean values just like you would number values:",source:"@site/docs/QoL Improvements/Boolean Concatenation.md",sourceDirName:"QoL Improvements",slug:"/QoL Improvements/Boolean Concatenation",permalink:"/docs/QoL Improvements/Boolean Concatenation",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"QoL Improvements",permalink:"/docs/category/qol-improvements"},next:{title:"Generalized Iteration",permalink:"/docs/QoL Improvements/Generalized Iteration"}},s={},i=[],c={toc:i},m="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Pluto allows you to concatenate boolean values just like you would number values:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," iVar "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"13")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bVar "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"iVar = "'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," iVar)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"bVar = "'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"tostring"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(bVar)) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Lua way")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"bVar = "'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bVar) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Pluto way"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/02389cdc.d41af58c.js b/assets/js/02389cdc.d41af58c.js deleted file mode 100644 index e7e227e3..00000000 --- a/assets/js/02389cdc.d41af58c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[2704],{3905:(e,t,o)=>{o.d(t,{Zo:()=>i,kt:()=>v});var r=o(7294);function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function l(e){for(var t=1;t=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var p=r.createContext({}),s=function(e){var t=r.useContext(p),o=t;return e&&(o="function"==typeof e?e(t):l(l({},t),e)),o},i=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var o=e.components,n=e.mdxType,a=e.originalType,p=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),m=s(o),u=n,v=m["".concat(p,".").concat(u)]||m[u]||d[u]||a;return o?r.createElement(v,l(l({ref:t},i),{},{components:o})):r.createElement(v,l({ref:t},i))}));function v(e,t){var o=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=o.length,l=new Array(a);l[0]=u;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[m]="string"==typeof e?e:n,l[1]=c;for(var s=2;s{o.r(t),o.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>s});var r=o(7462),n=(o(7294),o(3905));const a={},l=void 0,c={unversionedId:"QoL Improvements/Boolean Concatenation",id:"QoL Improvements/Boolean Concatenation",title:"Boolean Concatenation",description:"Pluto allows you to concatenate boolean values just like you would number values:",source:"@site/docs/QoL Improvements/Boolean Concatenation.md",sourceDirName:"QoL Improvements",slug:"/QoL Improvements/Boolean Concatenation",permalink:"/docs/QoL Improvements/Boolean Concatenation",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"QoL Improvements",permalink:"/docs/category/qol-improvements"},next:{title:"Generalized Iteration",permalink:"/docs/QoL Improvements/Generalized Iteration"}},p={},s=[],i={toc:s},m="wrapper";function d(e){let{components:t,...o}=e;return(0,n.kt)(m,(0,r.Z)({},i,o,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Pluto allows you to concatenate boolean values just like you would number values:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," iVar "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"13")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bVar "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"iVar = "'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," iVar)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"bVar = "'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"tostring"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(bVar)) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Lua way")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"bVar = "'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bVar) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Pluto way"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/04c377ef.00768c95.js b/assets/js/04c377ef.00768c95.js deleted file mode 100644 index 72baf3c1..00000000 --- a/assets/js/04c377ef.00768c95.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6668],{3905:(e,o,a)=>{a.d(o,{Zo:()=>i,kt:()=>k});var t=a(7294);function r(e,o,a){return o in e?Object.defineProperty(e,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[o]=a,e}function l(e,o){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);o&&(t=t.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),a.push.apply(a,t)}return a}function n(e){for(var o=1;o=0||(r[a]=e[a]);return r}(e,o);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=t.createContext({}),p=function(e){var o=t.useContext(s),a=o;return e&&(a="function"==typeof e?e(o):n(n({},o),e)),a},i=function(e){var o=p(e.components);return t.createElement(s.Provider,{value:o},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var o=e.children;return t.createElement(t.Fragment,{},o)}},F=t.forwardRef((function(e,o){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),d=p(a),F=r,k=d["".concat(s,".").concat(F)]||d[F]||m[F]||l;return a?t.createElement(k,n(n({ref:o},i),{},{components:a})):t.createElement(k,n({ref:o},i))}));function k(e,o){var a=arguments,r=o&&o.mdxType;if("string"==typeof e||r){var l=a.length,n=new Array(l);n[0]=F;var c={};for(var s in o)hasOwnProperty.call(o,s)&&(c[s]=o[s]);c.originalType=e,c[d]="string"==typeof e?e:r,n[1]=c;for(var p=2;p{a.r(o),a.d(o,{assets:()=>s,contentTitle:()=>n,default:()=>m,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var t=a(7462),r=(a(7294),a(3905));const l={sidebar_position:3},n=void 0,c={unversionedId:"Runtime Environment/Crypto",id:"Runtime Environment/Crypto",title:"Crypto",description:"Must be included via require.",source:"@site/docs/Runtime Environment/Crypto.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Crypto",permalink:"/docs/Runtime Environment/Crypto",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"CaT",permalink:"/docs/Runtime Environment/CaT"},next:{title:"Exception",permalink:"/docs/Runtime Environment/Exception"}},s={},p=[{value:"Non-Cryptographic Hashing Algorithms",id:"non-cryptographic-hashing-algorithms",level:2},{value:"crypto.lua",id:"cryptolua",level:3},{value:"Parameters",id:"parameters",level:4},{value:"crypto.md5",id:"cryptomd5",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"crypto.djb2",id:"cryptodjb2",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns",level:4},{value:"crypto.fnv1",id:"cryptofnv1",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"crypto.fnv1a",id:"cryptofnv1a",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"crypto.joaat",id:"cryptojoaat",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-1",level:4},{value:"crypto.sdbm",id:"cryptosdbm",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-2",level:4},{value:"crypto.crc32",id:"cryptocrc32",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-3",level:4},{value:"crypto.adler32",id:"cryptoadler32",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"crypto.lookup3",id:"cryptolookup3",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"crypto.times33",id:"cryptotimes33",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-4",level:4},{value:"crypto.murmur1",id:"cryptomurmur1",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-5",level:4},{value:"crypto.murmur2",id:"cryptomurmur2",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-6",level:4},{value:"crypto.murmur2a",id:"cryptomurmur2a",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-7",level:4},{value:"crypto.murmur64a",id:"cryptomurmur64a",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"crypto.murmur64b",id:"cryptomurmur64b",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"crypto.murmur2neutral",id:"cryptomurmur2neutral",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Cryptographic Hashing Algorithms",id:"cryptographic-hashing-algorithms",level:2},{value:"crypto.sha1",id:"cryptosha1",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"crypto.sha256",id:"cryptosha256",level:3},{value:"Parameters",id:"parameters-18",level:4},{value:"crypto.sha384",id:"cryptosha384",level:3},{value:"Parameters",id:"parameters-19",level:4},{value:"crypto.sha512",id:"cryptosha512",level:3},{value:"Parameters",id:"parameters-20",level:4},{value:"Cryptographic PRNGs",id:"cryptographic-prngs",level:2},{value:"crypto.random",id:"cryptorandom",level:3},{value:"Parameters",id:"parameters-21",level:4},{value:"AES-CBC, AES-CFB",id:"aes-cbc-aes-cfb",level:2},{value:"crypto.encrypt",id:"cryptoencrypt",level:3},{value:"Parameters",id:"parameters-22",level:4},{value:"crypto.decrypt",id:"cryptodecrypt",level:3},{value:"Parameters",id:"parameters-23",level:4},{value:"AES-ECB",id:"aes-ecb",level:2},{value:"crypto.encrypt",id:"cryptoencrypt-1",level:3},{value:"Parameters",id:"parameters-24",level:4},{value:"crypto.decrypt",id:"cryptodecrypt-1",level:3},{value:"Parameters",id:"parameters-25",level:4},{value:"AES-GCM",id:"aes-gcm",level:2},{value:"crypto.encrypt",id:"cryptoencrypt-2",level:3},{value:"Parameters",id:"parameters-26",level:4},{value:"crypto.decrypt",id:"cryptodecrypt-2",level:3},{value:"Parameters",id:"parameters-27",level:4},{value:"RSA",id:"rsa",level:2},{value:"crypto.generatekeypair",id:"cryptogeneratekeypair",level:3},{value:"Parameters",id:"parameters-28",level:4},{value:"crypto.encrypt",id:"cryptoencrypt-3",level:3},{value:"Parameters",id:"parameters-29",level:4},{value:"crypto.decrypt",id:"cryptodecrypt-3",level:3},{value:"Parameters",id:"parameters-30",level:4},{value:"crypto.sign",id:"cryptosign",level:3},{value:"Parameters",id:"parameters-31",level:4},{value:"crypto.verify",id:"cryptoverify",level:3},{value:"Parameters",id:"parameters-32",level:4}],i={toc:p},d="wrapper";function m(e){let{components:o,...a}=e;return(0,r.kt)(d,(0,t.Z)({},i,a,{components:o,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Must be included via ",(0,r.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,r.kt)("hr",null),(0,r.kt)("h2",{id:"non-cryptographic-hashing-algorithms"},"Non-Cryptographic Hashing Algorithms"),(0,r.kt)("h3",{id:"cryptolua"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.lua")),(0,r.kt)("p",null,"Hash a string using Lua's version of the DJB2 non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"lua"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2871868277"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptomd5"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.md5")),(0,r.kt)("p",null,"Hash a string using the MD5 semi-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"md5"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"5eb63bbbe01eeed093cb22bb8f5acdc3"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptodjb2"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.djb2")),(0,r.kt)("p",null,"Hash a string using the DJB2 non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"djb2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"894552257"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptofnv1"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.fnv1")),(0,r.kt)("p",null,"Hash a string using the FNV1 non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"fnv1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"9065573210506989167"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptofnv1a"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.fnv1a")),(0,r.kt)("p",null,"Hash a string using the FNV1A non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"fnv1a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"8618312879776256743"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptojoaat"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.joaat")),(0,r.kt)("p",null,"Hash a string using the JOAAT non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"joaat"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1045060183"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptosdbm"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.sdbm")),(0,r.kt)("p",null,"Hash a string using the SDBM non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sdbm"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"430867652"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptocrc32"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.crc32")),(0,r.kt)("p",null,"Hash a string using the CRC32 non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash."),(0,r.kt)("li",{parentName:"ol"},"The initial value for the hash. By default, this is zero.")),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"crc32"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"222957957"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptoadler32"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.adler32")),(0,r.kt)("p",null,"Hash a string using the Adler-32 non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash."),(0,r.kt)("li",{parentName:"ol"},"The initial value for the hash. By default, this is zero.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"adler32"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"103547413"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptolookup3"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.lookup3")),(0,r.kt)("p",null,"Hash a string using the Lookup3 non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"lookup3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1252609637"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptotimes33"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.times33")),(0,r.kt)("p",null,"Hash a string using the Times33 non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"times33"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3889643616"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("h3",{id:"cryptomurmur1"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.murmur1")),(0,r.kt)("p",null,"Hash a string using the Murmur1 non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"murmur1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3154674178"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptomurmur2"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.murmur2")),(0,r.kt)("p",null,"Hash a string using the Murmur2 non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-12"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"murmur2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1151865881"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("h3",{id:"cryptomurmur2a"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.murmur2a")),(0,r.kt)("p",null,"Hash a string using the Murmur2A non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-13"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"murmur2a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2650573207"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("h3",{id:"cryptomurmur64a"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.murmur64a")),(0,r.kt)("p",null,"Hash a string using the Murmur64A non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"murmur64a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"-"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3190198453633110066"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("h3",{id:"cryptomurmur64b"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.murmur64b")),(0,r.kt)("p",null,"Hash a string using the Murmur64A non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"murmur64b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"7088720765356542432"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptomurmur2neutral"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.murmur2neutral")),(0,r.kt)("p",null,"Hash a string using the Murmur2Neutral non-cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"murmur2neutral"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1151865881"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h2",{id:"cryptographic-hashing-algorithms"},"Cryptographic Hashing Algorithms"),(0,r.kt)("h3",{id:"cryptosha1"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.sha1")),(0,r.kt)("p",null,"Hash a string using the SHA-1 cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-17"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash."),(0,r.kt)("li",{parentName:"ol"},"When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sha1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Pluto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"bce8c9aca4120776fad6b517874aa09c46405454"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sha1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Pluto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\xbc\\xe8\\xc9\\xac\\xa4\\x12\\x07\\x76\\xfa\\xd6\\xb5\\x17\\x87\\x4a\\xa0\\x9c\\x46\\x40\\x54\\x54"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptosha256"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.sha256")),(0,r.kt)("p",null,"Hash a string using the SHA-256 cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-18"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash."),(0,r.kt)("li",{parentName:"ol"},"When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sha256"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Pluto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"8dad5f6a7dd2dcd8c35ec2fd7babb499bcad60d27d73fe73eca2ce025dfd3b47"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sha256"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Pluto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\x8d\\xad\\x5f\\x6a\\x7d\\xd2\\xdc\\xd8\\xc3\\x5e\\xc2\\xfd\\x7b\\xab\\xb4\\x99\\xbc\\xad\\x60\\xd2\\x7d\\x73\\xfe\\x73\\xec\\xa2\\xce\\x02\\x5d\\xfd\\x3b\\x47"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptosha384"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.sha384")),(0,r.kt)("p",null,"Hash a string using the SHA-384 cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-19"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash."),(0,r.kt)("li",{parentName:"ol"},"When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sha384"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Pluto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"false"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"db890233a919b6745d632633c419e14540ff79f1a89bc4ac194b00e7f913f0f06d5d4d7d6cc2b4aaf9485d223afb8cf0"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cryptosha512"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.sha512")),(0,r.kt)("p",null,"Hash a string using the SHA-512 cryptographic hashing algorithm."),(0,r.kt)("h4",{id:"parameters-20"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to hash."),(0,r.kt)("li",{parentName:"ol"},"When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sha512"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Pluto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"false"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"ee8410a8bf9511b94fd6669b5c3e0c4b86e8e4bf7baa8dbd2773d4d6381dd1aecebbe391bef4c6158620ab3f6b794907652d4432c2301d7e1a6caf520565cdf2"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h2",{id:"cryptographic-prngs"},"Cryptographic PRNGs"),(0,r.kt)("h3",{id:"cryptorandom"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.random")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"crypto.random")," function uses your operating system's default PRNG. "),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"On Linux-based systems, this is ",(0,r.kt)("inlineCode",{parentName:"li"},"/dev/urandom"),"."),(0,r.kt)("li",{parentName:"ul"},"On Windows, this is ",(0,r.kt)("inlineCode",{parentName:"li"},"BCryptGenRandom"),".")),(0,r.kt)("p",null,"This is a cryptographically-secure PRNG when your system can provide those services. However, if it does not, then this is not cryptographically secure. Either way, it provides good randomness."),(0,r.kt)("h4",{id:"parameters-21"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The minimum value to return."),(0,r.kt)("li",{parentName:"ol"},"The maximum value to return, as a range.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"random"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"<"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"11"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h2",{id:"aes-cbc-aes-cfb"},"AES-CBC, AES-CFB"),(0,r.kt)("p",null,"These unauthenticated AES modes take both a key and an IV. The IV must be unique and unpredictable for each encryption session to ensure security."),(0,r.kt)("h3",{id:"cryptoencrypt"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.encrypt")),(0,r.kt)("h4",{id:"parameters-22"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data to be encrypted."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "aes-cbc-pkcs7" or "aes-cfb-pkcs7" for PKCS#7 padding, or "aes-cbc" or "aes-cfb" if you know what you\'re doing.'),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"iv")," \u2014 Must have a length of 16.")),(0,r.kt)("h3",{id:"cryptodecrypt"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.decrypt")),(0,r.kt)("h4",{id:"parameters-23"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The ciphertext to decrypt."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "aes-cbc-pkcs7" or "aes-cfb-pkcs7" for PKCS#7 padding, or "aes-cbc" or "aes-cfb" if you know what you\'re doing.'),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"iv")," \u2014 Must have a length of 16.")),(0,r.kt)("p",null,"Returns the decrypted data on success. Throws an error if the padding was incorrect."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:crypto"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},""),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"A Top Secret Key"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Encrypt")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," iv "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"range"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"16"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"map"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|| "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"char"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"math"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"random"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"255"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")))"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"concat"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'""'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," plain "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," enc "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," plain "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encrypt"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"aes-cbc-pkcs7"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," iv"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(enc))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Decrypt")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decrypt"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(enc"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"aes-cbc-pkcs7"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," iv)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello, world!"))))),(0,r.kt)("hr",null),(0,r.kt)("h2",{id:"aes-ecb"},"AES-ECB"),(0,r.kt)("p",null,"This unauthenticated AES mode takes only a key, and is considered to be the weakest. Identical plaintext blocks result in identical ciphertext blocks."),(0,r.kt)("h3",{id:"cryptoencrypt-1"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.encrypt")),(0,r.kt)("h4",{id:"parameters-24"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data to be encrypted."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "aes-ecb-pkcs7" for PKCS#7 padding, or "aes-ecb" if you know what you\'re doing.'),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.")),(0,r.kt)("h3",{id:"cryptodecrypt-1"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.decrypt")),(0,r.kt)("h4",{id:"parameters-25"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "aes-ecb-pkcs7" for PKCS#7 padding, or "aes-ecb" if you know what you\'re doing.'),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The ciphertext to decrypt."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.")),(0,r.kt)("p",null,"Returns the decrypted data on success. Throws an error if the padding was incorrect."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:crypto"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},""),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"A Top Secret Key"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Encrypt")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," plain "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," enc "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," plain "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encrypt"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"aes-ecb-pkcs7"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(enc)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e string(16) "`p{\ufffd\ufffd\ufffd\ufffdk\\21*.>jG"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Decrypt")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decrypt"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(enc"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"aes-ecb-pkcs7"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello, world!"))))),(0,r.kt)("hr",null),(0,r.kt)("h2",{id:"aes-gcm"},"AES-GCM"),(0,r.kt)("p",null,"This authenticated AES mode allows for additional data that will be validated although not encrypted, such as a Message Authentication Code (MAC)."),(0,r.kt)("h3",{id:"cryptoencrypt-2"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.encrypt")),(0,r.kt)("h4",{id:"parameters-26"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data to be encrypted."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 Must be "aes-gcm". AES-GCM can deal with unpadded data, hence does not need PKCS#7 padding.'),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"aadata")," \u2014 Authenticated data. Will not be encrypted."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"iv")," \u2014 Must have a length of 16.")),(0,r.kt)("p",null,"Returns two strings: the ciphertext and the authentication tag."),(0,r.kt)("h3",{id:"cryptodecrypt-2"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.decrypt")),(0,r.kt)("h4",{id:"parameters-27"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The ciphertext to decrypt."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 Must be "aes-gcm".'),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"aadata")," \u2014 Authenticated data."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"iv")," \u2014 Must have a length of 16."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"tag"),' \u2014 The authentication tag produced by the "encrypt" procedure.')),(0,r.kt)("p",null,"Returns the decrypted data on success. Throws an error if authentication or unpadding failed."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:crypto"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},""),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"A Top Secret Key"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," aadata "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"This is Pluto!"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Encrypt")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," iv "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"range"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"16"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"map"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|| "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"char"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"math"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"random"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"255"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")))"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"concat"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'""'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," plain "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," enc"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," tag "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," plain "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encrypt"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"aes-gcm"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," aadata"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," iv"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(enc))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(tag))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Decrypt")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decrypt"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(enc"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"aes-gcm"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," aadata"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," iv"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," tag)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello, world!"))))),(0,r.kt)("hr",null),(0,r.kt)("h2",{id:"rsa"},"RSA"),(0,r.kt)("h3",{id:"cryptogeneratekeypair"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.generatekeypair")),(0,r.kt)("h4",{id:"parameters-28"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 Must be "rsa".'),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"bits")," \u2014 A positive integer for a strict bit-length requirement, or a negative integer for a lax requirement. Common values are ",(0,r.kt)("inlineCode",{parentName:"li"},"1024"),", ",(0,r.kt)("inlineCode",{parentName:"li"},"2048"),", and ",(0,r.kt)("inlineCode",{parentName:"li"},"4096"),".")),(0,r.kt)("p",null,"Returns two tables: The public key (consisting of ",(0,r.kt)("inlineCode",{parentName:"p"},"n")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"e"),"), and the private key (consisting of ",(0,r.kt)("inlineCode",{parentName:"p"},"p")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"q"),"). The ",(0,r.kt)("a",{parentName:"p",href:"/docs/Runtime%20Environment/Bigint"},"Bigint class")," is used for all values."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," pub"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," priv "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"generatekeypair"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"rsa"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"512"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(pub))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["n"] = 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357,')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["e"] = 65537,')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(priv))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["p"] = 115443384115231951475820445136871322101870729500298182134363293112660251666017,')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["q"] = 98365361248415863235179644468056200977592391948608651522703704315152579004021,')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }"))))),(0,r.kt)("h3",{id:"cryptoencrypt-3"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.encrypt")),(0,r.kt)("h4",{id:"parameters-29"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data to be encrypted."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "rsa-pkcs1" for PKCS#1 padding, or "rsa" if you know what you\'re doing.'),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"key")," \u2014 The public or private key to use. Commonly, a public key is used to encrypt data.")),(0,r.kt)("h3",{id:"cryptodecrypt-3"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.decrypt")),(0,r.kt)("h4",{id:"parameters-30"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The ciphertext to decrypt."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "rsa-pkcs1" for PKCS#1 padding, or "rsa" if you know what you\'re doing.'),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"key")," \u2014 The public or private key to use. If the data was encrypted with the public key, the private key is needed to decrypt it.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { base64"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bigint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto } "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:*"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," priv "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," p "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"115443384115231951475820445136871322101870729500298182134363293112660251666017"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," q "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"98365361248415863235179644468056200977592391948608651522703704315152579004021"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Derive public key")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," pub "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," n "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," priv"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"p "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"*"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," priv"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"q"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," e "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0x10001"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 65537")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Encrypt")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," enc "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encrypt"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"A secret message to the owner of the private key."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"rsa-pkcs1"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," pub)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(base64"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(enc))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Decrypt")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(enc "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decrypt"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"rsa-pkcs1"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," priv"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e A secret message to the owner of the private key."))))),(0,r.kt)("h3",{id:"cryptosign"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.sign")),(0,r.kt)("h4",{id:"parameters-31"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data to sign."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "rsa-sha256" or "rsa-sha1".'),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"key")," \u2014 The private key to use.")),(0,r.kt)("h3",{id:"cryptoverify"},(0,r.kt)("inlineCode",{parentName:"h3"},"crypto.verify")),(0,r.kt)("h4",{id:"parameters-32"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data that was signed."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "rsa-sha256" or "rsa-sha1".'),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"key")," \u2014 The public key corresponding to the signer's private key."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"signature"),' \u2014 The signature produced by the "sign" procedure.')),(0,r.kt)("p",null,"Returns a boolean that indicates if the signature validated successfully."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { base64"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bigint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto } "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:*"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," priv "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," p "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"115443384115231951475820445136871322101870729500298182134363293112660251666017"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," q "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"98365361248415863235179644468056200977592391948608651522703704315152579004021"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Derive public key")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," pub "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," n "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," priv"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"p "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"*"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," priv"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"q"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," e "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0x10001"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 65537")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Sign")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," msg "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"The canary has left the nest."')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," sig "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," msg "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sign"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"rsa-sha256"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," priv"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(base64"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(sig)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e un1g04+cwG8WxYDpSlj4PO/hsTqSITgYKycRuR+m3AE6ypLyUCrVHC/0j4M3DeW81ADZVda6TVkC/Ht8EdYeFw==")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Verify")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"verify"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(msg"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"rsa-sha256"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," pub"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," sig)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/04c377ef.91852cdf.js b/assets/js/04c377ef.91852cdf.js new file mode 100644 index 00000000..d7b8e0fb --- /dev/null +++ b/assets/js/04c377ef.91852cdf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6668],{3905:(e,a,t)=>{t.d(a,{Zo:()=>c,kt:()=>k});var r=t(7294);function l(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function n(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var a=1;a=0||(l[t]=e[t]);return l}(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}var p=r.createContext({}),i=function(e){var a=r.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):o(o({},a),e)),t},c=function(e){var a=i(e.components);return r.createElement(p.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},F=r.forwardRef((function(e,a){var t=e.components,l=e.mdxType,n=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=i(t),F=l,k=d["".concat(p,".").concat(F)]||d[F]||m[F]||n;return t?r.createElement(k,o(o({ref:a},c),{},{components:t})):r.createElement(k,o({ref:a},c))}));function k(e,a){var t=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var n=t.length,o=new Array(n);o[0]=F;var s={};for(var p in a)hasOwnProperty.call(a,p)&&(s[p]=a[p]);s.originalType=e,s[d]="string"==typeof e?e:l,o[1]=s;for(var i=2;i{t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>o,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>i});var r=t(7462),l=(t(7294),t(3905));const n={sidebar_position:3},o=void 0,s={unversionedId:"Runtime Environment/Crypto",id:"Runtime Environment/Crypto",title:"Crypto",description:"Must be included via require.",source:"@site/docs/Runtime Environment/Crypto.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Crypto",permalink:"/docs/Runtime Environment/Crypto",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"CaT",permalink:"/docs/Runtime Environment/CaT"},next:{title:"Exception",permalink:"/docs/Runtime Environment/Exception"}},p={},i=[{value:"Non-Cryptographic Hashing Algorithms",id:"non-cryptographic-hashing-algorithms",level:2},{value:"crypto.lua",id:"cryptolua",level:3},{value:"Parameters",id:"parameters",level:4},{value:"crypto.md5",id:"cryptomd5",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"crypto.djb2",id:"cryptodjb2",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns",level:4},{value:"crypto.fnv1",id:"cryptofnv1",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"crypto.fnv1a",id:"cryptofnv1a",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"crypto.joaat",id:"cryptojoaat",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-1",level:4},{value:"crypto.sdbm",id:"cryptosdbm",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-2",level:4},{value:"crypto.crc32",id:"cryptocrc32",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-3",level:4},{value:"crypto.adler32",id:"cryptoadler32",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"crypto.lookup3",id:"cryptolookup3",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"crypto.times33",id:"cryptotimes33",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-4",level:4},{value:"crypto.murmur1",id:"cryptomurmur1",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-5",level:4},{value:"crypto.murmur2",id:"cryptomurmur2",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-6",level:4},{value:"crypto.murmur2a",id:"cryptomurmur2a",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-7",level:4},{value:"crypto.murmur64a",id:"cryptomurmur64a",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"crypto.murmur64b",id:"cryptomurmur64b",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"crypto.murmur2neutral",id:"cryptomurmur2neutral",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Cryptographic Hashing Algorithms",id:"cryptographic-hashing-algorithms",level:2},{value:"crypto.sha1",id:"cryptosha1",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"crypto.sha256",id:"cryptosha256",level:3},{value:"Parameters",id:"parameters-18",level:4},{value:"crypto.sha384",id:"cryptosha384",level:3},{value:"Parameters",id:"parameters-19",level:4},{value:"crypto.sha512",id:"cryptosha512",level:3},{value:"Parameters",id:"parameters-20",level:4},{value:"Cryptographic PRNGs",id:"cryptographic-prngs",level:2},{value:"crypto.random",id:"cryptorandom",level:3},{value:"Parameters",id:"parameters-21",level:4},{value:"AES-CBC, AES-CFB",id:"aes-cbc-aes-cfb",level:2},{value:"crypto.encrypt",id:"cryptoencrypt",level:3},{value:"Parameters",id:"parameters-22",level:4},{value:"crypto.decrypt",id:"cryptodecrypt",level:3},{value:"Parameters",id:"parameters-23",level:4},{value:"AES-ECB",id:"aes-ecb",level:2},{value:"crypto.encrypt",id:"cryptoencrypt-1",level:3},{value:"Parameters",id:"parameters-24",level:4},{value:"crypto.decrypt",id:"cryptodecrypt-1",level:3},{value:"Parameters",id:"parameters-25",level:4},{value:"AES-GCM",id:"aes-gcm",level:2},{value:"crypto.encrypt",id:"cryptoencrypt-2",level:3},{value:"Parameters",id:"parameters-26",level:4},{value:"crypto.decrypt",id:"cryptodecrypt-2",level:3},{value:"Parameters",id:"parameters-27",level:4},{value:"RSA",id:"rsa",level:2},{value:"crypto.generatekeypair",id:"cryptogeneratekeypair",level:3},{value:"Parameters",id:"parameters-28",level:4},{value:"crypto.encrypt",id:"cryptoencrypt-3",level:3},{value:"Parameters",id:"parameters-29",level:4},{value:"crypto.decrypt",id:"cryptodecrypt-3",level:3},{value:"Parameters",id:"parameters-30",level:4},{value:"crypto.sign",id:"cryptosign",level:3},{value:"Parameters",id:"parameters-31",level:4},{value:"crypto.verify",id:"cryptoverify",level:3},{value:"Parameters",id:"parameters-32",level:4}],c={toc:i},d="wrapper";function m(e){let{components:a,...t}=e;return(0,l.kt)(d,(0,r.Z)({},c,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Must be included via ",(0,l.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"non-cryptographic-hashing-algorithms"},"Non-Cryptographic Hashing Algorithms"),(0,l.kt)("h3",{id:"cryptolua"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.lua")),(0,l.kt)("p",null,"Hash a string using Lua's version of the DJB2 non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"lua"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2871868277"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptomd5"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.md5")),(0,l.kt)("p",null,"Hash a string using the MD5 semi-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-1"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"md5"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"5eb63bbbe01eeed093cb22bb8f5acdc3"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptodjb2"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.djb2")),(0,l.kt)("p",null,"Hash a string using the DJB2 non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-2"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("h4",{id:"returns"},"Returns"),(0,l.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"djb2"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"894552257"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptofnv1"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.fnv1")),(0,l.kt)("p",null,"Hash a string using the FNV1 non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-3"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"fnv1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"9065573210506989167"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptofnv1a"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.fnv1a")),(0,l.kt)("p",null,"Hash a string using the FNV1A non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-4"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"fnv1a"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"8618312879776256743"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptojoaat"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.joaat")),(0,l.kt)("p",null,"Hash a string using the JOAAT non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-5"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("h4",{id:"returns-1"},"Returns"),(0,l.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"joaat"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1045060183"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptosdbm"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.sdbm")),(0,l.kt)("p",null,"Hash a string using the SDBM non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-6"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("h4",{id:"returns-2"},"Returns"),(0,l.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sdbm"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"430867652"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptocrc32"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.crc32")),(0,l.kt)("p",null,"Hash a string using the CRC32 non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-7"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash."),(0,l.kt)("li",{parentName:"ol"},"The initial value for the hash. By default, this is zero.")),(0,l.kt)("h4",{id:"returns-3"},"Returns"),(0,l.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"crc32"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"222957957"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptoadler32"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.adler32")),(0,l.kt)("p",null,"Hash a string using the Adler-32 non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-8"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash."),(0,l.kt)("li",{parentName:"ol"},"The initial value for the hash. By default, this is zero.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"adler32"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"103547413"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptolookup3"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.lookup3")),(0,l.kt)("p",null,"Hash a string using the Lookup3 non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-9"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"lookup3"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1252609637"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptotimes33"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.times33")),(0,l.kt)("p",null,"Hash a string using the Times33 non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-10"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("h4",{id:"returns-4"},"Returns"),(0,l.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"times33"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3889643616"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("h3",{id:"cryptomurmur1"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.murmur1")),(0,l.kt)("p",null,"Hash a string using the Murmur1 non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-11"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("h4",{id:"returns-5"},"Returns"),(0,l.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"murmur1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3154674178"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptomurmur2"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.murmur2")),(0,l.kt)("p",null,"Hash a string using the Murmur2 non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-12"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("h4",{id:"returns-6"},"Returns"),(0,l.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"murmur2"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1151865881"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("h3",{id:"cryptomurmur2a"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.murmur2a")),(0,l.kt)("p",null,"Hash a string using the Murmur2A non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-13"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("h4",{id:"returns-7"},"Returns"),(0,l.kt)("p",null,"An integer between 0 and 0xffffffff, inclusive."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"murmur2a"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2650573207"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("h3",{id:"cryptomurmur64a"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.murmur64a")),(0,l.kt)("p",null,"Hash a string using the Murmur64A non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-14"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"murmur64a"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"-"),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3190198453633110066"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("h3",{id:"cryptomurmur64b"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.murmur64b")),(0,l.kt)("p",null,"Hash a string using the Murmur64A non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-15"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"murmur64b"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"7088720765356542432"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptomurmur2neutral"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.murmur2neutral")),(0,l.kt)("p",null,"Hash a string using the Murmur2Neutral non-cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-16"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"murmur2neutral"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1151865881"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"cryptographic-hashing-algorithms"},"Cryptographic Hashing Algorithms"),(0,l.kt)("h3",{id:"cryptosha1"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.sha1")),(0,l.kt)("p",null,"Hash a string using the SHA-1 cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-17"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash."),(0,l.kt)("li",{parentName:"ol"},"When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sha1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Pluto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"bce8c9aca4120776fad6b517874aa09c46405454"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sha1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Pluto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\xbc\\xe8\\xc9\\xac\\xa4\\x12\\x07\\x76\\xfa\\xd6\\xb5\\x17\\x87\\x4a\\xa0\\x9c\\x46\\x40\\x54\\x54"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptosha256"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.sha256")),(0,l.kt)("p",null,"Hash a string using the SHA-256 cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-18"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash."),(0,l.kt)("li",{parentName:"ol"},"When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sha256"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Pluto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"8dad5f6a7dd2dcd8c35ec2fd7babb499bcad60d27d73fe73eca2ce025dfd3b47"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sha256"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Pluto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\x8d\\xad\\x5f\\x6a\\x7d\\xd2\\xdc\\xd8\\xc3\\x5e\\xc2\\xfd\\x7b\\xab\\xb4\\x99\\xbc\\xad\\x60\\xd2\\x7d\\x73\\xfe\\x73\\xec\\xa2\\xce\\x02\\x5d\\xfd\\x3b\\x47"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptosha384"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.sha384")),(0,l.kt)("p",null,"Hash a string using the SHA-384 cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-19"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash."),(0,l.kt)("li",{parentName:"ol"},"When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sha384"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Pluto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"false"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"db890233a919b6745d632633c419e14540ff79f1a89bc4ac194b00e7f913f0f06d5d4d7d6cc2b4aaf9485d223afb8cf0"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"cryptosha512"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.sha512")),(0,l.kt)("p",null,"Hash a string using the SHA-512 cryptographic hashing algorithm."),(0,l.kt)("h4",{id:"parameters-20"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The string to hash."),(0,l.kt)("li",{parentName:"ol"},"When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sha512"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Pluto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"false"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"ee8410a8bf9511b94fd6669b5c3e0c4b86e8e4bf7baa8dbd2773d4d6381dd1aecebbe391bef4c6158620ab3f6b794907652d4432c2301d7e1a6caf520565cdf2"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"cryptographic-prngs"},"Cryptographic PRNGs"),(0,l.kt)("h3",{id:"cryptorandom"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.random")),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"crypto.random")," function uses your operating system's default PRNG. "),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"On Linux-based systems, this is ",(0,l.kt)("inlineCode",{parentName:"li"},"/dev/urandom"),"."),(0,l.kt)("li",{parentName:"ul"},"On Windows, this is ",(0,l.kt)("inlineCode",{parentName:"li"},"BCryptGenRandom"),".")),(0,l.kt)("p",null,"This is a cryptographically-secure PRNG when your system can provide those services. However, if it does not, then this is not cryptographically secure. Either way, it provides good randomness."),(0,l.kt)("h4",{id:"parameters-21"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The minimum value to return."),(0,l.kt)("li",{parentName:"ol"},"The maximum value to return, as a range.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"random"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"<"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"11"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"aes-cbc-aes-cfb"},"AES-CBC, AES-CFB"),(0,l.kt)("p",null,"These unauthenticated AES modes take both a key and an IV. The IV must be unique and unpredictable for each encryption session to ensure security."),(0,l.kt)("h3",{id:"cryptoencrypt"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.encrypt")),(0,l.kt)("h4",{id:"parameters-22"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data to be encrypted."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "aes-cbc-pkcs7" or "aes-cfb-pkcs7" for PKCS#7 padding, or "aes-cbc" or "aes-cfb" if you know what you\'re doing.'),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"iv")," \u2014 Must have a length of 16.")),(0,l.kt)("h3",{id:"cryptodecrypt"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.decrypt")),(0,l.kt)("h4",{id:"parameters-23"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The ciphertext to decrypt."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "aes-cbc-pkcs7" or "aes-cfb-pkcs7" for PKCS#7 padding, or "aes-cbc" or "aes-cfb" if you know what you\'re doing.'),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"iv")," \u2014 Must have a length of 16.")),(0,l.kt)("p",null,"Returns the decrypted data on success. Throws an error if the padding was incorrect."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:crypto"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},""),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"A Top Secret Key"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Encrypt")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," iv "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"range"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"16"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"map"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|| "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"char"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"math"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"random"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"255"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")))"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"concat"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'""'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," plain "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," enc "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," plain "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encrypt"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"aes-cbc-pkcs7"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," iv"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(enc))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Decrypt")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decrypt"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(enc"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"aes-cbc-pkcs7"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," iv)) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello, world!"))))),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"aes-ecb"},"AES-ECB"),(0,l.kt)("p",null,"This unauthenticated AES mode takes only a key, and is considered to be the weakest. Identical plaintext blocks result in identical ciphertext blocks."),(0,l.kt)("h3",{id:"cryptoencrypt-1"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.encrypt")),(0,l.kt)("h4",{id:"parameters-24"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data to be encrypted."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "aes-ecb-pkcs7" for PKCS#7 padding, or "aes-ecb" if you know what you\'re doing.'),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.")),(0,l.kt)("h3",{id:"cryptodecrypt-1"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.decrypt")),(0,l.kt)("h4",{id:"parameters-25"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "aes-ecb-pkcs7" for PKCS#7 padding, or "aes-ecb" if you know what you\'re doing.'),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The ciphertext to decrypt."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.")),(0,l.kt)("p",null,"Returns the decrypted data on success. Throws an error if the padding was incorrect."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:crypto"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},""),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"A Top Secret Key"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Encrypt")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," plain "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," enc "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," plain "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encrypt"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"aes-ecb-pkcs7"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(enc)) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e string(16) "`p{\ufffd\ufffd\ufffd\ufffdk\\21*.>jG"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Decrypt")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decrypt"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(enc"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"aes-ecb-pkcs7"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key)) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello, world!"))))),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"aes-gcm"},"AES-GCM"),(0,l.kt)("p",null,"This authenticated AES mode allows for additional data that will be validated although not encrypted, such as a Message Authentication Code (MAC)."),(0,l.kt)("h3",{id:"cryptoencrypt-2"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.encrypt")),(0,l.kt)("h4",{id:"parameters-26"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data to be encrypted."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 Must be "aes-gcm". AES-GCM can deal with unpadded data, hence does not need PKCS#7 padding.'),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"aadata")," \u2014 Authenticated data. Will not be encrypted."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"iv")," \u2014 Must have a length of 16.")),(0,l.kt)("p",null,"Returns two strings: the ciphertext and the authentication tag."),(0,l.kt)("h3",{id:"cryptodecrypt-2"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.decrypt")),(0,l.kt)("h4",{id:"parameters-27"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The ciphertext to decrypt."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 Must be "aes-gcm".'),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"aadata")," \u2014 Authenticated data."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," \u2014 Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"iv")," \u2014 Must have a length of 16."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"tag"),' \u2014 The authentication tag produced by the "encrypt" procedure.')),(0,l.kt)("p",null,"Returns the decrypted data on success. Throws an error if authentication or unpadding failed."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:crypto"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},""),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"A Top Secret Key"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," aadata "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"This is Pluto!"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Encrypt")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," iv "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"range"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"16"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"map"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|| "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"char"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"math"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"random"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"255"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")))"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"concat"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'""'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," plain "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," enc"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," tag "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," plain "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encrypt"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"aes-gcm"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," aadata"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," iv"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(enc))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(tag))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Decrypt")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decrypt"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(enc"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"aes-gcm"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," aadata"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," iv"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," tag)) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello, world!"))))),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"rsa"},"RSA"),(0,l.kt)("h3",{id:"cryptogeneratekeypair"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.generatekeypair")),(0,l.kt)("h4",{id:"parameters-28"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 Must be "rsa".'),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"bits")," \u2014 A positive integer for a strict bit-length requirement, or a negative integer for a lax requirement. Common values are ",(0,l.kt)("inlineCode",{parentName:"li"},"1024"),", ",(0,l.kt)("inlineCode",{parentName:"li"},"2048"),", and ",(0,l.kt)("inlineCode",{parentName:"li"},"4096"),".")),(0,l.kt)("p",null,"Returns two tables: The public key (consisting of ",(0,l.kt)("inlineCode",{parentName:"p"},"n")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"e"),"), and the private key (consisting of ",(0,l.kt)("inlineCode",{parentName:"p"},"p")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"q"),"). The ",(0,l.kt)("a",{parentName:"p",href:"/docs/Runtime%20Environment/Bigint"},"Bigint class")," is used for all values."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," pub"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," priv "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"generatekeypair"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"rsa"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"512"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(pub))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["n"] = 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["e"] = 65537,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(priv))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["p"] = 115443384115231951475820445136871322101870729500298182134363293112660251666017,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["q"] = 98365361248415863235179644468056200977592391948608651522703704315152579004021,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }"))))),(0,l.kt)("h3",{id:"cryptoencrypt-3"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.encrypt")),(0,l.kt)("h4",{id:"parameters-29"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data to be encrypted."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "rsa-pkcs1" for PKCS#1 padding, or "rsa" if you know what you\'re doing.'),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," \u2014 The public or private key to use. Commonly, a public key is used to encrypt data.")),(0,l.kt)("h3",{id:"cryptodecrypt-3"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.decrypt")),(0,l.kt)("h4",{id:"parameters-30"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The ciphertext to decrypt."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "rsa-pkcs1" for PKCS#1 padding, or "rsa" if you know what you\'re doing.'),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," \u2014 The public or private key to use. If the data was encrypted with the public key, the private key is needed to decrypt it.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { base64"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bigint"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto } "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:*"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," priv "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," p "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"115443384115231951475820445136871322101870729500298182134363293112660251666017"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," q "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"98365361248415863235179644468056200977592391948608651522703704315152579004021"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Derive public key")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," pub "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," n "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," priv"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"p "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"*"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," priv"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"q"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," e "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0x10001"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 65537")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Encrypt")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," enc "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encrypt"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"A secret message to the owner of the private key."'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"rsa-pkcs1"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," pub)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(base64"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(enc))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Decrypt")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(enc "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decrypt"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"rsa-pkcs1"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," priv"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e A secret message to the owner of the private key."))))),(0,l.kt)("h3",{id:"cryptosign"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.sign")),(0,l.kt)("h4",{id:"parameters-31"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data to sign."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "rsa-sha256" or "rsa-sha1".'),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," \u2014 The private key to use.")),(0,l.kt)("h3",{id:"cryptoverify"},(0,l.kt)("inlineCode",{parentName:"h3"},"crypto.verify")),(0,l.kt)("h4",{id:"parameters-32"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The data that was signed."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"mode"),' \u2014 "rsa-sha256" or "rsa-sha1".'),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," \u2014 The public key corresponding to the signer's private key."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"signature"),' \u2014 The signature produced by the "sign" procedure.')),(0,l.kt)("p",null,"Returns a boolean that indicates if the signature validated successfully."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { base64"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bigint"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto } "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:*"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," priv "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," p "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"115443384115231951475820445136871322101870729500298182134363293112660251666017"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," q "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"98365361248415863235179644468056200977592391948608651522703704315152579004021"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Derive public key")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," pub "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," n "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," priv"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"p "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"*"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," priv"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"q"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," e "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0x10001"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 65537")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Sign")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," msg "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"The canary has left the nest."')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," sig "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," msg "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sign"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"rsa-sha256"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," priv"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(base64"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(sig)) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e un1g04+cwG8WxYDpSlj4PO/hsTqSITgYKycRuR+m3AE6ypLyUCrVHC/0j4M3DeW81ADZVda6TVkC/Ht8EdYeFw==")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Verify")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(crypto"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"verify"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(msg"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"rsa-sha256"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," pub"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," sig)) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/186e575c.23979853.js b/assets/js/186e575c.23979853.js new file mode 100644 index 00000000..f8a1ce29 --- /dev/null +++ b/assets/js/186e575c.23979853.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6355],{3905:(e,a,t)=>{t.d(a,{Zo:()=>F,kt:()=>k});var l=t(7294);function n(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function r(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);a&&(l=l.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,l)}return t}function o(e){for(var a=1;a=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var p=l.createContext({}),i=function(e){var a=l.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):o(o({},a),e)),t},F=function(e){var a=i(e.components);return l.createElement(p.Provider,{value:a},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return l.createElement(l.Fragment,{},a)}},m=l.forwardRef((function(e,a){var t=e.components,n=e.mdxType,r=e.originalType,p=e.parentName,F=s(e,["components","mdxType","originalType","parentName"]),d=i(t),m=n,k=d["".concat(p,".").concat(m)]||d[m]||c[m]||r;return t?l.createElement(k,o(o({ref:a},F),{},{components:t})):l.createElement(k,o({ref:a},F))}));function k(e,a){var t=arguments,n=a&&a.mdxType;if("string"==typeof e||n){var r=t.length,o=new Array(r);o[0]=m;var s={};for(var p in a)hasOwnProperty.call(a,p)&&(s[p]=a[p]);s.originalType=e,s[d]="string"==typeof e?e:n,o[1]=s;for(var i=2;i{t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>o,default:()=>c,frontMatter:()=>r,metadata:()=>s,toc:()=>i});var l=t(7462),n=(t(7294),t(3905));const r={sidebar_position:2},o=void 0,s={unversionedId:"Runtime Environment/Table",id:"Runtime Environment/Table",title:"Table",description:"This page documents the changes & additions to the table library in Pluto, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/Table.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Table",permalink:"/docs/Runtime Environment/Table",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"String",permalink:"/docs/Runtime Environment/String"},next:{title:"Assert",permalink:"/docs/Runtime Environment/Assert"}},p={},i=[{value:"table.sort",id:"tablesort",level:3},{value:"table.sorted",id:"tablesorted",level:3},{value:"table.size",id:"tablesize",level:3},{value:"Parameters",id:"parameters",level:4},{value:"table.clear",id:"tableclear",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"table.freeze",id:"tablefreeze",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns",level:4},{value:"table.isfrozen",id:"tableisfrozen",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"table.contains",id:"tablecontains",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-1",level:4},{value:"table.find",id:"tablefind",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-2",level:4},{value:"table.reverse",id:"tablereverse",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-3",level:4},{value:"table.reversed",id:"tablereversed",level:3},{value:"table.reorder",id:"tablereorder",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-4",level:4},{value:"table.reordered",id:"tablereordered",level:3},{value:"table.foreach",id:"tableforeach",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"table.filter",id:"tablefilter",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-5",level:4},{value:"table.filtered",id:"tablefiltered",level:3},{value:"table.map",id:"tablemap",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-6",level:4},{value:"table.mapped",id:"tablemapped",level:3},{value:"table.reduce",id:"tablereduce",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-7",level:4},{value:"table.min",id:"tablemin",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"table.max",id:"tablemax",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"table.checkall",id:"tablecheckall",level:3},{value:"Parameters",id:"parameters-14",level:4}],F={toc:i},d="wrapper";function c(e){let{components:a,...t}=e;return(0,n.kt)(d,(0,l.Z)({},F,t,{components:a,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"This page documents the changes & additions to the ",(0,n.kt)("inlineCode",{parentName:"p"},"table")," library in Pluto, which is built on top of Lua 5.4's."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tablesort"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.sort")),(0,n.kt)("p",null,"This function was modified to return the input table instead of ",(0,n.kt)("inlineCode",{parentName:"p"},"nil"),", such that:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sort"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"..."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,n.kt)("p",null,"Will not result in ",(0,n.kt)("inlineCode",{parentName:"p"},"t")," becoming ",(0,n.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,n.kt)("h3",{id:"tablesorted"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.sorted")),(0,n.kt)("p",null,"Copying variant of ",(0,n.kt)("inlineCode",{parentName:"p"},"table.sort"),"; returns a new table instead of modifying the input table. Note that nested tables will not be copied."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tablesize"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.size")),(0,n.kt)("p",null,"Returns the number of elements in the table, counting both the array part and hash part."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table to check.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"foo"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"bar"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"size"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 4"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tableclear"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.clear")),(0,n.kt)("p",null,"Remove all elements from the table."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table to clear.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"foo"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"bar"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"size"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 4")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"clear"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"size"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 0"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tablefreeze"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.freeze")),(0,n.kt)("p",null,"Freezes a table to prevent modification."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table to freeze")),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,"The input table."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"table"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"freeze"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"({"),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"..."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"})")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- `table.freeze(t)` on another line will work fine too.")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"key "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"value"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Fails."))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tableisfrozen"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.isfrozen")),(0,n.kt)("p",null,"Checks if this table is frozen."),(0,n.kt)("h4",{id:"parameters-3"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table to check.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {}")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"table"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"freeze"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"table"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isfrozen"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t) "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tablecontains"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.contains")),(0,n.kt)("p",null,"Checks if this table contains an element."),(0,n.kt)("h4",{id:"parameters-4"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table to check."),(0,n.kt)("li",{parentName:"ol"},"The element to check for.")),(0,n.kt)("h4",{id:"returns-1"},"Returns"),(0,n.kt)("p",null,"The index or key if found, otherwise ",(0,n.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"6"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"value"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"table"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"contains"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"table"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"contains"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"value"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"key"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"table"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"contains"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"nothing"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tablefind"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.find")),(0,n.kt)("p",null,"Looks for an element in a table."),(0,n.kt)("h4",{id:"parameters-5"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table to check."),(0,n.kt)("li",{parentName:"ol"},"The callback function responsible for checking each element.")),(0,n.kt)("h4",{id:"returns-2"},"Returns"),(0,n.kt)("p",null,"The element if found, otherwise ",(0,n.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," items "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { id "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Apple"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { id "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Banana"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(items"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"find"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|"),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"item"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," item"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"id "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Apple"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tablereverse"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.reverse")),(0,n.kt)("p",null,"Reverses the array elements of a table."),(0,n.kt)("h4",{id:"parameters-6"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table to reverse.")),(0,n.kt)("h4",{id:"returns-3"},"Returns"),(0,n.kt)("p",null,"The input table."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," hello "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"world"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"value"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t))")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," same "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"reverse"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(same "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t))")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"Before:")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"{")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [1] = 1,")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [2] = 2,")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [3] = 3,")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [4] = 4,")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [5] = 5,")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' ["key"] = string(5) "value",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' ["hello"] = string(5) "world",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"}")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"After:")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"{")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [1] = 5,")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [2] = 4,")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [3] = 3,")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [4] = 2,")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [5] = 1,")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' ["key"] = string(5) "value",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' ["hello"] = string(5) "world",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"}")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,n.kt)("h3",{id:"tablereversed"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.reversed")),(0,n.kt)("p",null,"Copying variant of ",(0,n.kt)("inlineCode",{parentName:"p"},"table.reverse"),"; returns a new table instead of modifying the input table. Note that nested tables will not be copied."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tablereorder"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.reorder")),(0,n.kt)("p",null,"Reorders the array portion of a table so it becomes a continuous array with no holes."),(0,n.kt)("h4",{id:"parameters-7"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table.")),(0,n.kt)("h4",{id:"returns-4"},"Returns"),(0,n.kt)("p",null,"The input table."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t1 "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"equal"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"reorder"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," })"))))),(0,n.kt)("h3",{id:"tablereordered"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.reordered")),(0,n.kt)("p",null,"Copying variant of ",(0,n.kt)("inlineCode",{parentName:"p"},"table.reorder"),"; returns a new table instead of modifying the input table. Note that nested tables will not be copied."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tableforeach"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.foreach")),(0,n.kt)("p",null,"Note that this function is not the same as the Lua function that was deprecated/removed in 5.1."),(0,n.kt)("h4",{id:"parameters-8"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table."),(0,n.kt)("li",{parentName:"ol"},"The callback to be called for every element."),(0,n.kt)("li",{parentName:"ol"},"An optional bool if the callback function also takes a key (",(0,n.kt)("inlineCode",{parentName:"li"},"|k, v|"),") as opposed to only a value (",(0,n.kt)("inlineCode",{parentName:"li"},"|v|"),").")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"foreach"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(print)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 2")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 3"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tablefilter"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.filter")),(0,n.kt)("p",null,"Filters away keys (both array and non-array) that fail to meet the condition established by ",(0,n.kt)("inlineCode",{parentName:"p"},"callback"),". Elimination is done by setting the value to ",(0,n.kt)("inlineCode",{parentName:"p"},"nil"),", consider using ",(0,n.kt)("inlineCode",{parentName:"p"},"table.reorder")," if you want a continuous array after filtering."),(0,n.kt)("h4",{id:"parameters-9"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table."),(0,n.kt)("li",{parentName:"ol"},"The callback responsible for deciding which keys to keep or remove. This should return ",(0,n.kt)("inlineCode",{parentName:"li"},"false")," or ",(0,n.kt)("inlineCode",{parentName:"li"},"nil")," if you want the key to be eliminated."),(0,n.kt)("li",{parentName:"ol"},"An optional bool if the callback function also takes a key (",(0,n.kt)("inlineCode",{parentName:"li"},"|k, v|"),") as opposed to only a value (",(0,n.kt)("inlineCode",{parentName:"li"},"|v|"),").")),(0,n.kt)("h4",{id:"returns-5"},"Returns"),(0,n.kt)("p",null,"The input table."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"filter"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|"),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"v"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," v "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"%"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"~="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"reorder"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"concat"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "1 3 5"')),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"filter"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|"),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"k"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"v"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," k "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," v"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"reorder"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"concat"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "2 3 4"'))))),(0,n.kt)("h3",{id:"tablefiltered"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.filtered")),(0,n.kt)("p",null,"Copying variant of ",(0,n.kt)("inlineCode",{parentName:"p"},"table.filter"),"; returns a new table instead of modifying the input table. Note that nested tables will not be copied."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tablemap"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.map")),(0,n.kt)("p",null,"Remaps every key to a new value, provided by the ",(0,n.kt)("inlineCode",{parentName:"p"},"callback")," function."),(0,n.kt)("h4",{id:"parameters-10"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table."),(0,n.kt)("li",{parentName:"ol"},"The callback responsible for producing the updated values."),(0,n.kt)("li",{parentName:"ol"},"An optional bool if the callback function also takes a key (",(0,n.kt)("inlineCode",{parentName:"li"},"|k, v|"),") as opposed to only a value (",(0,n.kt)("inlineCode",{parentName:"li"},"|v|"),").")),(0,n.kt)("h4",{id:"returns-6"},"Returns"),(0,n.kt)("p",null,"The input table."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"41 20 68"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"split"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"map"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(tonumber)"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"map"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|"),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"v"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," v "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"concat"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "42 21 69"')),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"10 15 10"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"split"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"map"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(tonumber)"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"map"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|"),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"k"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"v"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," k "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"*"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," v"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"concat"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "10 30 30"'))))),(0,n.kt)("p",null,"In this example, we first use the ",(0,n.kt)("inlineCode",{parentName:"p"},"tonumber")," function to turn the strings into numbers, then add 1 to them. (Although the first step is not needed in Lua/Pluto since the ",(0,n.kt)("inlineCode",{parentName:"p"},"+")," operator would take care of it, it is used here for demonstration purposes.)"),(0,n.kt)("h3",{id:"tablemapped"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.mapped")),(0,n.kt)("p",null,"Copying variant of ",(0,n.kt)("inlineCode",{parentName:"p"},"table.map"),"; returns a new table instead of modifying the input table. Note that nested tables will not be copied."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tablereduce"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.reduce")),(0,n.kt)("p",null,"For every value stored in the table, computes ",(0,n.kt)("inlineCode",{parentName:"p"},"accumulator = f(value, accumulator)"),", returning the accumulator at the end."),(0,n.kt)("h4",{id:"parameters-11"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table."),(0,n.kt)("li",{parentName:"ol"},"The callback responsible for producing the updated accumulator."),(0,n.kt)("li",{parentName:"ol"},"The initial value of accumulator. If absent, the accumulator is initialized with ",(0,n.kt)("inlineCode",{parentName:"li"},"0"),".")),(0,n.kt)("h4",{id:"returns-7"},"Returns"),(0,n.kt)("p",null,"The accumulator."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"reduce"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|"),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"value"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"accumulator"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," accumulator) "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 6"))))),(0,n.kt)("h3",{id:"tablemin"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.min")),(0,n.kt)("p",null,"Returns the smallest value stored in the table."),(0,n.kt)("h4",{id:"parameters-12"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"min"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1"))))),(0,n.kt)("p",null,"This is identical to ",(0,n.kt)("inlineCode",{parentName:"p"},":reduce(math.min, math.maxinteger)"),"."),(0,n.kt)("h3",{id:"tablemax"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.max")),(0,n.kt)("p",null,"Returns the largest value stored in the table."),(0,n.kt)("h4",{id:"parameters-13"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"max"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 3"))))),(0,n.kt)("p",null,"This is identical to ",(0,n.kt)("inlineCode",{parentName:"p"},":reduce(math.max, math.mininteger)"),"."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"tablecheckall"},(0,n.kt)("inlineCode",{parentName:"h3"},"table.checkall")),(0,n.kt)("p",null,"Runs the given function against all elements, returning true if all of them match."),(0,n.kt)("h4",{id:"parameters-14"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The table."),(0,n.kt)("li",{parentName:"ol"},"The callback responsible for checking each element.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"({ "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"6"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"checkall"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|"),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"x"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," x "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"%"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"?"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"All are even"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Some are odd"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e All are even")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"({ "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"checkall"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|"),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"x"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," x "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"%"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"?"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"All are even"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Some are odd"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Some are odd"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/186e575c.869330e6.js b/assets/js/186e575c.869330e6.js deleted file mode 100644 index fa57cd61..00000000 --- a/assets/js/186e575c.869330e6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6355],{3905:(e,o,a)=>{a.d(o,{Zo:()=>i,kt:()=>k});var t=a(7294);function l(e,o,a){return o in e?Object.defineProperty(e,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[o]=a,e}function r(e,o){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);o&&(t=t.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),a.push.apply(a,t)}return a}function n(e){for(var o=1;o=0||(l[a]=e[a]);return l}(e,o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var c=t.createContext({}),p=function(e){var o=t.useContext(c),a=o;return e&&(a="function"==typeof e?e(o):n(n({},o),e)),a},i=function(e){var o=p(e.components);return t.createElement(c.Provider,{value:o},e.children)},F="mdxType",d={inlineCode:"code",wrapper:function(e){var o=e.children;return t.createElement(t.Fragment,{},o)}},m=t.forwardRef((function(e,o){var a=e.components,l=e.mdxType,r=e.originalType,c=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),F=p(a),m=l,k=F["".concat(c,".").concat(m)]||F[m]||d[m]||r;return a?t.createElement(k,n(n({ref:o},i),{},{components:a})):t.createElement(k,n({ref:o},i))}));function k(e,o){var a=arguments,l=o&&o.mdxType;if("string"==typeof e||l){var r=a.length,n=new Array(r);n[0]=m;var s={};for(var c in o)hasOwnProperty.call(o,c)&&(s[c]=o[c]);s.originalType=e,s[F]="string"==typeof e?e:l,n[1]=s;for(var p=2;p{a.r(o),a.d(o,{assets:()=>c,contentTitle:()=>n,default:()=>d,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var t=a(7462),l=(a(7294),a(3905));const r={sidebar_position:2},n=void 0,s={unversionedId:"Runtime Environment/Table",id:"Runtime Environment/Table",title:"Table",description:"This page documents the changes & additions to the table library in Pluto, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/Table.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Table",permalink:"/docs/Runtime Environment/Table",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"String",permalink:"/docs/Runtime Environment/String"},next:{title:"Assert",permalink:"/docs/Runtime Environment/Assert"}},c={},p=[{value:"table.sort",id:"tablesort",level:3},{value:"table.sorted",id:"tablesorted",level:3},{value:"table.size",id:"tablesize",level:3},{value:"Parameters",id:"parameters",level:4},{value:"table.clear",id:"tableclear",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"table.freeze",id:"tablefreeze",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns",level:4},{value:"table.isfrozen",id:"tableisfrozen",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"table.contains",id:"tablecontains",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-1",level:4},{value:"table.find",id:"tablefind",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-2",level:4},{value:"table.reverse",id:"tablereverse",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-3",level:4},{value:"table.reversed",id:"tablereversed",level:3},{value:"table.reorder",id:"tablereorder",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-4",level:4},{value:"table.reordered",id:"tablereordered",level:3},{value:"table.foreach",id:"tableforeach",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"table.filter",id:"tablefilter",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-5",level:4},{value:"table.filtered",id:"tablefiltered",level:3},{value:"table.map",id:"tablemap",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-6",level:4},{value:"table.mapped",id:"tablemapped",level:3},{value:"table.reduce",id:"tablereduce",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-7",level:4},{value:"table.min",id:"tablemin",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"table.max",id:"tablemax",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"table.checkall",id:"tablecheckall",level:3},{value:"Parameters",id:"parameters-14",level:4}],i={toc:p},F="wrapper";function d(e){let{components:o,...a}=e;return(0,l.kt)(F,(0,t.Z)({},i,a,{components:o,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"This page documents the changes & additions to the ",(0,l.kt)("inlineCode",{parentName:"p"},"table")," library in Pluto, which is built on top of Lua 5.4's."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tablesort"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.sort")),(0,l.kt)("p",null,"This function was modified to return the input table instead of ",(0,l.kt)("inlineCode",{parentName:"p"},"nil"),", such that:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sort"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"..."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,l.kt)("p",null,"Will not result in ",(0,l.kt)("inlineCode",{parentName:"p"},"t")," becoming ",(0,l.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,l.kt)("h3",{id:"tablesorted"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.sorted")),(0,l.kt)("p",null,"Copying variant of ",(0,l.kt)("inlineCode",{parentName:"p"},"table.sort"),"; returns a new table instead of modifying the input table. Note that nested tables will not be copied."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tablesize"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.size")),(0,l.kt)("p",null,"Returns the number of elements in the table, counting both the array part and hash part."),(0,l.kt)("h4",{id:"parameters"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table to check.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"foo"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"bar"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"size"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 4"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tableclear"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.clear")),(0,l.kt)("p",null,"Remove all elements from the table."),(0,l.kt)("h4",{id:"parameters-1"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table to clear.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"foo"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"bar"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"size"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 4")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"clear"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"size"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 0"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tablefreeze"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.freeze")),(0,l.kt)("p",null,"Freezes a table to prevent modification."),(0,l.kt)("h4",{id:"parameters-2"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table to freeze")),(0,l.kt)("h4",{id:"returns"},"Returns"),(0,l.kt)("p",null,"The input table."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"freeze"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"({"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"..."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"})")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- `table.freeze(t)` on another line will work fine too.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"key "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"value"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Fails."))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tableisfrozen"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.isfrozen")),(0,l.kt)("p",null,"Checks if this table is frozen."),(0,l.kt)("h4",{id:"parameters-3"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table to check.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"freeze"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isfrozen"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tablecontains"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.contains")),(0,l.kt)("p",null,"Checks if this table contains an element."),(0,l.kt)("h4",{id:"parameters-4"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table to check."),(0,l.kt)("li",{parentName:"ol"},"The element to check for.")),(0,l.kt)("h4",{id:"returns-1"},"Returns"),(0,l.kt)("p",null,"The index or key if found, otherwise ",(0,l.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"6"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"value"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"contains"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"contains"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"value"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"key"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"contains"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"nothing"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tablefind"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.find")),(0,l.kt)("p",null,"Looks for an element in a table."),(0,l.kt)("h4",{id:"parameters-5"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table to check."),(0,l.kt)("li",{parentName:"ol"},"The callback function responsible for checking each element.")),(0,l.kt)("h4",{id:"returns-2"},"Returns"),(0,l.kt)("p",null,"The element if found, otherwise ",(0,l.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," items "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { id "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Apple"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { id "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Banana"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(items"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"find"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"item"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," item"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"id "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Apple"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tablereverse"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.reverse")),(0,l.kt)("p",null,"Reverses the array elements of a table."),(0,l.kt)("h4",{id:"parameters-6"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table to reverse.")),(0,l.kt)("h4",{id:"returns-3"},"Returns"),(0,l.kt)("p",null,"The input table."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," hello "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"world"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"value"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," same "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"reverse"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(same "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t))")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"Before:")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"{")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [1] = 1,")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [2] = 2,")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [3] = 3,")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [4] = 4,")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [5] = 5,")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' ["key"] = string(5) "value",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' ["hello"] = string(5) "world",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"After:")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"{")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [1] = 5,")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [2] = 4,")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [3] = 3,")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [4] = 2,")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [5] = 1,")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' ["key"] = string(5) "value",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' ["hello"] = string(5) "world",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,l.kt)("h3",{id:"tablereversed"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.reversed")),(0,l.kt)("p",null,"Copying variant of ",(0,l.kt)("inlineCode",{parentName:"p"},"table.reverse"),"; returns a new table instead of modifying the input table. Note that nested tables will not be copied."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tablereorder"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.reorder")),(0,l.kt)("p",null,"Reorders the array portion of a table so it becomes a continuous array with no holes."),(0,l.kt)("h4",{id:"parameters-7"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table.")),(0,l.kt)("h4",{id:"returns-4"},"Returns"),(0,l.kt)("p",null,"The input table."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t1 "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"equal"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"reorder"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," })"))))),(0,l.kt)("h3",{id:"tablereordered"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.reordered")),(0,l.kt)("p",null,"Copying variant of ",(0,l.kt)("inlineCode",{parentName:"p"},"table.reorder"),"; returns a new table instead of modifying the input table. Note that nested tables will not be copied."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tableforeach"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.foreach")),(0,l.kt)("p",null,"Note that this function is not the same as the Lua function that was deprecated/removed in 5.1."),(0,l.kt)("h4",{id:"parameters-8"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table."),(0,l.kt)("li",{parentName:"ol"},"The callback to be called for every element."),(0,l.kt)("li",{parentName:"ol"},"An optional bool if the callback function also takes a key (",(0,l.kt)("inlineCode",{parentName:"li"},"|k, v|"),") as opposed to only a value (",(0,l.kt)("inlineCode",{parentName:"li"},"|v|"),").")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"foreach"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(print)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 2")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 3"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tablefilter"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.filter")),(0,l.kt)("p",null,"Filters away keys (both array and non-array) that fail to meet the condition established by ",(0,l.kt)("inlineCode",{parentName:"p"},"callback"),". Elimination is done by setting the value to ",(0,l.kt)("inlineCode",{parentName:"p"},"nil"),", consider using ",(0,l.kt)("inlineCode",{parentName:"p"},"table.reorder")," if you want a continuous array after filtering."),(0,l.kt)("h4",{id:"parameters-9"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table."),(0,l.kt)("li",{parentName:"ol"},"The callback responsible for deciding which keys to keep or remove. This should return ",(0,l.kt)("inlineCode",{parentName:"li"},"false")," or ",(0,l.kt)("inlineCode",{parentName:"li"},"nil")," if you want the key to be eliminated."),(0,l.kt)("li",{parentName:"ol"},"An optional bool if the callback function also takes a key (",(0,l.kt)("inlineCode",{parentName:"li"},"|k, v|"),") as opposed to only a value (",(0,l.kt)("inlineCode",{parentName:"li"},"|v|"),").")),(0,l.kt)("h4",{id:"returns-5"},"Returns"),(0,l.kt)("p",null,"The input table."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"filter"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"v"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," v "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"%"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"~="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"reorder"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"concat"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "1 3 5"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"filter"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"k"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"v"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," k "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," v"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"reorder"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"concat"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "2 3 4"'))))),(0,l.kt)("h3",{id:"tablefiltered"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.filtered")),(0,l.kt)("p",null,"Copying variant of ",(0,l.kt)("inlineCode",{parentName:"p"},"table.filter"),"; returns a new table instead of modifying the input table. Note that nested tables will not be copied."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tablemap"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.map")),(0,l.kt)("p",null,"Remaps every key to a new value, provided by the ",(0,l.kt)("inlineCode",{parentName:"p"},"callback")," function."),(0,l.kt)("h4",{id:"parameters-10"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table."),(0,l.kt)("li",{parentName:"ol"},"The callback responsible for producing the updated values."),(0,l.kt)("li",{parentName:"ol"},"An optional bool if the callback function also takes a key (",(0,l.kt)("inlineCode",{parentName:"li"},"|k, v|"),") as opposed to only a value (",(0,l.kt)("inlineCode",{parentName:"li"},"|v|"),").")),(0,l.kt)("h4",{id:"returns-6"},"Returns"),(0,l.kt)("p",null,"The input table."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"41 20 68"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"split"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"map"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(tonumber)"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"map"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"v"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," v "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"concat"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "42 21 69"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"10 15 10"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"split"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"map"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(tonumber)"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"map"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"k"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"v"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," k "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"*"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," v"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"concat"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "10 30 30"'))))),(0,l.kt)("p",null,"In this example, we first use the ",(0,l.kt)("inlineCode",{parentName:"p"},"tonumber")," function to turn the strings into numbers, then add 1 to them. (Although the first step is not needed in Lua/Pluto since the ",(0,l.kt)("inlineCode",{parentName:"p"},"+")," operator would take care of it, it is used here for demonstration purposes.)"),(0,l.kt)("h3",{id:"tablemapped"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.mapped")),(0,l.kt)("p",null,"Copying variant of ",(0,l.kt)("inlineCode",{parentName:"p"},"table.map"),"; returns a new table instead of modifying the input table. Note that nested tables will not be copied."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tablereduce"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.reduce")),(0,l.kt)("p",null,"For every value stored in the table, computes ",(0,l.kt)("inlineCode",{parentName:"p"},"accumulator = f(value, accumulator)"),", returning the accumulator at the end."),(0,l.kt)("h4",{id:"parameters-11"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table."),(0,l.kt)("li",{parentName:"ol"},"The callback responsible for producing the updated accumulator."),(0,l.kt)("li",{parentName:"ol"},"The initial value of accumulator. If absent, the accumulator is initialized with ",(0,l.kt)("inlineCode",{parentName:"li"},"0"),".")),(0,l.kt)("h4",{id:"returns-7"},"Returns"),(0,l.kt)("p",null,"The accumulator."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"reduce"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"value"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"accumulator"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," accumulator) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 6"))))),(0,l.kt)("h3",{id:"tablemin"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.min")),(0,l.kt)("p",null,"Returns the smallest value stored in the table."),(0,l.kt)("h4",{id:"parameters-12"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"min"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1"))))),(0,l.kt)("p",null,"This is identical to ",(0,l.kt)("inlineCode",{parentName:"p"},":reduce(math.min, math.maxinteger)"),"."),(0,l.kt)("h3",{id:"tablemax"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.max")),(0,l.kt)("p",null,"Returns the largest value stored in the table."),(0,l.kt)("h4",{id:"parameters-13"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"max"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 3"))))),(0,l.kt)("p",null,"This is identical to ",(0,l.kt)("inlineCode",{parentName:"p"},":reduce(math.max, math.mininteger)"),"."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"tablecheckall"},(0,l.kt)("inlineCode",{parentName:"h3"},"table.checkall")),(0,l.kt)("p",null,"Runs the given function against all elements, returning true if all of them match."),(0,l.kt)("h4",{id:"parameters-14"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The table."),(0,l.kt)("li",{parentName:"ol"},"The callback responsible for checking each element.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"({ "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"6"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"checkall"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"x"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," x "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"%"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"?"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"All are even"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Some are odd"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e All are even")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"({ "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"checkall"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"x"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," x "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"%"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"?"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"All are even"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Some are odd"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Some are odd"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1e33aabf.5cbed597.js b/assets/js/1e33aabf.5cbed597.js new file mode 100644 index 00000000..e7c9962a --- /dev/null +++ b/assets/js/1e33aabf.5cbed597.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[4452],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>y});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),p=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=p(r),u=n,y=m["".concat(s,".").concat(u)]||m[u]||d[u]||o;return r?a.createElement(y,l(l({ref:t},c),{},{components:r})):a.createElement(y,l({ref:t},c))}));function y(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=u;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[m]="string"==typeof e?e:n,l[1]=i;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var a=r(7462),n=(r(7294),r(3905));const o={},l=void 0,i={unversionedId:"QoL Improvements/Syntax Errors",id:"QoL Improvements/Syntax Errors",title:"Syntax Errors",description:"The messages for syntax errors are enhanced. They include tailored messages and code snippets, which should help newer programmers identify problems quicker. It's not a game changer, but it's neat.",source:"@site/docs/QoL Improvements/Syntax Errors.md",sourceDirName:"QoL Improvements",slug:"/QoL Improvements/Syntax Errors",permalink:"/docs/QoL Improvements/Syntax Errors",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Reserved Identifiers",permalink:"/docs/QoL Improvements/Reserved Identifiers"},next:{title:"Runtime Environment",permalink:"/docs/category/runtime-environment"}},s={},p=[{value:"Example 1",id:"example-1",level:3},{value:"Example 2",id:"example-2",level:3},{value:"ANSI Coloring",id:"ansi-coloring",level:2}],c={toc:p},m="wrapper";function d(e){let{components:t,...r}=e;return(0,n.kt)(m,(0,a.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"The messages for syntax errors are enhanced. They include tailored messages and code snippets, which should help newer programmers identify problems quicker. It's not a game changer, but it's neat."),(0,n.kt)("h3",{id:"example-1"},"Example 1"),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Problematic Code"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Problematic Code"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"<"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"and"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Gottem"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("undefined",null,(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Emitted Syntax Error"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Emitted Syntax Error"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},"syntax error: file.pluto:1: expected 'then' to delimit condition.\n 1 | if a < b and t == 5 return \"Gottem\" end\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: expected 'then' symbol.")))),(0,n.kt)("h3",{id:"example-2"},"Example 2"),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Problematic Code"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Problematic Code"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," fn "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"a"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," c"),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=>"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," (a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"and"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"<"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," c)"))))),(0,n.kt)("undefined",null,(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Emitted Syntax Error"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Emitted Syntax Error"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},"syntax error: file.pluto:1: impromper lambda definition\n 1 | local fn = |a, b, c| => (a == b and a < c)\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: expected '->' arrow syntax for lambda expression.")))),(0,n.kt)("h2",{id:"ansi-coloring"},"ANSI Coloring"),(0,n.kt)("p",null,"These errors support coloring, but it's disabled by default. Define the ",(0,n.kt)("inlineCode",{parentName:"p"},"PLUTO_USE_COLORED_OUTPUT")," macro in ",(0,n.kt)("inlineCode",{parentName:"p"},"luaconf.h")," or your build config to enable colored error messages."),(0,n.kt)("admonition",{type:"tip"},(0,n.kt)("p",{parentName:"admonition"},"For Windows users, you can enable ANSI coloring support with the following command:"),(0,n.kt)("ul",{parentName:"admonition"},(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"REG ADD HKCU\\CONSOLE /f /v VirtualTerminalLevel /t REG_DWORD /d 1")))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1e33aabf.69259352.js b/assets/js/1e33aabf.69259352.js deleted file mode 100644 index e2d19191..00000000 --- a/assets/js/1e33aabf.69259352.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[4452],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>y});var o=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=o.createContext({}),c=function(e){var t=o.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=c(e.components);return o.createElement(s.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},u=o.forwardRef((function(e,t){var r=e.components,a=e.mdxType,n=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=c(r),u=a,y=m["".concat(s,".").concat(u)]||m[u]||d[u]||n;return r?o.createElement(y,l(l({ref:t},p),{},{components:r})):o.createElement(y,l({ref:t},p))}));function y(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var n=r.length,l=new Array(n);l[0]=u;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[m]="string"==typeof e?e:a,l[1]=i;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>n,metadata:()=>i,toc:()=>c});var o=r(7462),a=(r(7294),r(3905));const n={},l=void 0,i={unversionedId:"QoL Improvements/Syntax Errors",id:"QoL Improvements/Syntax Errors",title:"Syntax Errors",description:"The messages for syntax errors are enhanced. They include tailored messages and code snippets, which should help newer programmers identify problems quicker. It's not a game changer, but it's neat.",source:"@site/docs/QoL Improvements/Syntax Errors.md",sourceDirName:"QoL Improvements",slug:"/QoL Improvements/Syntax Errors",permalink:"/docs/QoL Improvements/Syntax Errors",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Reserved Identifiers",permalink:"/docs/QoL Improvements/Reserved Identifiers"},next:{title:"Runtime Environment",permalink:"/docs/category/runtime-environment"}},s={},c=[{value:"Example 1",id:"example-1",level:3},{value:"Example 2",id:"example-2",level:3},{value:"ANSI Coloring",id:"ansi-coloring",level:2}],p={toc:c},m="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(m,(0,o.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The messages for syntax errors are enhanced. They include tailored messages and code snippets, which should help newer programmers identify problems quicker. It's not a game changer, but it's neat."),(0,a.kt)("h3",{id:"example-1"},"Example 1"),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Problematic Code"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Problematic Code"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"<"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"and"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Gottem"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,a.kt)("undefined",null,(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Emitted Syntax Error"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Emitted Syntax Error"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},"syntax error: file.pluto:1: expected 'then' to delimit condition.\n 1 | if a < b and t == 5 return \"Gottem\" end\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: expected 'then' symbol.")))),(0,a.kt)("h3",{id:"example-2"},"Example 2"),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Problematic Code"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Problematic Code"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," fn "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"a"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," c"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=>"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," (a "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"and"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"<"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," c)"))))),(0,a.kt)("undefined",null,(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Emitted Syntax Error"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Emitted Syntax Error"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},"syntax error: file.pluto:1: impromper lambda definition\n 1 | local fn = |a, b, c| => (a == b and a < c)\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: expected '->' arrow syntax for lambda expression.")))),(0,a.kt)("h2",{id:"ansi-coloring"},"ANSI Coloring"),(0,a.kt)("p",null,"These errors support coloring, but it's disabled by default. Define the ",(0,a.kt)("inlineCode",{parentName:"p"},"PLUTO_USE_COLORED_OUTPUT")," macro in ",(0,a.kt)("inlineCode",{parentName:"p"},"luaconf.h")," or your build config to enable colored error messages."),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"For Windows users, you can enable ANSI coloring support with the following command:"),(0,a.kt)("ul",{parentName:"admonition"},(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"REG ADD HKCU\\CONSOLE /f /v VirtualTerminalLevel /t REG_DWORD /d 1")))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1efc24b5.29850f78.js b/assets/js/1efc24b5.29850f78.js new file mode 100644 index 00000000..019f723a --- /dev/null +++ b/assets/js/1efc24b5.29850f78.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[7150],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>N});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),p=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(i.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=p(a),u=n,N=m["".concat(i,".").concat(u)]||m[u]||d[u]||o;return a?r.createElement(N,l(l({ref:t},c),{},{components:a})):r.createElement(N,l({ref:t},c))}));function N(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=u;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[m]="string"==typeof e?e:n,l[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:1},l=void 0,s={unversionedId:"New Features/Numeral Parsing",id:"New Features/Numeral Parsing",title:"Numeral Parsing",description:"Pluto makes two small changes to numeral parsing.",source:"@site/docs/New Features/Numeral Parsing.md",sourceDirName:"New Features",slug:"/New Features/Numeral Parsing",permalink:"/docs/New Features/Numeral Parsing",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Named Varargs",permalink:"/docs/New Features/Named Varargs"},next:{title:"String Indexing",permalink:"/docs/New Features/String Indexing"}},i={},p=[{value:"Cosmetic Underscores",id:"cosmetic-underscores",level:2},{value:"Binary Integers",id:"binary-integers",level:2}],c={toc:p},m="wrapper";function d(e){let{components:t,...a}=e;return(0,n.kt)(m,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Pluto makes two small changes to numeral parsing."),(0,n.kt)("h2",{id:"cosmetic-underscores"},"Cosmetic Underscores"),(0,n.kt)("p",null,"You can add underscores to your numeric literals to make them more readable."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," n "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10_000_000")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(n "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10000000"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,n.kt)("p",null,"These underscores are ignored by the compiler, so they are purely cosmetic."),(0,n.kt)("h2",{id:"binary-integers"},"Binary Integers"),(0,n.kt)("p",null,"Similar to how Lua allows you to input numbers in hexadecimal:"),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," n "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0x420")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(n "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1056"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,n.kt)("p",null,"Pluto allows you to input numbers in binary as well:"),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," n "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0b1000101")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(n "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"69"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1efc24b5.3b8993fa.js b/assets/js/1efc24b5.3b8993fa.js deleted file mode 100644 index 61d698fd..00000000 --- a/assets/js/1efc24b5.3b8993fa.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[7150],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>N});var a=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=a.createContext({}),i=function(e){var t=a.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=i(e.components);return a.createElement(c.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var r=e.components,o=e.mdxType,n=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),m=i(r),u=o,N=m["".concat(c,".").concat(u)]||m[u]||d[u]||n;return r?a.createElement(N,l(l({ref:t},p),{},{components:r})):a.createElement(N,l({ref:t},p))}));function N(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=r.length,l=new Array(n);l[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[m]="string"==typeof e?e:o,l[1]=s;for(var i=2;i{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>d,frontMatter:()=>n,metadata:()=>s,toc:()=>i});var a=r(7462),o=(r(7294),r(3905));const n={sidebar_position:1},l=void 0,s={unversionedId:"New Features/Numeral Parsing",id:"New Features/Numeral Parsing",title:"Numeral Parsing",description:"Pluto makes two small changes to numeral parsing.",source:"@site/docs/New Features/Numeral Parsing.md",sourceDirName:"New Features",slug:"/New Features/Numeral Parsing",permalink:"/docs/New Features/Numeral Parsing",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Named Varargs",permalink:"/docs/New Features/Named Varargs"},next:{title:"String Indexing",permalink:"/docs/New Features/String Indexing"}},c={},i=[{value:"Cosmetic Underscores",id:"cosmetic-underscores",level:2},{value:"Binary Integers",id:"binary-integers",level:2}],p={toc:i},m="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(m,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Pluto makes two small changes to numeral parsing."),(0,o.kt)("h2",{id:"cosmetic-underscores"},"Cosmetic Underscores"),(0,o.kt)("p",null,"You can add underscores to your numeric literals to make them more readable."),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," n "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10_000_000")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(n "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10000000"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,o.kt)("p",null,"These underscores are ignored by the compiler, so they are purely cosmetic."),(0,o.kt)("h2",{id:"binary-integers"},"Binary Integers"),(0,o.kt)("p",null,"Similar to how Lua allows you to input numbers in hexadecimal:"),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," n "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0x420")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(n "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1056"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,o.kt)("p",null,"Pluto allows you to input numbers in binary as well:"),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," n "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0b1000101")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(n "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"69"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1f9adaf9.021386b0.js b/assets/js/1f9adaf9.021386b0.js deleted file mode 100644 index 2afae52c..00000000 --- a/assets/js/1f9adaf9.021386b0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8870],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>k});var a=o(7294);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function l(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),o=t;return e&&(o="function"==typeof e?e(t):l(l({},t),e)),o},p=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},F=a.forwardRef((function(e,t){var o=e.components,r=e.mdxType,n=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=c(o),F=r,k=m["".concat(s,".").concat(F)]||m[F]||d[F]||n;return o?a.createElement(k,l(l({ref:t},p),{},{components:o})):a.createElement(k,l({ref:t},p))}));function k(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var n=o.length,l=new Array(n);l[0]=F;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[m]="string"==typeof e?e:r,l[1]=i;for(var c=2;c{o.r(t),o.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>n,metadata:()=>i,toc:()=>c});var a=o(7462),r=(o(7294),o(3905));const n={sidebar_position:1},l=void 0,i={unversionedId:"New Features/Continue Statement",id:"New Features/Continue Statement",title:"Continue Statement",description:"Continue statements, like break, are meant to be used in loops. They skip the current iteration of the loop.",source:"@site/docs/New Features/Continue Statement.md",sourceDirName:"New Features",slug:"/New Features/Continue Statement",permalink:"/docs/New Features/Continue Statement",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Compiler Warnings",permalink:"/docs/New Features/Compiler Warnings"},next:{title:"Default Arguments",permalink:"/docs/New Features/Default Arguments"}},s={},c=[{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Continue's Only Argument",id:"continues-only-argument",level:2},{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],p={toc:c},m="wrapper";function d(e){let{components:t,...o}=e;return(0,r.kt)(m,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Continue statements, like ",(0,r.kt)("inlineCode",{parentName:"p"},"break"),", are meant to be used in loops. They skip the current iteration of the loop."),(0,r.kt)("p",null,"They introduce a new keyword, ",(0,r.kt)("inlineCode",{parentName:"p"},"continue"),". These cannot be used inside switch statements."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Print every number besides five.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"continue")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(i)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- continue jumps here.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("h4",{id:"try-it-yourself"},(0,r.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=--%20Print%20every%20number%20besides%20five.%0D%0Afor%20i%20%3D%201%2C%2010%20do%0D%0A%20%20%20%20if%20i%20%3D%3D%205%20then%0D%0A%20%20%20%20%20%20%20%20continue%0D%0A%20%20%20%20end%0D%0A%20%20%20%20print(i)%0D%0A%20%20%20%20--%20continue%20jumps%20here.%0D%0Aend"},"Try It Yourself")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Note, ",(0,r.kt)("inlineCode",{parentName:"p"},"continue")," will skip code. If any code within your loop will determine if the loop continues, make sure ",(0,r.kt)("inlineCode",{parentName:"p"},"continue")," doesn't jump over it.")),(0,r.kt)("h2",{id:"continues-only-argument"},"Continue's Only Argument"),(0,r.kt)("p",null,"This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should skip to the end of. The default value is 1, thus skipping to the end of the current loop."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example 1"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Example 1"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Loop 1.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"continue"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- This is identical to `continue` without any arguments.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example 2"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Example 2"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Loop 1.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ii "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Loop 2.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"continue"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- This will continue from Loop 2.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"continue"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- This will continue from Loop 1.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,r.kt)("p",null,"You may need to use ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_continue")," instead of ",(0,r.kt)("inlineCode",{parentName:"p"},"continue"),". Alternatively, ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_use continue")," will enable the keyword independently of environment settings."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1f9adaf9.be26421f.js b/assets/js/1f9adaf9.be26421f.js new file mode 100644 index 00000000..29a34e7f --- /dev/null +++ b/assets/js/1f9adaf9.be26421f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8870],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>k});var n=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var s=n.createContext({}),p=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},F=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=p(a),F=o,k=m["".concat(s,".").concat(F)]||m[F]||d[F]||r;return a?n.createElement(k,l(l({ref:t},c),{},{components:a})):n.createElement(k,l({ref:t},c))}));function k(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,l=new Array(r);l[0]=F;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[m]="string"==typeof e?e:o,l[1]=i;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>p});var n=a(7462),o=(a(7294),a(3905));const r={sidebar_position:1},l=void 0,i={unversionedId:"New Features/Continue Statement",id:"New Features/Continue Statement",title:"Continue Statement",description:"Continue statements, like break, are meant to be used in loops. They skip the current iteration of the loop.",source:"@site/docs/New Features/Continue Statement.md",sourceDirName:"New Features",slug:"/New Features/Continue Statement",permalink:"/docs/New Features/Continue Statement",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Compiler Warnings",permalink:"/docs/New Features/Compiler Warnings"},next:{title:"Default Arguments",permalink:"/docs/New Features/Default Arguments"}},s={},p=[{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Continue's Only Argument",id:"continues-only-argument",level:2},{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],c={toc:p},m="wrapper";function d(e){let{components:t,...a}=e;return(0,o.kt)(m,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Continue statements, like ",(0,o.kt)("inlineCode",{parentName:"p"},"break"),", are meant to be used in loops. They skip the current iteration of the loop."),(0,o.kt)("p",null,"They introduce a new keyword, ",(0,o.kt)("inlineCode",{parentName:"p"},"continue"),". These cannot be used inside switch statements."),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Print every number besides five.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"continue")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(i)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- continue jumps here.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,o.kt)("h4",{id:"try-it-yourself"},(0,o.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=--%20Print%20every%20number%20besides%20five.%0D%0Afor%20i%20%3D%201%2C%2010%20do%0D%0A%20%20%20%20if%20i%20%3D%3D%205%20then%0D%0A%20%20%20%20%20%20%20%20continue%0D%0A%20%20%20%20end%0D%0A%20%20%20%20print(i)%0D%0A%20%20%20%20--%20continue%20jumps%20here.%0D%0Aend"},"Try It Yourself")),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Note, ",(0,o.kt)("inlineCode",{parentName:"p"},"continue")," will skip code. If any code within your loop will determine if the loop continues, make sure ",(0,o.kt)("inlineCode",{parentName:"p"},"continue")," doesn't jump over it.")),(0,o.kt)("h2",{id:"continues-only-argument"},"Continue's Only Argument"),(0,o.kt)("p",null,"This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should skip to the end of. The default value is 1, thus skipping to the end of the current loop."),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example 1"},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"Example 1"),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Loop 1.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"continue"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- This is identical to `continue` without any arguments.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example 2"},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"Example 2"),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Loop 1.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ii "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Loop 2.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"continue"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- This will continue from Loop 2.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"continue"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- This will continue from Loop 1.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,o.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,o.kt)("p",null,"You may need to use ",(0,o.kt)("inlineCode",{parentName:"p"},"pluto_continue")," instead of ",(0,o.kt)("inlineCode",{parentName:"p"},"continue"),". Alternatively, ",(0,o.kt)("inlineCode",{parentName:"p"},"pluto_use continue")," will enable the keyword independently of environment settings."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/20639b4d.221ec835.js b/assets/js/20639b4d.221ec835.js deleted file mode 100644 index f89dc101..00000000 --- a/assets/js/20639b4d.221ec835.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8400],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>N});var a=o(7294);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function l(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function n(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var s=a.createContext({}),i=function(e){var t=a.useContext(s),o=t;return e&&(o="function"==typeof e?e(t):n(n({},t),e)),o},p=function(e){var t=i(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},F=a.forwardRef((function(e,t){var o=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=i(o),F=r,N=d["".concat(s,".").concat(F)]||d[F]||m[F]||l;return o?a.createElement(N,n(n({ref:t},p),{},{components:o})):a.createElement(N,n({ref:t},p))}));function N(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=o.length,n=new Array(l);n[0]=F;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[d]="string"==typeof e?e:r,n[1]=c;for(var i=2;i{o.r(t),o.d(t,{assets:()=>s,contentTitle:()=>n,default:()=>m,frontMatter:()=>l,metadata:()=>c,toc:()=>i});var a=o(7462),r=(o(7294),o(3905));const l={sidebar_position:2},n=void 0,c={unversionedId:"New Features/Export Modifier",id:"New Features/Export Modifier",title:"Export Modifier",description:"The export modifier allows you to automatically aggregate things you want to export into a table.",source:"@site/docs/New Features/Export Modifier.md",sourceDirName:"New Features",slug:"/New Features/Export Modifier",permalink:"/docs/New Features/Export Modifier",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Explicit Globals",permalink:"/docs/New Features/Explicit Globals"},next:{title:"In Expressions",permalink:"/docs/New Features/In Expressions"}},s={},i=[{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],p={toc:i},d="wrapper";function m(e){let{components:t,...o}=e;return(0,r.kt)(d,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"export")," modifier allows you to automatically aggregate things you want to export into a table."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Old Code"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Old Code"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," version "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," version "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," version"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," add "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," add")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}"))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"New Code"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"New Code"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"export"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," version "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"export"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("p",null,"The return statement is automatically generated at the end of the block, so it is not limited to the top-level function:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"package"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"preload["),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"test"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"export"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," version "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"export"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- end of scope; 'return' is automatically generated")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"test"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"version)"))))),(0,r.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,r.kt)("p",null,"You may need to use ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_export")," instead of ",(0,r.kt)("inlineCode",{parentName:"p"},"export"),". Alternatively, ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_use export")," will enable the keyword independently of environment settings."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/20639b4d.767a0ba1.js b/assets/js/20639b4d.767a0ba1.js new file mode 100644 index 00000000..620cffb5 --- /dev/null +++ b/assets/js/20639b4d.767a0ba1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8400],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>N});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),p=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},F=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(a),F=r,N=d["".concat(i,".").concat(F)]||d[F]||m[F]||o;return a?n.createElement(N,l(l({ref:t},c),{},{components:a})):n.createElement(N,l({ref:t},c))}));function N(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=F;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:r,l[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var n=a(7462),r=(a(7294),a(3905));const o={sidebar_position:2},l=void 0,s={unversionedId:"New Features/Export Modifier",id:"New Features/Export Modifier",title:"Export Modifier",description:"The export modifier allows you to automatically aggregate things you want to export into a table.",source:"@site/docs/New Features/Export Modifier.md",sourceDirName:"New Features",slug:"/New Features/Export Modifier",permalink:"/docs/New Features/Export Modifier",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Explicit Globals",permalink:"/docs/New Features/Explicit Globals"},next:{title:"In Expressions",permalink:"/docs/New Features/In Expressions"}},i={},p=[{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(d,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"export")," modifier allows you to automatically aggregate things you want to export into a table."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Old Code"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Old Code"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," version "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," version "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," version"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," add "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," add")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}"))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"New Code"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"New Code"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"export"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," version "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"export"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,r.kt)("p",null,"The return statement is automatically generated at the end of the block, so it is not limited to the top-level function:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"package"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"preload["),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"test"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"export"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," version "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"export"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- end of scope; 'return' is automatically generated")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"test"'),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"version)"))))),(0,r.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,r.kt)("p",null,"You may need to use ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_export")," instead of ",(0,r.kt)("inlineCode",{parentName:"p"},"export"),". Alternatively, ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_use export")," will enable the keyword independently of environment settings."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2fe108ae.09a7a094.js b/assets/js/2fe108ae.09a7a094.js deleted file mode 100644 index a20da165..00000000 --- a/assets/js/2fe108ae.09a7a094.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[4723],{3905:(e,t,a)=>{a.d(t,{Zo:()=>i,kt:()=>v});var r=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var c=r.createContext({}),p=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},i=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var a=e.components,o=e.mdxType,n=e.originalType,c=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),d=p(a),F=o,v=d["".concat(c,".").concat(F)]||d[F]||m[F]||n;return a?r.createElement(v,l(l({ref:t},i),{},{components:a})):r.createElement(v,l({ref:t},i))}));function v(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=a.length,l=new Array(n);l[0]=F;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:o,l[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>p});var r=a(7462),o=(a(7294),a(3905));const n={sidebar_position:1},l=void 0,s={unversionedId:"New Features/Named Varargs",id:"New Features/Named Varargs",title:"Named Varargs",description:"If you have a function that takes varargs and you want them in a table, you'd have to do something like this:",source:"@site/docs/New Features/Named Varargs.md",sourceDirName:"New Features",slug:"/New Features/Named Varargs",permalink:"/docs/New Features/Named Varargs",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"For-As Loop",permalink:"/docs/New Features/For-As Loop"},next:{title:"Numeral Parsing",permalink:"/docs/New Features/Numeral Parsing"}},c={},p=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],i={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,o.kt)(d,(0,r.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"If you have a function that takes varargs and you want them in a table, you'd have to do something like this:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"vfunc"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"..."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," args "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"..."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," args "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"as"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," arg "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(arg)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"vfunc"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "Hello"'))))),(0,o.kt)("p",null,"But, with named varargs, it can be as simple as this:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"vfunc"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"..."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"args"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," args "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"as"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," arg "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(arg)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"vfunc"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "Hello"'))))),(0,o.kt)("h4",{id:"try-it-yourself"},(0,o.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=function%20vfunc(...args)%0D%0A%20%20%20%20for%20args%20as%20arg%20do%0D%0A%20%20%20%20%20%20%20%20print(arg)%0D%0A%20%20%20%20end%0D%0Aend%0D%0Avfunc(%22Hello%22)%20--%20%22Hello%22"},"Try It Yourself")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2fe108ae.5bba8398.js b/assets/js/2fe108ae.5bba8398.js new file mode 100644 index 00000000..2fadceee --- /dev/null +++ b/assets/js/2fe108ae.5bba8398.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[4723],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>v});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var p=r.createContext({}),i=function(e){var t=r.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=i(e.components);return r.createElement(p.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=i(a),F=n,v=d["".concat(p,".").concat(F)]||d[F]||m[F]||o;return a?r.createElement(v,l(l({ref:t},c),{},{components:a})):r.createElement(v,l({ref:t},c))}));function v(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=F;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[d]="string"==typeof e?e:n,l[1]=s;for(var i=2;i{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>i});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:1},l=void 0,s={unversionedId:"New Features/Named Varargs",id:"New Features/Named Varargs",title:"Named Varargs",description:"If you have a function that takes varargs and you want them in a table, you'd have to do something like this:",source:"@site/docs/New Features/Named Varargs.md",sourceDirName:"New Features",slug:"/New Features/Named Varargs",permalink:"/docs/New Features/Named Varargs",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"For-As Loop",permalink:"/docs/New Features/For-As Loop"},next:{title:"Numeral Parsing",permalink:"/docs/New Features/Numeral Parsing"}},p={},i=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],c={toc:i},d="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"If you have a function that takes varargs and you want them in a table, you'd have to do something like this:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"vfunc"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"..."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," args "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"..."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," args "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"as"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," arg "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(arg)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"vfunc"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "Hello"'))))),(0,n.kt)("p",null,"But, with named varargs, it can be as simple as this:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"vfunc"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"..."),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"args"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," args "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"as"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," arg "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(arg)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"vfunc"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "Hello"'))))),(0,n.kt)("h4",{id:"try-it-yourself"},(0,n.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=function%20vfunc(...args)%0D%0A%20%20%20%20for%20args%20as%20arg%20do%0D%0A%20%20%20%20%20%20%20%20print(arg)%0D%0A%20%20%20%20end%0D%0Aend%0D%0Avfunc(%22Hello%22)%20--%20%22Hello%22"},"Try It Yourself")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/30d00a07.7428bbf0.js b/assets/js/30d00a07.7428bbf0.js deleted file mode 100644 index 624d0e7b..00000000 --- a/assets/js/30d00a07.7428bbf0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5091],{3905:(e,o,a)=>{a.d(o,{Zo:()=>i,kt:()=>N});var t=a(7294);function l(e,o,a){return o in e?Object.defineProperty(e,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[o]=a,e}function r(e,o){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);o&&(t=t.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),a.push.apply(a,t)}return a}function n(e){for(var o=1;o=0||(l[a]=e[a]);return l}(e,o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var c=t.createContext({}),p=function(e){var o=t.useContext(c),a=o;return e&&(a="function"==typeof e?e(o):n(n({},o),e)),a},i=function(e){var o=p(e.components);return t.createElement(c.Provider,{value:o},e.children)},F="mdxType",d={inlineCode:"code",wrapper:function(e){var o=e.children;return t.createElement(t.Fragment,{},o)}},m=t.forwardRef((function(e,o){var a=e.components,l=e.mdxType,r=e.originalType,c=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),F=p(a),m=l,N=F["".concat(c,".").concat(m)]||F[m]||d[m]||r;return a?t.createElement(N,n(n({ref:o},i),{},{components:a})):t.createElement(N,n({ref:o},i))}));function N(e,o){var a=arguments,l=o&&o.mdxType;if("string"==typeof e||l){var r=a.length,n=new Array(r);n[0]=m;var s={};for(var c in o)hasOwnProperty.call(o,c)&&(s[c]=o[c]);s.originalType=e,s[F]="string"==typeof e?e:l,n[1]=s;for(var p=2;p{a.r(o),a.d(o,{assets:()=>c,contentTitle:()=>n,default:()=>d,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var t=a(7462),l=(a(7294),a(3905));const r={sidebar_position:1},n=void 0,s={unversionedId:"New Features/Switch Blocks",id:"New Features/Switch Blocks",title:"Switch Blocks",description:"Switch blocks consists of the following new keywords:",source:"@site/docs/New Features/Switch Blocks.md",sourceDirName:"New Features",slug:"/New Features/Switch Blocks",permalink:"/docs/New Features/Switch Blocks",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"String Interpolation",permalink:"/docs/New Features/String Interpolation"},next:{title:"Ternary Expressions",permalink:"/docs/New Features/Ternary Expressions"}},c={},p=[{value:"Switch Statement",id:"switch-statement",level:2},{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Case Blocks",id:"case-blocks",level:2},{value:"Switch Expression",id:"switch-expression",level:2},{value:"Try It Yourself",id:"try-it-yourself-1",level:4},{value:"Try It Yourself",id:"try-it-yourself-2",level:4},{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],i={toc:p},F="wrapper";function d(e){let{components:o,...a}=e;return(0,l.kt)(F,(0,t.Z)({},i,a,{components:o,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Switch blocks consists of the following new keywords:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"case")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"switch")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"default"))),(0,l.kt)("h2",{id:"switch-statement"},"Switch Statement"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"There is only one!"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"There is only two!"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Break jumps here."))))),(0,l.kt)("p",null,"Switch statements also support fallthrough."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Got 1-5."'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"default"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Value is greater than 5."'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Break jumps here."))))),(0,l.kt)("p",null,"In this example, cases 1-4 fall through to case 5."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Remember to use break whenever you do not want fallthrough"),". Here is an example of a potential bug:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"There is only one!"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"There is only two!"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Output:")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- There is only one!")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- There is only two! <-- Uh oh."))))),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"default")," case is executed if none of the other cases are true. For example:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"default"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Value is neither 2 nor 3!"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"default")," case can be placed anywhere in the block. It also supports fallthrough, so remember to use ",(0,l.kt)("inlineCode",{parentName:"p"},"break")," if you place it above any cases."),(0,l.kt)("h4",{id:"try-it-yourself"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20value%20%3D%203%0D%0Aswitch%20value%20do%0D%0A%20%20case%201%3A%0D%0A%20%20case%202%3A%0D%0A%20%20case%203%3A%0D%0A%20%20case%204%3A%0D%0A%20%20case%205%3A%0D%0A%20%20%20%20print%20%22Got%201-5.%22%0D%0A%20%20%20%20break%0D%0A%20%20default%3A%0D%0A%20%20%20%20print%20%22Value%20is%20greater%20than%205.%22%0D%0Aend%0D%0A--%20Break%20jumps%20here."},"Try It Yourself")),(0,l.kt)("h2",{id:"case-blocks"},"Case Blocks"),(0,l.kt)("p",null,"Any expression can be used for the case condition:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"42 is 42 is true"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("p",null,"There is a short-hand fallthrough syntax:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"1-3"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"6"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"4-6"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("p",null,"However, note that method calls needs to be encapsulated with parentheses:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"getVal"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"getVal"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- This is interpreted as `case t: getVal():print("val is 42")`')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"val is 42"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," (t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"getVal"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"())"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- This works as expected")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"val is 42"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("h2",{id:"switch-expression"},"Switch Expression"),(0,l.kt)("p",null,"Just like ternary expressions, these allow you to conditionally provide values, with massively simplified case blocks:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," place "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"place "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," place "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"1st"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"2nd"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"3rd"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"default"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{place}"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'th"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(place) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1st"))))),(0,l.kt)("p",null,"Note that the case blocks here have their conditions delimited by an arrow (->) instead of a colon (:)."),(0,l.kt)("h4",{id:"try-it-yourself-1"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20place%20%3D%201%0D%0Aplace%20%3D%20switch%20place%20do%0D%0A%20%20%20%20case%201%20-%3E%20%221st%22%0D%0A%20%20%20%20case%202%20-%3E%20%222nd%22%0D%0A%20%20%20%20case%203%20-%3E%20%223rd%22%0D%0A%20%20%20%20default%20-%3E%20%24%22%7Bplace%7Dth%22%0D%0Aend%0D%0Aprint(place)"},"Try It Yourself")),(0,l.kt)("p",null,"Despite not being able to manually fall through, the shorthand fallthrough syntax still works:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"print_range"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"value"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"1-3"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"6"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"4-6"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print_range"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1-3")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print_range"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"6"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 4-6")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print_range"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"9"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e nil"))))),(0,l.kt)("p",null,"Notice how the ",(0,l.kt)("inlineCode",{parentName:"p"},"default")," case was omitted in this example, so it was implicitly set to ",(0,l.kt)("inlineCode",{parentName:"p"},"default -> nil"),"."),(0,l.kt)("h4",{id:"try-it-yourself-2"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20function%20print_range(value)%0D%0A%20%20%20%20print(switch%20value%20do%0D%0A%20%20%20%20%20%20%20%20case%201%2C%202%2C%203%20-%3E%20%221-3%22%0D%0A%20%20%20%20%20%20%20%20case%204%2C%205%2C%206%20-%3E%20%224-6%22%0D%0A%20%20%20%20end)%0D%0Aend%0D%0Aprint_range(1)%20--%3E%20%221-3%22%0D%0Aprint_range(6)%20--%3E%20%224-6%22%0D%0Aprint_range(9)%20--%3E%20nil"},"Try It Yourself")),(0,l.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,l.kt)("p",null,"You may need to use ",(0,l.kt)("inlineCode",{parentName:"p"},"pluto_switch")," instead of ",(0,l.kt)("inlineCode",{parentName:"p"},"switch"),". Alternatively, ",(0,l.kt)("inlineCode",{parentName:"p"},"pluto_use switch")," will enable the keyword independently of environment settings."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/30d00a07.b19d7a7a.js b/assets/js/30d00a07.b19d7a7a.js new file mode 100644 index 00000000..5c6d43a1 --- /dev/null +++ b/assets/js/30d00a07.b19d7a7a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5091],{3905:(e,a,t)=>{t.d(a,{Zo:()=>c,kt:()=>N});var n=t(7294);function l(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function r(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function s(e){for(var a=1;a=0||(l[t]=e[t]);return l}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}var p=n.createContext({}),i=function(e){var a=n.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):s(s({},a),e)),t},c=function(e){var a=i(e.components);return n.createElement(p.Provider,{value:a},e.children)},F="mdxType",d={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},m=n.forwardRef((function(e,a){var t=e.components,l=e.mdxType,r=e.originalType,p=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),F=i(t),m=l,N=F["".concat(p,".").concat(m)]||F[m]||d[m]||r;return t?n.createElement(N,s(s({ref:a},c),{},{components:t})):n.createElement(N,s({ref:a},c))}));function N(e,a){var t=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var r=t.length,s=new Array(r);s[0]=m;var o={};for(var p in a)hasOwnProperty.call(a,p)&&(o[p]=a[p]);o.originalType=e,o[F]="string"==typeof e?e:l,s[1]=o;for(var i=2;i{t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>o,toc:()=>i});var n=t(7462),l=(t(7294),t(3905));const r={sidebar_position:1},s=void 0,o={unversionedId:"New Features/Switch Blocks",id:"New Features/Switch Blocks",title:"Switch Blocks",description:"Switch blocks consists of the following new keywords:",source:"@site/docs/New Features/Switch Blocks.md",sourceDirName:"New Features",slug:"/New Features/Switch Blocks",permalink:"/docs/New Features/Switch Blocks",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"String Interpolation",permalink:"/docs/New Features/String Interpolation"},next:{title:"Ternary Expressions",permalink:"/docs/New Features/Ternary Expressions"}},p={},i=[{value:"Switch Statement",id:"switch-statement",level:2},{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Case Blocks",id:"case-blocks",level:2},{value:"Switch Expression",id:"switch-expression",level:2},{value:"Try It Yourself",id:"try-it-yourself-1",level:4},{value:"Try It Yourself",id:"try-it-yourself-2",level:4},{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],c={toc:i},F="wrapper";function d(e){let{components:a,...t}=e;return(0,l.kt)(F,(0,n.Z)({},c,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Switch blocks consists of the following new keywords:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"case")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"switch")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"default"))),(0,l.kt)("h2",{id:"switch-statement"},"Switch Statement"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"There is only one!"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"There is only two!"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Break jumps here."))))),(0,l.kt)("p",null,"Switch statements also support fallthrough."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Got 1-5."'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"default"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Value is greater than 5."'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Break jumps here."))))),(0,l.kt)("p",null,"In this example, cases 1-4 fall through to case 5."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Remember to use break whenever you do not want fallthrough"),". Here is an example of a potential bug:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"There is only one!"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"There is only two!"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Output:")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- There is only one!")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- There is only two! <-- Uh oh."))))),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"default")," case is executed if none of the other cases are true. For example:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"default"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Value is neither 2 nor 3!"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"default")," case can be placed anywhere in the block. It also supports fallthrough, so remember to use ",(0,l.kt)("inlineCode",{parentName:"p"},"break")," if you place it above any cases."),(0,l.kt)("h4",{id:"try-it-yourself"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20value%20%3D%203%0D%0Aswitch%20value%20do%0D%0A%20%20case%201%3A%0D%0A%20%20case%202%3A%0D%0A%20%20case%203%3A%0D%0A%20%20case%204%3A%0D%0A%20%20case%205%3A%0D%0A%20%20%20%20print%20%22Got%201-5.%22%0D%0A%20%20%20%20break%0D%0A%20%20default%3A%0D%0A%20%20%20%20print%20%22Value%20is%20greater%20than%205.%22%0D%0Aend%0D%0A--%20Break%20jumps%20here."},"Try It Yourself")),(0,l.kt)("h2",{id:"case-blocks"},"Case Blocks"),(0,l.kt)("p",null,"Any expression can be used for the case condition:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"42 is 42 is true"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("p",null,"There is a short-hand fallthrough syntax:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"1-3"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"6"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"4-6"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("p",null,"However, note that method calls needs to be encapsulated with parentheses:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"getVal"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"getVal"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- This is interpreted as `case t: getVal():print("val is 42")`')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"val is 42"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," (t"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"getVal"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"())"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- This works as expected")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"val is 42"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("h2",{id:"switch-expression"},"Switch Expression"),(0,l.kt)("p",null,"Just like ternary expressions, these allow you to conditionally provide values, with massively simplified case blocks:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," place "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"place "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," place "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"1st"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"2nd"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"3rd"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"default"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{place}"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'th"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(place) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1st"))))),(0,l.kt)("p",null,"Note that the case blocks here have their conditions delimited by an arrow (->) instead of a colon (:)."),(0,l.kt)("h4",{id:"try-it-yourself-1"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20place%20%3D%201%0D%0Aplace%20%3D%20switch%20place%20do%0D%0A%20%20%20%20case%201%20-%3E%20%221st%22%0D%0A%20%20%20%20case%202%20-%3E%20%222nd%22%0D%0A%20%20%20%20case%203%20-%3E%20%223rd%22%0D%0A%20%20%20%20default%20-%3E%20%24%22%7Bplace%7Dth%22%0D%0Aend%0D%0Aprint(place)"},"Try It Yourself")),(0,l.kt)("p",null,"Despite not being able to manually fall through, the shorthand fallthrough syntax still works:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"print_range"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"value"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"1-3"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"6"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"4-6"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print_range"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1-3")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print_range"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"6"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 4-6")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print_range"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"9"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e nil"))))),(0,l.kt)("p",null,"Notice how the ",(0,l.kt)("inlineCode",{parentName:"p"},"default")," case was omitted in this example, so it was implicitly set to ",(0,l.kt)("inlineCode",{parentName:"p"},"default -> nil"),"."),(0,l.kt)("h4",{id:"try-it-yourself-2"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20function%20print_range(value)%0D%0A%20%20%20%20print(switch%20value%20do%0D%0A%20%20%20%20%20%20%20%20case%201%2C%202%2C%203%20-%3E%20%221-3%22%0D%0A%20%20%20%20%20%20%20%20case%204%2C%205%2C%206%20-%3E%20%224-6%22%0D%0A%20%20%20%20end)%0D%0Aend%0D%0Aprint_range(1)%20--%3E%20%221-3%22%0D%0Aprint_range(6)%20--%3E%20%224-6%22%0D%0Aprint_range(9)%20--%3E%20nil"},"Try It Yourself")),(0,l.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,l.kt)("p",null,"You may need to use ",(0,l.kt)("inlineCode",{parentName:"p"},"pluto_switch")," instead of ",(0,l.kt)("inlineCode",{parentName:"p"},"switch"),". Alternatively, ",(0,l.kt)("inlineCode",{parentName:"p"},"pluto_use switch")," will enable the keyword independently of environment settings."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/389ebece.9835871c.js b/assets/js/389ebece.9835871c.js new file mode 100644 index 00000000..40c05fb1 --- /dev/null +++ b/assets/js/389ebece.9835871c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5881],{3905:(e,a,t)=>{t.d(a,{Zo:()=>d,kt:()=>k});var n=t(7294);function o(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function r(e){for(var a=1;a=0||(o[t]=e[t]);return o}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i=n.createContext({}),p=function(e){var a=n.useContext(i),t=a;return e&&(t="function"==typeof e?e(a):r(r({},a),e)),t},d=function(e){var a=p(e.components);return n.createElement(i.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},N=n.forwardRef((function(e,a){var t=e.components,o=e.mdxType,l=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),c=p(t),N=o,k=c["".concat(i,".").concat(N)]||c[N]||m[N]||l;return t?n.createElement(k,r(r({ref:a},d),{},{components:t})):n.createElement(k,r({ref:a},d))}));function k(e,a){var t=arguments,o=a&&a.mdxType;if("string"==typeof e||o){var l=t.length,r=new Array(l);r[0]=N;var s={};for(var i in a)hasOwnProperty.call(a,i)&&(s[i]=a[i]);s.originalType=e,s[c]="string"==typeof e?e:o,r[1]=s;for(var p=2;p{t.r(a),t.d(a,{assets:()=>i,contentTitle:()=>r,default:()=>m,frontMatter:()=>l,metadata:()=>s,toc:()=>p});var n=t(7462),o=(t(7294),t(3905));const l={sidebar_position:1},r=void 0,s={unversionedId:"New Features/Compiler Warnings",id:"New Features/Compiler Warnings",title:"Compiler Warnings",description:"Pluto offers optional compiler warnings for certain misbehaviors.",source:"@site/docs/New Features/Compiler Warnings.md",sourceDirName:"New Features",slug:"/New Features/Compiler Warnings",permalink:"/docs/New Features/Compiler Warnings",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Break Statement",permalink:"/docs/New Features/Break Statement"},next:{title:"Continue Statement",permalink:"/docs/New Features/Continue Statement"}},i={},p=[{value:"Warning Types",id:"warning-types",level:2},{value:"var-shadow",id:"var-shadow",level:3},{value:"global-shadow",id:"global-shadow",level:3},{value:"field-shadow",id:"field-shadow",level:3},{value:"type-mismatch",id:"type-mismatch",level:3},{value:"unreachable-code",id:"unreachable-code",level:3},{value:"excessive-arguments",id:"excessive-arguments",level:3},{value:"bad-practice",id:"bad-practice",level:3},{value:"possible-typo",id:"possible-typo",level:3},{value:"non-portable-code",id:"non-portable-code",level:3},{value:"non-portable-name",id:"non-portable-name",level:3},{value:"non-portable-bytecode",id:"non-portable-bytecode",level:3},{value:"unannotated-fallthrough",id:"unannotated-fallthrough",level:3},{value:"implicit-global",id:"implicit-global",level:3},{value:"discarded-return",id:"discarded-return",level:3},{value:"Compile-time Configuration",id:"compile-time-configuration",level:2},{value:"Changing Warning States",id:"changing-warning-states",level:3},{value:"Disable Warnings On Line",id:"disable-warnings-on-line",level:3}],d={toc:p},c="wrapper";function m(e){let{components:a,...t}=e;return(0,o.kt)(c,(0,n.Z)({},d,t,{components:a,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Pluto offers optional compiler warnings for certain misbehaviors."),(0,o.kt)("h2",{id:"warning-types"},"Warning Types"),(0,o.kt)("h3",{id:"var-shadow"},"var-shadow"),(0,o.kt)("p",null,"This is raised when a new local is created with the same name as an existing one."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," var "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," var "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:3: warning: duplicate local declaration [var-shadow]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},' 3 | local var = "hello"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^^^^^^^^^^^ here: this shadows the initial declaration of 'var' on line 1."))))),(0,o.kt)("h3",{id:"global-shadow"},"global-shadow"),(0,o.kt)("p",null,"This is raised when a new local is created with the same name as a global variable."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," table "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {}"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:1: warning: duplicate global declaration [global-shadow]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," 1 | local table = {}")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^^^^^^^^ here: this shadows the initial global definition of 'table'"))))),(0,o.kt)("p",null,"To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the ",(0,o.kt)("a",{parentName:"p",href:"#compile-time-configuration"},"compile-time configuration")," and integrators can define the ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_WARN_GLOBAL_SHADOW")," macro."),(0,o.kt)("p",null,"Furthermore, this only covers the globals 'table', 'string', and 'arg' by default. Integrators can overwrite the ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_COMMON_GLOBAL_NAMES")," macro to change this list."),(0,o.kt)("h3",{id:"field-shadow"},"field-shadow"),(0,o.kt)("p",null,"This is raised when the same field is declared multiple times in a table constructor:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"fruit"'),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"apple"'),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"banana"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:4: warning: duplicate table field [field-shadow]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},' 4 | value = "banana"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^^^^^^^^ here: this overwrites the value assigned to this field earlier"))))),(0,o.kt)("h3",{id:"type-mismatch"},"type-mismatch"),(0,o.kt)("p",null,"This is raised when the type of an expression doesn't match the hinted type. See ",(0,o.kt)("a",{parentName:"p",href:"Type%20Hinting"},"Type Hinting"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," var"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"number"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"var "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"'))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:2: warning: variable type mismatch [type-mismatch]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},' 2 | var = "hello"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^^^^^ here: 'var' type-hinted as 'number', but assigned a string value."))))),(0,o.kt)("h3",{id:"unreachable-code"},"unreachable-code"),(0,o.kt)("p",null,"This is raised when a block of code will never be ran."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"continue")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"message"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:4: warning: unreachable code [unreachable-code]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},' 4 | print("message")')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^^^^^^^^ here: this code comes after an escaping 'continue' statement."))))),(0,o.kt)("h3",{id:"excessive-arguments"},"excessive-arguments"),(0,o.kt)("p",null,"This is raised when too many arguments are given to a non-vararg function."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"func"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"a"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"b"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"c"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"func"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:5: warning: too many arguments [excessive-arguments]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," 5 | func(1, 2, 3, 4)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^^^^^^^^ here: expected 3 arguments, got 4."))))),(0,o.kt)("h3",{id:"bad-practice"},"bad-practice"),(0,o.kt)("p",null,"This is raised when the code does something stupid but not quite stupid enough to cause an error."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"pluto_use"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"*"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:1: warning: 'pluto_use *' is a bad idea because future Pluto versions may add keywords that will break your script [bad-practice]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," 1 | pluto_use *")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^^^ here: consider using 'pluto_use \"0.8.0\"' instead"))))),(0,o.kt)("h3",{id:"possible-typo"},"possible-typo"),(0,o.kt)("p",null,"This is raised when the code seems syntactically incorrect."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," magic const "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:1: warning: Possibly mistyped attribute [possible-typo]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," 1 | local magic const = 42")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^^^^^^^^^^^^^^ here: Did you mean ''?"))))),(0,o.kt)("h3",{id:"non-portable-code"},"non-portable-code"),(0,o.kt)("p",null,"This is raised when the code may not be considered valid by all Pluto environments due to compatibility mode."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"exception"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Not implemented"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:1: warning: non-portable keyword usage [non-portable-code]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},' 1 | new exception("Not implemented")')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: use 'pluto_new' instead, or 'pluto_use' this keyword: https://pluto.do/compat"))))),(0,o.kt)("p",null,"To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the ",(0,o.kt)("a",{parentName:"p",href:"#compile-time-configuration"},"compile-time configuration")," and integrators can define the ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_WARN_NON_PORTABLE_CODE")," macro."),(0,o.kt)("h3",{id:"non-portable-name"},"non-portable-name"),(0,o.kt)("p",null,"This is raised when a variable name is only valid due to compatibility mode."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"fruit"'))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:1: warning: 'class' is a non-portable name [non-portable-name]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},' 1 | local class = "fruit"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^^^^^^^^^^^^^ here: use a different name, or use 'pluto_use' to disable this keyword: https://pluto.do/compat"))))),(0,o.kt)("p",null,"To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the ",(0,o.kt)("a",{parentName:"p",href:"#compile-time-configuration"},"compile-time configuration")," and integrators can define the ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_WARN_NON_PORTABLE_NAME")," macro."),(0,o.kt)("h3",{id:"non-portable-bytecode"},"non-portable-bytecode"),(0,o.kt)("p",null,"This is raised when the code will not run in Lua environments (when compiling Pluto to bytecode)."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"h"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"in"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:1: warning: non-portable operator usage [non-portable-bytecode]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},' 1 | print("h" in "hello")')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^^^^^^^^^^^^^ here: this operator generates bytecode which is incompatible with Lua."))))),(0,o.kt)("p",null,"To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the ",(0,o.kt)("a",{parentName:"p",href:"#compile-time-configuration"},"compile-time configuration")," and integrators can define the ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_WARN_NON_PORTABLE_BYTECODE")," macro."),(0,o.kt)("h3",{id:"unannotated-fallthrough"},"unannotated-fallthrough"),(0,o.kt)("p",null,"This is raised when there's a non-obvious fallthrough in a switch block:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Case 1"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Case 2"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:5: warning: possibly unwanted fallthrough [unannotated-fallthrough]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," 5 | case 2:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^ here: the case on line 3 flows into this case")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," + note: place `--@fallthrough` before this case if this is intended"))))),(0,o.kt)("p",null,"As the warning points out, a ",(0,o.kt)("inlineCode",{parentName:"p"},"@fallthrough")," annotation can be used to label the fallthrough, in turn silencing the warning:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Case 1"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"@fallthrough")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Case 2"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,o.kt)("h3",{id:"implicit-global"},"implicit-global"),(0,o.kt)("p",null,"This is raised when the ",(0,o.kt)("inlineCode",{parentName:"p"},"global")," keyword is enabled and a global was declared without it. See ",(0,o.kt)("a",{parentName:"p",href:"Explicit%20Globals"},"Explicit Globals"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"pluto_use"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"global")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"a "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:3: warning: implicit global creation [implicit-global]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," 3 | a = 1")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^ here: prefix this with 'global' if creating a global was intended"))))),(0,o.kt)("h3",{id:"discarded-return"},"discarded-return"),(0,o.kt)("p",null,"This is raised when the return value of a function declared ",(0,o.kt)("inlineCode",{parentName:"p"},"")," was discarded. See ",(0,o.kt)("a",{parentName:"p",href:"Nodiscard%20Functions"},"Nodiscard Functions"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"add"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"a"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"b"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}}," ")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"add"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:5: warning: discarding return value of function declared '' [discarded-return]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," 5 | add(1, 2)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^ here"))))),(0,o.kt)("h2",{id:"compile-time-configuration"},"Compile-time Configuration"),(0,o.kt)("p",null,"The state of each warning type can be changed during compile-time and exceptions for certain code can be made."),(0,o.kt)("h3",{id:"changing-warning-states"},"Changing Warning States"),(0,o.kt)("p",null,"Warnings have 3 states: 'disable', 'enable', and 'error'. The 'error' state is a more aggressive version of 'enable' that causes compilation to fail if the warning type is raied."),(0,o.kt)("p",null,"To change the state of a warning, write a ",(0,o.kt)("inlineCode",{parentName:"p"},"@pluto_warnings")," comment with the state and warning type joined by a hyphen (-):"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," var "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"@pluto_warnings"),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},": disable-var-shadow")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," var "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"@pluto_warnings"),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},": enable-var-shadow")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,o.kt)("p",null,"For this, there is also the special type, 'all', which can be used e.g. to enable all warnings except for non-portable-bytecode:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"@pluto_warnings"),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},": enable-all, disable-non-portable-bytecode"))))),(0,o.kt)("h3",{id:"disable-warnings-on-line"},"Disable Warnings On Line"),(0,o.kt)("p",null,"To disable warnings on a specific line of code, simply put a comment on the line before it with ",(0,o.kt)("inlineCode",{parentName:"p"},"@pluto_warnings: disable-next"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," var "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"@pluto_warnings"),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},": disable-next")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," var "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/389ebece.ec3f72b0.js b/assets/js/389ebece.ec3f72b0.js deleted file mode 100644 index 4e390fed..00000000 --- a/assets/js/389ebece.ec3f72b0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5881],{3905:(e,a,o)=>{o.d(a,{Zo:()=>p,kt:()=>k});var t=o(7294);function l(e,a,o){return a in e?Object.defineProperty(e,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[a]=o,e}function r(e,a){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),o.push.apply(o,t)}return o}function n(e){for(var a=1;a=0||(l[o]=e[o]);return l}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(l[o]=e[o])}return l}var i=t.createContext({}),c=function(e){var a=t.useContext(i),o=a;return e&&(o="function"==typeof e?e(a):n(n({},a),e)),o},p=function(e){var a=c(e.components);return t.createElement(i.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},N=t.forwardRef((function(e,a){var o=e.components,l=e.mdxType,r=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(o),N=l,k=d["".concat(i,".").concat(N)]||d[N]||m[N]||r;return o?t.createElement(k,n(n({ref:a},p),{},{components:o})):t.createElement(k,n({ref:a},p))}));function k(e,a){var o=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var r=o.length,n=new Array(r);n[0]=N;var s={};for(var i in a)hasOwnProperty.call(a,i)&&(s[i]=a[i]);s.originalType=e,s[d]="string"==typeof e?e:l,n[1]=s;for(var c=2;c{o.r(a),o.d(a,{assets:()=>i,contentTitle:()=>n,default:()=>m,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var t=o(7462),l=(o(7294),o(3905));const r={sidebar_position:1},n=void 0,s={unversionedId:"New Features/Compiler Warnings",id:"New Features/Compiler Warnings",title:"Compiler Warnings",description:"Pluto offers optional compiler warnings for certain misbehaviors.",source:"@site/docs/New Features/Compiler Warnings.md",sourceDirName:"New Features",slug:"/New Features/Compiler Warnings",permalink:"/docs/New Features/Compiler Warnings",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Break Statement",permalink:"/docs/New Features/Break Statement"},next:{title:"Continue Statement",permalink:"/docs/New Features/Continue Statement"}},i={},c=[{value:"Warning Types",id:"warning-types",level:2},{value:"var-shadow",id:"var-shadow",level:3},{value:"global-shadow",id:"global-shadow",level:3},{value:"field-shadow",id:"field-shadow",level:3},{value:"type-mismatch",id:"type-mismatch",level:3},{value:"unreachable-code",id:"unreachable-code",level:3},{value:"excessive-arguments",id:"excessive-arguments",level:3},{value:"bad-practice",id:"bad-practice",level:3},{value:"possible-typo",id:"possible-typo",level:3},{value:"non-portable-code",id:"non-portable-code",level:3},{value:"non-portable-name",id:"non-portable-name",level:3},{value:"non-portable-bytecode",id:"non-portable-bytecode",level:3},{value:"unannotated-fallthrough",id:"unannotated-fallthrough",level:3},{value:"implicit-global",id:"implicit-global",level:3},{value:"discarded-return",id:"discarded-return",level:3},{value:"Compile-time Configuration",id:"compile-time-configuration",level:2},{value:"Changing Warning States",id:"changing-warning-states",level:3},{value:"Disable Warnings On Line",id:"disable-warnings-on-line",level:3}],p={toc:c},d="wrapper";function m(e){let{components:a,...o}=e;return(0,l.kt)(d,(0,t.Z)({},p,o,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Pluto offers optional compiler warnings for certain misbehaviors."),(0,l.kt)("h2",{id:"warning-types"},"Warning Types"),(0,l.kt)("h3",{id:"var-shadow"},"var-shadow"),(0,l.kt)("p",null,"This is raised when a new local is created with the same name as an existing one."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," var "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," var "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:3: warning: duplicate local declaration [var-shadow]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' 3 | local var = "hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^^^^^^^^^^^ here: this shadows the initial declaration of 'var' on line 1."))))),(0,l.kt)("h3",{id:"global-shadow"},"global-shadow"),(0,l.kt)("p",null,"This is raised when a new local is created with the same name as a global variable."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," table "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {}"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:1: warning: duplicate global declaration [global-shadow]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," 1 | local table = {}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^^^^^^^^ here: this shadows the initial global definition of 'table'"))))),(0,l.kt)("p",null,"To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the ",(0,l.kt)("a",{parentName:"p",href:"#compile-time-configuration"},"compile-time configuration")," and integrators can define the ",(0,l.kt)("inlineCode",{parentName:"p"},"PLUTO_WARN_GLOBAL_SHADOW")," macro."),(0,l.kt)("p",null,"Furthermore, this only covers the globals 'table', 'string', and 'arg' by default. Integrators can overwrite the ",(0,l.kt)("inlineCode",{parentName:"p"},"PLUTO_COMMON_GLOBAL_NAMES")," macro to change this list."),(0,l.kt)("h3",{id:"field-shadow"},"field-shadow"),(0,l.kt)("p",null,"This is raised when the same field is declared multiple times in a table constructor:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"fruit"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"apple"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"banana"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:4: warning: duplicate table field [field-shadow]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' 4 | value = "banana"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^^^^^^^^ here: this overwrites the value assigned to this field earlier"))))),(0,l.kt)("h3",{id:"type-mismatch"},"type-mismatch"),(0,l.kt)("p",null,"This is raised when the type of an expression doesn't match the hinted type. See ",(0,l.kt)("a",{parentName:"p",href:"Type%20Hinting"},"Type Hinting"),"."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," var"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"number"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"var "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"'))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:2: warning: variable type mismatch [type-mismatch]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' 2 | var = "hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^^^^^ here: 'var' type-hinted as 'number', but assigned a string value."))))),(0,l.kt)("h3",{id:"unreachable-code"},"unreachable-code"),(0,l.kt)("p",null,"This is raised when a block of code will never be ran."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"continue")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"message"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:4: warning: unreachable code [unreachable-code]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' 4 | print("message")')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^^^^^^^^ here: this code comes after an escaping 'continue' statement."))))),(0,l.kt)("h3",{id:"excessive-arguments"},"excessive-arguments"),(0,l.kt)("p",null,"This is raised when too many arguments are given to a non-vararg function."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"func"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"a"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"b"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"c"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"func"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:5: warning: too many arguments [excessive-arguments]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," 5 | func(1, 2, 3, 4)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^^^^^^^^ here: expected 3 arguments, got 4."))))),(0,l.kt)("h3",{id:"bad-practice"},"bad-practice"),(0,l.kt)("p",null,"This is raised when the code does something stupid but not quite stupid enough to cause an error."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"pluto_use"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"*"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:1: warning: 'pluto_use *' is a bad idea because future Pluto versions may add keywords that will break your script [bad-practice]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," 1 | pluto_use *")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^^^ here: consider using 'pluto_use \"0.8.0\"' instead"))))),(0,l.kt)("h3",{id:"possible-typo"},"possible-typo"),(0,l.kt)("p",null,"This is raised when the code seems syntactically incorrect."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," magic const "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:1: warning: Possibly mistyped attribute [possible-typo]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," 1 | local magic const = 42")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^^^^^^^^^^^^^^ here: Did you mean ''?"))))),(0,l.kt)("h3",{id:"non-portable-code"},"non-portable-code"),(0,l.kt)("p",null,"This is raised when the code may not be considered valid by all Pluto environments due to compatibility mode."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"exception"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Not implemented"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:1: warning: non-portable keyword usage [non-portable-code]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' 1 | new exception("Not implemented")')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: use 'pluto_new' instead, or 'pluto_use' this keyword: https://pluto.do/compat"))))),(0,l.kt)("p",null,"To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the ",(0,l.kt)("a",{parentName:"p",href:"#compile-time-configuration"},"compile-time configuration")," and integrators can define the ",(0,l.kt)("inlineCode",{parentName:"p"},"PLUTO_WARN_NON_PORTABLE_CODE")," macro."),(0,l.kt)("h3",{id:"non-portable-name"},"non-portable-name"),(0,l.kt)("p",null,"This is raised when a variable name is only valid due to compatibility mode."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"fruit"'))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:1: warning: 'class' is a non-portable name [non-portable-name]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' 1 | local class = "fruit"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^^^^^^^^^^^^^ here: use a different name, or use 'pluto_use' to disable this keyword: https://pluto.do/compat"))))),(0,l.kt)("p",null,"To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the ",(0,l.kt)("a",{parentName:"p",href:"#compile-time-configuration"},"compile-time configuration")," and integrators can define the ",(0,l.kt)("inlineCode",{parentName:"p"},"PLUTO_WARN_NON_PORTABLE_NAME")," macro."),(0,l.kt)("h3",{id:"non-portable-bytecode"},"non-portable-bytecode"),(0,l.kt)("p",null,"This is raised when the code will not run in Lua environments (when compiling Pluto to bytecode)."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"h"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"in"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:1: warning: non-portable operator usage [non-portable-bytecode]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' 1 | print("h" in "hello")')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^^^^^^^^^^^^^ here: this operator generates bytecode which is incompatible with Lua."))))),(0,l.kt)("p",null,"To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the ",(0,l.kt)("a",{parentName:"p",href:"#compile-time-configuration"},"compile-time configuration")," and integrators can define the ",(0,l.kt)("inlineCode",{parentName:"p"},"PLUTO_WARN_NON_PORTABLE_BYTECODE")," macro."),(0,l.kt)("h3",{id:"unannotated-fallthrough"},"unannotated-fallthrough"),(0,l.kt)("p",null,"This is raised when there's a non-obvious fallthrough in a switch block:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Case 1"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Case 2"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:5: warning: possibly unwanted fallthrough [unannotated-fallthrough]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," 5 | case 2:")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^ here: the case on line 3 flows into this case")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," + note: place `--@fallthrough` before this case if this is intended"))))),(0,l.kt)("p",null,"As the warning points out, a ",(0,l.kt)("inlineCode",{parentName:"p"},"@fallthrough")," annotation can be used to label the fallthrough, in turn silencing the warning:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Case 1"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"@fallthrough")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Case 2"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("h3",{id:"implicit-global"},"implicit-global"),(0,l.kt)("p",null,"This is raised when the ",(0,l.kt)("inlineCode",{parentName:"p"},"global")," keyword is enabled and a global was declared without it. See ",(0,l.kt)("a",{parentName:"p",href:"Explicit%20Globals"},"Explicit Globals"),"."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"pluto_use"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"global")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:3: warning: implicit global creation [implicit-global]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," 3 | a = 1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^ here: prefix this with 'global' if creating a global was intended"))))),(0,l.kt)("h3",{id:"discarded-return"},"discarded-return"),(0,l.kt)("p",null,"This is raised when the return value of a function declared ",(0,l.kt)("inlineCode",{parentName:"p"},"")," was discarded. See ",(0,l.kt)("a",{parentName:"p",href:"Nodiscard%20Functions"},"Nodiscard Functions"),"."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"add"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"a"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"b"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}}," ")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"add"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:5: warning: discarding return value of function declared '' [discarded-return]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," 5 | add(1, 2)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^ here"))))),(0,l.kt)("h2",{id:"compile-time-configuration"},"Compile-time Configuration"),(0,l.kt)("p",null,"The state of each warning type can be changed during compile-time and exceptions for certain code can be made."),(0,l.kt)("h3",{id:"changing-warning-states"},"Changing Warning States"),(0,l.kt)("p",null,"Warnings have 3 states: 'disable', 'enable', and 'error'. The 'error' state is a more aggressive version of 'enable' that causes compilation to fail if the warning type is raied."),(0,l.kt)("p",null,"To change the state of a warning, write a ",(0,l.kt)("inlineCode",{parentName:"p"},"@pluto_warnings")," comment with the state and warning type joined by a hyphen (-):"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," var "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"@pluto_warnings"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},": disable-var-shadow")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," var "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"@pluto_warnings"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},": enable-var-shadow")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("p",null,"For this, there is also the special type, 'all', which can be used e.g. to enable all warnings except for non-portable-bytecode:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"@pluto_warnings"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},": enable-all, disable-non-portable-bytecode"))))),(0,l.kt)("h3",{id:"disable-warnings-on-line"},"Disable Warnings On Line"),(0,l.kt)("p",null,"To disable warnings on a specific line of code, simply put a comment on the line before it with ",(0,l.kt)("inlineCode",{parentName:"p"},"@pluto_warnings: disable-next"),"."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," var "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"@pluto_warnings"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},": disable-next")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," var "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3ba36259.3095a301.js b/assets/js/3ba36259.3095a301.js new file mode 100644 index 00000000..e2b075c6 --- /dev/null +++ b/assets/js/3ba36259.3095a301.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5992],{3905:(e,t,a)=>{a.d(t,{Zo:()=>m,kt:()=>k});var n=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var s=n.createContext({}),p=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},m=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,l=e.originalType,s=e.parentName,m=i(e,["components","mdxType","originalType","parentName"]),c=p(a),u=o,k=c["".concat(s,".").concat(u)]||c[u]||d[u]||l;return a?n.createElement(k,r(r({ref:t},m),{},{components:a})):n.createElement(k,r({ref:t},m))}));function k(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var l=a.length,r=new Array(l);r[0]=u;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:o,r[1]=i;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>d,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var n=a(7462),o=(a(7294),a(3905));const l={sidebar_position:10},r=void 0,i={unversionedId:"Compatibility",id:"Compatibility",title:"Compatibility",description:"Pluto aims to be source- and bytecode-compatible with existing Lua code such that it can simply be used as a drop-in replacement for Lua, and Lua modules can simply be used in Pluto codebases. In the vast majority of cases, we do succeed, but there are a few things to be aware of.",source:"@site/docs/Compatibility.md",sourceDirName:".",slug:"/Compatibility",permalink:"/docs/Compatibility",draft:!1,tags:[],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Table Length",permalink:"/docs/Optimizations/Table Length"},next:{title:"For Integrators",permalink:"/docs/For Integrators"}},s={},p=[{value:"New Keywords",id:"new-keywords",level:2},{value:"Mitigations",id:"mitigations",level:3},{value:"Compile-time Configuration (pluto_use)",id:"compile-time-configuration-pluto_use",level:3},{value:"Compatible Keywords",id:"compatible-keywords",level:3},{value:"Default Table Metatable",id:"default-table-metatable",level:2}],m={toc:p},c="wrapper";function d(e){let{components:t,...a}=e;return(0,o.kt)(c,(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Pluto aims to be source- and bytecode-compatible with existing Lua code such that it can simply be used as a drop-in replacement for Lua, and Lua modules can simply be used in Pluto codebases. In the vast majority of cases, we do succeed, but there are a few things to be aware of."),(0,o.kt)("h2",{id:"new-keywords"},"New Keywords"),(0,o.kt)("p",null,"Pluto adds the following reserved tokens:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"switch")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"continue")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"enum")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"new")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"class")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"parent")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"export")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"try")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"catch"))),(0,o.kt)("p",null,"Which means you can't use them as identifiers. They can still be used with short-hand table indexes and goto labels because Pluto ",(0,o.kt)("a",{parentName:"p",href:"QoL%20Improvements/Reserved%20Identifiers"},"allows reserved keywords to be used in those contexts"),"."),(0,o.kt)("h3",{id:"mitigations"},"Mitigations"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"For Integrators:")," Check your ",(0,o.kt)("inlineCode",{parentName:"li"},"luaconf.h"),' file to find the relevant macros under the "Compatibility" heading.'),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"For Scripters:")," Use ",(0,o.kt)("inlineCode",{parentName:"li"},"pluto_use")," in the source files. ",(0,o.kt)("inlineCode",{parentName:"li"},"-- @pluto_use * = false")," to simply disable all incompatible keywords."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"For Users:")," Pass the ",(0,o.kt)("inlineCode",{parentName:"li"},"-c")," flag to ",(0,o.kt)("inlineCode",{parentName:"li"},"pluto")," or ",(0,o.kt)("inlineCode",{parentName:"li"},"plutoc"),".")),(0,o.kt)("p",null,"The following sections will go more in-depth on source-level mitigations (for scripters)."),(0,o.kt)("h3",{id:"compile-time-configuration-pluto_use"},"Compile-time Configuration (pluto_use)"),(0,o.kt)("p",null,"You can change the meaning of Pluto's reserved tokens at any point in your scripts using the ",(0,o.kt)("inlineCode",{parentName:"p"},"--@pluto_use")," comment or ",(0,o.kt)("inlineCode",{parentName:"p"},"pluto_use")," statement."),(0,o.kt)("p",null,"For example, to disable all non-compatible keywords except for ",(0,o.kt)("inlineCode",{parentName:"p"},"switch"),":"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"@pluto_use"),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}}," * = false, switch"))))),(0,o.kt)("p",null,"It is also possible to specify a version number, which is a shorthand for the keywords available at that version:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},'"0.2.0"')," corresponds to ",(0,o.kt)("inlineCode",{parentName:"li"},"* = false, switch, continue")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},'"0.5.0"')," corresponds to ",(0,o.kt)("inlineCode",{parentName:"li"},"* = false, switch, continue, enum")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},'"0.6.0"')," corresponds to ",(0,o.kt)("inlineCode",{parentName:"li"},"* = false, switch, continue, enum, new, class, parent, export")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},'"0.8.0"')," corresponds to ",(0,o.kt)("inlineCode",{parentName:"li"},"* = false, switch, continue, enum, new, class, parent, export, try, catch"))),(0,o.kt)("p",null,"So, writing a portable script that only makes use of Pluto 0.8.0's features requires this at the beginning:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"pluto_use"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"0.8.0"'))))),(0,o.kt)("p",null,"This feature also supports quick encompassing of optional features. So, instead of:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"pluto_use"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"0.8.0"'),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"global"))))),(0,o.kt)("p",null,"You can use a '+' after the version number to also enable all of the optional features. As of 0.9.0, the only optional feature is ",(0,o.kt)("a",{parentName:"p",href:"New%20Features/Explicit%20Globals"},"explicit globals")," (",(0,o.kt)("inlineCode",{parentName:"p"},"global"),")."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"pluto_use"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"0.9.0+"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- The same as pluto_use "0.9.0", global'))))),(0,o.kt)("p",null,"For module developers and scripts which may be used in future versions of Pluto, we recommend you use ",(0,o.kt)("inlineCode",{parentName:"p"},"pluto_use")," for two reasons:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"Portability.")," This will override the compatibility mode settings compiled into Pluto so your script will be parsed identically in all Pluto environments."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"Proactive compatibility.")," Any keywords added by future versions of Pluto will also be put in compatibility mode by these statements, so in the off-chance your script uses a future reserved keyword as a variable name, it would still parse as you intended when you wrote it.")),(0,o.kt)("h3",{id:"compatible-keywords"},"Compatible Keywords"),(0,o.kt)("p",null,"Another way of using Pluto's features regardless of compatibility mode is by prefixing the keyword with ",(0,o.kt)("inlineCode",{parentName:"p"},"pluto_"),". For example, ",(0,o.kt)("inlineCode",{parentName:"p"},"switch")," becomes ",(0,o.kt)("inlineCode",{parentName:"p"},"pluto_switch"),". These Compatibility Mode variants will always be valid, even when Compatibility Mode is disabled."),(0,o.kt)("p",null,"These are what they look like:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"pluto_switch")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"pluto_continue")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"pluto_enum")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"pluto_new")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"pluto_class")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"pluto_parent")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"pluto_export")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"pluto_try")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"pluto_catch"))),(0,o.kt)("h2",{id:"default-table-metatable"},"Default Table Metatable"),(0,o.kt)("p",null,"This is ",(0,o.kt)("a",{parentName:"p",href:"Runtime%20Environment/Global%20&%20Base#default-metatables"},"a feature in Pluto")," that, by itself, is a benign QoL improvement for developers. However, in combination with our added standard library functions like ",(0,o.kt)("a",{parentName:"p",href:"Runtime%20Environment/Table#tablemin"},"table.min"),", it can be an unexpected semantic change:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"roll"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"opts"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"math"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"random"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(opts"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"min "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"or"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," opts"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"max "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"or"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"100"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"roll"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{ max "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," })"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"pluto: test.pluto:2: bad argument #1 to 'random' (number expected, got function)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"stack traceback:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," [C]: in function 'math.rand'")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," test.pluto:2: in local 'roll'")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," test.pluto:4: in main chunk"))))),(0,o.kt)("p",null,"Integrators can disable this feature by defining the ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_NO_DEFAULT_TABLE_METATABLE")," macro in their luaconf.h or build config, to aid in a smooth transition, should scripts in their ecosystem require it."),(0,o.kt)("p",null,"Scripters are advised to use ",(0,o.kt)("inlineCode",{parentName:"p"},"rawget")," and/or ",(0,o.kt)("inlineCode",{parentName:"p"},"type")," to better codify their expectations. For example, the example above seems to care only about providing fallback values and not at all about type-checking, so ",(0,o.kt)("inlineCode",{parentName:"p"},"rawget")," would be an excellent fit for it:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"roll"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"opts"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"math"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"random"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"rawget"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(opts"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"min"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"or"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"rawget"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(opts"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"max"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"or"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"100"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"roll"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{ max "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," })"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3ba36259.7d9db439.js b/assets/js/3ba36259.7d9db439.js deleted file mode 100644 index f3a1d435..00000000 --- a/assets/js/3ba36259.7d9db439.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5992],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>k});var o=a(7294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function r(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var s=o.createContext({}),p=function(e){var t=o.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},c=function(e){var t=p(e.components);return o.createElement(s.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},u=o.forwardRef((function(e,t){var a=e.components,l=e.mdxType,n=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=p(a),u=l,k=m["".concat(s,".").concat(u)]||m[u]||d[u]||n;return a?o.createElement(k,r(r({ref:t},c),{},{components:a})):o.createElement(k,r({ref:t},c))}));function k(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var n=a.length,r=new Array(n);r[0]=u;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[m]="string"==typeof e?e:l,r[1]=i;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>d,frontMatter:()=>n,metadata:()=>i,toc:()=>p});var o=a(7462),l=(a(7294),a(3905));const n={sidebar_position:10},r=void 0,i={unversionedId:"Compatibility",id:"Compatibility",title:"Compatibility",description:"Pluto aims to be source- and bytecode-compatible with existing Lua code such that it can simply be used as a drop-in replacement for Lua, and Lua modules can simply be used in Pluto codebases. In the vast majority of cases, we do succeed, but there are a few things to be aware of.",source:"@site/docs/Compatibility.md",sourceDirName:".",slug:"/Compatibility",permalink:"/docs/Compatibility",draft:!1,tags:[],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Table Length",permalink:"/docs/Optimizations/Table Length"},next:{title:"For Integrators",permalink:"/docs/For Integrators"}},s={},p=[{value:"New Keywords",id:"new-keywords",level:2},{value:"Mitigations",id:"mitigations",level:3},{value:"Compile-time Configuration (pluto_use)",id:"compile-time-configuration-pluto_use",level:3},{value:"Compatible Keywords",id:"compatible-keywords",level:3},{value:"Default Table Metatable",id:"default-table-metatable",level:2}],c={toc:p},m="wrapper";function d(e){let{components:t,...a}=e;return(0,l.kt)(m,(0,o.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Pluto aims to be source- and bytecode-compatible with existing Lua code such that it can simply be used as a drop-in replacement for Lua, and Lua modules can simply be used in Pluto codebases. In the vast majority of cases, we do succeed, but there are a few things to be aware of."),(0,l.kt)("h2",{id:"new-keywords"},"New Keywords"),(0,l.kt)("p",null,"Pluto adds the following reserved tokens:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"switch")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"continue")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"enum")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"new")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"class")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"parent")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"export")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"try")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"catch"))),(0,l.kt)("p",null,"Which means you can't use them as identifiers. They can still be used with short-hand table indexes and goto labels because Pluto ",(0,l.kt)("a",{parentName:"p",href:"QoL%20Improvements/Reserved%20Identifiers"},"allows reserved keywords to be used in those contexts"),"."),(0,l.kt)("h3",{id:"mitigations"},"Mitigations"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"For Integrators:")," Check your ",(0,l.kt)("inlineCode",{parentName:"li"},"luaconf.h"),' file to find the relevant macros under the "Compatibility" heading.'),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"For Scripters:")," Use ",(0,l.kt)("inlineCode",{parentName:"li"},"pluto_use")," in the source files. ",(0,l.kt)("inlineCode",{parentName:"li"},"-- @pluto_use * = false")," to simply disable all incompatible keywords."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"For Users:")," Pass the ",(0,l.kt)("inlineCode",{parentName:"li"},"-c")," flag to ",(0,l.kt)("inlineCode",{parentName:"li"},"pluto")," or ",(0,l.kt)("inlineCode",{parentName:"li"},"plutoc"),".")),(0,l.kt)("p",null,"The following sections will go more in-depth on source-level mitigations (for scripters)."),(0,l.kt)("h3",{id:"compile-time-configuration-pluto_use"},"Compile-time Configuration (pluto_use)"),(0,l.kt)("p",null,"You can change the meaning of Pluto's reserved tokens at any point in your scripts using the ",(0,l.kt)("inlineCode",{parentName:"p"},"--@pluto_use")," comment or ",(0,l.kt)("inlineCode",{parentName:"p"},"pluto_use")," statement."),(0,l.kt)("p",null,"For example, to disable all non-compatible keywords except for ",(0,l.kt)("inlineCode",{parentName:"p"},"switch"),":"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"@pluto_use"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," * = false, switch"))))),(0,l.kt)("p",null,"It is also possible to specify a version number, which is a shorthand for the keywords available at that version:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},'"0.2.0"')," corresponds to ",(0,l.kt)("inlineCode",{parentName:"li"},"* = false, switch, continue")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},'"0.5.0"')," corresponds to ",(0,l.kt)("inlineCode",{parentName:"li"},"* = false, switch, continue, enum")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},'"0.6.0"')," corresponds to ",(0,l.kt)("inlineCode",{parentName:"li"},"* = false, switch, continue, enum, new, class, parent, export")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},'"0.8.0"')," corresponds to ",(0,l.kt)("inlineCode",{parentName:"li"},"* = false, switch, continue, enum, new, class, parent, export, try, catch"))),(0,l.kt)("p",null,"So, writing a portable script that only makes use of Pluto 0.8.0's features requires this at the beginning:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"pluto_use"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"0.8.0"'))))),(0,l.kt)("p",null,"This feature also supports quick encompassing of optional features. So, instead of:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"pluto_use"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"0.8.0"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"global"))))),(0,l.kt)("p",null,"You can use a '+' after the version number to also enable all of the optional features. As of 0.9.0, the only optional feature is ",(0,l.kt)("a",{parentName:"p",href:"New%20Features/Explicit%20Globals"},"explicit globals")," (",(0,l.kt)("inlineCode",{parentName:"p"},"global"),")."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"pluto_use"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"0.9.0+"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- The same as pluto_use "0.9.0", global'))))),(0,l.kt)("p",null,"For module developers and scripts which may be used in future versions of Pluto, we recommend you use ",(0,l.kt)("inlineCode",{parentName:"p"},"pluto_use")," for two reasons:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"Portability.")," This will override the compatibility mode settings compiled into Pluto so your script will be parsed identically in all Pluto environments."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"Proactive compatibility.")," Any keywords added by future versions of Pluto will also be put in compatibility mode by these statements, so in the off-chance your script uses a future reserved keyword as a variable name, it would still parse as you intended when you wrote it.")),(0,l.kt)("h3",{id:"compatible-keywords"},"Compatible Keywords"),(0,l.kt)("p",null,"Another way of using Pluto's features regardless of compatibility mode is by prefixing the keyword with ",(0,l.kt)("inlineCode",{parentName:"p"},"pluto_"),". For example, ",(0,l.kt)("inlineCode",{parentName:"p"},"switch")," becomes ",(0,l.kt)("inlineCode",{parentName:"p"},"pluto_switch"),". These Compatibility Mode variants will always be valid, even when Compatibility Mode is disabled."),(0,l.kt)("p",null,"These are what they look like:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pluto_switch")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pluto_continue")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pluto_enum")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pluto_new")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pluto_class")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pluto_parent")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pluto_export")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pluto_try")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pluto_catch"))),(0,l.kt)("h2",{id:"default-table-metatable"},"Default Table Metatable"),(0,l.kt)("p",null,"This is ",(0,l.kt)("a",{parentName:"p",href:"Runtime%20Environment/Global%20&%20Base#default-metatables"},"a feature in Pluto")," that, by itself, is a benign QoL improvement for developers. However, in combination with our added standard library functions like ",(0,l.kt)("a",{parentName:"p",href:"Runtime%20Environment/Table#tablemin"},"table.min"),", it can be an unexpected semantic change:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"roll"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"opts"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"math"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"random"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(opts"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"min "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"or"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," opts"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"max "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"or"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"100"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"roll"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{ max "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," })"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"pluto: test.pluto:2: bad argument #1 to 'random' (number expected, got function)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"stack traceback:")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," [C]: in function 'math.rand'")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," test.pluto:2: in local 'roll'")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," test.pluto:4: in main chunk"))))),(0,l.kt)("p",null,"Integrators can disable this feature by defining the ",(0,l.kt)("inlineCode",{parentName:"p"},"PLUTO_NO_DEFAULT_TABLE_METATABLE")," macro in their luaconf.h or build config, to aid in a smooth transition, should scripts in their ecosystem require it."),(0,l.kt)("p",null,"Scripters are advised to use ",(0,l.kt)("inlineCode",{parentName:"p"},"rawget")," and/or ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," to better codify their expectations. For example, the example above seems to care only about providing fallback values and not at all about type-checking, so ",(0,l.kt)("inlineCode",{parentName:"p"},"rawget")," would be an excellent fit for it:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"roll"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"opts"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"math"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"random"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"rawget"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(opts"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"min"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"or"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"rawget"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(opts"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"max"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"or"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"100"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"roll"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{ max "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," })"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3d1a2b43.02a7ba7d.js b/assets/js/3d1a2b43.02a7ba7d.js deleted file mode 100644 index 28689d30..00000000 --- a/assets/js/3d1a2b43.02a7ba7d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6100],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),l=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},c=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=l(r),d=o,f=u["".concat(p,".").concat(d)]||u[d]||m[d]||i;return r?n.createElement(f,a(a({ref:t},c),{},{components:r})):n.createElement(f,a({ref:t},c))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=d;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[u]="string"==typeof e?e:o,a[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>m,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var n=r(7462),o=(r(7294),r(3905));const i={},a=void 0,s={unversionedId:"Optimizations/For Loops",id:"Optimizations/For Loops",title:"For Loops",description:"The pairs and ipairs functions are optimized in Pluto. On a consistent basis, pairs & ipairs loops are 3.5x faster than their Lua counterparts.",source:"@site/docs/Optimizations/For Loops.md",sourceDirName:"Optimizations",slug:"/Optimizations/For Loops",permalink:"/docs/Optimizations/For Loops",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Optimizations",permalink:"/docs/category/optimizations"},next:{title:"Jump Table",permalink:"/docs/Optimizations/Jump Table"}},p={},l=[{value:"How does it work?",id:"how-does-it-work",level:2}],c={toc:l},u="wrapper";function m(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"pairs")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"ipairs")," functions are optimized in Pluto. On a consistent basis, ",(0,o.kt)("inlineCode",{parentName:"p"},"pairs")," & ",(0,o.kt)("inlineCode",{parentName:"p"},"ipairs")," loops are ",(0,o.kt)("strong",{parentName:"p"},"3.5x")," faster than their Lua counterparts."),(0,o.kt)("h2",{id:"how-does-it-work"},"How does it work?"),(0,o.kt)("p",null,"It doesn't operate under all circumstances though, the state of the iterator is stored in the to-be-closed variable returned by these functions, which is the last variable they give. If you interact or modify this variable, then the optimization won't occur."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"pairs: next, table, nil, nil")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"ipairs: ipairsaux, table, integer, nil"))))),(0,o.kt)("p",null,"As long as you don't access the last ",(0,o.kt)("inlineCode",{parentName:"p"},"nil")," value, you're fine."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"This optimization was published and implemented entirely by Xmelia Hermit.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3d1a2b43.959e1c7f.js b/assets/js/3d1a2b43.959e1c7f.js new file mode 100644 index 00000000..e6569402 --- /dev/null +++ b/assets/js/3d1a2b43.959e1c7f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6100],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),l=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},c=function(e){var t=l(e.components);return r.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=l(n),d=o,f=u["".concat(p,".").concat(d)]||u[d]||m[d]||i;return n?r.createElement(f,a(a({ref:t},c),{},{components:n})):r.createElement(f,a({ref:t},c))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=d;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[u]="string"==typeof e?e:o,a[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>m,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var r=n(7462),o=(n(7294),n(3905));const i={},a=void 0,s={unversionedId:"Optimizations/For Loops",id:"Optimizations/For Loops",title:"For Loops",description:"The pairs and ipairs functions are optimized in Pluto. On a consistent basis, pairs & ipairs loops are 3.5x faster than their Lua counterparts.",source:"@site/docs/Optimizations/For Loops.md",sourceDirName:"Optimizations",slug:"/Optimizations/For Loops",permalink:"/docs/Optimizations/For Loops",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Optimizations",permalink:"/docs/category/optimizations"},next:{title:"Jump Table",permalink:"/docs/Optimizations/Jump Table"}},p={},l=[{value:"How does it work?",id:"how-does-it-work",level:2}],c={toc:l},u="wrapper";function m(e){let{components:t,...n}=e;return(0,o.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"pairs")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"ipairs")," functions are optimized in Pluto. On a consistent basis, ",(0,o.kt)("inlineCode",{parentName:"p"},"pairs")," & ",(0,o.kt)("inlineCode",{parentName:"p"},"ipairs")," loops are ",(0,o.kt)("strong",{parentName:"p"},"3.5x")," faster than their Lua counterparts."),(0,o.kt)("h2",{id:"how-does-it-work"},"How does it work?"),(0,o.kt)("p",null,"It doesn't operate under all circumstances though, the state of the iterator is stored in the to-be-closed variable returned by these functions, which is the last variable they give. If you interact or modify this variable, then the optimization won't occur."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"pairs: next, table, nil, nil")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"ipairs: ipairsaux, table, integer, nil"))))),(0,o.kt)("p",null,"As long as you don't access the last ",(0,o.kt)("inlineCode",{parentName:"p"},"nil")," value, you're fine."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"This optimization was published and implemented entirely by Xmelia Hermit.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3eb63321.b24a9554.js b/assets/js/3eb63321.b24a9554.js deleted file mode 100644 index 437a90ab..00000000 --- a/assets/js/3eb63321.b24a9554.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5461],{3905:(e,t,o)=>{o.d(t,{Zo:()=>i,kt:()=>N});var a=o(7294);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function l(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var c=a.createContext({}),p=function(e){var t=a.useContext(c),o=t;return e&&(o="function"==typeof e?e(t):l(l({},t),e)),o},i=function(e){var t=p(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},F=a.forwardRef((function(e,t){var o=e.components,r=e.mdxType,n=e.originalType,c=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),d=p(o),F=r,N=d["".concat(c,".").concat(F)]||d[F]||m[F]||n;return o?a.createElement(N,l(l({ref:t},i),{},{components:o})):a.createElement(N,l({ref:t},i))}));function N(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var n=o.length,l=new Array(n);l[0]=F;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:r,l[1]=s;for(var p=2;p{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>p});var a=o(7462),r=(o(7294),o(3905));const n={sidebar_position:1},l=void 0,s={unversionedId:"New Features/For-As Loop",id:"New Features/For-As Loop",title:"For-As Loop",description:"When you only want to iterate over the values of a table, you can use Pluto's for-as syntax.",source:"@site/docs/New Features/For-As Loop.md",sourceDirName:"New Features",slug:"/New Features/For-As Loop",permalink:"/docs/New Features/For-As Loop",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Default Arguments",permalink:"/docs/New Features/Default Arguments"},next:{title:"Named Varargs",permalink:"/docs/New Features/Named Varargs"}},c={},p=[],i={toc:p},d="wrapper";function m(e){let{components:t,...o}=e;return(0,r.kt)(d,(0,a.Z)({},i,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"When you only want to iterate over the values of a table, you can use Pluto's for-as syntax."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"New Code"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"New Code"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"world"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"as"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(value)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 1")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 2")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- hello")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- world"))))),(0,r.kt)("p",null,"That code is identical to this:"),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Old Code"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Old Code"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"world"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," _"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"in"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(value)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"The bytecode of this feature is only backwards-compatible with Lua when ",(0,r.kt)("inlineCode",{parentName:"p"},"pairs"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"ipairs"),", or ",(0,r.kt)("inlineCode",{parentName:"p"},"next")," is used. See ",(0,r.kt)("a",{parentName:"p",href:"/docs/QoL%20Improvements/Generalized%20Iteration"},"Generalized Iteration"),".")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3eb63321.cce17633.js b/assets/js/3eb63321.cce17633.js new file mode 100644 index 00000000..ff2afc4b --- /dev/null +++ b/assets/js/3eb63321.cce17633.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5461],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>N});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var p=r.createContext({}),i=function(e){var t=r.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=i(e.components);return r.createElement(p.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=i(a),F=n,N=d["".concat(p,".").concat(F)]||d[F]||m[F]||o;return a?r.createElement(N,l(l({ref:t},c),{},{components:a})):r.createElement(N,l({ref:t},c))}));function N(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=F;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[d]="string"==typeof e?e:n,l[1]=s;for(var i=2;i{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>i});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:1},l=void 0,s={unversionedId:"New Features/For-As Loop",id:"New Features/For-As Loop",title:"For-As Loop",description:"When you only want to iterate over the values of a table, you can use Pluto's for-as syntax.",source:"@site/docs/New Features/For-As Loop.md",sourceDirName:"New Features",slug:"/New Features/For-As Loop",permalink:"/docs/New Features/For-As Loop",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Default Arguments",permalink:"/docs/New Features/Default Arguments"},next:{title:"Named Varargs",permalink:"/docs/New Features/Named Varargs"}},p={},i=[],c={toc:i},d="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"When you only want to iterate over the values of a table, you can use Pluto's for-as syntax."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"New Code"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"New Code"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"world"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"as"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(value)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 1")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 2")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 3")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- hello")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- world"))))),(0,n.kt)("p",null,"That code is identical to this:"),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Old Code"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Old Code"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"world"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," _"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"in"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(value)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"The bytecode of this feature is only backwards-compatible with Lua when ",(0,n.kt)("inlineCode",{parentName:"p"},"pairs"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"ipairs"),", or ",(0,n.kt)("inlineCode",{parentName:"p"},"next")," is used. See ",(0,n.kt)("a",{parentName:"p",href:"/docs/QoL%20Improvements/Generalized%20Iteration"},"Generalized Iteration"),".")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/413eb15f.2ed0e9d4.js b/assets/js/413eb15f.2ed0e9d4.js deleted file mode 100644 index 0f252b7e..00000000 --- a/assets/js/413eb15f.2ed0e9d4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5181],{3905:(e,a,t)=>{t.d(a,{Zo:()=>p,kt:()=>k});var o=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);a&&(o=o.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,o)}return t}function n(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var c=o.createContext({}),i=function(e){var a=o.useContext(c),t=a;return e&&(t="function"==typeof e?e(a):n(n({},a),e)),t},p=function(e){var a=i(e.components);return o.createElement(c.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return o.createElement(o.Fragment,{},a)}},F=o.forwardRef((function(e,a){var t=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=i(t),F=r,k=d["".concat(c,".").concat(F)]||d[F]||m[F]||l;return t?o.createElement(k,n(n({ref:a},p),{},{components:t})):o.createElement(k,n({ref:a},p))}));function k(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var l=t.length,n=new Array(l);n[0]=F;var s={};for(var c in a)hasOwnProperty.call(a,c)&&(s[c]=a[c]);s.originalType=e,s[d]="string"==typeof e?e:r,n[1]=s;for(var i=2;i{t.r(a),t.d(a,{assets:()=>c,contentTitle:()=>n,default:()=>m,frontMatter:()=>l,metadata:()=>s,toc:()=>i});var o=t(7462),r=(t(7294),t(3905));const l={sidebar_position:2},n=void 0,s={unversionedId:"New Features/Destructuring",id:"New Features/Destructuring",title:"Destructuring",description:"Destructuring is a better way to assign local variables from expressions that return a table.",source:"@site/docs/New Features/Destructuring.md",sourceDirName:"New Features",slug:"/New Features/Destructuring",permalink:"/docs/New Features/Destructuring",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Compile-Time Evaluation",permalink:"/docs/New Features/Compile-Time Evaluation"},next:{title:"Enumerations",permalink:"/docs/New Features/Enumerations"}},c={},i=[{value:"Array destructuring",id:"array-destructuring",level:2},{value:"Table destructuring",id:"table-destructuring",level:2},{value:"Different variable name",id:"different-variable-name",level:3},{value:"Standard Library",id:"standard-library",level:3}],p={toc:i},d="wrapper";function m(e){let{components:a,...t}=e;return(0,r.kt)(d,(0,o.Z)({},p,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Destructuring is a better way to assign local variables from expressions that return a table."),(0,r.kt)("h2",{id:"array-destructuring"},"Array destructuring"),(0,r.kt)("p",null,"Assuming we have this table:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"6"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"9"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }"))))),(0,r.kt)("p",null,"This is how we would assign each value to variables called ",(0,r.kt)("inlineCode",{parentName:"p"},"a"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"b"),", and ",(0,r.kt)("inlineCode",{parentName:"p"},"c")," using the Lua and Pluto ways:"),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Lua way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Lua way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," c "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"table"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"unpack"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t)"))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Pluto way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Pluto way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," [a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," c] "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"))))),(0,r.kt)("h2",{id:"table-destructuring"},"Table destructuring"),(0,r.kt)("p",null,"Assuming we have this table:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"John"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," age "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}"))))),(0,r.kt)("p",null,"This is how we would assign each field to a variable of the same name using the Lua and Pluto ways:"),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Lua way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Lua way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," age "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"age"))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Pluto way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Pluto way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { name"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," age } "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"))))),(0,r.kt)("h3",{id:"different-variable-name"},"Different variable name"),(0,r.kt)("p",null,"Assuming we have the same table as above, this is how we'd assign the ",(0,r.kt)("inlineCode",{parentName:"p"},"name")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"age")," fields to ",(0,r.kt)("inlineCode",{parentName:"p"},"n")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"a")," variables, respectively, using the Lua and Pluto ways:"),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Lua way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Lua way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," n "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"age"))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Pluto way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Pluto way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { n "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," age } "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"))))),(0,r.kt)("h3",{id:"standard-library"},"Standard Library"),(0,r.kt)("p",null,"Table destructuring can be used to require multiple standard library modules at once using the '","*","' module:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { base64"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," json } "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"*"'))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/413eb15f.40ef8433.js b/assets/js/413eb15f.40ef8433.js new file mode 100644 index 00000000..dc546f2b --- /dev/null +++ b/assets/js/413eb15f.40ef8433.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5181],{3905:(e,a,t)=>{t.d(a,{Zo:()=>c,kt:()=>k});var r=t(7294);function n(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var a=1;a=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var i=r.createContext({}),p=function(e){var a=r.useContext(i),t=a;return e&&(t="function"==typeof e?e(a):o(o({},a),e)),t},c=function(e){var a=p(e.components);return r.createElement(i.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},F=r.forwardRef((function(e,a){var t=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(t),F=n,k=d["".concat(i,".").concat(F)]||d[F]||m[F]||l;return t?r.createElement(k,o(o({ref:a},c),{},{components:t})):r.createElement(k,o({ref:a},c))}));function k(e,a){var t=arguments,n=a&&a.mdxType;if("string"==typeof e||n){var l=t.length,o=new Array(l);o[0]=F;var s={};for(var i in a)hasOwnProperty.call(a,i)&&(s[i]=a[i]);s.originalType=e,s[d]="string"==typeof e?e:n,o[1]=s;for(var p=2;p{t.r(a),t.d(a,{assets:()=>i,contentTitle:()=>o,default:()=>m,frontMatter:()=>l,metadata:()=>s,toc:()=>p});var r=t(7462),n=(t(7294),t(3905));const l={sidebar_position:2},o=void 0,s={unversionedId:"New Features/Destructuring",id:"New Features/Destructuring",title:"Destructuring",description:"Destructuring is a better way to assign local variables from expressions that return a table.",source:"@site/docs/New Features/Destructuring.md",sourceDirName:"New Features",slug:"/New Features/Destructuring",permalink:"/docs/New Features/Destructuring",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Compile-Time Evaluation",permalink:"/docs/New Features/Compile-Time Evaluation"},next:{title:"Enumerations",permalink:"/docs/New Features/Enumerations"}},i={},p=[{value:"Array destructuring",id:"array-destructuring",level:2},{value:"Table destructuring",id:"table-destructuring",level:2},{value:"Different variable name",id:"different-variable-name",level:3},{value:"Standard Library",id:"standard-library",level:3}],c={toc:p},d="wrapper";function m(e){let{components:a,...t}=e;return(0,n.kt)(d,(0,r.Z)({},c,t,{components:a,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Destructuring is a better way to assign local variables from expressions that return a table."),(0,n.kt)("h2",{id:"array-destructuring"},"Array destructuring"),(0,n.kt)("p",null,"Assuming we have this table:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"6"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"9"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }"))))),(0,n.kt)("p",null,"This is how we would assign each value to variables called ",(0,n.kt)("inlineCode",{parentName:"p"},"a"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"b"),", and ",(0,n.kt)("inlineCode",{parentName:"p"},"c")," using the Lua and Pluto ways:"),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Lua way"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Lua way"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," c "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"table"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"unpack"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t)"))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Pluto way"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Pluto way"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," [a"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," c] "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"))))),(0,n.kt)("h2",{id:"table-destructuring"},"Table destructuring"),(0,n.kt)("p",null,"Assuming we have this table:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"John"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," age "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}"))))),(0,n.kt)("p",null,"This is how we would assign each field to a variable of the same name using the Lua and Pluto ways:"),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Lua way"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Lua way"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," age "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"age"))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Pluto way"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Pluto way"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { name"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," age } "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"))))),(0,n.kt)("h3",{id:"different-variable-name"},"Different variable name"),(0,n.kt)("p",null,"Assuming we have the same table as above, this is how we'd assign the ",(0,n.kt)("inlineCode",{parentName:"p"},"name")," and ",(0,n.kt)("inlineCode",{parentName:"p"},"age")," fields to ",(0,n.kt)("inlineCode",{parentName:"p"},"n")," and ",(0,n.kt)("inlineCode",{parentName:"p"},"a")," variables, respectively, using the Lua and Pluto ways:"),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Lua way"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Lua way"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," n "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"age"))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Pluto way"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Pluto way"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { n "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," age } "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"))))),(0,n.kt)("h3",{id:"standard-library"},"Standard Library"),(0,n.kt)("p",null,"Table destructuring can be used to require multiple standard library modules at once using the '","*","' module:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { base64"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," json } "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"*"'))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/41586035.7b46d7d7.js b/assets/js/41586035.7b46d7d7.js new file mode 100644 index 00000000..5ce288b9 --- /dev/null +++ b/assets/js/41586035.7b46d7d7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8452],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>N});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},F=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(a),F=r,N=d["".concat(s,".").concat(F)]||d[F]||m[F]||o;return a?n.createElement(N,i(i({ref:t},p),{},{components:a})):n.createElement(N,i({ref:t},p))}));function N(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,i=new Array(o);i[0]=F;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:r,i[1]=l;for(var c=2;c{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var n=a(7462),r=(a(7294),a(3905));const o={sidebar_position:2},i=void 0,l={unversionedId:"New Features/Nodiscard Functions",id:"New Features/Nodiscard Functions",title:"Nodiscard Functions",description:"Functions can be declared nodiscard, causing a warning to be raised when the return value is discarded:",source:"@site/docs/New Features/Nodiscard Functions.md",sourceDirName:"New Features",slug:"/New Features/Nodiscard Functions",permalink:"/docs/New Features/Nodiscard Functions",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Named Arguments",permalink:"/docs/New Features/Named Arguments"},next:{title:"Safe Navigation",permalink:"/docs/New Features/Safe Navigation"}},s={},c=[],p={toc:c},d="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(d,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Functions can be declared nodiscard, causing a warning to be raised when the return value is discarded:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:5: warning: discarding return value of function declared '' [discarded-return]")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"undefined"}}," 5 | add(1, 2)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^^^^^ here"))))),(0,r.kt)("p",null,"This can also be combined with ",(0,r.kt)("a",{parentName:"p",href:"Type%20Hinting"},"type hints"),":"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"number"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"number"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"number ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"The warning coverage is currently limited to local functions.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/41586035.da392211.js b/assets/js/41586035.da392211.js deleted file mode 100644 index dcb84648..00000000 --- a/assets/js/41586035.da392211.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8452],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>N});var a=o(7294);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function l(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var i=a.createContext({}),s=function(e){var t=a.useContext(i),o=t;return e&&(o="function"==typeof e?e(t):l(l({},t),e)),o},p=function(e){var t=s(e.components);return a.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},F=a.forwardRef((function(e,t){var o=e.components,r=e.mdxType,n=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=s(o),F=r,N=d["".concat(i,".").concat(F)]||d[F]||m[F]||n;return o?a.createElement(N,l(l({ref:t},p),{},{components:o})):a.createElement(N,l({ref:t},p))}));function N(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var n=o.length,l=new Array(n);l[0]=F;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[d]="string"==typeof e?e:r,l[1]=c;for(var s=2;s{o.r(t),o.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>n,metadata:()=>c,toc:()=>s});var a=o(7462),r=(o(7294),o(3905));const n={sidebar_position:2},l=void 0,c={unversionedId:"New Features/Nodiscard Functions",id:"New Features/Nodiscard Functions",title:"Nodiscard Functions",description:"Functions can be declared nodiscard, causing a warning to be raised when the return value is discarded:",source:"@site/docs/New Features/Nodiscard Functions.md",sourceDirName:"New Features",slug:"/New Features/Nodiscard Functions",permalink:"/docs/New Features/Nodiscard Functions",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Named Arguments",permalink:"/docs/New Features/Named Arguments"},next:{title:"Safe Navigation",permalink:"/docs/New Features/Safe Navigation"}},i={},s=[],p={toc:s},d="wrapper";function m(e){let{components:t,...o}=e;return(0,r.kt)(d,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Functions can be declared nodiscard, causing a warning to be raised when the return value is discarded:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:5: warning: discarding return value of function declared '' [discarded-return]")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," 5 | add(1, 2)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^^^^^ here"))))),(0,r.kt)("p",null,"This can also be combined with ",(0,r.kt)("a",{parentName:"p",href:"Type%20Hinting"},"type hints"),":"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"number"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"number"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"number ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"The warning coverage is currently limited to local functions.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4dbc4eab.010cb1bf.js b/assets/js/4dbc4eab.010cb1bf.js new file mode 100644 index 00000000..7a820561 --- /dev/null +++ b/assets/js/4dbc4eab.010cb1bf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[7437],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>F});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),p=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},v=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(a),v=n,F=d["".concat(i,".").concat(v)]||d[v]||m[v]||o;return a?r.createElement(F,s(s({ref:t},c),{},{components:a})):r.createElement(F,s({ref:t},c))}));function F(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,s=new Array(o);s[0]=v;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[d]="string"==typeof e?e:n,s[1]=l;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=a(7462),n=(a(7294),a(3905));const o={},s=void 0,l={unversionedId:"QoL Improvements/Reserved Identifiers",id:"QoL Improvements/Reserved Identifiers",title:"Reserved Identifiers",description:"Pluto allows you to use reserved tokens such as if from Lua and class from Pluto as identifiers with shorthand table syntax and for goto labels.",source:"@site/docs/QoL Improvements/Reserved Identifiers.md",sourceDirName:"QoL Improvements",slug:"/QoL Improvements/Reserved Identifiers",permalink:"/docs/QoL Improvements/Reserved Identifiers",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Removed Locals Limit",permalink:"/docs/QoL Improvements/Removed Locals Limit"},next:{title:"Syntax Errors",permalink:"/docs/QoL Improvements/Syntax Errors"}},i={},p=[],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Pluto allows you to use reserved tokens such as ",(0,n.kt)("inlineCode",{parentName:"p"},"if")," from Lua and ",(0,n.kt)("inlineCode",{parentName:"p"},"class")," from Pluto as identifiers with shorthand table syntax and for goto labels."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Reserved tokens as identifiers with shorthand table syntax"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Reserved tokens as identifiers with shorthand table syntax"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"key"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"class)"))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Reserved tokens as identifiers for goto labels"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Reserved tokens as identifiers for goto labels"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Print every number besides five.")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"goto"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," continue")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(i)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ::continue::")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("p",null,"However, variable names and function calls will not allow you to use reserved tokens as identifiers."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4dbc4eab.87c01e61.js b/assets/js/4dbc4eab.87c01e61.js deleted file mode 100644 index 91eebdf2..00000000 --- a/assets/js/4dbc4eab.87c01e61.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[7437],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>F});var o=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=o.createContext({}),c=function(e){var t=o.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=c(e.components);return o.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},v=o.forwardRef((function(e,t){var r=e.components,a=e.mdxType,n=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(r),v=a,F=d["".concat(i,".").concat(v)]||d[v]||m[v]||n;return r?o.createElement(F,l(l({ref:t},p),{},{components:r})):o.createElement(F,l({ref:t},p))}));function F(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var n=r.length,l=new Array(n);l[0]=v;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:a,l[1]=s;for(var c=2;c{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>c});var o=r(7462),a=(r(7294),r(3905));const n={},l=void 0,s={unversionedId:"QoL Improvements/Reserved Identifiers",id:"QoL Improvements/Reserved Identifiers",title:"Reserved Identifiers",description:"Pluto allows you to use reserved tokens such as if from Lua and class from Pluto as identifiers with shorthand table syntax and for goto labels.",source:"@site/docs/QoL Improvements/Reserved Identifiers.md",sourceDirName:"QoL Improvements",slug:"/QoL Improvements/Reserved Identifiers",permalink:"/docs/QoL Improvements/Reserved Identifiers",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Removed Locals Limit",permalink:"/docs/QoL Improvements/Removed Locals Limit"},next:{title:"Syntax Errors",permalink:"/docs/QoL Improvements/Syntax Errors"}},i={},c=[],p={toc:c},d="wrapper";function m(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,o.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Pluto allows you to use reserved tokens such as ",(0,a.kt)("inlineCode",{parentName:"p"},"if")," from Lua and ",(0,a.kt)("inlineCode",{parentName:"p"},"class")," from Pluto as identifiers with shorthand table syntax and for goto labels."),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Reserved tokens as identifiers with shorthand table syntax"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Reserved tokens as identifiers with shorthand table syntax"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"key"')),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"class)"))))),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Reserved tokens as identifiers for goto labels"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Reserved tokens as identifiers for goto labels"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Print every number besides five.")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"goto"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," continue")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(i)")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ::continue::")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,a.kt)("p",null,"However, variable names and function calls will not allow you to use reserved tokens as identifiers."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/54c50845.7f6f2d87.js b/assets/js/54c50845.7f6f2d87.js deleted file mode 100644 index dd5df618..00000000 --- a/assets/js/54c50845.7f6f2d87.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6705],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>N});var a=o(7294);function l(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function n(e){for(var t=1;t=0||(l[o]=e[o]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(l[o]=e[o])}return l}var c=a.createContext({}),i=function(e){var t=a.useContext(c),o=t;return e&&(o="function"==typeof e?e(t):n(n({},t),e)),o},p=function(e){var t=i(e.components);return a.createElement(c.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},F=a.forwardRef((function(e,t){var o=e.components,l=e.mdxType,r=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),m=i(o),F=l,N=m["".concat(c,".").concat(F)]||m[F]||d[F]||r;return o?a.createElement(N,n(n({ref:t},p),{},{components:o})):a.createElement(N,n({ref:t},p))}));function N(e,t){var o=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var r=o.length,n=new Array(r);n[0]=F;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[m]="string"==typeof e?e:l,n[1]=s;for(var i=2;i{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>n,default:()=>d,frontMatter:()=>r,metadata:()=>s,toc:()=>i});var a=o(7462),l=(o(7294),o(3905));const r={sidebar_position:3},n=void 0,s={unversionedId:"New Features/Object-Oriented Programming",id:"New Features/Object-Oriented Programming",title:"Object-Oriented Programming",description:"Pluto makes a plethora of improvements when it comes to object-oriented programming.",source:"@site/docs/New Features/Object-Oriented Programming.md",sourceDirName:"New Features",slug:"/New Features/Object-Oriented Programming",permalink:"/docs/New Features/Object-Oriented Programming",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Try-Catch Statement",permalink:"/docs/New Features/Try-Catch Statement"},next:{title:"QoL Improvements",permalink:"/docs/category/qol-improvements"}},c={},i=[{value:"Method Creation",id:"method-creation",level:2},{value:"Static Functions",id:"static-functions",level:2},{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"New Operator",id:"new-operator",level:2},{value:"Try It Yourself",id:"try-it-yourself-1",level:4},{value:"Class Statement",id:"class-statement",level:2},{value:"Class Expression",id:"class-expression",level:3},{value:"Extends",id:"extends",level:3},{value:"Try It Yourself",id:"try-it-yourself-2",level:4},{value:"Parent Expression",id:"parent-expression",level:2},{value:"Try It Yourself",id:"try-it-yourself-3",level:4},{value:"Private Fields",id:"private-fields",level:2},{value:"Try It Yourself",id:"try-it-yourself-4",level:4},{value:"Constructor Promotion",id:"constructor-promotion",level:2},{value:"Try It Yourself",id:"try-it-yourself-5",level:4},{value:"Instanceof Operator",id:"instanceof-operator",level:2},{value:"Try It Yourself",id:"try-it-yourself-6",level:4},{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],p={toc:i},m="wrapper";function d(e){let{components:t,...o}=e;return(0,l.kt)(m,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Pluto makes a plethora of improvements when it comes to object-oriented programming."),(0,l.kt)("h2",{id:"method-creation"},"Method Creation"),(0,l.kt)("p",null,"A series of methods was otherwise ugly to implement into a Lua table."),(0,l.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Old Code"},(0,l.kt)("div",{parentName:"pre",className:"code-title"},"Old Code"),(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {}")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"f1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"..."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"f2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"..."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"f3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"..."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("p",null,"Now, you can inline these statements inside of your table."),(0,l.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"New Code"},(0,l.kt)("div",{parentName:"pre",className:"code-title"},"New Code"),(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"f1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"f2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"f3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}"))))),(0,l.kt)("p",null,"This automatically marks the functions as methods."),(0,l.kt)("admonition",{type:"caution"},(0,l.kt)("p",{parentName:"admonition"},"Keep in mind, this produces ",(0,l.kt)("em",{parentName:"p"},"methods"),", meaning you'll need to use the colon invocation syntax to avoid positional ambiguities in your parameters.")),(0,l.kt)("h2",{id:"static-functions"},"Static Functions"),(0,l.kt)("p",null,"For consistency with the above syntax, you can use 'static function' to declare non-method functions in your tables:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"static"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"msg"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(msg)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "Hello"'))))),(0,l.kt)("h4",{id:"try-it-yourself"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20t%20%3D%20%7B%0D%0A%20%20%20%20static%20function%20say(msg)%0D%0A%20%20%20%20%20%20%20%20print(msg)%0D%0A%20%20%20%20end%0D%0A%7D%0D%0At.say(%22Hello%22)%20--%20%22Hello%22"},"Try It Yourself")),(0,l.kt)("h2",{id:"new-operator"},"New Operator"),(0,l.kt)("p",null,"Pluto adds an easy way to make instances with the ",(0,l.kt)("inlineCode",{parentName:"p"},"new")," operator. This operator will also call the ",(0,l.kt)("inlineCode",{parentName:"p"},"__construct")," method if it exists."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," Human "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," john "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(john"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- John"))))),(0,l.kt)("h4",{id:"try-it-yourself-1"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20Human%20%3D%20%7B%0D%0A%20%20%20%20function%20__construct(name)%0D%0A%20%20%20%20%20%20%20%20self.name%20%3D%20name%0D%0A%20%20%20%20end%0D%0A%7D%0D%0Alocal%20john%20%3D%20new%20Human(%22John%22)%0D%0Aprint(john.name)%20--%20John"},"Try It Yourself")),(0,l.kt)("p",null,"Note that for compatibility with Lua and C API classes, the ",(0,l.kt)("inlineCode",{parentName:"p"},"new")," operator checks for the existence of a static 'new' function. If it exists, ",(0,l.kt)("inlineCode",{parentName:"p"},"new X(...)")," will be identical to ",(0,l.kt)("inlineCode",{parentName:"p"},"X.new(...)"),"."),(0,l.kt)("h2",{id:"class-statement"},"Class Statement"),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"class")," statement is similar to a table constructor, but it does not require commas or semicolons:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"Human")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"__gc"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" died of irrelevance"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," john "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,l.kt)("p",null,"The class statement also supports modifiers: ",(0,l.kt)("inlineCode",{parentName:"p"},"local class NAME"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"export class NAME")),(0,l.kt)("h3",{id:"class-expression"},"Class Expression"),(0,l.kt)("p",null,"There is also a ",(0,l.kt)("inlineCode",{parentName:"p"},"class")," expression, which can be used e.g. when assigning to a variable:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," Human "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("h3",{id:"extends"},"Extends"),(0,l.kt)("p",null,"The class statement also supports ",(0,l.kt)("inlineCode",{parentName:"p"},"extends")," to specify a parent:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"Entity")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," age "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"extends"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",fontStyle:"italic",textDecoration:"underline"}},"Entity")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," human "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"age) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 1"))))),(0,l.kt)("p",null,"This also adds a ",(0,l.kt)("inlineCode",{parentName:"p"},"__parent")," field to Human."),(0,l.kt)("h4",{id:"try-it-yourself-2"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=class%20Entity%0D%0A%20%20%20%20age%20%3D%201%0D%0Aend%0D%0A%0D%0Aclass%20Human%20extends%20Entity%0D%0Aend%0D%0A%0D%0Alocal%20human%20%3D%20new%20Human()%0D%0Aprint(human.age)%20--%201"},"Try It Yourself")),(0,l.kt)("h2",{id:"parent-expression"},"Parent Expression"),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"parent")," expression is a shorthand for ",(0,l.kt)("inlineCode",{parentName:"p"},"self.__parent"),", which also supports method call syntax, in which case it's a shorthand for ",(0,l.kt)("inlineCode",{parentName:"p"},"self.__parent.METHOD(self, ...)"),"."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"Entity")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"extends"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",fontStyle:"italic",textDecoration:"underline"}},"Entity")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- If we don't define __construct, the parent-constructor would be called automatically.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- However, if we overwrite it, we can use parent:__construct to call it manually.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"parent"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(name)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," human "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "John"'))))),(0,l.kt)("p",null,'Note that if you have a local variable (or function parameter) called "parent", the ',(0,l.kt)("inlineCode",{parentName:"p"},"parent")," expression will defer to it."),(0,l.kt)("h4",{id:"try-it-yourself-3"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=class%20Entity%0D%0A%20%20%20%20function%20__construct(name)%0D%0A%20%20%20%20%20%20%20%20self.name%20%3D%20name%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Aclass%20Human%20extends%20Entity%0D%0A%20%20%20%20--%20If%20we%20don't%20define%20__construct%2C%20the%20parent-constructor%20would%20be%20called%20automatically.%0D%0A%20%20%20%20--%20However%2C%20if%20we%20overwrite%20it%2C%20we%20can%20use%20parent%3A__construct%20to%20call%20it%20manually.%0D%0A%20%20%20%20function%20__construct(name)%0D%0A%20%20%20%20%20%20%20%20parent%3A__construct(name)%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Alocal%20human%20%3D%20new%20Human(%22John%22)%0D%0Aprint(human.name)%20--%20%22John%22"},"Try It Yourself")),(0,l.kt)("h2",{id:"private-fields"},"Private Fields"),(0,l.kt)("p",null,"Pluto allows you to specify if a field is 'public' or 'private'. Private fields can only be accessed by the class that defined them."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"Human")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"public"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"private"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," age")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"age"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"age "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," age")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"getAge"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"age")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," human "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "John"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"getAge"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 42")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"age) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- nil"))))),(0,l.kt)("h4",{id:"try-it-yourself-4"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=class%20Human%0D%0A%20%20%20%20public%20name%0D%0A%20%20%20%20private%20age%0D%0A%0D%0A%20%20%20%20function%20__construct(name%2C%20age)%0D%0A%20%20%20%20%20%20%20%20self.name%20%3D%20name%0D%0A%20%20%20%20%20%20%20%20self.age%20%3D%20age%0D%0A%20%20%20%20end%0D%0A%0D%0A%20%20%20%20function%20getAge()%0D%0A%20%20%20%20%20%20%20%20return%20self.age%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Alocal%20human%20%3D%20new%20Human(%22John%22%2C%2042)%0D%0Aprint(human.name)%20--%20%22John%22%0D%0Aprint(human%3AgetAge())%20--%2042%0D%0Aprint(human.age)%20--%20nil"},"Try It Yourself")),(0,l.kt)("h2",{id:"constructor-promotion"},"Constructor Promotion"),(0,l.kt)("p",null,"Because a common task of ",(0,l.kt)("inlineCode",{parentName:"p"},"__construct")," methods is to assign the value of arguments to table fields, Pluto provides a simple syntax to reduce this boilerplate:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"Human")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"public "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"private "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"age"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"getAge"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"age")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," human "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "John"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"getAge"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 42")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"age) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- nil"))))),(0,l.kt)("h4",{id:"try-it-yourself-5"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=class%20Human%0D%0A%20%20%20%20function%20__construct(public%20name%2C%20private%20age)%0D%0A%20%20%20%20end%0D%0A%0D%0A%20%20%20%20function%20getAge()%0D%0A%20%20%20%20%20%20%20%20return%20self.age%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Alocal%20human%20%3D%20new%20Human(%22John%22%2C%2042)%0D%0Aprint(human.name)%20--%20%22John%22%0D%0Aprint(human%3AgetAge())%20--%2042%0D%0Aprint(human.age)%20--%20nil"},"Try It Yourself")),(0,l.kt)("h2",{id:"instanceof-operator"},"Instanceof Operator"),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"instanceof")," operator can be used to check if a table is a class instance, including inherited classes:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"extends"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",fontStyle:"italic",textDecoration:"underline"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," e "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," h "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(e "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"instanceof"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- true")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(e "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"instanceof"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- false")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(h "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"instanceof"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- true (by inheritance)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(h "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"instanceof"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- true"))))),(0,l.kt)("p",null,"It can also be used as a function:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," e "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"instanceof"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(e"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," Entity)) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- true"))))),(0,l.kt)("h4",{id:"try-it-yourself-6"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=class%20Entity%20end%0D%0Aclass%20Human%20extends%20Entity%20end%0D%0A%0D%0Alocal%20e%20%3D%20new%20Entity()%0D%0Alocal%20h%20%3D%20new%20Human()%0D%0A%0D%0Aprint(e%20instanceof%20Entity)%20--%20true%0D%0Aprint(e%20instanceof%20Human)%20--%20false%0D%0Aprint(h%20instanceof%20Entity)%20--%20true%20(by%20inheritance)%0D%0Aprint(h%20instanceof%20Human)%20--%20true%0D%0A%0D%0Aprint(instanceof(e%2C%20Entity))%20--%20true%0D%0A"},"Try It Yourself")),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Note that, while the instanceof operator generates Lua-compatible bytecode, the instanceof function is a part of Pluto's standard library, and hence unavailable under Lua.")),(0,l.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,l.kt)("p",null,"Some of the syntax discussed here may be different due to compatiblity mode:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"new")," -> ",(0,l.kt)("inlineCode",{parentName:"li"},"pluto_new")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"class")," -> ",(0,l.kt)("inlineCode",{parentName:"li"},"pluto_class")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"parent")," -> ",(0,l.kt)("inlineCode",{parentName:"li"},"pluto_parent"))),(0,l.kt)("p",null,"Alternatively, ",(0,l.kt)("inlineCode",{parentName:"p"},"pluto_use new, class, parent")," will enable these keywords independently of environment settings."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/54c50845.d7bad467.js b/assets/js/54c50845.d7bad467.js new file mode 100644 index 00000000..213e9985 --- /dev/null +++ b/assets/js/54c50845.d7bad467.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6705],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>N});var n=a(7294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var i=n.createContext({}),p=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(i.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},F=n.forwardRef((function(e,t){var a=e.components,l=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=p(a),F=l,N=m["".concat(i,".").concat(F)]||m[F]||d[F]||o;return a?n.createElement(N,r(r({ref:t},c),{},{components:a})):n.createElement(N,r({ref:t},c))}));function N(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var o=a.length,r=new Array(o);r[0]=F;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[m]="string"==typeof e?e:l,r[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var n=a(7462),l=(a(7294),a(3905));const o={sidebar_position:3},r=void 0,s={unversionedId:"New Features/Object-Oriented Programming",id:"New Features/Object-Oriented Programming",title:"Object-Oriented Programming",description:"Pluto makes a plethora of improvements when it comes to object-oriented programming.",source:"@site/docs/New Features/Object-Oriented Programming.md",sourceDirName:"New Features",slug:"/New Features/Object-Oriented Programming",permalink:"/docs/New Features/Object-Oriented Programming",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Try-Catch Statement",permalink:"/docs/New Features/Try-Catch Statement"},next:{title:"QoL Improvements",permalink:"/docs/category/qol-improvements"}},i={},p=[{value:"Method Creation",id:"method-creation",level:2},{value:"Static Functions",id:"static-functions",level:2},{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"New Operator",id:"new-operator",level:2},{value:"Try It Yourself",id:"try-it-yourself-1",level:4},{value:"Class Statement",id:"class-statement",level:2},{value:"Class Expression",id:"class-expression",level:3},{value:"Extends",id:"extends",level:3},{value:"Try It Yourself",id:"try-it-yourself-2",level:4},{value:"Parent Expression",id:"parent-expression",level:2},{value:"Try It Yourself",id:"try-it-yourself-3",level:4},{value:"Private Fields",id:"private-fields",level:2},{value:"Try It Yourself",id:"try-it-yourself-4",level:4},{value:"Constructor Promotion",id:"constructor-promotion",level:2},{value:"Try It Yourself",id:"try-it-yourself-5",level:4},{value:"Instanceof Operator",id:"instanceof-operator",level:2},{value:"Try It Yourself",id:"try-it-yourself-6",level:4},{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],c={toc:p},m="wrapper";function d(e){let{components:t,...a}=e;return(0,l.kt)(m,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Pluto makes a plethora of improvements when it comes to object-oriented programming."),(0,l.kt)("h2",{id:"method-creation"},"Method Creation"),(0,l.kt)("p",null,"A series of methods was otherwise ugly to implement into a Lua table."),(0,l.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Old Code"},(0,l.kt)("div",{parentName:"pre",className:"code-title"},"Old Code"),(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {}")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"f1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"..."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"f2"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"..."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"f3"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"..."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("p",null,"Now, you can inline these statements inside of your table."),(0,l.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"New Code"},(0,l.kt)("div",{parentName:"pre",className:"code-title"},"New Code"),(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"f1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"f2"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"f3"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}"))))),(0,l.kt)("p",null,"This automatically marks the functions as methods."),(0,l.kt)("admonition",{type:"caution"},(0,l.kt)("p",{parentName:"admonition"},"Keep in mind, this produces ",(0,l.kt)("em",{parentName:"p"},"methods"),", meaning you'll need to use the colon invocation syntax to avoid positional ambiguities in your parameters.")),(0,l.kt)("h2",{id:"static-functions"},"Static Functions"),(0,l.kt)("p",null,"For consistency with the above syntax, you can use 'static function' to declare non-method functions in your tables:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"static"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"msg"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(msg)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"t"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "Hello"'))))),(0,l.kt)("h4",{id:"try-it-yourself"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20t%20%3D%20%7B%0D%0A%20%20%20%20static%20function%20say(msg)%0D%0A%20%20%20%20%20%20%20%20print(msg)%0D%0A%20%20%20%20end%0D%0A%7D%0D%0At.say(%22Hello%22)%20--%20%22Hello%22"},"Try It Yourself")),(0,l.kt)("h2",{id:"new-operator"},"New Operator"),(0,l.kt)("p",null,"Pluto adds an easy way to make instances with the ",(0,l.kt)("inlineCode",{parentName:"p"},"new")," operator. This operator will also call the ",(0,l.kt)("inlineCode",{parentName:"p"},"__construct")," method if it exists."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," Human "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," john "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(john"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- John"))))),(0,l.kt)("h4",{id:"try-it-yourself-1"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20Human%20%3D%20%7B%0D%0A%20%20%20%20function%20__construct(name)%0D%0A%20%20%20%20%20%20%20%20self.name%20%3D%20name%0D%0A%20%20%20%20end%0D%0A%7D%0D%0Alocal%20john%20%3D%20new%20Human(%22John%22)%0D%0Aprint(john.name)%20--%20John"},"Try It Yourself")),(0,l.kt)("p",null,"Note that for compatibility with Lua and C API classes, the ",(0,l.kt)("inlineCode",{parentName:"p"},"new")," operator checks for the existence of a static 'new' function. If it exists, ",(0,l.kt)("inlineCode",{parentName:"p"},"new X(...)")," will be identical to ",(0,l.kt)("inlineCode",{parentName:"p"},"X.new(...)"),"."),(0,l.kt)("h2",{id:"class-statement"},"Class Statement"),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"class")," statement is similar to a table constructor, but it does not require commas or semicolons:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"Human")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"__gc"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" died of irrelevance"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," john "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("p",null,"The class statement also supports modifiers: ",(0,l.kt)("inlineCode",{parentName:"p"},"local class NAME"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"export class NAME")),(0,l.kt)("h3",{id:"class-expression"},"Class Expression"),(0,l.kt)("p",null,"There is also a ",(0,l.kt)("inlineCode",{parentName:"p"},"class")," expression, which can be used e.g. when assigning to a variable:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," Human "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("h3",{id:"extends"},"Extends"),(0,l.kt)("p",null,"The class statement also supports ",(0,l.kt)("inlineCode",{parentName:"p"},"extends")," to specify a parent:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"Entity")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," age "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"extends"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",fontStyle:"italic",textDecoration:"underline"}},"Entity")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," human "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"age) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 1"))))),(0,l.kt)("p",null,"This also adds a ",(0,l.kt)("inlineCode",{parentName:"p"},"__parent")," field to Human."),(0,l.kt)("h4",{id:"try-it-yourself-2"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=class%20Entity%0D%0A%20%20%20%20age%20%3D%201%0D%0Aend%0D%0A%0D%0Aclass%20Human%20extends%20Entity%0D%0Aend%0D%0A%0D%0Alocal%20human%20%3D%20new%20Human()%0D%0Aprint(human.age)%20--%201"},"Try It Yourself")),(0,l.kt)("h2",{id:"parent-expression"},"Parent Expression"),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"parent")," expression is a shorthand for ",(0,l.kt)("inlineCode",{parentName:"p"},"self.__parent"),", which also supports method call syntax, in which case it's a shorthand for ",(0,l.kt)("inlineCode",{parentName:"p"},"self.__parent.METHOD(self, ...)"),"."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"Entity")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"extends"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",fontStyle:"italic",textDecoration:"underline"}},"Entity")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- If we don't define __construct, the parent-constructor would be called automatically.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- However, if we overwrite it, we can use parent:__construct to call it manually.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"parent"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(name)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," human "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "John"'))))),(0,l.kt)("p",null,'Note that if you have a local variable (or function parameter) called "parent", the ',(0,l.kt)("inlineCode",{parentName:"p"},"parent")," expression will defer to it."),(0,l.kt)("h4",{id:"try-it-yourself-3"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=class%20Entity%0D%0A%20%20%20%20function%20__construct(name)%0D%0A%20%20%20%20%20%20%20%20self.name%20%3D%20name%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Aclass%20Human%20extends%20Entity%0D%0A%20%20%20%20--%20If%20we%20don't%20define%20__construct%2C%20the%20parent-constructor%20would%20be%20called%20automatically.%0D%0A%20%20%20%20--%20However%2C%20if%20we%20overwrite%20it%2C%20we%20can%20use%20parent%3A__construct%20to%20call%20it%20manually.%0D%0A%20%20%20%20function%20__construct(name)%0D%0A%20%20%20%20%20%20%20%20parent%3A__construct(name)%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Alocal%20human%20%3D%20new%20Human(%22John%22)%0D%0Aprint(human.name)%20--%20%22John%22"},"Try It Yourself")),(0,l.kt)("h2",{id:"private-fields"},"Private Fields"),(0,l.kt)("p",null,"Pluto allows you to specify if a field is 'public' or 'private'. Private fields can only be accessed by the class that defined them."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"Human")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"public"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"private"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," age")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"age"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"age "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," age")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"getAge"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"age")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," human "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "John"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"getAge"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 42")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"age) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- nil"))))),(0,l.kt)("h4",{id:"try-it-yourself-4"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=class%20Human%0D%0A%20%20%20%20public%20name%0D%0A%20%20%20%20private%20age%0D%0A%0D%0A%20%20%20%20function%20__construct(name%2C%20age)%0D%0A%20%20%20%20%20%20%20%20self.name%20%3D%20name%0D%0A%20%20%20%20%20%20%20%20self.age%20%3D%20age%0D%0A%20%20%20%20end%0D%0A%0D%0A%20%20%20%20function%20getAge()%0D%0A%20%20%20%20%20%20%20%20return%20self.age%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Alocal%20human%20%3D%20new%20Human(%22John%22%2C%2042)%0D%0Aprint(human.name)%20--%20%22John%22%0D%0Aprint(human%3AgetAge())%20--%2042%0D%0Aprint(human.age)%20--%20nil"},"Try It Yourself")),(0,l.kt)("h2",{id:"constructor-promotion"},"Constructor Promotion"),(0,l.kt)("p",null,"Because a common task of ",(0,l.kt)("inlineCode",{parentName:"p"},"__construct")," methods is to assign the value of arguments to table fields, Pluto provides a simple syntax to reduce this boilerplate:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"Human")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"__construct"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"public "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"name"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"private "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"age"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"getAge"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"age")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," human "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "John"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"getAge"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 42")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(human"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"age) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- nil"))))),(0,l.kt)("h4",{id:"try-it-yourself-5"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=class%20Human%0D%0A%20%20%20%20function%20__construct(public%20name%2C%20private%20age)%0D%0A%20%20%20%20end%0D%0A%0D%0A%20%20%20%20function%20getAge()%0D%0A%20%20%20%20%20%20%20%20return%20self.age%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Alocal%20human%20%3D%20new%20Human(%22John%22%2C%2042)%0D%0Aprint(human.name)%20--%20%22John%22%0D%0Aprint(human%3AgetAge())%20--%2042%0D%0Aprint(human.age)%20--%20nil"},"Try It Yourself")),(0,l.kt)("h2",{id:"instanceof-operator"},"Instanceof Operator"),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"instanceof")," operator can be used to check if a table is a class instance, including inherited classes:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"extends"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",fontStyle:"italic",textDecoration:"underline"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," e "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," h "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(e "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"instanceof"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- true")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(e "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"instanceof"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- false")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(h "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"instanceof"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- true (by inheritance)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(h "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"instanceof"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Human"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- true"))))),(0,l.kt)("p",null,"It can also be used as a function:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"class"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," e "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"Entity"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"instanceof"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(e"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," Entity)) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- true"))))),(0,l.kt)("h4",{id:"try-it-yourself-6"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=class%20Entity%20end%0D%0Aclass%20Human%20extends%20Entity%20end%0D%0A%0D%0Alocal%20e%20%3D%20new%20Entity()%0D%0Alocal%20h%20%3D%20new%20Human()%0D%0A%0D%0Aprint(e%20instanceof%20Entity)%20--%20true%0D%0Aprint(e%20instanceof%20Human)%20--%20false%0D%0Aprint(h%20instanceof%20Entity)%20--%20true%20(by%20inheritance)%0D%0Aprint(h%20instanceof%20Human)%20--%20true%0D%0A%0D%0Aprint(instanceof(e%2C%20Entity))%20--%20true%0D%0A"},"Try It Yourself")),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Note that, while the instanceof operator generates Lua-compatible bytecode, the instanceof function is a part of Pluto's standard library, and hence unavailable under Lua.")),(0,l.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,l.kt)("p",null,"Some of the syntax discussed here may be different due to compatiblity mode:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"new")," -> ",(0,l.kt)("inlineCode",{parentName:"li"},"pluto_new")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"class")," -> ",(0,l.kt)("inlineCode",{parentName:"li"},"pluto_class")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"parent")," -> ",(0,l.kt)("inlineCode",{parentName:"li"},"pluto_parent"))),(0,l.kt)("p",null,"Alternatively, ",(0,l.kt)("inlineCode",{parentName:"p"},"pluto_use new, class, parent")," will enable these keywords independently of environment settings."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5572491f.32110223.js b/assets/js/5572491f.32110223.js deleted file mode 100644 index c4c21386..00000000 --- a/assets/js/5572491f.32110223.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[2049],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>N});var a=o(7294);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function l(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function n(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var c=a.createContext({}),i=function(e){var t=a.useContext(c),o=t;return e&&(o="function"==typeof e?e(t):n(n({},t),e)),o},p=function(e){var t=i(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},F=a.forwardRef((function(e,t){var o=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=i(o),F=r,N=d["".concat(c,".").concat(F)]||d[F]||m[F]||l;return o?a.createElement(N,n(n({ref:t},p),{},{components:o})):a.createElement(N,n({ref:t},p))}));function N(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=o.length,n=new Array(l);n[0]=F;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:r,n[1]=s;for(var i=2;i{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>n,default:()=>m,frontMatter:()=>l,metadata:()=>s,toc:()=>i});var a=o(7462),r=(o(7294),o(3905));const l={sidebar_position:2},n=void 0,s={unversionedId:"New Features/Table Freezing",id:"New Features/Table Freezing",title:"Table Freezing",description:"Tables can now be frozen at their current state to forbid any future modification. This action is irreversible and permanent for the lifespan of the table.",source:"@site/docs/New Features/Table Freezing.md",sourceDirName:"New Features",slug:"/New Features/Table Freezing",permalink:"/docs/New Features/Table Freezing",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Safe Navigation",permalink:"/docs/New Features/Safe Navigation"},next:{title:"Try-Catch Statement",permalink:"/docs/New Features/Try-Catch Statement"}},c={},i=[{value:"What will this prevent?",id:"what-will-this-prevent",level:3}],p={toc:i},d="wrapper";function m(e){let{components:t,...o}=e;return(0,r.kt)(d,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Tables can now be frozen at their current state to forbid any future modification. This action is irreversible and permanent for the lifespan of the table."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Disallowing any edits to the global environment table.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"table"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"freeze"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"_G"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"_G"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"string "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {}")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- file.pluto:4: attempt to modify frozen table."))))),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Creating a constant local that's associated with a frozen table.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," Frozen "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},""),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"table"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"freeze"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"({ "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," })")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"Frozen "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {}")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- file.pluto:4: attempt to reassign constant.")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"Frozen["),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"new value"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- file.pluto:7: attempt to modify frozen table.")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"rawset"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(Frozen"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"key"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"value"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- file.pluto:10: attempt to modify frozen table."))))),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--- Trying to swap the value with the debug library.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"249"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"debug"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"getlocal"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Frozen"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"debug"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"setlocal"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { ["),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"key"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," })")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- file.pluto:5: attempt to modify local variable with a frozen table.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("h3",{id:"what-will-this-prevent"},"What will this prevent?"),(0,r.kt)("p",null,"All modifications to the table from within the Lua environment will be prevented, including those from the ",(0,r.kt)("inlineCode",{parentName:"p"},"debug")," library."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"If you're going to use this for a sandbox, ensure you call ",(0,r.kt)("inlineCode",{parentName:"p"},"table.freeze")," before any users can access the Lua environment, otherwise they can replace that function.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5572491f.d83b8a9a.js b/assets/js/5572491f.d83b8a9a.js new file mode 100644 index 00000000..17298c38 --- /dev/null +++ b/assets/js/5572491f.d83b8a9a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[2049],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>N});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),p=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},F=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(a),F=r,N=d["".concat(i,".").concat(F)]||d[F]||m[F]||o;return a?n.createElement(N,l(l({ref:t},c),{},{components:a})):n.createElement(N,l({ref:t},c))}));function N(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=F;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:r,l[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var n=a(7462),r=(a(7294),a(3905));const o={sidebar_position:2},l=void 0,s={unversionedId:"New Features/Table Freezing",id:"New Features/Table Freezing",title:"Table Freezing",description:"Tables can now be frozen at their current state to forbid any future modification. This action is irreversible and permanent for the lifespan of the table.",source:"@site/docs/New Features/Table Freezing.md",sourceDirName:"New Features",slug:"/New Features/Table Freezing",permalink:"/docs/New Features/Table Freezing",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Safe Navigation",permalink:"/docs/New Features/Safe Navigation"},next:{title:"Try-Catch Statement",permalink:"/docs/New Features/Try-Catch Statement"}},i={},p=[{value:"What will this prevent?",id:"what-will-this-prevent",level:3}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(d,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Tables can now be frozen at their current state to forbid any future modification. This action is irreversible and permanent for the lifespan of the table."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Disallowing any edits to the global environment table.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"table"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"freeze"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"_G"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"_G"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"string "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {}")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- file.pluto:4: attempt to modify frozen table."))))),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Creating a constant local that's associated with a frozen table.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," Frozen "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},""),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"table"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"freeze"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"({ "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," })")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"Frozen "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {}")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- file.pluto:4: attempt to reassign constant.")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"Frozen["),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"new value"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- file.pluto:7: attempt to modify frozen table.")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"rawset"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(Frozen"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"key"'),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"value"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- file.pluto:10: attempt to modify frozen table."))))),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--- Trying to swap the value with the debug library.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"249"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"debug"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"getlocal"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Frozen"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"debug"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"setlocal"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { ["),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"key"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," })")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- file.pluto:5: attempt to modify local variable with a frozen table.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,r.kt)("h3",{id:"what-will-this-prevent"},"What will this prevent?"),(0,r.kt)("p",null,"All modifications to the table from within the Lua environment will be prevented, including those from the ",(0,r.kt)("inlineCode",{parentName:"p"},"debug")," library."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"If you're going to use this for a sandbox, ensure you call ",(0,r.kt)("inlineCode",{parentName:"p"},"table.freeze")," before any users can access the Lua environment, otherwise they can replace that function.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5b3ce2d7.0cb48930.js b/assets/js/5b3ce2d7.0cb48930.js new file mode 100644 index 00000000..4a91bcec --- /dev/null +++ b/assets/js/5b3ce2d7.0cb48930.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[684],{3905:(e,a,t)=>{t.d(a,{Zo:()=>c,kt:()=>v});var n=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i=n.createContext({}),p=function(e){var a=n.useContext(i),t=a;return e&&(t="function"==typeof e?e(a):o(o({},a),e)),t},c=function(e){var a=p(e.components);return n.createElement(i.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},N=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,l=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(t),N=r,v=d["".concat(i,".").concat(N)]||d[N]||m[N]||l;return t?n.createElement(v,o(o({ref:a},c),{},{components:t})):n.createElement(v,o({ref:a},c))}));function v(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var l=t.length,o=new Array(l);o[0]=N;var s={};for(var i in a)hasOwnProperty.call(a,i)&&(s[i]=a[i]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var p=2;p{t.r(a),t.d(a,{assets:()=>i,contentTitle:()=>o,default:()=>m,frontMatter:()=>l,metadata:()=>s,toc:()=>p});var n=t(7462),r=(t(7294),t(3905));const l={sidebar_position:3},o=void 0,s={unversionedId:"Runtime Environment/CaT",id:"Runtime Environment/CaT",title:"CaT",description:'The CaT module is available via require "pluto:cat" and provides encoding and decoding for the Colons and Tabs format.',source:"@site/docs/Runtime Environment/CaT.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/CaT",permalink:"/docs/Runtime Environment/CaT",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Bigint",permalink:"/docs/Runtime Environment/Bigint"},next:{title:"Crypto",permalink:"/docs/Runtime Environment/Crypto"}},i={},p=[{value:"cat.encode",id:"catencode",level:3},{value:"Parameters",id:"parameters",level:4},{value:"cat.decode",id:"catdecode",level:3},{value:"Parameters",id:"parameters-1",level:4}],c={toc:p},d="wrapper";function m(e){let{components:a,...t}=e;return(0,r.kt)(d,(0,n.Z)({},c,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The CaT module is available via ",(0,r.kt)("inlineCode",{parentName:"p"},'require "pluto:cat"')," and provides encoding and decoding for ",(0,r.kt)("a",{parentName:"p",href:"https://docs.soup.do/user/cat"},"the Colons and Tabs format"),"."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"catencode"},(0,r.kt)("inlineCode",{parentName:"h3"},"cat.encode")),(0,r.kt)("p",null,"Returns a string of CaT."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The table to encode in CaT.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," cat "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:cat"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"cat"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," List "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," __value "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"With Value"'),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," Child "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Also With Value"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"} "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," io"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"write")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e List: With Value")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Child: Also With Value"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"catdecode"},(0,r.kt)("inlineCode",{parentName:"h3"},"cat.decode")),(0,r.kt)("p",null,"Returns a table representing the CaT data."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The CaT data to decode."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"presentation"),' \u2014 How to represent the data as a table. Can be "flat", "flatwithorder", or "full" (default).')),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," cat "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:cat"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," data "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," cat"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"List: With Value")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," Child: Also With Value")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"]]")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(data))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e [1] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["value"] = string(10) "With Value",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["name"] = string(4) "List",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e [1] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["name"] = string(5) "Child",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["value"] = string(15) "Also With Value",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }"))))),(0,r.kt)("p",null,'With the default "full" representation, the retuned table has an ',(0,r.kt)("inlineCode",{parentName:"p"},"__index")," metamethod for ease of use:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(data"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"List"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"value) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e With Value")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(data"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"List"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"Child"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"value) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Also With Value"))))),(0,r.kt)("p",null,"Alternatively, the other representations are available:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," cat "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:cat"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(cat"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"home")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," john")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," hello.txt: Hello, world!")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"]]"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"flat"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["home"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["john"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["hello.txt"] = string(13) "Hello, world!",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }"))))),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," cat "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:cat"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(cat"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"Primary Color: Purple")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"Secondary Color: White")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"]]"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"flatwithorder"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["__order"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e [1] = string(13) "Primary Color",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e [2] = string(15) "Secondary Color",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["Primary Color"] = string(6) "Purple",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["Secondary Color"] = string(5) "White",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5b3ce2d7.b5dae07e.js b/assets/js/5b3ce2d7.b5dae07e.js deleted file mode 100644 index fa4ae31d..00000000 --- a/assets/js/5b3ce2d7.b5dae07e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[684],{3905:(e,a,t)=>{t.d(a,{Zo:()=>p,kt:()=>v});var o=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);a&&(o=o.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,o)}return t}function n(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=o.createContext({}),i=function(e){var a=o.useContext(s),t=a;return e&&(t="function"==typeof e?e(a):n(n({},a),e)),t},p=function(e){var a=i(e.components);return o.createElement(s.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return o.createElement(o.Fragment,{},a)}},N=o.forwardRef((function(e,a){var t=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=i(t),N=r,v=d["".concat(s,".").concat(N)]||d[N]||m[N]||l;return t?o.createElement(v,n(n({ref:a},p),{},{components:t})):o.createElement(v,n({ref:a},p))}));function v(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var l=t.length,n=new Array(l);n[0]=N;var c={};for(var s in a)hasOwnProperty.call(a,s)&&(c[s]=a[s]);c.originalType=e,c[d]="string"==typeof e?e:r,n[1]=c;for(var i=2;i{t.r(a),t.d(a,{assets:()=>s,contentTitle:()=>n,default:()=>m,frontMatter:()=>l,metadata:()=>c,toc:()=>i});var o=t(7462),r=(t(7294),t(3905));const l={sidebar_position:3},n=void 0,c={unversionedId:"Runtime Environment/CaT",id:"Runtime Environment/CaT",title:"CaT",description:'The CaT module is available via require "pluto:cat" and provides encoding and decoding for the Colons and Tabs format.',source:"@site/docs/Runtime Environment/CaT.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/CaT",permalink:"/docs/Runtime Environment/CaT",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Bigint",permalink:"/docs/Runtime Environment/Bigint"},next:{title:"Crypto",permalink:"/docs/Runtime Environment/Crypto"}},s={},i=[{value:"cat.encode",id:"catencode",level:3},{value:"Parameters",id:"parameters",level:4},{value:"cat.decode",id:"catdecode",level:3},{value:"Parameters",id:"parameters-1",level:4}],p={toc:i},d="wrapper";function m(e){let{components:a,...t}=e;return(0,r.kt)(d,(0,o.Z)({},p,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The CaT module is available via ",(0,r.kt)("inlineCode",{parentName:"p"},'require "pluto:cat"')," and provides encoding and decoding for ",(0,r.kt)("a",{parentName:"p",href:"https://docs.soup.do/user/cat"},"the Colons and Tabs format"),"."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"catencode"},(0,r.kt)("inlineCode",{parentName:"h3"},"cat.encode")),(0,r.kt)("p",null,"Returns a string of CaT."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The table to encode in CaT.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," cat "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:cat"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"cat"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," List "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," __value "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"With Value"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," Child "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Also With Value"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"} "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"write")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e List: With Value")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Child: Also With Value"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"catdecode"},(0,r.kt)("inlineCode",{parentName:"h3"},"cat.decode")),(0,r.kt)("p",null,"Returns a table representing the CaT data."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The CaT data to decode."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"presentation"),' \u2014 How to represent the data as a table. Can be "flat", "flatwithorder", or "full" (default).')),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," cat "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:cat"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," data "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," cat"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"List: With Value")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," Child: Also With Value")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"]]")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(data))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e [1] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["value"] = string(10) "With Value",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["name"] = string(4) "List",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e [1] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["name"] = string(5) "Child",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["value"] = string(15) "Also With Value",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }"))))),(0,r.kt)("p",null,'With the default "full" representation, the retuned table has an ',(0,r.kt)("inlineCode",{parentName:"p"},"__index")," metamethod for ease of use:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(data"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"List"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"value) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e With Value")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(data"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"List"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"Child"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"value) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Also With Value"))))),(0,r.kt)("p",null,"Alternatively, the other representations are available:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," cat "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:cat"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(cat"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"home")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," john")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," hello.txt: Hello, world!")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"]]"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"flat"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["home"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["john"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["hello.txt"] = string(13) "Hello, world!",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }"))))),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," cat "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:cat"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(cat"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"Primary Color: Purple")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"Secondary Color: White")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"]]"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"flatwithorder"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["__order"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e [1] = string(13) "Primary Color",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e [2] = string(15) "Secondary Color",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["Primary Color"] = string(6) "Purple",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["Secondary Color"] = string(5) "White",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/62afbdfe.0bcdd719.js b/assets/js/62afbdfe.0bcdd719.js new file mode 100644 index 00000000..57a48dc9 --- /dev/null +++ b/assets/js/62afbdfe.0bcdd719.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9956],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>v});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),m=s(n),u=a,v=m["".concat(l,".").concat(u)]||m[u]||d[u]||o;return n?r.createElement(v,i(i({ref:t},c),{},{components:n})):r.createElement(v,i({ref:t},c))}));function v(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=u;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[m]="string"==typeof e?e:a,i[1]=p;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>p,toc:()=>s});var r=n(7462),a=(n(7294),n(3905));const o={sidebar_position:3},i="Exception",p={unversionedId:"Runtime Environment/Exception",id:"Runtime Environment/Exception",title:"Exception",description:"The exception class makes errors easier to parse with where and what members, as opposed to having a string with both.",source:"@site/docs/Runtime Environment/Exception.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Exception",permalink:"/docs/Runtime Environment/Exception",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Crypto",permalink:"/docs/Runtime Environment/Crypto"},next:{title:"HTTP",permalink:"/docs/Runtime Environment/HTTP"}},l={},s=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],c={toc:s},m="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"exception"},"Exception"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"exception")," class makes errors easier to parse with ",(0,a.kt)("inlineCode",{parentName:"p"},"where")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"what")," members, as opposed to having a string with both."),(0,a.kt)("p",null,"For ease of use, constructing an exception automatically ",(0,a.kt)("em",{parentName:"p"},"throws")," it."),(0,a.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#F92672"}},"try")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"exception"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Not implemented"'),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#F92672"}},"catch"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," e "),(0,a.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(e) "),(0,a.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- same as error("Not implemented")')),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(e"),(0,a.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"what)")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(e"),(0,a.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"where)")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Output:")),(0,a.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"undefined"}},"script.pluto:2: Not implemented")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"undefined"}},"Not implemented")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"undefined"}},"script.pluto:2"))))),(0,a.kt)("h4",{id:"try-it-yourself"},(0,a.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=try%0A%20%20%20%20new%20exception(%22Not%20implemented%22)%0Acatch%20e%20then%0A%20%20%20%20print(e)%20--%20same%20as%20error(%22Not%20implemented%22)%0A%20%20%20%20print(e.what)%0A%20%20%20%20print(e.where)%0Aend"},"Try It Yourself")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/62afbdfe.775b5179.js b/assets/js/62afbdfe.775b5179.js deleted file mode 100644 index fca5ca8d..00000000 --- a/assets/js/62afbdfe.775b5179.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9956],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>v});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),c=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=c(e.components);return n.createElement(p.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),m=c(r),u=o,v=m["".concat(p,".").concat(u)]||m[u]||d[u]||a;return r?n.createElement(v,i(i({ref:t},s),{},{components:r})):n.createElement(v,i({ref:t},s))}));function v(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=u;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[m]="string"==typeof e?e:o,i[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var n=r(7462),o=(r(7294),r(3905));const a={sidebar_position:3},i="Exception",l={unversionedId:"Runtime Environment/Exception",id:"Runtime Environment/Exception",title:"Exception",description:"The exception class makes errors easier to parse with where and what members, as opposed to having a string with both.",source:"@site/docs/Runtime Environment/Exception.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Exception",permalink:"/docs/Runtime Environment/Exception",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Crypto",permalink:"/docs/Runtime Environment/Crypto"},next:{title:"HTTP",permalink:"/docs/Runtime Environment/HTTP"}},p={},c=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],s={toc:c},m="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(m,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"exception"},"Exception"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"exception")," class makes errors easier to parse with ",(0,o.kt)("inlineCode",{parentName:"p"},"where")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"what")," members, as opposed to having a string with both."),(0,o.kt)("p",null,"For ease of use, constructing an exception automatically ",(0,o.kt)("em",{parentName:"p"},"throws")," it."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"try")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"exception"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Not implemented"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"catch"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," e "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(e) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- same as error("Not implemented")')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(e"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"what)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(e"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"where)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Output:")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"script.pluto:2: Not implemented")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"Not implemented")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"script.pluto:2"))))),(0,o.kt)("h4",{id:"try-it-yourself"},(0,o.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=try%0A%20%20%20%20new%20exception(%22Not%20implemented%22)%0Acatch%20e%20then%0A%20%20%20%20print(e)%20--%20same%20as%20error(%22Not%20implemented%22)%0A%20%20%20%20print(e.what)%0A%20%20%20%20print(e.where)%0Aend"},"Try It Yourself")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6c9c7408.5dfe8bcb.js b/assets/js/6c9c7408.5dfe8bcb.js new file mode 100644 index 00000000..9c738553 --- /dev/null +++ b/assets/js/6c9c7408.5dfe8bcb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8618],{3905:(e,a,t)=>{t.d(a,{Zo:()=>c,kt:()=>N});var n=t(7294);function l(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function r(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var a=1;a=0||(l[t]=e[t]);return l}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}var p=n.createContext({}),i=function(e){var a=n.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):o(o({},a),e)),t},c=function(e){var a=i(e.components);return n.createElement(p.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},F=n.forwardRef((function(e,a){var t=e.components,l=e.mdxType,r=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=i(t),F=l,N=d["".concat(p,".").concat(F)]||d[F]||m[F]||r;return t?n.createElement(N,o(o({ref:a},c),{},{components:t})):n.createElement(N,o({ref:a},c))}));function N(e,a){var t=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var r=t.length,o=new Array(r);o[0]=F;var s={};for(var p in a)hasOwnProperty.call(a,p)&&(s[p]=a[p]);s.originalType=e,s[d]="string"==typeof e?e:l,o[1]=s;for(var i=2;i{t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>o,default:()=>m,frontMatter:()=>r,metadata:()=>s,toc:()=>i});var n=t(7462),l=(t(7294),t(3905));const r={sidebar_position:3},o=void 0,s={unversionedId:"New Operators",id:"New Operators",title:"New Operators",description:"Operator Aliases",source:"@site/docs/New Operators.md",sourceDirName:".",slug:"/New Operators",permalink:"/docs/New Operators",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Editor Integration",permalink:"/docs/Editor Integration"},next:{title:"New Features",permalink:"/docs/category/new-features"}},p={},i=[{value:"Operator Aliases",id:"operator-aliases",level:2},{value:"Compound Operators",id:"compound-operators",level:2},{value:"Coalescing Operator",id:"coalescing-operator",level:2},{value:"Walrus Operator",id:"walrus-operator",level:2},{value:"Spaceship Operator",id:"spaceship-operator",level:2},{value:"Pipe Operator",id:"pipe-operator",level:2},{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Additional Arguments",id:"additional-arguments",level:3},{value:"Try It Yourself",id:"try-it-yourself-1",level:4},{value:"Methods Calls",id:"methods-calls",level:3},{value:"Try It Yourself",id:"try-it-yourself-2",level:4},{value:"Anonymous Functions",id:"anonymous-functions",level:3},{value:"Try It Yourself",id:"try-it-yourself-3",level:4}],c={toc:i},d="wrapper";function m(e){let{components:a,...t}=e;return(0,l.kt)(d,(0,n.Z)({},c,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"operator-aliases"},"Operator Aliases"),(0,l.kt)("p",null,"These operators function the same, but they're more consistent with what's been standardized through programming today."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"!")," is an alias for ",(0,l.kt)("inlineCode",{parentName:"li"},"not"),", the boolean inversion operator."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"!=")," is an alias for ",(0,l.kt)("inlineCode",{parentName:"li"},"~="),", the inequality operator.")),(0,l.kt)("h2",{id:"compound-operators"},"Compound Operators"),(0,l.kt)("p",null,"A plethora of compound operators are available in Pluto:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Addition: ",(0,l.kt)("inlineCode",{parentName:"li"},"+=")),(0,l.kt)("li",{parentName:"ul"},"Subtraction: ",(0,l.kt)("inlineCode",{parentName:"li"},"-=")," "),(0,l.kt)("li",{parentName:"ul"},"Multiplication: ",(0,l.kt)("inlineCode",{parentName:"li"},"*=")),(0,l.kt)("li",{parentName:"ul"},"Float division: ",(0,l.kt)("inlineCode",{parentName:"li"},"/=")),(0,l.kt)("li",{parentName:"ul"},"Integer division: ",(0,l.kt)("inlineCode",{parentName:"li"},"//=")),(0,l.kt)("li",{parentName:"ul"},"Modulo: ",(0,l.kt)("inlineCode",{parentName:"li"},"%=")),(0,l.kt)("li",{parentName:"ul"},"Exponent: ",(0,l.kt)("inlineCode",{parentName:"li"},"^=")),(0,l.kt)("li",{parentName:"ul"},"Bitwise AND: ",(0,l.kt)("inlineCode",{parentName:"li"},"&=")),(0,l.kt)("li",{parentName:"ul"},"Bitwise OR: ",(0,l.kt)("inlineCode",{parentName:"li"},"|=")),(0,l.kt)("li",{parentName:"ul"},"Bitwise XOR: ",(0,l.kt)("inlineCode",{parentName:"li"},"~="),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"In Lua, the inequality operator cannot be used in statements. It must be used in expressions. Because compound operators can only be used in statements (and cannot be used in expressions), this is not a compatibility break."))),(0,l.kt)("li",{parentName:"ul"},"Bitshift left: ",(0,l.kt)("inlineCode",{parentName:"li"},"<<=")),(0,l.kt)("li",{parentName:"ul"},"Bitshift right: ",(0,l.kt)("inlineCode",{parentName:"li"},">>=")),(0,l.kt)("li",{parentName:"ul"},"Concatenation: ",(0,l.kt)("inlineCode",{parentName:"li"},"..=")),(0,l.kt)("li",{parentName:"ul"},"Nil-Coalescing: ",(0,l.kt)("inlineCode",{parentName:"li"},"??="))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"a "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"a "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"))))),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Compound operators are syntactic sugar. They'll call the same metamethods as their non-compound counterparts.")),(0,l.kt)("h2",{id:"coalescing-operator"},"Coalescing Operator"),(0,l.kt)("p",null,"The nil-coalescing operator is helpful for evaluating values against ",(0,l.kt)("inlineCode",{parentName:"p"},"nil"),". "),(0,l.kt)("p",null,"If the left-hand operand is ",(0,l.kt)("inlineCode",{parentName:"p"},"nil"),", it returns the right-hand operand. Otherwise, it returns the left-hand operand."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"message"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(message "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"??"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"The message was nil."'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello, world!"))))),(0,l.kt)("p",null,"It's a cleaner version of this code:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"message"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," message "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," message "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"The message was nil."')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(message)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello, world!"))))),(0,l.kt)("p",null,"You can even use compound assignment:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"message"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," message "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"??="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"The message was nil."')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(message)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello, world!"))))),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"This operator does not implement any metamethods.")),(0,l.kt)("h2",{id:"walrus-operator"},"Walrus Operator"),(0,l.kt)("p",null,"The Walrus operator allows you to perform assignments inside of conditional expresssions."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},":="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"get_value"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 'a' was assigned a truthy value.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"else")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 'a' was assigned a falsy value.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("p",null,"You can imagine it like this, but note they're not always the same:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"get_value"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 'a' was assigned a truthy value.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"else")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 'a' was assigned a falsy value.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("p",null,"Note that for while-loops, it will be executed as many times as the condition:"),(0,l.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Pluto Way"},(0,l.kt)("div",{parentName:"pre",className:"code-title"},"Pluto Way"),(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"while"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},":="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"next_value"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- ...")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Lua Way"},(0,l.kt)("div",{parentName:"pre",className:"code-title"},"Lua Way"),(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"while"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"next_value"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"not"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- ...")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("h2",{id:"spaceship-operator"},"Spaceship Operator"),(0,l.kt)("p",null,"The spaceship operator, also known as the three-way comparison operator, allows you to quickly compare 2 values for equality and order."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," eq "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"<=>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," lt "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"<=>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," gt "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"9"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"<=>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(eq"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," lt"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," gt) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 0, -1, 1"))))),(0,l.kt)("p",null,"It works with any type that supports ",(0,l.kt)("inlineCode",{parentName:"p"},"__eq")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"__lt"),", making it well-suited for usage in generic algorithms like sorting. The return values are designed such that you can compare them to ",(0,l.kt)("inlineCode",{parentName:"p"},"0"),", e.g. with the values from above:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(eq "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"<="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(lt "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"<="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(gt "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"<="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e false"))))),(0,l.kt)("h2",{id:"pipe-operator"},"Pipe Operator"),(0,l.kt)("p",null,"The pipe operator allows you represent data pipelines more succinctly."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { http"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," json } "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:*"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"http"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"request"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"https://httpbin.org/get"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["args"] = {},')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["headers"] = {')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["Host"] = string(11) "httpbin.org",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["User-Agent"] = string(56) "Mozilla/5.0 (compatible; Soup Library; +https://soup.do)",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["X-Amzn-Trace-Id"] = string(40) "Root=1-65e05b66-6aa8b7c94e7580774a804c24",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["Accept-Encoding"] = string(13) "deflate, gzip",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["origin"] = string(13) "1.2.3.4",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["url"] = string(23) "https://httpbin.org/get",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }"))))),(0,l.kt)("h4",{id:"try-it-yourself"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20%7B%20http%2C%20json%20%7D%20%3D%20require%20%22pluto%3A*%22%0D%0A%0D%0Ahttp.request(%22https%3A%2F%2Fhttpbin.org%2Fget%22)%0D%0A%7C%3E%20json.decode%0D%0A%7C%3E%20dumpvar%0D%0A%7C%3E%20print%0D%0A"},"Try It Yourself")),(0,l.kt)("p",null,"The HTTP-to-print pipeline here would otherwise be written like this:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(json"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"((http"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"request"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"https://httpbin.org/get"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")))))"))))),(0,l.kt)("p",null,"Note that the pipe operator only passes on the first return value, which is classically achieved by wrapping the expression in an extra pair of parentheses."),(0,l.kt)("h3",{id:"additional-arguments"},"Additional Arguments"),(0,l.kt)("p",null,"It is also possible to provide additional arguments for the righthand side of the pipe operator:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," producer "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," || "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"10"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"producer"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"tonumber"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|"),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"16"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 16"))))),(0,l.kt)("h4",{id:"try-it-yourself-1"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20producer%20%3D%20%7C%7C%20-%3E%20%2210%22%0D%0A%0D%0Aproducer()%0D%0A%7C%3E%20tonumber%7C16%7C%0D%0A%7C%3E%20print%20--%3E%2016%0D%0A"},"Try It Yourself")),(0,l.kt)("h3",{id:"methods-calls"},"Methods Calls"),(0,l.kt)("p",null,"There is specialized syntax for method calls with the pipe operator, too:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," producer "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," || "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"21")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," obj "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"multiply"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"value"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"*"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"factor")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"obj"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"factor "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"producer"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," obj"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"multiply")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 42"))))),(0,l.kt)("h4",{id:"try-it-yourself-2"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20producer%20%3D%20%7C%7C%20-%3E%2021%0D%0A%0D%0Alocal%20obj%20%3D%20%7B%0D%0A%20%20%20%20function%20multiply(value)%0D%0A%20%20%20%20%20%20%20%20return%20value%20*%20self.factor%0D%0A%20%20%20%20end%0D%0A%7D%0D%0Aobj.factor%20%3D%202%0D%0A%0D%0Aproducer()%0D%0A%7C%3E%20obj%3Amultiply%0D%0A%7C%3E%20print%20--%3E%2042%0D%0A"},"Try It Yourself")),(0,l.kt)("h3",{id:"anonymous-functions"},"Anonymous Functions"),(0,l.kt)("p",null,"The righthand side of the pipe operator can also be an anonymous function, allowing for more advanced usage like this:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," producer "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," || "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"producer"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," |"),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"res"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"The result was '),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{res}"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e The result was 42"))))),(0,l.kt)("h4",{id:"try-it-yourself-3"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20producer%20%3D%20%7C%7C%20-%3E%2042%0D%0A%0D%0Aproducer()%0D%0A%7C%3E%20%7Cres%7C%20-%3E%20print(%24%22The%20result%20was%20%7Bres%7D%22)%0D%0A%0D%0A--%3E%20The%20result%20was%2042%0D%0A"},"Try It Yourself")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6c9c7408.c61a343b.js b/assets/js/6c9c7408.c61a343b.js deleted file mode 100644 index e5c05745..00000000 --- a/assets/js/6c9c7408.c61a343b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8618],{3905:(e,a,o)=>{o.d(a,{Zo:()=>i,kt:()=>N});var t=o(7294);function l(e,a,o){return a in e?Object.defineProperty(e,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[a]=o,e}function r(e,a){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),o.push.apply(o,t)}return o}function n(e){for(var a=1;a=0||(l[o]=e[o]);return l}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(l[o]=e[o])}return l}var c=t.createContext({}),p=function(e){var a=t.useContext(c),o=a;return e&&(o="function"==typeof e?e(a):n(n({},a),e)),o},i=function(e){var a=p(e.components);return t.createElement(c.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},F=t.forwardRef((function(e,a){var o=e.components,l=e.mdxType,r=e.originalType,c=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),d=p(o),F=l,N=d["".concat(c,".").concat(F)]||d[F]||m[F]||r;return o?t.createElement(N,n(n({ref:a},i),{},{components:o})):t.createElement(N,n({ref:a},i))}));function N(e,a){var o=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var r=o.length,n=new Array(r);n[0]=F;var s={};for(var c in a)hasOwnProperty.call(a,c)&&(s[c]=a[c]);s.originalType=e,s[d]="string"==typeof e?e:l,n[1]=s;for(var p=2;p{o.r(a),o.d(a,{assets:()=>c,contentTitle:()=>n,default:()=>m,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var t=o(7462),l=(o(7294),o(3905));const r={sidebar_position:3},n=void 0,s={unversionedId:"New Operators",id:"New Operators",title:"New Operators",description:"Operator Aliases",source:"@site/docs/New Operators.md",sourceDirName:".",slug:"/New Operators",permalink:"/docs/New Operators",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Editor Integration",permalink:"/docs/Editor Integration"},next:{title:"New Features",permalink:"/docs/category/new-features"}},c={},p=[{value:"Operator Aliases",id:"operator-aliases",level:2},{value:"Compound Operators",id:"compound-operators",level:2},{value:"Coalescing Operator",id:"coalescing-operator",level:2},{value:"Walrus Operator",id:"walrus-operator",level:2},{value:"Spaceship Operator",id:"spaceship-operator",level:2},{value:"Pipe Operator",id:"pipe-operator",level:2},{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Additional Arguments",id:"additional-arguments",level:3},{value:"Try It Yourself",id:"try-it-yourself-1",level:4},{value:"Methods Calls",id:"methods-calls",level:3},{value:"Try It Yourself",id:"try-it-yourself-2",level:4},{value:"Anonymous Functions",id:"anonymous-functions",level:3},{value:"Try It Yourself",id:"try-it-yourself-3",level:4}],i={toc:p},d="wrapper";function m(e){let{components:a,...o}=e;return(0,l.kt)(d,(0,t.Z)({},i,o,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"operator-aliases"},"Operator Aliases"),(0,l.kt)("p",null,"These operators function the same, but they're more consistent with what's been standardized through programming today."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"!")," is an alias for ",(0,l.kt)("inlineCode",{parentName:"li"},"not"),", the boolean inversion operator."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"!=")," is an alias for ",(0,l.kt)("inlineCode",{parentName:"li"},"~="),", the inequality operator.")),(0,l.kt)("h2",{id:"compound-operators"},"Compound Operators"),(0,l.kt)("p",null,"A plethora of compound operators are available in Pluto:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Addition: ",(0,l.kt)("inlineCode",{parentName:"li"},"+=")),(0,l.kt)("li",{parentName:"ul"},"Subtraction: ",(0,l.kt)("inlineCode",{parentName:"li"},"-=")," "),(0,l.kt)("li",{parentName:"ul"},"Multiplication: ",(0,l.kt)("inlineCode",{parentName:"li"},"*=")),(0,l.kt)("li",{parentName:"ul"},"Float division: ",(0,l.kt)("inlineCode",{parentName:"li"},"/=")),(0,l.kt)("li",{parentName:"ul"},"Integer division: ",(0,l.kt)("inlineCode",{parentName:"li"},"//=")),(0,l.kt)("li",{parentName:"ul"},"Modulo: ",(0,l.kt)("inlineCode",{parentName:"li"},"%=")),(0,l.kt)("li",{parentName:"ul"},"Exponent: ",(0,l.kt)("inlineCode",{parentName:"li"},"^=")),(0,l.kt)("li",{parentName:"ul"},"Bitwise AND: ",(0,l.kt)("inlineCode",{parentName:"li"},"&=")),(0,l.kt)("li",{parentName:"ul"},"Bitwise OR: ",(0,l.kt)("inlineCode",{parentName:"li"},"|=")),(0,l.kt)("li",{parentName:"ul"},"Bitwise XOR: ",(0,l.kt)("inlineCode",{parentName:"li"},"~="),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"In Lua, the inequality operator cannot be used in statements. It must be used in expressions. Because compound operators can only be used in statements (and cannot be used in expressions), this is not a compatibility break."))),(0,l.kt)("li",{parentName:"ul"},"Bitshift left: ",(0,l.kt)("inlineCode",{parentName:"li"},"<<=")),(0,l.kt)("li",{parentName:"ul"},"Bitshift right: ",(0,l.kt)("inlineCode",{parentName:"li"},">>=")),(0,l.kt)("li",{parentName:"ul"},"Concatenation: ",(0,l.kt)("inlineCode",{parentName:"li"},"..=")),(0,l.kt)("li",{parentName:"ul"},"Nil-Coalescing: ",(0,l.kt)("inlineCode",{parentName:"li"},"??="))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"))))),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Compound operators are syntactic sugar. They'll call the same metamethods as their non-compound counterparts.")),(0,l.kt)("h2",{id:"coalescing-operator"},"Coalescing Operator"),(0,l.kt)("p",null,"The nil-coalescing operator is helpful for evaluating values against ",(0,l.kt)("inlineCode",{parentName:"p"},"nil"),". "),(0,l.kt)("p",null,"If the left-hand operand is ",(0,l.kt)("inlineCode",{parentName:"p"},"nil"),", it returns the right-hand operand. Otherwise, it returns the left-hand operand."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"message"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(message "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"??"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"The message was nil."'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello, world!"))))),(0,l.kt)("p",null,"It's a cleaner version of this code:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"message"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," message "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," message "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"The message was nil."')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(message)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello, world!"))))),(0,l.kt)("p",null,"You can even use compound assignment:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"message"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," message "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"??="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"The message was nil."')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(message)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e The message was nil.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"say"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello, world!"))))),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"This operator does not implement any metamethods.")),(0,l.kt)("h2",{id:"walrus-operator"},"Walrus Operator"),(0,l.kt)("p",null,"The Walrus operator allows you to perform assignments inside of conditional expresssions."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},":="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"get_value"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 'a' was assigned a truthy value.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"else")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 'a' was assigned a falsy value.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("p",null,"You can imagine it like this, but note they're not always the same:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"get_value"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 'a' was assigned a truthy value.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"else")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 'a' was assigned a falsy value.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("p",null,"Note that for while-loops, it will be executed as many times as the condition:"),(0,l.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Pluto Way"},(0,l.kt)("div",{parentName:"pre",className:"code-title"},"Pluto Way"),(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"while"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},":="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"next_value"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- ...")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Lua Way"},(0,l.kt)("div",{parentName:"pre",className:"code-title"},"Lua Way"),(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"while"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"next_value"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"not"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- ...")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("h2",{id:"spaceship-operator"},"Spaceship Operator"),(0,l.kt)("p",null,"The spaceship operator, also known as the three-way comparison operator, allows you to quickly compare 2 values for equality and order."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," eq "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"<=>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," lt "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"<=>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," gt "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"9"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"<=>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(eq"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," lt"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," gt) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 0, -1, 1"))))),(0,l.kt)("p",null,"It works with any type that supports ",(0,l.kt)("inlineCode",{parentName:"p"},"__eq")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"__lt"),", making it well-suited for usage in generic algorithms like sorting. The return values are designed such that you can compare them to ",(0,l.kt)("inlineCode",{parentName:"p"},"0"),", e.g. with the values from above:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(eq "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"<="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(lt "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"<="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(gt "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"<="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e false"))))),(0,l.kt)("h2",{id:"pipe-operator"},"Pipe Operator"),(0,l.kt)("p",null,"The pipe operator allows you represent data pipelines more succinctly."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { http"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," json } "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:*"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"http"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"request"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"https://httpbin.org/get"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["args"] = {},')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["headers"] = {')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["Host"] = string(11) "httpbin.org",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["User-Agent"] = string(56) "Mozilla/5.0 (compatible; Soup Library; +https://soup.do)",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["X-Amzn-Trace-Id"] = string(40) "Root=1-65e05b66-6aa8b7c94e7580774a804c24",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["Accept-Encoding"] = string(13) "deflate, gzip",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["origin"] = string(13) "1.2.3.4",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["url"] = string(23) "https://httpbin.org/get",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }"))))),(0,l.kt)("h4",{id:"try-it-yourself"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20%7B%20http%2C%20json%20%7D%20%3D%20require%20%22pluto%3A*%22%0D%0A%0D%0Ahttp.request(%22https%3A%2F%2Fhttpbin.org%2Fget%22)%0D%0A%7C%3E%20json.decode%0D%0A%7C%3E%20dumpvar%0D%0A%7C%3E%20print%0D%0A"},"Try It Yourself")),(0,l.kt)("p",null,"The HTTP-to-print pipeline here would otherwise be written like this:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(json"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"((http"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"request"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"https://httpbin.org/get"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")))))"))))),(0,l.kt)("p",null,"Note that the pipe operator only passes on the first return value, which is classically achieved by wrapping the expression in an extra pair of parentheses."),(0,l.kt)("h3",{id:"additional-arguments"},"Additional Arguments"),(0,l.kt)("p",null,"It is also possible to provide additional arguments for the righthand side of the pipe operator:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," producer "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," || "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"10"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"producer"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"tonumber"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"16"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 16"))))),(0,l.kt)("h4",{id:"try-it-yourself-1"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20producer%20%3D%20%7C%7C%20-%3E%20%2210%22%0D%0A%0D%0Aproducer()%0D%0A%7C%3E%20tonumber%7C16%7C%0D%0A%7C%3E%20print%20--%3E%2016%0D%0A"},"Try It Yourself")),(0,l.kt)("h3",{id:"methods-calls"},"Methods Calls"),(0,l.kt)("p",null,"There is specialized syntax for method calls with the pipe operator, too:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," producer "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," || "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"21")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," obj "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"multiply"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"value"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"*"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"factor")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"obj"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"factor "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"producer"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," obj"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"multiply")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 42"))))),(0,l.kt)("h4",{id:"try-it-yourself-2"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20producer%20%3D%20%7C%7C%20-%3E%2021%0D%0A%0D%0Alocal%20obj%20%3D%20%7B%0D%0A%20%20%20%20function%20multiply(value)%0D%0A%20%20%20%20%20%20%20%20return%20value%20*%20self.factor%0D%0A%20%20%20%20end%0D%0A%7D%0D%0Aobj.factor%20%3D%202%0D%0A%0D%0Aproducer()%0D%0A%7C%3E%20obj%3Amultiply%0D%0A%7C%3E%20print%20--%3E%2042%0D%0A"},"Try It Yourself")),(0,l.kt)("h3",{id:"anonymous-functions"},"Anonymous Functions"),(0,l.kt)("p",null,"The righthand side of the pipe operator can also be an anonymous function, allowing for more advanced usage like this:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," producer "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," || "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"producer"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|>"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," |"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"res"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"The result was '),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{res}"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e The result was 42"))))),(0,l.kt)("h4",{id:"try-it-yourself-3"},(0,l.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20producer%20%3D%20%7C%7C%20-%3E%2042%0D%0A%0D%0Aproducer()%0D%0A%7C%3E%20%7Cres%7C%20-%3E%20print(%24%22The%20result%20was%20%7Bres%7D%22)%0D%0A%0D%0A--%3E%20The%20result%20was%2042%0D%0A"},"Try It Yourself")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6d37f50b.2e4fbd62.js b/assets/js/6d37f50b.2e4fbd62.js deleted file mode 100644 index 16de73fd..00000000 --- a/assets/js/6d37f50b.2e4fbd62.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9279],{3905:(e,o,t)=>{t.d(o,{Zo:()=>i,kt:()=>N});var a=t(7294);function r(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function l(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,a)}return t}function n(e){for(var o=1;o=0||(r[t]=e[t]);return r}(e,o);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=a.createContext({}),p=function(e){var o=a.useContext(s),t=o;return e&&(t="function"==typeof e?e(o):n(n({},o),e)),t},i=function(e){var o=p(e.components);return a.createElement(s.Provider,{value:o},e.children)},d="mdxType",F={inlineCode:"code",wrapper:function(e){var o=e.children;return a.createElement(a.Fragment,{},o)}},m=a.forwardRef((function(e,o){var t=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),d=p(t),m=r,N=d["".concat(s,".").concat(m)]||d[m]||F[m]||l;return t?a.createElement(N,n(n({ref:o},i),{},{components:t})):a.createElement(N,n({ref:o},i))}));function N(e,o){var t=arguments,r=o&&o.mdxType;if("string"==typeof e||r){var l=t.length,n=new Array(l);n[0]=m;var c={};for(var s in o)hasOwnProperty.call(o,s)&&(c[s]=o[s]);c.originalType=e,c[d]="string"==typeof e?e:r,n[1]=c;for(var p=2;p{t.r(o),t.d(o,{assets:()=>s,contentTitle:()=>n,default:()=>F,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var a=t(7462),r=(t(7294),t(3905));const l={sidebar_position:3},n=void 0,c={unversionedId:"Runtime Environment/Scheduler",id:"Runtime Environment/Scheduler",title:"Scheduler",description:"The scheduler class \u2014 available via require \u2014 can be used to easily set up coroutine-based cooperative multitasking.",source:"@site/docs/Runtime Environment/Scheduler.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Scheduler",permalink:"/docs/Runtime Environment/Scheduler",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"JSON",permalink:"/docs/Runtime Environment/JSON"},next:{title:"Socket",permalink:"/docs/Runtime Environment/Socket"}},s={},p=[{value:"__construct",id:"__construct",level:3},{value:"add",id:"add",level:3},{value:"addloop",id:"addloop",level:3},{value:"run",id:"run",level:3},{value:"yieldfunc",id:"yieldfunc",level:3},{value:"errorfunc",id:"errorfunc",level:3}],i={toc:p},d="wrapper";function F(e){let{components:o,...t}=e;return(0,r.kt)(d,(0,a.Z)({},i,t,{components:o,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The scheduler class \u2014 available via ",(0,r.kt)("inlineCode",{parentName:"p"},"require")," \u2014 can be used to easily set up coroutine-based cooperative multitasking."),(0,r.kt)("h3",{id:"__construct"},(0,r.kt)("inlineCode",{parentName:"h3"},"__construct")),(0,r.kt)("p",null,"The constructor takes no arguments."),(0,r.kt)("h3",{id:"add"},(0,r.kt)("inlineCode",{parentName:"h3"},"add")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"add")," method can be used to turn a function into a coroutine. The coroutine is resumed once and then added to the scheduler."),(0,r.kt)("h3",{id:"addloop"},(0,r.kt)("inlineCode",{parentName:"h3"},"addloop")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"addloop")," method is a wrapper for the ",(0,r.kt)("inlineCode",{parentName:"p"},"add")," method that keeps invoking the given function until it returns false."),(0,r.kt)("h3",{id:"run"},(0,r.kt)("inlineCode",{parentName:"h3"},"run")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"run")," method activates the scheduler. The scheduler resumes all coroutines and then calls its yieldfunc until either all coroutines are finished, or coroutine throws an error \u2014 in which case it is rethrown."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," scheduler "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:scheduler"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") ()")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," loops "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"addloop"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"++"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"loops")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(loops)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," loops "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"!="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"run"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 2")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 4")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 5")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"3..."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"coroutine"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sleep"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1000"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"2..."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"coroutine"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sleep"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1000"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"1..."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"coroutine"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sleep"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1000"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Boom!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"run"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 3...")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 2...")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1...")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Boom!"))))),(0,r.kt)("h3",{id:"yieldfunc"},(0,r.kt)("inlineCode",{parentName:"h3"},"yieldfunc")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"yieldfunc")," is a property on the scheduler that can be used to customize how the scheduler itself yields. By default, this is a function calling ",(0,r.kt)("inlineCode",{parentName:"p"},"os.sleep(1)"),"."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," scheduler "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:scheduler"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") ()")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Yield to OS every second instead of every millisecond.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"yieldfunc "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," || "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"os"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sleep"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1000"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," loops "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"addloop"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"++"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"loops")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(loops)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," loops "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"!="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"run"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 2")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 4")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 5"))))),(0,r.kt)("h3",{id:"errorfunc"},(0,r.kt)("inlineCode",{parentName:"h3"},"errorfunc")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"errorfunc")," is a property on the scheduler that can optionally be set to customize how the scheduler reports errors in its coroutines. By default, this is ",(0,r.kt)("inlineCode",{parentName:"p"},"nil"),", in which case any coroutine errors are rethrown (via ",(0,r.kt)("inlineCode",{parentName:"p"},"coroutine.xresume"),")."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { scheduler } "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"*"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," sched "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"sched"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"errorfunc "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," |"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"err"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"debug"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"traceback"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(err)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"sched"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"error"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"this is urgent: fatal error"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))))}F.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6d37f50b.658c2143.js b/assets/js/6d37f50b.658c2143.js new file mode 100644 index 00000000..eec075c0 --- /dev/null +++ b/assets/js/6d37f50b.658c2143.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9279],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>N});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),i=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=i(e.components);return n.createElement(p.Provider,{value:t},e.children)},d="mdxType",F={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=i(a),m=r,N=d["".concat(p,".").concat(m)]||d[m]||F[m]||o;return a?n.createElement(N,l(l({ref:t},c),{},{components:a})):n.createElement(N,l({ref:t},c))}));function N(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=m;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[d]="string"==typeof e?e:r,l[1]=s;for(var i=2;i{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>F,frontMatter:()=>o,metadata:()=>s,toc:()=>i});var n=a(7462),r=(a(7294),a(3905));const o={sidebar_position:3},l=void 0,s={unversionedId:"Runtime Environment/Scheduler",id:"Runtime Environment/Scheduler",title:"Scheduler",description:"The scheduler class \u2014 available via require \u2014 can be used to easily set up coroutine-based cooperative multitasking.",source:"@site/docs/Runtime Environment/Scheduler.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Scheduler",permalink:"/docs/Runtime Environment/Scheduler",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"JSON",permalink:"/docs/Runtime Environment/JSON"},next:{title:"Socket",permalink:"/docs/Runtime Environment/Socket"}},p={},i=[{value:"__construct",id:"__construct",level:3},{value:"add",id:"add",level:3},{value:"addloop",id:"addloop",level:3},{value:"run",id:"run",level:3},{value:"yieldfunc",id:"yieldfunc",level:3},{value:"errorfunc",id:"errorfunc",level:3}],c={toc:i},d="wrapper";function F(e){let{components:t,...a}=e;return(0,r.kt)(d,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The scheduler class \u2014 available via ",(0,r.kt)("inlineCode",{parentName:"p"},"require")," \u2014 can be used to easily set up coroutine-based cooperative multitasking."),(0,r.kt)("h3",{id:"__construct"},(0,r.kt)("inlineCode",{parentName:"h3"},"__construct")),(0,r.kt)("p",null,"The constructor takes no arguments."),(0,r.kt)("h3",{id:"add"},(0,r.kt)("inlineCode",{parentName:"h3"},"add")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"add")," method can be used to turn a function into a coroutine. The coroutine is resumed once and then added to the scheduler."),(0,r.kt)("h3",{id:"addloop"},(0,r.kt)("inlineCode",{parentName:"h3"},"addloop")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"addloop")," method is a wrapper for the ",(0,r.kt)("inlineCode",{parentName:"p"},"add")," method that keeps invoking the given function until it returns false."),(0,r.kt)("h3",{id:"run"},(0,r.kt)("inlineCode",{parentName:"h3"},"run")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"run")," method activates the scheduler. The scheduler resumes all coroutines and then calls its yieldfunc until either all coroutines are finished, or coroutine throws an error \u2014 in which case it is rethrown."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," scheduler "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:scheduler"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") ()")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," loops "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"addloop"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"++"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"loops")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(loops)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," loops "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"!="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"run"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 2")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 4")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 5")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"3..."'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"coroutine"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sleep"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1000"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"2..."'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"coroutine"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sleep"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1000"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"1..."'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"coroutine"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sleep"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1000"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Boom!"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"run"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 3...")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 2...")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1...")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Boom!"))))),(0,r.kt)("h3",{id:"yieldfunc"},(0,r.kt)("inlineCode",{parentName:"h3"},"yieldfunc")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"yieldfunc")," is a property on the scheduler that can be used to customize how the scheduler itself yields. By default, this is a function calling ",(0,r.kt)("inlineCode",{parentName:"p"},"os.sleep(1)"),"."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," scheduler "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:scheduler"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") ()")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Yield to OS every second instead of every millisecond.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"yieldfunc "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," || "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"os"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sleep"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1000"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," loops "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"addloop"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"++"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"loops")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(loops)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," loops "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"!="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"run"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 2")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 4")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 5"))))),(0,r.kt)("h3",{id:"errorfunc"},(0,r.kt)("inlineCode",{parentName:"h3"},"errorfunc")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"errorfunc")," is a property on the scheduler that can optionally be set to customize how the scheduler reports errors in its coroutines. By default, this is ",(0,r.kt)("inlineCode",{parentName:"p"},"nil"),", in which case any coroutine errors are rethrown (via ",(0,r.kt)("inlineCode",{parentName:"p"},"coroutine.xresume"),")."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { scheduler } "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"*"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," sched "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"scheduler"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"sched"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"errorfunc "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," |"),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"err"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"debug"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"traceback"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(err)) "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"sched"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"add"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"error"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"this is urgent: fatal error"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))))}F.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7efe30ee.2453841d.js b/assets/js/7efe30ee.2453841d.js new file mode 100644 index 00000000..77f19a2e --- /dev/null +++ b/assets/js/7efe30ee.2453841d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6038],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>y});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),p=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(a),F=n,y=d["".concat(i,".").concat(F)]||d[F]||m[F]||o;return a?r.createElement(y,s(s({ref:t},c),{},{components:a})):r.createElement(y,s({ref:t},c))}));function y(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,s=new Array(o);s[0]=F;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[d]="string"==typeof e?e:n,s[1]=l;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:1},s=void 0,l={unversionedId:"New Features/Ternary Expressions",id:"New Features/Ternary Expressions",title:"Ternary Expressions",description:"Ternary expressions behave identical as to how they would in C. They introduce no new keywords.",source:"@site/docs/New Features/Ternary Expressions.md",sourceDirName:"New Features",slug:"/New Features/Ternary Expressions",permalink:"/docs/New Features/Ternary Expressions",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Switch Blocks",permalink:"/docs/New Features/Switch Blocks"},next:{title:"Type Hinting",permalink:"/docs/New Features/Type Hinting"}},i={},p=[{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Doesn't Lua already have ternaries?",id:"doesnt-lua-already-have-ternaries",level:2}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Ternary expressions behave identical as to how they would in C. They introduce no new keywords."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Old Code"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Old Code"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," max")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},">"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," max "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"else")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," max "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"New Code"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"New Code"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," max "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},">"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"?"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b"))))),(0,n.kt)("h4",{id:"try-it-yourself"},(0,n.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20a%20%3D%206%0Alocal%20b%20%3D%209%0A%0Alocal%20max%20%3D%20a%20%3E%20b%20%3F%20a%20%3A%20b%0A%0Aprint(max)"},"Try It Yourself")),(0,n.kt)("h2",{id:"doesnt-lua-already-have-ternaries"},"Doesn't Lua already have ternaries?"),(0,n.kt)("p",null,"While it is true that you can do something like this:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," max "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},">"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"and"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"or"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b"))))),(0,n.kt)("p",null,"Keep in mind that this falls apart when the true-expression has a falsy value:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," x "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"-"),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"x "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," (x "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"-"),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"and"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"or"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," x)"))))),(0,n.kt)("p",null,"In this case, x will be -1 despite the intention being to set it to nil. There are no such issues using Pluto's ternary expressions."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7efe30ee.584baef8.js b/assets/js/7efe30ee.584baef8.js deleted file mode 100644 index 938460d9..00000000 --- a/assets/js/7efe30ee.584baef8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6038],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>y});var r=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var c=r.createContext({}),i=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=i(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var a=e.components,o=e.mdxType,n=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=i(a),F=o,y=d["".concat(c,".").concat(F)]||d[F]||m[F]||n;return a?r.createElement(y,l(l({ref:t},p),{},{components:a})):r.createElement(y,l({ref:t},p))}));function y(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=a.length,l=new Array(n);l[0]=F;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:o,l[1]=s;for(var i=2;i{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>i});var r=a(7462),o=(a(7294),a(3905));const n={sidebar_position:1},l=void 0,s={unversionedId:"New Features/Ternary Expressions",id:"New Features/Ternary Expressions",title:"Ternary Expressions",description:"Ternary expressions behave identical as to how they would in C. They introduce no new keywords.",source:"@site/docs/New Features/Ternary Expressions.md",sourceDirName:"New Features",slug:"/New Features/Ternary Expressions",permalink:"/docs/New Features/Ternary Expressions",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Switch Blocks",permalink:"/docs/New Features/Switch Blocks"},next:{title:"Type Hinting",permalink:"/docs/New Features/Type Hinting"}},c={},i=[{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Doesn't Lua already have ternaries?",id:"doesnt-lua-already-have-ternaries",level:2}],p={toc:i},d="wrapper";function m(e){let{components:t,...a}=e;return(0,o.kt)(d,(0,r.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Ternary expressions behave identical as to how they would in C. They introduce no new keywords."),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Old Code"},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"Old Code"),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," max")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},">"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," max "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"else")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," max "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"New Code"},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"New Code"),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," max "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},">"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"?"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b"))))),(0,o.kt)("h4",{id:"try-it-yourself"},(0,o.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20a%20%3D%206%0Alocal%20b%20%3D%209%0A%0Alocal%20max%20%3D%20a%20%3E%20b%20%3F%20a%20%3A%20b%0A%0Aprint(max)"},"Try It Yourself")),(0,o.kt)("h2",{id:"doesnt-lua-already-have-ternaries"},"Doesn't Lua already have ternaries?"),(0,o.kt)("p",null,"While it is true that you can do something like this:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," max "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},">"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"and"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"or"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b"))))),(0,o.kt)("p",null,"Keep in mind that this falls apart when the true-expression has a falsy value:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," x "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"-"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"x "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," (x "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"-"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"and"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"or"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," x)"))))),(0,o.kt)("p",null,"In this case, x will be -1 despite the intention being to set it to nil. There are no such issues using Pluto's ternary expressions."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/83156343.0a7cfa6e.js b/assets/js/83156343.0a7cfa6e.js new file mode 100644 index 00000000..11209812 --- /dev/null +++ b/assets/js/83156343.0a7cfa6e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[3466],{3905:(e,t,a)=>{a.d(t,{Zo:()=>i,kt:()=>v});var n=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var p=n.createContext({}),F=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},i=function(e){var t=F(e.components);return n.createElement(p.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,p=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),c=F(a),m=o,v=c["".concat(p,".").concat(m)]||c[m]||d[m]||r;return a?n.createElement(v,l(l({ref:t},i),{},{components:a})):n.createElement(v,l({ref:t},i))}));function v(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,l=new Array(r);l[0]=m;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[c]="string"==typeof e?e:o,l[1]=s;for(var F=2;F{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>d,frontMatter:()=>r,metadata:()=>s,toc:()=>F});var n=a(7462),o=(a(7294),a(3905));const r={sidebar_position:3},l=void 0,s={unversionedId:"Runtime Environment/Vector3",id:"Runtime Environment/Vector3",title:"Vector3",description:"Must be included via require.",source:"@site/docs/Runtime Environment/Vector3.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Vector3",permalink:"/docs/Runtime Environment/Vector3",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"URL",permalink:"/docs/Runtime Environment/URL"},next:{title:"XML",permalink:"/docs/Runtime Environment/XML"}},p={},F=[{value:"__construct",id:"__construct",level:3},{value:"__tostring",id:"__tostring",level:3},{value:"__add, __sub, __mul, __div",id:"__add-__sub-__mul-__div",level:3},{value:"__eq",id:"__eq",level:3},{value:"__len, magnitude",id:"__len-magnitude",level:3},{value:"sum",id:"sum",level:3},{value:"min",id:"min",level:3},{value:"max",id:"max",level:3},{value:"dot",id:"dot",level:3},{value:"abs",id:"abs",level:3},{value:"normalized, normalised",id:"normalized-normalised",level:3},{value:"torot",id:"torot",level:3},{value:"lookat",id:"lookat",level:3},{value:"todir",id:"todir",level:3}],i={toc:F},c="wrapper";function d(e){let{components:t,...a}=e;return(0,o.kt)(c,(0,n.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Must be included via ",(0,o.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"__construct"},(0,o.kt)("inlineCode",{parentName:"h3"},"__construct")),(0,o.kt)("p",null,"The constructor takes up to 3 arguments:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vector3 "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e vector3(0, 0, 0)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e vector3(1, 1, 1)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e vector3(1, 2, 0)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e vector3(1, 2, 3)"))))),(0,o.kt)("p",null,"There is also a shorthand for this:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vector3 "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e vector3(1, 2, 3)"))))),(0,o.kt)("h3",{id:"__tostring"},(0,o.kt)("inlineCode",{parentName:"h3"},"__tostring")),(0,o.kt)("p",null,"As seen above, the ",(0,o.kt)("inlineCode",{parentName:"p"},"__tostring")," metamethod provides a string representation of the class."),(0,o.kt)("h3",{id:"__add-__sub-__mul-__div"},(0,o.kt)("inlineCode",{parentName:"h3"},"__add"),", ",(0,o.kt)("inlineCode",{parentName:"h3"},"__sub"),", ",(0,o.kt)("inlineCode",{parentName:"h3"},"__mul"),", ",(0,o.kt)("inlineCode",{parentName:"h3"},"__div")),(0,o.kt)("p",null,"Vector3 instances support arithmetic operations. The right-hand side can either be a Vector3 instance or a number. They create a new instance for the result."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vector3 "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e vector3(3, 3, 3)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0.6"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0.4"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"*"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e vector3(0, 1.8, 1.2)"))))),(0,o.kt)("h3",{id:"__eq"},(0,o.kt)("inlineCode",{parentName:"h3"},"__eq")),(0,o.kt)("p",null,"Vector3 instances can effortlessly be compared to each other."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vector3 "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e false"))))),(0,o.kt)("h3",{id:"__len-magnitude"},(0,o.kt)("inlineCode",{parentName:"h3"},"__len"),", ",(0,o.kt)("inlineCode",{parentName:"h3"},"magnitude")),(0,o.kt)("p",null,"To get the magnitude of a vector, you can either use the unary length operator (",(0,o.kt)("inlineCode",{parentName:"p"},"#"),") or call the ",(0,o.kt)("inlineCode",{parentName:"p"},"magnitude")," method:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vec "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ("),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") ("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"#"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"vec) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 3.7416573867739")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(vec"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"magnitude"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 3.7416573867739"))))),(0,o.kt)("h3",{id:"sum"},(0,o.kt)("inlineCode",{parentName:"h3"},"sum")),(0,o.kt)("p",null,"Computes the sum of the ",(0,o.kt)("inlineCode",{parentName:"p"},"x"),", ",(0,o.kt)("inlineCode",{parentName:"p"},"y")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"z")," fields."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vec "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ("),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") ("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(vec"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sum"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 6"))))),(0,o.kt)("h3",{id:"min"},(0,o.kt)("inlineCode",{parentName:"h3"},"min")),(0,o.kt)("p",null,"Returns the value of axis with the lowest value."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vec "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ("),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") ("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(vec"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"min"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1"))))),(0,o.kt)("h3",{id:"max"},(0,o.kt)("inlineCode",{parentName:"h3"},"max")),(0,o.kt)("p",null,"Returns the value of axis with the highest value."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vec "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ("),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") ("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(vec"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"max"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 3"))))),(0,o.kt)("h3",{id:"dot"},(0,o.kt)("inlineCode",{parentName:"h3"},"dot")),(0,o.kt)("p",null,"Computes the ",(0,o.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Dot_product"},"dot product")," with the Vector3 given as an argument."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vector3 "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dot"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"))) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 6"))))),(0,o.kt)("h3",{id:"abs"},(0,o.kt)("inlineCode",{parentName:"h3"},"abs")),(0,o.kt)("p",null,"Returns a new Vector3 instance with each axis being an absolute value."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vector3 "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"-"),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"-"),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"abs"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e vector3(1, 2, 3)"))))),(0,o.kt)("h3",{id:"normalized-normalised"},(0,o.kt)("inlineCode",{parentName:"h3"},"normalized"),", ",(0,o.kt)("inlineCode",{parentName:"h3"},"normalised")),(0,o.kt)("p",null,"Returns a new Vector3 instance that is a unit vector equivalent."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vector3 "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"normalized"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e vector3(0.0, 1.0, 0.0)"))))),(0,o.kt)("h3",{id:"torot"},(0,o.kt)("inlineCode",{parentName:"h3"},"torot")),(0,o.kt)("p",null,"Returns a rotation vector based on the direction given by the current vector."),(0,o.kt)("p",null,"You can specify the up-axis and handedness of the coordinate system. By default, a left-handed Y-up system is used."),(0,o.kt)("p",null,"The up-axis also determines which axis contains which value:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Y-Up: Pitch, Yaw, Roll"),(0,o.kt)("li",{parentName:"ul"},"Z-Up: Pitch, Roll, Yaw")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vector3 "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"torot"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"y"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Y up. Pointing up -> vector3(90.0, 0.0, 0)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"-"),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"torot"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"z"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Z up. Pointing down -> vector3(-90.0, 0, -0.0)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"torot"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"yr"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Y up, right-handed. Pointing right -> vector3(0.0, -90.0, 0)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"torot"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"yl"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Y up, left-handed. Pointing right -> vector3(0.0, 90.0, 0)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"torot"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"zr"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Z up, right-handed. Pointing right -> vector3(0.0, 0, 90.0)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"torot"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"y"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Y up. Pointing forward -> vector3(0.0, 0.0, 0)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"-"),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"torot"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"y"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Y up. Pointing backward -> vector3(0.0, 180.0, 0)"))))),(0,o.kt)("h3",{id:"lookat"},(0,o.kt)("inlineCode",{parentName:"h3"},"lookat")),(0,o.kt)("p",null,"Returns a rotation vector based on the position given by the current vector and argument."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," v3 "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"v3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"lookat"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"v3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"y"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Y up. From origin to a point above -> vector3(90.0, 0.0, 0)"))))),(0,o.kt)("h3",{id:"todir"},(0,o.kt)("inlineCode",{parentName:"h3"},"todir")),(0,o.kt)("p",null,"Returns a direction vector based on the rotation given by the current vector."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," vector3 "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:vector3"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"90"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"todir"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"y"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Y up. Pointing up -> vector3(0.0, 1.0, 6.1232339957368e-17)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"90"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"todir"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"yl"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Y up, left-handed. Pointing right -> vector3(1.0, 0.0, 6.1232339957368e-17)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"vector3"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"90"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"todir"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"yr"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Y up, right-handed. Pointing right -> vector3(-1.0, 0.0, 6.1232339957368e-17)"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/83156343.235f58bc.js b/assets/js/83156343.235f58bc.js deleted file mode 100644 index bdaf98d3..00000000 --- a/assets/js/83156343.235f58bc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[3466],{3905:(o,e,t)=>{t.d(e,{Zo:()=>F,kt:()=>v});var a=t(7294);function r(o,e,t){return e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function l(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),t.push.apply(t,a)}return t}function n(o){for(var e=1;e=0||(r[t]=o[t]);return r}(o,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(o);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(o,t)&&(r[t]=o[t])}return r}var s=a.createContext({}),p=function(o){var e=a.useContext(s),t=e;return o&&(t="function"==typeof o?o(e):n(n({},e),o)),t},F=function(o){var e=p(o.components);return a.createElement(s.Provider,{value:e},o.children)},i="mdxType",d={inlineCode:"code",wrapper:function(o){var e=o.children;return a.createElement(a.Fragment,{},e)}},m=a.forwardRef((function(o,e){var t=o.components,r=o.mdxType,l=o.originalType,s=o.parentName,F=c(o,["components","mdxType","originalType","parentName"]),i=p(t),m=r,v=i["".concat(s,".").concat(m)]||i[m]||d[m]||l;return t?a.createElement(v,n(n({ref:e},F),{},{components:t})):a.createElement(v,n({ref:e},F))}));function v(o,e){var t=arguments,r=e&&e.mdxType;if("string"==typeof o||r){var l=t.length,n=new Array(l);n[0]=m;var c={};for(var s in e)hasOwnProperty.call(e,s)&&(c[s]=e[s]);c.originalType=o,c[i]="string"==typeof o?o:r,n[1]=c;for(var p=2;p{t.r(e),t.d(e,{assets:()=>s,contentTitle:()=>n,default:()=>d,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var a=t(7462),r=(t(7294),t(3905));const l={sidebar_position:3},n=void 0,c={unversionedId:"Runtime Environment/Vector3",id:"Runtime Environment/Vector3",title:"Vector3",description:"Must be included via require.",source:"@site/docs/Runtime Environment/Vector3.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Vector3",permalink:"/docs/Runtime Environment/Vector3",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"URL",permalink:"/docs/Runtime Environment/URL"},next:{title:"XML",permalink:"/docs/Runtime Environment/XML"}},s={},p=[{value:"__construct",id:"__construct",level:3},{value:"__tostring",id:"__tostring",level:3},{value:"__add, __sub, __mul, __div",id:"__add-__sub-__mul-__div",level:3},{value:"__eq",id:"__eq",level:3},{value:"__len, magnitude",id:"__len-magnitude",level:3},{value:"sum",id:"sum",level:3},{value:"min",id:"min",level:3},{value:"max",id:"max",level:3},{value:"dot",id:"dot",level:3},{value:"abs",id:"abs",level:3},{value:"normalized, normalised",id:"normalized-normalised",level:3},{value:"torot",id:"torot",level:3},{value:"lookat",id:"lookat",level:3},{value:"todir",id:"todir",level:3}],F={toc:p},i="wrapper";function d(o){let{components:e,...t}=o;return(0,r.kt)(i,(0,a.Z)({},F,t,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Must be included via ",(0,r.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"__construct"},(0,r.kt)("inlineCode",{parentName:"h3"},"__construct")),(0,r.kt)("p",null,"The constructor takes up to 3 arguments:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vector3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e vector3(0, 0, 0)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e vector3(1, 1, 1)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e vector3(1, 2, 0)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e vector3(1, 2, 3)"))))),(0,r.kt)("p",null,"There is also a shorthand for this:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vector3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e vector3(1, 2, 3)"))))),(0,r.kt)("h3",{id:"__tostring"},(0,r.kt)("inlineCode",{parentName:"h3"},"__tostring")),(0,r.kt)("p",null,"As seen above, the ",(0,r.kt)("inlineCode",{parentName:"p"},"__tostring")," metamethod provides a string representation of the class."),(0,r.kt)("h3",{id:"__add-__sub-__mul-__div"},(0,r.kt)("inlineCode",{parentName:"h3"},"__add"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"__sub"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"__mul"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"__div")),(0,r.kt)("p",null,"Vector3 instances support arithmetic operations. The right-hand side can either be a Vector3 instance or a number. They create a new instance for the result."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vector3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e vector3(3, 3, 3)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0.6"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0.4"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"*"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e vector3(0, 1.8, 1.2)"))))),(0,r.kt)("h3",{id:"__eq"},(0,r.kt)("inlineCode",{parentName:"h3"},"__eq")),(0,r.kt)("p",null,"Vector3 instances can effortlessly be compared to each other."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vector3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e false"))))),(0,r.kt)("h3",{id:"__len-magnitude"},(0,r.kt)("inlineCode",{parentName:"h3"},"__len"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"magnitude")),(0,r.kt)("p",null,"To get the magnitude of a vector, you can either use the unary length operator (",(0,r.kt)("inlineCode",{parentName:"p"},"#"),") or call the ",(0,r.kt)("inlineCode",{parentName:"p"},"magnitude")," method:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vec "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") ("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"#"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"vec) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 3.7416573867739")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(vec"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"magnitude"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 3.7416573867739"))))),(0,r.kt)("h3",{id:"sum"},(0,r.kt)("inlineCode",{parentName:"h3"},"sum")),(0,r.kt)("p",null,"Computes the sum of the ",(0,r.kt)("inlineCode",{parentName:"p"},"x"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"y")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"z")," fields."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vec "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") ("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(vec"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 6"))))),(0,r.kt)("h3",{id:"min"},(0,r.kt)("inlineCode",{parentName:"h3"},"min")),(0,r.kt)("p",null,"Returns the value of axis with the lowest value."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vec "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") ("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(vec"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"min"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1"))))),(0,r.kt)("h3",{id:"max"},(0,r.kt)("inlineCode",{parentName:"h3"},"max")),(0,r.kt)("p",null,"Returns the value of axis with the highest value."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vec "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") ("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(vec"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"max"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 3"))))),(0,r.kt)("h3",{id:"dot"},(0,r.kt)("inlineCode",{parentName:"h3"},"dot")),(0,r.kt)("p",null,"Computes the ",(0,r.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Dot_product"},"dot product")," with the Vector3 given as an argument."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vector3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dot"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"))) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 6"))))),(0,r.kt)("h3",{id:"abs"},(0,r.kt)("inlineCode",{parentName:"h3"},"abs")),(0,r.kt)("p",null,"Returns a new Vector3 instance with each axis being an absolute value."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vector3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"-"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"-"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"abs"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e vector3(1, 2, 3)"))))),(0,r.kt)("h3",{id:"normalized-normalised"},(0,r.kt)("inlineCode",{parentName:"h3"},"normalized"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"normalised")),(0,r.kt)("p",null,"Returns a new Vector3 instance that is a unit vector equivalent."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vector3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"normalized"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e vector3(0.0, 1.0, 0.0)"))))),(0,r.kt)("h3",{id:"torot"},(0,r.kt)("inlineCode",{parentName:"h3"},"torot")),(0,r.kt)("p",null,"Returns a rotation vector based on the direction given by the current vector."),(0,r.kt)("p",null,"You can specify the up-axis and handedness of the coordinate system. By default, a left-handed Y-up system is used."),(0,r.kt)("p",null,"The up-axis also determines which axis contains which value:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Y-Up: Pitch, Yaw, Roll"),(0,r.kt)("li",{parentName:"ul"},"Z-Up: Pitch, Roll, Yaw")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vector3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"torot"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"y"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Y up. Pointing up -> vector3(90.0, 0.0, 0)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"-"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"torot"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"z"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Z up. Pointing down -> vector3(-90.0, 0, -0.0)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"torot"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"yr"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Y up, right-handed. Pointing right -> vector3(0.0, -90.0, 0)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"torot"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"yl"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Y up, left-handed. Pointing right -> vector3(0.0, 90.0, 0)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"torot"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"zr"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Z up, right-handed. Pointing right -> vector3(0.0, 0, 90.0)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"torot"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"y"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Y up. Pointing forward -> vector3(0.0, 0.0, 0)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"-"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"torot"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"y"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Y up. Pointing backward -> vector3(0.0, 180.0, 0)"))))),(0,r.kt)("h3",{id:"lookat"},(0,r.kt)("inlineCode",{parentName:"h3"},"lookat")),(0,r.kt)("p",null,"Returns a rotation vector based on the position given by the current vector and argument."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," v3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"v3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"lookat"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"v3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"y"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Y up. From origin to a point above -> vector3(90.0, 0.0, 0)"))))),(0,r.kt)("h3",{id:"todir"},(0,r.kt)("inlineCode",{parentName:"h3"},"todir")),(0,r.kt)("p",null,"Returns a direction vector based on the rotation given by the current vector."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," vector3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:vector3"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"90"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"todir"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"y"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Y up. Pointing up -> vector3(0.0, 1.0, 6.1232339957368e-17)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"90"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"todir"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"yl"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Y up, left-handed. Pointing right -> vector3(1.0, 0.0, 6.1232339957368e-17)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"vector3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"90"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"todir"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"yr"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Y up, right-handed. Pointing right -> vector3(-1.0, 0.0, 6.1232339957368e-17)"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/871e1111.32fd18b2.js b/assets/js/871e1111.32fd18b2.js deleted file mode 100644 index 2fa0cbfc..00000000 --- a/assets/js/871e1111.32fd18b2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[2890],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>k});var a=o(7294);function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function l(e){for(var t=1;t=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var c=a.createContext({}),s=function(e){var t=a.useContext(c),o=t;return e&&(o="function"==typeof e?e(t):l(l({},t),e)),o},p=function(e){var t=s(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},F=a.forwardRef((function(e,t){var o=e.components,n=e.mdxType,r=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=s(o),F=n,k=d["".concat(c,".").concat(F)]||d[F]||m[F]||r;return o?a.createElement(k,l(l({ref:t},p),{},{components:o})):a.createElement(k,l({ref:t},p))}));function k(e,t){var o=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=o.length,l=new Array(r);l[0]=F;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:n,l[1]=i;for(var s=2;s{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>r,metadata:()=>i,toc:()=>s});var a=o(7462),n=(o(7294),o(3905));const r={sidebar_position:3},l=void 0,i={unversionedId:"Runtime Environment/Bigint",id:"Runtime Environment/Bigint",title:"Bigint",description:"Must be included via require.",source:"@site/docs/Runtime Environment/Bigint.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Bigint",permalink:"/docs/Runtime Environment/Bigint",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Base64",permalink:"/docs/Runtime Environment/Base64"},next:{title:"CaT",permalink:"/docs/Runtime Environment/CaT"}},c={},s=[{value:"bigint.new",id:"bigintnew",level:3},{value:"Parameters",id:"parameters",level:4},{value:"bigint.tostring, __tostring",id:"biginttostring-__tostring",level:3},{value:"bigint.hex",id:"biginthex",level:3},{value:"bigint.binary",id:"bigintbinary",level:3},{value:"bigint.add, __add",id:"bigintadd-__add",level:3},{value:"bigint.sub, __sub",id:"bigintsub-__sub",level:3},{value:"bigint.mul, __mul",id:"bigintmul-__mul",level:3},{value:"bigint.div",id:"bigintdiv",level:3},{value:"__div",id:"__div",level:3},{value:"bigint.mod, __mod",id:"bigintmod-__mod",level:3},{value:"bigint.pow, __pow",id:"bigintpow-__pow",level:3},{value:"bigint.bitlength",id:"bigintbitlength",level:3}],p={toc:s},d="wrapper";function m(e){let{components:t,...o}=e;return(0,n.kt)(d,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Must be included via ",(0,n.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"bigintnew"},(0,n.kt)("inlineCode",{parentName:"h3"},"bigint.new")),(0,n.kt)("p",null,"To instantiate a bigint, you can call the ",(0,n.kt)("inlineCode",{parentName:"p"},"bigint.new")," function, or use the ",(0,n.kt)("inlineCode",{parentName:"p"},"new")," operator."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The decimal value of the bigint.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bigint "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:bigint"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"123"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 123"))))),(0,n.kt)("h3",{id:"biginttostring-__tostring"},(0,n.kt)("inlineCode",{parentName:"h3"},"bigint.tostring"),", ",(0,n.kt)("inlineCode",{parentName:"h3"},"__tostring")),(0,n.kt)("p",null,"As seen above, the ",(0,n.kt)("inlineCode",{parentName:"p"},"__tostring")," metamethod provides a string representation of the Bigint in decimal."),(0,n.kt)("h3",{id:"biginthex"},(0,n.kt)("inlineCode",{parentName:"h3"},"bigint.hex")),(0,n.kt)("p",null,"Provides a hexadecimal representation of the Bigint."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bigint "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:bigint"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"420"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"hex"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1A4"))))),(0,n.kt)("h3",{id:"bigintbinary"},(0,n.kt)("inlineCode",{parentName:"h3"},"bigint.binary")),(0,n.kt)("p",null,"Provides a binary representation of the Bigint."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bigint "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:bigint"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"420"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"binary"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 110100100"))))),(0,n.kt)("h3",{id:"bigintadd-__add"},(0,n.kt)("inlineCode",{parentName:"h3"},"bigint.add"),", ",(0,n.kt)("inlineCode",{parentName:"h3"},"__add")),(0,n.kt)("p",null,"Adds two bigints together. Returns a new bigint."),(0,n.kt)("h3",{id:"bigintsub-__sub"},(0,n.kt)("inlineCode",{parentName:"h3"},"bigint.sub"),", ",(0,n.kt)("inlineCode",{parentName:"h3"},"__sub")),(0,n.kt)("p",null,"Performs subtraction on two bigints. Returns a new bigint."),(0,n.kt)("h3",{id:"bigintmul-__mul"},(0,n.kt)("inlineCode",{parentName:"h3"},"bigint.mul"),", ",(0,n.kt)("inlineCode",{parentName:"h3"},"__mul")),(0,n.kt)("p",null,"Performs multiplication on two bigints. Returns a new bigint."),(0,n.kt)("h3",{id:"bigintdiv"},(0,n.kt)("inlineCode",{parentName:"h3"},"bigint.div")),(0,n.kt)("p",null,"Performs division on two bigints. Returns two new bigints: quotient and remainder."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bigint "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:bigint"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"div"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"))) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 3 1"))))),(0,n.kt)("h3",{id:"__div"},(0,n.kt)("inlineCode",{parentName:"h3"},"__div")),(0,n.kt)("p",null,"Performs division on two bigints. Returns a new bigint with the quotient."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bigint "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:bigint"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"/"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 3"))))),(0,n.kt)("h3",{id:"bigintmod-__mod"},(0,n.kt)("inlineCode",{parentName:"h3"},"bigint.mod"),", ",(0,n.kt)("inlineCode",{parentName:"h3"},"__mod")),(0,n.kt)("p",null,"Performs divison on two bigints. Returns a new bigint with the remainder."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bigint "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:bigint"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"%"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1"))))),(0,n.kt)("h3",{id:"bigintpow-__pow"},(0,n.kt)("inlineCode",{parentName:"h3"},"bigint.pow"),", ",(0,n.kt)("inlineCode",{parentName:"h3"},"__pow")),(0,n.kt)("p",null,"Performs expontentiation on two bigints. Returns a new bigint."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bigint "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:bigint"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"^"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1024"))))),(0,n.kt)("h3",{id:"bigintbitlength"},(0,n.kt)("inlineCode",{parentName:"h3"},"bigint.bitlength")),(0,n.kt)("p",null,"Returns the position of the most significant set bit as a plain integer."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bigint "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:bigint"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bigint"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"420"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"bitlength"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 9"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/871e1111.6b7e451c.js b/assets/js/871e1111.6b7e451c.js new file mode 100644 index 00000000..da1bc1f5 --- /dev/null +++ b/assets/js/871e1111.6b7e451c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[2890],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>k});var n=a(7294);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var s=n.createContext({}),p=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},d=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},F=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),c=p(a),F=i,k=c["".concat(s,".").concat(F)]||c[F]||m[F]||o;return a?n.createElement(k,r(r({ref:t},d),{},{components:a})):n.createElement(k,r({ref:t},d))}));function k(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=a.length,r=new Array(o);r[0]=F;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:i,r[1]=l;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=a(7462),i=(a(7294),a(3905));const o={sidebar_position:3},r=void 0,l={unversionedId:"Runtime Environment/Bigint",id:"Runtime Environment/Bigint",title:"Bigint",description:"Must be included via require.",source:"@site/docs/Runtime Environment/Bigint.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Bigint",permalink:"/docs/Runtime Environment/Bigint",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Base64",permalink:"/docs/Runtime Environment/Base64"},next:{title:"CaT",permalink:"/docs/Runtime Environment/CaT"}},s={},p=[{value:"bigint.new",id:"bigintnew",level:3},{value:"Parameters",id:"parameters",level:4},{value:"bigint.tostring, __tostring",id:"biginttostring-__tostring",level:3},{value:"bigint.hex",id:"biginthex",level:3},{value:"bigint.binary",id:"bigintbinary",level:3},{value:"bigint.add, __add",id:"bigintadd-__add",level:3},{value:"bigint.sub, __sub",id:"bigintsub-__sub",level:3},{value:"bigint.mul, __mul",id:"bigintmul-__mul",level:3},{value:"bigint.div",id:"bigintdiv",level:3},{value:"__div",id:"__div",level:3},{value:"bigint.mod, __mod",id:"bigintmod-__mod",level:3},{value:"bigint.pow, __pow",id:"bigintpow-__pow",level:3},{value:"bigint.bitlength",id:"bigintbitlength",level:3}],d={toc:p},c="wrapper";function m(e){let{components:t,...a}=e;return(0,i.kt)(c,(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Must be included via ",(0,i.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"bigintnew"},(0,i.kt)("inlineCode",{parentName:"h3"},"bigint.new")),(0,i.kt)("p",null,"To instantiate a bigint, you can call the ",(0,i.kt)("inlineCode",{parentName:"p"},"bigint.new")," function, or use the ",(0,i.kt)("inlineCode",{parentName:"p"},"new")," operator."),(0,i.kt)("h4",{id:"parameters"},"Parameters"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"The decimal value of the bigint.")),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bigint "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:bigint"')),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"123"'),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,i.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 123"))))),(0,i.kt)("h3",{id:"biginttostring-__tostring"},(0,i.kt)("inlineCode",{parentName:"h3"},"bigint.tostring"),", ",(0,i.kt)("inlineCode",{parentName:"h3"},"__tostring")),(0,i.kt)("p",null,"As seen above, the ",(0,i.kt)("inlineCode",{parentName:"p"},"__tostring")," metamethod provides a string representation of the Bigint in decimal."),(0,i.kt)("h3",{id:"biginthex"},(0,i.kt)("inlineCode",{parentName:"h3"},"bigint.hex")),(0,i.kt)("p",null,"Provides a hexadecimal representation of the Bigint."),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bigint "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:bigint"')),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"420"'),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,i.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"hex"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,i.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1A4"))))),(0,i.kt)("h3",{id:"bigintbinary"},(0,i.kt)("inlineCode",{parentName:"h3"},"bigint.binary")),(0,i.kt)("p",null,"Provides a binary representation of the Bigint."),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bigint "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:bigint"')),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"420"'),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,i.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"binary"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,i.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 110100100"))))),(0,i.kt)("h3",{id:"bigintadd-__add"},(0,i.kt)("inlineCode",{parentName:"h3"},"bigint.add"),", ",(0,i.kt)("inlineCode",{parentName:"h3"},"__add")),(0,i.kt)("p",null,"Adds two bigints together. Returns a new bigint."),(0,i.kt)("h3",{id:"bigintsub-__sub"},(0,i.kt)("inlineCode",{parentName:"h3"},"bigint.sub"),", ",(0,i.kt)("inlineCode",{parentName:"h3"},"__sub")),(0,i.kt)("p",null,"Performs subtraction on two bigints. Returns a new bigint."),(0,i.kt)("h3",{id:"bigintmul-__mul"},(0,i.kt)("inlineCode",{parentName:"h3"},"bigint.mul"),", ",(0,i.kt)("inlineCode",{parentName:"h3"},"__mul")),(0,i.kt)("p",null,"Performs multiplication on two bigints. Returns a new bigint."),(0,i.kt)("h3",{id:"bigintdiv"},(0,i.kt)("inlineCode",{parentName:"h3"},"bigint.div")),(0,i.kt)("p",null,"Performs division on two bigints. Returns two new bigints: quotient and remainder."),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bigint "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:bigint"')),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,i.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"div"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"))) "),(0,i.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 3 1"))))),(0,i.kt)("h3",{id:"__div"},(0,i.kt)("inlineCode",{parentName:"h3"},"__div")),(0,i.kt)("p",null,"Performs division on two bigints. Returns a new bigint with the quotient."),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bigint "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:bigint"')),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"/"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,i.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 3"))))),(0,i.kt)("h3",{id:"bigintmod-__mod"},(0,i.kt)("inlineCode",{parentName:"h3"},"bigint.mod"),", ",(0,i.kt)("inlineCode",{parentName:"h3"},"__mod")),(0,i.kt)("p",null,"Performs divison on two bigints. Returns a new bigint with the remainder."),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bigint "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:bigint"')),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"%"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,i.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1"))))),(0,i.kt)("h3",{id:"bigintpow-__pow"},(0,i.kt)("inlineCode",{parentName:"h3"},"bigint.pow"),", ",(0,i.kt)("inlineCode",{parentName:"h3"},"__pow")),(0,i.kt)("p",null,"Performs expontentiation on two bigints. Returns a new bigint."),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bigint "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:bigint"')),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"^"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,i.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1024"))))),(0,i.kt)("h3",{id:"bigintbitlength"},(0,i.kt)("inlineCode",{parentName:"h3"},"bigint.bitlength")),(0,i.kt)("p",null,"Returns the position of the most significant set bit as a plain integer."),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bigint "),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:bigint"')),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bigint"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,i.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"420"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,i.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,i.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"bitlength"),(0,i.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,i.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 9"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8c64e7a6.130a079e.js b/assets/js/8c64e7a6.130a079e.js new file mode 100644 index 00000000..198f29d4 --- /dev/null +++ b/assets/js/8c64e7a6.130a079e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5507],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>y});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=s(n),u=r,y=m["".concat(p,".").concat(u)]||m[u]||d[u]||i;return n?a.createElement(y,o(o({ref:t},c),{},{components:n})):a.createElement(y,o({ref:t},c))}));function y(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=u;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[m]="string"==typeof e?e:r,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var a=n(7462),r=(n(7294),n(3905));const i={sidebar_position:1},o=void 0,l={unversionedId:"New Features/Type Hinting",id:"New Features/Type Hinting",title:"Type Hinting",description:"Type-hinting looks like this:",source:"@site/docs/New Features/Type Hinting.md",sourceDirName:"New Features",slug:"/New Features/Type Hinting",permalink:"/docs/New Features/Type Hinting",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Ternary Expressions",permalink:"/docs/New Features/Ternary Expressions"},next:{title:"Compile-Time Evaluation",permalink:"/docs/New Features/Compile-Time Evaluation"}},p={},s=[{value:"What types can I use?",id:"what-types-can-i-use",level:3}],c={toc:s},m="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Type-hinting looks like this:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," var"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world"'))))),(0,r.kt)("p",null,"It works with functions too:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"myfunc"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"number")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"tonumber"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(a) "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"tonumber"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(b)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"myfunc"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"1"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- This will emit a warning for argument type mismatch."))))),(0,r.kt)("p",null,"There's no effect on performance. This is implemented entirely during the compilation phase."),(0,r.kt)("h3",{id:"what-types-can-i-use"},"What types can I use?"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"string")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"number"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"int")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"float")))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"boolean"),"/",(0,r.kt)("inlineCode",{parentName:"li"},"bool")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"function")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"table")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"userdata")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"void")," (return type only)")),(0,r.kt)("p",null,"Prefix a ",(0,r.kt)("inlineCode",{parentName:"p"},"?")," to indicate nil-able types, e.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"?string")," indicates that it may be nil or a string."),(0,r.kt)("p",null,"You can also use ",(0,r.kt)("inlineCode",{parentName:"p"},"|")," to delimit alternatives, e.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"string|int")," indicates that it may be a string or an int."),(0,r.kt)("p",null,"Putting all of this together, we could also have e.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"?string|int")," to indicate that it may be nil, a string, or an int."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"This is a WIP feature, and it's very difficult to implement in a one-pass compiler. Allow tolerance for missing coverage, and report any bugs.")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8c64e7a6.5ab6caff.js b/assets/js/8c64e7a6.5ab6caff.js deleted file mode 100644 index f9649a2f..00000000 --- a/assets/js/8c64e7a6.5ab6caff.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5507],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>y});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,p=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=s(n),u=r,y=m["".concat(p,".").concat(u)]||m[u]||d[u]||o;return n?a.createElement(y,l(l({ref:t},c),{},{components:n})):a.createElement(y,l({ref:t},c))}));function y(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=u;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[m]="string"==typeof e?e:r,l[1]=i;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>s});var a=n(7462),r=(n(7294),n(3905));const o={sidebar_position:1},l=void 0,i={unversionedId:"New Features/Type Hinting",id:"New Features/Type Hinting",title:"Type Hinting",description:"Type-hinting looks like this:",source:"@site/docs/New Features/Type Hinting.md",sourceDirName:"New Features",slug:"/New Features/Type Hinting",permalink:"/docs/New Features/Type Hinting",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Ternary Expressions",permalink:"/docs/New Features/Ternary Expressions"},next:{title:"Compile-Time Evaluation",permalink:"/docs/New Features/Compile-Time Evaluation"}},p={},s=[{value:"What types can I use?",id:"what-types-can-i-use",level:3}],c={toc:s},m="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Type-hinting looks like this:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," var"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world"'))))),(0,r.kt)("p",null,"It works with functions too:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"myfunc"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"number")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"tonumber"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(a) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"tonumber"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(b)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"myfunc"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"1"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- This will emit a warning for argument type mismatch."))))),(0,r.kt)("p",null,"There's no effect on performance. This is implemented entirely during the compilation phase."),(0,r.kt)("h3",{id:"what-types-can-i-use"},"What types can I use?"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"string")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"number"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"int")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"float")))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"boolean"),"/",(0,r.kt)("inlineCode",{parentName:"li"},"bool")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"function")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"table")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"userdata")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"void")," (return type only)")),(0,r.kt)("p",null,"Prefix a ",(0,r.kt)("inlineCode",{parentName:"p"},"?")," to indicate nil-able types, e.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"?string")," indicates that it may be nil or a string."),(0,r.kt)("p",null,"You can also use ",(0,r.kt)("inlineCode",{parentName:"p"},"|")," to delimit alternatives, e.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"string|int")," indicates that it may be a string or an int."),(0,r.kt)("p",null,"Putting all of this together, we could also have e.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"?string|int")," to indicate that it may be nil, a string, or an int."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"This is a WIP feature, and it's very difficult to implement in a one-pass compiler. Allow tolerance for missing coverage, and report any bugs.")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8d7b091f.0ff1cec4.js b/assets/js/8d7b091f.0ff1cec4.js deleted file mode 100644 index b6b87b9c..00000000 --- a/assets/js/8d7b091f.0ff1cec4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5559],{3905:(e,t,o)=>{o.d(t,{Zo:()=>i,kt:()=>y});var a=o(7294);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function l(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function n(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),o=t;return e&&(o="function"==typeof e?e(t):n(n({},t),e)),o},i=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},F="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var o=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),F=p(o),m=r,y=F["".concat(s,".").concat(m)]||F[m]||d[m]||l;return o?a.createElement(y,n(n({ref:t},i),{},{components:o})):a.createElement(y,n({ref:t},i))}));function y(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=o.length,n=new Array(l);n[0]=m;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[F]="string"==typeof e?e:r,n[1]=c;for(var p=2;p{o.r(t),o.d(t,{assets:()=>s,contentTitle:()=>n,default:()=>d,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var a=o(7462),r=(o(7294),o(3905));const l={sidebar_position:2},n=void 0,c={unversionedId:"New Features/Try-Catch Statement",id:"New Features/Try-Catch Statement",title:"Try-Catch Statement",description:"Pluto provides a more intuitive way to handle errors than pcall and xpcall.",source:"@site/docs/New Features/Try-Catch Statement.md",sourceDirName:"New Features",slug:"/New Features/Try-Catch Statement",permalink:"/docs/New Features/Try-Catch Statement",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Table Freezing",permalink:"/docs/New Features/Table Freezing"},next:{title:"Object-Oriented Programming",permalink:"/docs/New Features/Object-Oriented Programming"}},s={},p=[{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],i={toc:p},F="wrapper";function d(e){let{components:t,...o}=e;return(0,r.kt)(F,(0,a.Z)({},i,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Pluto provides a more intuitive way to handle errors than ",(0,r.kt)("inlineCode",{parentName:"p"},"pcall")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"xpcall"),"."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"get_fruit_rating"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"fruit"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," fruit "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"apple"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"8")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"banana"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"7")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"orange"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"9")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"mango"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"grape"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"6")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"strawberry"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"9")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"cucumber"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"tomato"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"error"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"What are you, a botanist?"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"try_get_fruit_rating"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"fruit"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"try")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"get_fruit_rating"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(fruit)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"catch"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," e "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," e"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"find"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"What are you, a botanist?"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"-"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"try_get_fruit_rating"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"apple"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 8")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"try_get_fruit_rating"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"cucumber"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e -10")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"try_get_fruit_rating"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"car"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e nil"))))),(0,r.kt)("h4",{id:"try-it-yourself"},(0,r.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20function%20get_fruit_rating(fruit)%0D%0A%20%20%20%20return%20switch%20fruit%20do%0D%0A%20%20%20%20%20%20%20%20case%20%22apple%22%20-%3E%208%0D%0A%20%20%20%20%20%20%20%20case%20%22banana%22%20-%3E%207%0D%0A%20%20%20%20%20%20%20%20case%20%22orange%22%20-%3E%209%0D%0A%20%20%20%20%20%20%20%20case%20%22mango%22%20-%3E%2010%0D%0A%20%20%20%20%20%20%20%20case%20%22grape%22%20-%3E%206%0D%0A%20%20%20%20%20%20%20%20case%20%22strawberry%22%20-%3E%209%0D%0A%20%20%20%20%20%20%20%20case%20%22cucumber%22%2C%20%22tomato%22%20-%3E%20error(%22What%20are%20you%2C%20a%20botanist%3F%22)%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Alocal%20function%20try_get_fruit_rating(fruit)%0D%0A%20%20%20%20try%0D%0A%20%20%20%20%20%20%20%20return%20get_fruit_rating(fruit)%0D%0A%20%20%20%20catch%20e%20then%0D%0A%20%20%20%20%20%20%20%20if%20e%3Afind(%22What%20are%20you%2C%20a%20botanist%3F%22)%20then%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20-10%0D%0A%20%20%20%20%20%20%20%20end%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Aprint(try_get_fruit_rating(%22apple%22))%20--%3E%208%0D%0Aprint(try_get_fruit_rating(%22cucumber%22))%20--%3E%20-10%0D%0Aprint(try_get_fruit_rating(%22car%22))%20--%3E%20nil"},"Try It Yourself")),(0,r.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,r.kt)("p",null,"You may need to use ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_try")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_catch")," instead. Alternatively, ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_use try, catch")," will enable both keywords independently of the environment settings."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8d7b091f.7b883459.js b/assets/js/8d7b091f.7b883459.js new file mode 100644 index 00000000..77dadbe8 --- /dev/null +++ b/assets/js/8d7b091f.7b883459.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5559],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>y});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var p=r.createContext({}),i=function(e){var t=r.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=i(e.components);return r.createElement(p.Provider,{value:t},e.children)},F="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),F=i(a),m=n,y=F["".concat(p,".").concat(m)]||F[m]||d[m]||o;return a?r.createElement(y,l(l({ref:t},c),{},{components:a})):r.createElement(y,l({ref:t},c))}));function y(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=m;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[F]="string"==typeof e?e:n,l[1]=s;for(var i=2;i{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>i});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:2},l=void 0,s={unversionedId:"New Features/Try-Catch Statement",id:"New Features/Try-Catch Statement",title:"Try-Catch Statement",description:"Pluto provides a more intuitive way to handle errors than pcall and xpcall.",source:"@site/docs/New Features/Try-Catch Statement.md",sourceDirName:"New Features",slug:"/New Features/Try-Catch Statement",permalink:"/docs/New Features/Try-Catch Statement",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Table Freezing",permalink:"/docs/New Features/Table Freezing"},next:{title:"Object-Oriented Programming",permalink:"/docs/New Features/Object-Oriented Programming"}},p={},i=[{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],c={toc:i},F="wrapper";function d(e){let{components:t,...a}=e;return(0,n.kt)(F,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Pluto provides a more intuitive way to handle errors than ",(0,n.kt)("inlineCode",{parentName:"p"},"pcall")," and ",(0,n.kt)("inlineCode",{parentName:"p"},"xpcall"),"."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"get_fruit_rating"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"fruit"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," fruit "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"apple"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"8")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"banana"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"7")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"orange"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"9")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"mango"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"grape"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"6")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"strawberry"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"9")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"cucumber"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"tomato"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"error"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"What are you, a botanist?"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"try_get_fruit_rating"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"fruit"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"try")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"get_fruit_rating"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(fruit)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"catch"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," e "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," e"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"find"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"What are you, a botanist?"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"-"),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"try_get_fruit_rating"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"apple"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 8")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"try_get_fruit_rating"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"cucumber"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e -10")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"try_get_fruit_rating"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"car"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e nil"))))),(0,n.kt)("h4",{id:"try-it-yourself"},(0,n.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20function%20get_fruit_rating(fruit)%0D%0A%20%20%20%20return%20switch%20fruit%20do%0D%0A%20%20%20%20%20%20%20%20case%20%22apple%22%20-%3E%208%0D%0A%20%20%20%20%20%20%20%20case%20%22banana%22%20-%3E%207%0D%0A%20%20%20%20%20%20%20%20case%20%22orange%22%20-%3E%209%0D%0A%20%20%20%20%20%20%20%20case%20%22mango%22%20-%3E%2010%0D%0A%20%20%20%20%20%20%20%20case%20%22grape%22%20-%3E%206%0D%0A%20%20%20%20%20%20%20%20case%20%22strawberry%22%20-%3E%209%0D%0A%20%20%20%20%20%20%20%20case%20%22cucumber%22%2C%20%22tomato%22%20-%3E%20error(%22What%20are%20you%2C%20a%20botanist%3F%22)%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Alocal%20function%20try_get_fruit_rating(fruit)%0D%0A%20%20%20%20try%0D%0A%20%20%20%20%20%20%20%20return%20get_fruit_rating(fruit)%0D%0A%20%20%20%20catch%20e%20then%0D%0A%20%20%20%20%20%20%20%20if%20e%3Afind(%22What%20are%20you%2C%20a%20botanist%3F%22)%20then%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20-10%0D%0A%20%20%20%20%20%20%20%20end%0D%0A%20%20%20%20end%0D%0Aend%0D%0A%0D%0Aprint(try_get_fruit_rating(%22apple%22))%20--%3E%208%0D%0Aprint(try_get_fruit_rating(%22cucumber%22))%20--%3E%20-10%0D%0Aprint(try_get_fruit_rating(%22car%22))%20--%3E%20nil"},"Try It Yourself")),(0,n.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,n.kt)("p",null,"You may need to use ",(0,n.kt)("inlineCode",{parentName:"p"},"pluto_try")," and ",(0,n.kt)("inlineCode",{parentName:"p"},"pluto_catch")," instead. Alternatively, ",(0,n.kt)("inlineCode",{parentName:"p"},"pluto_use try, catch")," will enable both keywords independently of the environment settings."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8d8f025d.56101e49.js b/assets/js/8d8f025d.56101e49.js deleted file mode 100644 index 1a8824b8..00000000 --- a/assets/js/8d8f025d.56101e49.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5049],{3905:(e,t,o)=>{o.d(t,{Zo:()=>i,kt:()=>y});var a=o(7294);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function l(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function n(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var c=a.createContext({}),p=function(e){var t=a.useContext(c),o=t;return e&&(o="function"==typeof e?e(t):n(n({},t),e)),o},i=function(e){var t=p(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},F=a.forwardRef((function(e,t){var o=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),d=p(o),F=r,y=d["".concat(c,".").concat(F)]||d[F]||m[F]||l;return o?a.createElement(y,n(n({ref:t},i),{},{components:o})):a.createElement(y,n({ref:t},i))}));function y(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=o.length,n=new Array(l);n[0]=F;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:r,n[1]=s;for(var p=2;p{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>n,default:()=>m,frontMatter:()=>l,metadata:()=>s,toc:()=>p});var a=o(7462),r=(o(7294),o(3905));const l={sidebar_position:2},n=void 0,s={unversionedId:"New Features/Lambda Expressions",id:"New Features/Lambda Expressions",title:"Lambda Expressions",description:"Lambda expressions are an alternative way of writing anonymous functions.",source:"@site/docs/New Features/Lambda Expressions.md",sourceDirName:"New Features",slug:"/New Features/Lambda Expressions",permalink:"/docs/New Features/Lambda Expressions",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"In Expressions",permalink:"/docs/New Features/In Expressions"},next:{title:"Named Arguments",permalink:"/docs/New Features/Named Arguments"}},c={},p=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],i={toc:p},d="wrapper";function m(e){let{components:t,...o}=e;return(0,r.kt)(d,(0,a.Z)({},i,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Lambda expressions are an alternative way of writing anonymous functions."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Lua Way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Lua Way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s1 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"123"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s2 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"gsub"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"c"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"tonumber"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(c) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s2) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "234"'))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Pluto Way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Pluto Way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s1 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"123"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s2 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"gsub"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," |"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"c"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"tonumber"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(c) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s2) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "234"'))))),(0,r.kt)("h4",{id:"try-it-yourself"},(0,r.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20str%20%3D%20%22123%22%0D%0Alocal%20inc_str%20%3D%20str%3Agsub(%22.%22%2C%20%7Cc%7C%20-%3E%20tonumber(c)%20%2B%201)%0D%0Aprint(inc_str)%20--%20%22234%22"},"Try It Yourself")),(0,r.kt)("p",null,"As you can see, they take an expression after the arrow, the result of which is implicitly returned."),(0,r.kt)("p",null,"However, lambda expressions can also have full bodies using ",(0,r.kt)("inlineCode",{parentName:"p"},"do"),"...",(0,r.kt)("inlineCode",{parentName:"p"},"end"),":"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," add "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," |"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Adding '),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{a}"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," and "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{b}"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},' together"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("p",null,"They also support all other syntax you would expect of functions, such as type hints and default arguments."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8d8f025d.f58865f0.js b/assets/js/8d8f025d.f58865f0.js new file mode 100644 index 00000000..97d0a98a --- /dev/null +++ b/assets/js/8d8f025d.f58865f0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5049],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>y});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var p=r.createContext({}),i=function(e){var t=r.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},c=function(e){var t=i(e.components);return r.createElement(p.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=i(a),F=n,y=d["".concat(p,".").concat(F)]||d[F]||m[F]||o;return a?r.createElement(y,s(s({ref:t},c),{},{components:a})):r.createElement(y,s({ref:t},c))}));function y(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,s=new Array(o);s[0]=F;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[d]="string"==typeof e?e:n,s[1]=l;for(var i=2;i{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>i});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:2},s=void 0,l={unversionedId:"New Features/Lambda Expressions",id:"New Features/Lambda Expressions",title:"Lambda Expressions",description:"Lambda expressions are an alternative way of writing anonymous functions.",source:"@site/docs/New Features/Lambda Expressions.md",sourceDirName:"New Features",slug:"/New Features/Lambda Expressions",permalink:"/docs/New Features/Lambda Expressions",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"In Expressions",permalink:"/docs/New Features/In Expressions"},next:{title:"Named Arguments",permalink:"/docs/New Features/Named Arguments"}},p={},i=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],c={toc:i},d="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Lambda expressions are an alternative way of writing anonymous functions."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Lua Way"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Lua Way"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s1 "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"123"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s2 "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"gsub"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"."'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"c"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"tonumber"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(c) "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s2) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "234"'))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Pluto Way"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Pluto Way"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s1 "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"123"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s2 "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"gsub"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"."'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," |"),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"c"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"tonumber"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(c) "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s2) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "234"'))))),(0,n.kt)("h4",{id:"try-it-yourself"},(0,n.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20str%20%3D%20%22123%22%0D%0Alocal%20inc_str%20%3D%20str%3Agsub(%22.%22%2C%20%7Cc%7C%20-%3E%20tonumber(c)%20%2B%201)%0D%0Aprint(inc_str)%20--%20%22234%22"},"Try It Yourself")),(0,n.kt)("p",null,"As you can see, they take an expression after the arrow, the result of which is implicitly returned."),(0,n.kt)("p",null,"However, lambda expressions can also have full bodies using ",(0,n.kt)("inlineCode",{parentName:"p"},"do"),"...",(0,n.kt)("inlineCode",{parentName:"p"},"end"),":"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," add "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," |"),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"a"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"b"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Adding '),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{a}"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," and "),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{b}"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},' together"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("p",null,"They also support all other syntax you would expect of functions, such as type hints and default arguments."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8e3b1f2f.23c8ba2e.js b/assets/js/8e3b1f2f.23c8ba2e.js deleted file mode 100644 index 96b8f0e0..00000000 --- a/assets/js/8e3b1f2f.23c8ba2e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[3583],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>F});var o=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function n(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=o.createContext({}),c=function(e){var t=o.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):n(n({},t),e)),a},p=function(e){var t=c(e.components);return o.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},k=o.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(a),k=r,F=d["".concat(i,".").concat(k)]||d[k]||m[k]||l;return a?o.createElement(F,n(n({ref:t},p),{},{components:a})):o.createElement(F,n({ref:t},p))}));function F(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,n=new Array(l);n[0]=k;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:r,n[1]=s;for(var c=2;c{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>n,default:()=>m,frontMatter:()=>l,metadata:()=>s,toc:()=>c});var o=a(7462),r=(a(7294),a(3905));const l={sidebar_position:2},n=void 0,s={unversionedId:"Runtime Environment/String",id:"Runtime Environment/String",title:"String",description:"This page documents the changes & additions to the string library in Pluto, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/String.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/String",permalink:"/docs/Runtime Environment/String",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"OS",permalink:"/docs/Runtime Environment/OS"},next:{title:"Table",permalink:"/docs/Runtime Environment/Table"}},i={},c=[{value:"string.upper",id:"stringupper",level:3},{value:"string.lower",id:"stringlower",level:3},{value:"string.split",id:"stringsplit",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"string.rfind",id:"stringrfind",level:3},{value:"string.strip",id:"stringstrip",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"string.lstrip",id:"stringlstrip",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"string.rstrip",id:"stringrstrip",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"string.isascii",id:"stringisascii",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"string.islower",id:"stringislower",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"string.isalpha",id:"stringisalpha",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"string.isupper",id:"stringisupper",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"string.isalnum",id:"stringisalnum",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"string.iswhitespace",id:"stringiswhitespace",level:3},{value:"Paramaters",id:"paramaters",level:4},{value:"string.uformat",id:"stringuformat",level:3},{value:"string.replace",id:"stringreplace",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Errors",id:"errors",level:4},{value:"string.truncate",id:"stringtruncate",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-4",level:4},{value:"string.contains",id:"stringcontains",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"string.casefold",id:"stringcasefold",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"string.formatint",id:"stringformatint",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Errors",id:"errors-1",level:4},{value:"string.partition",id:"stringpartition",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-5",level:4},{value:"string.endswith",id:"stringendswith",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"string.startswith",id:"stringstartswith",level:3},{value:"Parameters",id:"parameters-16",level:4}],p={toc:c},d="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(d,(0,o.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This page documents the changes & additions to the ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," library in Pluto, which is built on top of Lua 5.4's."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringupper"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.upper")),(0,r.kt)("p",null,"This function now takes a second parameter that specifies which index to capitalize."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"upper"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringlower"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.lower")),(0,r.kt)("p",null,"This function now takes a second parameter that specifies which index to make lowercase."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"HELLO"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"lower"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hELLO"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringsplit"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.split")),(0,r.kt)("p",null,"Splits a string by a separator."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to split."),(0,r.kt)("li",{parentName:"ol"},"The separator to split a string by. This can be any string.")),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,"A table."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Splitting a string by a single character."},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Splitting a string by a single character."),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world, how is everyone doing?"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," r "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"split"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," The value of 'r':")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "hello",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "world,",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "how",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "is",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "everyone",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "doing?"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Splitting a string by a substring."},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Splitting a string by a substring."),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"helloHALLOWORLDworld,HALLOWORLDhowHALLOWORLDisHALLOWORLDeveryoneHALLOWORLDdoing?"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," r "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"split"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"HALLOWORLD"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," The value of 'r':")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "hello",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "world,",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "how",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "is",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "everyone",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' "doing?"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringrfind"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.rfind")),(0,r.kt)("p",null,"Identical to the base Lua ",(0,r.kt)("inlineCode",{parentName:"p"},"string.find")," in every way, except it searches right-to-left instead of left-to-right."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringstrip"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.strip")),(0,r.kt)("p",null,"Strips or trims characters from both ends of a string."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to strip."),(0,r.kt)("li",{parentName:"ol"},"A string of characters to strip. Defaults to ",(0,r.kt)("inlineCode",{parentName:"li"}," \\n\\r\\t\\v\\0"),".")),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,"The new string."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"{|}hello world{|}"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"strip"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"{}|"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e hello world"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringlstrip"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.lstrip")),(0,r.kt)("p",null,"Strips or trims characters from the left side of a string."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to strip."),(0,r.kt)("li",{parentName:"ol"},"A string of characters to strip. Defaults to ",(0,r.kt)("inlineCode",{parentName:"li"}," \\n\\r\\t\\v\\0"),".")),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,"The new string."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"{|}hello world{|}"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"lstrip"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"{}|"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e hello world{|}"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringrstrip"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.rstrip")),(0,r.kt)("p",null,"Strips or trims characters from the right side of a string."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to strip."),(0,r.kt)("li",{parentName:"ol"},"A string of characters to strip. Defaults to ",(0,r.kt)("inlineCode",{parentName:"li"}," \\n\\r\\t\\v\\0"),".")),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,"The new string."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"{|}hello world{|}"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"rstrip"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"{}|"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {|}hello world"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringisascii"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.isascii")),(0,r.kt)("p",null,"Checks if a string is entirely composed of ASCII characters."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to check.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"HELLOWORLD123"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isascii"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true"))))),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"This would exclude any multi-byte characters, like emojis.")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringislower"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.islower")),(0,r.kt)("p",null,"Checks if a string is entirely composed of lowercase characters."),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to check.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"helloworld"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"islower"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true"))))),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Whitespace characters are not lowercase characters.")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringisalpha"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.isalpha")),(0,r.kt)("p",null,"Checks if a string is entirely composed of alphabetic characters."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to check.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"HELLOWORLD"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isalpha"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true"))))),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Whitespace characters are not alphabetic characters.")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringisupper"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.isupper")),(0,r.kt)("p",null,"Checks if a string is entirely composed of uppercase characters."),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to check.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"HELLOWORLD"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isupper"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true"))))),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Whitespace characters are not uppercase characters.")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringisalnum"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.isalnum")),(0,r.kt)("p",null,"Checks if a string is entirely composed of alphanumeric characters."),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to check.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"HELLOWORLD123"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isalnum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true"))))),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Whitespace characters are not alphanumeric characters.")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringiswhitespace"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.iswhitespace")),(0,r.kt)("p",null,"Checks if this string is entirely composed of whitespace characters."),(0,r.kt)("h4",{id:"paramaters"},"Paramaters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to check.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" '),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\t"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\v"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\f"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\t\\t\\t\\t"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"iswhitespace"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringuformat"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.uformat")),(0,r.kt)("p",null,"Same as ",(0,r.kt)("inlineCode",{parentName:"p"},"string.format"),", but performs the operation under the ",(0,r.kt)("inlineCode",{parentName:"p"},"en_US.UTF-8")," locale. Ensures the same result on all systems."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringreplace"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.replace")),(0,r.kt)("p",null,"Replace substrings with another substring. Similar to ",(0,r.kt)("inlineCode",{parentName:"p"},"string.gsub"),", but it operates on plain-text and is not burdened by a pattern capture limit."),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"original")," \u2014 The substring to replace."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"substitute")," \u2014 The replacement substring."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"max_replace")," \u2014 The maximum number of replacements you wish to occur. The default value is effectively ",(0,r.kt)("inlineCode",{parentName:"li"},"0"),', which means "infinite". If you pass ',(0,r.kt)("inlineCode",{parentName:"li"},"1"),", this leads to a maximum of one replacement, and so on.")),(0,r.kt)("h4",{id:"errors"},"Errors"),(0,r.kt)("p",null,"An error is thrown under the following conditions:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"max_replace")," is less than zero."),(0,r.kt)("li",{parentName:"ol"},"The length of ",(0,r.kt)("inlineCode",{parentName:"li"},"substitute")," is zero.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"replace"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello, world.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"replace"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"apple"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'""'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello, world!")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"replace"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Apple"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Apple, world!")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"replace"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, "'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'""'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e world!"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringtruncate"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.truncate")),(0,r.kt)("p",null,"Truncates a given string to a specified length. If an elipsis is desired and the string was actually truncated, the last three characters of the resultant string will be replaced with an elipsis."),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to truncate."),(0,r.kt)("li",{parentName:"ol"},"The desired length of the truncated string."),(0,r.kt)("li",{parentName:"ol"},"A boolean indicating whether or not to replace the last three character of the string with ",(0,r.kt)("inlineCode",{parentName:"li"},"...")," ",(0,r.kt)("strong",{parentName:"li"},"if")," it is truncated. This is ",(0,r.kt)("inlineCode",{parentName:"li"},"false")," by default.")),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,"The truncated string."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"truncate"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"50"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello, world!")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"truncate"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"truncate"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e He..."))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringcontains"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.contains")),(0,r.kt)("p",null,"Checks if a string contains a substring."),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to check."),(0,r.kt)("li",{parentName:"ol"},"The substring to check for.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"contains"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"worl"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringcasefold"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.casefold")),(0,r.kt)("p",null,"Compares two strings, agnostic of any capitalization."),(0,r.kt)("h4",{id:"parameters-12"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The first string to compare."),(0,r.kt)("li",{parentName:"ol"},"The second string to compare.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s1 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s2 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"heLLo WoRlD"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"casefold"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s2)) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringformatint"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.formatint")),(0,r.kt)("p",null,"This function makes an integer easier to read by inserting ",(0,r.kt)("inlineCode",{parentName:"p"},"separator")," every ",(0,r.kt)("inlineCode",{parentName:"p"},"N")," characters. It can handle strings representing integers, making it suitable for BigInt modules or any integer beyond Lua's representation limits. If you provide a string, it should consist solely of digits. A single unary operator is permitted at the beginning of the string to indicate whether it's a negative or positive number."),(0,r.kt)("h4",{id:"parameters-13"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"integer")," \u2014 The integer or string input."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"sep")," \u2014 The ",(0,r.kt)("inlineCode",{parentName:"li"},"separator")," to use. This must be a single-character string."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"group")," \u2014 The grouping of each digit pair. This is ",(0,r.kt)("inlineCode",{parentName:"li"},"N"),".")),(0,r.kt)("h4",{id:"errors-1"},"Errors"),(0,r.kt)("p",null,"If the input is a ",(0,r.kt)("strong",{parentName:"p"},"string")," and does not meet the aforementioned criteria, an error will be thrown."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Usage Example"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Usage Example"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"formatint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"500"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 500")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"formatint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"-"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5000"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e -5,000")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"formatint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"50000"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 50,000")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"formatint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"-"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"500000"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e -500,000")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"formatint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"500"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 5.00")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"formatint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"-5000"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'","'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e -5,0,0,0")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"formatint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"50000"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'","'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 5,0000"))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Error Example"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Error Example"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"formatint"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"-500000.4"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"pluto: test.pluto:3: argument 'integer' for string.formatint was a string, but does not represent a valid integer (bad character: '.')")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"stack traceback:")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," [C]: in function 'string.formatint'")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," test.pluto:3: in main chunk")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," [C]: in ?"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringpartition"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.partition")),(0,r.kt)("p",null,"Splits a string once, on the first occurance of a separator."),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to partition."),(0,r.kt)("li",{parentName:"ol"},"The separator to partition the string by."),(0,r.kt)("li",{parentName:"ol"},"A boolean specifying whether to search from the right. By default, this is false, which starts at the left.")),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,"Two strings: A substring for all the content before the first occurance of ",(0,r.kt)("inlineCode",{parentName:"p"},"sep"),", and another substring for all the content afterwards."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"A Basic Partition"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"A Basic Partition"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world, what\'s up?"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," before"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," after "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"partition"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(before "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(after "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"world, what\'s up?"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Partioning From The Right"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Partioning From The Right"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world, what\'s up?"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," before"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," after "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"partition"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(before "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world, what\'s"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(after "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"up?"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringendswith"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.endswith")),(0,r.kt)("p",null,"Checks if a string ends with a suffix."),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to check."),(0,r.kt)("li",{parentName:"ol"},"The substring suffix to check for.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"endswith"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"world"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringstartswith"},(0,r.kt)("inlineCode",{parentName:"h3"},"string.startswith")),(0,r.kt)("p",null,"Checks if a string starts with a prefix."),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string to check."),(0,r.kt)("li",{parentName:"ol"},"The substring prefix to check for.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"string"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"startswith"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e true"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8e3b1f2f.c44c72dd.js b/assets/js/8e3b1f2f.c44c72dd.js new file mode 100644 index 00000000..4fc84d70 --- /dev/null +++ b/assets/js/8e3b1f2f.c44c72dd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[3583],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>F});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),p=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=p(a),k=n,F=d["".concat(i,".").concat(k)]||d[k]||m[k]||l;return a?r.createElement(F,s(s({ref:t},c),{},{components:a})):r.createElement(F,s({ref:t},c))}));function F(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,s=new Array(l);s[0]=k;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o[d]="string"==typeof e?e:n,s[1]=o;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>m,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var r=a(7462),n=(a(7294),a(3905));const l={sidebar_position:2},s=void 0,o={unversionedId:"Runtime Environment/String",id:"Runtime Environment/String",title:"String",description:"This page documents the changes & additions to the string library in Pluto, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/String.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/String",permalink:"/docs/Runtime Environment/String",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"OS",permalink:"/docs/Runtime Environment/OS"},next:{title:"Table",permalink:"/docs/Runtime Environment/Table"}},i={},p=[{value:"string.upper",id:"stringupper",level:3},{value:"string.lower",id:"stringlower",level:3},{value:"string.split",id:"stringsplit",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"string.rfind",id:"stringrfind",level:3},{value:"string.strip",id:"stringstrip",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"string.lstrip",id:"stringlstrip",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"string.rstrip",id:"stringrstrip",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"string.isascii",id:"stringisascii",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"string.islower",id:"stringislower",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"string.isalpha",id:"stringisalpha",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"string.isupper",id:"stringisupper",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"string.isalnum",id:"stringisalnum",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"string.iswhitespace",id:"stringiswhitespace",level:3},{value:"Paramaters",id:"paramaters",level:4},{value:"string.uformat",id:"stringuformat",level:3},{value:"string.replace",id:"stringreplace",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Errors",id:"errors",level:4},{value:"string.truncate",id:"stringtruncate",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-4",level:4},{value:"string.contains",id:"stringcontains",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"string.casefold",id:"stringcasefold",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"string.formatint",id:"stringformatint",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Errors",id:"errors-1",level:4},{value:"string.partition",id:"stringpartition",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-5",level:4},{value:"string.endswith",id:"stringendswith",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"string.startswith",id:"stringstartswith",level:3},{value:"Parameters",id:"parameters-16",level:4}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"This page documents the changes & additions to the ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," library in Pluto, which is built on top of Lua 5.4's."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringupper"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.upper")),(0,n.kt)("p",null,"This function now takes a second parameter that specifies which index to capitalize."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"upper"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringlower"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.lower")),(0,n.kt)("p",null,"This function now takes a second parameter that specifies which index to make lowercase."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"HELLO"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"lower"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hELLO"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringsplit"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.split")),(0,n.kt)("p",null,"Splits a string by a separator."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to split."),(0,n.kt)("li",{parentName:"ol"},"The separator to split a string by. This can be any string.")),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,"A table."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Splitting a string by a single character."},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Splitting a string by a single character."),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world, how is everyone doing?"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," r "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"split"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," The value of 'r':")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," {")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "hello",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "world,",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "how",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "is",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "everyone",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "doing?"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Splitting a string by a substring."},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Splitting a string by a substring."),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"helloHALLOWORLDworld,HALLOWORLDhowHALLOWORLDisHALLOWORLDeveryoneHALLOWORLDdoing?"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," r "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"split"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"HALLOWORLD"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," The value of 'r':")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," {")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "hello",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "world,",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "how",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "is",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "everyone",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},' "doing?"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringrfind"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.rfind")),(0,n.kt)("p",null,"Identical to the base Lua ",(0,n.kt)("inlineCode",{parentName:"p"},"string.find")," in every way, except it searches right-to-left instead of left-to-right."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringstrip"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.strip")),(0,n.kt)("p",null,"Strips or trims characters from both ends of a string."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to strip."),(0,n.kt)("li",{parentName:"ol"},"A string of characters to strip. Defaults to ",(0,n.kt)("inlineCode",{parentName:"li"}," \\n\\r\\t\\v\\0"),".")),(0,n.kt)("h4",{id:"returns-1"},"Returns"),(0,n.kt)("p",null,"The new string."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"{|}hello world{|}"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"strip"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"{}|"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e hello world"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringlstrip"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.lstrip")),(0,n.kt)("p",null,"Strips or trims characters from the left side of a string."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to strip."),(0,n.kt)("li",{parentName:"ol"},"A string of characters to strip. Defaults to ",(0,n.kt)("inlineCode",{parentName:"li"}," \\n\\r\\t\\v\\0"),".")),(0,n.kt)("h4",{id:"returns-2"},"Returns"),(0,n.kt)("p",null,"The new string."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"{|}hello world{|}"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"lstrip"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"{}|"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e hello world{|}"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringrstrip"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.rstrip")),(0,n.kt)("p",null,"Strips or trims characters from the right side of a string."),(0,n.kt)("h4",{id:"parameters-3"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to strip."),(0,n.kt)("li",{parentName:"ol"},"A string of characters to strip. Defaults to ",(0,n.kt)("inlineCode",{parentName:"li"}," \\n\\r\\t\\v\\0"),".")),(0,n.kt)("h4",{id:"returns-3"},"Returns"),(0,n.kt)("p",null,"The new string."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"{|}hello world{|}"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"rstrip"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"{}|"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {|}hello world"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringisascii"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.isascii")),(0,n.kt)("p",null,"Checks if a string is entirely composed of ASCII characters."),(0,n.kt)("h4",{id:"parameters-4"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to check.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"HELLOWORLD123"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isascii"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s)) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true"))))),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"This would exclude any multi-byte characters, like emojis.")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringislower"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.islower")),(0,n.kt)("p",null,"Checks if a string is entirely composed of lowercase characters."),(0,n.kt)("h4",{id:"parameters-5"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to check.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"helloworld"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"islower"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s)) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true"))))),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Whitespace characters are not lowercase characters.")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringisalpha"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.isalpha")),(0,n.kt)("p",null,"Checks if a string is entirely composed of alphabetic characters."),(0,n.kt)("h4",{id:"parameters-6"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to check.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"HELLOWORLD"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isalpha"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s)) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true"))))),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Whitespace characters are not alphabetic characters.")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringisupper"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.isupper")),(0,n.kt)("p",null,"Checks if a string is entirely composed of uppercase characters."),(0,n.kt)("h4",{id:"parameters-7"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to check.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"HELLOWORLD"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isupper"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s)) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true"))))),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Whitespace characters are not uppercase characters.")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringisalnum"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.isalnum")),(0,n.kt)("p",null,"Checks if a string is entirely composed of alphanumeric characters."),(0,n.kt)("h4",{id:"parameters-8"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to check.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"HELLOWORLD123"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isalnum"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s)) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true"))))),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Whitespace characters are not alphanumeric characters.")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringiswhitespace"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.iswhitespace")),(0,n.kt)("p",null,"Checks if this string is entirely composed of whitespace characters."),(0,n.kt)("h4",{id:"paramaters"},"Paramaters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to check.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" '),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\t"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\v"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\f"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\t\\t\\t\\t"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"iswhitespace"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s)) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringuformat"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.uformat")),(0,n.kt)("p",null,"Same as ",(0,n.kt)("inlineCode",{parentName:"p"},"string.format"),", but performs the operation under the ",(0,n.kt)("inlineCode",{parentName:"p"},"en_US.UTF-8")," locale. Ensures the same result on all systems."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringreplace"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.replace")),(0,n.kt)("p",null,"Replace substrings with another substring. Similar to ",(0,n.kt)("inlineCode",{parentName:"p"},"string.gsub"),", but it operates on plain-text and is not burdened by a pattern capture limit."),(0,n.kt)("h4",{id:"parameters-9"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"original")," \u2014 The substring to replace."),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"substitute")," \u2014 The replacement substring."),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"max_replace")," \u2014 The maximum number of replacements you wish to occur. The default value is effectively ",(0,n.kt)("inlineCode",{parentName:"li"},"0"),', which means "infinite". If you pass ',(0,n.kt)("inlineCode",{parentName:"li"},"1"),", this leads to a maximum of one replacement, and so on.")),(0,n.kt)("h4",{id:"errors"},"Errors"),(0,n.kt)("p",null,"An error is thrown under the following conditions:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"max_replace")," is less than zero."),(0,n.kt)("li",{parentName:"ol"},"The length of ",(0,n.kt)("inlineCode",{parentName:"li"},"substitute")," is zero.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"replace"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"."'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello, world.")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"replace"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"apple"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'""'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello, world!")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"replace"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Apple"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Apple, world!")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"replace"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, "'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'""'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e world!"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringtruncate"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.truncate")),(0,n.kt)("p",null,"Truncates a given string to a specified length. If an elipsis is desired and the string was actually truncated, the last three characters of the resultant string will be replaced with an elipsis."),(0,n.kt)("h4",{id:"parameters-10"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to truncate."),(0,n.kt)("li",{parentName:"ol"},"The desired length of the truncated string."),(0,n.kt)("li",{parentName:"ol"},"A boolean indicating whether or not to replace the last three character of the string with ",(0,n.kt)("inlineCode",{parentName:"li"},"...")," ",(0,n.kt)("strong",{parentName:"li"},"if")," it is truncated. This is ",(0,n.kt)("inlineCode",{parentName:"li"},"false")," by default.")),(0,n.kt)("h4",{id:"returns-4"},"Returns"),(0,n.kt)("p",null,"The truncated string."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"truncate"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"50"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello, world!")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"truncate"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"truncate"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e He..."))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringcontains"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.contains")),(0,n.kt)("p",null,"Checks if a string contains a substring."),(0,n.kt)("h4",{id:"parameters-11"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to check."),(0,n.kt)("li",{parentName:"ol"},"The substring to check for.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"contains"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"worl"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringcasefold"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.casefold")),(0,n.kt)("p",null,"Compares two strings, agnostic of any capitalization."),(0,n.kt)("h4",{id:"parameters-12"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The first string to compare."),(0,n.kt)("li",{parentName:"ol"},"The second string to compare.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s1 "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s2 "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"heLLo WoRlD"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"casefold"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s2)) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringformatint"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.formatint")),(0,n.kt)("p",null,"This function makes an integer easier to read by inserting ",(0,n.kt)("inlineCode",{parentName:"p"},"separator")," every ",(0,n.kt)("inlineCode",{parentName:"p"},"N")," characters. It can handle strings representing integers, making it suitable for BigInt modules or any integer beyond Lua's representation limits. If you provide a string, it should consist solely of digits. A single unary operator is permitted at the beginning of the string to indicate whether it's a negative or positive number."),(0,n.kt)("h4",{id:"parameters-13"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"integer")," \u2014 The integer or string input."),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"sep")," \u2014 The ",(0,n.kt)("inlineCode",{parentName:"li"},"separator")," to use. This must be a single-character string."),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"group")," \u2014 The grouping of each digit pair. This is ",(0,n.kt)("inlineCode",{parentName:"li"},"N"),".")),(0,n.kt)("h4",{id:"errors-1"},"Errors"),(0,n.kt)("p",null,"If the input is a ",(0,n.kt)("strong",{parentName:"p"},"string")," and does not meet the aforementioned criteria, an error will be thrown."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Usage Example"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Usage Example"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"formatint"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"500"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 500")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"formatint"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"-"),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5000"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e -5,000")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"formatint"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"50000"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 50,000")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"formatint"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"-"),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"500000"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e -500,000")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"formatint"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"500"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"."'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 5.00")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"formatint"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"-5000"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'","'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e -5,0,0,0")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"formatint"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"50000"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'","'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 5,0000"))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Error Example"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Error Example"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"formatint"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"-500000.4"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"undefined"}},"pluto: test.pluto:3: argument 'integer' for string.formatint was a string, but does not represent a valid integer (bad character: '.')")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"undefined"}},"stack traceback:")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"undefined"}}," [C]: in function 'string.formatint'")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"undefined"}}," test.pluto:3: in main chunk")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"undefined"}}," [C]: in ?"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringpartition"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.partition")),(0,n.kt)("p",null,"Splits a string once, on the first occurance of a separator."),(0,n.kt)("h4",{id:"parameters-14"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to partition."),(0,n.kt)("li",{parentName:"ol"},"The separator to partition the string by."),(0,n.kt)("li",{parentName:"ol"},"A boolean specifying whether to search from the right. By default, this is false, which starts at the left.")),(0,n.kt)("h4",{id:"returns-5"},"Returns"),(0,n.kt)("p",null,"Two strings: A substring for all the content before the first occurance of ",(0,n.kt)("inlineCode",{parentName:"p"},"sep"),", and another substring for all the content afterwards."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"A Basic Partition"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"A Basic Partition"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world, what\'s up?"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," before"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," after "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"partition"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(before "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(after "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"world, what\'s up?"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Partioning From The Right"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Partioning From The Right"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world, what\'s up?"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," before"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," after "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"partition"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(before "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world, what\'s"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(after "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"up?"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringendswith"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.endswith")),(0,n.kt)("p",null,"Checks if a string ends with a suffix."),(0,n.kt)("h4",{id:"parameters-15"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to check."),(0,n.kt)("li",{parentName:"ol"},"The substring suffix to check for.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"endswith"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"world"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"stringstartswith"},(0,n.kt)("inlineCode",{parentName:"h3"},"string.startswith")),(0,n.kt)("p",null,"Checks if a string starts with a prefix."),(0,n.kt)("h4",{id:"parameters-16"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to check."),(0,n.kt)("li",{parentName:"ol"},"The substring prefix to check for.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"startswith"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e true"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/95939464.3f5fef34.js b/assets/js/95939464.3f5fef34.js deleted file mode 100644 index 59191339..00000000 --- a/assets/js/95939464.3f5fef34.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9432],{3905:(e,o,a)=>{a.d(o,{Zo:()=>i,kt:()=>N});var t=a(7294);function l(e,o,a){return o in e?Object.defineProperty(e,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[o]=a,e}function r(e,o){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);o&&(t=t.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),a.push.apply(a,t)}return a}function n(e){for(var o=1;o=0||(l[a]=e[a]);return l}(e,o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var c=t.createContext({}),p=function(e){var o=t.useContext(c),a=o;return e&&(a="function"==typeof e?e(o):n(n({},o),e)),a},i=function(e){var o=p(e.components);return t.createElement(c.Provider,{value:o},e.children)},d="mdxType",F={inlineCode:"code",wrapper:function(e){var o=e.children;return t.createElement(t.Fragment,{},o)}},m=t.forwardRef((function(e,o){var a=e.components,l=e.mdxType,r=e.originalType,c=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),d=p(a),m=l,N=d["".concat(c,".").concat(m)]||d[m]||F[m]||r;return a?t.createElement(N,n(n({ref:o},i),{},{components:a})):t.createElement(N,n({ref:o},i))}));function N(e,o){var a=arguments,l=o&&o.mdxType;if("string"==typeof e||l){var r=a.length,n=new Array(r);n[0]=m;var s={};for(var c in o)hasOwnProperty.call(o,c)&&(s[c]=o[c]);s.originalType=e,s[d]="string"==typeof e?e:l,n[1]=s;for(var p=2;p{a.r(o),a.d(o,{assets:()=>c,contentTitle:()=>n,default:()=>F,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var t=a(7462),l=(a(7294),a(3905));const r={sidebar_position:3},n=void 0,s={unversionedId:"Runtime Environment/JSON",id:"Runtime Environment/JSON",title:"JSON",description:"Must be included via require.",source:"@site/docs/Runtime Environment/JSON.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/JSON",permalink:"/docs/Runtime Environment/JSON",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"HTTP",permalink:"/docs/Runtime Environment/HTTP"},next:{title:"Scheduler",permalink:"/docs/Runtime Environment/Scheduler"}},c={},p=[{value:"json.encode",id:"jsonencode",level:3},{value:"Parameters",id:"parameters",level:4},{value:"json.decode",id:"jsondecode",level:3},{value:"Parameters",id:"parameters-1",level:4}],i={toc:p},d="wrapper";function F(e){let{components:o,...a}=e;return(0,l.kt)(d,(0,t.Z)({},i,a,{components:o,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Must be included via ",(0,l.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"jsonencode"},(0,l.kt)("inlineCode",{parentName:"h3"},"json.encode")),(0,l.kt)("p",null,"Returns a string of JSON."),(0,l.kt)("h4",{id:"parameters"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A boolean, number, string, or table to encode as JSON."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"pretty")," \u2014 Whether to return a human-readable string of JSON. Defaults to ",(0,l.kt)("inlineCode",{parentName:"li"},"false"),".")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," json "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"json"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," data")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, World!"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(json"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(data"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e "Hello, World!"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, World!"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," nested "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," nested_key "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1337")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(json"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(data"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e "key": "Hello, World!",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e "nested": {')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e "nested_key": 1337')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }"))))),(0,l.kt)("p",null,"Because Lua tables do not have order guarantees, you can add an ",(0,l.kt)("inlineCode",{parentName:"p"},"__order")," field to fix the order:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," __order "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"a"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"b"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"c"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," c "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"json"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t)) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- {"a":1,"b":2,"c":3}'))))),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"json.null")," value \u2014 assuming you did ",(0,l.kt)("inlineCode",{parentName:"p"},'local json = require("json")')," \u2014 can be used to encode JSON null values."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," json "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"json"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(json"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"json.null"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e null"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"jsondecode"},(0,l.kt)("inlineCode",{parentName:"h3"},"json.decode")),(0,l.kt)("p",null,"Returns multiple potential types. If you pass a serialized boolean, number, or string, then it will return the same type. If you pass a complex JSON object, it will return a table."),(0,l.kt)("h4",{id:"parameters-1"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The JSON data to decode."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"flags")," \u2014 Options to augment the return value. Multiple options can be combined with bitwise OR (",(0,l.kt)("inlineCode",{parentName:"li"},"|"),"). Defaults to ",(0,l.kt)("inlineCode",{parentName:"li"},"0"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json.withnull")," \u2014 decodes JSON null values as ",(0,l.kt)("inlineCode",{parentName:"li"},"json.null")," instead of ",(0,l.kt)("inlineCode",{parentName:"li"},"nil"),"."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json.withorder")," \u2014 adds an ",(0,l.kt)("inlineCode",{parentName:"li"},"__order")," field to tables of decoded JSON objects. ",(0,l.kt)("inlineCode",{parentName:"li"},"json.encode")," respects this, so this is perfect for modifying data while preserving order.")))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," json "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"json"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," data"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," encoded"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," decoded")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Basic Type")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, World!"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"encoded "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(data"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"decoded "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(encoded)")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(decoded "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," data)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"type"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(decoded) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"string"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Complex Type")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," nested "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," nested_key "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1337")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"encoded "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(data"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"decoded "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(encoded)")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(decoded"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"key "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"type"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(decoded) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"table"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(decoded"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"nested"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"nested_key "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1337"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Flags")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"encoded "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"[[{")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},' "null": null,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},' "string": "Hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"}]]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"decoded "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(encoded"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"json.withnull"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"|"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"json.withorder"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(decoded"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"__order["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"null"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(decoded"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"null "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"json.null"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(json"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(decoded"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," encoded)"))))))}F.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/95939464.7a78f7f9.js b/assets/js/95939464.7a78f7f9.js new file mode 100644 index 00000000..63cddb4d --- /dev/null +++ b/assets/js/95939464.7a78f7f9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9432],{3905:(e,a,t)=>{t.d(a,{Zo:()=>d,kt:()=>N});var n=t(7294);function l(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function r(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var a=1;a=0||(l[t]=e[t]);return l}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}var p=n.createContext({}),i=function(e){var a=n.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):o(o({},a),e)),t},d=function(e){var a=i(e.components);return n.createElement(p.Provider,{value:a},e.children)},c="mdxType",F={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},m=n.forwardRef((function(e,a){var t=e.components,l=e.mdxType,r=e.originalType,p=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),c=i(t),m=l,N=c["".concat(p,".").concat(m)]||c[m]||F[m]||r;return t?n.createElement(N,o(o({ref:a},d),{},{components:t})):n.createElement(N,o({ref:a},d))}));function N(e,a){var t=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var r=t.length,o=new Array(r);o[0]=m;var s={};for(var p in a)hasOwnProperty.call(a,p)&&(s[p]=a[p]);s.originalType=e,s[c]="string"==typeof e?e:l,o[1]=s;for(var i=2;i{t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>o,default:()=>F,frontMatter:()=>r,metadata:()=>s,toc:()=>i});var n=t(7462),l=(t(7294),t(3905));const r={sidebar_position:3},o=void 0,s={unversionedId:"Runtime Environment/JSON",id:"Runtime Environment/JSON",title:"JSON",description:"Must be included via require.",source:"@site/docs/Runtime Environment/JSON.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/JSON",permalink:"/docs/Runtime Environment/JSON",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"HTTP",permalink:"/docs/Runtime Environment/HTTP"},next:{title:"Scheduler",permalink:"/docs/Runtime Environment/Scheduler"}},p={},i=[{value:"json.encode",id:"jsonencode",level:3},{value:"Parameters",id:"parameters",level:4},{value:"json.decode",id:"jsondecode",level:3},{value:"Parameters",id:"parameters-1",level:4}],d={toc:i},c="wrapper";function F(e){let{components:a,...t}=e;return(0,l.kt)(c,(0,n.Z)({},d,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Must be included via ",(0,l.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"jsonencode"},(0,l.kt)("inlineCode",{parentName:"h3"},"json.encode")),(0,l.kt)("p",null,"Returns a string of JSON."),(0,l.kt)("h4",{id:"parameters"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A boolean, number, string, or table to encode as JSON."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"pretty")," \u2014 Whether to return a human-readable string of JSON. Defaults to ",(0,l.kt)("inlineCode",{parentName:"li"},"false"),".")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," json "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"json"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," data")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, World!"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(json"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(data"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e "Hello, World!"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, World!"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," nested "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," nested_key "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1337")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(json"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(data"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e "key": "Hello, World!",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e "nested": {')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e "nested_key": 1337')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }"))))),(0,l.kt)("p",null,"Because Lua tables do not have order guarantees, you can add an ",(0,l.kt)("inlineCode",{parentName:"p"},"__order")," field to fix the order:"),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," __order "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"a"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"b"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"c"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," c "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"json"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t)) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- {"a":1,"b":2,"c":3}'))))),(0,l.kt)("p",null,"The ",(0,l.kt)("inlineCode",{parentName:"p"},"json.null")," value \u2014 assuming you did ",(0,l.kt)("inlineCode",{parentName:"p"},'local json = require("json")')," \u2014 can be used to encode JSON null values."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," json "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"json"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(json"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"json.null"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e null"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"jsondecode"},(0,l.kt)("inlineCode",{parentName:"h3"},"json.decode")),(0,l.kt)("p",null,"Returns multiple potential types. If you pass a serialized boolean, number, or string, then it will return the same type. If you pass a complex JSON object, it will return a table."),(0,l.kt)("h4",{id:"parameters-1"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The JSON data to decode."),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"flags")," \u2014 Options to augment the return value. Multiple options can be combined with bitwise OR (",(0,l.kt)("inlineCode",{parentName:"li"},"|"),"). Defaults to ",(0,l.kt)("inlineCode",{parentName:"li"},"0"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json.withnull")," \u2014 decodes JSON null values as ",(0,l.kt)("inlineCode",{parentName:"li"},"json.null")," instead of ",(0,l.kt)("inlineCode",{parentName:"li"},"nil"),"."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json.withorder")," \u2014 adds an ",(0,l.kt)("inlineCode",{parentName:"li"},"__order")," field to tables of decoded JSON objects. ",(0,l.kt)("inlineCode",{parentName:"li"},"json.encode")," respects this, so this is perfect for modifying data while preserving order.")))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," json "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"json"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," data"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," encoded"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," decoded")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Basic Type")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, World!"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"encoded "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(data"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"decoded "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(encoded)")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(decoded "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," data)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"type"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(decoded) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"string"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Complex Type")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"data "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," nested "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," nested_key "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1337")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"encoded "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(data"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"decoded "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(encoded)")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(decoded"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"key "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"type"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(decoded) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"table"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(decoded"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"nested"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"nested_key "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1337"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Flags")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"encoded "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"[[{")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},' "null": null,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},' "string": "Hello"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"}]]")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"decoded "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," json"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(encoded"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"json.withnull"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"|"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"json.withorder"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(decoded"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"__order["),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"null"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(decoded"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"null "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"json.null"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(json"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(decoded"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," encoded)"))))))}F.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/998c02ee.31400400.js b/assets/js/998c02ee.31400400.js deleted file mode 100644 index e4c4d87e..00000000 --- a/assets/js/998c02ee.31400400.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[7508],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>N});var o=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=o.createContext({}),i=function(e){var t=o.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=i(e.components);return o.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},F=o.forwardRef((function(e,t){var a=e.components,r=e.mdxType,n=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=i(a),F=r,N=d["".concat(c,".").concat(F)]||d[F]||m[F]||n;return a?o.createElement(N,l(l({ref:t},p),{},{components:a})):o.createElement(N,l({ref:t},p))}));function N(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var n=a.length,l=new Array(n);l[0]=F;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:r,l[1]=s;for(var i=2;i{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>i});var o=a(7462),r=(a(7294),a(3905));const n={sidebar_position:2},l=void 0,s={unversionedId:"New Features/Safe Navigation",id:"New Features/Safe Navigation",title:"Safe Navigation",description:"For Member Access",source:"@site/docs/New Features/Safe Navigation.md",sourceDirName:"New Features",slug:"/New Features/Safe Navigation",permalink:"/docs/New Features/Safe Navigation",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Nodiscard Functions",permalink:"/docs/New Features/Nodiscard Functions"},next:{title:"Table Freezing",permalink:"/docs/New Features/Table Freezing"}},c={},i=[{value:"For Member Access",id:"for-member-access",level:2},{value:"For Method Calls",id:"for-method-calls",level:2}],p={toc:i},d="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(d,(0,o.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"for-member-access"},"For Member Access"),(0,r.kt)("p",null,"Accessing deeply nested fields which can potentially be ",(0,r.kt)("inlineCode",{parentName:"p"},"nil"),' was problematic, because you\'d need an unreasonable amount of guard clauses to prevent an "attempt to index nil" error. Pluto now offers this syntax:'),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Basic Usage"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Basic Usage"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," person "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," name "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Alice"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," pet_name "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," person"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"pet"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"?."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name"))))),(0,r.kt)("p",null,"In this example, ",(0,r.kt)("inlineCode",{parentName:"p"},"person.pet"),' is nil. However, this does not throw an "attempt to index nil" error. ',(0,r.kt)("inlineCode",{parentName:"p"},"pet_name")," is simply set to ",(0,r.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Practical Usage"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Practical Usage"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Pretend userConfig is parsed from a JSON file, or something.")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--- Returning the user's preferred color, or Red if they have no preferred color.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"get_color"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," userConfig"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"colors"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"?."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"preferred "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"??"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Red"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"get_color"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"())"))))),(0,r.kt)("p",null,"In this example, we also use the null coalescing operator ",(0,r.kt)("inlineCode",{parentName:"p"},"??"),"."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"These cannot be used for statements, like ",(0,r.kt)("inlineCode",{parentName:"p"},"a?.b?.c = 0"),". They're only valid as expressions."),(0,r.kt)("p",{parentName:"admonition"},"Safe Navigation (for member access) was written by Sven Olsen.")),(0,r.kt)("h2",{id:"for-method-calls"},"For Method Calls"),(0,r.kt)("p",null,"Similarly, if you want to have optional hook functions, you can use safe method calls instead of writing conditionals:"),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Lua Way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Lua Way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"onEvent "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"onEvent"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(event)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Pluto Way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Pluto Way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #FD971F"}},"self"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"onEvent"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"?"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(event)"))))),(0,r.kt)("p",null,"You can also check if the left-hand side of ",(0,r.kt)("inlineCode",{parentName:"p"},":")," is not nil:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"object"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"?:"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"onEvent"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(event) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 'object' may be nil")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"object"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"?:"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"onEvent"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"?"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(event) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- 'object' and 'object.onEvent' may be nil"))))),(0,r.kt)("p",null,"Note that this feature will truncate multiple return values if they're not used as part of a fixed assignment:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"myfunc"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," c "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"_G"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"myfunc"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"?"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(a"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," b"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," c) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1 2 nil")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"_G"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"myfunc"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"?"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/998c02ee.918ea713.js b/assets/js/998c02ee.918ea713.js new file mode 100644 index 00000000..ea5c3fd4 --- /dev/null +++ b/assets/js/998c02ee.918ea713.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[7508],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>N});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),p=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},F=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(a),F=r,N=d["".concat(i,".").concat(F)]||d[F]||m[F]||o;return a?n.createElement(N,l(l({ref:t},c),{},{components:a})):n.createElement(N,l({ref:t},c))}));function N(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=F;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:r,l[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var n=a(7462),r=(a(7294),a(3905));const o={sidebar_position:2},l=void 0,s={unversionedId:"New Features/Safe Navigation",id:"New Features/Safe Navigation",title:"Safe Navigation",description:"For Member Access",source:"@site/docs/New Features/Safe Navigation.md",sourceDirName:"New Features",slug:"/New Features/Safe Navigation",permalink:"/docs/New Features/Safe Navigation",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Nodiscard Functions",permalink:"/docs/New Features/Nodiscard Functions"},next:{title:"Table Freezing",permalink:"/docs/New Features/Table Freezing"}},i={},p=[{value:"For Member Access",id:"for-member-access",level:2},{value:"For Method Calls",id:"for-method-calls",level:2}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(d,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"for-member-access"},"For Member Access"),(0,r.kt)("p",null,"Accessing deeply nested fields which can potentially be ",(0,r.kt)("inlineCode",{parentName:"p"},"nil"),' was problematic, because you\'d need an unreasonable amount of guard clauses to prevent an "attempt to index nil" error. Pluto now offers this syntax:'),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Basic Usage"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Basic Usage"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," person "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," name "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Alice"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," pet_name "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," person"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"pet"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"?."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name"))))),(0,r.kt)("p",null,"In this example, ",(0,r.kt)("inlineCode",{parentName:"p"},"person.pet"),' is nil. However, this does not throw an "attempt to index nil" error. ',(0,r.kt)("inlineCode",{parentName:"p"},"pet_name")," is simply set to ",(0,r.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Practical Usage"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Practical Usage"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Pretend userConfig is parsed from a JSON file, or something.")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--- Returning the user's preferred color, or Red if they have no preferred color.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"get_color"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," userConfig"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"colors"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"?."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"preferred "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"??"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Red"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"get_color"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"())"))))),(0,r.kt)("p",null,"In this example, we also use the null coalescing operator ",(0,r.kt)("inlineCode",{parentName:"p"},"??"),"."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"These cannot be used for statements, like ",(0,r.kt)("inlineCode",{parentName:"p"},"a?.b?.c = 0"),". They're only valid as expressions."),(0,r.kt)("p",{parentName:"admonition"},"Safe Navigation (for member access) was written by Sven Olsen.")),(0,r.kt)("h2",{id:"for-method-calls"},"For Method Calls"),(0,r.kt)("p",null,"Similarly, if you want to have optional hook functions, you can use safe method calls instead of writing conditionals:"),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Lua Way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Lua Way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"onEvent "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"onEvent"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(event)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Pluto Way"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Pluto Way"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#FD971F"}},"self"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"onEvent"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"?"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(event)"))))),(0,r.kt)("p",null,"You can also check if the left-hand side of ",(0,r.kt)("inlineCode",{parentName:"p"},":")," is not nil:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"object"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"?:"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"onEvent"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(event) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 'object' may be nil")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"object"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"?:"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"onEvent"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"?"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(event) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- 'object' and 'object.onEvent' may be nil"))))),(0,r.kt)("p",null,"Note that this feature will truncate multiple return values if they're not used as part of a fixed assignment:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"myfunc"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," c "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"_G"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"myfunc"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"?"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(a"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," b"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," c) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1 2 nil")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"_G"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"myfunc"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"?"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9e2b6020.0694e1ac.js b/assets/js/9e2b6020.0694e1ac.js deleted file mode 100644 index 40d6026e..00000000 --- a/assets/js/9e2b6020.0694e1ac.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[7234],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>F});var a=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i=a.createContext({}),p=function(e){var t=a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},c=function(e){var t=p(e.components);return a.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var r=e.components,o=e.mdxType,n=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(r),u=o,F=d["".concat(i,".").concat(u)]||d[u]||m[u]||n;return r?a.createElement(F,l(l({ref:t},c),{},{components:r})):a.createElement(F,l({ref:t},c))}));function F(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=r.length,l=new Array(n);l[0]=u;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:o,l[1]=s;for(var p=2;p{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>p});var a=r(7462),o=(r(7294),r(3905));const n={sidebar_position:2},l=void 0,s={unversionedId:"New Features/In Expressions",id:"New Features/In Expressions",title:"In Expressions",description:"The in operator has been extended to support string searches and table searches. For these purposes, it's the fastest possible solution.",source:"@site/docs/New Features/In Expressions.md",sourceDirName:"New Features",slug:"/New Features/In Expressions",permalink:"/docs/New Features/In Expressions",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Export Modifier",permalink:"/docs/New Features/Export Modifier"},next:{title:"Lambda Expressions",permalink:"/docs/New Features/Lambda Expressions"}},i={},p=[{value:"Rules",id:"rules",level:2}],c={toc:p},d="wrapper";function m(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,a.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"in")," operator has been extended to support string searches and table searches. For these purposes, it's the fastest possible solution."),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Searching for a substring."},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"Searching for a substring."),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"world"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"in"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,o.kt)("p",null,"When used on tables, the ",(0,o.kt)("inlineCode",{parentName:"p"},"in")," operator searches for ",(0,o.kt)("em",{parentName:"p"},"values"),". It'll search for array ",(0,o.kt)("em",{parentName:"p"},"elements")," and it'll search keys for ",(0,o.kt)("em",{parentName:"p"},"their values"),"."),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Searching a table for a value."},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"Searching a table for a value."),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"a"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"b"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"value"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"a"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"in"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "a" is an element inside of t.')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"b"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"in"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "b" is an element inside of t.')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"value"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"in"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "value" is the value of a key inside of t.')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"not"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"random"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"in"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "random" is not an element OR the value of a key inside of t.'))))),(0,o.kt)("h2",{id:"rules"},"Rules"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"The right-hand operand must always be a table or a string."),(0,o.kt)("li",{parentName:"ul"},"The left-hand operand must be a string if the right-hand operand is a string."),(0,o.kt)("li",{parentName:"ul"},"The left-hand operand can be anything if the right-hand operand is a table.")),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"The bytecode of this feature is not backwards-compatible with Lua.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9e2b6020.b2bd9a7d.js b/assets/js/9e2b6020.b2bd9a7d.js new file mode 100644 index 00000000..46d39bef --- /dev/null +++ b/assets/js/9e2b6020.b2bd9a7d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[7234],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>F});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),p=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(a),u=n,F=d["".concat(i,".").concat(u)]||d[u]||m[u]||o;return a?r.createElement(F,s(s({ref:t},c),{},{components:a})):r.createElement(F,s({ref:t},c))}));function F(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,s=new Array(o);s[0]=u;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[d]="string"==typeof e?e:n,s[1]=l;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:2},s=void 0,l={unversionedId:"New Features/In Expressions",id:"New Features/In Expressions",title:"In Expressions",description:"The in operator has been extended to support string searches and table searches. For these purposes, it's the fastest possible solution.",source:"@site/docs/New Features/In Expressions.md",sourceDirName:"New Features",slug:"/New Features/In Expressions",permalink:"/docs/New Features/In Expressions",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Export Modifier",permalink:"/docs/New Features/Export Modifier"},next:{title:"Lambda Expressions",permalink:"/docs/New Features/Lambda Expressions"}},i={},p=[{value:"Rules",id:"rules",level:2}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"The ",(0,n.kt)("inlineCode",{parentName:"p"},"in")," operator has been extended to support string searches and table searches. For these purposes, it's the fastest possible solution."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Searching for a substring."},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Searching for a substring."),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"world"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"in"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,n.kt)("p",null,"When used on tables, the ",(0,n.kt)("inlineCode",{parentName:"p"},"in")," operator searches for ",(0,n.kt)("em",{parentName:"p"},"values"),". It'll search for array ",(0,n.kt)("em",{parentName:"p"},"elements")," and it'll search keys for ",(0,n.kt)("em",{parentName:"p"},"their values"),"."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Searching a table for a value."},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Searching a table for a value."),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"a"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"b"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"value"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"a"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"in"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "a" is an element inside of t.')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"b"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"in"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "b" is an element inside of t.')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"value"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"in"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "value" is the value of a key inside of t.')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"not"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"random"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"in"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "random" is not an element OR the value of a key inside of t.'))))),(0,n.kt)("h2",{id:"rules"},"Rules"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"The right-hand operand must always be a table or a string."),(0,n.kt)("li",{parentName:"ul"},"The left-hand operand must be a string if the right-hand operand is a string."),(0,n.kt)("li",{parentName:"ul"},"The left-hand operand can be anything if the right-hand operand is a table.")),(0,n.kt)("admonition",{type:"caution"},(0,n.kt)("p",{parentName:"admonition"},"The bytecode of this feature is not backwards-compatible with Lua.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9f43fc60.016f9e2d.js b/assets/js/9f43fc60.016f9e2d.js deleted file mode 100644 index e400f07c..00000000 --- a/assets/js/9f43fc60.016f9e2d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5498],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>v});var o=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=o.createContext({}),p=function(e){var t=o.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},c=function(e){var t=p(e.components);return o.createElement(i.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},u=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=p(r),u=n,v=m["".concat(i,".").concat(u)]||m[u]||d[u]||a;return r?o.createElement(v,l(l({ref:t},c),{},{components:r})):o.createElement(v,l({ref:t},c))}));function v(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,l=new Array(a);l[0]=u;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[m]="string"==typeof e?e:n,l[1]=s;for(var p=2;p{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>d,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var o=r(7462),n=(r(7294),r(3905));const a={},l=void 0,s={unversionedId:"QoL Improvements/Optional Parentheses",id:"QoL Improvements/Optional Parentheses",title:"Optional Parentheses",description:"The parenthesis around some types of expressions are optional now.",source:"@site/docs/QoL Improvements/Optional Parentheses.md",sourceDirName:"QoL Improvements",slug:"/QoL Improvements/Optional Parentheses",permalink:"/docs/QoL Improvements/Optional Parentheses",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Generalized Iteration",permalink:"/docs/QoL Improvements/Generalized Iteration"},next:{title:"Removed Locals Limit",permalink:"/docs/QoL Improvements/Removed Locals Limit"}},i={},p=[],c={toc:p},m="wrapper";function d(e){let{components:t,...r}=e;return(0,n.kt)(m,(0,o.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"The parenthesis around some types of expressions are optional now."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Gross Way"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Gross Way"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"contains"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"world"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"))"))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Clean Way"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Clean Way"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"contains"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"world"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"))"))))),(0,n.kt)("p",null,"This also works for table types."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9f43fc60.d877bf45.js b/assets/js/9f43fc60.d877bf45.js new file mode 100644 index 00000000..75f7c7ca --- /dev/null +++ b/assets/js/9f43fc60.d877bf45.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5498],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>v});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),p=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},c=function(e){var t=p(e.components);return n.createElement(i.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=p(r),u=a,v=m["".concat(i,".").concat(u)]||m[u]||d[u]||o;return r?n.createElement(v,s(s({ref:t},c),{},{components:r})):n.createElement(v,s({ref:t},c))}));function v(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=u;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[m]="string"==typeof e?e:a,s[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=r(7462),a=(r(7294),r(3905));const o={},s=void 0,l={unversionedId:"QoL Improvements/Optional Parentheses",id:"QoL Improvements/Optional Parentheses",title:"Optional Parentheses",description:"The parenthesis around some types of expressions are optional now.",source:"@site/docs/QoL Improvements/Optional Parentheses.md",sourceDirName:"QoL Improvements",slug:"/QoL Improvements/Optional Parentheses",permalink:"/docs/QoL Improvements/Optional Parentheses",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Generalized Iteration",permalink:"/docs/QoL Improvements/Generalized Iteration"},next:{title:"Removed Locals Limit",permalink:"/docs/QoL Improvements/Removed Locals Limit"}},i={},p=[],c={toc:p},m="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(m,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The parenthesis around some types of expressions are optional now."),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Gross Way"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Gross Way"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(("),(0,a.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world"'),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,a.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,a.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"contains"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"world"'),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"))"))))),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Clean Way"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Clean Way"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world"'),(0,a.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,a.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"contains"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"world"'),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"))"))))),(0,a.kt)("p",null,"This also works for table types."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a87c8fc0.6bab9a7c.js b/assets/js/a87c8fc0.6bab9a7c.js new file mode 100644 index 00000000..17c8459b --- /dev/null +++ b/assets/js/a87c8fc0.6bab9a7c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[7846],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>v});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),p=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},F=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=p(a),F=r,v=d["".concat(s,".").concat(F)]||d[F]||m[F]||o;return a?n.createElement(v,l(l({ref:t},c),{},{components:a})):n.createElement(v,l({ref:t},c))}));function v(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=F;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[d]="string"==typeof e?e:r,l[1]=i;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var n=a(7462),r=(a(7294),a(3905));const o={sidebar_position:1},l=void 0,i={unversionedId:"New Features/String Interpolation",id:"New Features/String Interpolation",title:"String Interpolation",description:"String interpolation is a simple alternative syntax to concatenation.",source:"@site/docs/New Features/String Interpolation.md",sourceDirName:"New Features",slug:"/New Features/String Interpolation",permalink:"/docs/New Features/String Interpolation",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"String Indexing",permalink:"/docs/New Features/String Indexing"},next:{title:"Switch Blocks",permalink:"/docs/New Features/Switch Blocks"}},s={},p=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(d,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"String interpolation is a simple alternative syntax to concatenation."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Concatenation"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Concatenation"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," label "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"meaning of life"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," data "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { value "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"The "'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," label "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" is "'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," data"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"value) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "The meaning of life is 42"'))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"String Interpolation"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"String Interpolation"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," label "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"meaning of life"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," data "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { value "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"42"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$"),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"The '),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{label}"),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," is "),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{data"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"value}"),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "The meaning of life is 42"'))))),(0,r.kt)("h4",{id:"try-it-yourself"},(0,r.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20label%20%3D%20%22meaning%20of%20life%22%0D%0Alocal%20data%20%3D%20%7B%20value%20%3D%2042%20%7D%0D%0Aprint(%24%22The%20%7Blabel%7D%20is%20%7Bdata.value%7D%22)%20--%20%22The%20meaning%20of%20life%20is%2042%22"},"Try It Yourself")),(0,r.kt)("p",null,'As you can see, you declare a string interpolated by prefixing it with the "$" symbol. Brackets can contain any expression. The result of expressions will be converted to a string as with normal concatenation, although note that Pluto supports ',(0,r.kt)("a",{parentName:"p",href:"../QoL%20Improvements/Boolean%20Concatenation"},"boolean concatenation")," unlike Lua."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a87c8fc0.f4853ce8.js b/assets/js/a87c8fc0.f4853ce8.js deleted file mode 100644 index 57de9685..00000000 --- a/assets/js/a87c8fc0.f4853ce8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[7846],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>v});var a=o(7294);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function l(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var c=a.createContext({}),s=function(e){var t=a.useContext(c),o=t;return e&&(o="function"==typeof e?e(t):l(l({},t),e)),o},p=function(e){var t=s(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},F=a.forwardRef((function(e,t){var o=e.components,r=e.mdxType,n=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=s(o),F=r,v=d["".concat(c,".").concat(F)]||d[F]||m[F]||n;return o?a.createElement(v,l(l({ref:t},p),{},{components:o})):a.createElement(v,l({ref:t},p))}));function v(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var n=o.length,l=new Array(n);l[0]=F;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:r,l[1]=i;for(var s=2;s{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>n,metadata:()=>i,toc:()=>s});var a=o(7462),r=(o(7294),o(3905));const n={sidebar_position:1},l=void 0,i={unversionedId:"New Features/String Interpolation",id:"New Features/String Interpolation",title:"String Interpolation",description:"String interpolation is a simple alternative syntax to concatenation.",source:"@site/docs/New Features/String Interpolation.md",sourceDirName:"New Features",slug:"/New Features/String Interpolation",permalink:"/docs/New Features/String Interpolation",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"String Indexing",permalink:"/docs/New Features/String Indexing"},next:{title:"Switch Blocks",permalink:"/docs/New Features/Switch Blocks"}},c={},s=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],p={toc:s},d="wrapper";function m(e){let{components:t,...o}=e;return(0,r.kt)(d,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"String interpolation is a simple alternative syntax to concatenation."),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"Concatenation"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Concatenation"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," label "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"meaning of life"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," data "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { value "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"The "'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," label "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" is "'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," data"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"value) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "The meaning of life is 42"'))))),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},title:"String Interpolation"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"String Interpolation"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," label "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"meaning of life"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," data "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { value "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"42"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"The '),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{label}"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," is "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{data"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"value}"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "The meaning of life is 42"'))))),(0,r.kt)("h4",{id:"try-it-yourself"},(0,r.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20label%20%3D%20%22meaning%20of%20life%22%0D%0Alocal%20data%20%3D%20%7B%20value%20%3D%2042%20%7D%0D%0Aprint(%24%22The%20%7Blabel%7D%20is%20%7Bdata.value%7D%22)%20--%20%22The%20meaning%20of%20life%20is%2042%22"},"Try It Yourself")),(0,r.kt)("p",null,'As you can see, you declare a string interpolated by prefixing it with the "$" symbol. Brackets can contain any expression. The result of expressions will be converted to a string as with normal concatenation, although note that Pluto supports ',(0,r.kt)("a",{parentName:"p",href:"../QoL%20Improvements/Boolean%20Concatenation"},"boolean concatenation")," unlike Lua."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ab6d44ab.413f0394.js b/assets/js/ab6d44ab.413f0394.js new file mode 100644 index 00000000..30ad327e --- /dev/null +++ b/assets/js/ab6d44ab.413f0394.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[4250],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>F});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),p=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),c=p(a),k=n,F=c["".concat(s,".").concat(k)]||c[k]||m[k]||l;return a?r.createElement(F,o(o({ref:t},d),{},{components:a})):r.createElement(F,o({ref:t},d))}));function F(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,o=new Array(l);o[0]=k;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:n,o[1]=i;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>m,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=a(7462),n=(a(7294),a(3905));const l={sidebar_position:2},o=void 0,i={unversionedId:"Runtime Environment/IO",id:"Runtime Environment/IO",title:"IO",description:"This page documents the changes & additions to the io library in Pluto, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/IO.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/IO",permalink:"/docs/Runtime Environment/IO",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Coroutine",permalink:"/docs/Runtime Environment/Coroutine"},next:{title:"Math",permalink:"/docs/Runtime Environment/Math"}},s={},p=[{value:"io.rename",id:"iorename",level:3},{value:"io.remove",id:"ioremove",level:3},{value:"io.copy",id:"iocopy",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"io.part",id:"iopart",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"io.isdir",id:"ioisdir",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"io.isfile",id:"ioisfile",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"io.exists",id:"ioexists",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-4",level:4},{value:"io.makedir",id:"iomakedir",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-5",level:4},{value:"io.listdir",id:"iolistdir",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-6",level:4},{value:"io.makedirs",id:"iomakedirs",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"io.absolute",id:"ioabsolute",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-7",level:4},{value:"io.relative",id:"iorelative",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-8",level:4},{value:"io.contents",id:"iocontents",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-9",level:4},{value:"io.filesize",id:"iofilesize",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"io.writetime",id:"iowritetime",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-10",level:4},{value:"io.currentdir",id:"iocurrentdir",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-11",level:4}],d={toc:p},c="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(c,(0,r.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"This page documents the changes & additions to the ",(0,n.kt)("inlineCode",{parentName:"p"},"io")," library in Pluto, which is built on top of Lua 5.4's."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"iorename"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.rename")),(0,n.kt)("p",null,"A variant of Lua's ",(0,n.kt)("inlineCode",{parentName:"p"},"os.rename")," that raises an error on failure and instead has no return values."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"ioremove"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.remove")),(0,n.kt)("p",null,"A variant of Lua's ",(0,n.kt)("inlineCode",{parentName:"p"},"os.remove")," that raises an error on failure and instead has no return values."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"iocopy"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.copy")),(0,n.kt)("p",null,"Copy a file to another file, creating a new file if needed."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A string path or file stream."),(0,n.kt)("li",{parentName:"ol"},"A path towards the file to copy into.")),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,"A boolean indicating if the file was successfully copied."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"copy"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"./cfg/config.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"./backup_cfg/config.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Successfully created a backup config!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"else")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Failed to create a backup config."'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"iopart"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.part")),(0,n.kt)("p",null,"Extracts the given part from a path."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A string path or file stream."),(0,n.kt)("li",{parentName:"ol"},'The part to return, "parent" or "name".')),(0,n.kt)("h4",{id:"returns-1"},"Returns"),(0,n.kt)("p",null,"The extracted part."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"part"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"/path/to/foo.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"parent"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "/path/to"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"part"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"/path/to/foo.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"name"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "foo.txt"'))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"ioisdir"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.isdir")),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A string path or file stream.")),(0,n.kt)("h4",{id:"returns-2"},"Returns"),(0,n.kt)("p",null,"A boolean indicating if the path led toward a directory."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," path "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"./dir/main/"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bool "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isdir"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(path)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bool "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Directory!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"else")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Not a directory!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"ioisfile"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.isfile")),(0,n.kt)("h4",{id:"parameters-3"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A string path or file stream.")),(0,n.kt)("h4",{id:"returns-3"},"Returns"),(0,n.kt)("p",null,"A boolean indicating if the path led towards a file."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," path "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"./isfile/file"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bool "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isfile"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(path)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," bool "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"File!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"else")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Not a file!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"ioexists"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.exists")),(0,n.kt)("h4",{id:"parameters-4"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A string path or file stream.")),(0,n.kt)("h4",{id:"returns-4"},"Returns"),(0,n.kt)("p",null,"A boolean indicating if the path led towards an existing file or directory."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"exists"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"cfg/config.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Config exists!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"else")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Config does not exist!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"iomakedir"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.makedir")),(0,n.kt)("p",null,"Create a directory."),(0,n.kt)("h4",{id:"parameters-5"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The path for the new directory.")),(0,n.kt)("h4",{id:"returns-5"},"Returns"),(0,n.kt)("p",null,"A boolean indicating if the directory was successfully created."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"makedir"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"./cfg"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Created cfg directory."'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"else")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Failed to create cfg directory."'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"iolistdir"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.listdir")),(0,n.kt)("p",null,"List all the files within a directory."),(0,n.kt)("h4",{id:"parameters-6"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A string path to the directory."),(0,n.kt)("li",{parentName:"ol"},"A boolean indicating whether or not to recurse sub-directories.")),(0,n.kt)("h4",{id:"returns-6"},"Returns"),(0,n.kt)("p",null,"An index-based table containing file paths."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," _"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," filepath "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"in"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"listdir"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"."'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(filepath)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"iomakedirs"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.makedirs")),(0,n.kt)("p",null,"Creates a directory and all the non-existing parent directories in the given path."),(0,n.kt)("h4",{id:"parameters-7"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string path for your new directory.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"makedirs"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"A/B/C"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- Creates "C:\\Users\\Username\\Desktop\\Project\\A\\B\\C"'))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"ioabsolute"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.absolute")),(0,n.kt)("p",null,"Convert a relative path into an absolute one."),(0,n.kt)("h4",{id:"parameters-8"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A string path or file stream."),(0,n.kt)("li",{parentName:"ol"},"An optional bool if the path should be canonicalized. A canonical path does not go through symlinks.")),(0,n.kt)("h4",{id:"returns-7"},"Returns"),(0,n.kt)("p",null,"A string representing the new file path."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"absolute"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"cfg/cfg.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "C:\\Users\\Username\\Desktop\\Project\\cfg\\cfg.txt"'))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"iorelative"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.relative")),(0,n.kt)("p",null,"Convert an absolute path into a relative one."),(0,n.kt)("h4",{id:"parameters-9"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A string path or file stream.")),(0,n.kt)("h4",{id:"returns-8"},"Returns"),(0,n.kt)("p",null,"A string representing the new file path."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"relative"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"absolute"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"cfg/cfg.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "cfg\\cfg.txt"'))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"iocontents"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.contents")),(0,n.kt)("p",null,"Get or set a file's contents."),(0,n.kt)("h4",{id:"parameters-10"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A string path or file stream."),(0,n.kt)("li",{parentName:"ol"},"The desired content. If this parameter is absent, this function works as a ",(0,n.kt)("em",{parentName:"li"},"getter."))),(0,n.kt)("h4",{id:"returns-9"},"Returns"),(0,n.kt)("p",null,"If this function is acting as a ",(0,n.kt)("em",{parentName:"p"},"getter"),", it will return the file's contents or ",(0,n.kt)("inlineCode",{parentName:"p"},"nil")," if there was an error."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," text "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"contents"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"foo.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"or"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'""')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"text "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"..="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"bar"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"contents"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"foo.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," text)"))))),(0,n.kt)("p",null,"This function is not only easier to use than the traditional ",(0,n.kt)("inlineCode",{parentName:"p"},"io.open")," approach, it also performs significantly better."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"iofilesize"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.filesize")),(0,n.kt)("p",null,"Fetch the size of a file in bytes."),(0,n.kt)("h4",{id:"parameters-11"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A string path or file stream.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"filesize"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"cfg/config.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"<="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Config is too small or empty."'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"iowritetime"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.writetime")),(0,n.kt)("p",null,"Get or set a file's modification time."),(0,n.kt)("h4",{id:"parameters-12"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A string path or file stream."),(0,n.kt)("li",{parentName:"ol"},"The desired timestamp. If this parameter is absent, this function works as a ",(0,n.kt)("em",{parentName:"li"},"getter."))),(0,n.kt)("h4",{id:"returns-10"},"Returns"),(0,n.kt)("p",null,"If this function is acting as a ",(0,n.kt)("em",{parentName:"p"},"getter"),", it will return the file's last write time as seconds since the UNIX epoch."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," time "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"writetime"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"foo.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"time "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"+="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3600")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"writetime"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"foo.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," time)"))))),(0,n.kt)("p",null,'This example adds an hour (= 60 minutes = 3600 seconds) to the last write time of "foo.txt" (or errors if that file does not exist).'),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"iocurrentdir"},(0,n.kt)("inlineCode",{parentName:"h3"},"io.currentdir")),(0,n.kt)("p",null,"Get or set the current working directory."),(0,n.kt)("h4",{id:"parameters-13"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A path to the desired current working directory. If this parameter is absent, this function works as a ",(0,n.kt)("em",{parentName:"li"},"getter."))),(0,n.kt)("h4",{id:"returns-11"},"Returns"),(0,n.kt)("p",null,"If this function is acting as a ",(0,n.kt)("em",{parentName:"p"},"getter"),", it will return the current working directory."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," cwd "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"currentdir"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Get cwd")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"currentdir"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"abc/abc"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Set a new cwd"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ab6d44ab.fbfa218c.js b/assets/js/ab6d44ab.fbfa218c.js deleted file mode 100644 index 15e11a86..00000000 --- a/assets/js/ab6d44ab.fbfa218c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[4250],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>F});var o=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function n(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=o.createContext({}),c=function(e){var t=o.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):n(n({},t),e)),a},p=function(e){var t=c(e.components);return o.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},k=o.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=c(a),k=r,F=d["".concat(s,".").concat(k)]||d[k]||m[k]||l;return a?o.createElement(F,n(n({ref:t},p),{},{components:a})):o.createElement(F,n({ref:t},p))}));function F(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,n=new Array(l);n[0]=k;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[d]="string"==typeof e?e:r,n[1]=i;for(var c=2;c{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>n,default:()=>m,frontMatter:()=>l,metadata:()=>i,toc:()=>c});var o=a(7462),r=(a(7294),a(3905));const l={sidebar_position:2},n=void 0,i={unversionedId:"Runtime Environment/IO",id:"Runtime Environment/IO",title:"IO",description:"This page documents the changes & additions to the io library in Pluto, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/IO.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/IO",permalink:"/docs/Runtime Environment/IO",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Coroutine",permalink:"/docs/Runtime Environment/Coroutine"},next:{title:"Math",permalink:"/docs/Runtime Environment/Math"}},s={},c=[{value:"io.rename",id:"iorename",level:3},{value:"io.remove",id:"ioremove",level:3},{value:"io.copy",id:"iocopy",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"io.part",id:"iopart",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"io.isdir",id:"ioisdir",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"io.isfile",id:"ioisfile",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"io.exists",id:"ioexists",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-4",level:4},{value:"io.makedir",id:"iomakedir",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-5",level:4},{value:"io.listdir",id:"iolistdir",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-6",level:4},{value:"io.makedirs",id:"iomakedirs",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"io.absolute",id:"ioabsolute",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-7",level:4},{value:"io.relative",id:"iorelative",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-8",level:4},{value:"io.contents",id:"iocontents",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-9",level:4},{value:"io.filesize",id:"iofilesize",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"io.writetime",id:"iowritetime",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-10",level:4},{value:"io.currentdir",id:"iocurrentdir",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-11",level:4}],p={toc:c},d="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(d,(0,o.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This page documents the changes & additions to the ",(0,r.kt)("inlineCode",{parentName:"p"},"io")," library in Pluto, which is built on top of Lua 5.4's."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"iorename"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.rename")),(0,r.kt)("p",null,"A variant of Lua's ",(0,r.kt)("inlineCode",{parentName:"p"},"os.rename")," that raises an error on failure and instead has no return values."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ioremove"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.remove")),(0,r.kt)("p",null,"A variant of Lua's ",(0,r.kt)("inlineCode",{parentName:"p"},"os.remove")," that raises an error on failure and instead has no return values."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"iocopy"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.copy")),(0,r.kt)("p",null,"Copy a file to another file, creating a new file if needed."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A string path or file stream."),(0,r.kt)("li",{parentName:"ol"},"A path towards the file to copy into.")),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,"A boolean indicating if the file was successfully copied."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"copy"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"./cfg/config.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"./backup_cfg/config.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Successfully created a backup config!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"else")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Failed to create a backup config."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"iopart"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.part")),(0,r.kt)("p",null,"Extracts the given part from a path."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A string path or file stream."),(0,r.kt)("li",{parentName:"ol"},'The part to return, "parent" or "name".')),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,"The extracted part."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"part"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"/path/to/foo.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"parent"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "/path/to"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"part"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"/path/to/foo.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"name"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "foo.txt"'))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ioisdir"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.isdir")),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A string path or file stream.")),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,"A boolean indicating if the path led toward a directory."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," path "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"./dir/main/"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bool "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isdir"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(path)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bool "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Directory!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"else")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Not a directory!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ioisfile"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.isfile")),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A string path or file stream.")),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,"A boolean indicating if the path led towards a file."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," path "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"./isfile/file"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bool "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isfile"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(path)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," bool "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"File!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"else")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Not a file!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ioexists"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.exists")),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A string path or file stream.")),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,"A boolean indicating if the path led towards an existing file or directory."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"exists"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"cfg/config.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Config exists!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"else")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Config does not exist!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"iomakedir"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.makedir")),(0,r.kt)("p",null,"Create a directory."),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The path for the new directory.")),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,"A boolean indicating if the directory was successfully created."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"makedir"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"./cfg"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Created cfg directory."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"else")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Failed to create cfg directory."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"iolistdir"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.listdir")),(0,r.kt)("p",null,"List all the files within a directory."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A string path to the directory."),(0,r.kt)("li",{parentName:"ol"},"A boolean indicating whether or not to recurse sub-directories.")),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,"An index-based table containing file paths."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," _"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," filepath "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"in"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"listdir"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(filepath)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"iomakedirs"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.makedirs")),(0,r.kt)("p",null,"Creates a directory and all the non-existing parent directories in the given path."),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The string path for your new directory.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"makedirs"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"A/B/C"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- Creates "C:\\Users\\Username\\Desktop\\Project\\A\\B\\C"'))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ioabsolute"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.absolute")),(0,r.kt)("p",null,"Convert a relative path into an absolute one."),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A string path or file stream."),(0,r.kt)("li",{parentName:"ol"},"An optional bool if the path should be canonicalized. A canonical path does not go through symlinks.")),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,"A string representing the new file path."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"absolute"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"cfg/cfg.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "C:\\Users\\Username\\Desktop\\Project\\cfg\\cfg.txt"'))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"iorelative"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.relative")),(0,r.kt)("p",null,"Convert an absolute path into a relative one."),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A string path or file stream.")),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,"A string representing the new file path."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"relative"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"absolute"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"cfg/cfg.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "cfg\\cfg.txt"'))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"iocontents"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.contents")),(0,r.kt)("p",null,"Get or set a file's contents."),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A string path or file stream."),(0,r.kt)("li",{parentName:"ol"},"The desired content. If this parameter is absent, this function works as a ",(0,r.kt)("em",{parentName:"li"},"getter."))),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,"If this function is acting as a ",(0,r.kt)("em",{parentName:"p"},"getter"),", it will return the file's contents or ",(0,r.kt)("inlineCode",{parentName:"p"},"nil")," if there was an error."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," text "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"contents"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"foo.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"or"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'""')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"text "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"..="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"bar"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"contents"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"foo.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," text)"))))),(0,r.kt)("p",null,"This function is not only easier to use than the traditional ",(0,r.kt)("inlineCode",{parentName:"p"},"io.open")," approach, it also performs significantly better."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"iofilesize"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.filesize")),(0,r.kt)("p",null,"Fetch the size of a file in bytes."),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A string path or file stream.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"filesize"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"cfg/config.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"<="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Config is too small or empty."'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"iowritetime"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.writetime")),(0,r.kt)("p",null,"Get or set a file's modification time."),(0,r.kt)("h4",{id:"parameters-12"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A string path or file stream."),(0,r.kt)("li",{parentName:"ol"},"The desired timestamp. If this parameter is absent, this function works as a ",(0,r.kt)("em",{parentName:"li"},"getter."))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,"If this function is acting as a ",(0,r.kt)("em",{parentName:"p"},"getter"),", it will return the file's last write time as seconds since the UNIX epoch."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," time "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"writetime"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"foo.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"time "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"+="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3600")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"writetime"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"foo.txt"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," time)"))))),(0,r.kt)("p",null,'This example adds an hour (= 60 minutes = 3600 seconds) to the last write time of "foo.txt" (or errors if that file does not exist).'),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"iocurrentdir"},(0,r.kt)("inlineCode",{parentName:"h3"},"io.currentdir")),(0,r.kt)("p",null,"Get or set the current working directory."),(0,r.kt)("h4",{id:"parameters-13"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A path to the desired current working directory. If this parameter is absent, this function works as a ",(0,r.kt)("em",{parentName:"li"},"getter."))),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,"If this function is acting as a ",(0,r.kt)("em",{parentName:"p"},"getter"),", it will return the current working directory."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," cwd "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"currentdir"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Get cwd")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"currentdir"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"abc/abc"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Set a new cwd"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/abac9f7e.1a0ca031.js b/assets/js/abac9f7e.1cf438e4.js similarity index 79% rename from assets/js/abac9f7e.1a0ca031.js rename to assets/js/abac9f7e.1cf438e4.js index ce1a8b94..90279dd1 100644 --- a/assets/js/abac9f7e.1a0ca031.js +++ b/assets/js/abac9f7e.1cf438e4.js @@ -1 +1 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5037],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>v});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=o.createContext({}),c=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},p=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},u=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),m=c(n),u=r,v=m["".concat(l,".").concat(u)]||m[u]||d[u]||i;return n?o.createElement(v,a(a({ref:t},p),{},{components:n})):o.createElement(v,a({ref:t},p))}));function v(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[m]="string"==typeof e?e:r,a[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var o=n(7462),r=(n(7294),n(3905));const i={sidebar_position:2},a=void 0,s={unversionedId:"Runtime Environment/OS",id:"Runtime Environment/OS",title:"OS",description:"This page documents the changes & additions to the os library in Pluto, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/OS.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/OS",permalink:"/docs/Runtime Environment/OS",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Math",permalink:"/docs/Runtime Environment/Math"},next:{title:"String",permalink:"/docs/Runtime Environment/String"}},l={},c=[{value:"os.sleep",id:"ossleep",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Example",id:"example",level:4},{value:"os.nanos, os.micros, os.millis, os.seconds",id:"osnanos-osmicros-osmillis-osseconds",level:3},{value:"os.unixseconds",id:"osunixseconds",level:3}],p={toc:c},m="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,o.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This page documents the changes & additions to the ",(0,r.kt)("inlineCode",{parentName:"p"},"os")," library in Pluto, which is built on top of Lua 5.4's."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ossleep"},(0,r.kt)("inlineCode",{parentName:"h3"},"os.sleep")),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The amount of milliseconds to sleep for.")),(0,r.kt)("h4",{id:"example"},"Example"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"os"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sleep"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1000"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Pause this thread for 1000ms."))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"osnanos-osmicros-osmillis-osseconds"},(0,r.kt)("inlineCode",{parentName:"h3"},"os.nanos"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"os.micros"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"os.millis"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"os.seconds")),(0,r.kt)("p",null,"All of these return their respective times since implementation-specific epoch."),(0,r.kt)("h3",{id:"osunixseconds"},(0,r.kt)("inlineCode",{parentName:"h3"},"os.unixseconds")),(0,r.kt)("p",null,"Returns seconds since UNIX epoch."))}d.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5037],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>v});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=o.createContext({}),c=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},p=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},u=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),m=c(n),u=r,v=m["".concat(l,".").concat(u)]||m[u]||d[u]||i;return n?o.createElement(v,a(a({ref:t},p),{},{components:n})):o.createElement(v,a({ref:t},p))}));function v(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[m]="string"==typeof e?e:r,a[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var o=n(7462),r=(n(7294),n(3905));const i={sidebar_position:2},a=void 0,s={unversionedId:"Runtime Environment/OS",id:"Runtime Environment/OS",title:"OS",description:"This page documents the changes & additions to the os library in Pluto, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/OS.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/OS",permalink:"/docs/Runtime Environment/OS",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Math",permalink:"/docs/Runtime Environment/Math"},next:{title:"String",permalink:"/docs/Runtime Environment/String"}},l={},c=[{value:"os.sleep",id:"ossleep",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Example",id:"example",level:4},{value:"os.nanos, os.micros, os.millis, os.seconds",id:"osnanos-osmicros-osmillis-osseconds",level:3},{value:"os.unixseconds",id:"osunixseconds",level:3}],p={toc:c},m="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,o.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This page documents the changes & additions to the ",(0,r.kt)("inlineCode",{parentName:"p"},"os")," library in Pluto, which is built on top of Lua 5.4's."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ossleep"},(0,r.kt)("inlineCode",{parentName:"h3"},"os.sleep")),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The amount of milliseconds to sleep for.")),(0,r.kt)("h4",{id:"example"},"Example"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"os"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sleep"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1000"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Pause this thread for 1000ms."))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"osnanos-osmicros-osmillis-osseconds"},(0,r.kt)("inlineCode",{parentName:"h3"},"os.nanos"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"os.micros"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"os.millis"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"os.seconds")),(0,r.kt)("p",null,"All of these return their respective times since implementation-specific epoch."),(0,r.kt)("h3",{id:"osunixseconds"},(0,r.kt)("inlineCode",{parentName:"h3"},"os.unixseconds")),(0,r.kt)("p",null,"Returns seconds since UNIX epoch."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/bced9760.38f82b3a.js b/assets/js/bced9760.38f82b3a.js new file mode 100644 index 00000000..59c4a6f3 --- /dev/null +++ b/assets/js/bced9760.38f82b3a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8387],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>k});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var p=r.createContext({}),i=function(e){var t=r.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=i(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=i(a),F=n,k=m["".concat(p,".").concat(F)]||m[F]||d[F]||o;return a?r.createElement(k,l(l({ref:t},c),{},{components:a})):r.createElement(k,l({ref:t},c))}));function k(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=F;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[m]="string"==typeof e?e:n,l[1]=s;for(var i=2;i{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>i});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:1},l=void 0,s={unversionedId:"New Features/Break Statement",id:"New Features/Break Statement",title:"Break Statement",description:"This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should break. The default value is 1, thus breaking out of the current loop.",source:"@site/docs/New Features/Break Statement.md",sourceDirName:"New Features",slug:"/New Features/Break Statement",permalink:"/docs/New Features/Break Statement",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"New Features",permalink:"/docs/category/new-features"},next:{title:"Compiler Warnings",permalink:"/docs/New Features/Compiler Warnings"}},p={},i=[],c={toc:i},m="wrapper";function d(e){let{components:t,...a}=e;return(0,n.kt)(m,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should break. The default value is 1, thus breaking out of the current loop."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example 1"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Example 1"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Loop 1.")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- This is identical to `break` without any arguments.")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example 2"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Example 2"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," i "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Loop 1.")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ii "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Loop 2.")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- This will break from Loop 2.")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- This will break from Loop 1.")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/bced9760.400b90e5.js b/assets/js/bced9760.400b90e5.js deleted file mode 100644 index 437476c1..00000000 --- a/assets/js/bced9760.400b90e5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8387],{3905:(e,t,o)=>{o.d(t,{Zo:()=>i,kt:()=>k});var r=o(7294);function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function l(e){for(var t=1;t=0||(a[o]=e[o]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(a[o]=e[o])}return a}var c=r.createContext({}),p=function(e){var t=r.useContext(c),o=t;return e&&(o="function"==typeof e?e(t):l(l({},t),e)),o},i=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var o=e.components,a=e.mdxType,n=e.originalType,c=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),m=p(o),F=a,k=m["".concat(c,".").concat(F)]||m[F]||d[F]||n;return o?r.createElement(k,l(l({ref:t},i),{},{components:o})):r.createElement(k,l({ref:t},i))}));function k(e,t){var o=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var n=o.length,l=new Array(n);l[0]=F;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[m]="string"==typeof e?e:a,l[1]=s;for(var p=2;p{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>d,frontMatter:()=>n,metadata:()=>s,toc:()=>p});var r=o(7462),a=(o(7294),o(3905));const n={sidebar_position:1},l=void 0,s={unversionedId:"New Features/Break Statement",id:"New Features/Break Statement",title:"Break Statement",description:"This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should break. The default value is 1, thus breaking out of the current loop.",source:"@site/docs/New Features/Break Statement.md",sourceDirName:"New Features",slug:"/New Features/Break Statement",permalink:"/docs/New Features/Break Statement",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"New Features",permalink:"/docs/category/new-features"},next:{title:"Compiler Warnings",permalink:"/docs/New Features/Compiler Warnings"}},c={},p=[],i={toc:p},m="wrapper";function d(e){let{components:t,...o}=e;return(0,a.kt)(m,(0,r.Z)({},i,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should break. The default value is 1, thus breaking out of the current loop."),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example 1"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Example 1"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Loop 1.")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- This is identical to `break` without any arguments.")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example 2"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Example 2"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," i "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Loop 1.")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ii "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Loop 2.")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- This will break from Loop 2.")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- This will break from Loop 1.")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/bd751cc9.693890f8.js b/assets/js/bd751cc9.693890f8.js deleted file mode 100644 index ea3330f7..00000000 --- a/assets/js/bd751cc9.693890f8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9101],{3905:(e,o,t)=>{t.d(o,{Zo:()=>p,kt:()=>k});var a=t(7294);function n(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function r(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var o=1;o=0||(n[t]=e[t]);return n}(e,o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var s=a.createContext({}),c=function(e){var o=a.useContext(s),t=o;return e&&(t="function"==typeof e?e(o):l(l({},o),e)),t},p=function(e){var o=c(e.components);return a.createElement(s.Provider,{value:o},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var o=e.children;return a.createElement(a.Fragment,{},o)}},u=a.forwardRef((function(e,o){var t=e.components,n=e.mdxType,r=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=c(t),u=n,k=d["".concat(s,".").concat(u)]||d[u]||m[u]||r;return t?a.createElement(k,l(l({ref:o},p),{},{components:t})):a.createElement(k,l({ref:o},p))}));function k(e,o){var t=arguments,n=o&&o.mdxType;if("string"==typeof e||n){var r=t.length,l=new Array(r);l[0]=u;var i={};for(var s in o)hasOwnProperty.call(o,s)&&(i[s]=o[s]);i.originalType=e,i[d]="string"==typeof e?e:n,l[1]=i;for(var c=2;c{t.r(o),t.d(o,{assets:()=>s,contentTitle:()=>l,default:()=>m,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var a=t(7462),n=(t(7294),t(3905));const r={sidebar_position:11},l="For Integrators",i={unversionedId:"For Integrators",id:"For Integrators",title:"For Integrators",description:"The luaconf.h in Pluto provides various battle-tested mechanisms for locking down your Pluto environments. In this article, we've documented some of those. If you are an integrator who needs help configuring any of this, or who wants us to implement another mechanism, feel free to contact us on GitHub.",source:"@site/docs/For Integrators.md",sourceDirName:".",slug:"/For Integrators",permalink:"/docs/For Integrators",draft:!1,tags:[],version:"current",sidebarPosition:11,frontMatter:{sidebar_position:11},sidebar:"tutorialSidebar",previous:{title:"Compatibility",permalink:"/docs/Compatibility"},next:{title:"Changelog",permalink:"/docs/Changelog"}},s={},c=[{value:"Content Moderation",id:"content-moderation",level:2},{value:"Compiled Code",id:"compiled-code",level:3},{value:"Custom Module Filters",id:"custom-module-filters",level:3},{value:"Prevent Loading of Binary Modules",id:"prevent-loading-of-binary-modules",level:3},{value:"Execution Time Limit",id:"execution-time-limit",level:2},{value:"Infinite Loop Prevention",id:"infinite-loop-prevention",level:2},{value:"VM Dumping",id:"vm-dumping",level:2},{value:"Configuration",id:"configuration",level:3},{value:"What it looks like",id:"what-it-looks-like",level:3}],p={toc:c},d="wrapper";function m(e){let{components:o,...t}=e;return(0,n.kt)(d,(0,a.Z)({},p,t,{components:o,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"for-integrators"},"For Integrators"),(0,n.kt)("p",null,"The ",(0,n.kt)("inlineCode",{parentName:"p"},"luaconf.h")," in Pluto provides various battle-tested mechanisms for locking down your Pluto environments. In this article, we've documented some of those. If you are an integrator who needs help configuring any of this, or who wants us to implement another mechanism, feel free to contact us on GitHub."),(0,n.kt)("h2",{id:"content-moderation"},"Content Moderation"),(0,n.kt)("h3",{id:"compiled-code"},"Compiled Code"),(0,n.kt)("p",null,"You can disable execution of compiled bytecode by defining ",(0,n.kt)("inlineCode",{parentName:"p"},"PLUTO_DISABLE_COMPILED")," in ",(0,n.kt)("inlineCode",{parentName:"p"},"luaconf.h")," or your build config."),(0,n.kt)("h3",{id:"custom-module-filters"},"Custom Module Filters"),(0,n.kt)("p",null,"You may already have filters before passing scripts to run onto Pluto, but mechanisms such as ",(0,n.kt)("inlineCode",{parentName:"p"},"dofile")," and ",(0,n.kt)("inlineCode",{parentName:"p"},"require")," may be used to bypass them. To help you combat this, Pluto provides ",(0,n.kt)("inlineCode",{parentName:"p"},"PLUTO_LOADFILE_HOOK"),". For example, if you set it to ",(0,n.kt)("inlineCode",{parentName:"p"},"ContmodOnLoadfile")," in ",(0,n.kt)("inlineCode",{parentName:"p"},"luaconf.h")," or your build config, you only need to define that function somewhere in your code, like this:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"cpp"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"extern"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"C"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"bool"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"ContmodOnLoadfile"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"const"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"char"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"*"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," filename) {")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"return"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"!"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"isCodeProhibited"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"soup"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"::"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"string"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"::"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"fromFile"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(filename))"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},";")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}"))))),(0,n.kt)("p",null,"This requires you to use Pluto as a static library, as otherwise this linking relationship won't work."),(0,n.kt)("h3",{id:"prevent-loading-of-binary-modules"},"Prevent Loading of Binary Modules"),(0,n.kt)("p",null,"The ",(0,n.kt)("inlineCode",{parentName:"p"},"PLUTO_NO_BINARIES")," macro can be defined to totally eliminate ",(0,n.kt)("inlineCode",{parentName:"p"},"package.loadlib")," and any DLL/SO loading capability from the ",(0,n.kt)("inlineCode",{parentName:"p"},"require")," function. This is helpful because ",(0,n.kt)("inlineCode",{parentName:"p"},"package.loadlib")," can be used to bypass sandbox restrictions by manually loading symbols from a Lua/Pluto library, and the ",(0,n.kt)("inlineCode",{parentName:"p"},"require")," function can load any Lua/Pluto C Module which may or may not provide dangerous functions. This is generally vital for any sandbox. This mechanism cannot be bypassed, since it configures Pluto to compile without support for any of the aforementioned features."),(0,n.kt)("h2",{id:"execution-time-limit"},"Execution Time Limit"),(0,n.kt)("p",null,"To aid environments that have to be sandboxed, Pluto provides Execution Time Limit (ETL), which can be enabled by defining ",(0,n.kt)("inlineCode",{parentName:"p"},"PLUTO_ETL_ENABLE")," in ",(0,n.kt)("inlineCode",{parentName:"p"},"luaconf.h")," or your build config."),(0,n.kt)("p",null,"By default, ETL allows code to run for a total of 1 ms (1.000.000 nanos). This can be changed by overwriting ",(0,n.kt)("inlineCode",{parentName:"p"},"PLUTO_ETL_NANOS"),"."),(0,n.kt)("p",null,"Note that this is a hammer solution. If you only want to prevent stupid mistakes, Infinite Loop Prevention is a far better tool."),(0,n.kt)("h2",{id:"infinite-loop-prevention"},"Infinite Loop Prevention"),(0,n.kt)("p",null,"Pluto can detect infinite loops by preventing too many successive iterations. This was implemented because game threads usually force users to call some sort of ",(0,n.kt)("inlineCode",{parentName:"p"},"yield")," mechanism to return control to the game thread. In Pluto, you specify a hard bottleneck on iterations, then you specify a function pointer which should prevent ILP within the loop it's called in."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"This will produce an error due to ILP:"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"This will produce an error due to ILP:"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"while"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"This will not, with correct configuration:"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"This will not, with correct configuration:"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"while"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"yield"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,n.kt)("p",null,"If your scheduling system calls ",(0,n.kt)("inlineCode",{parentName:"p"},"coroutine.yield")," at least once per tick, configuring the ILP mechanism can be as simple as defining ",(0,n.kt)("inlineCode",{parentName:"p"},"PLUTO_ILP_ENABLE"),". In any case, Pluto's configuration file (luaconf.h) is worth a look at, especially to properly configure this feature."),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"This is a very simple mechanic. It has no performance overhead & it's lightweight. However, the compromise for this was coverage. This will reliably prevent most user error, however malicious users can find a way to block a thread still. For example, any forward jump will prevent the mechanism from breaking a loop. This can be exploited, so don't rely on this for security.")),(0,n.kt)("h2",{id:"vm-dumping"},"VM Dumping"),(0,n.kt)("p",null,"Pluto offers an optional, configurable feature to see every instruction that is executed in the Lua VM."),(0,n.kt)("h3",{id:"configuration"},"Configuration"),(0,n.kt)("p",null,"VM Dump can be enabled by defining ",(0,n.kt)("inlineCode",{parentName:"p"},"PLUTO_VMDUMP")," in ",(0,n.kt)("inlineCode",{parentName:"p"},"luaconf.h")," or your build config."),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"To reduce noise, you can modify ",(0,n.kt)("inlineCode",{parentName:"li"},"PLUTO_VMDUMP_COND")," to set a custom condition for when VM Dump is active. By default, the condition is ",(0,n.kt)("inlineCode",{parentName:"li"},"true"),"."),(0,n.kt)("li",{parentName:"ul"},"Although not a configuration specific to VM Dump, it should be noted that you can modify the output macros ",(0,n.kt)("inlineCode",{parentName:"li"},"lua_writestring")," and ",(0,n.kt)("inlineCode",{parentName:"li"},"lua_writeline"),".")),(0,n.kt)("h3",{id:"what-it-looks-like"},"What it looks like"),(0,n.kt)("p",null,"Given the following code:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"switch"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"case"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Got 1-5."'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"break")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"default"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Value is greater than 5."'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Break jumps here."))))),(0,n.kt)("p",null,"It will output:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"VARARGPREP 0 ; prepare for 0 varargs")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"LOADI 0 3 ; push 3")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"MOVE 1 0 ; move 3 into R(A)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"EQI 1 1 0 ; 3 == 1")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"EQI 1 2 1 ; 3 == 2")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"EQI 1 3 1 ; 3 == 3")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"GETTABUP 2 0 0 ; push T['print'] for function-0x247d2882520 (T=table-0x247d29ec9c8) ")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}},'LOADK 3 1 ; push "Got 1-5."')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," Got 1-5.")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"CALL 2 2 1 ; call cfunc (nresults=0 nparams=0) ")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"JMP 13 ; offset=13 newpc=0x247d29e90d8")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"RETURN 1 1 1 ; return 0 value(s)"))))),(0,n.kt)("p",null,"This is great at deciphering obfuscated code which may be causing problems for your environment."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/bd751cc9.7e88fe2c.js b/assets/js/bd751cc9.7e88fe2c.js new file mode 100644 index 00000000..0889f7da --- /dev/null +++ b/assets/js/bd751cc9.7e88fe2c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9101],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>k});var n=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var s=n.createContext({}),p=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(a),u=o,k=d["".concat(s,".").concat(u)]||d[u]||m[u]||i;return a?n.createElement(k,r(r({ref:t},c),{},{components:a})):n.createElement(k,r({ref:t},c))}));function k(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=a.length,r=new Array(i);r[0]=u;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:o,r[1]=l;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var n=a(7462),o=(a(7294),a(3905));const i={sidebar_position:11},r="For Integrators",l={unversionedId:"For Integrators",id:"For Integrators",title:"For Integrators",description:"The luaconf.h in Pluto provides various battle-tested mechanisms for locking down your Pluto environments. In this article, we've documented some of those. If you are an integrator who needs help configuring any of this, or who wants us to implement another mechanism, feel free to contact us on GitHub.",source:"@site/docs/For Integrators.md",sourceDirName:".",slug:"/For Integrators",permalink:"/docs/For Integrators",draft:!1,tags:[],version:"current",sidebarPosition:11,frontMatter:{sidebar_position:11},sidebar:"tutorialSidebar",previous:{title:"Compatibility",permalink:"/docs/Compatibility"},next:{title:"Changelog",permalink:"/docs/Changelog"}},s={},p=[{value:"Content Moderation",id:"content-moderation",level:2},{value:"Compiled Code",id:"compiled-code",level:3},{value:"Custom Module Filters",id:"custom-module-filters",level:3},{value:"Prevent Loading of Binary Modules",id:"prevent-loading-of-binary-modules",level:3},{value:"Execution Time Limit",id:"execution-time-limit",level:2},{value:"Infinite Loop Prevention",id:"infinite-loop-prevention",level:2},{value:"VM Dumping",id:"vm-dumping",level:2},{value:"Configuration",id:"configuration",level:3},{value:"What it looks like",id:"what-it-looks-like",level:3}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,o.kt)(d,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"for-integrators"},"For Integrators"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"luaconf.h")," in Pluto provides various battle-tested mechanisms for locking down your Pluto environments. In this article, we've documented some of those. If you are an integrator who needs help configuring any of this, or who wants us to implement another mechanism, feel free to contact us on GitHub."),(0,o.kt)("h2",{id:"content-moderation"},"Content Moderation"),(0,o.kt)("h3",{id:"compiled-code"},"Compiled Code"),(0,o.kt)("p",null,"You can disable execution of compiled bytecode by defining ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_DISABLE_COMPILED")," in ",(0,o.kt)("inlineCode",{parentName:"p"},"luaconf.h")," or your build config."),(0,o.kt)("h3",{id:"custom-module-filters"},"Custom Module Filters"),(0,o.kt)("p",null,"You may already have filters before passing scripts to run onto Pluto, but mechanisms such as ",(0,o.kt)("inlineCode",{parentName:"p"},"dofile")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"require")," may be used to bypass them. To help you combat this, Pluto provides ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_LOADFILE_HOOK"),". For example, if you set it to ",(0,o.kt)("inlineCode",{parentName:"p"},"ContmodOnLoadfile")," in ",(0,o.kt)("inlineCode",{parentName:"p"},"luaconf.h")," or your build config, you only need to define that function somewhere in your code, like this:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"cpp"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"extern"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"C"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"bool"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"ContmodOnLoadfile"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"const"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"char"),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"*"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," filename) {")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"return"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"!"),(0,o.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"isCodeProhibited"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"soup"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"::"),(0,o.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"string"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"::"),(0,o.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"fromFile"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(filename))"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},";")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}"))))),(0,o.kt)("p",null,"This requires you to use Pluto as a static library, as otherwise this linking relationship won't work."),(0,o.kt)("h3",{id:"prevent-loading-of-binary-modules"},"Prevent Loading of Binary Modules"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_NO_BINARIES")," macro can be defined to totally eliminate ",(0,o.kt)("inlineCode",{parentName:"p"},"package.loadlib")," and any DLL/SO loading capability from the ",(0,o.kt)("inlineCode",{parentName:"p"},"require")," function. This is helpful because ",(0,o.kt)("inlineCode",{parentName:"p"},"package.loadlib")," can be used to bypass sandbox restrictions by manually loading symbols from a Lua/Pluto library, and the ",(0,o.kt)("inlineCode",{parentName:"p"},"require")," function can load any Lua/Pluto C Module which may or may not provide dangerous functions. This is generally vital for any sandbox. This mechanism cannot be bypassed, since it configures Pluto to compile without support for any of the aforementioned features."),(0,o.kt)("h2",{id:"execution-time-limit"},"Execution Time Limit"),(0,o.kt)("p",null,"To aid environments that have to be sandboxed, Pluto provides Execution Time Limit (ETL), which can be enabled by defining ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_ETL_ENABLE")," in ",(0,o.kt)("inlineCode",{parentName:"p"},"luaconf.h")," or your build config."),(0,o.kt)("p",null,"By default, ETL allows code to run for a total of 1 ms (1.000.000 nanos). This can be changed by overwriting ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_ETL_NANOS"),"."),(0,o.kt)("p",null,"Note that this is a hammer solution. If you only want to prevent stupid mistakes, Infinite Loop Prevention is a far better tool."),(0,o.kt)("h2",{id:"infinite-loop-prevention"},"Infinite Loop Prevention"),(0,o.kt)("p",null,"Pluto can detect infinite loops by preventing too many successive iterations. This was implemented because game threads usually force users to call some sort of ",(0,o.kt)("inlineCode",{parentName:"p"},"yield")," mechanism to return control to the game thread. In Pluto, you specify a hard bottleneck on iterations, then you specify a function pointer which should prevent ILP within the loop it's called in."),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"This will produce an error due to ILP:"},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"This will produce an error due to ILP:"),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"while"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"This will not, with correct configuration:"},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"This will not, with correct configuration:"),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"while"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"yield"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,o.kt)("p",null,"If your scheduling system calls ",(0,o.kt)("inlineCode",{parentName:"p"},"coroutine.yield")," at least once per tick, configuring the ILP mechanism can be as simple as defining ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_ILP_ENABLE"),". In any case, Pluto's configuration file (luaconf.h) is worth a look at, especially to properly configure this feature."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"This is a very simple mechanic. It has no performance overhead & it's lightweight. However, the compromise for this was coverage. This will reliably prevent most user error, however malicious users can find a way to block a thread still. For example, any forward jump will prevent the mechanism from breaking a loop. This can be exploited, so don't rely on this for security.")),(0,o.kt)("h2",{id:"vm-dumping"},"VM Dumping"),(0,o.kt)("p",null,"Pluto offers an optional, configurable feature to see every instruction that is executed in the Lua VM."),(0,o.kt)("h3",{id:"configuration"},"Configuration"),(0,o.kt)("p",null,"VM Dump can be enabled by defining ",(0,o.kt)("inlineCode",{parentName:"p"},"PLUTO_VMDUMP")," in ",(0,o.kt)("inlineCode",{parentName:"p"},"luaconf.h")," or your build config."),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"To reduce noise, you can modify ",(0,o.kt)("inlineCode",{parentName:"li"},"PLUTO_VMDUMP_COND")," to set a custom condition for when VM Dump is active. By default, the condition is ",(0,o.kt)("inlineCode",{parentName:"li"},"true"),"."),(0,o.kt)("li",{parentName:"ul"},"Although not a configuration specific to VM Dump, it should be noted that you can modify the output macros ",(0,o.kt)("inlineCode",{parentName:"li"},"lua_writestring")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"lua_writeline"),".")),(0,o.kt)("h3",{id:"what-it-looks-like"},"What it looks like"),(0,o.kt)("p",null,"Given the following code:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"switch"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"case"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Got 1-5."'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"break")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"default"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Value is greater than 5."'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Break jumps here."))))),(0,o.kt)("p",null,"It will output:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"VARARGPREP 0 ; prepare for 0 varargs")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"LOADI 0 3 ; push 3")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"MOVE 1 0 ; move 3 into R(A)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"EQI 1 1 0 ; 3 == 1")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"EQI 1 2 1 ; 3 == 2")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"EQI 1 3 1 ; 3 == 3")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"GETTABUP 2 0 0 ; push T['print'] for function-0x247d2882520 (T=table-0x247d29ec9c8) ")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},'LOADK 3 1 ; push "Got 1-5."')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}}," Got 1-5.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"CALL 2 2 1 ; call cfunc (nresults=0 nparams=0) ")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"JMP 13 ; offset=13 newpc=0x247d29e90d8")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"undefined"}},"RETURN 1 1 1 ; return 0 value(s)"))))),(0,o.kt)("p",null,"This is great at deciphering obfuscated code which may be causing problems for your environment."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c459eb7d.9b6af93c.js b/assets/js/c459eb7d.9b6af93c.js new file mode 100644 index 00000000..adcb254b --- /dev/null +++ b/assets/js/c459eb7d.9b6af93c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[2427],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>k});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),p=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=p(a),u=n,k=d["".concat(s,".").concat(u)]||d[u]||m[u]||o;return a?r.createElement(k,l(l({ref:t},c),{},{components:a})):r.createElement(k,l({ref:t},c))}));function k(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=u;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[d]="string"==typeof e?e:n,l[1]=i;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:2},l=void 0,i={unversionedId:"New Features/Explicit Globals",id:"New Features/Explicit Globals",title:"Explicit Globals",description:"The optional global keyword can be used to explicitly declare global variables.",source:"@site/docs/New Features/Explicit Globals.md",sourceDirName:"New Features",slug:"/New Features/Explicit Globals",permalink:"/docs/New Features/Explicit Globals",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Enumerations",permalink:"/docs/New Features/Enumerations"},next:{title:"Export Modifier",permalink:"/docs/New Features/Export Modifier"}},s={},p=[{value:"Compiler Warnings",id:"compiler-warnings",level:2}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"The optional ",(0,n.kt)("inlineCode",{parentName:"p"},"global")," keyword can be used to explicitly declare global variables."),(0,n.kt)("p",null,"To enable it, simply do:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"pluto_use"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"global"))))),(0,n.kt)("p",null,"Then it can be used like this:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"global"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"))))),(0,n.kt)("p",null,"Being identical to the following code:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"))))),(0,n.kt)("h2",{id:"compiler-warnings"},"Compiler Warnings"),(0,n.kt)("p",null,"When the ",(0,n.kt)("inlineCode",{parentName:"p"},"global")," keyword is enabled, an 'implicit-global' warning is raised for any globals declared without it:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"pluto_use"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"global")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"a "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"))))),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"undefined"}},"file.pluto:3: warning: implicit global creation [implicit-global]")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"undefined"}}," 3 | a = 1")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"undefined"}}," | ^^^^^ here: prefix this with 'global' if creating a global was intended"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c459eb7d.ded956e6.js b/assets/js/c459eb7d.ded956e6.js deleted file mode 100644 index 3966d234..00000000 --- a/assets/js/c459eb7d.ded956e6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[2427],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>k});var r=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var c=r.createContext({}),s=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,o=e.mdxType,n=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=s(a),u=o,k=d["".concat(c,".").concat(u)]||d[u]||m[u]||n;return a?r.createElement(k,l(l({ref:t},p),{},{components:a})):r.createElement(k,l({ref:t},p))}));function k(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=a.length,l=new Array(n);l[0]=u;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:o,l[1]=i;for(var s=2;s{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>n,metadata:()=>i,toc:()=>s});var r=a(7462),o=(a(7294),a(3905));const n={sidebar_position:2},l=void 0,i={unversionedId:"New Features/Explicit Globals",id:"New Features/Explicit Globals",title:"Explicit Globals",description:"The optional global keyword can be used to explicitly declare global variables.",source:"@site/docs/New Features/Explicit Globals.md",sourceDirName:"New Features",slug:"/New Features/Explicit Globals",permalink:"/docs/New Features/Explicit Globals",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Enumerations",permalink:"/docs/New Features/Enumerations"},next:{title:"Export Modifier",permalink:"/docs/New Features/Export Modifier"}},c={},s=[{value:"Compiler Warnings",id:"compiler-warnings",level:2}],p={toc:s},d="wrapper";function m(e){let{components:t,...a}=e;return(0,o.kt)(d,(0,r.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The optional ",(0,o.kt)("inlineCode",{parentName:"p"},"global")," keyword can be used to explicitly declare global variables."),(0,o.kt)("p",null,"To enable it, simply do:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"pluto_use"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"global"))))),(0,o.kt)("p",null,"Then it can be used like this:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"global"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"))))),(0,o.kt)("p",null,"Being identical to the following code:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"a "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"))))),(0,o.kt)("h2",{id:"compiler-warnings"},"Compiler Warnings"),(0,o.kt)("p",null,"When the ",(0,o.kt)("inlineCode",{parentName:"p"},"global")," keyword is enabled, an 'implicit-global' warning is raised for any globals declared without it:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"pluto_use"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"global")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"a "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"))))),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"file.pluto:3: warning: implicit global creation [implicit-global]")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," 3 | a = 1")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," | ^^^^^ here: prefix this with 'global' if creating a global was intended"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c79b562e.a39a9e6f.js b/assets/js/c79b562e.a39a9e6f.js deleted file mode 100644 index 93abfe66..00000000 --- a/assets/js/c79b562e.a39a9e6f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[3616],{3905:(e,t,o)=>{o.d(t,{Zo:()=>c,kt:()=>k});var a=o(7294);function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function l(e){for(var t=1;t=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var i=a.createContext({}),p=function(e){var t=a.useContext(i),o=t;return e&&(o="function"==typeof e?e(t):l(l({},t),e)),o},c=function(e){var t=p(e.components);return a.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var o=e.components,n=e.mdxType,r=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(o),u=n,k=d["".concat(i,".").concat(u)]||d[u]||m[u]||r;return o?a.createElement(k,l(l({ref:t},c),{},{components:o})):a.createElement(k,l({ref:t},c))}));function k(e,t){var o=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=o.length,l=new Array(r);l[0]=u;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:n,l[1]=s;for(var p=2;p{o.r(t),o.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var a=o(7462),n=(o(7294),o(3905));const r={sidebar_position:3},l=void 0,s={unversionedId:"Runtime Environment/HTTP",id:"Runtime Environment/HTTP",title:"HTTP",description:"Must be included via require.",source:"@site/docs/Runtime Environment/HTTP.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/HTTP",permalink:"/docs/Runtime Environment/HTTP",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Exception",permalink:"/docs/Runtime Environment/Exception"},next:{title:"JSON",permalink:"/docs/Runtime Environment/JSON"}},i={},p=[{value:"http.request",id:"httprequest",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Options",id:"options",level:4},{value:"Returns",id:"returns",level:4},{value:"Multitasking",id:"multitasking",level:4},{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"http.hasconnection",id:"httphasconnection",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Multitasking",id:"multitasking-1",level:4},{value:"http.closeconnections",id:"httpcloseconnections",level:3},{value:"Multitasking",id:"multitasking-2",level:4}],c={toc:p},d="wrapper";function m(e){let{components:t,...o}=e;return(0,n.kt)(d,(0,a.Z)({},c,o,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Must be included via ",(0,n.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"httprequest"},(0,n.kt)("inlineCode",{parentName:"h3"},"http.request")),(0,n.kt)("p",null,"Performs an HTTP request."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},'The URL to send a request to as a string. This parameter is optional in the sense that the options table (parameter 2) can be parameter 1 instead, but must have the "url" option then.'),(0,n.kt)("li",{parentName:"ol"},"The table of options. This parameter is optional if a URL was given.")),(0,n.kt)("h4",{id:"options"},"Options"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"method:")," The HTTP request method to use. Defaults to GET."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"headers:")," A table of headers, e.g. ",(0,n.kt)("inlineCode",{parentName:"li"},'{ ["Content-Type"] = "application/json" }'),"."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"body:")," An optional request payload. If provided, the ",(0,n.kt)("inlineCode",{parentName:"li"},"Content-Length")," header is set appropriately, and the method is set to POST unless otherwise specified."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"prefer_ipv6:"),' (Does nothing in WASM builds of Pluto.) When establishing a new connection, we attempt to lookup and connect via IPv4, retrying with IPv6 if needed. If this is set to true, we instead start with IPv6. This may be useful for "LAN" services that identify the LAN via IPv6 instead of IPv4.'),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"dont_reuse:")," (Does nothing in WASM builds of Pluto.) Force the implementation not to reuse an existing socket, which may involve waiting. Instead a new connection is opened. This may be useful when many requests are headed to the same remote and you consider the time taken by a fresh handshake to be less than the time taken to wait to reuse."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"dont_make_reusable:")," (Does nothing in WASM builds of Pluto.) If a new connection to the remote was opened to carry out the request, close it again after the request. This is useful to avoid burdening the remote for one-off requests.")),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,"On success:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The response body as a string."),(0,n.kt)("li",{parentName:"ol"},"The status code as an integer."),(0,n.kt)("li",{parentName:"ol"},"A table of response headers. Empty in WASM builds of Pluto."),(0,n.kt)("li",{parentName:"ol"},"The status text as a string.")),(0,n.kt)("p",null,"On failure:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"Nil."),(0,n.kt)("li",{parentName:"ol"},"An approximate failure reason as an English string. Not available in WASM builds of Pluto.")),(0,n.kt)("h4",{id:"multitasking"},"Multitasking"),(0,n.kt)("p",null,"If called inside of a coroutine, this function yields. Otherwise, it blocks. In WASM builds of Pluto, it must be called inside of a coroutine that yields to the environment as otherwise the request cannot be dispatched."),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"The first request to a remote may take a while \u2014 especially with HTTPS \u2014 due to the TCP and TLS handshakes. We use keep-alive to keep the connection open, so subsequent requests to the same remote will be significantly faster.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," http "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:http"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," body"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," status_code"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," headers"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," status_text "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," http"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"request"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"https://httpbin.org/anything"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(status_code"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"status_text)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"os.platform"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"!="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"wasm"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(headers))")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(body)"))))),(0,n.kt)("h4",{id:"try-it-yourself"},(0,n.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20http%20%3D%20require%20%22pluto%3Ahttp%22%0D%0Alocal%20body%2C%20status_code%2C%20headers%2C%20status_text%20%3D%20http.request(%22https%3A%2F%2Fhttpbin.org%2Fanything%22)%0D%0Aprint(status_code..%22%20%22..status_text)%0D%0Aif%20os.platform%20!%3D%20%22wasm%22%20then%0D%0A%20%20%20%20print(dumpvar(headers))%0D%0Aend%0D%0Aprint(body)"},"Try It Yourself")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"httphasconnection"},(0,n.kt)("inlineCode",{parentName:"h3"},"http.hasconnection")),(0,n.kt)("p",null,"Queries if a keep-alive connection is available for a remote. This function is not available in WASM builds of Pluto."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"A partial URL identifying the remote. Partial because only the protocol, host, and port are used; additional components such as path are ignored.")),(0,n.kt)("h4",{id:"multitasking-1"},"Multitasking"),(0,n.kt)("p",null,"If called inside of a coroutine, this function may yield. Otherwise, it may block."),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { http"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," scheduler } "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"*"')),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," sched "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"scheduler"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"sched"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"addloop"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(http"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"hasconnection"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"https://httpbin.org"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"))")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"sched"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"add"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"((http"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"request"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"https://httpbin.org/anything"'),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")))")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"sched"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"run"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"httpcloseconnections"},(0,n.kt)("inlineCode",{parentName:"h3"},"http.closeconnections")),(0,n.kt)("p",null,"Closes all keep-alive connections like when closing the Lua state but in a non-blocking way. This function does nothing in WASM builds of Pluto."),(0,n.kt)("h4",{id:"multitasking-2"},"Multitasking"),(0,n.kt)("p",null,"This function must be called inside of a coroutine, as it will yield."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c79b562e.d096d5f8.js b/assets/js/c79b562e.d096d5f8.js new file mode 100644 index 00000000..288b2273 --- /dev/null +++ b/assets/js/c79b562e.d096d5f8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[3616],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>k});var n=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var i=n.createContext({}),p=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(a),u=o,k=d["".concat(i,".").concat(u)]||d[u]||m[u]||r;return a?n.createElement(k,l(l({ref:t},c),{},{components:a})):n.createElement(k,l({ref:t},c))}));function k(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,l=new Array(r);l[0]=u;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:o,l[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var n=a(7462),o=(a(7294),a(3905));const r={sidebar_position:3},l=void 0,s={unversionedId:"Runtime Environment/HTTP",id:"Runtime Environment/HTTP",title:"HTTP",description:"Must be included via require.",source:"@site/docs/Runtime Environment/HTTP.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/HTTP",permalink:"/docs/Runtime Environment/HTTP",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Exception",permalink:"/docs/Runtime Environment/Exception"},next:{title:"JSON",permalink:"/docs/Runtime Environment/JSON"}},i={},p=[{value:"http.request",id:"httprequest",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Options",id:"options",level:4},{value:"Returns",id:"returns",level:4},{value:"Multitasking",id:"multitasking",level:4},{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"http.hasconnection",id:"httphasconnection",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Multitasking",id:"multitasking-1",level:4},{value:"http.closeconnections",id:"httpcloseconnections",level:3},{value:"Multitasking",id:"multitasking-2",level:4}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,o.kt)(d,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Must be included via ",(0,o.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"httprequest"},(0,o.kt)("inlineCode",{parentName:"h3"},"http.request")),(0,o.kt)("p",null,"Performs an HTTP request."),(0,o.kt)("h4",{id:"parameters"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},'The URL to send a request to as a string. This parameter is optional in the sense that the options table (parameter 2) can be parameter 1 instead, but must have the "url" option then.'),(0,o.kt)("li",{parentName:"ol"},"The table of options. This parameter is optional if a URL was given.")),(0,o.kt)("h4",{id:"options"},"Options"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"method:")," The HTTP request method to use. Defaults to GET."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"headers:")," A table of headers, e.g. ",(0,o.kt)("inlineCode",{parentName:"li"},'{ ["Content-Type"] = "application/json" }'),"."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"body:")," An optional request payload. If provided, the ",(0,o.kt)("inlineCode",{parentName:"li"},"Content-Length")," header is set appropriately, and the method is set to POST unless otherwise specified."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"prefer_ipv6:"),' (Does nothing in WASM builds of Pluto.) When establishing a new connection, we attempt to lookup and connect via IPv4, retrying with IPv6 if needed. If this is set to true, we instead start with IPv6. This may be useful for "LAN" services that identify the LAN via IPv6 instead of IPv4.'),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"dont_reuse:")," (Does nothing in WASM builds of Pluto.) Force the implementation not to reuse an existing socket, which may involve waiting. Instead a new connection is opened. This may be useful when many requests are headed to the same remote and you consider the time taken by a fresh handshake to be less than the time taken to wait to reuse."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"dont_make_reusable:")," (Does nothing in WASM builds of Pluto.) If a new connection to the remote was opened to carry out the request, close it again after the request. This is useful to avoid burdening the remote for one-off requests.")),(0,o.kt)("h4",{id:"returns"},"Returns"),(0,o.kt)("p",null,"On success:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"The response body as a string."),(0,o.kt)("li",{parentName:"ol"},"The status code as an integer."),(0,o.kt)("li",{parentName:"ol"},"A table of response headers. Empty in WASM builds of Pluto."),(0,o.kt)("li",{parentName:"ol"},"The status text as a string.")),(0,o.kt)("p",null,"On failure:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Nil."),(0,o.kt)("li",{parentName:"ol"},"An approximate failure reason as an English string. Not available in WASM builds of Pluto.")),(0,o.kt)("h4",{id:"multitasking"},"Multitasking"),(0,o.kt)("p",null,"If called inside of a coroutine, this function yields. Otherwise, it blocks. In WASM builds of Pluto, it must be called inside of a coroutine that yields to the environment as otherwise the request cannot be dispatched."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"The first request to a remote may take a while \u2014 especially with HTTPS \u2014 due to the TCP and TLS handshakes. We use keep-alive to keep the connection open, so subsequent requests to the same remote will be significantly faster.")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," http "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:http"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," body"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," status_code"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," headers"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," status_text "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," http"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"request"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"https://httpbin.org/anything"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(status_code"),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"status_text)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"os.platform"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"!="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"wasm"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(headers))")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(body)"))))),(0,o.kt)("h4",{id:"try-it-yourself"},(0,o.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20http%20%3D%20require%20%22pluto%3Ahttp%22%0D%0Alocal%20body%2C%20status_code%2C%20headers%2C%20status_text%20%3D%20http.request(%22https%3A%2F%2Fhttpbin.org%2Fanything%22)%0D%0Aprint(status_code..%22%20%22..status_text)%0D%0Aif%20os.platform%20!%3D%20%22wasm%22%20then%0D%0A%20%20%20%20print(dumpvar(headers))%0D%0Aend%0D%0Aprint(body)"},"Try It Yourself")),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"httphasconnection"},(0,o.kt)("inlineCode",{parentName:"h3"},"http.hasconnection")),(0,o.kt)("p",null,"Queries if a keep-alive connection is available for a remote. This function is not available in WASM builds of Pluto."),(0,o.kt)("h4",{id:"parameters-1"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"A partial URL identifying the remote. Partial because only the protocol, host, and port are used; additional components such as path are ignored.")),(0,o.kt)("h4",{id:"multitasking-1"},"Multitasking"),(0,o.kt)("p",null,"If called inside of a coroutine, this function may yield. Otherwise, it may block."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { http"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," scheduler } "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"*"')),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," sched "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"scheduler"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"sched"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"addloop"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(http"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"hasconnection"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"https://httpbin.org"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"))")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"sched"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"add"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"((http"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"request"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"https://httpbin.org/anything"'),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")))")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"sched"),(0,o.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"run"),(0,o.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"httpcloseconnections"},(0,o.kt)("inlineCode",{parentName:"h3"},"http.closeconnections")),(0,o.kt)("p",null,"Closes all keep-alive connections like when closing the Lua state but in a non-blocking way. This function does nothing in WASM builds of Pluto."),(0,o.kt)("h4",{id:"multitasking-2"},"Multitasking"),(0,o.kt)("p",null,"This function must be called inside of a coroutine, as it will yield."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d037c94c.3d876123.js b/assets/js/d037c94c.3d876123.js new file mode 100644 index 00000000..59629cae --- /dev/null +++ b/assets/js/d037c94c.3d876123.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[3577],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>v});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),p=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(a),u=n,v=d["".concat(i,".").concat(u)]||d[u]||m[u]||o;return a?r.createElement(v,l(l({ref:t},c),{},{components:a})):r.createElement(v,l({ref:t},c))}));function v(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=u;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:n,l[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:3},l=void 0,s={unversionedId:"Runtime Environment/URL",id:"Runtime Environment/URL",title:"URL",description:"Must be included via require.",source:"@site/docs/Runtime Environment/URL.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/URL",permalink:"/docs/Runtime Environment/URL",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Socket",permalink:"/docs/Runtime Environment/Socket"},next:{title:"Vector3",permalink:"/docs/Runtime Environment/Vector3"}},i={},p=[{value:"url.encode",id:"urlencode",level:3},{value:"Parameters",id:"parameters",level:4},{value:"url.decode",id:"urldecode",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"url.parse",id:"urlparse",level:3},{value:"Parameters",id:"parameters-2",level:4}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Must be included via ",(0,n.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"urlencode"},(0,n.kt)("inlineCode",{parentName:"h3"},"url.encode")),(0,n.kt)("p",null,"Returns a URL-encoded string."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to be encoded.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," url "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:url"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"https://google.com/search?q="'),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"url"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Pluto, a superset of Lua"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"))")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e https://google.com/search?q=Pluto%2C%20a%20superset%20of%20Lua"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"urldecode"},(0,n.kt)("inlineCode",{parentName:"h3"},"url.decode")),(0,n.kt)("p",null,"Returns a plain string from URL-decoding the input string."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The string to be decoded.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," url "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:url"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(url"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Pluto%2C%20a%20superset%20of%20Lua"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "Pluto, a superset of Lua"'))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"urlparse"},(0,n.kt)("inlineCode",{parentName:"h3"},"url.parse")),(0,n.kt)("p",null,"Splits a URL into its constituent parts."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The URL to be dissected.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," url "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:url"')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(url"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"parse"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"http://username:password@hostname:9090/path?arg=value#anchor"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")))")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["scheme"] = string(4) "http",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["user"] = string(8) "username",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["pass"] = string(8) "password",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["host"] = string(8) "hostname",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["port"] = 9090,')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["path"] = string(5) "/path",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["query"] = string(9) "arg=value",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["fragment"] = string(6) "anchor",')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d037c94c.f573cc81.js b/assets/js/d037c94c.f573cc81.js deleted file mode 100644 index e8c5898d..00000000 --- a/assets/js/d037c94c.f573cc81.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[3577],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>v});var a=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=a.createContext({}),i=function(e){var t=a.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=i(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var r=e.components,o=e.mdxType,n=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=i(r),u=o,v=d["".concat(c,".").concat(u)]||d[u]||m[u]||n;return r?a.createElement(v,l(l({ref:t},p),{},{components:r})):a.createElement(v,l({ref:t},p))}));function v(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=r.length,l=new Array(n);l[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:o,l[1]=s;for(var i=2;i{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>i});var a=r(7462),o=(r(7294),r(3905));const n={sidebar_position:3},l=void 0,s={unversionedId:"Runtime Environment/URL",id:"Runtime Environment/URL",title:"URL",description:"Must be included via require.",source:"@site/docs/Runtime Environment/URL.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/URL",permalink:"/docs/Runtime Environment/URL",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Socket",permalink:"/docs/Runtime Environment/Socket"},next:{title:"Vector3",permalink:"/docs/Runtime Environment/Vector3"}},c={},i=[{value:"url.encode",id:"urlencode",level:3},{value:"Parameters",id:"parameters",level:4},{value:"url.decode",id:"urldecode",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"url.parse",id:"urlparse",level:3},{value:"Parameters",id:"parameters-2",level:4}],p={toc:i},d="wrapper";function m(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Must be included via ",(0,o.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"urlencode"},(0,o.kt)("inlineCode",{parentName:"h3"},"url.encode")),(0,o.kt)("p",null,"Returns a URL-encoded string."),(0,o.kt)("h4",{id:"parameters"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"The string to be encoded.")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," url "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:url"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"https://google.com/search?q="'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"url"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Pluto, a superset of Lua"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"))")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e https://google.com/search?q=Pluto%2C%20a%20superset%20of%20Lua"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"urldecode"},(0,o.kt)("inlineCode",{parentName:"h3"},"url.decode")),(0,o.kt)("p",null,"Returns a plain string from URL-decoding the input string."),(0,o.kt)("h4",{id:"parameters-1"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"The string to be decoded.")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," url "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:url"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(url"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Pluto%2C%20a%20superset%20of%20Lua"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "Pluto, a superset of Lua"'))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"urlparse"},(0,o.kt)("inlineCode",{parentName:"h3"},"url.parse")),(0,o.kt)("p",null,"Splits a URL into its constituent parts."),(0,o.kt)("h4",{id:"parameters-2"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"The URL to be dissected.")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," url "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:url"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(url"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"parse"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"http://username:password@hostname:9090/path?arg=value#anchor"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")))")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["scheme"] = string(4) "http",')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["user"] = string(8) "username",')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["pass"] = string(8) "password",')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["host"] = string(8) "hostname",')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["port"] = 9090,')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["path"] = string(5) "/path",')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["query"] = string(9) "arg=value",')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["fragment"] = string(6) "anchor",')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d08eaa4d.24b0fb51.js b/assets/js/d08eaa4d.24b0fb51.js deleted file mode 100644 index df477d97..00000000 --- a/assets/js/d08eaa4d.24b0fb51.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8281],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>v});var r=o(7294);function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function l(e){for(var t=1;t=0||(a[o]=e[o]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(a[o]=e[o])}return a}var c=r.createContext({}),i=function(e){var t=r.useContext(c),o=t;return e&&(o="function"==typeof e?e(t):l(l({},t),e)),o},p=function(e){var t=i(e.components);return r.createElement(c.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var o=e.components,a=e.mdxType,n=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),m=i(o),F=a,v=m["".concat(c,".").concat(F)]||m[F]||d[F]||n;return o?r.createElement(v,l(l({ref:t},p),{},{components:o})):r.createElement(v,l({ref:t},p))}));function v(e,t){var o=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var n=o.length,l=new Array(n);l[0]=F;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[m]="string"==typeof e?e:a,l[1]=s;for(var i=2;i{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>d,frontMatter:()=>n,metadata:()=>s,toc:()=>i});var r=o(7462),a=(o(7294),o(3905));const n={sidebar_position:2},l=void 0,s={unversionedId:"New Features/Named Arguments",id:"New Features/Named Arguments",title:"Named Arguments",description:"Instead of positional arguments, you can use the names of arguments you want to set:",source:"@site/docs/New Features/Named Arguments.md",sourceDirName:"New Features",slug:"/New Features/Named Arguments",permalink:"/docs/New Features/Named Arguments",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Lambda Expressions",permalink:"/docs/New Features/Lambda Expressions"},next:{title:"Nodiscard Functions",permalink:"/docs/New Features/Nodiscard Functions"}},c={},i=[{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Mixing arguments",id:"mixing-arguments",level:2},{value:"Try It Yourself",id:"try-it-yourself-1",level:4},{value:"Limitations",id:"limitations",level:2}],p={toc:i},m="wrapper";function d(e){let{components:t,...o}=e;return(0,a.kt)(m,(0,r.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Instead of positional arguments, you can use the names of arguments you want to set:"),(0,a.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"process_file"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"file"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"mode"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"r"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"version"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Processing '),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{file}"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," with mode '"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{mode}"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"' and version "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{version}"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"process_file"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(file "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello.txt"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," version "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- \"Processing hello.txt with mode 'r' and version 2\""))))),(0,a.kt)("h4",{id:"try-it-yourself"},(0,a.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20function%20process_file(file%2C%20mode%20%3D%20%22r%22%2C%20version%20%3D%201)%0D%0A%20%20%20%20print(%24%22Processing%20%7Bfile%7D%20with%20mode%20'%7Bmode%7D'%20and%20version%20%7Bversion%7D%22)%0D%0Aend%0D%0Aprocess_file(file%20%3D%20%22hello.txt%22%2C%20version%20%3D%202)"},"Try It Yourself")),(0,a.kt)("p",null,"Note that this example also makes use of ",(0,a.kt)("a",{parentName:"p",href:"/docs/New%20Features/Default%20Arguments"},"default arguments")," and ",(0,a.kt)("a",{parentName:"p",href:"/docs/New%20Features/String%20Interpolation"},"string interpolation"),"."),(0,a.kt)("h2",{id:"mixing-arguments"},"Mixing arguments"),(0,a.kt)("p",null,"You can use positional arguments for the first few arguments and then use named arguments for the latter ones, for example:"),(0,a.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"process_file"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"file"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"mode"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"r"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"version"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Processing '),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{file}"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," with mode '"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{mode}"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"' and version "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"{version}"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"process_file"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello.txt"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," version "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- \"Processing hello.txt with mode 'r' and version 2\""))))),(0,a.kt)("h4",{id:"try-it-yourself-1"},(0,a.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20function%20process_file(file%2C%20mode%20%3D%20%22r%22%2C%20version%20%3D%201)%0D%0A%20%20%20%20print(%24%22Processing%20%7Bfile%7D%20with%20mode%20'%7Bmode%7D'%20and%20version%20%7Bversion%7D%22)%0D%0Aend%0D%0Aprocess_file(%22hello.txt%22%2C%20version%20%3D%202)"},"Try It Yourself")),(0,a.kt)("h2",{id:"limitations"},"Limitations"),(0,a.kt)("p",null,"This feature is implemented entirely in the parser and therefore only works for local functions at the moment."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d08eaa4d.e3397e81.js b/assets/js/d08eaa4d.e3397e81.js new file mode 100644 index 00000000..a94fc907 --- /dev/null +++ b/assets/js/d08eaa4d.e3397e81.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[8281],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>v});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),p=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(i.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=p(a),F=n,v=m["".concat(i,".").concat(F)]||m[F]||d[F]||o;return a?r.createElement(v,s(s({ref:t},c),{},{components:a})):r.createElement(v,s({ref:t},c))}));function v(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,s=new Array(o);s[0]=F;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[m]="string"==typeof e?e:n,s[1]=l;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:2},s=void 0,l={unversionedId:"New Features/Named Arguments",id:"New Features/Named Arguments",title:"Named Arguments",description:"Instead of positional arguments, you can use the names of arguments you want to set:",source:"@site/docs/New Features/Named Arguments.md",sourceDirName:"New Features",slug:"/New Features/Named Arguments",permalink:"/docs/New Features/Named Arguments",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Lambda Expressions",permalink:"/docs/New Features/Lambda Expressions"},next:{title:"Nodiscard Functions",permalink:"/docs/New Features/Nodiscard Functions"}},i={},p=[{value:"Try It Yourself",id:"try-it-yourself",level:4},{value:"Mixing arguments",id:"mixing-arguments",level:2},{value:"Try It Yourself",id:"try-it-yourself-1",level:4},{value:"Limitations",id:"limitations",level:2}],c={toc:p},m="wrapper";function d(e){let{components:t,...a}=e;return(0,n.kt)(m,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Instead of positional arguments, you can use the names of arguments you want to set:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"process_file"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"file"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"mode"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"r"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"version"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Processing '),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{file}"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," with mode '"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{mode}"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"' and version "),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{version}"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"process_file"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(file "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," version "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- \"Processing hello.txt with mode 'r' and version 2\""))))),(0,n.kt)("h4",{id:"try-it-yourself"},(0,n.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20function%20process_file(file%2C%20mode%20%3D%20%22r%22%2C%20version%20%3D%201)%0D%0A%20%20%20%20print(%24%22Processing%20%7Bfile%7D%20with%20mode%20'%7Bmode%7D'%20and%20version%20%7Bversion%7D%22)%0D%0Aend%0D%0Aprocess_file(file%20%3D%20%22hello.txt%22%2C%20version%20%3D%202)"},"Try It Yourself")),(0,n.kt)("p",null,"Note that this example also makes use of ",(0,n.kt)("a",{parentName:"p",href:"/docs/New%20Features/Default%20Arguments"},"default arguments")," and ",(0,n.kt)("a",{parentName:"p",href:"/docs/New%20Features/String%20Interpolation"},"string interpolation"),"."),(0,n.kt)("h2",{id:"mixing-arguments"},"Mixing arguments"),(0,n.kt)("p",null,"You can use positional arguments for the first few arguments and then use named arguments for the latter ones, for example:"),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"process_file"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"file"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"mode"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"r"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"version"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Processing '),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{file}"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," with mode '"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{mode}"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"' and version "),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"{version}"),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"process_file"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello.txt"'),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," version "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- \"Processing hello.txt with mode 'r' and version 2\""))))),(0,n.kt)("h4",{id:"try-it-yourself-1"},(0,n.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20function%20process_file(file%2C%20mode%20%3D%20%22r%22%2C%20version%20%3D%201)%0D%0A%20%20%20%20print(%24%22Processing%20%7Bfile%7D%20with%20mode%20'%7Bmode%7D'%20and%20version%20%7Bversion%7D%22)%0D%0Aend%0D%0Aprocess_file(%22hello.txt%22%2C%20version%20%3D%202)"},"Try It Yourself")),(0,n.kt)("h2",{id:"limitations"},"Limitations"),(0,n.kt)("p",null,"This feature is implemented entirely in the parser and therefore only works for local functions at the moment."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d81fa0e5.6207b642.js b/assets/js/d81fa0e5.6207b642.js deleted file mode 100644 index 52ae158d..00000000 --- a/assets/js/d81fa0e5.6207b642.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5283],{3905:(e,a,o)=>{o.d(a,{Zo:()=>i,kt:()=>N});var t=o(7294);function l(e,a,o){return a in e?Object.defineProperty(e,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[a]=o,e}function r(e,a){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),o.push.apply(o,t)}return o}function n(e){for(var a=1;a=0||(l[o]=e[o]);return l}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(l[o]=e[o])}return l}var c=t.createContext({}),p=function(e){var a=t.useContext(c),o=a;return e&&(o="function"==typeof e?e(a):n(n({},a),e)),o},i=function(e){var a=p(e.components);return t.createElement(c.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},F=t.forwardRef((function(e,a){var o=e.components,l=e.mdxType,r=e.originalType,c=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),d=p(o),F=l,N=d["".concat(c,".").concat(F)]||d[F]||m[F]||r;return o?t.createElement(N,n(n({ref:a},i),{},{components:o})):t.createElement(N,n({ref:a},i))}));function N(e,a){var o=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var r=o.length,n=new Array(r);n[0]=F;var s={};for(var c in a)hasOwnProperty.call(a,c)&&(s[c]=a[c]);s.originalType=e,s[d]="string"==typeof e?e:l,n[1]=s;for(var p=2;p{o.r(a),o.d(a,{assets:()=>c,contentTitle:()=>n,default:()=>m,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var t=o(7462),l=(o(7294),o(3905));const r={sidebar_position:1},n=void 0,s={unversionedId:"Runtime Environment/Global & Base",id:"Runtime Environment/Global & Base",title:"Global & Base",description:"This page documents the changes & additions to Pluto's runtime environment, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/Global & Base.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Global & Base",permalink:"/docs/Runtime Environment/Global & Base",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Runtime Environment",permalink:"/docs/category/runtime-environment"},next:{title:"Coroutine",permalink:"/docs/Runtime Environment/Coroutine"}},c={},p=[{value:"_PVERSION",id:"_pversion",level:3},{value:"_PSOUP",id:"_psoup",level:3},{value:"os.platform",id:"osplatform",level:3},{value:"package.path",id:"packagepath",level:3},{value:"Default Metatables",id:"default-metatables",level:3},{value:"dumpvar",id:"dumpvar",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"exportvar",id:"exportvar",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"range",id:"range",level:3},{value:"compareversions",id:"compareversions",level:3},{value:"wcall",id:"wcall",level:3}],i={toc:p},d="wrapper";function m(e){let{components:a,...o}=e;return(0,l.kt)(d,(0,t.Z)({},i,o,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"This page documents the changes & additions to Pluto's runtime environment, which is built on top of Lua 5.4's."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"_pversion"},(0,l.kt)("inlineCode",{parentName:"h3"},"_PVERSION")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"_PVERSION")," is the global to check your current version of Pluto."),(0,l.kt)("h3",{id:"_psoup"},(0,l.kt)("inlineCode",{parentName:"h3"},"_PSOUP")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"_PSOUP")," is a global boolean you can access to check linkage with Soup. Always true as of 0.8.0."),(0,l.kt)("h3",{id:"osplatform"},(0,l.kt)("inlineCode",{parentName:"h3"},"os.platform")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"os.platform"),' is a global string containing the host platform. Can be "windows", "wasm", "linux", "macos", "android", or "unknown".'),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"_PVERSION"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Plain Lua detected ("'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"_VERSION"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'")"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"else")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"write"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Pluto detected ("'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"_PVERSION"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"), based on "'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"_VERSION"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"os.platform"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"write"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'", running on "'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"os.platform"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"io"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"write"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"packagepath"},(0,l.kt)("inlineCode",{parentName:"h3"},"package.path")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"package.path")," is modified to also search for ",(0,l.kt)("inlineCode",{parentName:"p"},".pluto")," files."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"default-metatables"},"Default Metatables"),(0,l.kt)("p",null,"Tables and coroutines/threads have metatables by default, akin to how each string has a metatable by default."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," c "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"coroutine"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"create"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Can do this:")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"contains"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"concat"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"c"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"resume"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- As opposed to this:")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"contains"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"concat"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"coroutine"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"resume"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(c)"))))),(0,l.kt)("p",null,"This behavior is implemented by setting the ",(0,l.kt)("inlineCode",{parentName:"p"},"__index")," metamethod to the respective library (",(0,l.kt)("inlineCode",{parentName:"p"},"_G.table")," or ",(0,l.kt)("inlineCode",{parentName:"p"},"_G.coroutine"),"). If you override the metatable, you may want to replicate that."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"dumpvar"},(0,l.kt)("inlineCode",{parentName:"h3"},"dumpvar")),(0,l.kt)("p",null,"A debug function designed to dump values into human-readable formats."),(0,l.kt)("h4",{id:"parameters"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The value to dump.")),(0,l.kt)("h4",{id:"returns"},"Returns"),(0,l.kt)("p",null,"A string representation of the value."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1234"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"goodbye"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"_G"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"name"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"lastname"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Doe"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"details"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"No details available."')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t))"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"{")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["lastname"] = string(3) "Doe",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["name"] = string(4) "John",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["goodbye"] = {')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["unpack"] = function: 00007FF7738B3C20,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["insert"] = function: 00007FF7738B30D0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["freeze"] = function: 00007FF7738B43F0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["foreach"] = function: 00007FF7738B3220,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["filter"] = function: 00007FF7738B4700,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["isfrozen"] = function: 00007FF7738B44B0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["getn"] = function: 00007FF7738B43B0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["pack"] = function: 00007FF7738B3B10,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["contains"] = function: 00007FF7738B4540,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["move"] = function: 00007FF7738B34D0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["concat"] = function: 00007FF7738B37F0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["sort"] = function: 00007FF7738B42B0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["remove"] = function: 00007FF7738B33C0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["map"] = function: 00007FF7738B49A0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," },")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["hello"] = 1234,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["details"] = {')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' [1] = string(21) "No details available.",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," },")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"}"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"exportvar"},(0,l.kt)("inlineCode",{parentName:"h3"},"exportvar")),(0,l.kt)("p",null,"Similar to dumpvar, but returns valid Lua/Pluto code. May error if the value can not be represented accordingly."),(0,l.kt)("h4",{id:"parameters-1"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The value to dump.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Slightly altered data from last example as C functions can not be exported.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1234"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"name"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"lastname"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Doe"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"details"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"No details available."')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"exportvar"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t))"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"{")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["hello"] = 1234,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["name"] = "John",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["details"] = {')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' [1] = "No details available.",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}}," },")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},' ["lastname"] = "Doe",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"}"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"range"},(0,l.kt)("inlineCode",{parentName:"h3"},"range")),(0,l.kt)("p",null,"Returns a table of numbers in the given range."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"range"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"10"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"unpack"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 1 2 3 4 5 6 7 8 9 10")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"range"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"8"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"unpack"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 4 5 6 7 8"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"compareversions"},(0,l.kt)("inlineCode",{parentName:"h3"},"compareversions")),(0,l.kt)("p",null,"Performs a three-way comparison on 2 version numbers, similar to the ",(0,l.kt)("a",{parentName:"p",href:"../New%20Operators#spaceship-operator"},"Spaceship Operator"),"."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"compareversions"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"1.0.0"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"0.9.0"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},">="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"compareversions"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"1.0.0"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"1.0.0-dev"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},">="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,l.kt)("p",null,"Note that pre-release versions (e.g. with ",(0,l.kt)("inlineCode",{parentName:"p"},"-dev")," suffix) are considered to be ",(0,l.kt)("em",{parentName:"p"},"less than")," their final counterparts."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"wcall"},(0,l.kt)("inlineCode",{parentName:"h3"},"wcall")),(0,l.kt)("p",null,"Calls the given function and returns a string of warnings raised by it."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," w "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"wcall"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(|| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"warn"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Bad!"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(w "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"~="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'""'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"?"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," (w"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"strip"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"No warnings"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- Output: "Bad!"'))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d81fa0e5.9cff45c9.js b/assets/js/d81fa0e5.9cff45c9.js new file mode 100644 index 00000000..56e14068 --- /dev/null +++ b/assets/js/d81fa0e5.9cff45c9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5283],{3905:(e,a,t)=>{t.d(a,{Zo:()=>d,kt:()=>N});var n=t(7294);function l(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function o(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function r(e){for(var a=1;a=0||(l[t]=e[t]);return l}(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}var p=n.createContext({}),i=function(e){var a=n.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):r(r({},a),e)),t},d=function(e){var a=i(e.components);return n.createElement(p.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},F=n.forwardRef((function(e,a){var t=e.components,l=e.mdxType,o=e.originalType,p=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),c=i(t),F=l,N=c["".concat(p,".").concat(F)]||c[F]||m[F]||o;return t?n.createElement(N,r(r({ref:a},d),{},{components:t})):n.createElement(N,r({ref:a},d))}));function N(e,a){var t=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var o=t.length,r=new Array(o);r[0]=F;var s={};for(var p in a)hasOwnProperty.call(a,p)&&(s[p]=a[p]);s.originalType=e,s[c]="string"==typeof e?e:l,r[1]=s;for(var i=2;i{t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>r,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>i});var n=t(7462),l=(t(7294),t(3905));const o={sidebar_position:1},r=void 0,s={unversionedId:"Runtime Environment/Global & Base",id:"Runtime Environment/Global & Base",title:"Global & Base",description:"This page documents the changes & additions to Pluto's runtime environment, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/Global & Base.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Global & Base",permalink:"/docs/Runtime Environment/Global & Base",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Runtime Environment",permalink:"/docs/category/runtime-environment"},next:{title:"Coroutine",permalink:"/docs/Runtime Environment/Coroutine"}},p={},i=[{value:"_PVERSION",id:"_pversion",level:3},{value:"_PSOUP",id:"_psoup",level:3},{value:"os.platform",id:"osplatform",level:3},{value:"package.path",id:"packagepath",level:3},{value:"Default Metatables",id:"default-metatables",level:3},{value:"dumpvar",id:"dumpvar",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"exportvar",id:"exportvar",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"range",id:"range",level:3},{value:"compareversions",id:"compareversions",level:3},{value:"wcall",id:"wcall",level:3}],d={toc:i},c="wrapper";function m(e){let{components:a,...t}=e;return(0,l.kt)(c,(0,n.Z)({},d,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"This page documents the changes & additions to Pluto's runtime environment, which is built on top of Lua 5.4's."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"_pversion"},(0,l.kt)("inlineCode",{parentName:"h3"},"_PVERSION")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"_PVERSION")," is the global to check your current version of Pluto."),(0,l.kt)("h3",{id:"_psoup"},(0,l.kt)("inlineCode",{parentName:"h3"},"_PSOUP")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"_PSOUP")," is a global boolean you can access to check linkage with Soup. Always true as of 0.8.0."),(0,l.kt)("h3",{id:"osplatform"},(0,l.kt)("inlineCode",{parentName:"h3"},"os.platform")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"os.platform"),' is a global string containing the host platform. Can be "windows", "wasm", "linux", "macos", "android", or "unknown".'),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"_PVERSION"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Plain Lua detected ("'),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"_VERSION"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'")"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"else")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"write"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Pluto detected ("'),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"_PVERSION"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"), based on "'),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"_VERSION"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"os.platform"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"write"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'", running on "'),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"os.platform"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"io"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"write"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"packagepath"},(0,l.kt)("inlineCode",{parentName:"h3"},"package.path")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"package.path")," is modified to also search for ",(0,l.kt)("inlineCode",{parentName:"p"},".pluto")," files."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"default-metatables"},"Default Metatables"),(0,l.kt)("p",null,"Tables and coroutines/threads have metatables by default, akin to how each string has a metatable by default."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {}")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," c "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"coroutine"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"create"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|| "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Can do this:")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"t"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"contains"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"t"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"concat"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"c"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"resume"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- As opposed to this:")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"contains"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"concat"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"coroutine"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"resume"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(c)"))))),(0,l.kt)("p",null,"This behavior is implemented by setting the ",(0,l.kt)("inlineCode",{parentName:"p"},"__index")," metamethod to the respective library (",(0,l.kt)("inlineCode",{parentName:"p"},"_G.table")," or ",(0,l.kt)("inlineCode",{parentName:"p"},"_G.coroutine"),"). If you override the metatable, you may want to replicate that."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"dumpvar"},(0,l.kt)("inlineCode",{parentName:"h3"},"dumpvar")),(0,l.kt)("p",null,"A debug function designed to dump values into human-readable formats."),(0,l.kt)("h4",{id:"parameters"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The value to dump.")),(0,l.kt)("h4",{id:"returns"},"Returns"),(0,l.kt)("p",null,"A string representation of the value."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1234"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"goodbye"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"_G"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"table"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"name"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"lastname"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Doe"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"details"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"No details available."')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t))"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},"{")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["lastname"] = string(3) "Doe",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["name"] = string(4) "John",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["goodbye"] = {')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["unpack"] = function: 00007FF7738B3C20,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["insert"] = function: 00007FF7738B30D0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["freeze"] = function: 00007FF7738B43F0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["foreach"] = function: 00007FF7738B3220,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["filter"] = function: 00007FF7738B4700,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["isfrozen"] = function: 00007FF7738B44B0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["getn"] = function: 00007FF7738B43B0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["pack"] = function: 00007FF7738B3B10,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["contains"] = function: 00007FF7738B4540,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["move"] = function: 00007FF7738B34D0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["concat"] = function: 00007FF7738B37F0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["sort"] = function: 00007FF7738B42B0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["remove"] = function: 00007FF7738B33C0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["map"] = function: 00007FF7738B49A0,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}}," },")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["hello"] = 1234,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["details"] = {')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' [1] = string(21) "No details available.",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}}," },")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},"}"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"exportvar"},(0,l.kt)("inlineCode",{parentName:"h3"},"exportvar")),(0,l.kt)("p",null,"Similar to dumpvar, but returns valid Lua/Pluto code. May error if the value can not be represented accordingly."),(0,l.kt)("h4",{id:"parameters-1"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The value to dump.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Slightly altered data from last example as C functions can not be exported.")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1234"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"name"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"John"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"lastname"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Doe"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"details"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"No details available."')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}")),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"exportvar"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t))"))))),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},"{")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["hello"] = 1234,')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["name"] = "John",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["details"] = {')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' [1] = "No details available.",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}}," },")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},' ["lastname"] = "Doe",')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"undefined"}},"}"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"range"},(0,l.kt)("inlineCode",{parentName:"h3"},"range")),(0,l.kt)("p",null,"Returns a table of numbers in the given range."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"range"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"10"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"unpack"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 1 2 3 4 5 6 7 8 9 10")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"range"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"4"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"8"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"unpack"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 4 5 6 7 8"))))),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"compareversions"},(0,l.kt)("inlineCode",{parentName:"h3"},"compareversions")),(0,l.kt)("p",null,"Performs a three-way comparison on 2 version numbers, similar to the ",(0,l.kt)("a",{parentName:"p",href:"../New%20Operators#spaceship-operator"},"Spaceship Operator"),"."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"compareversions"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"1.0.0"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"0.9.0"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},">="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"compareversions"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"1.0.0"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"1.0.0-dev"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},">="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,l.kt)("p",null,"Note that pre-release versions (e.g. with ",(0,l.kt)("inlineCode",{parentName:"p"},"-dev")," suffix) are considered to be ",(0,l.kt)("em",{parentName:"p"},"less than")," their final counterparts."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"wcall"},(0,l.kt)("inlineCode",{parentName:"h3"},"wcall")),(0,l.kt)("p",null,"Calls the given function and returns a string of warnings raised by it."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," w "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"wcall"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(|| "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"warn"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Bad!"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"))")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(w "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"~="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'""'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"?"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," (w"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"strip"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"No warnings"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- Output: "Bad!"'))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/dd7a9681.4851897c.js b/assets/js/dd7a9681.4851897c.js deleted file mode 100644 index d4dd2b38..00000000 --- a/assets/js/dd7a9681.4851897c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[1155],{3905:(e,a,t)=>{t.d(a,{Zo:()=>p,kt:()=>k});var o=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);a&&(o=o.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,o)}return t}function n(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=o.createContext({}),i=function(e){var a=o.useContext(s),t=a;return e&&(t="function"==typeof e?e(a):n(n({},a),e)),t},p=function(e){var a=i(e.components);return o.createElement(s.Provider,{value:a},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var a=e.children;return o.createElement(o.Fragment,{},a)}},N=o.forwardRef((function(e,a){var t=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),m=i(t),N=r,k=m["".concat(s,".").concat(N)]||m[N]||d[N]||l;return t?o.createElement(k,n(n({ref:a},p),{},{components:t})):o.createElement(k,n({ref:a},p))}));function k(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var l=t.length,n=new Array(l);n[0]=N;var c={};for(var s in a)hasOwnProperty.call(a,s)&&(c[s]=a[s]);c.originalType=e,c[m]="string"==typeof e?e:r,n[1]=c;for(var i=2;i{t.r(a),t.d(a,{assets:()=>s,contentTitle:()=>n,default:()=>d,frontMatter:()=>l,metadata:()=>c,toc:()=>i});var o=t(7462),r=(t(7294),t(3905));const l={sidebar_position:3},n=void 0,c={unversionedId:"Runtime Environment/XML",id:"Runtime Environment/XML",title:"XML",description:"Must be included via require.",source:"@site/docs/Runtime Environment/XML.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/XML",permalink:"/docs/Runtime Environment/XML",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Vector3",permalink:"/docs/Runtime Environment/Vector3"},next:{title:"Optimizations",permalink:"/docs/category/optimizations"}},s={},i=[{value:"xml.encode",id:"xmlencode",level:3},{value:"Parameters",id:"parameters",level:4},{value:"xml.decode",id:"xmldecode",level:3},{value:"Parameters",id:"parameters-1",level:4}],p={toc:i},m="wrapper";function d(e){let{components:a,...t}=e;return(0,r.kt)(m,(0,o.Z)({},p,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Must be included via ",(0,r.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"xmlencode"},(0,r.kt)("inlineCode",{parentName:"h3"},"xml.encode")),(0,r.kt)("p",null,"Returns a string of XML."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A table or string to encode as XML."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"pretty")," \u2014 Whether to return a human-readable string of XML. Defaults to ",(0,r.kt)("inlineCode",{parentName:"li"},"false"),".")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," xml "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:xml"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(xml"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"({")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," tag "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"root"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," children "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," tag "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"entry"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," attributes "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," ["),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"type"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"] "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"primary"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," children "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Text node"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," tag "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"entry"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"}"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Text node")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e "))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"xmldecode"},(0,r.kt)("inlineCode",{parentName:"h3"},"xml.decode")),(0,r.kt)("p",null,"Returns a table representing the XML data."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The XML data to decode."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"parser"),' \u2014 Which parser to use against the data. Can be "html", "xml" (default), or "lax" (XML but accepts attributes without ',(0,r.kt)("inlineCode",{parentName:"li"},"="),").")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," xml "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:xml"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," root "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," xml"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},' ')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," primary")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"]]"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(root))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["tag"] = string(7) "entries",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e [1] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["tag"] = string(5) "entry",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["attributes"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["type"] = string(7) "primary",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e [1] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["tag"] = string(4) "name",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e [1] = string(7) "primary",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }"))))),(0,r.kt)("p",null,"For ease of use, the returned tables have an ",(0,r.kt)("inlineCode",{parentName:"p"},"__index")," metamethod:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- root is , so its first child is .")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- we make use of the metamethod to get to :")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(root"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"children["),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"]"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"name))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["tag"] = string(4) "name",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e [1] = string(7) "primary",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }"))))),(0,r.kt)("p",null,'If there is no single root element, a "body" element is implied as the root:'),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," xml "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:xml"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(xml"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"]]"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")))")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["tag"] = string(4) "body",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e [1] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["tag"] = string(5) "entry",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e [2] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e ["tag"] = string(5) "entry",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e }"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/dd7a9681.d229647d.js b/assets/js/dd7a9681.d229647d.js new file mode 100644 index 00000000..fb0ab556 --- /dev/null +++ b/assets/js/dd7a9681.d229647d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[1155],{3905:(e,a,t)=>{t.d(a,{Zo:()=>m,kt:()=>k});var n=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i=n.createContext({}),p=function(e){var a=n.useContext(i),t=a;return e&&(t="function"==typeof e?e(a):o(o({},a),e)),t},m=function(e){var a=p(e.components);return n.createElement(i.Provider,{value:a},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},N=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,l=e.originalType,i=e.parentName,m=s(e,["components","mdxType","originalType","parentName"]),c=p(t),N=r,k=c["".concat(i,".").concat(N)]||c[N]||d[N]||l;return t?n.createElement(k,o(o({ref:a},m),{},{components:t})):n.createElement(k,o({ref:a},m))}));function k(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var l=t.length,o=new Array(l);o[0]=N;var s={};for(var i in a)hasOwnProperty.call(a,i)&&(s[i]=a[i]);s.originalType=e,s[c]="string"==typeof e?e:r,o[1]=s;for(var p=2;p{t.r(a),t.d(a,{assets:()=>i,contentTitle:()=>o,default:()=>d,frontMatter:()=>l,metadata:()=>s,toc:()=>p});var n=t(7462),r=(t(7294),t(3905));const l={sidebar_position:3},o=void 0,s={unversionedId:"Runtime Environment/XML",id:"Runtime Environment/XML",title:"XML",description:"Must be included via require.",source:"@site/docs/Runtime Environment/XML.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/XML",permalink:"/docs/Runtime Environment/XML",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Vector3",permalink:"/docs/Runtime Environment/Vector3"},next:{title:"Optimizations",permalink:"/docs/category/optimizations"}},i={},p=[{value:"xml.encode",id:"xmlencode",level:3},{value:"Parameters",id:"parameters",level:4},{value:"xml.decode",id:"xmldecode",level:3},{value:"Parameters",id:"parameters-1",level:4}],m={toc:p},c="wrapper";function d(e){let{components:a,...t}=e;return(0,r.kt)(c,(0,n.Z)({},m,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Must be included via ",(0,r.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"xmlencode"},(0,r.kt)("inlineCode",{parentName:"h3"},"xml.encode")),(0,r.kt)("p",null,"Returns a string of XML."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A table or string to encode as XML."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"pretty")," \u2014 Whether to return a human-readable string of XML. Defaults to ",(0,r.kt)("inlineCode",{parentName:"li"},"false"),".")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," xml "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:xml"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(xml"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"({")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," tag "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"root"'),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," children "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," tag "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"entry"'),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," attributes "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," ["),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"type"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"] "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"primary"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," children "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Text node"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," tag "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"entry"')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"}"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Text node")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e "))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"xmldecode"},(0,r.kt)("inlineCode",{parentName:"h3"},"xml.decode")),(0,r.kt)("p",null,"Returns a table representing the XML data."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"data")," \u2014 The XML data to decode."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"parser"),' \u2014 Which parser to use against the data. Can be "html", "xml" (default), or "lax" (XML but accepts attributes without ',(0,r.kt)("inlineCode",{parentName:"li"},"="),").")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," xml "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:xml"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," root "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," xml"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},' ')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," primary")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"]]"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(root))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["tag"] = string(7) "entries",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e [1] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["tag"] = string(5) "entry",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["attributes"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["type"] = string(7) "primary",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e [1] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["tag"] = string(4) "name",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e [1] = string(7) "primary",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }"))))),(0,r.kt)("p",null,"For ease of use, the returned tables have an ",(0,r.kt)("inlineCode",{parentName:"p"},"__index")," metamethod:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- root is , so its first child is .")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- we make use of the metamethod to get to :")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(root"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"children["),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"]"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"name))")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["tag"] = string(4) "name",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e [1] = string(7) "primary",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }"))))),(0,r.kt)("p",null,'If there is no single root element, a "body" element is implied as the root:'),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," xml "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:xml"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"dumpvar"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(xml"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"[[")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}}," ")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"]]"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")))")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["tag"] = string(4) "body",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["children"] = {')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e [1] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["tag"] = string(5) "entry",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e [2] = {")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e ["tag"] = string(5) "entry",')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e },")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e }"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ddde9844.62a350d6.js b/assets/js/ddde9844.62a350d6.js deleted file mode 100644 index f8072b28..00000000 --- a/assets/js/ddde9844.62a350d6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6282],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>v});var r=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var i=r.createContext({}),c=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=c(e.components);return r.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var a=e.components,o=e.mdxType,n=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(a),k=o,v=d["".concat(i,".").concat(k)]||d[k]||m[k]||n;return a?r.createElement(v,l(l({ref:t},p),{},{components:a})):r.createElement(v,l({ref:t},p))}));function v(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=a.length,l=new Array(n);l[0]=k;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:o,l[1]=s;for(var c=2;c{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>c});var r=a(7462),o=(a(7294),a(3905));const n={sidebar_position:3},l=void 0,s={unversionedId:"Runtime Environment/Base64",id:"Runtime Environment/Base64",title:"Base64",description:"Must be included via require.",source:"@site/docs/Runtime Environment/Base64.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Base64",permalink:"/docs/Runtime Environment/Base64",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Base32",permalink:"/docs/Runtime Environment/Base32"},next:{title:"Bigint",permalink:"/docs/Runtime Environment/Bigint"}},i={},c=[{value:"base64.encode",id:"base64encode",level:3},{value:"Parameters",id:"parameters",level:4},{value:"base64.decode",id:"base64decode",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"base64.urlencode",id:"base64urlencode",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"base64.urldecode",id:"base64urldecode",level:3},{value:"Parameters",id:"parameters-3",level:4}],p={toc:c},d="wrapper";function m(e){let{components:t,...a}=e;return(0,o.kt)(d,(0,r.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Must be included via ",(0,o.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"base64encode"},(0,o.kt)("inlineCode",{parentName:"h3"},"base64.encode")),(0,o.kt)("p",null,"Returns a base64-encoded string."),(0,o.kt)("h4",{id:"parameters"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A string of data to encode."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"pad")," \u2014 Whether or not to apply padding. Defaults to ",(0,o.kt)("inlineCode",{parentName:"li"},"true"),".")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," base64 "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"base64"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(base64"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"encode"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, World!"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e SGVsbG8sIFdvcmxkIQ=="))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"base64decode"},(0,o.kt)("inlineCode",{parentName:"h3"},"base64.decode")),(0,o.kt)("p",null,"Returns a decoded base64 string."),(0,o.kt)("h4",{id:"parameters-1"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A string of base64 data.")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," base64 "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"base64"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(base64"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"decode"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"SGVsbG8sIFdvcmxkIQ=="'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello, world!"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"base64urlencode"},(0,o.kt)("inlineCode",{parentName:"h3"},"base64.urlencode")),(0,o.kt)("p",null,"Returns a base64url-encoded string. This variant is sometimes refered to as filename safe base64."),(0,o.kt)("h4",{id:"parameters-2"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A string of data to encode."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"pad")," \u2014 Whether or not to apply padding. Defaults to ",(0,o.kt)("inlineCode",{parentName:"li"},"false"),".")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," base64 "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"base64"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(base64"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"urlencode"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, World!"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e SGVsbG8sIFdvcmxkIQ"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"base64urldecode"},(0,o.kt)("inlineCode",{parentName:"h3"},"base64.urldecode")),(0,o.kt)("p",null,"Similar to ",(0,o.kt)("inlineCode",{parentName:"p"},"base64.decode")," except for base64url."),(0,o.kt)("h4",{id:"parameters-3"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A string of base64 data.")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," base64 "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"base64"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(base64"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"urldecode"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"SGVsbG8sIFdvcmxkIQ"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello, world!"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ddde9844.96c49a2b.js b/assets/js/ddde9844.96c49a2b.js new file mode 100644 index 00000000..c24bdf04 --- /dev/null +++ b/assets/js/ddde9844.96c49a2b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6282],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>v});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),p=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=p(e.components);return r.createElement(i.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),c=p(a),k=n,v=c["".concat(i,".").concat(k)]||c[k]||m[k]||o;return a?r.createElement(v,l(l({ref:t},d),{},{components:a})):r.createElement(v,l({ref:t},d))}));function v(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=k;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[c]="string"==typeof e?e:n,l[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:3},l=void 0,s={unversionedId:"Runtime Environment/Base64",id:"Runtime Environment/Base64",title:"Base64",description:"Must be included via require.",source:"@site/docs/Runtime Environment/Base64.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Base64",permalink:"/docs/Runtime Environment/Base64",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Base32",permalink:"/docs/Runtime Environment/Base32"},next:{title:"Bigint",permalink:"/docs/Runtime Environment/Bigint"}},i={},p=[{value:"base64.encode",id:"base64encode",level:3},{value:"Parameters",id:"parameters",level:4},{value:"base64.decode",id:"base64decode",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"base64.urlencode",id:"base64urlencode",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"base64.urldecode",id:"base64urldecode",level:3},{value:"Parameters",id:"parameters-3",level:4}],d={toc:p},c="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(c,(0,r.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Must be included via ",(0,n.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"base64encode"},(0,n.kt)("inlineCode",{parentName:"h3"},"base64.encode")),(0,n.kt)("p",null,"Returns a base64-encoded string."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A string of data to encode."),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"pad")," \u2014 Whether or not to apply padding. Defaults to ",(0,n.kt)("inlineCode",{parentName:"li"},"true"),".")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," base64 "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"base64"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(base64"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"encode"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, World!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e SGVsbG8sIFdvcmxkIQ=="))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"base64decode"},(0,n.kt)("inlineCode",{parentName:"h3"},"base64.decode")),(0,n.kt)("p",null,"Returns a decoded base64 string."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A string of base64 data.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," base64 "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"base64"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(base64"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"decode"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"SGVsbG8sIFdvcmxkIQ=="'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello, world!"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"base64urlencode"},(0,n.kt)("inlineCode",{parentName:"h3"},"base64.urlencode")),(0,n.kt)("p",null,"Returns a base64url-encoded string. This variant is sometimes refered to as filename safe base64."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A string of data to encode."),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"pad")," \u2014 Whether or not to apply padding. Defaults to ",(0,n.kt)("inlineCode",{parentName:"li"},"false"),".")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," base64 "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"base64"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(base64"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"urlencode"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, World!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e SGVsbG8sIFdvcmxkIQ"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"base64urldecode"},(0,n.kt)("inlineCode",{parentName:"h3"},"base64.urldecode")),(0,n.kt)("p",null,"Similar to ",(0,n.kt)("inlineCode",{parentName:"p"},"base64.decode")," except for base64url."),(0,n.kt)("h4",{id:"parameters-3"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"data")," \u2014 A string of base64 data.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," base64 "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"base64"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(base64"),(0,n.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"urldecode"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"SGVsbG8sIFdvcmxkIQ"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello, world!"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e22c3ce6.06332655.js b/assets/js/e22c3ce6.06332655.js new file mode 100644 index 00000000..c872517b --- /dev/null +++ b/assets/js/e22c3ce6.06332655.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6916],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>N});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),p=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(a),F=n,N=d["".concat(i,".").concat(F)]||d[F]||m[F]||o;return a?r.createElement(N,l(l({ref:t},c),{},{components:a})):r.createElement(N,l({ref:t},c))}));function N(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=F;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:n,l[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=a(7462),n=(a(7294),a(3905));const o={sidebar_position:1},l=void 0,s={unversionedId:"New Features/Default Arguments",id:"New Features/Default Arguments",title:"Default Arguments",description:"During a function declaration, parameters can now declare their own default value.",source:"@site/docs/New Features/Default Arguments.md",sourceDirName:"New Features",slug:"/New Features/Default Arguments",permalink:"/docs/New Features/Default Arguments",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Continue Statement",permalink:"/docs/New Features/Continue Statement"},next:{title:"For-As Loop",permalink:"/docs/New Features/For-As Loop"}},i={},p=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],c={toc:p},d="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"During a function declaration, parameters can now declare their own default value."),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"write"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"text"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"No text provided."'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(text)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"write"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e "No text provided."')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"write"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e "Hello!"'))))),(0,n.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"This code behaves identically."},(0,n.kt)("div",{parentName:"pre",className:"code-title"},"This code behaves identically."),(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"function"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#A6E22E"}},"write"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"text"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"if"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," text "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," text "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"No text provided."')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(text)")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,n.kt)("div",{parentName:"code",className:"line"}),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"write"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e "No text provided."')),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"write"),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello!"'),(0,n.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,n.kt)("span",{parentName:"div",style:{color:"#88846F"}},'--\x3e "Hello!"'))))),(0,n.kt)("h4",{id:"try-it-yourself"},(0,n.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20function%20write(text%20%3D%20%22No%20text%20provided.%22)%0D%0A%20%20%20%20print(text)%0D%0Aend%0D%0A%0D%0Awrite()%20%20%20%20%20%20%20%20%20--%3E%20%22No%20text%20provided.%22%0D%0Awrite(%22Hello!%22)%20--%3E%20%22Hello!%22"},"Try It Yourself")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e22c3ce6.abd69fd4.js b/assets/js/e22c3ce6.abd69fd4.js deleted file mode 100644 index 4242d262..00000000 --- a/assets/js/e22c3ce6.abd69fd4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6916],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>N});var r=o(7294);function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function l(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function n(e){for(var t=1;t=0||(a[o]=e[o]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(a[o]=e[o])}return a}var s=r.createContext({}),i=function(e){var t=r.useContext(s),o=t;return e&&(o="function"==typeof e?e(t):n(n({},t),e)),o},p=function(e){var t=i(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var o=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=i(o),F=a,N=d["".concat(s,".").concat(F)]||d[F]||m[F]||l;return o?r.createElement(N,n(n({ref:t},p),{},{components:o})):r.createElement(N,n({ref:t},p))}));function N(e,t){var o=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=o.length,n=new Array(l);n[0]=F;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[d]="string"==typeof e?e:a,n[1]=c;for(var i=2;i{o.r(t),o.d(t,{assets:()=>s,contentTitle:()=>n,default:()=>m,frontMatter:()=>l,metadata:()=>c,toc:()=>i});var r=o(7462),a=(o(7294),o(3905));const l={sidebar_position:1},n=void 0,c={unversionedId:"New Features/Default Arguments",id:"New Features/Default Arguments",title:"Default Arguments",description:"During a function declaration, parameters can now declare their own default value.",source:"@site/docs/New Features/Default Arguments.md",sourceDirName:"New Features",slug:"/New Features/Default Arguments",permalink:"/docs/New Features/Default Arguments",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Continue Statement",permalink:"/docs/New Features/Continue Statement"},next:{title:"For-As Loop",permalink:"/docs/New Features/For-As Loop"}},s={},i=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],p={toc:i},d="wrapper";function m(e){let{components:t,...o}=e;return(0,a.kt)(d,(0,r.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"During a function declaration, parameters can now declare their own default value."),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"write"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"text"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"No text provided."'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(text)")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,a.kt)("div",{parentName:"code",className:"line"}),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"write"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e "No text provided."')),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"write"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello!"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e "Hello!"'))))),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"This code behaves identically."},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"This code behaves identically."),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"function"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #A6E22E"}},"write"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"text"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"if"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," text "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," text "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"No text provided."')),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(text)")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,a.kt)("div",{parentName:"code",className:"line"}),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"write"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e "No text provided."')),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"write"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello!"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'--\x3e "Hello!"'))))),(0,a.kt)("h4",{id:"try-it-yourself"},(0,a.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20function%20write(text%20%3D%20%22No%20text%20provided.%22)%0D%0A%20%20%20%20print(text)%0D%0Aend%0D%0A%0D%0Awrite()%20%20%20%20%20%20%20%20%20--%3E%20%22No%20text%20provided.%22%0D%0Awrite(%22Hello!%22)%20--%3E%20%22Hello!%22"},"Try It Yourself")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e358ed3f.7bcf7332.js b/assets/js/e358ed3f.7bcf7332.js new file mode 100644 index 00000000..676f572d --- /dev/null +++ b/assets/js/e358ed3f.7bcf7332.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9907],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>y});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(r),m=a,y=d["".concat(l,".").concat(m)]||d[m]||u[m]||o;return r?n.createElement(y,i(i({ref:t},c),{},{components:r})):n.createElement(y,i({ref:t},c))}));function y(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:a,i[1]=s;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var n=r(7462),a=(r(7294),r(3905));const o={sidebar_position:1},i=void 0,s={unversionedId:"New Features/String Indexing",id:"New Features/String Indexing",title:"String Indexing",description:"You can index strings for their characters now, which is cleaner & 3x faster than using string.sub. String indexing only occurs when you index with an integer, either positive or negative. Positive integers index from the start of the string, and negative integers index from the end.",source:"@site/docs/New Features/String Indexing.md",sourceDirName:"New Features",slug:"/New Features/String Indexing",permalink:"/docs/New Features/String Indexing",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Numeral Parsing",permalink:"/docs/New Features/Numeral Parsing"},next:{title:"String Interpolation",permalink:"/docs/New Features/String Interpolation"}},l={},p=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],c={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"You can index strings for their characters now, which is cleaner & ",(0,a.kt)("strong",{parentName:"p"},"3x")," faster than using ",(0,a.kt)("inlineCode",{parentName:"p"},"string.sub"),". String indexing only occurs when you index with an integer, either positive or negative. Positive integers index from the start of the string, and negative integers index from the end."),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," str "),(0,a.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello world"')),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str["),(0,a.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"]) "),(0,a.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "o"')),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str["),(0,a.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"200"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"]) "),(0,a.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- nil")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(str["),(0,a.kt)("span",{parentName:"div",style:{color:"#F92672"}},"-"),(0,a.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,a.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"]) "),(0,a.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "d"'))))),(0,a.kt)("p",null,"Any character-intensive task \u2014 for example, a hash algorithm \u2014 will greatly benefit from this."),(0,a.kt)("h4",{id:"try-it-yourself"},(0,a.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20str%20%3D%20%22hello%20world%22%0D%0Aprint(str%5B5%5D)%20--%20%22o%22%0D%0Aprint(str%5B200%5D)%20--%20nil%0D%0Aprint(str%5B-1%5D)%20--%20%22d%22"},"Try It Yourself")),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"The bytecode of this feature is not backwards-compatible with Lua.")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e358ed3f.922935f0.js b/assets/js/e358ed3f.922935f0.js deleted file mode 100644 index dd3b19c2..00000000 --- a/assets/js/e358ed3f.922935f0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9907],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>y});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(r),m=o,y=d["".concat(s,".").concat(m)]||d[m]||u[m]||a;return r?n.createElement(y,i(i({ref:t},p),{},{components:r})):n.createElement(y,i({ref:t},p))}));function y(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:o,i[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var n=r(7462),o=(r(7294),r(3905));const a={sidebar_position:1},i=void 0,l={unversionedId:"New Features/String Indexing",id:"New Features/String Indexing",title:"String Indexing",description:"You can index strings for their characters now, which is cleaner & 3x faster than using string.sub. String indexing only occurs when you index with an integer, either positive or negative. Positive integers index from the start of the string, and negative integers index from the end.",source:"@site/docs/New Features/String Indexing.md",sourceDirName:"New Features",slug:"/New Features/String Indexing",permalink:"/docs/New Features/String Indexing",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Numeral Parsing",permalink:"/docs/New Features/Numeral Parsing"},next:{title:"String Interpolation",permalink:"/docs/New Features/String Interpolation"}},s={},c=[{value:"Try It Yourself",id:"try-it-yourself",level:4}],p={toc:c},d="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"You can index strings for their characters now, which is cleaner & ",(0,o.kt)("strong",{parentName:"p"},"3x")," faster than using ",(0,o.kt)("inlineCode",{parentName:"p"},"string.sub"),". String indexing only occurs when you index with an integer, either positive or negative. Positive integers index from the start of the string, and negative integers index from the end."),(0,o.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Example Code"},(0,o.kt)("div",{parentName:"pre",className:"code-title"},"Example Code"),(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," str "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello world"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str["),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"]) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "o"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str["),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"200"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"]) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- nil")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(str["),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"-"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"]) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "d"'))))),(0,o.kt)("p",null,"Any character-intensive task \u2014 for example, a hash algorithm \u2014 will greatly benefit from this."),(0,o.kt)("h4",{id:"try-it-yourself"},(0,o.kt)("a",{parentName:"h4",href:"https://pluto-lang.org/web/#code=local%20str%20%3D%20%22hello%20world%22%0D%0Aprint(str%5B5%5D)%20--%20%22o%22%0D%0Aprint(str%5B200%5D)%20--%20nil%0D%0Aprint(str%5B-1%5D)%20--%20%22d%22"},"Try It Yourself")),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"The bytecode of this feature is not backwards-compatible with Lua.")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e4b9287f.7bc069a9.js b/assets/js/e4b9287f.7bc069a9.js deleted file mode 100644 index 04354388..00000000 --- a/assets/js/e4b9287f.7bc069a9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[2797],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,c=r(e,["components","mdxType","originalType","parentName"]),d=p(n),m=o,k=d["".concat(s,".").concat(m)]||d[m]||u[m]||i;return n?a.createElement(k,l(l({ref:t},c),{},{components:n})):a.createElement(k,l({ref:t},c))}));function k(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,l=new Array(i);l[0]=m;var r={};for(var s in t)hasOwnProperty.call(t,s)&&(r[s]=t[s]);r.originalType=e,r[d]="string"==typeof e?e:o,l[1]=r;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>r,toc:()=>p});var a=n(7462),o=(n(7294),n(3905));const i={sidebar_position:1},l="Getting Started",r={unversionedId:"Getting Started",id:"Getting Started",title:"Getting Started",description:"This document will explain how to get started with writing Pluto in no time.",source:"@site/docs/Getting Started.md",sourceDirName:".",slug:"/Getting Started",permalink:"/docs/Getting Started",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"What is Pluto?",permalink:"/docs/Introduction"},next:{title:"Editor Integration",permalink:"/docs/Editor Integration"}},s={},p=[{value:"Write Pluto Online",id:"write-pluto-online",level:2},{value:"Prebuilt Binaries",id:"prebuilt-binaries",level:2},{value:"Packages",id:"packages",level:2},{value:"Chocolatey",id:"chocolatey",level:3},{value:"APT Repository",id:"apt-repository",level:3},{value:"AUR",id:"aur",level:3},{value:"Termux",id:"termux",level:3},{value:"Compile Pluto Yourself",id:"compile-pluto-yourself",level:2},{value:"PHP Scripts",id:"php-scripts",level:3},{value:"Visual Studio",id:"visual-studio",level:3},{value:"Make",id:"make",level:3},{value:"Sun",id:"sun",level:3}],c={toc:p},d="wrapper";function u(e){let{components:t,...n}=e;return(0,o.kt)(d,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"getting-started"},"Getting Started"),(0,o.kt)("p",null,"This document will explain how to get started with writing Pluto in no time."),(0,o.kt)("h2",{id:"write-pluto-online"},"Write Pluto Online"),(0,o.kt)("p",null,"The easiest way to get started writing Pluto is to use ",(0,o.kt)("a",{parentName:"p",href:"https://pluto-lang.org/web/"},"Write Pluto Online"),", which runs Pluto code directly in your browser using WASM."),(0,o.kt)("h2",{id:"prebuilt-binaries"},"Prebuilt Binaries"),(0,o.kt)("p",null,"You can find pre-built binaries of Pluto for Windows, Linux, & Mac OS over on ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/PlutoLang/Pluto/releases"},"Pluto's Github Releases page"),"."),(0,o.kt)("h2",{id:"packages"},"Packages"),(0,o.kt)("h3",{id:"chocolatey"},"Chocolatey"),(0,o.kt)("p",null,"You can easily install ",(0,o.kt)("inlineCode",{parentName:"p"},"pluto")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"plutoc")," via Chocolatey as follows:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"choco install plutolang"))))),(0,o.kt)("h3",{id:"apt-repository"},"APT Repository"),(0,o.kt)("p",null,"You can easily install Pluto via APT as follows:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"wget -qO- https://calamity-inc.github.io/deb-repo/key.gpg | sudo tee /usr/share/keyrings/calamity-inc.gpg > /dev/null")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/calamity-inc.gpg] https://calamity-inc.github.io/deb-repo/ buster main" | sudo tee /etc/apt/sources.list.d/calamity-inc.list > /dev/null')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"sudo apt update")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"sudo apt install pluto"))))),(0,o.kt)("p",null,"This package includes the ",(0,o.kt)("inlineCode",{parentName:"p"},"pluto")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"plutoc")," executables, shared library, as well as headers for developers (",(0,o.kt)("inlineCode",{parentName:"p"},"#include "),")."),(0,o.kt)("p",null,'As the "buster" part implies, these binaries were compiled on Debian 10, but they work on all subsequent Debian releases, as well as Ubuntu 20 and above.'),(0,o.kt)("h3",{id:"aur"},"AUR"),(0,o.kt)("p",null,"Pluto is in the Arch User Repository under the name ",(0,o.kt)("inlineCode",{parentName:"p"},"plutolang"),"."),(0,o.kt)("p",null,"This package includes the ",(0,o.kt)("inlineCode",{parentName:"p"},"pluto")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"plutoc")," executables, shared library, as well as headers for developers (",(0,o.kt)("inlineCode",{parentName:"p"},"#include "),")."),(0,o.kt)("h3",{id:"termux"},"Termux"),(0,o.kt)("p",null,"Pluto is available in the Termux package main repository under ",(0,o.kt)("inlineCode",{parentName:"p"},"plutolang")," for binaries and ",(0,o.kt)("inlineCode",{parentName:"p"},"libpluto")," for development library."),(0,o.kt)("h2",{id:"compile-pluto-yourself"},"Compile Pluto Yourself"),(0,o.kt)("p",null,"Pluto can compile on virtually any platform, as long as there's a C++ 17 compiler for it."),(0,o.kt)("p",null,"First, you need to clone the repository:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"git clone https://github.com/PlutoLang/Pluto")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"cd Pluto"))))),(0,o.kt)("p",null,"Then, you can use any of the build methods documented here."),(0,o.kt)("h3",{id:"php-scripts"},"PHP Scripts"),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"PHP is required for this method. You can check if PHP is installed by running ",(0,o.kt)("inlineCode",{parentName:"p"},"php -v"),". You can install it via ",(0,o.kt)("inlineCode",{parentName:"p"},"sudo apt intall php-cli")," on Debian or ",(0,o.kt)("inlineCode",{parentName:"p"},"sudo pacman -S php")," on Arch.")),(0,o.kt)("p",null,"Simply run the following commands:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"php scripts/compile.php clang")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"php scripts/link_pluto.php clang")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"php scripts/link_plutoc.php clang")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"php scripts/link_static.php"))))),(0,o.kt)("p",null,"You can easily modify these commands to a compiler other than clang, if you wish. There are also additional scripts for the various types of shared libraries."),(0,o.kt)("p",null,"The binaries will be placed in the ",(0,o.kt)("inlineCode",{parentName:"p"},"src/")," directory."),(0,o.kt)("h3",{id:"visual-studio"},"Visual Studio"),(0,o.kt)("p",null,"In the repository you just cloned, there's a Pluto.sln you can open with Visual Studio."),(0,o.kt)("p",null,"Within Visual Studio, open the ",(0,o.kt)("strong",{parentName:"p"},"Build > Batch Build"),' dialog. Here, click "Select All", then "Build".'),(0,o.kt)("p",null,"The binaries will be placed in the ",(0,o.kt)("inlineCode",{parentName:"p"},"out/")," directory."),(0,o.kt)("h3",{id:"make"},"Make"),(0,o.kt)("p",null,"You can simply run the make command:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"make -j PLAT={yourplatform}"))))),(0,o.kt)("p",null,"The platform list can be found ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/PlutoLang/Pluto/blob/main/src/Makefile#L38"},"here"),"."),(0,o.kt)("p",null,"The binaries will be placed in the ",(0,o.kt)("inlineCode",{parentName:"p"},"src/")," directory."),(0,o.kt)("h3",{id:"sun"},"Sun"),(0,o.kt)("p",null,"Pluto supports the ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/calamity-inc/Sun"},"Sun build system")," by providing .sun files in the ",(0,o.kt)("inlineCode",{parentName:"p"},"src/")," directory, you can use them to build ",(0,o.kt)("inlineCode",{parentName:"p"},"pluto")," & ",(0,o.kt)("inlineCode",{parentName:"p"},"plutoc"),":"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"cd src")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"sun pluto")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"sun plutoc"))))),(0,o.kt)("p",null,"The binaries will be placed in the ",(0,o.kt)("inlineCode",{parentName:"p"},"src/")," directory."),(0,o.kt)("p",null,"If you wish to use Pluto as a static library in your own projects, simply add the following to your project's .sun file:"),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: undefined"}},"require ../Pluto/src"))))),(0,o.kt)("p",null,"Assuming a directory structure where your own project and Pluto share the same parent."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e4b9287f.f0bc8658.js b/assets/js/e4b9287f.f0bc8658.js new file mode 100644 index 00000000..1c70cea6 --- /dev/null +++ b/assets/js/e4b9287f.f0bc8658.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[2797],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var a=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,l=e.originalType,s=e.parentName,c=r(e,["components","mdxType","originalType","parentName"]),d=p(n),m=i,k=d["".concat(s,".").concat(m)]||d[m]||u[m]||l;return n?a.createElement(k,o(o({ref:t},c),{},{components:n})):a.createElement(k,o({ref:t},c))}));function k(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var l=n.length,o=new Array(l);o[0]=m;var r={};for(var s in t)hasOwnProperty.call(t,s)&&(r[s]=t[s]);r.originalType=e,r[d]="string"==typeof e?e:i,o[1]=r;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>l,metadata:()=>r,toc:()=>p});var a=n(7462),i=(n(7294),n(3905));const l={sidebar_position:1},o="Getting Started",r={unversionedId:"Getting Started",id:"Getting Started",title:"Getting Started",description:"This document will explain how to get started with writing Pluto in no time.",source:"@site/docs/Getting Started.md",sourceDirName:".",slug:"/Getting Started",permalink:"/docs/Getting Started",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"What is Pluto?",permalink:"/docs/Introduction"},next:{title:"Editor Integration",permalink:"/docs/Editor Integration"}},s={},p=[{value:"Write Pluto Online",id:"write-pluto-online",level:2},{value:"Prebuilt Binaries",id:"prebuilt-binaries",level:2},{value:"Packages",id:"packages",level:2},{value:"Chocolatey",id:"chocolatey",level:3},{value:"APT Repository",id:"apt-repository",level:3},{value:"AUR",id:"aur",level:3},{value:"Termux",id:"termux",level:3},{value:"Compile Pluto Yourself",id:"compile-pluto-yourself",level:2},{value:"PHP Scripts",id:"php-scripts",level:3},{value:"Visual Studio",id:"visual-studio",level:3},{value:"Make",id:"make",level:3},{value:"Sun",id:"sun",level:3}],c={toc:p},d="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(d,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"getting-started"},"Getting Started"),(0,i.kt)("p",null,"This document will explain how to get started with writing Pluto in no time."),(0,i.kt)("h2",{id:"write-pluto-online"},"Write Pluto Online"),(0,i.kt)("p",null,"The easiest way to get started writing Pluto is to use ",(0,i.kt)("a",{parentName:"p",href:"https://pluto-lang.org/web/"},"Write Pluto Online"),", which runs Pluto code directly in your browser using WASM."),(0,i.kt)("h2",{id:"prebuilt-binaries"},"Prebuilt Binaries"),(0,i.kt)("p",null,"You can find pre-built binaries of Pluto for Windows, Linux, & Mac OS over on ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/PlutoLang/Pluto/releases"},"Pluto's Github Releases page"),"."),(0,i.kt)("h2",{id:"packages"},"Packages"),(0,i.kt)("h3",{id:"chocolatey"},"Chocolatey"),(0,i.kt)("p",null,"You can easily install ",(0,i.kt)("inlineCode",{parentName:"p"},"pluto")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"plutoc")," via Chocolatey as follows:"),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"choco install plutolang"))))),(0,i.kt)("h3",{id:"apt-repository"},"APT Repository"),(0,i.kt)("p",null,"You can easily install Pluto via APT as follows:"),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"wget -qO- https://calamity-inc.github.io/deb-repo/key.gpg | sudo tee /usr/share/keyrings/calamity-inc.gpg > /dev/null")),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/calamity-inc.gpg] https://calamity-inc.github.io/deb-repo/ buster main" | sudo tee /etc/apt/sources.list.d/calamity-inc.list > /dev/null')),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"sudo apt update")),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"sudo apt install pluto"))))),(0,i.kt)("p",null,"This package includes the ",(0,i.kt)("inlineCode",{parentName:"p"},"pluto")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"plutoc")," executables, shared library, as well as headers for developers (",(0,i.kt)("inlineCode",{parentName:"p"},"#include "),")."),(0,i.kt)("p",null,'As the "buster" part implies, these binaries were compiled on Debian 10, but they work on all subsequent Debian releases, as well as Ubuntu 20 and above.'),(0,i.kt)("h3",{id:"aur"},"AUR"),(0,i.kt)("p",null,"Pluto is in the Arch User Repository under the name ",(0,i.kt)("inlineCode",{parentName:"p"},"plutolang"),"."),(0,i.kt)("p",null,"This package includes the ",(0,i.kt)("inlineCode",{parentName:"p"},"pluto")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"plutoc")," executables, shared library, as well as headers for developers (",(0,i.kt)("inlineCode",{parentName:"p"},"#include "),")."),(0,i.kt)("h3",{id:"termux"},"Termux"),(0,i.kt)("p",null,"Pluto is available in the Termux package main repository under ",(0,i.kt)("inlineCode",{parentName:"p"},"plutolang")," for binaries and ",(0,i.kt)("inlineCode",{parentName:"p"},"libpluto")," for development library."),(0,i.kt)("h2",{id:"compile-pluto-yourself"},"Compile Pluto Yourself"),(0,i.kt)("p",null,"Pluto can compile on virtually any platform, as long as there's a C++ 17 compiler for it."),(0,i.kt)("p",null,"First, you need to clone the repository:"),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"git clone https://github.com/PlutoLang/Pluto")),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"cd Pluto"))))),(0,i.kt)("p",null,"Then, you can use any of the build methods documented here."),(0,i.kt)("h3",{id:"php-scripts"},"PHP Scripts"),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"PHP is required for this method. You can check if PHP is installed by running ",(0,i.kt)("inlineCode",{parentName:"p"},"php -v"),". You can install it via ",(0,i.kt)("inlineCode",{parentName:"p"},"sudo apt intall php-cli")," on Debian or ",(0,i.kt)("inlineCode",{parentName:"p"},"sudo pacman -S php")," on Arch.")),(0,i.kt)("p",null,"Simply run the following commands:"),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"php scripts/compile.php clang")),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"php scripts/link_pluto.php clang")),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"php scripts/link_plutoc.php clang")),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"php scripts/link_static.php"))))),(0,i.kt)("p",null,"You can easily modify these commands to a compiler other than clang, if you wish. There are also additional scripts for the various types of shared libraries."),(0,i.kt)("p",null,"The binaries will be placed in the ",(0,i.kt)("inlineCode",{parentName:"p"},"src/")," directory."),(0,i.kt)("h3",{id:"visual-studio"},"Visual Studio"),(0,i.kt)("p",null,"In the repository you just cloned, there's a Pluto.sln you can open with Visual Studio."),(0,i.kt)("p",null,"Within Visual Studio, open the ",(0,i.kt)("strong",{parentName:"p"},"Build > Batch Build"),' dialog. Here, click "Select All", then "Build".'),(0,i.kt)("p",null,"The binaries will be placed in the ",(0,i.kt)("inlineCode",{parentName:"p"},"out/")," directory."),(0,i.kt)("h3",{id:"make"},"Make"),(0,i.kt)("p",null,"You can simply run the make command:"),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"make -j PLAT={yourplatform}"))))),(0,i.kt)("p",null,"The platform list can be found ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/PlutoLang/Pluto/blob/main/src/Makefile#L38"},"here"),"."),(0,i.kt)("p",null,"The binaries will be placed in the ",(0,i.kt)("inlineCode",{parentName:"p"},"src/")," directory."),(0,i.kt)("h3",{id:"sun"},"Sun"),(0,i.kt)("p",null,"Pluto supports the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/calamity-inc/Sun"},"Sun build system")," by providing .sun files in the ",(0,i.kt)("inlineCode",{parentName:"p"},"src/")," directory, you can use them to build ",(0,i.kt)("inlineCode",{parentName:"p"},"pluto")," & ",(0,i.kt)("inlineCode",{parentName:"p"},"plutoc"),":"),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"cd src")),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"sun pluto")),(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"sun plutoc"))))),(0,i.kt)("p",null,"The binaries will be placed in the ",(0,i.kt)("inlineCode",{parentName:"p"},"src/")," directory."),(0,i.kt)("p",null,"If you wish to use Pluto as a static library in your own projects, simply add the following to your project's .sun file:"),(0,i.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,i.kt)("div",{parentName:"pre",className:"code-container"},(0,i.kt)("code",{parentName:"div"},(0,i.kt)("div",{parentName:"code",className:"line"},(0,i.kt)("span",{parentName:"div",style:{color:"undefined"}},"require ../Pluto/src"))))),(0,i.kt)("p",null,"Assuming a directory structure where your own project and Pluto share the same parent."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e86e00b1.7226691a.js b/assets/js/e86e00b1.7226691a.js deleted file mode 100644 index 5725bb3f..00000000 --- a/assets/js/e86e00b1.7226691a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[3990],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>k});var o=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function n(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=o.createContext({}),c=function(e){var t=o.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):n(n({},t),e)),a},p=function(e){var t=c(e.components);return o.createElement(s.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},F=o.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=c(a),F=r,k=m["".concat(s,".").concat(F)]||m[F]||d[F]||l;return a?o.createElement(k,n(n({ref:t},p),{},{components:a})):o.createElement(k,n({ref:t},p))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,n=new Array(l);n[0]=F;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[m]="string"==typeof e?e:r,n[1]=i;for(var c=2;c{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>n,default:()=>d,frontMatter:()=>l,metadata:()=>i,toc:()=>c});var o=a(7462),r=(a(7294),a(3905));const l={sidebar_position:2},n=void 0,i={unversionedId:"New Features/Compile-Time Evaluation",id:"New Features/Compile-Time Evaluation",title:"Compile-Time Evaluation",description:"Pluto's parser provides some powerful constructs which allow you to write code that will never be seen at runtime.",source:"@site/docs/New Features/Compile-Time Evaluation.md",sourceDirName:"New Features",slug:"/New Features/Compile-Time Evaluation",permalink:"/docs/New Features/Compile-Time Evaluation",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Type Hinting",permalink:"/docs/New Features/Type Hinting"},next:{title:"Destructuring",permalink:"/docs/New Features/Destructuring"}},s={},c=[{value:"Function calls",id:"function-calls",level:2},{value:"Variables",id:"variables",level:2},{value:"Conditionals",id:"conditionals",level:2}],p={toc:c},m="wrapper";function d(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,o.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Pluto's parser provides some powerful constructs which allow you to write code that will never be seen at runtime."),(0,r.kt)("h2",{id:"function-calls"},"Function calls"),(0,r.kt)("p",null,'Certain standard library functions can be called at compile-time, as long as the arguments are also known at compile-time, by using the "$" symbol before the function call.'),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," runtime "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"joaat"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, World!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," compile "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"joaat"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, World!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(runtime "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," compile)"))))),(0,r.kt)("p",null,"If you're unfamiliar with compile-time evaluation, this is essentially what the code turns into:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," runtime "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"joaat"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, World!"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," compile "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"847757641"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- The JOAAT hash of "Hello, World!"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(runtime "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," compile)"))))),(0,r.kt)("p",null,"This is available on preloaded Pluto libraries, such as:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"json")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"base32")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"base58")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"base64")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"crypto"))),(0,r.kt)("p",null,"And on the following functions:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"tostring")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"utostring")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"tonumber")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"utonumber"))),(0,r.kt)("h2",{id:"variables"},"Variables"),(0,r.kt)("p",null,"Compile-time constant variables can be defined via the ",(0,r.kt)("inlineCode",{parentName:"p"},"$define")," statement:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$define"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"123"))))),(0,r.kt)("p",null,"This may seem identical to a local declared with the const attribute:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},""),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"123"))))),(0,r.kt)("p",null,"However, ",(0,r.kt)("inlineCode",{parentName:"p"},"$define")," also enforces that the assigned variable is a compile-time constant:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},""),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {}")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$define"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," {} "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error: variable was not assigned a compile-time constant value"))))),(0,r.kt)("h2",{id:"conditionals"},"Conditionals"),(0,r.kt)("p",null,"If there is certain code you only want to have compiled in for a certain build, such as a debug build, you can use compile-time conditionals:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$define"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," DEBUG "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$if"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," DEBUG "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Script running in debug mode"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$else")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Script running in release mode"'),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"$end"))))),(0,r.kt)("p",null,"In this case, only one of the two paths will be compiled in; the rest will not take up any space."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e86e00b1.b08f3f7e.js b/assets/js/e86e00b1.b08f3f7e.js new file mode 100644 index 00000000..fd471fc7 --- /dev/null +++ b/assets/js/e86e00b1.b08f3f7e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[3990],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>k});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),p=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},F=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=p(a),F=r,k=m["".concat(s,".").concat(F)]||m[F]||d[F]||l;return a?n.createElement(k,o(o({ref:t},c),{},{components:a})):n.createElement(k,o({ref:t},c))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,o=new Array(l);o[0]=F;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[m]="string"==typeof e?e:r,o[1]=i;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var n=a(7462),r=(a(7294),a(3905));const l={sidebar_position:2},o=void 0,i={unversionedId:"New Features/Compile-Time Evaluation",id:"New Features/Compile-Time Evaluation",title:"Compile-Time Evaluation",description:"Pluto's parser provides some powerful constructs which allow you to write code that will never be seen at runtime.",source:"@site/docs/New Features/Compile-Time Evaluation.md",sourceDirName:"New Features",slug:"/New Features/Compile-Time Evaluation",permalink:"/docs/New Features/Compile-Time Evaluation",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Type Hinting",permalink:"/docs/New Features/Type Hinting"},next:{title:"Destructuring",permalink:"/docs/New Features/Destructuring"}},s={},p=[{value:"Function calls",id:"function-calls",level:2},{value:"Variables",id:"variables",level:2},{value:"Conditionals",id:"conditionals",level:2}],c={toc:p},m="wrapper";function d(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Pluto's parser provides some powerful constructs which allow you to write code that will never be seen at runtime."),(0,r.kt)("h2",{id:"function-calls"},"Function calls"),(0,r.kt)("p",null,'Certain standard library functions can be called at compile-time, as long as the arguments are also known at compile-time, by using the "$" symbol before the function call.'),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," runtime "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"joaat"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, World!"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," compile "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"crypto"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"joaat"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, World!"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(runtime "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," compile)"))))),(0,r.kt)("p",null,"If you're unfamiliar with compile-time evaluation, this is essentially what the code turns into:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," runtime "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"crypto"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"joaat"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, World!"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," compile "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"847757641"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- The JOAAT hash of "Hello, World!"')),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(runtime "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," compile)"))))),(0,r.kt)("p",null,"This is available on preloaded Pluto libraries, such as:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"json")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"base32")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"base58")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"base64")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"crypto"))),(0,r.kt)("p",null,"And on the following functions:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"tostring")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"utostring")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"tonumber")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"utonumber"))),(0,r.kt)("h2",{id:"variables"},"Variables"),(0,r.kt)("p",null,"Compile-time constant variables can be defined via the ",(0,r.kt)("inlineCode",{parentName:"p"},"$define")," statement:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$define"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"123"))))),(0,r.kt)("p",null,"This may seem identical to a local declared with the const attribute:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},""),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"123"))))),(0,r.kt)("p",null,"However, ",(0,r.kt)("inlineCode",{parentName:"p"},"$define")," also enforces that the assigned variable is a compile-time constant:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},""),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {}")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$define"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," a "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," {} "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error: variable was not assigned a compile-time constant value"))))),(0,r.kt)("h2",{id:"conditionals"},"Conditionals"),(0,r.kt)("p",null,"If there is certain code you only want to have compiled in for a certain build, such as a debug build, you can use compile-time conditionals:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$define"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," DEBUG "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$if"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," DEBUG "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"then")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Script running in debug mode"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$else")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Script running in release mode"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"$end"))))),(0,r.kt)("p",null,"In this case, only one of the two paths will be compiled in; the rest will not take up any space."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ed6b6a43.3c265500.js b/assets/js/ed6b6a43.3c265500.js deleted file mode 100644 index 6b5eb3c5..00000000 --- a/assets/js/ed6b6a43.3c265500.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[821],{3905:(e,a,o)=>{o.d(a,{Zo:()=>i,kt:()=>N});var t=o(7294);function r(e,a,o){return a in e?Object.defineProperty(e,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[a]=o,e}function l(e,a){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),o.push.apply(o,t)}return o}function n(e){for(var a=1;a=0||(r[o]=e[o]);return r}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var c=t.createContext({}),p=function(e){var a=t.useContext(c),o=a;return e&&(o="function"==typeof e?e(a):n(n({},a),e)),o},i=function(e){var a=p(e.components);return t.createElement(c.Provider,{value:a},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},F=t.forwardRef((function(e,a){var o=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),m=p(o),F=r,N=m["".concat(c,".").concat(F)]||m[F]||d[F]||l;return o?t.createElement(N,n(n({ref:a},i),{},{components:o})):t.createElement(N,n({ref:a},i))}));function N(e,a){var o=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var l=o.length,n=new Array(l);n[0]=F;var s={};for(var c in a)hasOwnProperty.call(a,c)&&(s[c]=a[c]);s.originalType=e,s[m]="string"==typeof e?e:r,n[1]=s;for(var p=2;p{o.r(a),o.d(a,{assets:()=>c,contentTitle:()=>n,default:()=>d,frontMatter:()=>l,metadata:()=>s,toc:()=>p});var t=o(7462),r=(o(7294),o(3905));const l={sidebar_position:2},n=void 0,s={unversionedId:"New Features/Enumerations",id:"New Features/Enumerations",title:"Enumerations",description:"Pluto adds the following syntax:",source:"@site/docs/New Features/Enumerations.md",sourceDirName:"New Features",slug:"/New Features/Enumerations",permalink:"/docs/New Features/Enumerations",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Destructuring",permalink:"/docs/New Features/Destructuring"},next:{title:"Explicit Globals",permalink:"/docs/New Features/Explicit Globals"}},c={},p=[{value:"Scoped Enums",id:"scoped-enums",level:2},{value:"Reflection",id:"reflection",level:2},{value:"Anonymous Enums",id:"anonymous-enums",level:2},{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],i={toc:p},m="wrapper";function d(e){let{components:a,...o}=e;return(0,r.kt)(m,(0,t.Z)({},i,o,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Pluto adds the following syntax:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"enum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"begin")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(OPTION_2 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(OPTION_3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("p",null,"Enums can start at a base number, and increment from there."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"enum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"begin")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_4")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(OPTION_2 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(OPTION_3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(OPTION_4 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"6"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("p",null,"Since this enum has a name, we can also access its enumerators with that:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("h2",{id:"scoped-enums"},"Scoped Enums"),(0,r.kt)("p",null,"You can force usage of the ENUM.ENUMERATOR syntax by using 'enum class':"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"enum class"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"begin")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("h2",{id:"reflection"},"Reflection"),(0,r.kt)("p",null,"When you have a named enum, not only can you get its enumerators, but also reflect upon it with some methods:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"enum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #A6E22E",textDecoration:"underline"}},"MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"begin")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," k"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," v "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"in"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"kvmap"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(k"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," v) "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},'-- "OPTION_1 1" ...')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,r.kt)("p",null,"The following methods are available: ",(0,r.kt)("inlineCode",{parentName:"p"},":names()"),", ",(0,r.kt)("inlineCode",{parentName:"p"},":values()"),", ",(0,r.kt)("inlineCode",{parentName:"p"},":kvmap()"),", ",(0,r.kt)("inlineCode",{parentName:"p"},":vkmap()")),(0,r.kt)("h2",{id:"anonymous-enums"},"Anonymous Enums"),(0,r.kt)("p",null,"Enums can also be anonymous:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"enum"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"begin")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," OPTION_3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(OPTION_2 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(OPTION_3 "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"))))),(0,r.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,r.kt)("p",null,"You may need to use ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_enum")," instead of ",(0,r.kt)("inlineCode",{parentName:"p"},"enum"),". Alternatively, ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_use enum")," will enable the keyword independently of environment settings."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ed6b6a43.e04091f0.js b/assets/js/ed6b6a43.e04091f0.js new file mode 100644 index 00000000..a85e0c92 --- /dev/null +++ b/assets/js/ed6b6a43.e04091f0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[821],{3905:(e,a,t)=>{t.d(a,{Zo:()=>c,kt:()=>N});var n=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function o(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function s(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p=n.createContext({}),i=function(e){var a=n.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):s(s({},a),e)),t},c=function(e){var a=i(e.components);return n.createElement(p.Provider,{value:a},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},F=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,o=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=i(t),F=r,N=m["".concat(p,".").concat(F)]||m[F]||d[F]||o;return t?n.createElement(N,s(s({ref:a},c),{},{components:t})):n.createElement(N,s({ref:a},c))}));function N(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var o=t.length,s=new Array(o);s[0]=F;var l={};for(var p in a)hasOwnProperty.call(a,p)&&(l[p]=a[p]);l.originalType=e,l[m]="string"==typeof e?e:r,s[1]=l;for(var i=2;i{t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>s,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>i});var n=t(7462),r=(t(7294),t(3905));const o={sidebar_position:2},s=void 0,l={unversionedId:"New Features/Enumerations",id:"New Features/Enumerations",title:"Enumerations",description:"Pluto adds the following syntax:",source:"@site/docs/New Features/Enumerations.md",sourceDirName:"New Features",slug:"/New Features/Enumerations",permalink:"/docs/New Features/Enumerations",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Destructuring",permalink:"/docs/New Features/Destructuring"},next:{title:"Explicit Globals",permalink:"/docs/New Features/Explicit Globals"}},p={},i=[{value:"Scoped Enums",id:"scoped-enums",level:2},{value:"Reflection",id:"reflection",level:2},{value:"Anonymous Enums",id:"anonymous-enums",level:2},{value:"Using Compatibility Mode?",id:"using-compatibility-mode",level:2}],c={toc:i},m="wrapper";function d(e){let{components:a,...t}=e;return(0,r.kt)(m,(0,n.Z)({},c,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Pluto adds the following syntax:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"enum"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"begin")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_2"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(OPTION_2 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(OPTION_3 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,r.kt)("p",null,"Enums can start at a base number, and increment from there."),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"enum"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"begin")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_2"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_3 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_4")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(OPTION_2 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(OPTION_3 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(OPTION_4 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"6"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,r.kt)("p",null,"Since this enum has a name, we can also access its enumerators with that:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,r.kt)("h2",{id:"scoped-enums"},"Scoped Enums"),(0,r.kt)("p",null,"You can force usage of the ENUM.ENUMERATOR syntax by using 'enum class':"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"enum class"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"begin")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_2"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,r.kt)("h2",{id:"reflection"},"Reflection"),(0,r.kt)("p",null,"When you have a named enum, not only can you get its enumerators, but also reflect upon it with some methods:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"enum"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#A6E22E",textDecoration:"underline"}},"MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"begin")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_2"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," k"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," v "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"in"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," MyEnum"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"kvmap"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(k"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," v) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},'-- "OPTION_1 1" ...')),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,r.kt)("p",null,"The following methods are available: ",(0,r.kt)("inlineCode",{parentName:"p"},":names()"),", ",(0,r.kt)("inlineCode",{parentName:"p"},":values()"),", ",(0,r.kt)("inlineCode",{parentName:"p"},":kvmap()"),", ",(0,r.kt)("inlineCode",{parentName:"p"},":vkmap()")),(0,r.kt)("h2",{id:"anonymous-enums"},"Anonymous Enums"),(0,r.kt)("p",null,"Enums can also be anonymous:"),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"enum"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"begin")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_2"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},",")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," OPTION_3")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,r.kt)("div",{parentName:"code",className:"line"}),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(OPTION_1 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(OPTION_2 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(OPTION_3 "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"=="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"))))),(0,r.kt)("h2",{id:"using-compatibility-mode"},"Using Compatibility Mode?"),(0,r.kt)("p",null,"You may need to use ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_enum")," instead of ",(0,r.kt)("inlineCode",{parentName:"p"},"enum"),". Alternatively, ",(0,r.kt)("inlineCode",{parentName:"p"},"pluto_use enum")," will enable the keyword independently of environment settings."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ef218fa5.6ee09969.js b/assets/js/ef218fa5.6ee09969.js deleted file mode 100644 index 2227f207..00000000 --- a/assets/js/ef218fa5.6ee09969.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5277],{3905:(e,a,t)=>{t.d(a,{Zo:()=>p,kt:()=>k});var r=t(7294);function o(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var a=1;a=0||(o[t]=e[t]);return o}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i=r.createContext({}),c=function(e){var a=r.useContext(i),t=a;return e&&(t="function"==typeof e?e(a):s(s({},a),e)),t},p=function(e){var a=c(e.components);return r.createElement(i.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},N=r.forwardRef((function(e,a){var t=e.components,o=e.mdxType,l=e.originalType,i=e.parentName,p=n(e,["components","mdxType","originalType","parentName"]),d=c(t),N=o,k=d["".concat(i,".").concat(N)]||d[N]||m[N]||l;return t?r.createElement(k,s(s({ref:a},p),{},{components:t})):r.createElement(k,s({ref:a},p))}));function k(e,a){var t=arguments,o=a&&a.mdxType;if("string"==typeof e||o){var l=t.length,s=new Array(l);s[0]=N;var n={};for(var i in a)hasOwnProperty.call(a,i)&&(n[i]=a[i]);n.originalType=e,n[d]="string"==typeof e?e:o,s[1]=n;for(var c=2;c{t.r(a),t.d(a,{assets:()=>i,contentTitle:()=>s,default:()=>m,frontMatter:()=>l,metadata:()=>n,toc:()=>c});var r=t(7462),o=(t(7294),t(3905));const l={sidebar_position:3},s=void 0,n={unversionedId:"Runtime Environment/Assert",id:"Runtime Environment/Assert",title:"Assert",description:"Must be included via require.",source:"@site/docs/Runtime Environment/Assert.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Assert",permalink:"/docs/Runtime Environment/Assert",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Table",permalink:"/docs/Runtime Environment/Table"},next:{title:"Base32",permalink:"/docs/Runtime Environment/Base32"}},i={},c=[{value:"assert.isnil",id:"assertisnil",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Errors",id:"errors",level:4},{value:"assert.istrue",id:"assertistrue",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Errors",id:"errors-1",level:4},{value:"assert.isfalse",id:"assertisfalse",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Errors",id:"errors-2",level:4},{value:"assert.falsy",id:"assertfalsy",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Errors",id:"errors-3",level:4},{value:"assert.truthy",id:"asserttruthy",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Errors",id:"errors-4",level:4},{value:"assert.notnil",id:"assertnotnil",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Errors",id:"errors-5",level:4},{value:"assert.equal",id:"assertequal",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Errors",id:"errors-6",level:4},{value:"assert.nequal",id:"assertnequal",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Errors",id:"errors-7",level:4},{value:"assert.less",id:"assertless",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Errors",id:"errors-8",level:4},{value:"assert.lesseq",id:"assertlesseq",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Errors",id:"errors-9",level:4},{value:"assert.greater",id:"assertgreater",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Errors",id:"errors-10",level:4},{value:"assert.greatereq",id:"assertgreatereq",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Errors",id:"errors-11",level:4},{value:"assert.noerror",id:"assertnoerror",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Errors",id:"errors-12",level:4},{value:"assert.haserror",id:"asserthaserror",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Errors",id:"errors-13",level:4},{value:"assert.searcherror",id:"assertsearcherror",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Errors",id:"errors-14",level:4}],p={toc:c},d="wrapper";function m(e){let{components:a,...t}=e;return(0,o.kt)(d,(0,r.Z)({},p,t,{components:a,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Must be included via ",(0,o.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertisnil"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.isnil")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is ",(0,o.kt)("inlineCode",{parentName:"p"},"nil")),(0,o.kt)("h4",{id:"parameters"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which ",(0,o.kt)("em",{parentName:"li"},"should")," be nil.")),(0,o.kt)("h4",{id:"errors"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if the ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is not ",(0,o.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isnil"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isnil"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"5"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"test.pluto:4 -> Assertion Error: (assert.isnil)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Intended Value: nil")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Received Value: 5")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"stack traceback:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in function 'error'")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," (...tail calls...)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in ?")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertistrue"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.istrue")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is ",(0,o.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,o.kt)("h4",{id:"parameters-1"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which ",(0,o.kt)("em",{parentName:"li"},"should")," be ",(0,o.kt)("inlineCode",{parentName:"li"},"true"),".")),(0,o.kt)("h4",{id:"errors-1"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is not ",(0,o.kt)("inlineCode",{parentName:"p"},"true")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"istrue"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"istrue"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"false"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.istrue)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Intended Value: true")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Received Value: false")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"stack traceback:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in function 'error'")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," (...tail calls...)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," test.pluto:4: in main chunk")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in ?")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertisfalse"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.isfalse")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is ",(0,o.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,o.kt)("h4",{id:"parameters-2"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which ",(0,o.kt)("em",{parentName:"li"},"should")," be ",(0,o.kt)("inlineCode",{parentName:"li"},"false"),".")),(0,o.kt)("h4",{id:"errors-2"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is not ",(0,o.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isfalse"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"false"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isfalse"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"true"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.isfalse)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Intended Value: false")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Received Value: true")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"stack traceback:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in function 'error'")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," (...tail calls...)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," test.pluto:4: in main chunk")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in ?")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertfalsy"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.falsy")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value"),' is a "falsy" value. Falsy means the value is ',(0,o.kt)("inlineCode",{parentName:"p"},"nil")," or ",(0,o.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,o.kt)("h4",{id:"parameters-3"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which ",(0,o.kt)("em",{parentName:"li"},"should")," be falsy.")),(0,o.kt)("h4",{id:"errors-3"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is not falsy."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"falsy"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"falsy"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"false"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"falsy"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.falsy)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Intended Value: nil or false")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' Received Value: string(13) "Hello, world!"')),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"stack traceback:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in function 'error'")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," (...tail calls...)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," test.pluto:4: in main chunk")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in ?")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"asserttruthy"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.truthy")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value"),' is a "truthy" value. This is the inverse of "falsy", a.k.a, any value that isn\'t ',(0,o.kt)("inlineCode",{parentName:"p"},"nil")," or ",(0,o.kt)("inlineCode",{parentName:"p"},"false")," is truthy."),(0,o.kt)("h4",{id:"parameters-4"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which ",(0,o.kt)("em",{parentName:"li"},"should")," be truthy, a.k.a it ",(0,o.kt)("em",{parentName:"li"},"should not")," be ",(0,o.kt)("inlineCode",{parentName:"li"},"nil")," or ",(0,o.kt)("inlineCode",{parentName:"li"},"false"),".")),(0,o.kt)("h4",{id:"errors-4"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is not truthy, i.e if ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is ",(0,o.kt)("inlineCode",{parentName:"p"},"nil")," or ",(0,o.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"truthy"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"truthy"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.truthy)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Intended Value: not nil or false")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Received Value: nil")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"stack traceback:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in function 'error'")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," (...tail calls...)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," test.pluto:4: in main chunk")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in ?")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertnotnil"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.notnil")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is not ",(0,o.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,o.kt)("h4",{id:"parameters-5"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which should ",(0,o.kt)("em",{parentName:"li"},"not")," be ",(0,o.kt)("inlineCode",{parentName:"li"},"nil"),".")),(0,o.kt)("h4",{id:"errors-5"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is ",(0,o.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"notnil"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"notnil"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"nil"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.notnil)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Intended Value: not nil")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Received Value: nil")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"stack traceback:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in function 'error'")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," (...tail calls...)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," test.pluto:4: in main chunk")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," [C]: in ?")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertequal"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.equal")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," is equal to ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("p",null,"This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step."),(0,o.kt)("h4",{id:"parameters-6"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first value."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second value.")),(0,o.kt)("h4",{id:"errors-6"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," does not equal ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"equal"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world..."'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:3 -> Assertion Error: (assert.equal)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' Intended Value: string(13) "Hello, world!"')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' Received Value: string(15) "Hello, world..."')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"equal"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hi there."'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"split"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello there."'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"split"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.equal)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' Intended Value: { [1] = string(2) "Hi", [2] = string(6) "there.", }')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},' Received Value: { [1] = string(5) "Hello", [2] = string(6) "there.", }')),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertnequal"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.nequal")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," is ",(0,o.kt)("em",{parentName:"p"},"not")," equal to ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("p",null,"This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step."),(0,o.kt)("h4",{id:"parameters-7"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first value."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second value.")),(0,o.kt)("h4",{id:"errors-7"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown of ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," does equal ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"nequal"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hi, world!"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"nequal"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hi there."'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"split"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello there."'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"split"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'" "'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes."))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertless"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.less")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," is less than ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("h4",{id:"parameters-8"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first number."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second number.")),(0,o.kt)("h4",{id:"errors-8"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," is not less than ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"less"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"less"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.less)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Expression: (1 < 1) == false")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertlesseq"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.lesseq")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," is less than or equal to ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("h4",{id:"parameters-9"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first number."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second number.")),(0,o.kt)("h4",{id:"errors-9"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," is not less than or equal to ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"lesseq"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"lesseq"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:3 -> Assertion Error: (assert.lesseq)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Expression: (1 <= 0) == false")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertgreater"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.greater")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," is greater than ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("h4",{id:"parameters-10"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first number."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second number.")),(0,o.kt)("h4",{id:"errors-10"},"Errors"),(0,o.kt)("p",null,"An assertion errros is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," is not greater than ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"greater"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"greater"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.greater)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Expression: (3 > 3) == false")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertgreatereq"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.greatereq")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," is greater than or equal to ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("h4",{id:"parameters-11"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first number."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second number.")),(0,o.kt)("h4",{id:"errors-11"},"Errors"),(0,o.kt)("p",null,"An assertion errros is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"value1")," is not greater than or equal to ",(0,o.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"greatereq"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"greatereq"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes."))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertnoerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.noerror")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"callback")," does not raise an error when called."),(0,o.kt)("h4",{id:"parameters-12"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"callback")," \u2014 A function reference."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"...")," \u2014 Any other parameters passed to this function will be passed to the ",(0,o.kt)("inlineCode",{parentName:"li"},"callback"),".")),(0,o.kt)("h4",{id:"errors-12"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"callback")," raises an error."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"noerror"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(tostring"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"400"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"noerror"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(error"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"argument argument"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.noerror)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," An error was raised: argument argument")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"asserthaserror"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.haserror")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"callback")," does raise an error when called."),(0,o.kt)("h4",{id:"parameters-13"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"callback")," \u2014 A function reference."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"...")," \u2014 Any other parameters passed to this function will be passed to the ",(0,o.kt)("inlineCode",{parentName:"li"},"callback"),".")),(0,o.kt)("h4",{id:"errors-13"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if ",(0,o.kt)("inlineCode",{parentName:"p"},"callback")," does not raise an error."),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"haserror"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(error"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"argument argument"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"haserror"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(tostring"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"400"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.haserror)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Expected an error, but there was none.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))),(0,o.kt)("hr",null),(0,o.kt)("h3",{id:"assertsearcherror"},(0,o.kt)("inlineCode",{parentName:"h3"},"assert.searcherror")),(0,o.kt)("p",null,"Asserts that ",(0,o.kt)("inlineCode",{parentName:"p"},"callback")," raises an error, and that ",(0,o.kt)("inlineCode",{parentName:"p"},"substring")," is present within the error message."),(0,o.kt)("h4",{id:"parameters-14"},"Parameters"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"substring")," \u2014 The substring that should be inside of the error message."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"callback")," \u2014 A function reference."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"...")," \u2014 Any other parameters passed to this function will be passed to the ",(0,o.kt)("inlineCode",{parentName:"li"},"callback"),".")),(0,o.kt)("h4",{id:"errors-14"},"Errors"),(0,o.kt)("p",null,"An assertion error is thrown if:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"callback")," does not raise an error."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"callback")," does raise an error, but the error message does not contain ",(0,o.kt)("inlineCode",{parentName:"li"},"substring"),".")),(0,o.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,o.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,o.kt)("div",{parentName:"pre",className:"code-container"},(0,o.kt)("code",{parentName:"div"},(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," assert "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"assert"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"searcherror"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"argument"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," error"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"argument argument"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"searcherror"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"something"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," tostring"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"400"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.searcherror)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Expected an error, but there was none.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]")),(0,o.kt)("div",{parentName:"code",className:"line"}),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"searcherror"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"argument"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," error"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"argument argument"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Passes.")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"assert"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,o.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"searcherror"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"argument"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," error"),(0,o.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"something something"'),(0,o.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Error:")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--[[")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.searcherror)")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Absent String: argument")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}}," Error Message: something s")),(0,o.kt)("div",{parentName:"code",className:"line"},(0,o.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--]]"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ef218fa5.9d227dde.js b/assets/js/ef218fa5.9d227dde.js new file mode 100644 index 00000000..1a8384dc --- /dev/null +++ b/assets/js/ef218fa5.9d227dde.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[5277],{3905:(e,a,t)=>{t.d(a,{Zo:()=>d,kt:()=>k});var r=t(7294);function s(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function n(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,r)}return t}function l(e){for(var a=1;a=0||(s[t]=e[t]);return s}(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}var i=r.createContext({}),p=function(e){var a=r.useContext(i),t=a;return e&&(t="function"==typeof e?e(a):l(l({},a),e)),t},d=function(e){var a=p(e.components);return r.createElement(i.Provider,{value:a},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},N=r.forwardRef((function(e,a){var t=e.components,s=e.mdxType,n=e.originalType,i=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),m=p(t),N=s,k=m["".concat(i,".").concat(N)]||m[N]||c[N]||n;return t?r.createElement(k,l(l({ref:a},d),{},{components:t})):r.createElement(k,l({ref:a},d))}));function k(e,a){var t=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var n=t.length,l=new Array(n);l[0]=N;var o={};for(var i in a)hasOwnProperty.call(a,i)&&(o[i]=a[i]);o.originalType=e,o[m]="string"==typeof e?e:s,l[1]=o;for(var p=2;p{t.r(a),t.d(a,{assets:()=>i,contentTitle:()=>l,default:()=>c,frontMatter:()=>n,metadata:()=>o,toc:()=>p});var r=t(7462),s=(t(7294),t(3905));const n={sidebar_position:3},l=void 0,o={unversionedId:"Runtime Environment/Assert",id:"Runtime Environment/Assert",title:"Assert",description:"Must be included via require.",source:"@site/docs/Runtime Environment/Assert.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Assert",permalink:"/docs/Runtime Environment/Assert",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Table",permalink:"/docs/Runtime Environment/Table"},next:{title:"Base32",permalink:"/docs/Runtime Environment/Base32"}},i={},p=[{value:"assert.isnil",id:"assertisnil",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Errors",id:"errors",level:4},{value:"assert.istrue",id:"assertistrue",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Errors",id:"errors-1",level:4},{value:"assert.isfalse",id:"assertisfalse",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Errors",id:"errors-2",level:4},{value:"assert.falsy",id:"assertfalsy",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Errors",id:"errors-3",level:4},{value:"assert.truthy",id:"asserttruthy",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Errors",id:"errors-4",level:4},{value:"assert.notnil",id:"assertnotnil",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Errors",id:"errors-5",level:4},{value:"assert.equal",id:"assertequal",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Errors",id:"errors-6",level:4},{value:"assert.nequal",id:"assertnequal",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Errors",id:"errors-7",level:4},{value:"assert.less",id:"assertless",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Errors",id:"errors-8",level:4},{value:"assert.lesseq",id:"assertlesseq",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Errors",id:"errors-9",level:4},{value:"assert.greater",id:"assertgreater",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Errors",id:"errors-10",level:4},{value:"assert.greatereq",id:"assertgreatereq",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Errors",id:"errors-11",level:4},{value:"assert.noerror",id:"assertnoerror",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Errors",id:"errors-12",level:4},{value:"assert.haserror",id:"asserthaserror",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Errors",id:"errors-13",level:4},{value:"assert.searcherror",id:"assertsearcherror",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Errors",id:"errors-14",level:4}],d={toc:p},m="wrapper";function c(e){let{components:a,...t}=e;return(0,s.kt)(m,(0,r.Z)({},d,t,{components:a,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"Must be included via ",(0,s.kt)("inlineCode",{parentName:"p"},"require"),"."),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertisnil"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.isnil")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value")," is ",(0,s.kt)("inlineCode",{parentName:"p"},"nil")),(0,s.kt)("h4",{id:"parameters"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which ",(0,s.kt)("em",{parentName:"li"},"should")," be nil.")),(0,s.kt)("h4",{id:"errors"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if the ",(0,s.kt)("inlineCode",{parentName:"p"},"value")," is not ",(0,s.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isnil"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isnil"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"5"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"test.pluto:4 -> Assertion Error: (assert.isnil)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Intended Value: nil")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Received Value: 5")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"stack traceback:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in function 'error'")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," (...tail calls...)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in ?")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertistrue"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.istrue")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value")," is ",(0,s.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,s.kt)("h4",{id:"parameters-1"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which ",(0,s.kt)("em",{parentName:"li"},"should")," be ",(0,s.kt)("inlineCode",{parentName:"li"},"true"),".")),(0,s.kt)("h4",{id:"errors-1"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"value")," is not ",(0,s.kt)("inlineCode",{parentName:"p"},"true")),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"istrue"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"istrue"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"false"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.istrue)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Intended Value: true")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Received Value: false")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"stack traceback:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in function 'error'")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," (...tail calls...)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," test.pluto:4: in main chunk")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in ?")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertisfalse"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.isfalse")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value")," is ",(0,s.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,s.kt)("h4",{id:"parameters-2"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which ",(0,s.kt)("em",{parentName:"li"},"should")," be ",(0,s.kt)("inlineCode",{parentName:"li"},"false"),".")),(0,s.kt)("h4",{id:"errors-2"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"value")," is not ",(0,s.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isfalse"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"false"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isfalse"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"true"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.isfalse)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Intended Value: false")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Received Value: true")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"stack traceback:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in function 'error'")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," (...tail calls...)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," test.pluto:4: in main chunk")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in ?")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertfalsy"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.falsy")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value"),' is a "falsy" value. Falsy means the value is ',(0,s.kt)("inlineCode",{parentName:"p"},"nil")," or ",(0,s.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,s.kt)("h4",{id:"parameters-3"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which ",(0,s.kt)("em",{parentName:"li"},"should")," be falsy.")),(0,s.kt)("h4",{id:"errors-3"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"value")," is not falsy."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"falsy"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"falsy"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"false"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"falsy"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.falsy)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Intended Value: nil or false")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},' Received Value: string(13) "Hello, world!"')),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"stack traceback:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in function 'error'")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," (...tail calls...)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," test.pluto:4: in main chunk")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in ?")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"asserttruthy"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.truthy")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value"),' is a "truthy" value. This is the inverse of "falsy", a.k.a, any value that isn\'t ',(0,s.kt)("inlineCode",{parentName:"p"},"nil")," or ",(0,s.kt)("inlineCode",{parentName:"p"},"false")," is truthy."),(0,s.kt)("h4",{id:"parameters-4"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which ",(0,s.kt)("em",{parentName:"li"},"should")," be truthy, a.k.a it ",(0,s.kt)("em",{parentName:"li"},"should not")," be ",(0,s.kt)("inlineCode",{parentName:"li"},"nil")," or ",(0,s.kt)("inlineCode",{parentName:"li"},"false"),".")),(0,s.kt)("h4",{id:"errors-4"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"value")," is not truthy, i.e if ",(0,s.kt)("inlineCode",{parentName:"p"},"value")," is ",(0,s.kt)("inlineCode",{parentName:"p"},"nil")," or ",(0,s.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"truthy"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"truthy"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.truthy)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Intended Value: not nil or false")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Received Value: nil")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"stack traceback:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in function 'error'")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," (...tail calls...)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," test.pluto:4: in main chunk")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in ?")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertnotnil"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.notnil")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value")," is not ",(0,s.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,s.kt)("h4",{id:"parameters-5"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value")," \u2014 The value which should ",(0,s.kt)("em",{parentName:"li"},"not")," be ",(0,s.kt)("inlineCode",{parentName:"li"},"nil"),".")),(0,s.kt)("h4",{id:"errors-5"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"value")," is ",(0,s.kt)("inlineCode",{parentName:"p"},"nil"),"."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"notnil"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"notnil"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"nil"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.notnil)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Intended Value: not nil")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Received Value: nil")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"stack traceback:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in function 'error'")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},' [string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>')),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," (...tail calls...)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," test.pluto:4: in main chunk")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," [C]: in ?")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertequal"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.equal")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," is equal to ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("p",null,"This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step."),(0,s.kt)("h4",{id:"parameters-6"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first value."),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second value.")),(0,s.kt)("h4",{id:"errors-6"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," does not equal ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"equal"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world..."'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:3 -> Assertion Error: (assert.equal)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},' Intended Value: string(13) "Hello, world!"')),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},' Received Value: string(15) "Hello, world..."')),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"equal"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hi there."'),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"split"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello there."'),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"split"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.equal)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},' Intended Value: { [1] = string(2) "Hi", [2] = string(6) "there.", }')),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},' Received Value: { [1] = string(5) "Hello", [2] = string(6) "there.", }')),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertnequal"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.nequal")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," is ",(0,s.kt)("em",{parentName:"p"},"not")," equal to ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("p",null,"This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step."),(0,s.kt)("h4",{id:"parameters-7"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first value."),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second value.")),(0,s.kt)("h4",{id:"errors-7"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown of ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," does equal ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"nequal"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"'),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hi, world!"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"nequal"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hi there."'),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"split"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello there."'),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"split"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'" "'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes."))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertless"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.less")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," is less than ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("h4",{id:"parameters-8"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first number."),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second number.")),(0,s.kt)("h4",{id:"errors-8"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," is not less than ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"less"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"less"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.less)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Expression: (1 < 1) == false")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertlesseq"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.lesseq")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," is less than or equal to ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("h4",{id:"parameters-9"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first number."),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second number.")),(0,s.kt)("h4",{id:"errors-9"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," is not less than or equal to ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"lesseq"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"lesseq"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:3 -> Assertion Error: (assert.lesseq)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Expression: (1 <= 0) == false")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertgreater"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.greater")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," is greater than ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("h4",{id:"parameters-10"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first number."),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second number.")),(0,s.kt)("h4",{id:"errors-10"},"Errors"),(0,s.kt)("p",null,"An assertion errros is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," is not greater than ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"greater"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"greater"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.greater)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Expression: (3 > 3) == false")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertgreatereq"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.greatereq")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," is greater than or equal to ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("h4",{id:"parameters-11"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value1")," \u2014 The first number."),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"value2")," \u2014 The second number.")),(0,s.kt)("h4",{id:"errors-11"},"Errors"),(0,s.kt)("p",null,"An assertion errros is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"value1")," is not greater than or equal to ",(0,s.kt)("inlineCode",{parentName:"p"},"value2"),"."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"greatereq"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"greatereq"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes."))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertnoerror"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.noerror")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"callback")," does not raise an error when called."),(0,s.kt)("h4",{id:"parameters-12"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"callback")," \u2014 A function reference."),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"...")," \u2014 Any other parameters passed to this function will be passed to the ",(0,s.kt)("inlineCode",{parentName:"li"},"callback"),".")),(0,s.kt)("h4",{id:"errors-12"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"callback")," raises an error."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"noerror"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(tostring"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"400"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"noerror"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(error"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"argument argument"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.noerror)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," An error was raised: argument argument")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"asserthaserror"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.haserror")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"callback")," does raise an error when called."),(0,s.kt)("h4",{id:"parameters-13"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"callback")," \u2014 A function reference."),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"...")," \u2014 Any other parameters passed to this function will be passed to the ",(0,s.kt)("inlineCode",{parentName:"li"},"callback"),".")),(0,s.kt)("h4",{id:"errors-13"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if ",(0,s.kt)("inlineCode",{parentName:"p"},"callback")," does not raise an error."),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"haserror"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(error"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"argument argument"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"haserror"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(tostring"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"400"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.haserror)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Expected an error, but there was none.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))),(0,s.kt)("hr",null),(0,s.kt)("h3",{id:"assertsearcherror"},(0,s.kt)("inlineCode",{parentName:"h3"},"assert.searcherror")),(0,s.kt)("p",null,"Asserts that ",(0,s.kt)("inlineCode",{parentName:"p"},"callback")," raises an error, and that ",(0,s.kt)("inlineCode",{parentName:"p"},"substring")," is present within the error message."),(0,s.kt)("h4",{id:"parameters-14"},"Parameters"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"substring")," \u2014 The substring that should be inside of the error message."),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"callback")," \u2014 A function reference."),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"...")," \u2014 Any other parameters passed to this function will be passed to the ",(0,s.kt)("inlineCode",{parentName:"li"},"callback"),".")),(0,s.kt)("h4",{id:"errors-14"},"Errors"),(0,s.kt)("p",null,"An assertion error is thrown if:"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"callback")," does not raise an error."),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("inlineCode",{parentName:"li"},"callback")," does raise an error, but the error message does not contain ",(0,s.kt)("inlineCode",{parentName:"li"},"substring"),".")),(0,s.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true"},(0,s.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,s.kt)("div",{parentName:"pre",className:"code-container"},(0,s.kt)("code",{parentName:"div"},(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," assert "),(0,s.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"assert"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"searcherror"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"argument"'),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," error"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"argument argument"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"searcherror"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"something"'),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," tostring"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"400"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.searcherror)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Expected an error, but there was none.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]")),(0,s.kt)("div",{parentName:"code",className:"line"}),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"searcherror"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"argument"'),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," error"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"argument argument"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Passes.")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"assert"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,s.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"searcherror"),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"argument"'),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," error"),(0,s.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,s.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"something something"'),(0,s.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Error:")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--[[")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"pluto: test.pluto:4 -> Assertion Error: (assert.searcherror)")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Absent String: argument")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}}," Error Message: something s")),(0,s.kt)("div",{parentName:"code",className:"line"},(0,s.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--]]"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f18b32fa.4b5f6d9d.js b/assets/js/f18b32fa.4b5f6d9d.js deleted file mode 100644 index cc5d4815..00000000 --- a/assets/js/f18b32fa.4b5f6d9d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6890],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>F});var a=o(7294);function l(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function n(e){for(var t=1;t=0||(l[o]=e[o]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(l[o]=e[o])}return l}var c=a.createContext({}),i=function(e){var t=a.useContext(c),o=t;return e&&(o="function"==typeof e?e(t):n(n({},t),e)),o},p=function(e){var t=i(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var o=e.components,l=e.mdxType,r=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=i(o),m=l,F=d["".concat(c,".").concat(m)]||d[m]||k[m]||r;return o?a.createElement(F,n(n({ref:t},p),{},{components:o})):a.createElement(F,n({ref:t},p))}));function F(e,t){var o=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var r=o.length,n=new Array(r);n[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:l,n[1]=s;for(var i=2;i{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>n,default:()=>k,frontMatter:()=>r,metadata:()=>s,toc:()=>i});var a=o(7462),l=(o(7294),o(3905));const r={sidebar_position:3},n=void 0,s={unversionedId:"Runtime Environment/Socket",id:"Runtime Environment/Socket",title:"Socket",description:"Must be included via require. This library is not available in WASM builds of Pluto.",source:"@site/docs/Runtime Environment/Socket.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Socket",permalink:"/docs/Runtime Environment/Socket",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Scheduler",permalink:"/docs/Runtime Environment/Scheduler"},next:{title:"URL",permalink:"/docs/Runtime Environment/URL"}},c={},i=[{value:"socket.connect",id:"socketconnect",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Multitasking",id:"multitasking",level:4},{value:"socket.listen",id:"socketlisten",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"socket.bind",id:"socketbind",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Socket Class",id:"socket-class",level:2},{value:"socket.send",id:"socketsend",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"socket.recv",id:"socketrecv",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Multitasking",id:"multitasking-1",level:4},{value:"socket.unrecv",id:"socketunrecv",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"socket.starttls",id:"socketstarttls",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Multitasking",id:"multitasking-2",level:4},{value:"socket.close",id:"socketclose",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Listener Class",id:"listener-class",level:2},{value:"accept",id:"accept",level:3},{value:"Returns",id:"returns-4",level:4},{value:"Multitasking",id:"multitasking-3",level:4},{value:"hasconnection",id:"hasconnection",level:3}],p={toc:i},d="wrapper";function k(e){let{components:t,...o}=e;return(0,l.kt)(d,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Must be included via ",(0,l.kt)("inlineCode",{parentName:"p"},"require"),". This library is not available in WASM builds of Pluto."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"socketconnect"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.connect")),(0,l.kt)("p",null,"Establishes a TCP connection."),(0,l.kt)("h4",{id:"parameters"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The host to connect to. Either an IPv4 or IPv6 address, or a domain name resolving to one."),(0,l.kt)("li",{parentName:"ol"},"The port to contact the host on.")),(0,l.kt)("h4",{id:"returns"},"Returns"),(0,l.kt)("p",null,"A socket instance on success. Nil on failure."),(0,l.kt)("h4",{id:"multitasking"},"Multitasking"),(0,l.kt)("p",null,"If called inside of a coroutine, this function yields. Otherwise, it blocks."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"socketlisten"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.listen")),(0,l.kt)("p",null,"Creates a new listener for the given port."),(0,l.kt)("h4",{id:"parameters-1"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The port to listen on.")),(0,l.kt)("h4",{id:"returns-1"},"Returns"),(0,l.kt)("p",null,"A listener instance on success. Nil on failure."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"socketbind"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.bind")),(0,l.kt)("p",null,"A convenience function that wraps ",(0,l.kt)("inlineCode",{parentName:"p"},"socket.listen"),", automatically accepting new clients and spinning up a coroutine for them."),(0,l.kt)("h4",{id:"parameters-2"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"A ",(0,l.kt)("a",{parentName:"li",href:"Scheduler"},"scheduler")," instance."),(0,l.kt)("li",{parentName:"ol"},"The port to listen on."),(0,l.kt)("li",{parentName:"ol"},"The callback function that will be called in a new coroutine for each client socket.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { scheduler"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," socket } "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"*"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," sched "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"scheduler"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"socket"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"bind"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(sched"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"80"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," |"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #FD971F",fontStyle:"italic"}},"s"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," content "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello, world!"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"send"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"HTTP/1.1 200 OK'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"Connection: Close"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'Content-Length: "'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"..#"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"content"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\r\\n\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"content)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"sched"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"run"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()"))))),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"socket-class"},"Socket Class"),(0,l.kt)("p",null,"Socket instances are obtained by calling ",(0,l.kt)("inlineCode",{parentName:"p"},"socket.connect")," (client), or from a listener (server)."),(0,l.kt)("h3",{id:"socketsend"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.send")),(0,l.kt)("p",null,"Sends data on a socket."),(0,l.kt)("h4",{id:"parameters-3"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The socket instance."),(0,l.kt)("li",{parentName:"ol"},"The data to send.")),(0,l.kt)("h3",{id:"socketrecv"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.recv")),(0,l.kt)("p",null,"Receive data from a socket."),(0,l.kt)("h4",{id:"parameters-4"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The socket instance.")),(0,l.kt)("h4",{id:"returns-2"},"Returns"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If the socket is open: The oldest chunk of data received on the transport layer (TCP packet) or crypto layer (TLS record) as a string."),(0,l.kt)("li",{parentName:"ul"},"If the socket is closed: Nil.")),(0,l.kt)("h4",{id:"multitasking-1"},"Multitasking"),(0,l.kt)("p",null,"If a message is buffered, the function can return immediately. If not, it will yield if inside a coroutine, and block otherwise."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," socket "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:socket"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," socket"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"connect"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"google.com"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"80"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"s"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"send"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"GET / HTTP/1.1'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"Host: google.com"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\r\\n\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"recv"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"())"))))),(0,l.kt)("h3",{id:"socketunrecv"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.unrecv")),(0,l.kt)("p",null,"Pushes a chunk of data to the front of the receive buffer, making it oldest for the purposes of ",(0,l.kt)("inlineCode",{parentName:"p"},"socket.recv"),"."),(0,l.kt)("h4",{id:"parameters-5"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The socket instance."),(0,l.kt)("li",{parentName:"ol"},"The data to push.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," socket "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:socket"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," sock "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," socket"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"connect"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"google.com"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"80"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"sock"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"unrecv"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"World"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"sock"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"unrecv"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(sock"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"recv"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e Hello")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(sock"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"recv"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e World"))))),(0,l.kt)("h3",{id:"socketstarttls"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.starttls")),(0,l.kt)("p",null,"Attempts to add the TLS crypto layer to the socket, making the transport layer a sole carrier for TLS traffic."),(0,l.kt)("h4",{id:"parameters-6"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The socket instance."),(0,l.kt)("li",{parentName:"ol"},"The host name of the intended remote. This may be the same as what was passed to ",(0,l.kt)("inlineCode",{parentName:"li"},"socket.connect"),". This name must be on the certificate that the remote will send.")),(0,l.kt)("h4",{id:"returns-3"},"Returns"),(0,l.kt)("p",null,"True on success. On failure, returns false and the socket is closed. If the socket is already using TLS, returns nil."),(0,l.kt)("h4",{id:"multitasking-2"},"Multitasking"),(0,l.kt)("p",null,"If called inside of a coroutine, this function yields. Otherwise, it blocks."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," socket "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:socket"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," socket"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"connect"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto-lang.org"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"443"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(s"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"starttls"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto-lang.org"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Failed to establish secure connection."'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"s"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"send"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"GET / HTTP/1.1'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"Host: pluto-lang.org"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},"Connection: close"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"\\r\\n\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"while"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," data "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},":="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," s"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"recv"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(data)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,l.kt)("h3",{id:"socketclose"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.close")),(0,l.kt)("p",null,"Closes a socket."),(0,l.kt)("h4",{id:"parameters-7"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The socket instance.")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"listener-class"},"Listener Class"),(0,l.kt)("p",null,"Listener instances are obtained by calling ",(0,l.kt)("inlineCode",{parentName:"p"},"socket.listen"),"."),(0,l.kt)("h3",{id:"accept"},(0,l.kt)("inlineCode",{parentName:"h3"},"accept")),(0,l.kt)("p",null,"Accepts an incoming client connection, waiting until there is one."),(0,l.kt)("h4",{id:"returns-4"},"Returns"),(0,l.kt)("p",null,"A new socket instance. The socket can be used as per usual, with the exception of the starttls function being unavailable."),(0,l.kt)("h4",{id:"multitasking-3"},"Multitasking"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If there is an incoming client connection, this function returns immediately."),(0,l.kt)("li",{parentName:"ul"},"If there is not, it waits for one. Waiting means yielding if called inside a coroutine, and blocking otherwise.")),(0,l.kt)("h3",{id:"hasconnection"},(0,l.kt)("inlineCode",{parentName:"h3"},"hasconnection")),(0,l.kt)("p",null,"Checks if there is an incoming client connection. If this function returns true, the next call to ",(0,l.kt)("inlineCode",{parentName:"p"},"accept")," is guaranteed not to block or yield."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," socket "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"pluto:socket"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," l "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," socket"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"listen"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"80"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"or"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"error"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"Failed to bind TCP/80"'),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"while"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"not"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," l"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"hasconnection"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Visit http://localhost to break this loop")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"os"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"sleep"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(l"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"accept"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"()"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"recv"),(0,l.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"())"))))))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f18b32fa.ae9e5d5a.js b/assets/js/f18b32fa.ae9e5d5a.js new file mode 100644 index 00000000..7dc8c243 --- /dev/null +++ b/assets/js/f18b32fa.ae9e5d5a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[6890],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>F});var n=a(7294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var i=n.createContext({}),p=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(i.Provider,{value:t},e.children)},d="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,l=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(a),m=l,F=d["".concat(i,".").concat(m)]||d[m]||k[m]||o;return a?n.createElement(F,r(r({ref:t},c),{},{components:a})):n.createElement(F,r({ref:t},c))}));function F(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var o=a.length,r=new Array(o);r[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:l,r[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>r,default:()=>k,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var n=a(7462),l=(a(7294),a(3905));const o={sidebar_position:3},r=void 0,s={unversionedId:"Runtime Environment/Socket",id:"Runtime Environment/Socket",title:"Socket",description:"Must be included via require. This library is not available in WASM builds of Pluto.",source:"@site/docs/Runtime Environment/Socket.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Socket",permalink:"/docs/Runtime Environment/Socket",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Scheduler",permalink:"/docs/Runtime Environment/Scheduler"},next:{title:"URL",permalink:"/docs/Runtime Environment/URL"}},i={},p=[{value:"socket.connect",id:"socketconnect",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Multitasking",id:"multitasking",level:4},{value:"socket.listen",id:"socketlisten",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"socket.bind",id:"socketbind",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Socket Class",id:"socket-class",level:2},{value:"socket.send",id:"socketsend",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"socket.recv",id:"socketrecv",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Multitasking",id:"multitasking-1",level:4},{value:"socket.unrecv",id:"socketunrecv",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"socket.starttls",id:"socketstarttls",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Multitasking",id:"multitasking-2",level:4},{value:"socket.close",id:"socketclose",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Listener Class",id:"listener-class",level:2},{value:"accept",id:"accept",level:3},{value:"Returns",id:"returns-4",level:4},{value:"Multitasking",id:"multitasking-3",level:4},{value:"hasconnection",id:"hasconnection",level:3}],c={toc:p},d="wrapper";function k(e){let{components:t,...a}=e;return(0,l.kt)(d,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Must be included via ",(0,l.kt)("inlineCode",{parentName:"p"},"require"),". This library is not available in WASM builds of Pluto."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"socketconnect"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.connect")),(0,l.kt)("p",null,"Establishes a TCP connection."),(0,l.kt)("h4",{id:"parameters"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The host to connect to. Either an IPv4 or IPv6 address, or a domain name resolving to one."),(0,l.kt)("li",{parentName:"ol"},"The port to contact the host on.")),(0,l.kt)("h4",{id:"returns"},"Returns"),(0,l.kt)("p",null,"A socket instance on success. Nil on failure."),(0,l.kt)("h4",{id:"multitasking"},"Multitasking"),(0,l.kt)("p",null,"If called inside of a coroutine, this function yields. Otherwise, it blocks."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"socketlisten"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.listen")),(0,l.kt)("p",null,"Creates a new listener for the given port."),(0,l.kt)("h4",{id:"parameters-1"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The port to listen on.")),(0,l.kt)("h4",{id:"returns-1"},"Returns"),(0,l.kt)("p",null,"A listener instance on success. Nil on failure."),(0,l.kt)("hr",null),(0,l.kt)("h3",{id:"socketbind"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.bind")),(0,l.kt)("p",null,"A convenience function that wraps ",(0,l.kt)("inlineCode",{parentName:"p"},"socket.listen"),", automatically accepting new clients and spinning up a coroutine for them."),(0,l.kt)("h4",{id:"parameters-2"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"A ",(0,l.kt)("a",{parentName:"li",href:"Scheduler"},"scheduler")," instance."),(0,l.kt)("li",{parentName:"ol"},"The port to listen on."),(0,l.kt)("li",{parentName:"ol"},"The callback function that will be called in a new coroutine for each client socket.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { scheduler"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," socket } "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"*"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," sched "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"new"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"scheduler"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"socket"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"bind"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(sched"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"80"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," |"),(0,l.kt)("span",{parentName:"div",style:{color:"#FD971F",fontStyle:"italic"}},"s"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"| "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF",fontStyle:"italic"}},"->"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," content "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello, world!"')),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"send"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"HTTP/1.1 200 OK'),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"Connection: Close"),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'Content-Length: "'),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"..#"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"content"),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\r\\n\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},".."),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"content)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"sched"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"run"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()"))))),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"socket-class"},"Socket Class"),(0,l.kt)("p",null,"Socket instances are obtained by calling ",(0,l.kt)("inlineCode",{parentName:"p"},"socket.connect")," (client), or from a listener (server)."),(0,l.kt)("h3",{id:"socketsend"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.send")),(0,l.kt)("p",null,"Sends data on a socket."),(0,l.kt)("h4",{id:"parameters-3"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The socket instance."),(0,l.kt)("li",{parentName:"ol"},"The data to send.")),(0,l.kt)("h3",{id:"socketrecv"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.recv")),(0,l.kt)("p",null,"Receive data from a socket."),(0,l.kt)("h4",{id:"parameters-4"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The socket instance.")),(0,l.kt)("h4",{id:"returns-2"},"Returns"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If the socket is open: The oldest chunk of data received on the transport layer (TCP packet) or crypto layer (TLS record) as a string."),(0,l.kt)("li",{parentName:"ul"},"If the socket is closed: Nil.")),(0,l.kt)("h4",{id:"multitasking-1"},"Multitasking"),(0,l.kt)("p",null,"If a message is buffered, the function can return immediately. If not, it will yield if inside a coroutine, and block otherwise."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," socket "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:socket"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," socket"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"connect"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"google.com"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"80"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"s"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"send"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"GET / HTTP/1.1'),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"Host: google.com"),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\r\\n\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"recv"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"())"))))),(0,l.kt)("h3",{id:"socketunrecv"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.unrecv")),(0,l.kt)("p",null,"Pushes a chunk of data to the front of the receive buffer, making it oldest for the purposes of ",(0,l.kt)("inlineCode",{parentName:"p"},"socket.recv"),"."),(0,l.kt)("h4",{id:"parameters-5"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The socket instance."),(0,l.kt)("li",{parentName:"ol"},"The data to push.")),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," socket "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:socket"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," sock "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," socket"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"connect"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"google.com"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"80"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"sock"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"unrecv"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"World"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"sock"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"unrecv"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Hello"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(sock"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"recv"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e Hello")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(sock"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"recv"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()) "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e World"))))),(0,l.kt)("h3",{id:"socketstarttls"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.starttls")),(0,l.kt)("p",null,"Attempts to add the TLS crypto layer to the socket, making the transport layer a sole carrier for TLS traffic."),(0,l.kt)("h4",{id:"parameters-6"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The socket instance."),(0,l.kt)("li",{parentName:"ol"},"The host name of the intended remote. This may be the same as what was passed to ",(0,l.kt)("inlineCode",{parentName:"li"},"socket.connect"),". This name must be on the certificate that the remote will send.")),(0,l.kt)("h4",{id:"returns-3"},"Returns"),(0,l.kt)("p",null,"True on success. On failure, returns false and the socket is closed. If the socket is already using TLS, returns nil."),(0,l.kt)("h4",{id:"multitasking-2"},"Multitasking"),(0,l.kt)("p",null,"If called inside of a coroutine, this function yields. Otherwise, it blocks."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," socket "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:socket"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," socket"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"connect"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto-lang.org"'),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"443"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"assert"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(s"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"starttls"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto-lang.org"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Failed to establish secure connection."'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"s"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"send"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"GET / HTTP/1.1'),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"Host: pluto-lang.org"),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},"Connection: close"),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"\\r\\n\\r\\n"),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"while"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," data "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},":="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," s"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"recv"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(data)")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,l.kt)("h3",{id:"socketclose"},(0,l.kt)("inlineCode",{parentName:"h3"},"socket.close")),(0,l.kt)("p",null,"Closes a socket."),(0,l.kt)("h4",{id:"parameters-7"},"Parameters"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"The socket instance.")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"listener-class"},"Listener Class"),(0,l.kt)("p",null,"Listener instances are obtained by calling ",(0,l.kt)("inlineCode",{parentName:"p"},"socket.listen"),"."),(0,l.kt)("h3",{id:"accept"},(0,l.kt)("inlineCode",{parentName:"h3"},"accept")),(0,l.kt)("p",null,"Accepts an incoming client connection, waiting until there is one."),(0,l.kt)("h4",{id:"returns-4"},"Returns"),(0,l.kt)("p",null,"A new socket instance. The socket can be used as per usual, with the exception of the starttls function being unavailable."),(0,l.kt)("h4",{id:"multitasking-3"},"Multitasking"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If there is an incoming client connection, this function returns immediately."),(0,l.kt)("li",{parentName:"ul"},"If there is not, it waits for one. Waiting means yielding if called inside a coroutine, and blocking otherwise.")),(0,l.kt)("h3",{id:"hasconnection"},(0,l.kt)("inlineCode",{parentName:"h3"},"hasconnection")),(0,l.kt)("p",null,"Checks if there is an incoming client connection. If this function returns true, the next call to ",(0,l.kt)("inlineCode",{parentName:"p"},"accept")," is guaranteed not to block or yield."),(0,l.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,l.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,l.kt)("div",{parentName:"pre",className:"code-container"},(0,l.kt)("code",{parentName:"div"},(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," socket "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"require"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"pluto:socket"')),(0,l.kt)("div",{parentName:"code",className:"line"}),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," l "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," socket"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"listen"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"80"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},") "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"or"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"error"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"Failed to bind TCP/80"'),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"while"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"not"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," l"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"hasconnection"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"() "),(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Visit http://localhost to break this loop")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"os"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"sleep"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,l.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end")),(0,l.kt)("div",{parentName:"code",className:"line"},(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(l"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"accept"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"()"),(0,l.kt)("span",{parentName:"div",style:{color:"#9F570F"}},":"),(0,l.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"recv"),(0,l.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"())"))))))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f2f8d974.2d9cc4e9.js b/assets/js/f2f8d974.2d9cc4e9.js new file mode 100644 index 00000000..301a6f99 --- /dev/null +++ b/assets/js/f2f8d974.2d9cc4e9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[1044],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>v});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),p=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=p(a),u=r,v=m["".concat(s,".").concat(u)]||m[u]||d[u]||o;return a?n.createElement(v,l(l({ref:t},c),{},{components:a})):n.createElement(v,l({ref:t},c))}));function v(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=u;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[m]="string"==typeof e?e:r,l[1]=i;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var n=a(7462),r=(a(7294),a(3905));const o={sidebar_position:2},l=void 0,i={unversionedId:"Runtime Environment/Math",id:"Runtime Environment/Math",title:"Math",description:"This page documents the changes & additions to the math library in Pluto, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/Math.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Math",permalink:"/docs/Runtime Environment/Math",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"IO",permalink:"/docs/Runtime Environment/IO"},next:{title:"OS",permalink:"/docs/Runtime Environment/OS"}},s={},p=[{value:"math.isnan",id:"mathisnan",level:3},{value:"Parameters",id:"parameters",level:4},{value:"math.round",id:"mathround",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"math.atan2",id:"mathatan2",level:3}],c={toc:p},m="wrapper";function d(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This page documents the changes & additions to the ",(0,r.kt)("inlineCode",{parentName:"p"},"math")," library in Pluto, which is built on top of Lua 5.4's."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"mathisnan"},(0,r.kt)("inlineCode",{parentName:"h3"},"math.isnan")),(0,r.kt)("p",null,"Checks if a number is NaN."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The number to check.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," x "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"/"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"0")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(x "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"~="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," x) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"-- Lua way: Prove the variable is NaN because it is not equal to itself. Works, but unintuitive.")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"math"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"isnan"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(x))"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"mathround"},(0,r.kt)("inlineCode",{parentName:"h3"},"math.round")),(0,r.kt)("p",null,"Rounds a number to the nearest integer."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"The number to round.")),(0,r.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"math"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"round"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2.4"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 2")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"math"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},"."),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"round"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"("),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2.5"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},")) "),(0,r.kt)("span",{parentName:"div",style:{color:"#88846F"}},"--\x3e 3"))))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"mathatan2"},(0,r.kt)("inlineCode",{parentName:"h3"},"math.atan2")),(0,r.kt)("p",null,"An alias of ",(0,r.kt)("inlineCode",{parentName:"p"},"math.atan"),"."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f2f8d974.b4e43149.js b/assets/js/f2f8d974.b4e43149.js deleted file mode 100644 index 215b7d9e..00000000 --- a/assets/js/f2f8d974.b4e43149.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[1044],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>v});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var c=a.createContext({}),s=function(e){var t=a.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=s(e.components);return a.createElement(c.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=s(r),u=n,v=m["".concat(c,".").concat(u)]||m[u]||d[u]||o;return r?a.createElement(v,l(l({ref:t},p),{},{components:r})):a.createElement(v,l({ref:t},p))}));function v(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=u;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[m]="string"==typeof e?e:n,l[1]=i;for(var s=2;s{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>s});var a=r(7462),n=(r(7294),r(3905));const o={sidebar_position:2},l=void 0,i={unversionedId:"Runtime Environment/Math",id:"Runtime Environment/Math",title:"Math",description:"This page documents the changes & additions to the math library in Pluto, which is built on top of Lua 5.4's.",source:"@site/docs/Runtime Environment/Math.md",sourceDirName:"Runtime Environment",slug:"/Runtime Environment/Math",permalink:"/docs/Runtime Environment/Math",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"IO",permalink:"/docs/Runtime Environment/IO"},next:{title:"OS",permalink:"/docs/Runtime Environment/OS"}},c={},s=[{value:"math.isnan",id:"mathisnan",level:3},{value:"Parameters",id:"parameters",level:4},{value:"math.round",id:"mathround",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"math.atan2",id:"mathatan2",level:3}],p={toc:s},m="wrapper";function d(e){let{components:t,...r}=e;return(0,n.kt)(m,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"This page documents the changes & additions to the ",(0,n.kt)("inlineCode",{parentName:"p"},"math")," library in Pluto, which is built on top of Lua 5.4's."),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"mathisnan"},(0,n.kt)("inlineCode",{parentName:"h3"},"math.isnan")),(0,n.kt)("p",null,"Checks if a number is NaN."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The number to check.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," x "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"/"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"0")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(x "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"~="),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," x) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"-- Lua way: Prove the variable is NaN because it is not equal to itself. Works, but unintuitive.")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"math"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"isnan"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(x))"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"mathround"},(0,n.kt)("inlineCode",{parentName:"h3"},"math.round")),(0,n.kt)("p",null,"Rounds a number to the nearest integer."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"The number to round.")),(0,n.kt)("pre",{className:"shiki monokai",style:{backgroundColor:"#272822",color:"#F8F8F2"}},(0,n.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,n.kt)("div",{parentName:"pre",className:"code-container"},(0,n.kt)("code",{parentName:"div"},(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"math"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"round"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2.4"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 2")),(0,n.kt)("div",{parentName:"code",className:"line"},(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"math"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},"."),(0,n.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"round"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"("),(0,n.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2.5"),(0,n.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},")) "),(0,n.kt)("span",{parentName:"div",style:{color:"color: #88846F"}},"--\x3e 3"))))),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"mathatan2"},(0,n.kt)("inlineCode",{parentName:"h3"},"math.atan2")),(0,n.kt)("p",null,"An alias of ",(0,n.kt)("inlineCode",{parentName:"p"},"math.atan"),"."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f5454c7f.7e35e8fc.js b/assets/js/f5454c7f.7e35e8fc.js deleted file mode 100644 index 201f5e0a..00000000 --- a/assets/js/f5454c7f.7e35e8fc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9415],{3905:(e,t,o)=>{o.d(t,{Zo:()=>i,kt:()=>v});var r=o(7294);function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function l(e){for(var t=1;t=0||(a[o]=e[o]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(a[o]=e[o])}return a}var p=r.createContext({}),s=function(e){var t=r.useContext(p),o=t;return e&&(o="function"==typeof e?e(t):l(l({},t),e)),o},i=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},F=r.forwardRef((function(e,t){var o=e.components,a=e.mdxType,n=e.originalType,p=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),m=s(o),F=a,v=m["".concat(p,".").concat(F)]||m[F]||d[F]||n;return o?r.createElement(v,l(l({ref:t},i),{},{components:o})):r.createElement(v,l({ref:t},i))}));function v(e,t){var o=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var n=o.length,l=new Array(n);l[0]=F;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[m]="string"==typeof e?e:a,l[1]=c;for(var s=2;s{o.r(t),o.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>d,frontMatter:()=>n,metadata:()=>c,toc:()=>s});var r=o(7462),a=(o(7294),o(3905));const n={},l=void 0,c={unversionedId:"QoL Improvements/Generalized Iteration",id:"QoL Improvements/Generalized Iteration",title:"Generalized Iteration",description:"Pluto's virtual machine allows you to simply iterate over tables without having to explicitly call a function:",source:"@site/docs/QoL Improvements/Generalized Iteration.md",sourceDirName:"QoL Improvements",slug:"/QoL Improvements/Generalized Iteration",permalink:"/docs/QoL Improvements/Generalized Iteration",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Boolean Concatenation",permalink:"/docs/QoL Improvements/Boolean Concatenation"},next:{title:"Optional Parentheses",permalink:"/docs/QoL Improvements/Optional Parentheses"}},p={},s=[],i={toc:s},m="wrapper";function d(e){let{components:t,...o}=e;return(0,a.kt)(m,(0,r.Z)({},i,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Pluto's virtual machine allows you to simply iterate over tables without having to explicitly call a function:"),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"New Code"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"New Code"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"world"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"in"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(key"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value)")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,a.kt)("p",null,"When you omit the function from the loop preparation, ",(0,a.kt)("inlineCode",{parentName:"p"},"next")," is implicitly inserted. So, that code is identical to this:"),(0,a.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Old Code"},(0,a.kt)("div",{parentName:"pre",className:"code-title"},"Old Code"),(0,a.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,a.kt)("div",{parentName:"pre",className:"code-container"},(0,a.kt)("code",{parentName:"div"},(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"local"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," t "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"="),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," { "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"1"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"2"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #AE81FF"}},"3"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"hello"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #E6DB74"}},'"world"'),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," }")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"for"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," key"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"in"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"next"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(t) "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"do")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," "),(0,a.kt)("span",{parentName:"div",style:{color:"color: #66D9EF"}},"print"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}},"(key"),(0,a.kt)("span",{parentName:"div",style:{color:"color: #9F570F"}},","),(0,a.kt)("span",{parentName:"div",style:{color:"color: #F8F8F2"}}," value)")),(0,a.kt)("div",{parentName:"code",className:"line"},(0,a.kt)("span",{parentName:"div",style:{color:"color: #F92672"}},"end"))))),(0,a.kt)("p",null,"This is compatible with for-loop optimizations."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"The bytecode of this feature is not backwards-compatible with Lua.")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f5454c7f.dd77faa6.js b/assets/js/f5454c7f.dd77faa6.js new file mode 100644 index 00000000..95a2a0b0 --- /dev/null +++ b/assets/js/f5454c7f.dd77faa6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkpluto=self.webpackChunkpluto||[]).push([[9415],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>v});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),i=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},F=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),m=i(a),F=r,v=m["".concat(s,".").concat(F)]||m[F]||d[F]||o;return a?n.createElement(v,l(l({ref:t},c),{},{components:a})):n.createElement(v,l({ref:t},c))}));function v(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=F;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var i=2;i{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>p,toc:()=>i});var n=a(7462),r=(a(7294),a(3905));const o={},l=void 0,p={unversionedId:"QoL Improvements/Generalized Iteration",id:"QoL Improvements/Generalized Iteration",title:"Generalized Iteration",description:"Pluto's virtual machine allows you to simply iterate over tables without having to explicitly call a function:",source:"@site/docs/QoL Improvements/Generalized Iteration.md",sourceDirName:"QoL Improvements",slug:"/QoL Improvements/Generalized Iteration",permalink:"/docs/QoL Improvements/Generalized Iteration",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Boolean Concatenation",permalink:"/docs/QoL Improvements/Boolean Concatenation"},next:{title:"Optional Parentheses",permalink:"/docs/QoL Improvements/Optional Parentheses"}},s={},i=[],c={toc:i},m="wrapper";function d(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Pluto's virtual machine allows you to simply iterate over tables without having to explicitly call a function:"),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"New Code"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"New Code"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"'),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"world"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"in"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(key"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,r.kt)("p",null,"When you omit the function from the loop preparation, ",(0,r.kt)("inlineCode",{parentName:"p"},"next")," is implicitly inserted. So, that code is identical to this:"),(0,r.kt)("pre",{className:"shiki monokai with-title",style:{backgroundColor:"#272822",color:"#F8F8F2"},showlinenumbers:"true",title:"Old Code"},(0,r.kt)("div",{parentName:"pre",className:"code-title"},"Old Code"),(0,r.kt)("div",{parentName:"pre",className:"language-id"},"pluto"),(0,r.kt)("div",{parentName:"pre",className:"code-container"},(0,r.kt)("code",{parentName:"div"},(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"local"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," t "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"="),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," { "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"1"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"2"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#AE81FF"}},"3"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"hello"'),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#E6DB74"}},'"world"'),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," }")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"for"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," key"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"in"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"next"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(t) "),(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"do")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," "),(0,r.kt)("span",{parentName:"div",style:{color:"#66D9EF"}},"print"),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}},"(key"),(0,r.kt)("span",{parentName:"div",style:{color:"#9F570F"}},","),(0,r.kt)("span",{parentName:"div",style:{color:"#F8F8F2"}}," value)")),(0,r.kt)("div",{parentName:"code",className:"line"},(0,r.kt)("span",{parentName:"div",style:{color:"#F92672"}},"end"))))),(0,r.kt)("p",null,"This is compatible with for-loop optimizations."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The bytecode of this feature is not backwards-compatible with Lua.")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.67cba238.js b/assets/js/runtime~main.62324367.js similarity index 58% rename from assets/js/runtime~main.67cba238.js rename to assets/js/runtime~main.62324367.js index 15fcf291..af4690a6 100644 --- a/assets/js/runtime~main.67cba238.js +++ b/assets/js/runtime~main.62324367.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,f,d,b,c={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var f=t[e]={exports:{}};return c[e].call(f.exports,f,f.exports,r),f.exports}r.m=c,e=[],r.O=(a,f,d,b)=>{if(!f){var c=1/0;for(i=0;i=b)&&Object.keys(r.O).every((e=>r.O[e](f[o])))?f.splice(o--,1):(t=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[f,d,b]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var b=Object.create(null);r.r(b);var c={};a=a||[null,f({}),f([]),f(f)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((a=>c[a]=()=>e[a]));return c.default=()=>e,r.d(b,c),b},r.d=(e,a)=>{for(var f in a)r.o(a,f)&&!r.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,f)=>(r.f[f](e,a),a)),[])),r.u=e=>"assets/js/"+({53:"935f2afb",60:"2e9aabad",305:"1de72b33",394:"e0a19902",684:"5b3ce2d7",821:"ed6b6a43",1044:"f2f8d974",1155:"dd7a9681",2049:"5572491f",2427:"c459eb7d",2674:"0034903a",2704:"02389cdc",2797:"e4b9287f",2890:"871e1111",3466:"83156343",3577:"d037c94c",3583:"8e3b1f2f",3616:"c79b562e",3990:"e86e00b1",4043:"30212137",4195:"c4f5d8e4",4250:"ab6d44ab",4452:"1e33aabf",4456:"14fb3a76",4723:"2fe108ae",4889:"fe59fd14",5037:"abac9f7e",5049:"8d8f025d",5091:"30d00a07",5181:"413eb15f",5277:"ef218fa5",5283:"d81fa0e5",5461:"3eb63321",5498:"9f43fc60",5507:"8c64e7a6",5559:"8d7b091f",5881:"389ebece",5895:"853dab43",5922:"53537473",5992:"3ba36259",6038:"7efe30ee",6100:"3d1a2b43",6282:"ddde9844",6355:"186e575c",6442:"f1fa4584",6668:"04c377ef",6705:"54c50845",6771:"02b1ccdd",6890:"f18b32fa",6916:"e22c3ce6",7150:"1efc24b5",7196:"dfdf755e",7234:"9e2b6020",7437:"4dbc4eab",7508:"998c02ee",7846:"a87c8fc0",7906:"5c990b78",7918:"17896441",7920:"1a4e3797",8281:"d08eaa4d",8387:"bced9760",8400:"20639b4d",8452:"41586035",8544:"337e617e",8618:"6c9c7408",8870:"1f9adaf9",9101:"bd751cc9",9190:"1f68d8b4",9217:"5b328157",9279:"6d37f50b",9415:"f5454c7f",9432:"95939464",9514:"1be78505",9817:"14eb3368",9907:"e358ed3f",9956:"62afbdfe"}[e]||e)+"."+{53:"9f9d98d8",60:"6500e928",305:"c23251a9",394:"45e0ff03",684:"b5dae07e",821:"3c265500",1044:"b4e43149",1155:"4851897c",2049:"32110223",2427:"ded956e6",2674:"7a5ed1cc",2704:"d41af58c",2797:"7bc069a9",2890:"32fd18b2",3466:"235f58bc",3577:"f573cc81",3583:"23c8ba2e",3616:"a39a9e6f",3990:"7226691a",4043:"3fd95aa8",4195:"a83f9df5",4250:"fbfa218c",4452:"69259352",4456:"28bcf989",4723:"09a7a094",4889:"c142d4d6",4972:"50741f71",5037:"1a0ca031",5049:"56101e49",5091:"7428bbf0",5181:"2ed0e9d4",5277:"6ee09969",5283:"6207b642",5461:"b24a9554",5498:"016f9e2d",5507:"5ab6caff",5525:"286e47bc",5559:"0ff1cec4",5881:"ec3f72b0",5895:"c803efb4",5922:"e7627f3a",5992:"7d9db439",6038:"584baef8",6100:"02a7ba7d",6282:"62a350d6",6355:"869330e6",6442:"9dea4016",6668:"00768c95",6705:"7f6f2d87",6771:"ba8e064c",6890:"4b5f6d9d",6916:"abd69fd4",7150:"3b8993fa",7196:"ea9dab51",7234:"0694e1ac",7437:"87c01e61",7508:"31400400",7846:"f4853ce8",7906:"7e20f54b",7918:"4c851e46",7920:"b9fe7bb8",8281:"24b0fb51",8387:"400b90e5",8400:"221ec835",8443:"15145b3e",8452:"da392211",8544:"662ef69f",8618:"c61a343b",8870:"021386b0",9101:"693890f8",9190:"39e450b1",9217:"c3cc5a3e",9279:"2e4fbd62",9415:"7e35e8fc",9432:"3f5fef34",9514:"a62113cd",9817:"244d9ab5",9907:"922935f0",9956:"775b5179"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},b="pluto:",r.l=(e,a,f,c)=>{if(d[e])d[e].push(a);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var b=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),b&&b.forEach((e=>e(f))),a)return a(f)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={17896441:"7918",30212137:"4043",41586035:"8452",53537473:"5922",83156343:"3466",95939464:"9432","935f2afb":"53","2e9aabad":"60","1de72b33":"305",e0a19902:"394","5b3ce2d7":"684",ed6b6a43:"821",f2f8d974:"1044",dd7a9681:"1155","5572491f":"2049",c459eb7d:"2427","0034903a":"2674","02389cdc":"2704",e4b9287f:"2797","871e1111":"2890",d037c94c:"3577","8e3b1f2f":"3583",c79b562e:"3616",e86e00b1:"3990",c4f5d8e4:"4195",ab6d44ab:"4250","1e33aabf":"4452","14fb3a76":"4456","2fe108ae":"4723",fe59fd14:"4889",abac9f7e:"5037","8d8f025d":"5049","30d00a07":"5091","413eb15f":"5181",ef218fa5:"5277",d81fa0e5:"5283","3eb63321":"5461","9f43fc60":"5498","8c64e7a6":"5507","8d7b091f":"5559","389ebece":"5881","853dab43":"5895","3ba36259":"5992","7efe30ee":"6038","3d1a2b43":"6100",ddde9844:"6282","186e575c":"6355",f1fa4584:"6442","04c377ef":"6668","54c50845":"6705","02b1ccdd":"6771",f18b32fa:"6890",e22c3ce6:"6916","1efc24b5":"7150",dfdf755e:"7196","9e2b6020":"7234","4dbc4eab":"7437","998c02ee":"7508",a87c8fc0:"7846","5c990b78":"7906","1a4e3797":"7920",d08eaa4d:"8281",bced9760:"8387","20639b4d":"8400","337e617e":"8544","6c9c7408":"8618","1f9adaf9":"8870",bd751cc9:"9101","1f68d8b4":"9190","5b328157":"9217","6d37f50b":"9279",f5454c7f:"9415","1be78505":"9514","14eb3368":"9817",e358ed3f:"9907","62afbdfe":"9956"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(a,f)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)f.push(d[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var b=new Promise(((f,b)=>d=e[a]=[f,b]));f.push(d[2]=b);var c=r.p+r.u(a),t=new Error;r.l(c,(f=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var b=f&&("load"===f.type?"missing":f.type),c=f&&f.target&&f.target.src;t.message="Loading chunk "+a+" failed.\n("+b+": "+c+")",t.name="ChunkLoadError",t.type=b,t.request=c,d[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,f)=>{var d,b,c=f[0],t=f[1],o=f[2],n=0;if(c.some((a=>0!==e[a]))){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(o)var i=o(r)}for(a&&a(f);n{"use strict";var e,a,f,d,c,b={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var f=t[e]={exports:{}};return b[e].call(f.exports,f,f.exports,r),f.exports}r.m=b,e=[],r.O=(a,f,d,c)=>{if(!f){var b=1/0;for(i=0;i=c)&&Object.keys(r.O).every((e=>r.O[e](f[o])))?f.splice(o--,1):(t=!1,c0&&e[i-1][2]>c;i--)e[i]=e[i-1];e[i]=[f,d,c]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var c=Object.create(null);r.r(c);var b={};a=a||[null,f({}),f([]),f(f)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,r.d(c,b),c},r.d=(e,a)=>{for(var f in a)r.o(a,f)&&!r.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,f)=>(r.f[f](e,a),a)),[])),r.u=e=>"assets/js/"+({53:"935f2afb",60:"2e9aabad",305:"1de72b33",394:"e0a19902",684:"5b3ce2d7",821:"ed6b6a43",1044:"f2f8d974",1155:"dd7a9681",2049:"5572491f",2427:"c459eb7d",2674:"0034903a",2704:"02389cdc",2797:"e4b9287f",2890:"871e1111",3466:"83156343",3577:"d037c94c",3583:"8e3b1f2f",3616:"c79b562e",3990:"e86e00b1",4043:"30212137",4195:"c4f5d8e4",4250:"ab6d44ab",4452:"1e33aabf",4456:"14fb3a76",4723:"2fe108ae",4889:"fe59fd14",5037:"abac9f7e",5049:"8d8f025d",5091:"30d00a07",5181:"413eb15f",5277:"ef218fa5",5283:"d81fa0e5",5461:"3eb63321",5498:"9f43fc60",5507:"8c64e7a6",5559:"8d7b091f",5881:"389ebece",5895:"853dab43",5922:"53537473",5992:"3ba36259",6038:"7efe30ee",6100:"3d1a2b43",6282:"ddde9844",6355:"186e575c",6442:"f1fa4584",6668:"04c377ef",6705:"54c50845",6771:"02b1ccdd",6890:"f18b32fa",6916:"e22c3ce6",7150:"1efc24b5",7196:"dfdf755e",7234:"9e2b6020",7437:"4dbc4eab",7508:"998c02ee",7846:"a87c8fc0",7906:"5c990b78",7918:"17896441",7920:"1a4e3797",8281:"d08eaa4d",8387:"bced9760",8400:"20639b4d",8452:"41586035",8544:"337e617e",8618:"6c9c7408",8870:"1f9adaf9",9101:"bd751cc9",9190:"1f68d8b4",9217:"5b328157",9279:"6d37f50b",9415:"f5454c7f",9432:"95939464",9514:"1be78505",9817:"14eb3368",9907:"e358ed3f",9956:"62afbdfe"}[e]||e)+"."+{53:"9f9d98d8",60:"6500e928",305:"c23251a9",394:"45e0ff03",684:"0cb48930",821:"e04091f0",1044:"2d9cc4e9",1155:"d229647d",2049:"d83b8a9a",2427:"9b6af93c",2674:"7a5ed1cc",2704:"7c9a9332",2797:"f0bc8658",2890:"6b7e451c",3466:"0a7cfa6e",3577:"3d876123",3583:"c44c72dd",3616:"d096d5f8",3990:"b08f3f7e",4043:"3fd95aa8",4195:"a83f9df5",4250:"413f0394",4452:"5cbed597",4456:"28bcf989",4723:"5bba8398",4889:"c142d4d6",4972:"50741f71",5037:"1cf438e4",5049:"f58865f0",5091:"b19d7a7a",5181:"40ef8433",5277:"9d227dde",5283:"9cff45c9",5461:"cce17633",5498:"d877bf45",5507:"130a079e",5525:"286e47bc",5559:"7b883459",5881:"9835871c",5895:"c803efb4",5922:"e7627f3a",5992:"3095a301",6038:"2453841d",6100:"959e1c7f",6282:"96c49a2b",6355:"23979853",6442:"9dea4016",6668:"91852cdf",6705:"d7bad467",6771:"ba8e064c",6890:"ae9e5d5a",6916:"06332655",7150:"29850f78",7196:"ea9dab51",7234:"b2bd9a7d",7437:"010cb1bf",7508:"918ea713",7846:"6bab9a7c",7906:"7e20f54b",7918:"4c851e46",7920:"b9fe7bb8",8281:"e3397e81",8387:"38f82b3a",8400:"767a0ba1",8443:"15145b3e",8452:"7b46d7d7",8544:"662ef69f",8618:"5dfe8bcb",8870:"be26421f",9101:"7e88fe2c",9190:"39e450b1",9217:"c3cc5a3e",9279:"658c2143",9415:"dd77faa6",9432:"7a78f7f9",9514:"a62113cd",9817:"244d9ab5",9907:"7bcf7332",9956:"0bcdd719"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},c="pluto:",r.l=(e,a,f,b)=>{if(d[e])d[e].push(a);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var c=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),c&&c.forEach((e=>e(f))),a)return a(f)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={17896441:"7918",30212137:"4043",41586035:"8452",53537473:"5922",83156343:"3466",95939464:"9432","935f2afb":"53","2e9aabad":"60","1de72b33":"305",e0a19902:"394","5b3ce2d7":"684",ed6b6a43:"821",f2f8d974:"1044",dd7a9681:"1155","5572491f":"2049",c459eb7d:"2427","0034903a":"2674","02389cdc":"2704",e4b9287f:"2797","871e1111":"2890",d037c94c:"3577","8e3b1f2f":"3583",c79b562e:"3616",e86e00b1:"3990",c4f5d8e4:"4195",ab6d44ab:"4250","1e33aabf":"4452","14fb3a76":"4456","2fe108ae":"4723",fe59fd14:"4889",abac9f7e:"5037","8d8f025d":"5049","30d00a07":"5091","413eb15f":"5181",ef218fa5:"5277",d81fa0e5:"5283","3eb63321":"5461","9f43fc60":"5498","8c64e7a6":"5507","8d7b091f":"5559","389ebece":"5881","853dab43":"5895","3ba36259":"5992","7efe30ee":"6038","3d1a2b43":"6100",ddde9844:"6282","186e575c":"6355",f1fa4584:"6442","04c377ef":"6668","54c50845":"6705","02b1ccdd":"6771",f18b32fa:"6890",e22c3ce6:"6916","1efc24b5":"7150",dfdf755e:"7196","9e2b6020":"7234","4dbc4eab":"7437","998c02ee":"7508",a87c8fc0:"7846","5c990b78":"7906","1a4e3797":"7920",d08eaa4d:"8281",bced9760:"8387","20639b4d":"8400","337e617e":"8544","6c9c7408":"8618","1f9adaf9":"8870",bd751cc9:"9101","1f68d8b4":"9190","5b328157":"9217","6d37f50b":"9279",f5454c7f:"9415","1be78505":"9514","14eb3368":"9817",e358ed3f:"9907","62afbdfe":"9956"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(a,f)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)f.push(d[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var c=new Promise(((f,c)=>d=e[a]=[f,c]));f.push(d[2]=c);var b=r.p+r.u(a),t=new Error;r.l(b,(f=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var c=f&&("load"===f.type?"missing":f.type),b=f&&f.target&&f.target.src;t.message="Loading chunk "+a+" failed.\n("+c+": "+b+")",t.name="ChunkLoadError",t.type=c,t.request=b,d[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,f)=>{var d,c,b=f[0],t=f[1],o=f[2],n=0;if(b.some((a=>0!==e[a]))){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(o)var i=o(r)}for(a&&a(f);n Changelog | Pluto - +

Changelog

This page contains the changelogs from all releases of Pluto.

0.9.5

  • Fixed io.contents not returning an empty string for empty files on Windows
  • Fixed table.clear not resetting cached length
  • Fixed http.request allowing header values to contain CR and LF (CVE-2024-45597)
  • Fixed strings implicitly concatenating with each other
  • Fixed incorrect formatting with some instances of VM dumping
  • PHP build scripts now pass on additional arguments to the compiler

From Lua:

  • Fixed wrong code gen for indices with comparisons

0.9.4

  • Improved field-shadow warning to say which field is shadowed
  • Improved handing of parent keyword
  • Improved error message for if then
  • Fixed an 'else if' warning false-positive
  • Fixed compile-time concat sometimes causing a parse error
  • Fixed infinite loop with nested switch expressions when flow should go to default case
  • Fixed exception when raising argument type mismatch warning when expected type is a function
  • Fixed a compatibility issue with return case

Standard library:

  • Made string.replace binary-safe and faster
  • CaT module now supports the optional value encoding feature

0.9.3

  • Added a warning for '(' being used instead of '|' for pipe operator arguments
  • Improved error reporting when an invalid parent is given to 'extends'
  • Fixed extending a global class unexpectedly pushing _G
  • Fixed incorrect results when using 'not' on result of null coalescing operator
    • As a result of this fix, the null coalescing operator is now bytecode-compatible with Lua
  • Fixed parsing ambiguities with ternary expressions in switch cases

Standard library:

  • Fixed json.encode(json.decode(..., json.withnull + json.withorder)) producing unexpected artifacts
  • Fixed data corruption when json.decode is used on large data
  • Fixed insufficient TLS peer verification in HTTP library and socket.starttls in non-WASM builds (CVE-2024-32973)

0.9.2

This release fixes several regressions made in 0.9.1:

  • Fixed failing to compile on aarch64
  • Fixed method calls no longer working in ternary expressions even with parentheses
  • Fixed walrus operator no longer being usable within unary operator expressions

Furthermore, it improves the walrus operator in regards to disallowing UB and clarifying related error messages.

0.9.1

  • Improved try/catch
  • Improved parsing of for-as loops
  • Deprecated if expressions (if a then b else c) in favor of ternary expressions (a ? b : c)
  • Fixed instances of : starting method call when it should delimit ternary expression
  • Fixed unreachable-code triggering for non-constant values
  • Fixed repeat + continue being able to read uninitialized variables
  • Fixed break and continue possibly not closing upvalues
  • Fixed continue not working as expected when passing through switch statement
  • Fixed switch cases being able to read uninitialized variables
  • Fixed inconsistent behavior with safe navigtion method calls and multiple return values
  • Fixed walrus operator being able to cause UB or corrupt the stack
  • Fixed pipe operator possibly generating incorrect code

Huge thanks to @XmiliaH for reporting the majority of bugs fixed in this update and helping fix them.

0.9.0

  • Added $define statement
  • Added pipe operator (|>)
  • Added compound XOR operator (~=)
  • Added optional global keyword and 'implicit-global' warning
  • Added @fallthrough annotation and 'unannotated-fallthrough' warning
  • Added <nodiscard> function attribute and 'discarded-return' warning
  • Added 'field-shadow' warning
  • Lambdas can now have full bodies by starting with 'do' (e.g. |a| -> do return a end)
  • pluto_use can now also be used via @pluto_use in comments
  • new operator now also supports static 'new' function
  • Deprecated ** operator (use ^ instead)
  • Deprecated let statement (use local instead)
  • Deprecated const statement (use local with <const> or $define instead)
  • Deprecated <constexpr> attribute (replaced by $define statement)
  • Re-added compile-time concat optimization
  • Fixed switch cases being able to jump into the scope of a variable
  • Fixed being able to set nil as a default argument

Standard library:

  • Added '*' library
  • Added 'cat' library
  • Added 'http' library
  • Added 'socket' library
  • Added 'xml' library
  • Added 'bigint' class
  • Added 'scheduler' class
  • Added os.platform constant
  • Added range function
  • Added io.contents function
  • Added io.relative function
  • Added copying variants of existing functions (table.sorted, table.mapped, table.filtered, table.reversed, table.reordered)
  • Added table.size function
  • Added table.clear function
  • Added table.reduce, table.min, & table.max functions
  • Added table.find function
  • Added table.checkall function
  • Added coroutine.sleep function
  • Added crypto.generatekeypair function
  • Added crypto.encrypt & crypto.decrypt functions
  • Added crypto.sign & crypto.verify functions
  • Added crypto.sha1, crypto.sha384, & crypto.sha512 functions
  • Added crypto.adler32 function
  • Added url.parse function
  • Added math.round function
  • json.encode now supports __order for objects
  • json.decode now has an optional flags parameter, they can be combined via binary OR
    • json.withnull makes it decode JSON nulls as json.null instead of nil
    • json.withorder makes it produce __order field for objects
  • coroutines/threads now have a metatable by default
  • base64.encode & base32.encode changed padding parameter's default value from false to true (base64.urlencode is unchanged)
  • Fixed crypto.fnv1 & crypto.fnv1a producing incorrect hashes for non-ASCII strings

CLI:

  • Added '-c' flag to pluto & plutoc to enable compatibility mode

For integrators:

  • Added PLUTO_READ_FILE_HOOK & PLUTO_WRITE_FILE_HOOK
  • Added PLUTO_HTTP_REQUEST_HOOK
  • Removed PLUTO_USE_THROW as we now default to using C++ exceptions for Lua errors to avoid breaking RAII semantics. You can still specify LUA_USE_LONGJMP if you want long jumps.

0.8.2

  • Added variable scoping warnings to switch statements to highlight code that will break in 0.9.0
  • Improved some error messages
  • Fixed base32 & base64 functions not being binary-safe
  • Removed compile-time concat optimization because it could produce incorrect results

0.8.1

  • Added a specialized error message for local class = etc
  • 'exportvar' now prefixes function bytecode with 'load'
  • Improved code generation for switch blocks
  • Improved "possibly unwanted function call" warning
  • Fixed dumpvar & exportvar not handling recursion of sub-tables
  • Fixed assert.equal & assert.nequal ignoring extra fields in value2
  • Fixed 'until' possibly using a variable from wrong scope due to 'continue'
  • Fixed var-shadow warning for named vararg being raised on the wrong line

For integrators:

  • Added PLUTO_MEMORY_LIMIT
  • Added PLUTO_NO_DEBUGLIB
  • Added PLUTO_NO_COROLIB

For a more comprehensive overview of the changes, take a look at the commit log.

0.8.0

  • Added switch expressions
  • Added shorthand fallthrough syntax for switch statement & expression, e.g. case 1, 2: ...
  • Added try...catch statement
  • Added spaceship operator (<=>)
  • Added safe navigation for method calls: nilable_inst?:method(), inst:nilable_method?(), nilable_inst?:nilable_method?()
  • Added optional 'const' keyword as shorthand for local ... <const> [= ...], enabled with pluto_use const.
  • Added pluto_use "VERSION+"
  • Tables now have a metatable by default ({ __index = _G.table }).
  • Added '!' as an alias for 'not'
  • Added 'private' modifier for class fields
  • Improved 'class' and 'extends' to support indexed names
  • Improved 'instanceof' to be usable with more complex expressions
  • export now works in all scopes, not just the main body
  • Updated in operator on tables to check values instead of keys
  • \{ is now a valid escape sequence (for interpolated strings)
  • Fixed to-be-closed variables not working in switch cases
  • Fixed 'new' not working as expected if it was disabled by the environment and re-enabled by 'pluto_use'
  • Fixed 'enum class' not incrementing enumerator values
  • Fixed not being able to use expressions such as increment in enum without parentheses
  • Added compile-time concat optimization

Warnings:

  • Added warning for local attributes used without '<' ... '>'
  • Now propagating types for global variables so when their value is assigned to something, mismatches can be detected.
  • Added optional global-shadow warning which is like var-shadow but for globals that are especially vulnerable to obscure shadowing bugs (to prevent excessive annoyance).
    • These globals include: arg,string, and table. Integrators can change this via PLUTO_COMMON_GLOBAL_NAMES
    • Global shadow warnings do not apply to localization optimization (i.e, local table = table)
  • var-shadow has been improved to check more enclosing scopes
  • Improved unreachable-code
  • Fixed var-shadow warning for locals used in switch cases despite break
  • Added optional non-portable-code, non-portable-bytecode, and non-portable-name warning types
  • Warnings can now be promoted to errors, e.g. @pluto_warnings error-all

Standard library:

  • Soup is now always linked in, obsoleting _PSOUP
  • Added assertion library (see here for more preliminary detail)
  • Added url library (encode & decode)
  • Added exception class
  • Added vector3 class
  • Added dumpvar & exportvar
  • Added string.truncate
  • Added string.replace — a slightly faster, but mostly more straightforward alternative to gsub.
    • Most notably, not burdened by MAX_CAPTURES
  • Added string.formatint (supports any BigInt impl that can offer the user a string representation)
    • Also supports any grouping & any separator without concerning locale.
  • Added table.filter
  • Added table.map
  • Added table.reverse
  • Added table.reorder
  • Added io.currentdir
  • Added io.part
  • Added io.writetime
  • Added math.isnan
  • Added compareversions
  • Added wcall
  • Added math.atan2 as an alias for math.atan
  • Added json.null
  • io.absolute now has an optional argument to request a canonicalized absolute path
  • Updated string.rfind to accept Lua patterns
  • Renamed io.copyto to io.copy
  • Renamed base64.url_encode & base64.url_decode to base64.urlencode & base64.urldecode
  • Deprecated string.find_first_of & string.find_first_not_of in favor of string.find
  • Deprecated string.find_last_of & string.find_last_not_of in favor of string.rfind
  • Deprecated string.lfind in favor of string.find
  • Deprecated crypto.hexdigest in favor of string.format
  • Modified require
    • Prioritizes local files now to ensure compatibility. Added require("pluto:libname") to explicitly request pluto libraries if ever needed (normal still works for pluto libraries, we just check for local files first).
  • Removed base58

For integrators:

  • Added PLUTO_NO_FILESYSTEM - disables all filesystem access (for sandboxing).
  • Added PLUTO_WARN_NON_PORTABLE_CODE
  • Added PLUTO_WARN_NON_PORTABLE_BYTECODE
  • Added PLUTO_WARN_NON_PORTABLE_NAME
  • Added PLUTO_NO_BINARIES - disables all dll/so/c module loading (for sandboxing)
  • Added luaG_addsrcinfo

Far more information can be found at our documentation: https://pluto-lang.org/

0.7.4

  • Fixed unexpected behavior when using a ternary expression inside of an interpolated string
  • Fixed table.contains returning 0 instead of the actual key for non-integer key types
  • Fixed REPL not recognizing multi-line statements
  • Fixed Pluto-injected code corrupting bytecode

For integrators:

  • Added PLUTO_LOADCLIB_HOOK

0.7.3

  • Updated error semantics of os.remove & os.rename to match Lua's again (return false instead of raising error), Pluto's 'io' versions of these functions remain unchanged
  • Fixed extends not copying over metamethods
  • Fixed "memory allocation error: block too big" when parsing --[[]]
  • Fixed allowing function calls to primitives, causing ambiguities with exprstat after assignment
  • Fixed string.upper & string.lower delimiting on '\0'
  • Some other improvements and bugfixes

0.7.2

  • String interpolation now allows nested strings
  • Improved "unreachable code" warning
  • Improved some error messages
  • Fixed string interpolation not working with string call syntax
  • Fixed rare issues with 'new', 'extends' and 'instanceof' operators

0.7.1

  • Fixed string interpolation not working with single-quoted strings after 0.7.0
  • Fixed os.sleep disregarding execution time limit
  • Fixed scripts being able to go past execution time limit with coroutines

0.7.0

  • Added table destructuring (local '{' NAME [= FIELD][, ...] '}' '=' TABLE)
  • Added array destructuring (local '[' NAME[, ...] ']' '=' TABLE)
  • Added pluto_use <* | version | token> [= false] to toggle non-compatible keywords
  • Added pluto_use let [= false] to toggle 'let' alias for 'local'
  • Added ++ statement
    • Also supports ++t.prop
  • Added constructor promotion
  • Added compile-time conditionals
  • Improved class expression & statement
    • Now supports property declaration without value
    • Now supports type hints (currently without warnings)
    • Now supports access modifiers (currently without warnings or errors)
    • Can now optionally use 'begin' before body
  • Improved string interpolation to support any expression, not just variable names
  • Improved type hints to support alternatives, e.g. string|int
  • Named arguments may now be used in conjunction with positional arguments
  • Improved 'new' expression to support direct member access into the table it created, e.g. print(new Human("John").name)
  • 'new' may now also be used as a statement
  • Fixed loading of precompiled code from files with non-Latin path on Windows
  • Fixed behavior of 'in' expression when used on a temporary table

Out-of-the-box Compatibility:

  • 'parent' may now be overwritten via local or parameter name
  • All reserved identifiers can now be used with shorthand table syntax and goto

Standard library:

  • Added coroutine.xresume

For integrators:

  • Added PLUTO_USE_LET

More detailed documentation can be found here.

0.6.3

  • Defaults arguments now produce Lua-compatible bytecode
  • Fixed default arguments not working for methods
  • Fixed named arguments, etc. not working for upvalue functions
  • Fixed 'in' expression for when right-hand operand is nested table
  • Fixed 'in' expression being too greedy in consuming righthand operand

For integrators:

  • Added PLUTO_LUA_LINKABLE

0.6.2

  • Optional Parentheses now works for table types and with chained "suffix expressions"
  • Fixed new overwriting user-defined __index
  • Fixed infinite recursion with multi-level parent calls
  • Fixed some other small issues

Performance:

  • Optimized lua_insert, lua_remove, & lua_replace (Optimization by @gottfriedleibniz)
  • Optimized luaO_ceillog2 (Inspired by @gottfriedleibniz)
  • Enabled Lua's jump table for clang build as well
  • Fixed a VM performance regression introduced by Pluto

0.6.1

  • Improved suggestions (for when using plutoc with the language server)
  • Optimized switch statement code generation (now omits cases leading to default case)
  • Fixed producing syntax error when 'case' or 'default' is used outside of switch
  • Fixed using 'export' outside of global scope not producing an error
  • Fixed some confusing error messages
  • Pulled in the latest Lua changes so some Lua bugs are now fixed

0.6.0

  • Added <constexpr> attribute to force locals to be compile-time constants
  • Added $expr syntax for compile-time evaluation of select functions
  • Added export [NAME=VALUE | function | class] syntax
  • Added named arguments (name=value in funcargs)
  • Added named varargs (...NAME), automatically puts the varargs into a table with the given name
  • A subset of Soup is now vendored with Pluto so standard library features that rely on it should now be more viable
  • Removed deprecated "pluto_case" and "pluto_default" keywords
  • Removed when statement

Enums:

  • Added ENUM.ENUMERATOR syntax for named enums
    • Added ENUM CLASS NAME ... syntax to force usage of this syntax
  • Added enum reflection for named enums (:names(), :values(), :kvmap(), :vkmap())

Object-oriented programming:

  • Added new TABLE(...) syntax (creates new table, sets TABLE as its metatable + index, calls `:construct(...)` if exists)
  • Added 'class' statement & expression (similar to table but without need for ',' or ';' after properties and functions)
    • 'class' and 'local class' statements also support extends NAME which sets parent property and metatable with index
    • Added static function NAME for use within table constructor/class definition (equal to NAME = function)
  • Added 'parent' expression
    • parent.PROP -> self.__parent.PROP
    • parent:METHOD(...) -> self.__parent.METHOD(self, ...)
  • Added TABLE instanceof METATABLE operator

Type hints:

  • Added 'int' & 'float' type hints (more restrictive than 'number')
  • Added 'void' type hint for function return type

Standard library:

  • Added utonumber, utostring, & string.uformat
  • Added instanceof(TABLE, METATABLE)

For integrators upgrading to Pluto 0.6.0:

  • Consider defining PLUTO_COMPATIBLE_NEW, PLUTO_COMPATIBLE_CLASS, PLUTO_COMPATIBLE_PARENT & PLUTO_COMPATIBLE_EXPORT so 'new', 'class', 'parent' & 'export' will not be reserved keywords just yet, instead 'pluto_new', 'pluto_class', 'pluto_parent' & 'pluto_export' can be used.

More detailed documentation can be found here.

0.5.4

  • Default arguments now support tables
  • Pluto now supports building with C ABI so you can replace Lua's shared library with Pluto's without needing to change the program
  • Fixed return before case or default causing a syntax error
  • Fixed access violation on lua_close with strings as default parameters

0.5.3

  • Default arguments now support compile-time constant variables, unary -, and pseudo-unary +
  • Re-added os.remove & os.rename because they originated in Lua and should not have been removed
  • Fixed some instances of errors not providing a code snippet and reporting the wrong line
  • Fixed enumerators being limited to 32-bit values
  • Fixed warning disable/enable being global-only
  • Removed if-goto optimisation due to various edge cases where goto is not executed

0.5.2

  • Enum statement: Now supports compile-time constant variables when setting value
  • Fixed require, dofile, etc. not taking UTF-8 encoded paths on Windows
  • Fixed pluto & plutoc not being able to execute files with foreign names on Windows

0.5.1

  • Enum Statement: Now supports unary - and pseudo-unary + when setting value
  • Replaced locals limit with registers limit so you can have more compile-time constants
  • Fixed Pluto's IO functions not taking UTF-8 encoded paths
  • Fixed UB when emitting unfinished string error, possibly resulting in an access violation

0.5.0

  • Added "for ITERABLE as VALUE" loop
  • Added $-strings (string interpolation)
  • Added prefix ++ operator
  • Added support for binary number literals.
  • Added C-style enums
  • Added _PSOUP global
  • Updated package.path to look for .pluto files in working directory by default
  • Deprecated "pluto_case" and "pluto_default" (now "case" and "default", respectively)
  • Removed what was deprecated in 0.4.0 (sleep -> os.sleep, os.remove -> io.remove, os.rename -> io.rename)
  • Added execution time limit (optional, must be enabled in luaconf.h)
  • Added content moderation

Standard Library:

  • Added io.makedirs

Standard Library (Soup):

  • Added base64
  • Added base58
  • Added base32
  • Added json

0.4.5

  • Improved wording of some warning & error messages
  • Fixed excessive "duplicate local declaration" warnings
  • Cherry-picked some Lua commits, so the following Lua bugs are now fixed:
    • 'break' may not properly close variable in a 'for' loop
    • error message in 'table.remove'
    • 'utf8.codes' accepts spurious continuation bytes
    • Negation in constant folding of '>>' may overflow
    • stack overflow with nesting of coroutine.close

0.4.4

  • Added math.rand as an alias for math.random
  • Changed unknown type hint to be warning instead of error
  • Reverted table.insert optimation due to unexpected behavior
  • Some minor tweaks

0.4.3

  • Improved most error messages, and vastly improved the internal code for them.
  • These reserved tokens can be used as identifiers outside of their functional context: default, case
  • Optimized the performance of table.insert. Roughly 3x faster, but still slightly slower than t[#t + 1]
  • Pluto can now be built using Sun.

0.4.2

  • Fixes a regression introduced in Pluto 0.4.1 that prevented the walrus operator from working within lambda functions that are passed as function arguments

0.4.1

  • Updated lexer to tokenise in a separate pass
    • This fixes Pluto's error messages sometimes not showing the full line
  • Disallowed use of the walrus operator within a function call because it was found to be more janky than expected

0.4.0

Additions:

  • Walrus Operator
  • Default parameters for functions.
  • New standard library: lcryptlib, for various hash algorithms and cryptographic PRNGs.
  • New warnings:
    • Unreachable code.
    • Too many function arguments.

Improvements:

  • Switch case may now use variables.
  • Shorthand ternary syntax from C/C++.
  • Warnings can be configured with comments.
  • Improved performance of some common arithmetic algorithms.
  • VM Dumping has been rewritten for superb runtime detail on all opcodes, their arguments, their results, etc.
  • string.upper & string.lower take a second parameter indicating a specific index to change. Absence of this parameter preserves default behavior.

0.3.2

Improvements:

  • io.copyto will now overwrite existing files instead of throwing an exception.
  • Improve error handling of other exception-prone IO functions.

0.3.1

Bugfix:

  • String.split would previously invoke an infinite loop when an empty string is used as the delimiter.

0.3.0

Additions:

  • Inlined method creation.
  • STR in STR expressions.
  • KEY in INDEXABLE expressions.
  • Generalized iteration, no need for pairs.
  • io.listdir
  • Reserved keywords as valid fields.
  • Null-coalescing operator (w/ compound operator).
  • continue N & break N for manipulating outer loops.
  • Optional type-hinting, with parser warnings.
  • Safe accessor navigation, to avoid "attempt to index nil" errors for deeply nested fields.

Changes:

  • table.contains now returns an index if found and nil otherwise (previously returned true or false).

Improvements:

  • Switch no longer has syntactic restrictions
  • Greater switch performance

Documentation for the new changes can be found here.

0.2.2

  • Fixes a bug with the continue keyword

0.2.1

  • Added VM Dump
  • Implemented long jump optimisation

0.2.0

  • Added compile-time warnings for duplicate local declarations
  • Added optional ANSI color sequences in various error & warning messages
  • Added support for ternary expressions
  • Added continue statement
  • Added Table Freezing / Immutability
  • Added Switch/Case statements
  • Added user_data to global_State
  • Added !=
  • Added compatibility mode
  • Added table.contains
  • Added new time functions to os api
  • Added negative string indexing
  • Added compound concatenation operator
  • Added new string functions
  • Added portable jumptable implementation that can be optionally enabled
  • Added REPEAT .. WHEN loop support
  • Added new IO library functions
  • Added _PVERSION
  • Implemented table length cache optimisation (2x speedup)
  • Implemented optional parentheses around string literals for method invocation
  • Increased local variable limit from 200 to 249
  • Rebased with Lua for latest bugfixes

0.1.0

Initial version.

Notable features:

  • Lambda expressions
  • Arbitrary character insertion in numeral literals
  • Many compound operators
  • ** exponent operator
- + \ No newline at end of file diff --git a/docs/Compatibility.html b/docs/Compatibility.html index df814f86..f458b180 100644 --- a/docs/Compatibility.html +++ b/docs/Compatibility.html @@ -4,13 +4,13 @@ Compatibility | Pluto - +
-

Compatibility

Pluto aims to be source- and bytecode-compatible with existing Lua code such that it can simply be used as a drop-in replacement for Lua, and Lua modules can simply be used in Pluto codebases. In the vast majority of cases, we do succeed, but there are a few things to be aware of.

New Keywords

Pluto adds the following reserved tokens:

  • switch
  • continue
  • enum
  • new
  • class
  • parent
  • export
  • try
  • catch

Which means you can't use them as identifiers. They can still be used with short-hand table indexes and goto labels because Pluto allows reserved keywords to be used in those contexts.

Mitigations

  • For Integrators: Check your luaconf.h file to find the relevant macros under the "Compatibility" heading.
  • For Scripters: Use pluto_use in the source files. -- @pluto_use * = false to simply disable all incompatible keywords.
  • For Users: Pass the -c flag to pluto or plutoc.

The following sections will go more in-depth on source-level mitigations (for scripters).

Compile-time Configuration (pluto_use)

You can change the meaning of Pluto's reserved tokens at any point in your scripts using the --@pluto_use comment or pluto_use statement.

For example, to disable all non-compatible keywords except for switch:

pluto
-- @pluto_use * = false, switch

It is also possible to specify a version number, which is a shorthand for the keywords available at that version:

  • "0.2.0" corresponds to * = false, switch, continue
  • "0.5.0" corresponds to * = false, switch, continue, enum
  • "0.6.0" corresponds to * = false, switch, continue, enum, new, class, parent, export
  • "0.8.0" corresponds to * = false, switch, continue, enum, new, class, parent, export, try, catch

So, writing a portable script that only makes use of Pluto 0.8.0's features requires this at the beginning:

pluto
pluto_use "0.8.0"

This feature also supports quick encompassing of optional features. So, instead of:

pluto
pluto_use "0.8.0", global

You can use a '+' after the version number to also enable all of the optional features. As of 0.9.0, the only optional feature is explicit globals (global).

pluto
pluto_use "0.9.0+"
-- The same as pluto_use "0.9.0", global

For module developers and scripts which may be used in future versions of Pluto, we recommend you use pluto_use for two reasons:

  • Portability. This will override the compatibility mode settings compiled into Pluto so your script will be parsed identically in all Pluto environments.
  • Proactive compatibility. Any keywords added by future versions of Pluto will also be put in compatibility mode by these statements, so in the off-chance your script uses a future reserved keyword as a variable name, it would still parse as you intended when you wrote it.

Compatible Keywords

Another way of using Pluto's features regardless of compatibility mode is by prefixing the keyword with pluto_. For example, switch becomes pluto_switch. These Compatibility Mode variants will always be valid, even when Compatibility Mode is disabled.

These are what they look like:

  • pluto_switch
  • pluto_continue
  • pluto_enum
  • pluto_new
  • pluto_class
  • pluto_parent
  • pluto_export
  • pluto_try
  • pluto_catch

Default Table Metatable

This is a feature in Pluto that, by itself, is a benign QoL improvement for developers. However, in combination with our added standard library functions like table.min, it can be an unexpected semantic change:

pluto
local function roll(opts)
return math.random(opts.min or 1, opts.max or 100)
end
print(roll{ max = 10 })
pluto: test.pluto:2: bad argument #1 to 'random' (number expected, got function)
stack traceback:
[C]: in function 'math.rand'
test.pluto:2: in local 'roll'
test.pluto:4: in main chunk

Integrators can disable this feature by defining the PLUTO_NO_DEFAULT_TABLE_METATABLE macro in their luaconf.h or build config, to aid in a smooth transition, should scripts in their ecosystem require it.

Scripters are advised to use rawget and/or type to better codify their expectations. For example, the example above seems to care only about providing fallback values and not at all about type-checking, so rawget would be an excellent fit for it:

pluto
local function roll(opts)
return math.random(rawget(opts, "min") or 1, rawget(opts, "max") or 100)
end
print(roll{ max = 10 })
- +

Compatibility

Pluto aims to be source- and bytecode-compatible with existing Lua code such that it can simply be used as a drop-in replacement for Lua, and Lua modules can simply be used in Pluto codebases. In the vast majority of cases, we do succeed, but there are a few things to be aware of.

New Keywords

Pluto adds the following reserved tokens:

  • switch
  • continue
  • enum
  • new
  • class
  • parent
  • export
  • try
  • catch

Which means you can't use them as identifiers. They can still be used with short-hand table indexes and goto labels because Pluto allows reserved keywords to be used in those contexts.

Mitigations

  • For Integrators: Check your luaconf.h file to find the relevant macros under the "Compatibility" heading.
  • For Scripters: Use pluto_use in the source files. -- @pluto_use * = false to simply disable all incompatible keywords.
  • For Users: Pass the -c flag to pluto or plutoc.

The following sections will go more in-depth on source-level mitigations (for scripters).

Compile-time Configuration (pluto_use)

You can change the meaning of Pluto's reserved tokens at any point in your scripts using the --@pluto_use comment or pluto_use statement.

For example, to disable all non-compatible keywords except for switch:

pluto
-- @pluto_use * = false, switch

It is also possible to specify a version number, which is a shorthand for the keywords available at that version:

  • "0.2.0" corresponds to * = false, switch, continue
  • "0.5.0" corresponds to * = false, switch, continue, enum
  • "0.6.0" corresponds to * = false, switch, continue, enum, new, class, parent, export
  • "0.8.0" corresponds to * = false, switch, continue, enum, new, class, parent, export, try, catch

So, writing a portable script that only makes use of Pluto 0.8.0's features requires this at the beginning:

pluto
pluto_use "0.8.0"

This feature also supports quick encompassing of optional features. So, instead of:

pluto
pluto_use "0.8.0", global

You can use a '+' after the version number to also enable all of the optional features. As of 0.9.0, the only optional feature is explicit globals (global).

pluto
pluto_use "0.9.0+"
-- The same as pluto_use "0.9.0", global

For module developers and scripts which may be used in future versions of Pluto, we recommend you use pluto_use for two reasons:

  • Portability. This will override the compatibility mode settings compiled into Pluto so your script will be parsed identically in all Pluto environments.
  • Proactive compatibility. Any keywords added by future versions of Pluto will also be put in compatibility mode by these statements, so in the off-chance your script uses a future reserved keyword as a variable name, it would still parse as you intended when you wrote it.

Compatible Keywords

Another way of using Pluto's features regardless of compatibility mode is by prefixing the keyword with pluto_. For example, switch becomes pluto_switch. These Compatibility Mode variants will always be valid, even when Compatibility Mode is disabled.

These are what they look like:

  • pluto_switch
  • pluto_continue
  • pluto_enum
  • pluto_new
  • pluto_class
  • pluto_parent
  • pluto_export
  • pluto_try
  • pluto_catch

Default Table Metatable

This is a feature in Pluto that, by itself, is a benign QoL improvement for developers. However, in combination with our added standard library functions like table.min, it can be an unexpected semantic change:

pluto
local function roll(opts)
return math.random(opts.min or 1, opts.max or 100)
end
print(roll{ max = 10 })
pluto: test.pluto:2: bad argument #1 to 'random' (number expected, got function)
stack traceback:
[C]: in function 'math.rand'
test.pluto:2: in local 'roll'
test.pluto:4: in main chunk

Integrators can disable this feature by defining the PLUTO_NO_DEFAULT_TABLE_METATABLE macro in their luaconf.h or build config, to aid in a smooth transition, should scripts in their ecosystem require it.

Scripters are advised to use rawget and/or type to better codify their expectations. For example, the example above seems to care only about providing fallback values and not at all about type-checking, so rawget would be an excellent fit for it:

pluto
local function roll(opts)
return math.random(rawget(opts, "min") or 1, rawget(opts, "max") or 100)
end
print(roll{ max = 10 })
+ \ No newline at end of file diff --git a/docs/Editor Integration.html b/docs/Editor Integration.html index 930ca09d..16f5ad0d 100644 --- a/docs/Editor Integration.html +++ b/docs/Editor Integration.html @@ -4,13 +4,13 @@ Editor Integration | Pluto - +

Editor Integration

Although Pluto can theoretically be used with Lua-based tooling, we provide specialized support for .pluto files to enhance your coding experience with features such as:

  • Syntax Highlighting
  • Snippets — e.g. for when you type "fun" and press tab
  • Comment Information — for editor features such as "Toggle Comment", "Toggle Block Comment"
  • Indentation Rules — for editor features such as "Reindent Lines"
  • Build Systems — run & lint scripts directly in your editor with Ctrl+(Shift+)B in Sublime Text or Ctrl+Shift+P in VS Code

Installation

The installation process depends on your editor:

  • VS Code: Search for calamity-inc.pluto-syntax-highlighting in the marketplace and press "Install."
  • Sublime Text: Open the command palette (Ctrl+Shift+P), select "Package Control: Install Package", search for "Pluto", and press enter.
  • Visual Studio: Click on Extensions > Manage Extensions. In the Online section, search for calamity-inc.pluto-vsix and press "Download."
  • IntelliJ: Clone our syntax highlighting repository and add the tmbundle folder to Editor > TextMate Bundles.

If your editor is not listed here, check if it is able to load TextMate bundles, in which case you should be able to do something similar to the IntelliJ instructions above.

- + \ No newline at end of file diff --git a/docs/For Integrators.html b/docs/For Integrators.html index 994a0208..f9a48998 100644 --- a/docs/For Integrators.html +++ b/docs/For Integrators.html @@ -4,13 +4,13 @@ For Integrators | Pluto - +
-

For Integrators

The luaconf.h in Pluto provides various battle-tested mechanisms for locking down your Pluto environments. In this article, we've documented some of those. If you are an integrator who needs help configuring any of this, or who wants us to implement another mechanism, feel free to contact us on GitHub.

Content Moderation

Compiled Code

You can disable execution of compiled bytecode by defining PLUTO_DISABLE_COMPILED in luaconf.h or your build config.

Custom Module Filters

You may already have filters before passing scripts to run onto Pluto, but mechanisms such as dofile and require may be used to bypass them. To help you combat this, Pluto provides PLUTO_LOADFILE_HOOK. For example, if you set it to ContmodOnLoadfile in luaconf.h or your build config, you only need to define that function somewhere in your code, like this:

cpp
extern "C" bool ContmodOnLoadfile(const char* filename) {
return !isCodeProhibited(soup::string::fromFile(filename));
}

This requires you to use Pluto as a static library, as otherwise this linking relationship won't work.

Prevent Loading of Binary Modules

The PLUTO_NO_BINARIES macro can be defined to totally eliminate package.loadlib and any DLL/SO loading capability from the require function. This is helpful because package.loadlib can be used to bypass sandbox restrictions by manually loading symbols from a Lua/Pluto library, and the require function can load any Lua/Pluto C Module which may or may not provide dangerous functions. This is generally vital for any sandbox. This mechanism cannot be bypassed, since it configures Pluto to compile without support for any of the aforementioned features.

Execution Time Limit

To aid environments that have to be sandboxed, Pluto provides Execution Time Limit (ETL), which can be enabled by defining PLUTO_ETL_ENABLE in luaconf.h or your build config.

By default, ETL allows code to run for a total of 1 ms (1.000.000 nanos). This can be changed by overwriting PLUTO_ETL_NANOS.

Note that this is a hammer solution. If you only want to prevent stupid mistakes, Infinite Loop Prevention is a far better tool.

Infinite Loop Prevention

Pluto can detect infinite loops by preventing too many successive iterations. This was implemented because game threads usually force users to call some sort of yield mechanism to return control to the game thread. In Pluto, you specify a hard bottleneck on iterations, then you specify a function pointer which should prevent ILP within the loop it's called in.

This will produce an error due to ILP:
pluto
while true do
end
This will not, with correct configuration:
pluto
while true do
yield()
end

If your scheduling system calls coroutine.yield at least once per tick, configuring the ILP mechanism can be as simple as defining PLUTO_ILP_ENABLE. In any case, Pluto's configuration file (luaconf.h) is worth a look at, especially to properly configure this feature.

info

This is a very simple mechanic. It has no performance overhead & it's lightweight. However, the compromise for this was coverage. This will reliably prevent most user error, however malicious users can find a way to block a thread still. For example, any forward jump will prevent the mechanism from breaking a loop. This can be exploited, so don't rely on this for security.

VM Dumping

Pluto offers an optional, configurable feature to see every instruction that is executed in the Lua VM.

Configuration

VM Dump can be enabled by defining PLUTO_VMDUMP in luaconf.h or your build config.

  • To reduce noise, you can modify PLUTO_VMDUMP_COND to set a custom condition for when VM Dump is active. By default, the condition is true.
  • Although not a configuration specific to VM Dump, it should be noted that you can modify the output macros lua_writestring and lua_writeline.

What it looks like

Given the following code:

pluto
local value = 3
switch value do
case 1:
case 2:
case 3:
case 4:
case 5:
print("Got 1-5.")
break
default:
print("Value is greater than 5.")
end
-- Break jumps here.

It will output:

VARARGPREP 0 ; prepare for 0 varargs
LOADI 0 3 ; push 3
MOVE 1 0 ; move 3 into R(A)
EQI 1 1 0 ; 3 == 1
EQI 1 2 1 ; 3 == 2
EQI 1 3 1 ; 3 == 3
GETTABUP 2 0 0 ; push T['print'] for function-0x247d2882520 (T=table-0x247d29ec9c8)
LOADK 3 1 ; push "Got 1-5."
<OUTPUT> Got 1-5.
CALL 2 2 1 ; call cfunc (nresults=0 nparams=0)
JMP 13 ; offset=13 newpc=0x247d29e90d8
RETURN 1 1 1 ; return 0 value(s)

This is great at deciphering obfuscated code which may be causing problems for your environment.

- +

For Integrators

The luaconf.h in Pluto provides various battle-tested mechanisms for locking down your Pluto environments. In this article, we've documented some of those. If you are an integrator who needs help configuring any of this, or who wants us to implement another mechanism, feel free to contact us on GitHub.

Content Moderation

Compiled Code

You can disable execution of compiled bytecode by defining PLUTO_DISABLE_COMPILED in luaconf.h or your build config.

Custom Module Filters

You may already have filters before passing scripts to run onto Pluto, but mechanisms such as dofile and require may be used to bypass them. To help you combat this, Pluto provides PLUTO_LOADFILE_HOOK. For example, if you set it to ContmodOnLoadfile in luaconf.h or your build config, you only need to define that function somewhere in your code, like this:

cpp
extern "C" bool ContmodOnLoadfile(const char* filename) {
return !isCodeProhibited(soup::string::fromFile(filename));
}

This requires you to use Pluto as a static library, as otherwise this linking relationship won't work.

Prevent Loading of Binary Modules

The PLUTO_NO_BINARIES macro can be defined to totally eliminate package.loadlib and any DLL/SO loading capability from the require function. This is helpful because package.loadlib can be used to bypass sandbox restrictions by manually loading symbols from a Lua/Pluto library, and the require function can load any Lua/Pluto C Module which may or may not provide dangerous functions. This is generally vital for any sandbox. This mechanism cannot be bypassed, since it configures Pluto to compile without support for any of the aforementioned features.

Execution Time Limit

To aid environments that have to be sandboxed, Pluto provides Execution Time Limit (ETL), which can be enabled by defining PLUTO_ETL_ENABLE in luaconf.h or your build config.

By default, ETL allows code to run for a total of 1 ms (1.000.000 nanos). This can be changed by overwriting PLUTO_ETL_NANOS.

Note that this is a hammer solution. If you only want to prevent stupid mistakes, Infinite Loop Prevention is a far better tool.

Infinite Loop Prevention

Pluto can detect infinite loops by preventing too many successive iterations. This was implemented because game threads usually force users to call some sort of yield mechanism to return control to the game thread. In Pluto, you specify a hard bottleneck on iterations, then you specify a function pointer which should prevent ILP within the loop it's called in.

This will produce an error due to ILP:
pluto
while true do
end
This will not, with correct configuration:
pluto
while true do
yield()
end

If your scheduling system calls coroutine.yield at least once per tick, configuring the ILP mechanism can be as simple as defining PLUTO_ILP_ENABLE. In any case, Pluto's configuration file (luaconf.h) is worth a look at, especially to properly configure this feature.

info

This is a very simple mechanic. It has no performance overhead & it's lightweight. However, the compromise for this was coverage. This will reliably prevent most user error, however malicious users can find a way to block a thread still. For example, any forward jump will prevent the mechanism from breaking a loop. This can be exploited, so don't rely on this for security.

VM Dumping

Pluto offers an optional, configurable feature to see every instruction that is executed in the Lua VM.

Configuration

VM Dump can be enabled by defining PLUTO_VMDUMP in luaconf.h or your build config.

  • To reduce noise, you can modify PLUTO_VMDUMP_COND to set a custom condition for when VM Dump is active. By default, the condition is true.
  • Although not a configuration specific to VM Dump, it should be noted that you can modify the output macros lua_writestring and lua_writeline.

What it looks like

Given the following code:

pluto
local value = 3
switch value do
case 1:
case 2:
case 3:
case 4:
case 5:
print("Got 1-5.")
break
default:
print("Value is greater than 5.")
end
-- Break jumps here.

It will output:

VARARGPREP 0 ; prepare for 0 varargs
LOADI 0 3 ; push 3
MOVE 1 0 ; move 3 into R(A)
EQI 1 1 0 ; 3 == 1
EQI 1 2 1 ; 3 == 2
EQI 1 3 1 ; 3 == 3
GETTABUP 2 0 0 ; push T['print'] for function-0x247d2882520 (T=table-0x247d29ec9c8)
LOADK 3 1 ; push "Got 1-5."
<OUTPUT> Got 1-5.
CALL 2 2 1 ; call cfunc (nresults=0 nparams=0)
JMP 13 ; offset=13 newpc=0x247d29e90d8
RETURN 1 1 1 ; return 0 value(s)

This is great at deciphering obfuscated code which may be causing problems for your environment.

+ \ No newline at end of file diff --git a/docs/Getting Started.html b/docs/Getting Started.html index 33a24602..6bc25b45 100644 --- a/docs/Getting Started.html +++ b/docs/Getting Started.html @@ -4,13 +4,13 @@ Getting Started | Pluto - +
-

Getting Started

This document will explain how to get started with writing Pluto in no time.

Write Pluto Online

The easiest way to get started writing Pluto is to use Write Pluto Online, which runs Pluto code directly in your browser using WASM.

Prebuilt Binaries

You can find pre-built binaries of Pluto for Windows, Linux, & Mac OS over on Pluto's Github Releases page.

Packages

Chocolatey

You can easily install pluto and plutoc via Chocolatey as follows:

choco install plutolang

APT Repository

You can easily install Pluto via APT as follows:

wget -qO- https://calamity-inc.github.io/deb-repo/key.gpg | sudo tee /usr/share/keyrings/calamity-inc.gpg > /dev/null
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/calamity-inc.gpg] https://calamity-inc.github.io/deb-repo/ buster main" | sudo tee /etc/apt/sources.list.d/calamity-inc.list > /dev/null
sudo apt update
sudo apt install pluto

This package includes the pluto and plutoc executables, shared library, as well as headers for developers (#include <pluto/...>).

As the "buster" part implies, these binaries were compiled on Debian 10, but they work on all subsequent Debian releases, as well as Ubuntu 20 and above.

AUR

Pluto is in the Arch User Repository under the name plutolang.

This package includes the pluto and plutoc executables, shared library, as well as headers for developers (#include <pluto/...>).

Termux

Pluto is available in the Termux package main repository under plutolang for binaries and libpluto for development library.

Compile Pluto Yourself

Pluto can compile on virtually any platform, as long as there's a C++ 17 compiler for it.

First, you need to clone the repository:

git clone https://github.com/PlutoLang/Pluto
cd Pluto

Then, you can use any of the build methods documented here.

PHP Scripts

info

PHP is required for this method. You can check if PHP is installed by running php -v. You can install it via sudo apt intall php-cli on Debian or sudo pacman -S php on Arch.

Simply run the following commands:

php scripts/compile.php clang
php scripts/link_pluto.php clang
php scripts/link_plutoc.php clang
php scripts/link_static.php

You can easily modify these commands to a compiler other than clang, if you wish. There are also additional scripts for the various types of shared libraries.

The binaries will be placed in the src/ directory.

Visual Studio

In the repository you just cloned, there's a Pluto.sln you can open with Visual Studio.

Within Visual Studio, open the Build > Batch Build dialog. Here, click "Select All", then "Build".

The binaries will be placed in the out/ directory.

Make

You can simply run the make command:

make -j PLAT={yourplatform}

The platform list can be found here.

The binaries will be placed in the src/ directory.

Sun

Pluto supports the Sun build system by providing .sun files in the src/ directory, you can use them to build pluto & plutoc:

cd src
sun pluto
sun plutoc

The binaries will be placed in the src/ directory.

If you wish to use Pluto as a static library in your own projects, simply add the following to your project's .sun file:

require ../Pluto/src

Assuming a directory structure where your own project and Pluto share the same parent.

- +

Getting Started

This document will explain how to get started with writing Pluto in no time.

Write Pluto Online

The easiest way to get started writing Pluto is to use Write Pluto Online, which runs Pluto code directly in your browser using WASM.

Prebuilt Binaries

You can find pre-built binaries of Pluto for Windows, Linux, & Mac OS over on Pluto's Github Releases page.

Packages

Chocolatey

You can easily install pluto and plutoc via Chocolatey as follows:

choco install plutolang

APT Repository

You can easily install Pluto via APT as follows:

wget -qO- https://calamity-inc.github.io/deb-repo/key.gpg | sudo tee /usr/share/keyrings/calamity-inc.gpg > /dev/null
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/calamity-inc.gpg] https://calamity-inc.github.io/deb-repo/ buster main" | sudo tee /etc/apt/sources.list.d/calamity-inc.list > /dev/null
sudo apt update
sudo apt install pluto

This package includes the pluto and plutoc executables, shared library, as well as headers for developers (#include <pluto/...>).

As the "buster" part implies, these binaries were compiled on Debian 10, but they work on all subsequent Debian releases, as well as Ubuntu 20 and above.

AUR

Pluto is in the Arch User Repository under the name plutolang.

This package includes the pluto and plutoc executables, shared library, as well as headers for developers (#include <pluto/...>).

Termux

Pluto is available in the Termux package main repository under plutolang for binaries and libpluto for development library.

Compile Pluto Yourself

Pluto can compile on virtually any platform, as long as there's a C++ 17 compiler for it.

First, you need to clone the repository:

git clone https://github.com/PlutoLang/Pluto
cd Pluto

Then, you can use any of the build methods documented here.

PHP Scripts

info

PHP is required for this method. You can check if PHP is installed by running php -v. You can install it via sudo apt intall php-cli on Debian or sudo pacman -S php on Arch.

Simply run the following commands:

php scripts/compile.php clang
php scripts/link_pluto.php clang
php scripts/link_plutoc.php clang
php scripts/link_static.php

You can easily modify these commands to a compiler other than clang, if you wish. There are also additional scripts for the various types of shared libraries.

The binaries will be placed in the src/ directory.

Visual Studio

In the repository you just cloned, there's a Pluto.sln you can open with Visual Studio.

Within Visual Studio, open the Build > Batch Build dialog. Here, click "Select All", then "Build".

The binaries will be placed in the out/ directory.

Make

You can simply run the make command:

make -j PLAT={yourplatform}

The platform list can be found here.

The binaries will be placed in the src/ directory.

Sun

Pluto supports the Sun build system by providing .sun files in the src/ directory, you can use them to build pluto & plutoc:

cd src
sun pluto
sun plutoc

The binaries will be placed in the src/ directory.

If you wish to use Pluto as a static library in your own projects, simply add the following to your project's .sun file:

require ../Pluto/src

Assuming a directory structure where your own project and Pluto share the same parent.

+ \ No newline at end of file diff --git a/docs/Introduction.html b/docs/Introduction.html index 0c034127..4a85d197 100644 --- a/docs/Introduction.html +++ b/docs/Introduction.html @@ -4,13 +4,13 @@ What is Pluto? | Pluto - +

What is Pluto?

Pluto is a superset of Lua 5.4 with a focus on general-purpose programming. While being remarkably compatible with Lua 5.4 source-code & bytecode, it enhances the standard library & adds more than a dozen highly-desired syntaxes such as switch statements, compound operators, classes, class inheritance, string interpolation, type hinting, enums, and so on.

What does Pluto aspire to be?

Pluto aspires to be a version of Lua with a larger feature-set, that is all. Pluto is not a Lua-killer, an attempted successor, or any of that. Many people (rightly so) love Lua precisely because of the design philosophy. And fundamentally, Pluto is a major deviation from Lua's design philosophy. Some may prefer this, some may not.

- + \ No newline at end of file diff --git a/docs/New Features/Break Statement.html b/docs/New Features/Break Statement.html index a42e7fe1..d9bdc8d6 100644 --- a/docs/New Features/Break Statement.html +++ b/docs/New Features/Break Statement.html @@ -4,13 +4,13 @@ Break Statement | Pluto - +
-

Break Statement

This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should break. The default value is 1, thus breaking out of the current loop.

Example 1
pluto
for i = 1, 10 do -- Loop 1.
break 1 -- This is identical to `break` without any arguments.
end
Example 2
pluto
for i = 1, 10 do -- Loop 1.
for ii = 1, 5 do -- Loop 2.
break 1 -- This will break from Loop 2.
break 2 -- This will break from Loop 1.
end
end
- +

Break Statement

This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should break. The default value is 1, thus breaking out of the current loop.

Example 1
pluto
for i = 1, 10 do -- Loop 1.
break 1 -- This is identical to `break` without any arguments.
end
Example 2
pluto
for i = 1, 10 do -- Loop 1.
for ii = 1, 5 do -- Loop 2.
break 1 -- This will break from Loop 2.
break 2 -- This will break from Loop 1.
end
end
+ \ No newline at end of file diff --git a/docs/New Features/Compile-Time Evaluation.html b/docs/New Features/Compile-Time Evaluation.html index fdea538b..b726149d 100644 --- a/docs/New Features/Compile-Time Evaluation.html +++ b/docs/New Features/Compile-Time Evaluation.html @@ -4,13 +4,13 @@ Compile-Time Evaluation | Pluto - +
-

Compile-Time Evaluation

Pluto's parser provides some powerful constructs which allow you to write code that will never be seen at runtime.

Function calls

Certain standard library functions can be called at compile-time, as long as the arguments are also known at compile-time, by using the "$" symbol before the function call.

pluto
local runtime = require("crypto").joaat("Hello, World!")
local compile = $crypto.joaat("Hello, World!")
assert(runtime == compile)

If you're unfamiliar with compile-time evaluation, this is essentially what the code turns into:

pluto
local runtime = require("crypto").joaat("Hello, World!")
local compile = 847757641 -- The JOAAT hash of "Hello, World!"
assert(runtime == compile)

This is available on preloaded Pluto libraries, such as:

  • json
  • base32
  • base58
  • base64
  • crypto

And on the following functions:

  • tostring
  • utostring
  • tonumber
  • utonumber

Variables

Compile-time constant variables can be defined via the $define statement:

pluto
$define a = 123

This may seem identical to a local declared with the const attribute:

pluto
local a <const> = 123

However, $define also enforces that the assigned variable is a compile-time constant:

pluto
local a <const> = {}
$define a = {} -- Error: variable was not assigned a compile-time constant value

Conditionals

If there is certain code you only want to have compiled in for a certain build, such as a debug build, you can use compile-time conditionals:

pluto
$define DEBUG = true
$if DEBUG then
print("Script running in debug mode")
$else
print("Script running in release mode")
$end

In this case, only one of the two paths will be compiled in; the rest will not take up any space.

- +

Compile-Time Evaluation

Pluto's parser provides some powerful constructs which allow you to write code that will never be seen at runtime.

Function calls

Certain standard library functions can be called at compile-time, as long as the arguments are also known at compile-time, by using the "$" symbol before the function call.

pluto
local runtime = require("crypto").joaat("Hello, World!")
local compile = $crypto.joaat("Hello, World!")
assert(runtime == compile)

If you're unfamiliar with compile-time evaluation, this is essentially what the code turns into:

pluto
local runtime = require("crypto").joaat("Hello, World!")
local compile = 847757641 -- The JOAAT hash of "Hello, World!"
assert(runtime == compile)

This is available on preloaded Pluto libraries, such as:

  • json
  • base32
  • base58
  • base64
  • crypto

And on the following functions:

  • tostring
  • utostring
  • tonumber
  • utonumber

Variables

Compile-time constant variables can be defined via the $define statement:

pluto
$define a = 123

This may seem identical to a local declared with the const attribute:

pluto
local a <const> = 123

However, $define also enforces that the assigned variable is a compile-time constant:

pluto
local a <const> = {}
$define a = {} -- Error: variable was not assigned a compile-time constant value

Conditionals

If there is certain code you only want to have compiled in for a certain build, such as a debug build, you can use compile-time conditionals:

pluto
$define DEBUG = true
$if DEBUG then
print("Script running in debug mode")
$else
print("Script running in release mode")
$end

In this case, only one of the two paths will be compiled in; the rest will not take up any space.

+ \ No newline at end of file diff --git a/docs/New Features/Compiler Warnings.html b/docs/New Features/Compiler Warnings.html index 18a5264a..6690f267 100644 --- a/docs/New Features/Compiler Warnings.html +++ b/docs/New Features/Compiler Warnings.html @@ -4,13 +4,13 @@ Compiler Warnings | Pluto - +
-

Compiler Warnings

Pluto offers optional compiler warnings for certain misbehaviors.

Warning Types

var-shadow

This is raised when a new local is created with the same name as an existing one.

pluto
local var = 5
do
local var = "hello"
end
file.pluto:3: warning: duplicate local declaration [var-shadow]
3 | local var = "hello"
| ^^^^^^^^^^^^^^^^^^^ here: this shadows the initial declaration of 'var' on line 1.

global-shadow

This is raised when a new local is created with the same name as a global variable.

pluto
local table = {}
file.pluto:1: warning: duplicate global declaration [global-shadow]
1 | local table = {}
| ^^^^^^^^^^^^^^^^ here: this shadows the initial global definition of 'table'

To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_GLOBAL_SHADOW macro.

Furthermore, this only covers the globals 'table', 'string', and 'arg' by default. Integrators can overwrite the PLUTO_COMMON_GLOBAL_NAMES macro to change this list.

field-shadow

This is raised when the same field is declared multiple times in a table constructor:

pluto
local t = {
key = "fruit",
value = "apple",
value = "banana"
}
file.pluto:4: warning: duplicate table field [field-shadow]
4 | value = "banana"
| ^^^^^^^^^^^^^^^^ here: this overwrites the value assigned to this field earlier

type-mismatch

This is raised when the type of an expression doesn't match the hinted type. See Type Hinting.

pluto
local var: number = 5
var = "hello"
file.pluto:2: warning: variable type mismatch [type-mismatch]
2 | var = "hello"
| ^^^^^^^^^^^^^ here: 'var' type-hinted as 'number', but assigned a string value.

unreachable-code

This is raised when a block of code will never be ran.

pluto
for i = 1, 10 do
if i == 5 then
continue
print("message")
end
end
file.pluto:4: warning: unreachable code [unreachable-code]
4 | print("message")
| ^^^^^^^^^^^^^^^^ here: this code comes after an escaping 'continue' statement.

excessive-arguments

This is raised when too many arguments are given to a non-vararg function.

pluto
local function func(a, b, c)
end
func(1, 2, 3, 4)
file.pluto:5: warning: too many arguments [excessive-arguments]
5 | func(1, 2, 3, 4)
| ^^^^^^^^^^^^^^^^ here: expected 3 arguments, got 4.

bad-practice

This is raised when the code does something stupid but not quite stupid enough to cause an error.

pluto
pluto_use *
file.pluto:1: warning: 'pluto_use *' is a bad idea because future Pluto versions may add keywords that will break your script [bad-practice]
1 | pluto_use *
| ^^^^^^^^^^^ here: consider using 'pluto_use "0.8.0"' instead

possible-typo

This is raised when the code seems syntactically incorrect.

pluto
local magic const = 42
file.pluto:1: warning: Possibly mistyped attribute [possible-typo]
1 | local magic const = 42
| ^^^^^^^^^^^^^^^^^^^^^^ here: Did you mean '<const>'?

non-portable-code

This is raised when the code may not be considered valid by all Pluto environments due to compatibility mode.

pluto
new exception("Not implemented")
file.pluto:1: warning: non-portable keyword usage [non-portable-code]
1 | new exception("Not implemented")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: use 'pluto_new' instead, or 'pluto_use' this keyword: https://pluto.do/compat

To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_CODE macro.

non-portable-name

This is raised when a variable name is only valid due to compatibility mode.

pluto
local class = "fruit"
file.pluto:1: warning: 'class' is a non-portable name [non-portable-name]
1 | local class = "fruit"
| ^^^^^^^^^^^^^^^^^^^^^ here: use a different name, or use 'pluto_use' to disable this keyword: https://pluto.do/compat

To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_NAME macro.

non-portable-bytecode

This is raised when the code will not run in Lua environments (when compiling Pluto to bytecode).

pluto
print("h" in "hello")
file.pluto:1: warning: non-portable operator usage [non-portable-bytecode]
1 | print("h" in "hello")
| ^^^^^^^^^^^^^^^^^^^^^ here: this operator generates bytecode which is incompatible with Lua.

To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_BYTECODE macro.

unannotated-fallthrough

This is raised when there's a non-obvious fallthrough in a switch block:

pluto
local a = 1
switch a do
case 1:
print("Case 1")
case 2:
print("Case 2")
end
file.pluto:5: warning: possibly unwanted fallthrough [unannotated-fallthrough]
5 | case 2:
| ^^^^^^^ here: the case on line 3 flows into this case
+ note: place `--@fallthrough` before this case if this is intended

As the warning points out, a @fallthrough annotation can be used to label the fallthrough, in turn silencing the warning:

pluto
local a = 1
switch a do
case 1:
print("Case 1")
-- @fallthrough
case 2:
print("Case 2")
end

implicit-global

This is raised when the global keyword is enabled and a global was declared without it. See Explicit Globals.

pluto
pluto_use global
a = 1
file.pluto:3: warning: implicit global creation [implicit-global]
3 | a = 1
| ^^^^^ here: prefix this with 'global' if creating a global was intended

discarded-return

This is raised when the return value of a function declared <nodiscard> was discarded. See Nodiscard Functions.

pluto
local function add(a, b) <nodiscard>
return a + b
end
add(1, 2)
file.pluto:5: warning: discarding return value of function declared '<nodiscard>' [discarded-return]
5 | add(1, 2)
| ^^^^^^^^^ here

Compile-time Configuration

The state of each warning type can be changed during compile-time and exceptions for certain code can be made.

Changing Warning States

Warnings have 3 states: 'disable', 'enable', and 'error'. The 'error' state is a more aggressive version of 'enable' that causes compilation to fail if the warning type is raied.

To change the state of a warning, write a @pluto_warnings comment with the state and warning type joined by a hyphen (-):

pluto
local var = 5
do
-- @pluto_warnings: disable-var-shadow
local var = "hello"
-- @pluto_warnings: enable-var-shadow
end

For this, there is also the special type, 'all', which can be used e.g. to enable all warnings except for non-portable-bytecode:

pluto
-- @pluto_warnings: enable-all, disable-non-portable-bytecode

Disable Warnings On Line

To disable warnings on a specific line of code, simply put a comment on the line before it with @pluto_warnings: disable-next.

pluto
local var = 5
do
-- @pluto_warnings: disable-next
local var = "hello"
end
- +

Compiler Warnings

Pluto offers optional compiler warnings for certain misbehaviors.

Warning Types

var-shadow

This is raised when a new local is created with the same name as an existing one.

pluto
local var = 5
do
local var = "hello"
end
file.pluto:3: warning: duplicate local declaration [var-shadow]
3 | local var = "hello"
| ^^^^^^^^^^^^^^^^^^^ here: this shadows the initial declaration of 'var' on line 1.

global-shadow

This is raised when a new local is created with the same name as a global variable.

pluto
local table = {}
file.pluto:1: warning: duplicate global declaration [global-shadow]
1 | local table = {}
| ^^^^^^^^^^^^^^^^ here: this shadows the initial global definition of 'table'

To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_GLOBAL_SHADOW macro.

Furthermore, this only covers the globals 'table', 'string', and 'arg' by default. Integrators can overwrite the PLUTO_COMMON_GLOBAL_NAMES macro to change this list.

field-shadow

This is raised when the same field is declared multiple times in a table constructor:

pluto
local t = {
key = "fruit",
value = "apple",
value = "banana"
}
file.pluto:4: warning: duplicate table field [field-shadow]
4 | value = "banana"
| ^^^^^^^^^^^^^^^^ here: this overwrites the value assigned to this field earlier

type-mismatch

This is raised when the type of an expression doesn't match the hinted type. See Type Hinting.

pluto
local var: number = 5
var = "hello"
file.pluto:2: warning: variable type mismatch [type-mismatch]
2 | var = "hello"
| ^^^^^^^^^^^^^ here: 'var' type-hinted as 'number', but assigned a string value.

unreachable-code

This is raised when a block of code will never be ran.

pluto
for i = 1, 10 do
if i == 5 then
continue
print("message")
end
end
file.pluto:4: warning: unreachable code [unreachable-code]
4 | print("message")
| ^^^^^^^^^^^^^^^^ here: this code comes after an escaping 'continue' statement.

excessive-arguments

This is raised when too many arguments are given to a non-vararg function.

pluto
local function func(a, b, c)
end
func(1, 2, 3, 4)
file.pluto:5: warning: too many arguments [excessive-arguments]
5 | func(1, 2, 3, 4)
| ^^^^^^^^^^^^^^^^ here: expected 3 arguments, got 4.

bad-practice

This is raised when the code does something stupid but not quite stupid enough to cause an error.

pluto
pluto_use *
file.pluto:1: warning: 'pluto_use *' is a bad idea because future Pluto versions may add keywords that will break your script [bad-practice]
1 | pluto_use *
| ^^^^^^^^^^^ here: consider using 'pluto_use "0.8.0"' instead

possible-typo

This is raised when the code seems syntactically incorrect.

pluto
local magic const = 42
file.pluto:1: warning: Possibly mistyped attribute [possible-typo]
1 | local magic const = 42
| ^^^^^^^^^^^^^^^^^^^^^^ here: Did you mean '<const>'?

non-portable-code

This is raised when the code may not be considered valid by all Pluto environments due to compatibility mode.

pluto
new exception("Not implemented")
file.pluto:1: warning: non-portable keyword usage [non-portable-code]
1 | new exception("Not implemented")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: use 'pluto_new' instead, or 'pluto_use' this keyword: https://pluto.do/compat

To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_CODE macro.

non-portable-name

This is raised when a variable name is only valid due to compatibility mode.

pluto
local class = "fruit"
file.pluto:1: warning: 'class' is a non-portable name [non-portable-name]
1 | local class = "fruit"
| ^^^^^^^^^^^^^^^^^^^^^ here: use a different name, or use 'pluto_use' to disable this keyword: https://pluto.do/compat

To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_NAME macro.

non-portable-bytecode

This is raised when the code will not run in Lua environments (when compiling Pluto to bytecode).

pluto
print("h" in "hello")
file.pluto:1: warning: non-portable operator usage [non-portable-bytecode]
1 | print("h" in "hello")
| ^^^^^^^^^^^^^^^^^^^^^ here: this operator generates bytecode which is incompatible with Lua.

To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_BYTECODE macro.

unannotated-fallthrough

This is raised when there's a non-obvious fallthrough in a switch block:

pluto
local a = 1
switch a do
case 1:
print("Case 1")
case 2:
print("Case 2")
end
file.pluto:5: warning: possibly unwanted fallthrough [unannotated-fallthrough]
5 | case 2:
| ^^^^^^^ here: the case on line 3 flows into this case
+ note: place `--@fallthrough` before this case if this is intended

As the warning points out, a @fallthrough annotation can be used to label the fallthrough, in turn silencing the warning:

pluto
local a = 1
switch a do
case 1:
print("Case 1")
-- @fallthrough
case 2:
print("Case 2")
end

implicit-global

This is raised when the global keyword is enabled and a global was declared without it. See Explicit Globals.

pluto
pluto_use global
a = 1
file.pluto:3: warning: implicit global creation [implicit-global]
3 | a = 1
| ^^^^^ here: prefix this with 'global' if creating a global was intended

discarded-return

This is raised when the return value of a function declared <nodiscard> was discarded. See Nodiscard Functions.

pluto
local function add(a, b) <nodiscard>
return a + b
end
add(1, 2)
file.pluto:5: warning: discarding return value of function declared '<nodiscard>' [discarded-return]
5 | add(1, 2)
| ^^^^^^^^^ here

Compile-time Configuration

The state of each warning type can be changed during compile-time and exceptions for certain code can be made.

Changing Warning States

Warnings have 3 states: 'disable', 'enable', and 'error'. The 'error' state is a more aggressive version of 'enable' that causes compilation to fail if the warning type is raied.

To change the state of a warning, write a @pluto_warnings comment with the state and warning type joined by a hyphen (-):

pluto
local var = 5
do
-- @pluto_warnings: disable-var-shadow
local var = "hello"
-- @pluto_warnings: enable-var-shadow
end

For this, there is also the special type, 'all', which can be used e.g. to enable all warnings except for non-portable-bytecode:

pluto
-- @pluto_warnings: enable-all, disable-non-portable-bytecode

Disable Warnings On Line

To disable warnings on a specific line of code, simply put a comment on the line before it with @pluto_warnings: disable-next.

pluto
local var = 5
do
-- @pluto_warnings: disable-next
local var = "hello"
end
+ \ No newline at end of file diff --git a/docs/New Features/Continue Statement.html b/docs/New Features/Continue Statement.html index 8613bfde..152e1b75 100644 --- a/docs/New Features/Continue Statement.html +++ b/docs/New Features/Continue Statement.html @@ -4,13 +4,13 @@ Continue Statement | Pluto - +
-

Continue Statement

Continue statements, like break, are meant to be used in loops. They skip the current iteration of the loop.

They introduce a new keyword, continue. These cannot be used inside switch statements.

Example Code
pluto
-- Print every number besides five.
for i = 1, 10 do
if i == 5 then
continue
end
print(i)
-- continue jumps here.
end

Try It Yourself

caution

Note, continue will skip code. If any code within your loop will determine if the loop continues, make sure continue doesn't jump over it.

Continue's Only Argument

This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should skip to the end of. The default value is 1, thus skipping to the end of the current loop.

Example 1
pluto
for i = 1, 10 do -- Loop 1.
continue 1 -- This is identical to `continue` without any arguments.
end
Example 2
pluto
for i = 1, 10 do -- Loop 1.
for ii = 1, 5 do -- Loop 2.
continue 1 -- This will continue from Loop 2.
continue 2 -- This will continue from Loop 1.
end
end

Using Compatibility Mode?

You may need to use pluto_continue instead of continue. Alternatively, pluto_use continue will enable the keyword independently of environment settings.

- +

Continue Statement

Continue statements, like break, are meant to be used in loops. They skip the current iteration of the loop.

They introduce a new keyword, continue. These cannot be used inside switch statements.

Example Code
pluto
-- Print every number besides five.
for i = 1, 10 do
if i == 5 then
continue
end
print(i)
-- continue jumps here.
end

Try It Yourself

caution

Note, continue will skip code. If any code within your loop will determine if the loop continues, make sure continue doesn't jump over it.

Continue's Only Argument

This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should skip to the end of. The default value is 1, thus skipping to the end of the current loop.

Example 1
pluto
for i = 1, 10 do -- Loop 1.
continue 1 -- This is identical to `continue` without any arguments.
end
Example 2
pluto
for i = 1, 10 do -- Loop 1.
for ii = 1, 5 do -- Loop 2.
continue 1 -- This will continue from Loop 2.
continue 2 -- This will continue from Loop 1.
end
end

Using Compatibility Mode?

You may need to use pluto_continue instead of continue. Alternatively, pluto_use continue will enable the keyword independently of environment settings.

+ \ No newline at end of file diff --git a/docs/New Features/Default Arguments.html b/docs/New Features/Default Arguments.html index bb7ab666..829bd82a 100644 --- a/docs/New Features/Default Arguments.html +++ b/docs/New Features/Default Arguments.html @@ -4,13 +4,13 @@ Default Arguments | Pluto - +
-

Default Arguments

During a function declaration, parameters can now declare their own default value.

Example Code
pluto
local function write(text = "No text provided.")
print(text)
end
write() --> "No text provided."
write("Hello!") --> "Hello!"
This code behaves identically.
pluto
local function write(text)
if text == nil then
text = "No text provided."
end
print(text)
end
write() --> "No text provided."
write("Hello!") --> "Hello!"

Try It Yourself

- +

Default Arguments

During a function declaration, parameters can now declare their own default value.

Example Code
pluto
local function write(text = "No text provided.")
print(text)
end
write() --> "No text provided."
write("Hello!") --> "Hello!"
This code behaves identically.
pluto
local function write(text)
if text == nil then
text = "No text provided."
end
print(text)
end
write() --> "No text provided."
write("Hello!") --> "Hello!"

Try It Yourself

+ \ No newline at end of file diff --git a/docs/New Features/Destructuring.html b/docs/New Features/Destructuring.html index 02d0897f..ce0d0921 100644 --- a/docs/New Features/Destructuring.html +++ b/docs/New Features/Destructuring.html @@ -4,13 +4,13 @@ Destructuring | Pluto - +
-

Destructuring

Destructuring is a better way to assign local variables from expressions that return a table.

Array destructuring

Assuming we have this table:

pluto
local t = { 3, 6, 9 }

This is how we would assign each value to variables called a, b, and c using the Lua and Pluto ways:

Lua way
pluto
local a, b, c = table.unpack(t)
Pluto way
pluto
local [a, b, c] = t

Table destructuring

Assuming we have this table:

pluto
local t = {
name = "John",
age = 42
}

This is how we would assign each field to a variable of the same name using the Lua and Pluto ways:

Lua way
pluto
local name = t.name
local age = t.age
Pluto way
pluto
local { name, age } = t

Different variable name

Assuming we have the same table as above, this is how we'd assign the name and age fields to n and a variables, respectively, using the Lua and Pluto ways:

Lua way
pluto
local n = t.name
local a = t.age
Pluto way
pluto
local { n = name, a = age } = t

Standard Library

Table destructuring can be used to require multiple standard library modules at once using the '*' module:

pluto
local { base64, json } = require "*"
- +

Destructuring

Destructuring is a better way to assign local variables from expressions that return a table.

Array destructuring

Assuming we have this table:

pluto
local t = { 3, 6, 9 }

This is how we would assign each value to variables called a, b, and c using the Lua and Pluto ways:

Lua way
pluto
local a, b, c = table.unpack(t)
Pluto way
pluto
local [a, b, c] = t

Table destructuring

Assuming we have this table:

pluto
local t = {
name = "John",
age = 42
}

This is how we would assign each field to a variable of the same name using the Lua and Pluto ways:

Lua way
pluto
local name = t.name
local age = t.age
Pluto way
pluto
local { name, age } = t

Different variable name

Assuming we have the same table as above, this is how we'd assign the name and age fields to n and a variables, respectively, using the Lua and Pluto ways:

Lua way
pluto
local n = t.name
local a = t.age
Pluto way
pluto
local { n = name, a = age } = t

Standard Library

Table destructuring can be used to require multiple standard library modules at once using the '*' module:

pluto
local { base64, json } = require "*"
+ \ No newline at end of file diff --git a/docs/New Features/Enumerations.html b/docs/New Features/Enumerations.html index 2b4172e9..e40a9cf9 100644 --- a/docs/New Features/Enumerations.html +++ b/docs/New Features/Enumerations.html @@ -4,13 +4,13 @@ Enumerations | Pluto - +
-

Enumerations

Pluto adds the following syntax:

pluto
enum MyEnum begin
OPTION_1,
OPTION_2,
OPTION_3
end
assert(OPTION_1 == 1)
assert(OPTION_2 == 2)
assert(OPTION_3 == 3)

Enums can start at a base number, and increment from there.

pluto
enum MyEnum begin
OPTION_1 = 0,
OPTION_2,
OPTION_3 = 5,
OPTION_4
end
assert(OPTION_1 == 0)
assert(OPTION_2 == 1)
assert(OPTION_3 == 5)
assert(OPTION_4 == 6)

Since this enum has a name, we can also access its enumerators with that:

pluto
assert(MyEnum.OPTION_1 == 0)

Scoped Enums

You can force usage of the ENUM.ENUMERATOR syntax by using 'enum class':

pluto
enum class MyEnum begin
OPTION_1,
OPTION_2,
OPTION_3
end
assert(OPTION_1 == nil)
assert(MyEnum.OPTION_1 == 1)

Reflection

When you have a named enum, not only can you get its enumerators, but also reflect upon it with some methods:

pluto
enum MyEnum begin
OPTION_1,
OPTION_2,
OPTION_3
end
for k, v in MyEnum:kvmap() do
print(k, v) -- "OPTION_1 1" ...
end

The following methods are available: :names(), :values(), :kvmap(), :vkmap()

Anonymous Enums

Enums can also be anonymous:

pluto
enum begin
OPTION_1,
OPTION_2,
OPTION_3
end
assert(OPTION_1 == 1)
assert(OPTION_2 == 2)
assert(OPTION_3 == 3)

Using Compatibility Mode?

You may need to use pluto_enum instead of enum. Alternatively, pluto_use enum will enable the keyword independently of environment settings.

- +

Enumerations

Pluto adds the following syntax:

pluto
enum MyEnum begin
OPTION_1,
OPTION_2,
OPTION_3
end
assert(OPTION_1 == 1)
assert(OPTION_2 == 2)
assert(OPTION_3 == 3)

Enums can start at a base number, and increment from there.

pluto
enum MyEnum begin
OPTION_1 = 0,
OPTION_2,
OPTION_3 = 5,
OPTION_4
end
assert(OPTION_1 == 0)
assert(OPTION_2 == 1)
assert(OPTION_3 == 5)
assert(OPTION_4 == 6)

Since this enum has a name, we can also access its enumerators with that:

pluto
assert(MyEnum.OPTION_1 == 0)

Scoped Enums

You can force usage of the ENUM.ENUMERATOR syntax by using 'enum class':

pluto
enum class MyEnum begin
OPTION_1,
OPTION_2,
OPTION_3
end
assert(OPTION_1 == nil)
assert(MyEnum.OPTION_1 == 1)

Reflection

When you have a named enum, not only can you get its enumerators, but also reflect upon it with some methods:

pluto
enum MyEnum begin
OPTION_1,
OPTION_2,
OPTION_3
end
for k, v in MyEnum:kvmap() do
print(k, v) -- "OPTION_1 1" ...
end

The following methods are available: :names(), :values(), :kvmap(), :vkmap()

Anonymous Enums

Enums can also be anonymous:

pluto
enum begin
OPTION_1,
OPTION_2,
OPTION_3
end
assert(OPTION_1 == 1)
assert(OPTION_2 == 2)
assert(OPTION_3 == 3)

Using Compatibility Mode?

You may need to use pluto_enum instead of enum. Alternatively, pluto_use enum will enable the keyword independently of environment settings.

+ \ No newline at end of file diff --git a/docs/New Features/Explicit Globals.html b/docs/New Features/Explicit Globals.html index 46f1a3f1..d039b13b 100644 --- a/docs/New Features/Explicit Globals.html +++ b/docs/New Features/Explicit Globals.html @@ -4,13 +4,13 @@ Explicit Globals | Pluto - +
-

Explicit Globals

The optional global keyword can be used to explicitly declare global variables.

To enable it, simply do:

pluto
pluto_use global

Then it can be used like this:

pluto
global a = 1

Being identical to the following code:

pluto
a = 1

Compiler Warnings

When the global keyword is enabled, an 'implicit-global' warning is raised for any globals declared without it:

pluto
pluto_use global
a = 1
file.pluto:3: warning: implicit global creation [implicit-global]
3 | a = 1
| ^^^^^ here: prefix this with 'global' if creating a global was intended
- +

Explicit Globals

The optional global keyword can be used to explicitly declare global variables.

To enable it, simply do:

pluto
pluto_use global

Then it can be used like this:

pluto
global a = 1

Being identical to the following code:

pluto
a = 1

Compiler Warnings

When the global keyword is enabled, an 'implicit-global' warning is raised for any globals declared without it:

pluto
pluto_use global
a = 1
file.pluto:3: warning: implicit global creation [implicit-global]
3 | a = 1
| ^^^^^ here: prefix this with 'global' if creating a global was intended
+ \ No newline at end of file diff --git a/docs/New Features/Export Modifier.html b/docs/New Features/Export Modifier.html index 43f531a9..cda619ac 100644 --- a/docs/New Features/Export Modifier.html +++ b/docs/New Features/Export Modifier.html @@ -4,13 +4,13 @@ Export Modifier | Pluto - +
-

Export Modifier

The export modifier allows you to automatically aggregate things you want to export into a table.

Old Code
pluto
local version = 2
local function add(a, b)
return a + b
end
return {
version = version,
add = add
}
New Code
pluto
export version = 2
export function add(a, b)
return a + b
end

The return statement is automatically generated at the end of the block, so it is not limited to the top-level function:

pluto
package.preload["test"] = function()
export version = 2
export function add(a, b)
return a + b
end
-- end of scope; 'return' is automatically generated
end
print(require"test".version)

Using Compatibility Mode?

You may need to use pluto_export instead of export. Alternatively, pluto_use export will enable the keyword independently of environment settings.

- +

Export Modifier

The export modifier allows you to automatically aggregate things you want to export into a table.

Old Code
pluto
local version = 2
local function add(a, b)
return a + b
end
return {
version = version,
add = add
}
New Code
pluto
export version = 2
export function add(a, b)
return a + b
end

The return statement is automatically generated at the end of the block, so it is not limited to the top-level function:

pluto
package.preload["test"] = function()
export version = 2
export function add(a, b)
return a + b
end
-- end of scope; 'return' is automatically generated
end
print(require"test".version)

Using Compatibility Mode?

You may need to use pluto_export instead of export. Alternatively, pluto_use export will enable the keyword independently of environment settings.

+ \ No newline at end of file diff --git a/docs/New Features/For-As Loop.html b/docs/New Features/For-As Loop.html index 0cf668f0..0acd511b 100644 --- a/docs/New Features/For-As Loop.html +++ b/docs/New Features/For-As Loop.html @@ -4,13 +4,13 @@ For-As Loop | Pluto - +
-

For-As Loop

When you only want to iterate over the values of a table, you can use Pluto's for-as syntax.

New Code
pluto
local t = { 1, 2, 3, "hello", "world" }
for t as value do
print(value)
end
-- 1
-- 2
-- 3
-- hello
-- world

That code is identical to this:

Old Code
pluto
local t = { 1, 2, 3, "hello", "world" }
for _, value in t do
print(value)
end
info

The bytecode of this feature is only backwards-compatible with Lua when pairs, ipairs, or next is used. See Generalized Iteration.

- +

For-As Loop

When you only want to iterate over the values of a table, you can use Pluto's for-as syntax.

New Code
pluto
local t = { 1, 2, 3, "hello", "world" }
for t as value do
print(value)
end
-- 1
-- 2
-- 3
-- hello
-- world

That code is identical to this:

Old Code
pluto
local t = { 1, 2, 3, "hello", "world" }
for _, value in t do
print(value)
end
info

The bytecode of this feature is only backwards-compatible with Lua when pairs, ipairs, or next is used. See Generalized Iteration.

+ \ No newline at end of file diff --git a/docs/New Features/In Expressions.html b/docs/New Features/In Expressions.html index 70c41b6d..c89934e0 100644 --- a/docs/New Features/In Expressions.html +++ b/docs/New Features/In Expressions.html @@ -4,13 +4,13 @@ In Expressions | Pluto - +
-

In Expressions

The in operator has been extended to support string searches and table searches. For these purposes, it's the fastest possible solution.

Searching for a substring.
pluto
assert("world" in "hello world")

When used on tables, the in operator searches for values. It'll search for array elements and it'll search keys for their values.

Searching a table for a value.
pluto
local t = { "a", "b", key = "value" }
assert("a" in t) -- "a" is an element inside of t.
assert("b" in t) -- "b" is an element inside of t.
assert("value" in t) -- "value" is the value of a key inside of t.
assert(not "random" in t) -- "random" is not an element OR the value of a key inside of t.

Rules

  • The right-hand operand must always be a table or a string.
  • The left-hand operand must be a string if the right-hand operand is a string.
  • The left-hand operand can be anything if the right-hand operand is a table.
caution

The bytecode of this feature is not backwards-compatible with Lua.

- +

In Expressions

The in operator has been extended to support string searches and table searches. For these purposes, it's the fastest possible solution.

Searching for a substring.
pluto
assert("world" in "hello world")

When used on tables, the in operator searches for values. It'll search for array elements and it'll search keys for their values.

Searching a table for a value.
pluto
local t = { "a", "b", key = "value" }
assert("a" in t) -- "a" is an element inside of t.
assert("b" in t) -- "b" is an element inside of t.
assert("value" in t) -- "value" is the value of a key inside of t.
assert(not "random" in t) -- "random" is not an element OR the value of a key inside of t.

Rules

  • The right-hand operand must always be a table or a string.
  • The left-hand operand must be a string if the right-hand operand is a string.
  • The left-hand operand can be anything if the right-hand operand is a table.
caution

The bytecode of this feature is not backwards-compatible with Lua.

+ \ No newline at end of file diff --git a/docs/New Features/Lambda Expressions.html b/docs/New Features/Lambda Expressions.html index c96982bc..a9a6a9cb 100644 --- a/docs/New Features/Lambda Expressions.html +++ b/docs/New Features/Lambda Expressions.html @@ -4,13 +4,13 @@ Lambda Expressions | Pluto - +
-

Lambda Expressions

Lambda expressions are an alternative way of writing anonymous functions.

Lua Way
pluto
local s1 = "123"
local s2 = s1:gsub(".", function(c) return tonumber(c) + 1 end)
print(s2) -- "234"
Pluto Way
pluto
local s1 = "123"
local s2 = s1:gsub(".", |c| -> tonumber(c) + 1)
print(s2) -- "234"

Try It Yourself

As you can see, they take an expression after the arrow, the result of which is implicitly returned.

However, lambda expressions can also have full bodies using do...end:

pluto
local add = |a, b| -> do
print($"Adding {a} and {b} together")
return a + b
end

They also support all other syntax you would expect of functions, such as type hints and default arguments.

- +

Lambda Expressions

Lambda expressions are an alternative way of writing anonymous functions.

Lua Way
pluto
local s1 = "123"
local s2 = s1:gsub(".", function(c) return tonumber(c) + 1 end)
print(s2) -- "234"
Pluto Way
pluto
local s1 = "123"
local s2 = s1:gsub(".", |c| -> tonumber(c) + 1)
print(s2) -- "234"

Try It Yourself

As you can see, they take an expression after the arrow, the result of which is implicitly returned.

However, lambda expressions can also have full bodies using do...end:

pluto
local add = |a, b| -> do
print($"Adding {a} and {b} together")
return a + b
end

They also support all other syntax you would expect of functions, such as type hints and default arguments.

+ \ No newline at end of file diff --git a/docs/New Features/Named Arguments.html b/docs/New Features/Named Arguments.html index e5c0737a..21a2bc17 100644 --- a/docs/New Features/Named Arguments.html +++ b/docs/New Features/Named Arguments.html @@ -4,13 +4,13 @@ Named Arguments | Pluto - +
-

Named Arguments

Instead of positional arguments, you can use the names of arguments you want to set:

pluto
local function process_file(file, mode = "r", version = 1)
print($"Processing {file} with mode '{mode}' and version {version}")
end
process_file(file = "hello.txt", version = 2) -- "Processing hello.txt with mode 'r' and version 2"

Try It Yourself

Note that this example also makes use of default arguments and string interpolation.

Mixing arguments

You can use positional arguments for the first few arguments and then use named arguments for the latter ones, for example:

pluto
local function process_file(file, mode = "r", version = 1)
print($"Processing {file} with mode '{mode}' and version {version}")
end
process_file("hello.txt", version = 2) -- "Processing hello.txt with mode 'r' and version 2"

Try It Yourself

Limitations

This feature is implemented entirely in the parser and therefore only works for local functions at the moment.

- +

Named Arguments

Instead of positional arguments, you can use the names of arguments you want to set:

pluto
local function process_file(file, mode = "r", version = 1)
print($"Processing {file} with mode '{mode}' and version {version}")
end
process_file(file = "hello.txt", version = 2) -- "Processing hello.txt with mode 'r' and version 2"

Try It Yourself

Note that this example also makes use of default arguments and string interpolation.

Mixing arguments

You can use positional arguments for the first few arguments and then use named arguments for the latter ones, for example:

pluto
local function process_file(file, mode = "r", version = 1)
print($"Processing {file} with mode '{mode}' and version {version}")
end
process_file("hello.txt", version = 2) -- "Processing hello.txt with mode 'r' and version 2"

Try It Yourself

Limitations

This feature is implemented entirely in the parser and therefore only works for local functions at the moment.

+ \ No newline at end of file diff --git a/docs/New Features/Named Varargs.html b/docs/New Features/Named Varargs.html index 3d20b9ae..db17ce4b 100644 --- a/docs/New Features/Named Varargs.html +++ b/docs/New Features/Named Varargs.html @@ -4,13 +4,13 @@ Named Varargs | Pluto - + - +
+ \ No newline at end of file diff --git a/docs/New Features/Nodiscard Functions.html b/docs/New Features/Nodiscard Functions.html index 07a983fe..7cfa3132 100644 --- a/docs/New Features/Nodiscard Functions.html +++ b/docs/New Features/Nodiscard Functions.html @@ -4,13 +4,13 @@ Nodiscard Functions | Pluto - +
-

Nodiscard Functions

Functions can be declared nodiscard, causing a warning to be raised when the return value is discarded:

pluto
local function add(a, b) <nodiscard>
return a + b
end
add(1, 2)
file.pluto:5: warning: discarding return value of function declared '<nodiscard>' [discarded-return]
5 | add(1, 2)
| ^^^^^^^^^ here

This can also be combined with type hints:

pluto
local function add(a: number, b: number): number <nodiscard>
return a + b
end
info

The warning coverage is currently limited to local functions.

- +

Nodiscard Functions

Functions can be declared nodiscard, causing a warning to be raised when the return value is discarded:

pluto
local function add(a, b) <nodiscard>
return a + b
end
add(1, 2)
file.pluto:5: warning: discarding return value of function declared '<nodiscard>' [discarded-return]
5 | add(1, 2)
| ^^^^^^^^^ here

This can also be combined with type hints:

pluto
local function add(a: number, b: number): number <nodiscard>
return a + b
end
info

The warning coverage is currently limited to local functions.

+ \ No newline at end of file diff --git a/docs/New Features/Numeral Parsing.html b/docs/New Features/Numeral Parsing.html index 21ff0dbd..585bae9d 100644 --- a/docs/New Features/Numeral Parsing.html +++ b/docs/New Features/Numeral Parsing.html @@ -4,13 +4,13 @@ Numeral Parsing | Pluto - +
-

Numeral Parsing

Pluto makes two small changes to numeral parsing.

Cosmetic Underscores

You can add underscores to your numeric literals to make them more readable.

Example Code
pluto
local n = 10_000_000
assert(n == 10000000)

These underscores are ignored by the compiler, so they are purely cosmetic.

Binary Integers

Similar to how Lua allows you to input numbers in hexadecimal:

Example Code
pluto
local n = 0x420
assert(n == 1056)

Pluto allows you to input numbers in binary as well:

Example Code
pluto
local n = 0b1000101
assert(n == 69)
- +

Numeral Parsing

Pluto makes two small changes to numeral parsing.

Cosmetic Underscores

You can add underscores to your numeric literals to make them more readable.

Example Code
pluto
local n = 10_000_000
assert(n == 10000000)

These underscores are ignored by the compiler, so they are purely cosmetic.

Binary Integers

Similar to how Lua allows you to input numbers in hexadecimal:

Example Code
pluto
local n = 0x420
assert(n == 1056)

Pluto allows you to input numbers in binary as well:

Example Code
pluto
local n = 0b1000101
assert(n == 69)
+ \ No newline at end of file diff --git a/docs/New Features/Object-Oriented Programming.html b/docs/New Features/Object-Oriented Programming.html index d93208ba..78edbd93 100644 --- a/docs/New Features/Object-Oriented Programming.html +++ b/docs/New Features/Object-Oriented Programming.html @@ -4,13 +4,13 @@ Object-Oriented Programming | Pluto - +
-

Object-Oriented Programming

Pluto makes a plethora of improvements when it comes to object-oriented programming.

Method Creation

A series of methods was otherwise ugly to implement into a Lua table.

Old Code
pluto
local t = {}
function t:f1(...) end
function t:f2(...) end
function t:f3(...) end

Now, you can inline these statements inside of your table.

New Code
pluto
local t = {
function f1() end,
function f2() end,
function f3() end
}

This automatically marks the functions as methods.

caution

Keep in mind, this produces methods, meaning you'll need to use the colon invocation syntax to avoid positional ambiguities in your parameters.

Static Functions

For consistency with the above syntax, you can use 'static function' to declare non-method functions in your tables:

pluto
local t = {
static function say(msg)
print(msg)
end
}
t.say("Hello") -- "Hello"

Try It Yourself

New Operator

Pluto adds an easy way to make instances with the new operator. This operator will also call the __construct method if it exists.

pluto
local Human = {
function __construct(name)
self.name = name
end
}
local john = new Human("John")
print(john.name) -- John

Try It Yourself

Note that for compatibility with Lua and C API classes, the new operator checks for the existence of a static 'new' function. If it exists, new X(...) will be identical to X.new(...).

Class Statement

The class statement is similar to a table constructor, but it does not require commas or semicolons:

pluto
class Human
function __construct(name)
self.name = name
end
function __gc()
print(self.name .. " died of irrelevance")
end
end
local john = new Human("John")

The class statement also supports modifiers: local class NAME, export class NAME

Class Expression

There is also a class expression, which can be used e.g. when assigning to a variable:

pluto
local Human = class
function __construct(name)
self.name = name
end
end

Extends

The class statement also supports extends to specify a parent:

pluto
class Entity
age = 1
end
class Human extends Entity
end
local human = new Human()
print(human.age) -- 1

This also adds a __parent field to Human.

Try It Yourself

Parent Expression

The parent expression is a shorthand for self.__parent, which also supports method call syntax, in which case it's a shorthand for self.__parent.METHOD(self, ...).

pluto
class Entity
function __construct(name)
self.name = name
end
end
class Human extends Entity
-- If we don't define __construct, the parent-constructor would be called automatically.
-- However, if we overwrite it, we can use parent:__construct to call it manually.
function __construct(name)
parent:__construct(name)
end
end
local human = new Human("John")
print(human.name) -- "John"

Note that if you have a local variable (or function parameter) called "parent", the parent expression will defer to it.

Try It Yourself

Private Fields

Pluto allows you to specify if a field is 'public' or 'private'. Private fields can only be accessed by the class that defined them.

pluto
class Human
public name
private age
function __construct(name, age)
self.name = name
self.age = age
end
function getAge()
return self.age
end
end
local human = new Human("John", 42)
print(human.name) -- "John"
print(human:getAge()) -- 42
print(human.age) -- nil

Try It Yourself

Constructor Promotion

Because a common task of __construct methods is to assign the value of arguments to table fields, Pluto provides a simple syntax to reduce this boilerplate:

pluto
class Human
function __construct(public name, private age)
end
function getAge()
return self.age
end
end
local human = new Human("John", 42)
print(human.name) -- "John"
print(human:getAge()) -- 42
print(human.age) -- nil

Try It Yourself

Instanceof Operator

The instanceof operator can be used to check if a table is a class instance, including inherited classes:

pluto
class Entity end
class Human extends Entity end
local e = new Entity()
local h = new Human()
print(e instanceof Entity) -- true
print(e instanceof Human) -- false
print(h instanceof Entity) -- true (by inheritance)
print(h instanceof Human) -- true

It can also be used as a function:

pluto
class Entity end
local e = new Entity()
print(instanceof(e, Entity)) -- true

Try It Yourself

info

Note that, while the instanceof operator generates Lua-compatible bytecode, the instanceof function is a part of Pluto's standard library, and hence unavailable under Lua.

Using Compatibility Mode?

Some of the syntax discussed here may be different due to compatiblity mode:

  • new -> pluto_new
  • class -> pluto_class
  • parent -> pluto_parent

Alternatively, pluto_use new, class, parent will enable these keywords independently of environment settings.

- +

Object-Oriented Programming

Pluto makes a plethora of improvements when it comes to object-oriented programming.

Method Creation

A series of methods was otherwise ugly to implement into a Lua table.

Old Code
pluto
local t = {}
function t:f1(...) end
function t:f2(...) end
function t:f3(...) end

Now, you can inline these statements inside of your table.

New Code
pluto
local t = {
function f1() end,
function f2() end,
function f3() end
}

This automatically marks the functions as methods.

caution

Keep in mind, this produces methods, meaning you'll need to use the colon invocation syntax to avoid positional ambiguities in your parameters.

Static Functions

For consistency with the above syntax, you can use 'static function' to declare non-method functions in your tables:

pluto
local t = {
static function say(msg)
print(msg)
end
}
t.say("Hello") -- "Hello"

Try It Yourself

New Operator

Pluto adds an easy way to make instances with the new operator. This operator will also call the __construct method if it exists.

pluto
local Human = {
function __construct(name)
self.name = name
end
}
local john = new Human("John")
print(john.name) -- John

Try It Yourself

Note that for compatibility with Lua and C API classes, the new operator checks for the existence of a static 'new' function. If it exists, new X(...) will be identical to X.new(...).

Class Statement

The class statement is similar to a table constructor, but it does not require commas or semicolons:

pluto
class Human
function __construct(name)
self.name = name
end
function __gc()
print(self.name .. " died of irrelevance")
end
end
local john = new Human("John")

The class statement also supports modifiers: local class NAME, export class NAME

Class Expression

There is also a class expression, which can be used e.g. when assigning to a variable:

pluto
local Human = class
function __construct(name)
self.name = name
end
end

Extends

The class statement also supports extends to specify a parent:

pluto
class Entity
age = 1
end
class Human extends Entity
end
local human = new Human()
print(human.age) -- 1

This also adds a __parent field to Human.

Try It Yourself

Parent Expression

The parent expression is a shorthand for self.__parent, which also supports method call syntax, in which case it's a shorthand for self.__parent.METHOD(self, ...).

pluto
class Entity
function __construct(name)
self.name = name
end
end
class Human extends Entity
-- If we don't define __construct, the parent-constructor would be called automatically.
-- However, if we overwrite it, we can use parent:__construct to call it manually.
function __construct(name)
parent:__construct(name)
end
end
local human = new Human("John")
print(human.name) -- "John"

Note that if you have a local variable (or function parameter) called "parent", the parent expression will defer to it.

Try It Yourself

Private Fields

Pluto allows you to specify if a field is 'public' or 'private'. Private fields can only be accessed by the class that defined them.

pluto
class Human
public name
private age
function __construct(name, age)
self.name = name
self.age = age
end
function getAge()
return self.age
end
end
local human = new Human("John", 42)
print(human.name) -- "John"
print(human:getAge()) -- 42
print(human.age) -- nil

Try It Yourself

Constructor Promotion

Because a common task of __construct methods is to assign the value of arguments to table fields, Pluto provides a simple syntax to reduce this boilerplate:

pluto
class Human
function __construct(public name, private age)
end
function getAge()
return self.age
end
end
local human = new Human("John", 42)
print(human.name) -- "John"
print(human:getAge()) -- 42
print(human.age) -- nil

Try It Yourself

Instanceof Operator

The instanceof operator can be used to check if a table is a class instance, including inherited classes:

pluto
class Entity end
class Human extends Entity end
local e = new Entity()
local h = new Human()
print(e instanceof Entity) -- true
print(e instanceof Human) -- false
print(h instanceof Entity) -- true (by inheritance)
print(h instanceof Human) -- true

It can also be used as a function:

pluto
class Entity end
local e = new Entity()
print(instanceof(e, Entity)) -- true

Try It Yourself

info

Note that, while the instanceof operator generates Lua-compatible bytecode, the instanceof function is a part of Pluto's standard library, and hence unavailable under Lua.

Using Compatibility Mode?

Some of the syntax discussed here may be different due to compatiblity mode:

  • new -> pluto_new
  • class -> pluto_class
  • parent -> pluto_parent

Alternatively, pluto_use new, class, parent will enable these keywords independently of environment settings.

+ \ No newline at end of file diff --git a/docs/New Features/Safe Navigation.html b/docs/New Features/Safe Navigation.html index 4386a40b..99eae843 100644 --- a/docs/New Features/Safe Navigation.html +++ b/docs/New Features/Safe Navigation.html @@ -4,13 +4,13 @@ Safe Navigation | Pluto - +
-

Safe Navigation

For Member Access

Accessing deeply nested fields which can potentially be nil was problematic, because you'd need an unreasonable amount of guard clauses to prevent an "attempt to index nil" error. Pluto now offers this syntax:

Basic Usage
pluto
local person = {
name = "Alice"
}
local pet_name = person.pet?.name

In this example, person.pet is nil. However, this does not throw an "attempt to index nil" error. pet_name is simply set to nil.

Practical Usage
pluto
-- Pretend userConfig is parsed from a JSON file, or something.
--- Returning the user's preferred color, or Red if they have no preferred color.
local function get_color()
return userConfig.colors?.preferred ?? "Red"
end
print(get_color())

In this example, we also use the null coalescing operator ??.

info

These cannot be used for statements, like a?.b?.c = 0. They're only valid as expressions.

Safe Navigation (for member access) was written by Sven Olsen.

For Method Calls

Similarly, if you want to have optional hook functions, you can use safe method calls instead of writing conditionals:

Lua Way
pluto
if self.onEvent then
self:onEvent(event)
end
Pluto Way
pluto
self:onEvent?(event)

You can also check if the left-hand side of : is not nil:

pluto
object?:onEvent(event) -- 'object' may be nil
object?:onEvent?(event) -- 'object' and 'object.onEvent' may be nil

Note that this feature will truncate multiple return values if they're not used as part of a fixed assignment:

pluto
function myfunc()
return 1, 2
end
local a, b, c = _G:myfunc?()
print(a, b, c) --> 1 2 nil
print(_G:myfunc?()) --> 1
- +

Safe Navigation

For Member Access

Accessing deeply nested fields which can potentially be nil was problematic, because you'd need an unreasonable amount of guard clauses to prevent an "attempt to index nil" error. Pluto now offers this syntax:

Basic Usage
pluto
local person = {
name = "Alice"
}
local pet_name = person.pet?.name

In this example, person.pet is nil. However, this does not throw an "attempt to index nil" error. pet_name is simply set to nil.

Practical Usage
pluto
-- Pretend userConfig is parsed from a JSON file, or something.
--- Returning the user's preferred color, or Red if they have no preferred color.
local function get_color()
return userConfig.colors?.preferred ?? "Red"
end
print(get_color())

In this example, we also use the null coalescing operator ??.

info

These cannot be used for statements, like a?.b?.c = 0. They're only valid as expressions.

Safe Navigation (for member access) was written by Sven Olsen.

For Method Calls

Similarly, if you want to have optional hook functions, you can use safe method calls instead of writing conditionals:

Lua Way
pluto
if self.onEvent then
self:onEvent(event)
end
Pluto Way
pluto
self:onEvent?(event)

You can also check if the left-hand side of : is not nil:

pluto
object?:onEvent(event) -- 'object' may be nil
object?:onEvent?(event) -- 'object' and 'object.onEvent' may be nil

Note that this feature will truncate multiple return values if they're not used as part of a fixed assignment:

pluto
function myfunc()
return 1, 2
end
local a, b, c = _G:myfunc?()
print(a, b, c) --> 1 2 nil
print(_G:myfunc?()) --> 1
+ \ No newline at end of file diff --git a/docs/New Features/String Indexing.html b/docs/New Features/String Indexing.html index d809c7fa..784dca95 100644 --- a/docs/New Features/String Indexing.html +++ b/docs/New Features/String Indexing.html @@ -4,13 +4,13 @@ String Indexing | Pluto - +
-

String Indexing

You can index strings for their characters now, which is cleaner & 3x faster than using string.sub. String indexing only occurs when you index with an integer, either positive or negative. Positive integers index from the start of the string, and negative integers index from the end.

Example Code
pluto
local str = "hello world"
print(str[5]) -- "o"
print(str[200]) -- nil
print(str[-1]) -- "d"

Any character-intensive task — for example, a hash algorithm — will greatly benefit from this.

Try It Yourself

caution

The bytecode of this feature is not backwards-compatible with Lua.

- +

String Indexing

You can index strings for their characters now, which is cleaner & 3x faster than using string.sub. String indexing only occurs when you index with an integer, either positive or negative. Positive integers index from the start of the string, and negative integers index from the end.

Example Code
pluto
local str = "hello world"
print(str[5]) -- "o"
print(str[200]) -- nil
print(str[-1]) -- "d"

Any character-intensive task — for example, a hash algorithm — will greatly benefit from this.

Try It Yourself

caution

The bytecode of this feature is not backwards-compatible with Lua.

+ \ No newline at end of file diff --git a/docs/New Features/String Interpolation.html b/docs/New Features/String Interpolation.html index 4c746e14..bce7be1c 100644 --- a/docs/New Features/String Interpolation.html +++ b/docs/New Features/String Interpolation.html @@ -4,13 +4,13 @@ String Interpolation | Pluto - +
-

String Interpolation

String interpolation is a simple alternative syntax to concatenation.

Concatenation
pluto
local label = "meaning of life"
local data = { value = 42 }
print("The " .. label .. " is " .. data.value) -- "The meaning of life is 42"
String Interpolation
pluto
local label = "meaning of life"
local data = { value = 42 }
print($"The {label} is {data.value}") -- "The meaning of life is 42"

Try It Yourself

As you can see, you declare a string interpolated by prefixing it with the "$" symbol. Brackets can contain any expression. The result of expressions will be converted to a string as with normal concatenation, although note that Pluto supports boolean concatenation unlike Lua.

- +

String Interpolation

String interpolation is a simple alternative syntax to concatenation.

Concatenation
pluto
local label = "meaning of life"
local data = { value = 42 }
print("The " .. label .. " is " .. data.value) -- "The meaning of life is 42"
String Interpolation
pluto
local label = "meaning of life"
local data = { value = 42 }
print($"The {label} is {data.value}") -- "The meaning of life is 42"

Try It Yourself

As you can see, you declare a string interpolated by prefixing it with the "$" symbol. Brackets can contain any expression. The result of expressions will be converted to a string as with normal concatenation, although note that Pluto supports boolean concatenation unlike Lua.

+ \ No newline at end of file diff --git a/docs/New Features/Switch Blocks.html b/docs/New Features/Switch Blocks.html index ae1ed9e5..b446fee0 100644 --- a/docs/New Features/Switch Blocks.html +++ b/docs/New Features/Switch Blocks.html @@ -4,13 +4,13 @@ Switch Blocks | Pluto - +
-

Switch Blocks

Switch blocks consists of the following new keywords:

  • case
  • switch
  • default

Switch Statement

pluto
local value = 1
switch value do
case 1:
print("There is only one!")
break
case 2:
print("There is only two!")
break
end
-- Break jumps here.

Switch statements also support fallthrough.

pluto
local value = 1
switch value do
case 1:
case 2:
case 3:
case 4:
case 5:
print("Got 1-5.")
break
default:
print("Value is greater than 5.")
end
-- Break jumps here.

In this example, cases 1-4 fall through to case 5.

Remember to use break whenever you do not want fallthrough. Here is an example of a potential bug:

pluto
local value = 1
switch value do
case 1:
print("There is only one!")
case 2:
print("There is only two!")
end
-- Output:
-- There is only one!
-- There is only two! <-- Uh oh.

The default case is executed if none of the other cases are true. For example:

pluto
local value = 1
switch value do
case 2:
case 3:
break
default:
print("Value is neither 2 nor 3!")
end

The default case can be placed anywhere in the block. It also supports fallthrough, so remember to use break if you place it above any cases.

Try It Yourself

Case Blocks

Any expression can be used for the case condition:

pluto
switch true do
case 42 == 42:
print("42 is 42 is true")
break
end

There is a short-hand fallthrough syntax:

pluto
switch value do
case 1, 2, 3:
print("1-3")
break
case 4, 5, 6:
print("4-6")
break
end

However, note that method calls needs to be encapsulated with parentheses:

pluto
local t = {
function getVal()
return 42
end
}
switch 42 do
case t:getVal(): -- This is interpreted as `case t: getVal():print("val is 42")`
print("val is 42")
break
case (t:getVal()): -- This works as expected
print("val is 42")
break
end

Switch Expression

Just like ternary expressions, these allow you to conditionally provide values, with massively simplified case blocks:

pluto
local place = 1
place = switch place do
case 1 -> "1st"
case 2 -> "2nd"
case 3 -> "3rd"
default -> $"{place}th"
end
print(place) --> 1st

Note that the case blocks here have their conditions delimited by an arrow (->) instead of a colon (:).

Try It Yourself

Despite not being able to manually fall through, the shorthand fallthrough syntax still works:

pluto
local function print_range(value)
print(switch value do
case 1, 2, 3 -> "1-3"
case 4, 5, 6 -> "4-6"
end)
end
print_range(1) --> 1-3
print_range(6) --> 4-6
print_range(9) --> nil

Notice how the default case was omitted in this example, so it was implicitly set to default -> nil.

Try It Yourself

Using Compatibility Mode?

You may need to use pluto_switch instead of switch. Alternatively, pluto_use switch will enable the keyword independently of environment settings.

- +

Switch Blocks

Switch blocks consists of the following new keywords:

  • case
  • switch
  • default

Switch Statement

pluto
local value = 1
switch value do
case 1:
print("There is only one!")
break
case 2:
print("There is only two!")
break
end
-- Break jumps here.

Switch statements also support fallthrough.

pluto
local value = 1
switch value do
case 1:
case 2:
case 3:
case 4:
case 5:
print("Got 1-5.")
break
default:
print("Value is greater than 5.")
end
-- Break jumps here.

In this example, cases 1-4 fall through to case 5.

Remember to use break whenever you do not want fallthrough. Here is an example of a potential bug:

pluto
local value = 1
switch value do
case 1:
print("There is only one!")
case 2:
print("There is only two!")
end
-- Output:
-- There is only one!
-- There is only two! <-- Uh oh.

The default case is executed if none of the other cases are true. For example:

pluto
local value = 1
switch value do
case 2:
case 3:
break
default:
print("Value is neither 2 nor 3!")
end

The default case can be placed anywhere in the block. It also supports fallthrough, so remember to use break if you place it above any cases.

Try It Yourself

Case Blocks

Any expression can be used for the case condition:

pluto
switch true do
case 42 == 42:
print("42 is 42 is true")
break
end

There is a short-hand fallthrough syntax:

pluto
switch value do
case 1, 2, 3:
print("1-3")
break
case 4, 5, 6:
print("4-6")
break
end

However, note that method calls needs to be encapsulated with parentheses:

pluto
local t = {
function getVal()
return 42
end
}
switch 42 do
case t:getVal(): -- This is interpreted as `case t: getVal():print("val is 42")`
print("val is 42")
break
case (t:getVal()): -- This works as expected
print("val is 42")
break
end

Switch Expression

Just like ternary expressions, these allow you to conditionally provide values, with massively simplified case blocks:

pluto
local place = 1
place = switch place do
case 1 -> "1st"
case 2 -> "2nd"
case 3 -> "3rd"
default -> $"{place}th"
end
print(place) --> 1st

Note that the case blocks here have their conditions delimited by an arrow (->) instead of a colon (:).

Try It Yourself

Despite not being able to manually fall through, the shorthand fallthrough syntax still works:

pluto
local function print_range(value)
print(switch value do
case 1, 2, 3 -> "1-3"
case 4, 5, 6 -> "4-6"
end)
end
print_range(1) --> 1-3
print_range(6) --> 4-6
print_range(9) --> nil

Notice how the default case was omitted in this example, so it was implicitly set to default -> nil.

Try It Yourself

Using Compatibility Mode?

You may need to use pluto_switch instead of switch. Alternatively, pluto_use switch will enable the keyword independently of environment settings.

+ \ No newline at end of file diff --git a/docs/New Features/Table Freezing.html b/docs/New Features/Table Freezing.html index ad79eff0..992656bc 100644 --- a/docs/New Features/Table Freezing.html +++ b/docs/New Features/Table Freezing.html @@ -4,13 +4,13 @@ Table Freezing | Pluto - +
-

Table Freezing

Tables can now be frozen at their current state to forbid any future modification. This action is irreversible and permanent for the lifespan of the table.

pluto
-- Disallowing any edits to the global environment table.
table.freeze(_G)
_G.string = {}
-- file.pluto:4: attempt to modify frozen table.
pluto
-- Creating a constant local that's associated with a frozen table.
local Frozen <const> = table.freeze({ 1, 2, 3 })
Frozen = {}
-- file.pluto:4: attempt to reassign constant.
Frozen[1] = "new value"
-- file.pluto:7: attempt to modify frozen table.
rawset(Frozen, "key", "value")
-- file.pluto:10: attempt to modify frozen table.
pluto
--- Trying to swap the value with the debug library.
for i = 1, 249 do
local name, value = debug.getlocal(1, i)
if name == "Frozen" then
debug.setlocal(1, i, { ["key"] = "hello world" })
-- file.pluto:5: attempt to modify local variable with a frozen table.
end
end

What will this prevent?

All modifications to the table from within the Lua environment will be prevented, including those from the debug library.

caution

If you're going to use this for a sandbox, ensure you call table.freeze before any users can access the Lua environment, otherwise they can replace that function.

- +

Table Freezing

Tables can now be frozen at their current state to forbid any future modification. This action is irreversible and permanent for the lifespan of the table.

pluto
-- Disallowing any edits to the global environment table.
table.freeze(_G)
_G.string = {}
-- file.pluto:4: attempt to modify frozen table.
pluto
-- Creating a constant local that's associated with a frozen table.
local Frozen <const> = table.freeze({ 1, 2, 3 })
Frozen = {}
-- file.pluto:4: attempt to reassign constant.
Frozen[1] = "new value"
-- file.pluto:7: attempt to modify frozen table.
rawset(Frozen, "key", "value")
-- file.pluto:10: attempt to modify frozen table.
pluto
--- Trying to swap the value with the debug library.
for i = 1, 249 do
local name, value = debug.getlocal(1, i)
if name == "Frozen" then
debug.setlocal(1, i, { ["key"] = "hello world" })
-- file.pluto:5: attempt to modify local variable with a frozen table.
end
end

What will this prevent?

All modifications to the table from within the Lua environment will be prevented, including those from the debug library.

caution

If you're going to use this for a sandbox, ensure you call table.freeze before any users can access the Lua environment, otherwise they can replace that function.

+ \ No newline at end of file diff --git a/docs/New Features/Ternary Expressions.html b/docs/New Features/Ternary Expressions.html index fcb4f761..81565c3f 100644 --- a/docs/New Features/Ternary Expressions.html +++ b/docs/New Features/Ternary Expressions.html @@ -4,13 +4,13 @@ Ternary Expressions | Pluto - +
-

Ternary Expressions

Ternary expressions behave identical as to how they would in C. They introduce no new keywords.

Old Code
pluto
local max
if a > b then
max = a
else
max = b
end
New Code
pluto
local max = a > b ? a : b

Try It Yourself

Doesn't Lua already have ternaries?

While it is true that you can do something like this:

pluto
local max = a > b and a or b

Keep in mind that this falls apart when the true-expression has a falsy value:

pluto
local x = -1
x = (x == -1 and nil or x)

In this case, x will be -1 despite the intention being to set it to nil. There are no such issues using Pluto's ternary expressions.

- +

Ternary Expressions

Ternary expressions behave identical as to how they would in C. They introduce no new keywords.

Old Code
pluto
local max
if a > b then
max = a
else
max = b
end
New Code
pluto
local max = a > b ? a : b

Try It Yourself

Doesn't Lua already have ternaries?

While it is true that you can do something like this:

pluto
local max = a > b and a or b

Keep in mind that this falls apart when the true-expression has a falsy value:

pluto
local x = -1
x = (x == -1 and nil or x)

In this case, x will be -1 despite the intention being to set it to nil. There are no such issues using Pluto's ternary expressions.

+ \ No newline at end of file diff --git a/docs/New Features/Try-Catch Statement.html b/docs/New Features/Try-Catch Statement.html index eff17f30..9170ba79 100644 --- a/docs/New Features/Try-Catch Statement.html +++ b/docs/New Features/Try-Catch Statement.html @@ -4,13 +4,13 @@ Try-Catch Statement | Pluto - +
-

Try-Catch Statement

Pluto provides a more intuitive way to handle errors than pcall and xpcall.

pluto
local function get_fruit_rating(fruit)
return switch fruit do
case "apple" -> 8
case "banana" -> 7
case "orange" -> 9
case "mango" -> 10
case "grape" -> 6
case "strawberry" -> 9
case "cucumber", "tomato" -> error("What are you, a botanist?")
end
end
local function try_get_fruit_rating(fruit)
try
return get_fruit_rating(fruit)
catch e then
if e:find("What are you, a botanist?") then
return -10
end
end
end
print(try_get_fruit_rating("apple")) --> 8
print(try_get_fruit_rating("cucumber")) --> -10
print(try_get_fruit_rating("car")) --> nil

Try It Yourself

Using Compatibility Mode?

You may need to use pluto_try and pluto_catch instead. Alternatively, pluto_use try, catch will enable both keywords independently of the environment settings.

- +

Try-Catch Statement

Pluto provides a more intuitive way to handle errors than pcall and xpcall.

pluto
local function get_fruit_rating(fruit)
return switch fruit do
case "apple" -> 8
case "banana" -> 7
case "orange" -> 9
case "mango" -> 10
case "grape" -> 6
case "strawberry" -> 9
case "cucumber", "tomato" -> error("What are you, a botanist?")
end
end
local function try_get_fruit_rating(fruit)
try
return get_fruit_rating(fruit)
catch e then
if e:find("What are you, a botanist?") then
return -10
end
end
end
print(try_get_fruit_rating("apple")) --> 8
print(try_get_fruit_rating("cucumber")) --> -10
print(try_get_fruit_rating("car")) --> nil

Try It Yourself

Using Compatibility Mode?

You may need to use pluto_try and pluto_catch instead. Alternatively, pluto_use try, catch will enable both keywords independently of the environment settings.

+ \ No newline at end of file diff --git a/docs/New Features/Type Hinting.html b/docs/New Features/Type Hinting.html index 412a9c58..191c933d 100644 --- a/docs/New Features/Type Hinting.html +++ b/docs/New Features/Type Hinting.html @@ -4,13 +4,13 @@ Type Hinting | Pluto - +
-

Type Hinting

Type-hinting looks like this:

pluto
local var: string = "hello world"

It works with functions too:

pluto
local function myfunc(a: string, b: string): number
return tonumber(a) + tonumber(b)
end
print(myfunc(1, "1")) -- This will emit a warning for argument type mismatch.

There's no effect on performance. This is implemented entirely during the compilation phase.

What types can I use?

  • string
  • number
    • int
    • float
  • boolean/bool
  • function
  • table
  • userdata
  • void (return type only)

Prefix a ? to indicate nil-able types, e.g. ?string indicates that it may be nil or a string.

You can also use | to delimit alternatives, e.g. string|int indicates that it may be a string or an int.

Putting all of this together, we could also have e.g. ?string|int to indicate that it may be nil, a string, or an int.

info

This is a WIP feature, and it's very difficult to implement in a one-pass compiler. Allow tolerance for missing coverage, and report any bugs.

- +

Type Hinting

Type-hinting looks like this:

pluto
local var: string = "hello world"

It works with functions too:

pluto
local function myfunc(a: string, b: string): number
return tonumber(a) + tonumber(b)
end
print(myfunc(1, "1")) -- This will emit a warning for argument type mismatch.

There's no effect on performance. This is implemented entirely during the compilation phase.

What types can I use?

  • string
  • number
    • int
    • float
  • boolean/bool
  • function
  • table
  • userdata
  • void (return type only)

Prefix a ? to indicate nil-able types, e.g. ?string indicates that it may be nil or a string.

You can also use | to delimit alternatives, e.g. string|int indicates that it may be a string or an int.

Putting all of this together, we could also have e.g. ?string|int to indicate that it may be nil, a string, or an int.

info

This is a WIP feature, and it's very difficult to implement in a one-pass compiler. Allow tolerance for missing coverage, and report any bugs.

+ \ No newline at end of file diff --git a/docs/New Operators.html b/docs/New Operators.html index 2a6cefc0..f871f83f 100644 --- a/docs/New Operators.html +++ b/docs/New Operators.html @@ -4,13 +4,13 @@ New Operators | Pluto - +
-

New Operators

Operator Aliases

These operators function the same, but they're more consistent with what's been standardized through programming today.

  • ! is an alias for not, the boolean inversion operator.
  • != is an alias for ~=, the inequality operator.

Compound Operators

A plethora of compound operators are available in Pluto:

  • Addition: +=
  • Subtraction: -=
  • Multiplication: *=
  • Float division: /=
  • Integer division: //=
  • Modulo: %=
  • Exponent: ^=
  • Bitwise AND: &=
  • Bitwise OR: |=
  • Bitwise XOR: ~=
    • In Lua, the inequality operator cannot be used in statements. It must be used in expressions. Because compound operators can only be used in statements (and cannot be used in expressions), this is not a compatibility break.
  • Bitshift left: <<=
  • Bitshift right: >>=
  • Concatenation: ..=
  • Nil-Coalescing: ??=
pluto
local a = 1
a = a + 1
a += 1
info

Compound operators are syntactic sugar. They'll call the same metamethods as their non-compound counterparts.

Coalescing Operator

The nil-coalescing operator is helpful for evaluating values against nil.

If the left-hand operand is nil, it returns the right-hand operand. Otherwise, it returns the left-hand operand.

pluto
local function say(message)
print(message ?? "The message was nil.")
end
say() --> The message was nil.
say(nil) --> The message was nil.
say("Hello, world!") --> Hello, world!

It's a cleaner version of this code:

pluto
local function say(message)
if message == nil then
message = "The message was nil."
end
print(message)
end
say() --> The message was nil.
say(nil) --> The message was nil.
say("Hello, world!") --> Hello, world!

You can even use compound assignment:

pluto
local function say(message)
message ??= "The message was nil."
print(message)
end
say() --> The message was nil.
say(nil) --> The message was nil.
say("Hello, world!") --> Hello, world!
info

This operator does not implement any metamethods.

Walrus Operator

The Walrus operator allows you to perform assignments inside of conditional expresssions.

pluto
if a := get_value() then
-- 'a' was assigned a truthy value.
else
-- 'a' was assigned a falsy value.
end

You can imagine it like this, but note they're not always the same:

pluto
do
local a = get_value()
if a then
-- 'a' was assigned a truthy value.
else
-- 'a' was assigned a falsy value.
end
end

Note that for while-loops, it will be executed as many times as the condition:

Pluto Way
pluto
while a := next_value() do
-- ...
end
Lua Way
pluto
while true do
local a = next_value()
if not a then break end
-- ...
end

Spaceship Operator

The spaceship operator, also known as the three-way comparison operator, allows you to quickly compare 2 values for equality and order.

pluto
local eq = 1 <=> 1
local lt = 3 <=> 42
local gt = 9 <=> 5
print(eq, lt, gt) --> 0, -1, 1

It works with any type that supports __eq and __lt, making it well-suited for usage in generic algorithms like sorting. The return values are designed such that you can compare them to 0, e.g. with the values from above:

pluto
print(eq <= 0) --> true
print(lt <= 0) --> true
print(gt <= 0) --> false

Pipe Operator

The pipe operator allows you represent data pipelines more succinctly.

pluto
local { http, json } = require "pluto:*"
http.request("https://httpbin.org/get")
|> json.decode
|> dumpvar
|> print
--> {
--> ["args"] = {},
--> ["headers"] = {
--> ["Host"] = string(11) "httpbin.org",
--> ["User-Agent"] = string(56) "Mozilla/5.0 (compatible; Soup Library; +https://soup.do)",
--> ["X-Amzn-Trace-Id"] = string(40) "Root=1-65e05b66-6aa8b7c94e7580774a804c24",
--> ["Accept-Encoding"] = string(13) "deflate, gzip",
--> },
--> ["origin"] = string(13) "1.2.3.4",
--> ["url"] = string(23) "https://httpbin.org/get",
--> }

Try It Yourself

The HTTP-to-print pipeline here would otherwise be written like this:

pluto
print(dumpvar(json.decode((http.request("https://httpbin.org/get")))))

Note that the pipe operator only passes on the first return value, which is classically achieved by wrapping the expression in an extra pair of parentheses.

Additional Arguments

It is also possible to provide additional arguments for the righthand side of the pipe operator:

pluto
local producer = || -> "10"
producer()
|> tonumber|16|
|> print --> 16

Try It Yourself

Methods Calls

There is specialized syntax for method calls with the pipe operator, too:

pluto
local producer = || -> 21
local obj = {
function multiply(value)
return value * self.factor
end
}
obj.factor = 2
producer()
|> obj:multiply
|> print --> 42

Try It Yourself

Anonymous Functions

The righthand side of the pipe operator can also be an anonymous function, allowing for more advanced usage like this:

pluto
local producer = || -> 42
producer()
|> |res| -> print($"The result was {res}")
--> The result was 42

Try It Yourself

- +

New Operators

Operator Aliases

These operators function the same, but they're more consistent with what's been standardized through programming today.

  • ! is an alias for not, the boolean inversion operator.
  • != is an alias for ~=, the inequality operator.

Compound Operators

A plethora of compound operators are available in Pluto:

  • Addition: +=
  • Subtraction: -=
  • Multiplication: *=
  • Float division: /=
  • Integer division: //=
  • Modulo: %=
  • Exponent: ^=
  • Bitwise AND: &=
  • Bitwise OR: |=
  • Bitwise XOR: ~=
    • In Lua, the inequality operator cannot be used in statements. It must be used in expressions. Because compound operators can only be used in statements (and cannot be used in expressions), this is not a compatibility break.
  • Bitshift left: <<=
  • Bitshift right: >>=
  • Concatenation: ..=
  • Nil-Coalescing: ??=
pluto
local a = 1
a = a + 1
a += 1
info

Compound operators are syntactic sugar. They'll call the same metamethods as their non-compound counterparts.

Coalescing Operator

The nil-coalescing operator is helpful for evaluating values against nil.

If the left-hand operand is nil, it returns the right-hand operand. Otherwise, it returns the left-hand operand.

pluto
local function say(message)
print(message ?? "The message was nil.")
end
say() --> The message was nil.
say(nil) --> The message was nil.
say("Hello, world!") --> Hello, world!

It's a cleaner version of this code:

pluto
local function say(message)
if message == nil then
message = "The message was nil."
end
print(message)
end
say() --> The message was nil.
say(nil) --> The message was nil.
say("Hello, world!") --> Hello, world!

You can even use compound assignment:

pluto
local function say(message)
message ??= "The message was nil."
print(message)
end
say() --> The message was nil.
say(nil) --> The message was nil.
say("Hello, world!") --> Hello, world!
info

This operator does not implement any metamethods.

Walrus Operator

The Walrus operator allows you to perform assignments inside of conditional expresssions.

pluto
if a := get_value() then
-- 'a' was assigned a truthy value.
else
-- 'a' was assigned a falsy value.
end

You can imagine it like this, but note they're not always the same:

pluto
do
local a = get_value()
if a then
-- 'a' was assigned a truthy value.
else
-- 'a' was assigned a falsy value.
end
end

Note that for while-loops, it will be executed as many times as the condition:

Pluto Way
pluto
while a := next_value() do
-- ...
end
Lua Way
pluto
while true do
local a = next_value()
if not a then break end
-- ...
end

Spaceship Operator

The spaceship operator, also known as the three-way comparison operator, allows you to quickly compare 2 values for equality and order.

pluto
local eq = 1 <=> 1
local lt = 3 <=> 42
local gt = 9 <=> 5
print(eq, lt, gt) --> 0, -1, 1

It works with any type that supports __eq and __lt, making it well-suited for usage in generic algorithms like sorting. The return values are designed such that you can compare them to 0, e.g. with the values from above:

pluto
print(eq <= 0) --> true
print(lt <= 0) --> true
print(gt <= 0) --> false

Pipe Operator

The pipe operator allows you represent data pipelines more succinctly.

pluto
local { http, json } = require "pluto:*"
http.request("https://httpbin.org/get")
|> json.decode
|> dumpvar
|> print
--> {
--> ["args"] = {},
--> ["headers"] = {
--> ["Host"] = string(11) "httpbin.org",
--> ["User-Agent"] = string(56) "Mozilla/5.0 (compatible; Soup Library; +https://soup.do)",
--> ["X-Amzn-Trace-Id"] = string(40) "Root=1-65e05b66-6aa8b7c94e7580774a804c24",
--> ["Accept-Encoding"] = string(13) "deflate, gzip",
--> },
--> ["origin"] = string(13) "1.2.3.4",
--> ["url"] = string(23) "https://httpbin.org/get",
--> }

Try It Yourself

The HTTP-to-print pipeline here would otherwise be written like this:

pluto
print(dumpvar(json.decode((http.request("https://httpbin.org/get")))))

Note that the pipe operator only passes on the first return value, which is classically achieved by wrapping the expression in an extra pair of parentheses.

Additional Arguments

It is also possible to provide additional arguments for the righthand side of the pipe operator:

pluto
local producer = || -> "10"
producer()
|> tonumber|16|
|> print --> 16

Try It Yourself

Methods Calls

There is specialized syntax for method calls with the pipe operator, too:

pluto
local producer = || -> 21
local obj = {
function multiply(value)
return value * self.factor
end
}
obj.factor = 2
producer()
|> obj:multiply
|> print --> 42

Try It Yourself

Anonymous Functions

The righthand side of the pipe operator can also be an anonymous function, allowing for more advanced usage like this:

pluto
local producer = || -> 42
producer()
|> |res| -> print($"The result was {res}")
--> The result was 42

Try It Yourself

+ \ No newline at end of file diff --git a/docs/Optimizations/For Loops.html b/docs/Optimizations/For Loops.html index 2becc7f5..0cc7ece7 100644 --- a/docs/Optimizations/For Loops.html +++ b/docs/Optimizations/For Loops.html @@ -4,13 +4,13 @@ For Loops | Pluto - +
-

For Loops

The pairs and ipairs functions are optimized in Pluto. On a consistent basis, pairs & ipairs loops are 3.5x faster than their Lua counterparts.

How does it work?

It doesn't operate under all circumstances though, the state of the iterator is stored in the to-be-closed variable returned by these functions, which is the last variable they give. If you interact or modify this variable, then the optimization won't occur.

pairs: next, table, nil, nil
ipairs: ipairsaux, table, integer, nil

As long as you don't access the last nil value, you're fine.

info

This optimization was published and implemented entirely by Xmelia Hermit.

- +

For Loops

The pairs and ipairs functions are optimized in Pluto. On a consistent basis, pairs & ipairs loops are 3.5x faster than their Lua counterparts.

How does it work?

It doesn't operate under all circumstances though, the state of the iterator is stored in the to-be-closed variable returned by these functions, which is the last variable they give. If you interact or modify this variable, then the optimization won't occur.

pairs: next, table, nil, nil
ipairs: ipairsaux, table, integer, nil

As long as you don't access the last nil value, you're fine.

info

This optimization was published and implemented entirely by Xmelia Hermit.

+ \ No newline at end of file diff --git a/docs/Optimizations/Jump Table.html b/docs/Optimizations/Jump Table.html index 4b112189..c0d4de99 100644 --- a/docs/Optimizations/Jump Table.html +++ b/docs/Optimizations/Jump Table.html @@ -4,13 +4,13 @@ Jump Table | Pluto - +

Jump Table

Lua implemented a jump table, but it is only compatible with clang and gcc. Pluto has an additional jump table implementation for other compilers; however, it is not enabled by default because it can add minutes to compile time, depending on the setup. However, it may be beneficial to you regardless, as a jump table can increase virtual machine performance by up to 5%.

If you would like to try it, define PLUTO_FORCE_JUMPTABLE in luaconf.h or your build config.

- + \ No newline at end of file diff --git a/docs/Optimizations/Special Arithmetic.html b/docs/Optimizations/Special Arithmetic.html index 8726c585..43bcf4f0 100644 --- a/docs/Optimizations/Special Arithmetic.html +++ b/docs/Optimizations/Special Arithmetic.html @@ -4,13 +4,13 @@ Special Arithmetic | Pluto - +

Special Arithmetic

Special arithmetic algorithms are optimized by Pluto during compile-time.

For example:

  • x << 1 => x + x
  • x ** 2 => x * x
  • x // 2 => x >> 1

These can offer upwards of a 20% performance boost.

These expressions are only optimized when both operands are integers, and no metamethod will be called.

- + \ No newline at end of file diff --git a/docs/Optimizations/Table Length.html b/docs/Optimizations/Table Length.html index 2db2cf3a..1ba44e11 100644 --- a/docs/Optimizations/Table Length.html +++ b/docs/Optimizations/Table Length.html @@ -4,13 +4,13 @@ Table Length | Pluto - +

Table Length

Pluto will cache the length of a table when you request it for the first time. This cache is refreshed whenever you make an edit to the table. It's still advisable to localize this value though, since looking through the cache and the virtual machine is expensive compared to looking up a local.

- + \ No newline at end of file diff --git a/docs/QoL Improvements/Boolean Concatenation.html b/docs/QoL Improvements/Boolean Concatenation.html index ee3149a4..1dcc8081 100644 --- a/docs/QoL Improvements/Boolean Concatenation.html +++ b/docs/QoL Improvements/Boolean Concatenation.html @@ -4,13 +4,13 @@ Boolean Concatenation | Pluto - +
-

Boolean Concatenation

Pluto allows you to concatenate boolean values just like you would number values:

pluto
local iVar = 13
local bVar = true
print("iVar = " .. iVar)
print("bVar = " .. tostring(bVar)) -- Lua way
print("bVar = " .. bVar) -- Pluto way
- +

Boolean Concatenation

Pluto allows you to concatenate boolean values just like you would number values:

pluto
local iVar = 13
local bVar = true
print("iVar = " .. iVar)
print("bVar = " .. tostring(bVar)) -- Lua way
print("bVar = " .. bVar) -- Pluto way
+ \ No newline at end of file diff --git a/docs/QoL Improvements/Generalized Iteration.html b/docs/QoL Improvements/Generalized Iteration.html index df46680d..3f9e0f72 100644 --- a/docs/QoL Improvements/Generalized Iteration.html +++ b/docs/QoL Improvements/Generalized Iteration.html @@ -4,13 +4,13 @@ Generalized Iteration | Pluto - +
-

Generalized Iteration

Pluto's virtual machine allows you to simply iterate over tables without having to explicitly call a function:

New Code
pluto
local t = { 1, 2, 3, "hello", "world" }
for key, value in t do
print(key, value)
end

When you omit the function from the loop preparation, next is implicitly inserted. So, that code is identical to this:

Old Code
pluto
local t = { 1, 2, 3, "hello", "world" }
for key, value in next(t) do
print(key, value)
end

This is compatible with for-loop optimizations.

caution

The bytecode of this feature is not backwards-compatible with Lua.

- +

Generalized Iteration

Pluto's virtual machine allows you to simply iterate over tables without having to explicitly call a function:

New Code
pluto
local t = { 1, 2, 3, "hello", "world" }
for key, value in t do
print(key, value)
end

When you omit the function from the loop preparation, next is implicitly inserted. So, that code is identical to this:

Old Code
pluto
local t = { 1, 2, 3, "hello", "world" }
for key, value in next(t) do
print(key, value)
end

This is compatible with for-loop optimizations.

caution

The bytecode of this feature is not backwards-compatible with Lua.

+ \ No newline at end of file diff --git a/docs/QoL Improvements/Optional Parentheses.html b/docs/QoL Improvements/Optional Parentheses.html index a6b1b727..9fc0711b 100644 --- a/docs/QoL Improvements/Optional Parentheses.html +++ b/docs/QoL Improvements/Optional Parentheses.html @@ -4,13 +4,13 @@ Optional Parentheses | Pluto - +
-

Optional Parentheses

The parenthesis around some types of expressions are optional now.

Gross Way
pluto
print(("hello world"):contains("world"))
Clean Way
pluto
print("hello world":contains("world"))

This also works for table types.

- +

Optional Parentheses

The parenthesis around some types of expressions are optional now.

Gross Way
pluto
print(("hello world"):contains("world"))
Clean Way
pluto
print("hello world":contains("world"))

This also works for table types.

+ \ No newline at end of file diff --git a/docs/QoL Improvements/Removed Locals Limit.html b/docs/QoL Improvements/Removed Locals Limit.html index cced673f..426acc6e 100644 --- a/docs/QoL Improvements/Removed Locals Limit.html +++ b/docs/QoL Improvements/Removed Locals Limit.html @@ -4,13 +4,13 @@ Removed Locals Limit | Pluto - +

Removed Locals Limit

Pluto removes the locals limit, allowing you to use compile-time constants, including enums, as much as you want.

Note that you are still limited to 255 registers, so you can't have infinite dynamic variables per function.

- + \ No newline at end of file diff --git a/docs/QoL Improvements/Reserved Identifiers.html b/docs/QoL Improvements/Reserved Identifiers.html index 6e8ebf31..a403cddf 100644 --- a/docs/QoL Improvements/Reserved Identifiers.html +++ b/docs/QoL Improvements/Reserved Identifiers.html @@ -4,13 +4,13 @@ Reserved Identifiers | Pluto - +
-

Reserved Identifiers

Pluto allows you to use reserved tokens such as if from Lua and class from Pluto as identifiers with shorthand table syntax and for goto labels.

Reserved tokens as identifiers with shorthand table syntax
pluto
local t = {
class = "key"
}
print(t.class)
Reserved tokens as identifiers for goto labels
pluto
-- Print every number besides five.
for i = 1, 10 do
if i == 5 then
goto continue
end
print(i)
::continue::
end

However, variable names and function calls will not allow you to use reserved tokens as identifiers.

- +

Reserved Identifiers

Pluto allows you to use reserved tokens such as if from Lua and class from Pluto as identifiers with shorthand table syntax and for goto labels.

Reserved tokens as identifiers with shorthand table syntax
pluto
local t = {
class = "key"
}
print(t.class)
Reserved tokens as identifiers for goto labels
pluto
-- Print every number besides five.
for i = 1, 10 do
if i == 5 then
goto continue
end
print(i)
::continue::
end

However, variable names and function calls will not allow you to use reserved tokens as identifiers.

+ \ No newline at end of file diff --git a/docs/QoL Improvements/Syntax Errors.html b/docs/QoL Improvements/Syntax Errors.html index 07efc9be..698607b7 100644 --- a/docs/QoL Improvements/Syntax Errors.html +++ b/docs/QoL Improvements/Syntax Errors.html @@ -4,17 +4,17 @@ Syntax Errors | Pluto - +
-

Syntax Errors

The messages for syntax errors are enhanced. They include tailored messages and code snippets, which should help newer programmers identify problems quicker. It's not a game changer, but it's neat.

Example 1

Problematic Code
pluto
if a < b and t == 5 return "Gottem" end
Emitted Syntax Error
syntax error: file.pluto:1: expected 'then' to delimit condition. +

Syntax Errors

The messages for syntax errors are enhanced. They include tailored messages and code snippets, which should help newer programmers identify problems quicker. It's not a game changer, but it's neat.

Example 1

Problematic Code
pluto
if a < b and t == 5 return "Gottem" end
Emitted Syntax Error
syntax error: file.pluto:1: expected 'then' to delimit condition. 1 | if a < b and t == 5 return "Gottem" end - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: expected 'then' symbol.

Example 2

Problematic Code
pluto
local fn = |a, b, c| => (a == b and a < c)
Emitted Syntax Error
syntax error: file.pluto:1: impromper lambda definition + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: expected 'then' symbol.

Example 2

Problematic Code
pluto
local fn = |a, b, c| => (a == b and a < c)
Emitted Syntax Error
syntax error: file.pluto:1: impromper lambda definition 1 | local fn = |a, b, c| => (a == b and a < c) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: expected '->' arrow syntax for lambda expression.

ANSI Coloring

These errors support coloring, but it's disabled by default. Define the PLUTO_USE_COLORED_OUTPUT macro in luaconf.h or your build config to enable colored error messages.

tip

For Windows users, you can enable ANSI coloring support with the following command:

  • REG ADD HKCU\CONSOLE /f /v VirtualTerminalLevel /t REG_DWORD /d 1
- + \ No newline at end of file diff --git a/docs/Runtime Environment/Assert.html b/docs/Runtime Environment/Assert.html index ee85bb27..b623bc4e 100644 --- a/docs/Runtime Environment/Assert.html +++ b/docs/Runtime Environment/Assert.html @@ -4,13 +4,13 @@ Assert | Pluto - +
-

Assert

Must be included via require.


assert.isnil

Asserts that value is nil

Parameters

  1. value — The value which should be nil.

Errors

An assertion error is thrown if the value is not nil.

pluto
local assert = require("assert")
assert.isnil(nil) -- Passes.
assert.isnil(5) -- Error:
--[[
test.pluto:4 -> Assertion Error: (assert.isnil)
Intended Value: nil
Received Value: 5
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
[C]: in ?
--]]

assert.istrue

Asserts that value is true.

Parameters

  1. value — The value which should be true.

Errors

An assertion error is thrown if value is not true

pluto
local assert = require("assert")
assert.istrue(true) -- Passes.
assert.istrue(false) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.istrue)
Intended Value: true
Received Value: false
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
test.pluto:4: in main chunk
[C]: in ?
--]]

assert.isfalse

Asserts that value is false.

Parameters

  1. value — The value which should be false.

Errors

An assertion error is thrown if value is not false.

pluto
local assert = require("assert")
assert.isfalse(false) -- Passes.
assert.isfalse(true) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.isfalse)
Intended Value: false
Received Value: true
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
test.pluto:4: in main chunk
[C]: in ?
--]]

assert.falsy

Asserts that value is a "falsy" value. Falsy means the value is nil or false.

Parameters

  1. value — The value which should be falsy.

Errors

An assertion error is thrown if value is not falsy.

pluto
local assert = require("assert")
assert.falsy(nil) -- Passes.
assert.falsy(false) -- Passes.
assert.falsy("Hello, world!") -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.falsy)
Intended Value: nil or false
Received Value: string(13) "Hello, world!"
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
test.pluto:4: in main chunk
[C]: in ?
--]]

assert.truthy

Asserts that value is a "truthy" value. This is the inverse of "falsy", a.k.a, any value that isn't nil or false is truthy.

Parameters

  1. value — The value which should be truthy, a.k.a it should not be nil or false.

Errors

An assertion error is thrown if value is not truthy, i.e if value is nil or false.

pluto
local assert = require("assert")
assert.truthy("Hello, world!") -- Passes.
assert.truthy(nil) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.truthy)
Intended Value: not nil or false
Received Value: nil
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
test.pluto:4: in main chunk
[C]: in ?
--]]

assert.notnil

Asserts that value is not nil.

Parameters

  1. value — The value which should not be nil.

Errors

An assertion error is thrown if value is nil.

pluto
local assert = require("assert")
assert.notnil("Hello, world!") -- Passes.
assert.notnil(nil) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.notnil)
Intended Value: not nil
Received Value: nil
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
test.pluto:4: in main chunk
[C]: in ?
--]]

assert.equal

Asserts that value1 is equal to value2.

This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step.

Parameters

  1. value1 — The first value.
  2. value2 — The second value.

Errors

An assertion error is thrown if value1 does not equal value2.

pluto
local assert = require("assert")
assert.equal("Hello, world!", "Hello, world...") -- Error:
--[[
pluto: test.pluto:3 -> Assertion Error: (assert.equal)
Intended Value: string(13) "Hello, world!"
Received Value: string(15) "Hello, world..."
--]]
assert.equal("Hi there.":split(" "), "Hello there.":split(" ")) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.equal)
Intended Value: { [1] = string(2) "Hi", [2] = string(6) "there.", }
Received Value: { [1] = string(5) "Hello", [2] = string(6) "there.", }
--]]

assert.nequal

Asserts that value1 is not equal to value2.

This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step.

Parameters

  1. value1 — The first value.
  2. value2 — The second value.

Errors

An assertion error is thrown of value1 does equal value2.

pluto
local assert = require("assert")
assert.nequal("Hello, world!", "Hi, world!") -- Passes.
assert.nequal("Hi there.":split(" "), "Hello there.":split(" ")) -- Passes.

assert.less

Asserts that value1 is less than value2.

Parameters

  1. value1 — The first number.
  2. value2 — The second number.

Errors

An assertion error is thrown if value1 is not less than value2.

pluto
local assert = require("assert")
assert.less(1, 2) -- Passes.
assert.less(1, 1) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.less)
Expression: (1 < 1) == false
--]]

assert.lesseq

Asserts that value1 is less than or equal to value2.

Parameters

  1. value1 — The first number.
  2. value2 — The second number.

Errors

An assertion error is thrown if value1 is not less than or equal to value2.

pluto
local assert = require("assert")
assert.lesseq(1, 2) -- Passes.
assert.lesseq(1, 0) -- Error:
--[[
pluto: test.pluto:3 -> Assertion Error: (assert.lesseq)
Expression: (1 <= 0) == false
--]]

assert.greater

Asserts that value1 is greater than value2.

Parameters

  1. value1 — The first number.
  2. value2 — The second number.

Errors

An assertion errros is thrown if value1 is not greater than value2.

pluto
local assert = require("assert")
assert.greater(3, 2) -- Passes.
assert.greater(3, 3) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.greater)
Expression: (3 > 3) == false
--]]

assert.greatereq

Asserts that value1 is greater than or equal to value2.

Parameters

  1. value1 — The first number.
  2. value2 — The second number.

Errors

An assertion errros is thrown if value1 is not greater than or equal to value2.

pluto
local assert = require("assert")
assert.greatereq(3, 2) -- Passes.
assert.greatereq(3, 3) -- Passes.

assert.noerror

Asserts that callback does not raise an error when called.

Parameters

  1. callback — A function reference.
  2. ... — Any other parameters passed to this function will be passed to the callback.

Errors

An assertion error is thrown if callback raises an error.

pluto
local assert = require("assert")
assert.noerror(tostring, 400) -- Passes.
assert.noerror(error, "argument argument") -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.noerror)
An error was raised: argument argument
--]]

assert.haserror

Asserts that callback does raise an error when called.

Parameters

  1. callback — A function reference.
  2. ... — Any other parameters passed to this function will be passed to the callback.

Errors

An assertion error is thrown if callback does not raise an error.

pluto
local assert = require("assert")
assert.haserror(error, "argument argument") -- Passes.
assert.haserror(tostring, 400) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.haserror)
Expected an error, but there was none.
--]]

assert.searcherror

Asserts that callback raises an error, and that substring is present within the error message.

Parameters

  1. substring — The substring that should be inside of the error message.
  2. callback — A function reference.
  3. ... — Any other parameters passed to this function will be passed to the callback.

Errors

An assertion error is thrown if:

  1. callback does not raise an error.
  2. callback does raise an error, but the error message does not contain substring.
pluto
local assert = require("assert")
assert.searcherror("argument", error, "argument argument") -- Passes.
assert.searcherror("something", tostring, 400) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.searcherror)
Expected an error, but there was none.
--]]
assert.searcherror("argument", error, "argument argument") -- Passes.
assert.searcherror("argument", error, "something something") -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.searcherror)
Absent String: argument
Error Message: something s
--]]
- +

Assert

Must be included via require.


assert.isnil

Asserts that value is nil

Parameters

  1. value — The value which should be nil.

Errors

An assertion error is thrown if the value is not nil.

pluto
local assert = require("assert")
assert.isnil(nil) -- Passes.
assert.isnil(5) -- Error:
--[[
test.pluto:4 -> Assertion Error: (assert.isnil)
Intended Value: nil
Received Value: 5
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
[C]: in ?
--]]

assert.istrue

Asserts that value is true.

Parameters

  1. value — The value which should be true.

Errors

An assertion error is thrown if value is not true

pluto
local assert = require("assert")
assert.istrue(true) -- Passes.
assert.istrue(false) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.istrue)
Intended Value: true
Received Value: false
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
test.pluto:4: in main chunk
[C]: in ?
--]]

assert.isfalse

Asserts that value is false.

Parameters

  1. value — The value which should be false.

Errors

An assertion error is thrown if value is not false.

pluto
local assert = require("assert")
assert.isfalse(false) -- Passes.
assert.isfalse(true) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.isfalse)
Intended Value: false
Received Value: true
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
test.pluto:4: in main chunk
[C]: in ?
--]]

assert.falsy

Asserts that value is a "falsy" value. Falsy means the value is nil or false.

Parameters

  1. value — The value which should be falsy.

Errors

An assertion error is thrown if value is not falsy.

pluto
local assert = require("assert")
assert.falsy(nil) -- Passes.
assert.falsy(false) -- Passes.
assert.falsy("Hello, world!") -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.falsy)
Intended Value: nil or false
Received Value: string(13) "Hello, world!"
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
test.pluto:4: in main chunk
[C]: in ?
--]]

assert.truthy

Asserts that value is a "truthy" value. This is the inverse of "falsy", a.k.a, any value that isn't nil or false is truthy.

Parameters

  1. value — The value which should be truthy, a.k.a it should not be nil or false.

Errors

An assertion error is thrown if value is not truthy, i.e if value is nil or false.

pluto
local assert = require("assert")
assert.truthy("Hello, world!") -- Passes.
assert.truthy(nil) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.truthy)
Intended Value: not nil or false
Received Value: nil
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
test.pluto:4: in main chunk
[C]: in ?
--]]

assert.notnil

Asserts that value is not nil.

Parameters

  1. value — The value which should not be nil.

Errors

An assertion error is thrown if value is nil.

pluto
local assert = require("assert")
assert.notnil("Hello, world!") -- Passes.
assert.notnil(nil) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.notnil)
Intended Value: not nil
Received Value: nil
stack traceback:
[C]: in function 'error'
[string "pluto:assert"]:75: in function <[string "pluto:assert"]:46>
(...tail calls...)
test.pluto:4: in main chunk
[C]: in ?
--]]

assert.equal

Asserts that value1 is equal to value2.

This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step.

Parameters

  1. value1 — The first value.
  2. value2 — The second value.

Errors

An assertion error is thrown if value1 does not equal value2.

pluto
local assert = require("assert")
assert.equal("Hello, world!", "Hello, world...") -- Error:
--[[
pluto: test.pluto:3 -> Assertion Error: (assert.equal)
Intended Value: string(13) "Hello, world!"
Received Value: string(15) "Hello, world..."
--]]
assert.equal("Hi there.":split(" "), "Hello there.":split(" ")) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.equal)
Intended Value: { [1] = string(2) "Hi", [2] = string(6) "there.", }
Received Value: { [1] = string(5) "Hello", [2] = string(6) "there.", }
--]]

assert.nequal

Asserts that value1 is not equal to value2.

This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step.

Parameters

  1. value1 — The first value.
  2. value2 — The second value.

Errors

An assertion error is thrown of value1 does equal value2.

pluto
local assert = require("assert")
assert.nequal("Hello, world!", "Hi, world!") -- Passes.
assert.nequal("Hi there.":split(" "), "Hello there.":split(" ")) -- Passes.

assert.less

Asserts that value1 is less than value2.

Parameters

  1. value1 — The first number.
  2. value2 — The second number.

Errors

An assertion error is thrown if value1 is not less than value2.

pluto
local assert = require("assert")
assert.less(1, 2) -- Passes.
assert.less(1, 1) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.less)
Expression: (1 < 1) == false
--]]

assert.lesseq

Asserts that value1 is less than or equal to value2.

Parameters

  1. value1 — The first number.
  2. value2 — The second number.

Errors

An assertion error is thrown if value1 is not less than or equal to value2.

pluto
local assert = require("assert")
assert.lesseq(1, 2) -- Passes.
assert.lesseq(1, 0) -- Error:
--[[
pluto: test.pluto:3 -> Assertion Error: (assert.lesseq)
Expression: (1 <= 0) == false
--]]

assert.greater

Asserts that value1 is greater than value2.

Parameters

  1. value1 — The first number.
  2. value2 — The second number.

Errors

An assertion errros is thrown if value1 is not greater than value2.

pluto
local assert = require("assert")
assert.greater(3, 2) -- Passes.
assert.greater(3, 3) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.greater)
Expression: (3 > 3) == false
--]]

assert.greatereq

Asserts that value1 is greater than or equal to value2.

Parameters

  1. value1 — The first number.
  2. value2 — The second number.

Errors

An assertion errros is thrown if value1 is not greater than or equal to value2.

pluto
local assert = require("assert")
assert.greatereq(3, 2) -- Passes.
assert.greatereq(3, 3) -- Passes.

assert.noerror

Asserts that callback does not raise an error when called.

Parameters

  1. callback — A function reference.
  2. ... — Any other parameters passed to this function will be passed to the callback.

Errors

An assertion error is thrown if callback raises an error.

pluto
local assert = require("assert")
assert.noerror(tostring, 400) -- Passes.
assert.noerror(error, "argument argument") -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.noerror)
An error was raised: argument argument
--]]

assert.haserror

Asserts that callback does raise an error when called.

Parameters

  1. callback — A function reference.
  2. ... — Any other parameters passed to this function will be passed to the callback.

Errors

An assertion error is thrown if callback does not raise an error.

pluto
local assert = require("assert")
assert.haserror(error, "argument argument") -- Passes.
assert.haserror(tostring, 400) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.haserror)
Expected an error, but there was none.
--]]

assert.searcherror

Asserts that callback raises an error, and that substring is present within the error message.

Parameters

  1. substring — The substring that should be inside of the error message.
  2. callback — A function reference.
  3. ... — Any other parameters passed to this function will be passed to the callback.

Errors

An assertion error is thrown if:

  1. callback does not raise an error.
  2. callback does raise an error, but the error message does not contain substring.
pluto
local assert = require("assert")
assert.searcherror("argument", error, "argument argument") -- Passes.
assert.searcherror("something", tostring, 400) -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.searcherror)
Expected an error, but there was none.
--]]
assert.searcherror("argument", error, "argument argument") -- Passes.
assert.searcherror("argument", error, "something something") -- Error:
--[[
pluto: test.pluto:4 -> Assertion Error: (assert.searcherror)
Absent String: argument
Error Message: something s
--]]
+ \ No newline at end of file diff --git a/docs/Runtime Environment/Base32.html b/docs/Runtime Environment/Base32.html index 2fc70f28..dfb400e8 100644 --- a/docs/Runtime Environment/Base32.html +++ b/docs/Runtime Environment/Base32.html @@ -4,13 +4,13 @@ Base32 | Pluto - +

Base32

Must be included via require.


base32.encode

Returns an encoded base32 string.

Parameters

  1. data — A string of data to encode.
  2. pad — Whether or not to apply padding. Defaults to true.

base32.decode

Returns a decoded base32 string.

Parameters

  1. data — A string of base32 data to decode.
- + \ No newline at end of file diff --git a/docs/Runtime Environment/Base64.html b/docs/Runtime Environment/Base64.html index dc2f6dc8..44ff34da 100644 --- a/docs/Runtime Environment/Base64.html +++ b/docs/Runtime Environment/Base64.html @@ -4,13 +4,13 @@ Base64 | Pluto - +
-

Base64

Must be included via require.


base64.encode

Returns a base64-encoded string.

Parameters

  1. data — A string of data to encode.
  2. pad — Whether or not to apply padding. Defaults to true.
pluto
local base64 = require("base64")
print(base64.encode("Hello, World!")) --> SGVsbG8sIFdvcmxkIQ==

base64.decode

Returns a decoded base64 string.

Parameters

  1. data — A string of base64 data.
pluto
local base64 = require("base64")
print(base64.decode("SGVsbG8sIFdvcmxkIQ==")) --> Hello, world!

base64.urlencode

Returns a base64url-encoded string. This variant is sometimes refered to as filename safe base64.

Parameters

  1. data — A string of data to encode.
  2. pad — Whether or not to apply padding. Defaults to false.
pluto
local base64 = require("base64")
print(base64.urlencode("Hello, World!")) --> SGVsbG8sIFdvcmxkIQ

base64.urldecode

Similar to base64.decode except for base64url.

Parameters

  1. data — A string of base64 data.
pluto
local base64 = require("base64")
print(base64.urldecode("SGVsbG8sIFdvcmxkIQ")) --> Hello, world!
- +

Base64

Must be included via require.


base64.encode

Returns a base64-encoded string.

Parameters

  1. data — A string of data to encode.
  2. pad — Whether or not to apply padding. Defaults to true.
pluto
local base64 = require("base64")
print(base64.encode("Hello, World!")) --> SGVsbG8sIFdvcmxkIQ==

base64.decode

Returns a decoded base64 string.

Parameters

  1. data — A string of base64 data.
pluto
local base64 = require("base64")
print(base64.decode("SGVsbG8sIFdvcmxkIQ==")) --> Hello, world!

base64.urlencode

Returns a base64url-encoded string. This variant is sometimes refered to as filename safe base64.

Parameters

  1. data — A string of data to encode.
  2. pad — Whether or not to apply padding. Defaults to false.
pluto
local base64 = require("base64")
print(base64.urlencode("Hello, World!")) --> SGVsbG8sIFdvcmxkIQ

base64.urldecode

Similar to base64.decode except for base64url.

Parameters

  1. data — A string of base64 data.
pluto
local base64 = require("base64")
print(base64.urldecode("SGVsbG8sIFdvcmxkIQ")) --> Hello, world!
+ \ No newline at end of file diff --git a/docs/Runtime Environment/Bigint.html b/docs/Runtime Environment/Bigint.html index 10bc1576..7fdb8ca4 100644 --- a/docs/Runtime Environment/Bigint.html +++ b/docs/Runtime Environment/Bigint.html @@ -4,13 +4,13 @@ Bigint | Pluto - +
-

Bigint

Must be included via require.


bigint.new

To instantiate a bigint, you can call the bigint.new function, or use the new operator.

Parameters

  1. The decimal value of the bigint.
pluto
local bigint = require "pluto:bigint"
print(new bigint("123")) --> 123

bigint.tostring, __tostring

As seen above, the __tostring metamethod provides a string representation of the Bigint in decimal.

bigint.hex

Provides a hexadecimal representation of the Bigint.

pluto
local bigint = require "pluto:bigint"
print(new bigint("420"):hex()) --> 1A4

bigint.binary

Provides a binary representation of the Bigint.

pluto
local bigint = require "pluto:bigint"
print(new bigint("420"):binary()) --> 110100100

bigint.add, __add

Adds two bigints together. Returns a new bigint.

bigint.sub, __sub

Performs subtraction on two bigints. Returns a new bigint.

bigint.mul, __mul

Performs multiplication on two bigints. Returns a new bigint.

bigint.div

Performs division on two bigints. Returns two new bigints: quotient and remainder.

pluto
local bigint = require "pluto:bigint"
print(new bigint(10):div(new bigint(3))) --> 3 1

__div

Performs division on two bigints. Returns a new bigint with the quotient.

pluto
local bigint = require "pluto:bigint"
print(new bigint(10) / new bigint(3)) --> 3

bigint.mod, __mod

Performs divison on two bigints. Returns a new bigint with the remainder.

pluto
local bigint = require "pluto:bigint"
print(new bigint(10) % new bigint(3)) --> 1

bigint.pow, __pow

Performs expontentiation on two bigints. Returns a new bigint.

pluto
local bigint = require "pluto:bigint"
print(new bigint(2) ^ new bigint(10)) --> 1024

bigint.bitlength

Returns the position of the most significant set bit as a plain integer.

pluto
local bigint = require "pluto:bigint"
print(new bigint(420):bitlength()) --> 9
- +

Bigint

Must be included via require.


bigint.new

To instantiate a bigint, you can call the bigint.new function, or use the new operator.

Parameters

  1. The decimal value of the bigint.
pluto
local bigint = require "pluto:bigint"
print(new bigint("123")) --> 123

bigint.tostring, __tostring

As seen above, the __tostring metamethod provides a string representation of the Bigint in decimal.

bigint.hex

Provides a hexadecimal representation of the Bigint.

pluto
local bigint = require "pluto:bigint"
print(new bigint("420"):hex()) --> 1A4

bigint.binary

Provides a binary representation of the Bigint.

pluto
local bigint = require "pluto:bigint"
print(new bigint("420"):binary()) --> 110100100

bigint.add, __add

Adds two bigints together. Returns a new bigint.

bigint.sub, __sub

Performs subtraction on two bigints. Returns a new bigint.

bigint.mul, __mul

Performs multiplication on two bigints. Returns a new bigint.

bigint.div

Performs division on two bigints. Returns two new bigints: quotient and remainder.

pluto
local bigint = require "pluto:bigint"
print(new bigint(10):div(new bigint(3))) --> 3 1

__div

Performs division on two bigints. Returns a new bigint with the quotient.

pluto
local bigint = require "pluto:bigint"
print(new bigint(10) / new bigint(3)) --> 3

bigint.mod, __mod

Performs divison on two bigints. Returns a new bigint with the remainder.

pluto
local bigint = require "pluto:bigint"
print(new bigint(10) % new bigint(3)) --> 1

bigint.pow, __pow

Performs expontentiation on two bigints. Returns a new bigint.

pluto
local bigint = require "pluto:bigint"
print(new bigint(2) ^ new bigint(10)) --> 1024

bigint.bitlength

Returns the position of the most significant set bit as a plain integer.

pluto
local bigint = require "pluto:bigint"
print(new bigint(420):bitlength()) --> 9
+ \ No newline at end of file diff --git a/docs/Runtime Environment/CaT.html b/docs/Runtime Environment/CaT.html index 757666c6..864ef03e 100644 --- a/docs/Runtime Environment/CaT.html +++ b/docs/Runtime Environment/CaT.html @@ -4,13 +4,13 @@ CaT | Pluto - +
-

CaT

The CaT module is available via require "pluto:cat" and provides encoding and decoding for the Colons and Tabs format.


cat.encode

Returns a string of CaT.

Parameters

  1. data — The table to encode in CaT.
pluto
local cat = require "pluto:cat"
cat.encode {
List = {
__value = "With Value",
Child = "Also With Value"
}
} |> io.write
--> List: With Value
--> Child: Also With Value

cat.decode

Returns a table representing the CaT data.

Parameters

  1. data — The CaT data to decode.
  2. presentation — How to represent the data as a table. Can be "flat", "flatwithorder", or "full" (default).
pluto
local cat = require "pluto:cat"
local data = cat.decode [[
List: With Value
Child: Also With Value
]]
print(dumpvar(data))
--> {
--> [1] = {
--> ["value"] = string(10) "With Value",
--> ["name"] = string(4) "List",
--> ["children"] = {
--> [1] = {
--> ["name"] = string(5) "Child",
--> ["value"] = string(15) "Also With Value",
--> },
--> },
--> },
--> }

With the default "full" representation, the retuned table has an __index metamethod for ease of use:

pluto
print(data.List.value) --> With Value
print(data.List.Child.value) --> Also With Value

Alternatively, the other representations are available:

pluto
local cat = require "pluto:cat"
print(dumpvar(cat.decode([[
home
john
hello.txt: Hello, world!
]], "flat")))
--> {
--> ["home"] = {
--> ["john"] = {
--> ["hello.txt"] = string(13) "Hello, world!",
--> },
--> },
--> }
pluto
local cat = require "pluto:cat"
print(dumpvar(cat.decode([[
Primary Color: Purple
Secondary Color: White
]], "flatwithorder")))
--> {
--> ["__order"] = {
--> [1] = string(13) "Primary Color",
--> [2] = string(15) "Secondary Color",
--> },
--> ["Primary Color"] = string(6) "Purple",
--> ["Secondary Color"] = string(5) "White",
--> }
- +

CaT

The CaT module is available via require "pluto:cat" and provides encoding and decoding for the Colons and Tabs format.


cat.encode

Returns a string of CaT.

Parameters

  1. data — The table to encode in CaT.
pluto
local cat = require "pluto:cat"
cat.encode {
List = {
__value = "With Value",
Child = "Also With Value"
}
} |> io.write
--> List: With Value
--> Child: Also With Value

cat.decode

Returns a table representing the CaT data.

Parameters

  1. data — The CaT data to decode.
  2. presentation — How to represent the data as a table. Can be "flat", "flatwithorder", or "full" (default).
pluto
local cat = require "pluto:cat"
local data = cat.decode [[
List: With Value
Child: Also With Value
]]
print(dumpvar(data))
--> {
--> [1] = {
--> ["value"] = string(10) "With Value",
--> ["name"] = string(4) "List",
--> ["children"] = {
--> [1] = {
--> ["name"] = string(5) "Child",
--> ["value"] = string(15) "Also With Value",
--> },
--> },
--> },
--> }

With the default "full" representation, the retuned table has an __index metamethod for ease of use:

pluto
print(data.List.value) --> With Value
print(data.List.Child.value) --> Also With Value

Alternatively, the other representations are available:

pluto
local cat = require "pluto:cat"
print(dumpvar(cat.decode([[
home
john
hello.txt: Hello, world!
]], "flat")))
--> {
--> ["home"] = {
--> ["john"] = {
--> ["hello.txt"] = string(13) "Hello, world!",
--> },
--> },
--> }
pluto
local cat = require "pluto:cat"
print(dumpvar(cat.decode([[
Primary Color: Purple
Secondary Color: White
]], "flatwithorder")))
--> {
--> ["__order"] = {
--> [1] = string(13) "Primary Color",
--> [2] = string(15) "Secondary Color",
--> },
--> ["Primary Color"] = string(6) "Purple",
--> ["Secondary Color"] = string(5) "White",
--> }
+ \ No newline at end of file diff --git a/docs/Runtime Environment/Coroutine.html b/docs/Runtime Environment/Coroutine.html index da8506e4..d1faea42 100644 --- a/docs/Runtime Environment/Coroutine.html +++ b/docs/Runtime Environment/Coroutine.html @@ -4,13 +4,13 @@ Coroutine | Pluto - +

Coroutine

This page documents the changes & additions to the coroutine library in Pluto, which is built on top of Lua 5.4's.


coroutine.xresume

An alternative to coroutine.resume that rethrows any errors thrown by the coroutine.


coroutine.sleep

Yields the current coroutine for the given number of milliseconds.

Parameters

  1. The number of milliseconds to yield for.
- + \ No newline at end of file diff --git a/docs/Runtime Environment/Crypto.html b/docs/Runtime Environment/Crypto.html index 6fe596af..b105df9b 100644 --- a/docs/Runtime Environment/Crypto.html +++ b/docs/Runtime Environment/Crypto.html @@ -4,13 +4,13 @@ Crypto | Pluto - +
-

Crypto

Must be included via require.


Non-Cryptographic Hashing Algorithms

crypto.lua

Hash a string using Lua's version of the DJB2 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.lua(str) == 2871868277)

crypto.md5

Hash a string using the MD5 semi-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.md5(str) == "5eb63bbbe01eeed093cb22bb8f5acdc3")

crypto.djb2

Hash a string using the DJB2 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.djb2(str) == 894552257)

crypto.fnv1

Hash a string using the FNV1 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.fnv1(str) == 9065573210506989167)

crypto.fnv1a

Hash a string using the FNV1A non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.fnv1a(str) == 8618312879776256743)

crypto.joaat

Hash a string using the JOAAT non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.joaat(str) == 1045060183)

crypto.sdbm

Hash a string using the SDBM non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.sdbm(str) == 430867652)

crypto.crc32

Hash a string using the CRC32 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. The initial value for the hash. By default, this is zero.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.crc32(str) == 222957957)

crypto.adler32

Hash a string using the Adler-32 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. The initial value for the hash. By default, this is zero.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.adler32(str) == 103547413)

crypto.lookup3

Hash a string using the Lookup3 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.lookup3(str) == 1252609637)

crypto.times33

Hash a string using the Times33 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.times33(str) == 3889643616)

crypto.murmur1

Hash a string using the Murmur1 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur1(str) == 3154674178)

crypto.murmur2

Hash a string using the Murmur2 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur2(str) == 1151865881)

crypto.murmur2a

Hash a string using the Murmur2A non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur2a(str) == 2650573207)

crypto.murmur64a

Hash a string using the Murmur64A non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur64a(str) == -3190198453633110066)

crypto.murmur64b

Hash a string using the Murmur64A non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur64b(str) == 7088720765356542432)

crypto.murmur2neutral

Hash a string using the Murmur2Neutral non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur2neutral(str) == 1151865881)

Cryptographic Hashing Algorithms

crypto.sha1

Hash a string using the SHA-1 cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.
pluto
local crypto = require("crypto")
assert(crypto.sha1("Pluto") == "bce8c9aca4120776fad6b517874aa09c46405454")
assert(crypto.sha1("Pluto", true) == "\xbc\xe8\xc9\xac\xa4\x12\x07\x76\xfa\xd6\xb5\x17\x87\x4a\xa0\x9c\x46\x40\x54\x54")

crypto.sha256

Hash a string using the SHA-256 cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.
pluto
local crypto = require("crypto")
assert(crypto.sha256("Pluto") == "8dad5f6a7dd2dcd8c35ec2fd7babb499bcad60d27d73fe73eca2ce025dfd3b47")
assert(crypto.sha256("Pluto", true) == "\x8d\xad\x5f\x6a\x7d\xd2\xdc\xd8\xc3\x5e\xc2\xfd\x7b\xab\xb4\x99\xbc\xad\x60\xd2\x7d\x73\xfe\x73\xec\xa2\xce\x02\x5d\xfd\x3b\x47")

crypto.sha384

Hash a string using the SHA-384 cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.
pluto
local crypto = require("crypto")
assert(crypto.sha384("Pluto", false) == "db890233a919b6745d632633c419e14540ff79f1a89bc4ac194b00e7f913f0f06d5d4d7d6cc2b4aaf9485d223afb8cf0")

crypto.sha512

Hash a string using the SHA-512 cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.
pluto
local crypto = require("crypto")
assert(crypto.sha512("Pluto", false) == "ee8410a8bf9511b94fd6669b5c3e0c4b86e8e4bf7baa8dbd2773d4d6381dd1aecebbe391bef4c6158620ab3f6b794907652d4432c2301d7e1a6caf520565cdf2")

Cryptographic PRNGs

crypto.random

The crypto.random function uses your operating system's default PRNG.

  • On Linux-based systems, this is /dev/urandom.
  • On Windows, this is BCryptGenRandom.

This is a cryptographically-secure PRNG when your system can provide those services. However, if it does not, then this is not cryptographically secure. Either way, it provides good randomness.

Parameters

  1. The minimum value to return.
  2. The maximum value to return, as a range.
pluto
local crypto = require("crypto")
assert(crypto.random(1, 10) < 11)

AES-CBC, AES-CFB

These unauthenticated AES modes take both a key and an IV. The IV must be unique and unpredictable for each encryption session to ensure security.

crypto.encrypt

Parameters

  1. data — The data to be encrypted.
  2. mode — "aes-cbc-pkcs7" or "aes-cfb-pkcs7" for PKCS#7 padding, or "aes-cbc" or "aes-cfb" if you know what you're doing.
  3. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.
  4. iv — Must have a length of 16.

crypto.decrypt

Parameters

  1. data — The ciphertext to decrypt.
  2. mode — "aes-cbc-pkcs7" or "aes-cfb-pkcs7" for PKCS#7 padding, or "aes-cbc" or "aes-cfb" if you know what you're doing.
  3. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.
  4. iv — Must have a length of 16.

Returns the decrypted data on success. Throws an error if the padding was incorrect.

pluto
local crypto = require "pluto:crypto"
local key <const> = "A Top Secret Key"
-- Encrypt
local iv = range(16):map(|| -> string.char(math.random(0, 255))):concat("")
local plain = "Hello, world!"
local enc = plain |> crypto.encrypt|"aes-cbc-pkcs7", key, iv|
print(dumpvar(enc))
-- Decrypt
print(crypto.decrypt(enc, "aes-cbc-pkcs7", key, iv)) --> Hello, world!

AES-ECB

This unauthenticated AES mode takes only a key, and is considered to be the weakest. Identical plaintext blocks result in identical ciphertext blocks.

crypto.encrypt

Parameters

  1. data — The data to be encrypted.
  2. mode — "aes-ecb-pkcs7" for PKCS#7 padding, or "aes-ecb" if you know what you're doing.
  3. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.

crypto.decrypt

Parameters

  1. mode — "aes-ecb-pkcs7" for PKCS#7 padding, or "aes-ecb" if you know what you're doing.
  2. data — The ciphertext to decrypt.
  3. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.

Returns the decrypted data on success. Throws an error if the padding was incorrect.

pluto
local crypto = require "pluto:crypto"
local key <const> = "A Top Secret Key"
-- Encrypt
local plain = "Hello, world!"
local enc = plain |> crypto.encrypt|"aes-ecb-pkcs7", key|
print(dumpvar(enc)) --> string(16) "`p{����k\21*.>jG"
-- Decrypt
print(crypto.decrypt(enc, "aes-ecb-pkcs7", key)) --> Hello, world!

AES-GCM

This authenticated AES mode allows for additional data that will be validated although not encrypted, such as a Message Authentication Code (MAC).

crypto.encrypt

Parameters

  1. data — The data to be encrypted.
  2. mode — Must be "aes-gcm". AES-GCM can deal with unpadded data, hence does not need PKCS#7 padding.
  3. aadata — Authenticated data. Will not be encrypted.
  4. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.
  5. iv — Must have a length of 16.

Returns two strings: the ciphertext and the authentication tag.

crypto.decrypt

Parameters

  1. data — The ciphertext to decrypt.
  2. mode — Must be "aes-gcm".
  3. aadata — Authenticated data.
  4. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.
  5. iv — Must have a length of 16.
  6. tag — The authentication tag produced by the "encrypt" procedure.

Returns the decrypted data on success. Throws an error if authentication or unpadding failed.

pluto
local crypto = require "pluto:crypto"
local key <const> = "A Top Secret Key"
local aadata = "This is Pluto!"
-- Encrypt
local iv = range(16):map(|| -> string.char(math.random(0, 255))):concat("")
local plain = "Hello, world!"
local enc, tag = plain |> crypto.encrypt|"aes-gcm", aadata, key, iv|
print(dumpvar(enc))
print(dumpvar(tag))
-- Decrypt
print(crypto.decrypt(enc, "aes-gcm", aadata, key, iv, tag)) --> Hello, world!

RSA

crypto.generatekeypair

Parameters

  1. mode — Must be "rsa".
  2. bits — A positive integer for a strict bit-length requirement, or a negative integer for a lax requirement. Common values are 1024, 2048, and 4096.

Returns two tables: The public key (consisting of n and e), and the private key (consisting of p and q). The Bigint class is used for all values.

pluto
local pub, priv = crypto.generatekeypair("rsa", 512)
print(dumpvar(pub))
--> {
--> ["n"] = 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357,
--> ["e"] = 65537,
--> }
print(dumpvar(priv))
--> {
--> ["p"] = 115443384115231951475820445136871322101870729500298182134363293112660251666017,
--> ["q"] = 98365361248415863235179644468056200977592391948608651522703704315152579004021,
--> }

crypto.encrypt

Parameters

  1. data — The data to be encrypted.
  2. mode — "rsa-pkcs1" for PKCS#1 padding, or "rsa" if you know what you're doing.
  3. key — The public or private key to use. Commonly, a public key is used to encrypt data.

crypto.decrypt

Parameters

  1. data — The ciphertext to decrypt.
  2. mode — "rsa-pkcs1" for PKCS#1 padding, or "rsa" if you know what you're doing.
  3. key — The public or private key to use. If the data was encrypted with the public key, the private key is needed to decrypt it.
pluto
local { base64, bigint, crypto } = require "pluto:*"
local priv = {
p = new bigint("115443384115231951475820445136871322101870729500298182134363293112660251666017"),
q = new bigint("98365361248415863235179644468056200977592391948608651522703704315152579004021"),
}
-- Derive public key
local pub = {
n = priv.p * priv.q, -- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357
e = new bigint(0x10001) -- 65537
}
-- Encrypt
local enc = crypto.encrypt("A secret message to the owner of the private key.", "rsa-pkcs1", pub)
print(base64.encode(enc))
-- Decrypt
print(enc |> crypto.decrypt|"rsa-pkcs1", priv|) --> A secret message to the owner of the private key.

crypto.sign

Parameters

  1. data — The data to sign.
  2. mode — "rsa-sha256" or "rsa-sha1".
  3. key — The private key to use.

crypto.verify

Parameters

  1. data — The data that was signed.
  2. mode — "rsa-sha256" or "rsa-sha1".
  3. key — The public key corresponding to the signer's private key.
  4. signature — The signature produced by the "sign" procedure.

Returns a boolean that indicates if the signature validated successfully.

pluto
local { base64, bigint, crypto } = require "pluto:*"
local priv = {
p = new bigint("115443384115231951475820445136871322101870729500298182134363293112660251666017"),
q = new bigint("98365361248415863235179644468056200977592391948608651522703704315152579004021"),
}
-- Derive public key
local pub = {
n = priv.p * priv.q, -- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357
e = new bigint(0x10001) -- 65537
}
-- Sign
local msg = "The canary has left the nest."
local sig = msg |> crypto.sign|"rsa-sha256", priv|
print(base64.encode(sig)) --> un1g04+cwG8WxYDpSlj4PO/hsTqSITgYKycRuR+m3AE6ypLyUCrVHC/0j4M3DeW81ADZVda6TVkC/Ht8EdYeFw==
-- Verify
print(crypto.verify(msg, "rsa-sha256", pub, sig)) --> true
- +

Crypto

Must be included via require.


Non-Cryptographic Hashing Algorithms

crypto.lua

Hash a string using Lua's version of the DJB2 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.lua(str) == 2871868277)

crypto.md5

Hash a string using the MD5 semi-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.md5(str) == "5eb63bbbe01eeed093cb22bb8f5acdc3")

crypto.djb2

Hash a string using the DJB2 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.djb2(str) == 894552257)

crypto.fnv1

Hash a string using the FNV1 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.fnv1(str) == 9065573210506989167)

crypto.fnv1a

Hash a string using the FNV1A non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.fnv1a(str) == 8618312879776256743)

crypto.joaat

Hash a string using the JOAAT non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.joaat(str) == 1045060183)

crypto.sdbm

Hash a string using the SDBM non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.sdbm(str) == 430867652)

crypto.crc32

Hash a string using the CRC32 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. The initial value for the hash. By default, this is zero.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.crc32(str) == 222957957)

crypto.adler32

Hash a string using the Adler-32 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. The initial value for the hash. By default, this is zero.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.adler32(str) == 103547413)

crypto.lookup3

Hash a string using the Lookup3 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.lookup3(str) == 1252609637)

crypto.times33

Hash a string using the Times33 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.times33(str) == 3889643616)

crypto.murmur1

Hash a string using the Murmur1 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur1(str) == 3154674178)

crypto.murmur2

Hash a string using the Murmur2 non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur2(str) == 1151865881)

crypto.murmur2a

Hash a string using the Murmur2A non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.

Returns

An integer between 0 and 0xffffffff, inclusive.

pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur2a(str) == 2650573207)

crypto.murmur64a

Hash a string using the Murmur64A non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur64a(str) == -3190198453633110066)

crypto.murmur64b

Hash a string using the Murmur64A non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur64b(str) == 7088720765356542432)

crypto.murmur2neutral

Hash a string using the Murmur2Neutral non-cryptographic hashing algorithm.

Parameters

  1. The string to hash.
pluto
local crypto = require("crypto")
local str = "hello"
assert(crypto.murmur2neutral(str) == 1151865881)

Cryptographic Hashing Algorithms

crypto.sha1

Hash a string using the SHA-1 cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.
pluto
local crypto = require("crypto")
assert(crypto.sha1("Pluto") == "bce8c9aca4120776fad6b517874aa09c46405454")
assert(crypto.sha1("Pluto", true) == "\xbc\xe8\xc9\xac\xa4\x12\x07\x76\xfa\xd6\xb5\x17\x87\x4a\xa0\x9c\x46\x40\x54\x54")

crypto.sha256

Hash a string using the SHA-256 cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.
pluto
local crypto = require("crypto")
assert(crypto.sha256("Pluto") == "8dad5f6a7dd2dcd8c35ec2fd7babb499bcad60d27d73fe73eca2ce025dfd3b47")
assert(crypto.sha256("Pluto", true) == "\x8d\xad\x5f\x6a\x7d\xd2\xdc\xd8\xc3\x5e\xc2\xfd\x7b\xab\xb4\x99\xbc\xad\x60\xd2\x7d\x73\xfe\x73\xec\xa2\xce\x02\x5d\xfd\x3b\x47")

crypto.sha384

Hash a string using the SHA-384 cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.
pluto
local crypto = require("crypto")
assert(crypto.sha384("Pluto", false) == "db890233a919b6745d632633c419e14540ff79f1a89bc4ac194b00e7f913f0f06d5d4d7d6cc2b4aaf9485d223afb8cf0")

crypto.sha512

Hash a string using the SHA-512 cryptographic hashing algorithm.

Parameters

  1. The string to hash.
  2. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.
pluto
local crypto = require("crypto")
assert(crypto.sha512("Pluto", false) == "ee8410a8bf9511b94fd6669b5c3e0c4b86e8e4bf7baa8dbd2773d4d6381dd1aecebbe391bef4c6158620ab3f6b794907652d4432c2301d7e1a6caf520565cdf2")

Cryptographic PRNGs

crypto.random

The crypto.random function uses your operating system's default PRNG.

  • On Linux-based systems, this is /dev/urandom.
  • On Windows, this is BCryptGenRandom.

This is a cryptographically-secure PRNG when your system can provide those services. However, if it does not, then this is not cryptographically secure. Either way, it provides good randomness.

Parameters

  1. The minimum value to return.
  2. The maximum value to return, as a range.
pluto
local crypto = require("crypto")
assert(crypto.random(1, 10) < 11)

AES-CBC, AES-CFB

These unauthenticated AES modes take both a key and an IV. The IV must be unique and unpredictable for each encryption session to ensure security.

crypto.encrypt

Parameters

  1. data — The data to be encrypted.
  2. mode — "aes-cbc-pkcs7" or "aes-cfb-pkcs7" for PKCS#7 padding, or "aes-cbc" or "aes-cfb" if you know what you're doing.
  3. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.
  4. iv — Must have a length of 16.

crypto.decrypt

Parameters

  1. data — The ciphertext to decrypt.
  2. mode — "aes-cbc-pkcs7" or "aes-cfb-pkcs7" for PKCS#7 padding, or "aes-cbc" or "aes-cfb" if you know what you're doing.
  3. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.
  4. iv — Must have a length of 16.

Returns the decrypted data on success. Throws an error if the padding was incorrect.

pluto
local crypto = require "pluto:crypto"
local key <const> = "A Top Secret Key"
-- Encrypt
local iv = range(16):map(|| -> string.char(math.random(0, 255))):concat("")
local plain = "Hello, world!"
local enc = plain |> crypto.encrypt|"aes-cbc-pkcs7", key, iv|
print(dumpvar(enc))
-- Decrypt
print(crypto.decrypt(enc, "aes-cbc-pkcs7", key, iv)) --> Hello, world!

AES-ECB

This unauthenticated AES mode takes only a key, and is considered to be the weakest. Identical plaintext blocks result in identical ciphertext blocks.

crypto.encrypt

Parameters

  1. data — The data to be encrypted.
  2. mode — "aes-ecb-pkcs7" for PKCS#7 padding, or "aes-ecb" if you know what you're doing.
  3. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.

crypto.decrypt

Parameters

  1. mode — "aes-ecb-pkcs7" for PKCS#7 padding, or "aes-ecb" if you know what you're doing.
  2. data — The ciphertext to decrypt.
  3. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.

Returns the decrypted data on success. Throws an error if the padding was incorrect.

pluto
local crypto = require "pluto:crypto"
local key <const> = "A Top Secret Key"
-- Encrypt
local plain = "Hello, world!"
local enc = plain |> crypto.encrypt|"aes-ecb-pkcs7", key|
print(dumpvar(enc)) --> string(16) "`p{����k\21*.>jG"
-- Decrypt
print(crypto.decrypt(enc, "aes-ecb-pkcs7", key)) --> Hello, world!

AES-GCM

This authenticated AES mode allows for additional data that will be validated although not encrypted, such as a Message Authentication Code (MAC).

crypto.encrypt

Parameters

  1. data — The data to be encrypted.
  2. mode — Must be "aes-gcm". AES-GCM can deal with unpadded data, hence does not need PKCS#7 padding.
  3. aadata — Authenticated data. Will not be encrypted.
  4. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.
  5. iv — Must have a length of 16.

Returns two strings: the ciphertext and the authentication tag.

crypto.decrypt

Parameters

  1. data — The ciphertext to decrypt.
  2. mode — Must be "aes-gcm".
  3. aadata — Authenticated data.
  4. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.
  5. iv — Must have a length of 16.
  6. tag — The authentication tag produced by the "encrypt" procedure.

Returns the decrypted data on success. Throws an error if authentication or unpadding failed.

pluto
local crypto = require "pluto:crypto"
local key <const> = "A Top Secret Key"
local aadata = "This is Pluto!"
-- Encrypt
local iv = range(16):map(|| -> string.char(math.random(0, 255))):concat("")
local plain = "Hello, world!"
local enc, tag = plain |> crypto.encrypt|"aes-gcm", aadata, key, iv|
print(dumpvar(enc))
print(dumpvar(tag))
-- Decrypt
print(crypto.decrypt(enc, "aes-gcm", aadata, key, iv, tag)) --> Hello, world!

RSA

crypto.generatekeypair

Parameters

  1. mode — Must be "rsa".
  2. bits — A positive integer for a strict bit-length requirement, or a negative integer for a lax requirement. Common values are 1024, 2048, and 4096.

Returns two tables: The public key (consisting of n and e), and the private key (consisting of p and q). The Bigint class is used for all values.

pluto
local pub, priv = crypto.generatekeypair("rsa", 512)
print(dumpvar(pub))
--> {
--> ["n"] = 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357,
--> ["e"] = 65537,
--> }
print(dumpvar(priv))
--> {
--> ["p"] = 115443384115231951475820445136871322101870729500298182134363293112660251666017,
--> ["q"] = 98365361248415863235179644468056200977592391948608651522703704315152579004021,
--> }

crypto.encrypt

Parameters

  1. data — The data to be encrypted.
  2. mode — "rsa-pkcs1" for PKCS#1 padding, or "rsa" if you know what you're doing.
  3. key — The public or private key to use. Commonly, a public key is used to encrypt data.

crypto.decrypt

Parameters

  1. data — The ciphertext to decrypt.
  2. mode — "rsa-pkcs1" for PKCS#1 padding, or "rsa" if you know what you're doing.
  3. key — The public or private key to use. If the data was encrypted with the public key, the private key is needed to decrypt it.
pluto
local { base64, bigint, crypto } = require "pluto:*"
local priv = {
p = new bigint("115443384115231951475820445136871322101870729500298182134363293112660251666017"),
q = new bigint("98365361248415863235179644468056200977592391948608651522703704315152579004021"),
}
-- Derive public key
local pub = {
n = priv.p * priv.q, -- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357
e = new bigint(0x10001) -- 65537
}
-- Encrypt
local enc = crypto.encrypt("A secret message to the owner of the private key.", "rsa-pkcs1", pub)
print(base64.encode(enc))
-- Decrypt
print(enc |> crypto.decrypt|"rsa-pkcs1", priv|) --> A secret message to the owner of the private key.

crypto.sign

Parameters

  1. data — The data to sign.
  2. mode — "rsa-sha256" or "rsa-sha1".
  3. key — The private key to use.

crypto.verify

Parameters

  1. data — The data that was signed.
  2. mode — "rsa-sha256" or "rsa-sha1".
  3. key — The public key corresponding to the signer's private key.
  4. signature — The signature produced by the "sign" procedure.

Returns a boolean that indicates if the signature validated successfully.

pluto
local { base64, bigint, crypto } = require "pluto:*"
local priv = {
p = new bigint("115443384115231951475820445136871322101870729500298182134363293112660251666017"),
q = new bigint("98365361248415863235179644468056200977592391948608651522703704315152579004021"),
}
-- Derive public key
local pub = {
n = priv.p * priv.q, -- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357
e = new bigint(0x10001) -- 65537
}
-- Sign
local msg = "The canary has left the nest."
local sig = msg |> crypto.sign|"rsa-sha256", priv|
print(base64.encode(sig)) --> un1g04+cwG8WxYDpSlj4PO/hsTqSITgYKycRuR+m3AE6ypLyUCrVHC/0j4M3DeW81ADZVda6TVkC/Ht8EdYeFw==
-- Verify
print(crypto.verify(msg, "rsa-sha256", pub, sig)) --> true
+ \ No newline at end of file diff --git a/docs/Runtime Environment/Exception.html b/docs/Runtime Environment/Exception.html index 514bd341..da74c921 100644 --- a/docs/Runtime Environment/Exception.html +++ b/docs/Runtime Environment/Exception.html @@ -4,13 +4,13 @@ Exception | Pluto - +
-

Exception

The exception class makes errors easier to parse with where and what members, as opposed to having a string with both.

For ease of use, constructing an exception automatically throws it.

pluto
try
new exception("Not implemented")
catch e then
print(e) -- same as error("Not implemented")
print(e.what)
print(e.where)
end

Output:

script.pluto:2: Not implemented
Not implemented
script.pluto:2

Try It Yourself

- +

Exception

The exception class makes errors easier to parse with where and what members, as opposed to having a string with both.

For ease of use, constructing an exception automatically throws it.

pluto
try
new exception("Not implemented")
catch e then
print(e) -- same as error("Not implemented")
print(e.what)
print(e.where)
end

Output:

script.pluto:2: Not implemented
Not implemented
script.pluto:2

Try It Yourself

+ \ No newline at end of file diff --git a/docs/Runtime Environment/Global & Base.html b/docs/Runtime Environment/Global & Base.html index c72e7f04..936f9842 100644 --- a/docs/Runtime Environment/Global & Base.html +++ b/docs/Runtime Environment/Global & Base.html @@ -4,13 +4,13 @@ Global & Base | Pluto - +
-

Global & Base

This page documents the changes & additions to Pluto's runtime environment, which is built on top of Lua 5.4's.


_PVERSION

_PVERSION is the global to check your current version of Pluto.

_PSOUP

_PSOUP is a global boolean you can access to check linkage with Soup. Always true as of 0.8.0.

os.platform

os.platform is a global string containing the host platform. Can be "windows", "wasm", "linux", "macos", "android", or "unknown".

pluto
if _PVERSION == nil then
print("Plain Lua detected (".._VERSION..")")
else
io.write("Pluto detected (".._PVERSION.."), based on ".._VERSION)
if os.platform then
io.write(", running on "..os.platform)
end
io.write("\n")
end

package.path

package.path is modified to also search for .pluto files.


Default Metatables

Tables and coroutines/threads have metatables by default, akin to how each string has a metatable by default.

pluto
local t = {}
local c = coroutine.create(|| -> do end)
-- Can do this:
t:contains(1)
t:concat("\n")
c:resume()
-- As opposed to this:
table.contains(t, 1)
table.concat(t, "\n")
coroutine.resume(c)

This behavior is implemented by setting the __index metamethod to the respective library (_G.table or _G.coroutine). If you override the metatable, you may want to replicate that.


dumpvar

A debug function designed to dump values into human-readable formats.

Parameters

  1. The value to dump.

Returns

A string representation of the value.

pluto
local t = {
["hello"] = 1234,
["goodbye"] = _G.table,
["name"] = "John",
["lastname"] = "Doe",
["details"] = {
"No details available."
}
}
print(dumpvar(t))
{
["lastname"] = string(3) "Doe",
["name"] = string(4) "John",
["goodbye"] = {
["unpack"] = function: 00007FF7738B3C20,
["insert"] = function: 00007FF7738B30D0,
["freeze"] = function: 00007FF7738B43F0,
["foreach"] = function: 00007FF7738B3220,
["filter"] = function: 00007FF7738B4700,
["isfrozen"] = function: 00007FF7738B44B0,
["getn"] = function: 00007FF7738B43B0,
["pack"] = function: 00007FF7738B3B10,
["contains"] = function: 00007FF7738B4540,
["move"] = function: 00007FF7738B34D0,
["concat"] = function: 00007FF7738B37F0,
["sort"] = function: 00007FF7738B42B0,
["remove"] = function: 00007FF7738B33C0,
["map"] = function: 00007FF7738B49A0,
},
["hello"] = 1234,
["details"] = {
[1] = string(21) "No details available.",
},
}

exportvar

Similar to dumpvar, but returns valid Lua/Pluto code. May error if the value can not be represented accordingly.

Parameters

  1. The value to dump.
pluto
-- Slightly altered data from last example as C functions can not be exported.
local t = {
["hello"] = 1234,
["name"] = "John",
["lastname"] = "Doe",
["details"] = {
"No details available."
}
}
print(exportvar(t))
{
["hello"] = 1234,
["name"] = "John",
["details"] = {
[1] = "No details available.",
},
["lastname"] = "Doe",
}

range

Returns a table of numbers in the given range.

pluto
print(range(10):unpack()) --> 1 2 3 4 5 6 7 8 9 10
print(range(4, 8):unpack()) --> 4 5 6 7 8

compareversions

Performs a three-way comparison on 2 version numbers, similar to the Spaceship Operator.

pluto
assert(compareversions("1.0.0", "0.9.0") >= 0)
assert(compareversions("1.0.0", "1.0.0-dev") >= 0)

Note that pre-release versions (e.g. with -dev suffix) are considered to be less than their final counterparts.


wcall

Calls the given function and returns a string of warnings raised by it.

pluto
local w = wcall(|| -> warn("Bad!"))
print(w ~= "" ? (w:strip()) : "No warnings")
-- Output: "Bad!"
- +

Global & Base

This page documents the changes & additions to Pluto's runtime environment, which is built on top of Lua 5.4's.


_PVERSION

_PVERSION is the global to check your current version of Pluto.

_PSOUP

_PSOUP is a global boolean you can access to check linkage with Soup. Always true as of 0.8.0.

os.platform

os.platform is a global string containing the host platform. Can be "windows", "wasm", "linux", "macos", "android", or "unknown".

pluto
if _PVERSION == nil then
print("Plain Lua detected (".._VERSION..")")
else
io.write("Pluto detected (".._PVERSION.."), based on ".._VERSION)
if os.platform then
io.write(", running on "..os.platform)
end
io.write("\n")
end

package.path

package.path is modified to also search for .pluto files.


Default Metatables

Tables and coroutines/threads have metatables by default, akin to how each string has a metatable by default.

pluto
local t = {}
local c = coroutine.create(|| -> do end)
-- Can do this:
t:contains(1)
t:concat("\n")
c:resume()
-- As opposed to this:
table.contains(t, 1)
table.concat(t, "\n")
coroutine.resume(c)

This behavior is implemented by setting the __index metamethod to the respective library (_G.table or _G.coroutine). If you override the metatable, you may want to replicate that.


dumpvar

A debug function designed to dump values into human-readable formats.

Parameters

  1. The value to dump.

Returns

A string representation of the value.

pluto
local t = {
["hello"] = 1234,
["goodbye"] = _G.table,
["name"] = "John",
["lastname"] = "Doe",
["details"] = {
"No details available."
}
}
print(dumpvar(t))
{
["lastname"] = string(3) "Doe",
["name"] = string(4) "John",
["goodbye"] = {
["unpack"] = function: 00007FF7738B3C20,
["insert"] = function: 00007FF7738B30D0,
["freeze"] = function: 00007FF7738B43F0,
["foreach"] = function: 00007FF7738B3220,
["filter"] = function: 00007FF7738B4700,
["isfrozen"] = function: 00007FF7738B44B0,
["getn"] = function: 00007FF7738B43B0,
["pack"] = function: 00007FF7738B3B10,
["contains"] = function: 00007FF7738B4540,
["move"] = function: 00007FF7738B34D0,
["concat"] = function: 00007FF7738B37F0,
["sort"] = function: 00007FF7738B42B0,
["remove"] = function: 00007FF7738B33C0,
["map"] = function: 00007FF7738B49A0,
},
["hello"] = 1234,
["details"] = {
[1] = string(21) "No details available.",
},
}

exportvar

Similar to dumpvar, but returns valid Lua/Pluto code. May error if the value can not be represented accordingly.

Parameters

  1. The value to dump.
pluto
-- Slightly altered data from last example as C functions can not be exported.
local t = {
["hello"] = 1234,
["name"] = "John",
["lastname"] = "Doe",
["details"] = {
"No details available."
}
}
print(exportvar(t))
{
["hello"] = 1234,
["name"] = "John",
["details"] = {
[1] = "No details available.",
},
["lastname"] = "Doe",
}

range

Returns a table of numbers in the given range.

pluto
print(range(10):unpack()) --> 1 2 3 4 5 6 7 8 9 10
print(range(4, 8):unpack()) --> 4 5 6 7 8

compareversions

Performs a three-way comparison on 2 version numbers, similar to the Spaceship Operator.

pluto
assert(compareversions("1.0.0", "0.9.0") >= 0)
assert(compareversions("1.0.0", "1.0.0-dev") >= 0)

Note that pre-release versions (e.g. with -dev suffix) are considered to be less than their final counterparts.


wcall

Calls the given function and returns a string of warnings raised by it.

pluto
local w = wcall(|| -> warn("Bad!"))
print(w ~= "" ? (w:strip()) : "No warnings")
-- Output: "Bad!"
+ \ No newline at end of file diff --git a/docs/Runtime Environment/HTTP.html b/docs/Runtime Environment/HTTP.html index 711781ba..fc114c78 100644 --- a/docs/Runtime Environment/HTTP.html +++ b/docs/Runtime Environment/HTTP.html @@ -4,13 +4,13 @@ HTTP | Pluto - +
-

HTTP

Must be included via require.


http.request

Performs an HTTP request.

Parameters

  1. The URL to send a request to as a string. This parameter is optional in the sense that the options table (parameter 2) can be parameter 1 instead, but must have the "url" option then.
  2. The table of options. This parameter is optional if a URL was given.

Options

  • method: The HTTP request method to use. Defaults to GET.
  • headers: A table of headers, e.g. { ["Content-Type"] = "application/json" }.
  • body: An optional request payload. If provided, the Content-Length header is set appropriately, and the method is set to POST unless otherwise specified.
  • prefer_ipv6: (Does nothing in WASM builds of Pluto.) When establishing a new connection, we attempt to lookup and connect via IPv4, retrying with IPv6 if needed. If this is set to true, we instead start with IPv6. This may be useful for "LAN" services that identify the LAN via IPv6 instead of IPv4.
  • dont_reuse: (Does nothing in WASM builds of Pluto.) Force the implementation not to reuse an existing socket, which may involve waiting. Instead a new connection is opened. This may be useful when many requests are headed to the same remote and you consider the time taken by a fresh handshake to be less than the time taken to wait to reuse.
  • dont_make_reusable: (Does nothing in WASM builds of Pluto.) If a new connection to the remote was opened to carry out the request, close it again after the request. This is useful to avoid burdening the remote for one-off requests.

Returns

On success:

  1. The response body as a string.
  2. The status code as an integer.
  3. A table of response headers. Empty in WASM builds of Pluto.
  4. The status text as a string.

On failure:

  1. Nil.
  2. An approximate failure reason as an English string. Not available in WASM builds of Pluto.

Multitasking

If called inside of a coroutine, this function yields. Otherwise, it blocks. In WASM builds of Pluto, it must be called inside of a coroutine that yields to the environment as otherwise the request cannot be dispatched.

info

The first request to a remote may take a while — especially with HTTPS — due to the TCP and TLS handshakes. We use keep-alive to keep the connection open, so subsequent requests to the same remote will be significantly faster.

pluto
local http = require "pluto:http"
local body, status_code, headers, status_text = http.request("https://httpbin.org/anything")
print(status_code.." "..status_text)
if os.platform != "wasm" then
print(dumpvar(headers))
end
print(body)

Try It Yourself


http.hasconnection

Queries if a keep-alive connection is available for a remote. This function is not available in WASM builds of Pluto.

Parameters

  1. A partial URL identifying the remote. Partial because only the protocol, host, and port are used; additional components such as path are ignored.

Multitasking

If called inside of a coroutine, this function may yield. Otherwise, it may block.

pluto
local { http, scheduler } = require "*"
local sched = new scheduler()
sched:addloop(function()
print(http.hasconnection("https://httpbin.org"))
end)
sched:add(function()
print((http.request("https://httpbin.org/anything")))
end)
sched:run()

http.closeconnections

Closes all keep-alive connections like when closing the Lua state but in a non-blocking way. This function does nothing in WASM builds of Pluto.

Multitasking

This function must be called inside of a coroutine, as it will yield.

- +

HTTP

Must be included via require.


http.request

Performs an HTTP request.

Parameters

  1. The URL to send a request to as a string. This parameter is optional in the sense that the options table (parameter 2) can be parameter 1 instead, but must have the "url" option then.
  2. The table of options. This parameter is optional if a URL was given.

Options

  • method: The HTTP request method to use. Defaults to GET.
  • headers: A table of headers, e.g. { ["Content-Type"] = "application/json" }.
  • body: An optional request payload. If provided, the Content-Length header is set appropriately, and the method is set to POST unless otherwise specified.
  • prefer_ipv6: (Does nothing in WASM builds of Pluto.) When establishing a new connection, we attempt to lookup and connect via IPv4, retrying with IPv6 if needed. If this is set to true, we instead start with IPv6. This may be useful for "LAN" services that identify the LAN via IPv6 instead of IPv4.
  • dont_reuse: (Does nothing in WASM builds of Pluto.) Force the implementation not to reuse an existing socket, which may involve waiting. Instead a new connection is opened. This may be useful when many requests are headed to the same remote and you consider the time taken by a fresh handshake to be less than the time taken to wait to reuse.
  • dont_make_reusable: (Does nothing in WASM builds of Pluto.) If a new connection to the remote was opened to carry out the request, close it again after the request. This is useful to avoid burdening the remote for one-off requests.

Returns

On success:

  1. The response body as a string.
  2. The status code as an integer.
  3. A table of response headers. Empty in WASM builds of Pluto.
  4. The status text as a string.

On failure:

  1. Nil.
  2. An approximate failure reason as an English string. Not available in WASM builds of Pluto.

Multitasking

If called inside of a coroutine, this function yields. Otherwise, it blocks. In WASM builds of Pluto, it must be called inside of a coroutine that yields to the environment as otherwise the request cannot be dispatched.

info

The first request to a remote may take a while — especially with HTTPS — due to the TCP and TLS handshakes. We use keep-alive to keep the connection open, so subsequent requests to the same remote will be significantly faster.

pluto
local http = require "pluto:http"
local body, status_code, headers, status_text = http.request("https://httpbin.org/anything")
print(status_code.." "..status_text)
if os.platform != "wasm" then
print(dumpvar(headers))
end
print(body)

Try It Yourself


http.hasconnection

Queries if a keep-alive connection is available for a remote. This function is not available in WASM builds of Pluto.

Parameters

  1. A partial URL identifying the remote. Partial because only the protocol, host, and port are used; additional components such as path are ignored.

Multitasking

If called inside of a coroutine, this function may yield. Otherwise, it may block.

pluto
local { http, scheduler } = require "*"
local sched = new scheduler()
sched:addloop(function()
print(http.hasconnection("https://httpbin.org"))
end)
sched:add(function()
print((http.request("https://httpbin.org/anything")))
end)
sched:run()

http.closeconnections

Closes all keep-alive connections like when closing the Lua state but in a non-blocking way. This function does nothing in WASM builds of Pluto.

Multitasking

This function must be called inside of a coroutine, as it will yield.

+ \ No newline at end of file diff --git a/docs/Runtime Environment/IO.html b/docs/Runtime Environment/IO.html index 8d5548ed..43c9e7a2 100644 --- a/docs/Runtime Environment/IO.html +++ b/docs/Runtime Environment/IO.html @@ -4,13 +4,13 @@ IO | Pluto - +
-

IO

This page documents the changes & additions to the io library in Pluto, which is built on top of Lua 5.4's.


io.rename

A variant of Lua's os.rename that raises an error on failure and instead has no return values.


io.remove

A variant of Lua's os.remove that raises an error on failure and instead has no return values.


io.copy

Copy a file to another file, creating a new file if needed.

Parameters

  1. A string path or file stream.
  2. A path towards the file to copy into.

Returns

A boolean indicating if the file was successfully copied.

pluto
if io.copy("./cfg/config.txt", "./backup_cfg/config.txt") then
print("Successfully created a backup config!")
else
print("Failed to create a backup config.")
end

io.part

Extracts the given part from a path.

Parameters

  1. A string path or file stream.
  2. The part to return, "parent" or "name".

Returns

The extracted part.

pluto
print(io.part("/path/to/foo.txt", "parent")) -- "/path/to"
print(io.part("/path/to/foo.txt", "name")) -- "foo.txt"

io.isdir

Parameters

  1. A string path or file stream.

Returns

A boolean indicating if the path led toward a directory.

pluto
local path = "./dir/main/"
local bool = io.isdir(path)
if bool then
print("Directory!")
else
print("Not a directory!")
end

io.isfile

Parameters

  1. A string path or file stream.

Returns

A boolean indicating if the path led towards a file.

pluto
local path = "./isfile/file"
local bool = io.isfile(path)
if bool then
print("File!")
else
print("Not a file!")
end

io.exists

Parameters

  1. A string path or file stream.

Returns

A boolean indicating if the path led towards an existing file or directory.

pluto
if io.exists("cfg/config.txt") then
print("Config exists!")
else
print("Config does not exist!")
end

io.makedir

Create a directory.

Parameters

  1. The path for the new directory.

Returns

A boolean indicating if the directory was successfully created.

pluto
if io.makedir("./cfg") then
print("Created cfg directory.")
else
print("Failed to create cfg directory.")
end

io.listdir

List all the files within a directory.

Parameters

  1. A string path to the directory.
  2. A boolean indicating whether or not to recurse sub-directories.

Returns

An index-based table containing file paths.

pluto
for _, filepath in io.listdir(".") do
print(filepath)
end

io.makedirs

Creates a directory and all the non-existing parent directories in the given path.

Parameters

  1. The string path for your new directory.
pluto
io.makedirs("A/B/C") -- Creates "C:\Users\Username\Desktop\Project\A\B\C"

io.absolute

Convert a relative path into an absolute one.

Parameters

  1. A string path or file stream.
  2. An optional bool if the path should be canonicalized. A canonical path does not go through symlinks.

Returns

A string representing the new file path.

pluto
io.absolute("cfg/cfg.txt") -- "C:\Users\Username\Desktop\Project\cfg\cfg.txt"

io.relative

Convert an absolute path into a relative one.

Parameters

  1. A string path or file stream.

Returns

A string representing the new file path.

pluto
io.relative(io.absolute("cfg/cfg.txt")) -- "cfg\cfg.txt"

io.contents

Get or set a file's contents.

Parameters

  1. A string path or file stream.
  2. The desired content. If this parameter is absent, this function works as a getter.

Returns

If this function is acting as a getter, it will return the file's contents or nil if there was an error.

pluto
local text = io.contents("foo.txt") or ""
text ..= "bar"
io.contents("foo.txt", text)

This function is not only easier to use than the traditional io.open approach, it also performs significantly better.


io.filesize

Fetch the size of a file in bytes.

Parameters

  1. A string path or file stream.
pluto
if io.filesize("cfg/config.txt") <= 1 then
print("Config is too small or empty.")
end

io.writetime

Get or set a file's modification time.

Parameters

  1. A string path or file stream.
  2. The desired timestamp. If this parameter is absent, this function works as a getter.

Returns

If this function is acting as a getter, it will return the file's last write time as seconds since the UNIX epoch.

pluto
local time = io.writetime("foo.txt")
time += 3600
io.writetime("foo.txt", time)

This example adds an hour (= 60 minutes = 3600 seconds) to the last write time of "foo.txt" (or errors if that file does not exist).


io.currentdir

Get or set the current working directory.

Parameters

  1. A path to the desired current working directory. If this parameter is absent, this function works as a getter.

Returns

If this function is acting as a getter, it will return the current working directory.

pluto
local cwd = io.currentdir() -- Get cwd
io.currentdir("abc/abc") -- Set a new cwd
- +

IO

This page documents the changes & additions to the io library in Pluto, which is built on top of Lua 5.4's.


io.rename

A variant of Lua's os.rename that raises an error on failure and instead has no return values.


io.remove

A variant of Lua's os.remove that raises an error on failure and instead has no return values.


io.copy

Copy a file to another file, creating a new file if needed.

Parameters

  1. A string path or file stream.
  2. A path towards the file to copy into.

Returns

A boolean indicating if the file was successfully copied.

pluto
if io.copy("./cfg/config.txt", "./backup_cfg/config.txt") then
print("Successfully created a backup config!")
else
print("Failed to create a backup config.")
end

io.part

Extracts the given part from a path.

Parameters

  1. A string path or file stream.
  2. The part to return, "parent" or "name".

Returns

The extracted part.

pluto
print(io.part("/path/to/foo.txt", "parent")) -- "/path/to"
print(io.part("/path/to/foo.txt", "name")) -- "foo.txt"

io.isdir

Parameters

  1. A string path or file stream.

Returns

A boolean indicating if the path led toward a directory.

pluto
local path = "./dir/main/"
local bool = io.isdir(path)
if bool then
print("Directory!")
else
print("Not a directory!")
end

io.isfile

Parameters

  1. A string path or file stream.

Returns

A boolean indicating if the path led towards a file.

pluto
local path = "./isfile/file"
local bool = io.isfile(path)
if bool then
print("File!")
else
print("Not a file!")
end

io.exists

Parameters

  1. A string path or file stream.

Returns

A boolean indicating if the path led towards an existing file or directory.

pluto
if io.exists("cfg/config.txt") then
print("Config exists!")
else
print("Config does not exist!")
end

io.makedir

Create a directory.

Parameters

  1. The path for the new directory.

Returns

A boolean indicating if the directory was successfully created.

pluto
if io.makedir("./cfg") then
print("Created cfg directory.")
else
print("Failed to create cfg directory.")
end

io.listdir

List all the files within a directory.

Parameters

  1. A string path to the directory.
  2. A boolean indicating whether or not to recurse sub-directories.

Returns

An index-based table containing file paths.

pluto
for _, filepath in io.listdir(".") do
print(filepath)
end

io.makedirs

Creates a directory and all the non-existing parent directories in the given path.

Parameters

  1. The string path for your new directory.
pluto
io.makedirs("A/B/C") -- Creates "C:\Users\Username\Desktop\Project\A\B\C"

io.absolute

Convert a relative path into an absolute one.

Parameters

  1. A string path or file stream.
  2. An optional bool if the path should be canonicalized. A canonical path does not go through symlinks.

Returns

A string representing the new file path.

pluto
io.absolute("cfg/cfg.txt") -- "C:\Users\Username\Desktop\Project\cfg\cfg.txt"

io.relative

Convert an absolute path into a relative one.

Parameters

  1. A string path or file stream.

Returns

A string representing the new file path.

pluto
io.relative(io.absolute("cfg/cfg.txt")) -- "cfg\cfg.txt"

io.contents

Get or set a file's contents.

Parameters

  1. A string path or file stream.
  2. The desired content. If this parameter is absent, this function works as a getter.

Returns

If this function is acting as a getter, it will return the file's contents or nil if there was an error.

pluto
local text = io.contents("foo.txt") or ""
text ..= "bar"
io.contents("foo.txt", text)

This function is not only easier to use than the traditional io.open approach, it also performs significantly better.


io.filesize

Fetch the size of a file in bytes.

Parameters

  1. A string path or file stream.
pluto
if io.filesize("cfg/config.txt") <= 1 then
print("Config is too small or empty.")
end

io.writetime

Get or set a file's modification time.

Parameters

  1. A string path or file stream.
  2. The desired timestamp. If this parameter is absent, this function works as a getter.

Returns

If this function is acting as a getter, it will return the file's last write time as seconds since the UNIX epoch.

pluto
local time = io.writetime("foo.txt")
time += 3600
io.writetime("foo.txt", time)

This example adds an hour (= 60 minutes = 3600 seconds) to the last write time of "foo.txt" (or errors if that file does not exist).


io.currentdir

Get or set the current working directory.

Parameters

  1. A path to the desired current working directory. If this parameter is absent, this function works as a getter.

Returns

If this function is acting as a getter, it will return the current working directory.

pluto
local cwd = io.currentdir() -- Get cwd
io.currentdir("abc/abc") -- Set a new cwd
+ \ No newline at end of file diff --git a/docs/Runtime Environment/JSON.html b/docs/Runtime Environment/JSON.html index 45c9e5ab..dca278df 100644 --- a/docs/Runtime Environment/JSON.html +++ b/docs/Runtime Environment/JSON.html @@ -4,13 +4,13 @@ JSON | Pluto - +
-

JSON

Must be included via require.


json.encode

Returns a string of JSON.

Parameters

  1. data — A boolean, number, string, or table to encode as JSON.
  2. pretty — Whether to return a human-readable string of JSON. Defaults to false.
pluto
local json = require("json")
local data
data = "Hello, World!"
print(json.encode(data, true))
--> "Hello, World!"
data = {
key = "Hello, World!",
nested = {
nested_key = 1337
}
}
print(json.encode(data, true))
--> {
--> "key": "Hello, World!",
--> "nested": {
--> "nested_key": 1337
--> }
--> }

Because Lua tables do not have order guarantees, you can add an __order field to fix the order:

pluto
local t = {
__order = { "a", "b", "c" },
a = 1,
b = 2,
c = 3
}
print(require"json".encode(t)) -- {"a":1,"b":2,"c":3}

The json.null value — assuming you did local json = require("json") — can be used to encode JSON null values.

pluto
local json = require("json")
print(json.encode(json.null)) --> null

json.decode

Returns multiple potential types. If you pass a serialized boolean, number, or string, then it will return the same type. If you pass a complex JSON object, it will return a table.

Parameters

  1. data — The JSON data to decode.
  2. flags — Options to augment the return value. Multiple options can be combined with bitwise OR (|). Defaults to 0.
    • json.withnull — decodes JSON null values as json.null instead of nil.
    • json.withorder — adds an __order field to tables of decoded JSON objects. json.encode respects this, so this is perfect for modifying data while preserving order.
pluto
local json = require("json")
local data, encoded, decoded
-- Basic Type
data = "Hello, World!"
encoded = json.encode(data, true)
decoded = json.decode(encoded)
assert(decoded == data)
assert(type(decoded) == "string")
-- Complex Type
data = {
key = "Hello",
nested = {
nested_key = 1337
}
}
encoded = json.encode(data, true)
decoded = json.decode(encoded)
assert(decoded.key == "Hello")
assert(type(decoded) == "table")
assert(decoded.nested.nested_key == 1337)
-- Flags
encoded = [[{
"null": null,
"string": "Hello"
}]]
decoded = json.decode(encoded, json.withnull | json.withorder)
assert(decoded.__order[1] == "null")
assert(decoded.null == json.null)
assert(json.encode(decoded, true) == encoded)
- +

JSON

Must be included via require.


json.encode

Returns a string of JSON.

Parameters

  1. data — A boolean, number, string, or table to encode as JSON.
  2. pretty — Whether to return a human-readable string of JSON. Defaults to false.
pluto
local json = require("json")
local data
data = "Hello, World!"
print(json.encode(data, true))
--> "Hello, World!"
data = {
key = "Hello, World!",
nested = {
nested_key = 1337
}
}
print(json.encode(data, true))
--> {
--> "key": "Hello, World!",
--> "nested": {
--> "nested_key": 1337
--> }
--> }

Because Lua tables do not have order guarantees, you can add an __order field to fix the order:

pluto
local t = {
__order = { "a", "b", "c" },
a = 1,
b = 2,
c = 3
}
print(require"json".encode(t)) -- {"a":1,"b":2,"c":3}

The json.null value — assuming you did local json = require("json") — can be used to encode JSON null values.

pluto
local json = require("json")
print(json.encode(json.null)) --> null

json.decode

Returns multiple potential types. If you pass a serialized boolean, number, or string, then it will return the same type. If you pass a complex JSON object, it will return a table.

Parameters

  1. data — The JSON data to decode.
  2. flags — Options to augment the return value. Multiple options can be combined with bitwise OR (|). Defaults to 0.
    • json.withnull — decodes JSON null values as json.null instead of nil.
    • json.withorder — adds an __order field to tables of decoded JSON objects. json.encode respects this, so this is perfect for modifying data while preserving order.
pluto
local json = require("json")
local data, encoded, decoded
-- Basic Type
data = "Hello, World!"
encoded = json.encode(data, true)
decoded = json.decode(encoded)
assert(decoded == data)
assert(type(decoded) == "string")
-- Complex Type
data = {
key = "Hello",
nested = {
nested_key = 1337
}
}
encoded = json.encode(data, true)
decoded = json.decode(encoded)
assert(decoded.key == "Hello")
assert(type(decoded) == "table")
assert(decoded.nested.nested_key == 1337)
-- Flags
encoded = [[{
"null": null,
"string": "Hello"
}]]
decoded = json.decode(encoded, json.withnull | json.withorder)
assert(decoded.__order[1] == "null")
assert(decoded.null == json.null)
assert(json.encode(decoded, true) == encoded)
+ \ No newline at end of file diff --git a/docs/Runtime Environment/Math.html b/docs/Runtime Environment/Math.html index 458ec58f..4fdf8853 100644 --- a/docs/Runtime Environment/Math.html +++ b/docs/Runtime Environment/Math.html @@ -4,13 +4,13 @@ Math | Pluto - +
-

Math

This page documents the changes & additions to the math library in Pluto, which is built on top of Lua 5.4's.


math.isnan

Checks if a number is NaN.

Parameters

  1. The number to check.
pluto
local x = 0 / 0
print(x ~= x) -- Lua way: Prove the variable is NaN because it is not equal to itself. Works, but unintuitive.
print(math.isnan(x))

math.round

Rounds a number to the nearest integer.

Parameters

  1. The number to round.
pluto
print(math.round(2.4)) --> 2
print(math.round(2.5)) --> 3

math.atan2

An alias of math.atan.

- +

Math

This page documents the changes & additions to the math library in Pluto, which is built on top of Lua 5.4's.


math.isnan

Checks if a number is NaN.

Parameters

  1. The number to check.
pluto
local x = 0 / 0
print(x ~= x) -- Lua way: Prove the variable is NaN because it is not equal to itself. Works, but unintuitive.
print(math.isnan(x))

math.round

Rounds a number to the nearest integer.

Parameters

  1. The number to round.
pluto
print(math.round(2.4)) --> 2
print(math.round(2.5)) --> 3

math.atan2

An alias of math.atan.

+ \ No newline at end of file diff --git a/docs/Runtime Environment/OS.html b/docs/Runtime Environment/OS.html index a7af5fea..fc393f45 100644 --- a/docs/Runtime Environment/OS.html +++ b/docs/Runtime Environment/OS.html @@ -4,13 +4,13 @@ OS | Pluto - +
-

OS

This page documents the changes & additions to the os library in Pluto, which is built on top of Lua 5.4's.


os.sleep

Parameters

  1. The amount of milliseconds to sleep for.

Example

pluto
os.sleep(1000) -- Pause this thread for 1000ms.

os.nanos, os.micros, os.millis, os.seconds

All of these return their respective times since implementation-specific epoch.

os.unixseconds

Returns seconds since UNIX epoch.

- +

OS

This page documents the changes & additions to the os library in Pluto, which is built on top of Lua 5.4's.


os.sleep

Parameters

  1. The amount of milliseconds to sleep for.

Example

pluto
os.sleep(1000) -- Pause this thread for 1000ms.

os.nanos, os.micros, os.millis, os.seconds

All of these return their respective times since implementation-specific epoch.

os.unixseconds

Returns seconds since UNIX epoch.

+ \ No newline at end of file diff --git a/docs/Runtime Environment/Scheduler.html b/docs/Runtime Environment/Scheduler.html index 94ffb360..1fe3949f 100644 --- a/docs/Runtime Environment/Scheduler.html +++ b/docs/Runtime Environment/Scheduler.html @@ -4,13 +4,13 @@ Scheduler | Pluto - +
-

Scheduler

The scheduler class — available via require — can be used to easily set up coroutine-based cooperative multitasking.

__construct

The constructor takes no arguments.

add

The add method can be used to turn a function into a coroutine. The coroutine is resumed once and then added to the scheduler.

addloop

The addloop method is a wrapper for the add method that keeps invoking the given function until it returns false.

run

The run method activates the scheduler. The scheduler resumes all coroutines and then calls its yieldfunc until either all coroutines are finished, or coroutine throws an error — in which case it is rethrown.

pluto
local scheduler = new (require"pluto:scheduler") ()
local loops = 0
scheduler:addloop(function()
++loops
print(loops)
return loops != 5
end)
scheduler:run()
--> 1
--> 2
--> 3
--> 4
--> 5
scheduler:add(function()
print("3...")
coroutine.sleep(1000)
print("2...")
coroutine.sleep(1000)
print("1...")
coroutine.sleep(1000)
print("Boom!")
end)
scheduler:run()
--> 3...
--> 2...
--> 1...
--> Boom!

yieldfunc

yieldfunc is a property on the scheduler that can be used to customize how the scheduler itself yields. By default, this is a function calling os.sleep(1).

pluto
local scheduler = new (require"pluto:scheduler") ()
-- Yield to OS every second instead of every millisecond.
scheduler.yieldfunc = || -> os.sleep(1000)
local loops = 0
scheduler:addloop(function()
++loops
print(loops)
return loops != 5
end)
scheduler:run()
--> 1
--> 2
--> 3
--> 4
--> 5

errorfunc

errorfunc is a property on the scheduler that can optionally be set to customize how the scheduler reports errors in its coroutines. By default, this is nil, in which case any coroutine errors are rethrown (via coroutine.xresume).

pluto
local { scheduler } = require "*"
local sched = new scheduler()
sched.errorfunc = |err| -> do print(debug.traceback(err)) end
sched:add(function()
error("this is urgent: fatal error")
end)
- +

Scheduler

The scheduler class — available via require — can be used to easily set up coroutine-based cooperative multitasking.

__construct

The constructor takes no arguments.

add

The add method can be used to turn a function into a coroutine. The coroutine is resumed once and then added to the scheduler.

addloop

The addloop method is a wrapper for the add method that keeps invoking the given function until it returns false.

run

The run method activates the scheduler. The scheduler resumes all coroutines and then calls its yieldfunc until either all coroutines are finished, or coroutine throws an error — in which case it is rethrown.

pluto
local scheduler = new (require"pluto:scheduler") ()
local loops = 0
scheduler:addloop(function()
++loops
print(loops)
return loops != 5
end)
scheduler:run()
--> 1
--> 2
--> 3
--> 4
--> 5
scheduler:add(function()
print("3...")
coroutine.sleep(1000)
print("2...")
coroutine.sleep(1000)
print("1...")
coroutine.sleep(1000)
print("Boom!")
end)
scheduler:run()
--> 3...
--> 2...
--> 1...
--> Boom!

yieldfunc

yieldfunc is a property on the scheduler that can be used to customize how the scheduler itself yields. By default, this is a function calling os.sleep(1).

pluto
local scheduler = new (require"pluto:scheduler") ()
-- Yield to OS every second instead of every millisecond.
scheduler.yieldfunc = || -> os.sleep(1000)
local loops = 0
scheduler:addloop(function()
++loops
print(loops)
return loops != 5
end)
scheduler:run()
--> 1
--> 2
--> 3
--> 4
--> 5

errorfunc

errorfunc is a property on the scheduler that can optionally be set to customize how the scheduler reports errors in its coroutines. By default, this is nil, in which case any coroutine errors are rethrown (via coroutine.xresume).

pluto
local { scheduler } = require "*"
local sched = new scheduler()
sched.errorfunc = |err| -> do print(debug.traceback(err)) end
sched:add(function()
error("this is urgent: fatal error")
end)
+ \ No newline at end of file diff --git a/docs/Runtime Environment/Socket.html b/docs/Runtime Environment/Socket.html index f06aca08..72ee20f8 100644 --- a/docs/Runtime Environment/Socket.html +++ b/docs/Runtime Environment/Socket.html @@ -4,13 +4,13 @@ Socket | Pluto - +
-

Socket

Must be included via require. This library is not available in WASM builds of Pluto.


socket.connect

Establishes a TCP connection.

Parameters

  1. The host to connect to. Either an IPv4 or IPv6 address, or a domain name resolving to one.
  2. The port to contact the host on.

Returns

A socket instance on success. Nil on failure.

Multitasking

If called inside of a coroutine, this function yields. Otherwise, it blocks.


socket.listen

Creates a new listener for the given port.

Parameters

  1. The port to listen on.

Returns

A listener instance on success. Nil on failure.


socket.bind

A convenience function that wraps socket.listen, automatically accepting new clients and spinning up a coroutine for them.

Parameters

  1. A scheduler instance.
  2. The port to listen on.
  3. The callback function that will be called in a new coroutine for each client socket.
pluto
local { scheduler, socket } = require "*"
local sched = new scheduler()
socket.bind(sched, 80, |s| -> do
local content = "Hello, world!"
s:send("HTTP/1.1 200 OK\r\nConnection: Close\r\nContent-Length: "..#content.."\r\n\r\n"..content)
end)
sched:run()

Socket Class

Socket instances are obtained by calling socket.connect (client), or from a listener (server).

socket.send

Sends data on a socket.

Parameters

  1. The socket instance.
  2. The data to send.

socket.recv

Receive data from a socket.

Parameters

  1. The socket instance.

Returns

  • If the socket is open: The oldest chunk of data received on the transport layer (TCP packet) or crypto layer (TLS record) as a string.
  • If the socket is closed: Nil.

Multitasking

If a message is buffered, the function can return immediately. If not, it will yield if inside a coroutine, and block otherwise.

pluto
local socket = require "pluto:socket"
local s = socket.connect("google.com", 80)
s:send("GET / HTTP/1.1\r\nHost: google.com\r\n\r\n")
print(s:recv())

socket.unrecv

Pushes a chunk of data to the front of the receive buffer, making it oldest for the purposes of socket.recv.

Parameters

  1. The socket instance.
  2. The data to push.
pluto
local socket = require "pluto:socket"
local sock = socket.connect("google.com", 80)
sock:unrecv("World")
sock:unrecv("Hello")
print(sock:recv()) --> Hello
print(sock:recv()) --> World

socket.starttls

Attempts to add the TLS crypto layer to the socket, making the transport layer a sole carrier for TLS traffic.

Parameters

  1. The socket instance.
  2. The host name of the intended remote. This may be the same as what was passed to socket.connect. This name must be on the certificate that the remote will send.

Returns

True on success. On failure, returns false and the socket is closed. If the socket is already using TLS, returns nil.

Multitasking

If called inside of a coroutine, this function yields. Otherwise, it blocks.

pluto
local socket = require "pluto:socket"
local s = socket.connect("pluto-lang.org", 443)
assert(s:starttls("pluto-lang.org"), "Failed to establish secure connection.")
s:send("GET / HTTP/1.1\r\nHost: pluto-lang.org\r\nConnection: close\r\n\r\n")
while data := s:recv() do
print(data)
end

socket.close

Closes a socket.

Parameters

  1. The socket instance.

Listener Class

Listener instances are obtained by calling socket.listen.

accept

Accepts an incoming client connection, waiting until there is one.

Returns

A new socket instance. The socket can be used as per usual, with the exception of the starttls function being unavailable.

Multitasking

  • If there is an incoming client connection, this function returns immediately.
  • If there is not, it waits for one. Waiting means yielding if called inside a coroutine, and blocking otherwise.

hasconnection

Checks if there is an incoming client connection. If this function returns true, the next call to accept is guaranteed not to block or yield.

pluto
local socket = require "pluto:socket"
local l = socket.listen(80) or error("Failed to bind TCP/80")
while not l:hasconnection() do -- Visit http://localhost to break this loop
os.sleep(1)
end
print(l:accept():recv())
- +

Socket

Must be included via require. This library is not available in WASM builds of Pluto.


socket.connect

Establishes a TCP connection.

Parameters

  1. The host to connect to. Either an IPv4 or IPv6 address, or a domain name resolving to one.
  2. The port to contact the host on.

Returns

A socket instance on success. Nil on failure.

Multitasking

If called inside of a coroutine, this function yields. Otherwise, it blocks.


socket.listen

Creates a new listener for the given port.

Parameters

  1. The port to listen on.

Returns

A listener instance on success. Nil on failure.


socket.bind

A convenience function that wraps socket.listen, automatically accepting new clients and spinning up a coroutine for them.

Parameters

  1. A scheduler instance.
  2. The port to listen on.
  3. The callback function that will be called in a new coroutine for each client socket.
pluto
local { scheduler, socket } = require "*"
local sched = new scheduler()
socket.bind(sched, 80, |s| -> do
local content = "Hello, world!"
s:send("HTTP/1.1 200 OK\r\nConnection: Close\r\nContent-Length: "..#content.."\r\n\r\n"..content)
end)
sched:run()

Socket Class

Socket instances are obtained by calling socket.connect (client), or from a listener (server).

socket.send

Sends data on a socket.

Parameters

  1. The socket instance.
  2. The data to send.

socket.recv

Receive data from a socket.

Parameters

  1. The socket instance.

Returns

  • If the socket is open: The oldest chunk of data received on the transport layer (TCP packet) or crypto layer (TLS record) as a string.
  • If the socket is closed: Nil.

Multitasking

If a message is buffered, the function can return immediately. If not, it will yield if inside a coroutine, and block otherwise.

pluto
local socket = require "pluto:socket"
local s = socket.connect("google.com", 80)
s:send("GET / HTTP/1.1\r\nHost: google.com\r\n\r\n")
print(s:recv())

socket.unrecv

Pushes a chunk of data to the front of the receive buffer, making it oldest for the purposes of socket.recv.

Parameters

  1. The socket instance.
  2. The data to push.
pluto
local socket = require "pluto:socket"
local sock = socket.connect("google.com", 80)
sock:unrecv("World")
sock:unrecv("Hello")
print(sock:recv()) --> Hello
print(sock:recv()) --> World

socket.starttls

Attempts to add the TLS crypto layer to the socket, making the transport layer a sole carrier for TLS traffic.

Parameters

  1. The socket instance.
  2. The host name of the intended remote. This may be the same as what was passed to socket.connect. This name must be on the certificate that the remote will send.

Returns

True on success. On failure, returns false and the socket is closed. If the socket is already using TLS, returns nil.

Multitasking

If called inside of a coroutine, this function yields. Otherwise, it blocks.

pluto
local socket = require "pluto:socket"
local s = socket.connect("pluto-lang.org", 443)
assert(s:starttls("pluto-lang.org"), "Failed to establish secure connection.")
s:send("GET / HTTP/1.1\r\nHost: pluto-lang.org\r\nConnection: close\r\n\r\n")
while data := s:recv() do
print(data)
end

socket.close

Closes a socket.

Parameters

  1. The socket instance.

Listener Class

Listener instances are obtained by calling socket.listen.

accept

Accepts an incoming client connection, waiting until there is one.

Returns

A new socket instance. The socket can be used as per usual, with the exception of the starttls function being unavailable.

Multitasking

  • If there is an incoming client connection, this function returns immediately.
  • If there is not, it waits for one. Waiting means yielding if called inside a coroutine, and blocking otherwise.

hasconnection

Checks if there is an incoming client connection. If this function returns true, the next call to accept is guaranteed not to block or yield.

pluto
local socket = require "pluto:socket"
local l = socket.listen(80) or error("Failed to bind TCP/80")
while not l:hasconnection() do -- Visit http://localhost to break this loop
os.sleep(1)
end
print(l:accept():recv())
+ \ No newline at end of file diff --git a/docs/Runtime Environment/String.html b/docs/Runtime Environment/String.html index 625ac588..9ba25a17 100644 --- a/docs/Runtime Environment/String.html +++ b/docs/Runtime Environment/String.html @@ -4,13 +4,13 @@ String | Pluto - +
-

String

This page documents the changes & additions to the string library in Pluto, which is built on top of Lua 5.4's.


string.upper

This function now takes a second parameter that specifies which index to capitalize.

pluto
local s = "hello"
assert(s:upper(1) == "Hello")

string.lower

This function now takes a second parameter that specifies which index to make lowercase.

pluto
local s = "HELLO"
assert(s:lower(1) == "hELLO")

string.split

Splits a string by a separator.

Parameters

  1. The string to split.
  2. The separator to split a string by. This can be any string.

Returns

A table.

Splitting a string by a single character.
pluto
local s = "hello world, how is everyone doing?"
local r = string.split(s, " ")
--[[
The value of 'r':
{
"hello",
"world,",
"how",
"is",
"everyone",
"doing?"
}
--]]
Splitting a string by a substring.
pluto
local s = "helloHALLOWORLDworld,HALLOWORLDhowHALLOWORLDisHALLOWORLDeveryoneHALLOWORLDdoing?"
local r = string.split(s, "HALLOWORLD")
--[[
The value of 'r':
{
"hello",
"world,",
"how",
"is",
"everyone",
"doing?"
}
--]]

string.rfind

Identical to the base Lua string.find in every way, except it searches right-to-left instead of left-to-right.


string.strip

Strips or trims characters from both ends of a string.

Parameters

  1. The string to strip.
  2. A string of characters to strip. Defaults to \n\r\t\v\0.

Returns

The new string.

pluto
local s = "{|}hello world{|}"
print(string.strip(s, "{}|")) --> hello world

string.lstrip

Strips or trims characters from the left side of a string.

Parameters

  1. The string to strip.
  2. A string of characters to strip. Defaults to \n\r\t\v\0.

Returns

The new string.

pluto
local s = "{|}hello world{|}"
print(string.lstrip(s, "{}|")) --> hello world{|}

string.rstrip

Strips or trims characters from the right side of a string.

Parameters

  1. The string to strip.
  2. A string of characters to strip. Defaults to \n\r\t\v\0.

Returns

The new string.

pluto
local s = "{|}hello world{|}"
print(string.rstrip(s, "{}|")) --> {|}hello world

string.isascii

Checks if a string is entirely composed of ASCII characters.

Parameters

  1. The string to check.
pluto
local s = "HELLOWORLD123"
print(string.isascii(s)) --> true
info

This would exclude any multi-byte characters, like emojis.


string.islower

Checks if a string is entirely composed of lowercase characters.

Parameters

  1. The string to check.
pluto
local s = "helloworld"
print(string.islower(s)) --> true
info

Whitespace characters are not lowercase characters.


string.isalpha

Checks if a string is entirely composed of alphabetic characters.

Parameters

  1. The string to check.
pluto
local s = "HELLOWORLD"
print(string.isalpha(s)) --> true
info

Whitespace characters are not alphabetic characters.


string.isupper

Checks if a string is entirely composed of uppercase characters.

Parameters

  1. The string to check.
pluto
local s = "HELLOWORLD"
print(string.isupper(s)) --> true
info

Whitespace characters are not uppercase characters.


string.isalnum

Checks if a string is entirely composed of alphanumeric characters.

Parameters

  1. The string to check.
pluto
local s = "HELLOWORLD123"
print(string.isalnum(s)) --> true
info

Whitespace characters are not alphanumeric characters.


string.iswhitespace

Checks if this string is entirely composed of whitespace characters.

Paramaters

  1. The string to check.
pluto
local s = " \t \v \f \t\t\t\t"
print(string.iswhitespace(s)) --> true

string.uformat

Same as string.format, but performs the operation under the en_US.UTF-8 locale. Ensures the same result on all systems.


string.replace

Replace substrings with another substring. Similar to string.gsub, but it operates on plain-text and is not burdened by a pattern capture limit.

Parameters

  1. original — The substring to replace.
  2. substitute — The replacement substring.
  3. max_replace — The maximum number of replacements you wish to occur. The default value is effectively 0, which means "infinite". If you pass 1, this leads to a maximum of one replacement, and so on.

Errors

An error is thrown under the following conditions:

  1. max_replace is less than zero.
  2. The length of substitute is zero.
pluto
print(string.replace("Hello, world!", "!", ".")) --> Hello, world.
print(string.replace("Hello, world!", "apple", "")) --> Hello, world!
print(string.replace("Hello, world!", "Hello", "Apple")) --> Apple, world!
print(string.replace("Hello, world!", "Hello, ", "")) --> world!

string.truncate

Truncates a given string to a specified length. If an elipsis is desired and the string was actually truncated, the last three characters of the resultant string will be replaced with an elipsis.

Parameters

  1. The string to truncate.
  2. The desired length of the truncated string.
  3. A boolean indicating whether or not to replace the last three character of the string with ... if it is truncated. This is false by default.

Returns

The truncated string.

pluto
print(string.truncate("Hello, world!", 50)) --> Hello, world!
print(string.truncate("Hello, world!", 5)) --> Hello
print(string.truncate("Hello, world!", 5, true)) --> He...

string.contains

Checks if a string contains a substring.

Parameters

  1. The string to check.
  2. The substring to check for.
pluto
local s = "hello world"
print(string.contains(s, "worl")) --> true

string.casefold

Compares two strings, agnostic of any capitalization.

Parameters

  1. The first string to compare.
  2. The second string to compare.
pluto
local s1 = "hello world"
local s2 = "heLLo WoRlD"
print(string.casefold(s1, s2)) --> true

string.formatint

This function makes an integer easier to read by inserting separator every N characters. It can handle strings representing integers, making it suitable for BigInt modules or any integer beyond Lua's representation limits. If you provide a string, it should consist solely of digits. A single unary operator is permitted at the beginning of the string to indicate whether it's a negative or positive number.

Parameters

  1. integer — The integer or string input.
  2. sep — The separator to use. This must be a single-character string.
  3. group — The grouping of each digit pair. This is N.

Errors

If the input is a string and does not meet the aforementioned criteria, an error will be thrown.

Usage Example
pluto
print(string.formatint(500)) --> 500
print(string.formatint(-5000)) --> -5,000
print(string.formatint(50000)) --> 50,000
print(string.formatint(-500000)) --> -500,000
print(string.formatint(500, ".", 2)) --> 5.00
print(string.formatint("-5000", ",", 1)) --> -5,0,0,0
print(string.formatint(50000, ",", 4)) --> 5,0000
Error Example
pluto
string.formatint("-500000.4")
pluto: test.pluto:3: argument 'integer' for string.formatint was a string, but does not represent a valid integer (bad character: '.')
stack traceback:
[C]: in function 'string.formatint'
test.pluto:3: in main chunk
[C]: in ?

string.partition

Splits a string once, on the first occurance of a separator.

Parameters

  1. The string to partition.
  2. The separator to partition the string by.
  3. A boolean specifying whether to search from the right. By default, this is false, which starts at the left.

Returns

Two strings: A substring for all the content before the first occurance of sep, and another substring for all the content afterwards.

A Basic Partition
pluto
local s = "hello world, what's up?"
local before, after = string.partition(s, " ")
assert(before == "hello")
assert(after == "world, what's up?")
Partioning From The Right
pluto
local s = "hello world, what's up?"
local before, after = string.partition(s, " ", true)
assert(before == "hello world, what's")
assert(after == "up?")

string.endswith

Checks if a string ends with a suffix.

Parameters

  1. The string to check.
  2. The substring suffix to check for.
pluto
local s = "hello world"
print(string.endswith(s, "world")) --> true

string.startswith

Checks if a string starts with a prefix.

Parameters

  1. The string to check.
  2. The substring prefix to check for.
pluto
local s = "hello world"
print(string.startswith(s, "hello")) --> true
- +

String

This page documents the changes & additions to the string library in Pluto, which is built on top of Lua 5.4's.


string.upper

This function now takes a second parameter that specifies which index to capitalize.

pluto
local s = "hello"
assert(s:upper(1) == "Hello")

string.lower

This function now takes a second parameter that specifies which index to make lowercase.

pluto
local s = "HELLO"
assert(s:lower(1) == "hELLO")

string.split

Splits a string by a separator.

Parameters

  1. The string to split.
  2. The separator to split a string by. This can be any string.

Returns

A table.

Splitting a string by a single character.
pluto
local s = "hello world, how is everyone doing?"
local r = string.split(s, " ")
--[[
The value of 'r':
{
"hello",
"world,",
"how",
"is",
"everyone",
"doing?"
}
--]]
Splitting a string by a substring.
pluto
local s = "helloHALLOWORLDworld,HALLOWORLDhowHALLOWORLDisHALLOWORLDeveryoneHALLOWORLDdoing?"
local r = string.split(s, "HALLOWORLD")
--[[
The value of 'r':
{
"hello",
"world,",
"how",
"is",
"everyone",
"doing?"
}
--]]

string.rfind

Identical to the base Lua string.find in every way, except it searches right-to-left instead of left-to-right.


string.strip

Strips or trims characters from both ends of a string.

Parameters

  1. The string to strip.
  2. A string of characters to strip. Defaults to \n\r\t\v\0.

Returns

The new string.

pluto
local s = "{|}hello world{|}"
print(string.strip(s, "{}|")) --> hello world

string.lstrip

Strips or trims characters from the left side of a string.

Parameters

  1. The string to strip.
  2. A string of characters to strip. Defaults to \n\r\t\v\0.

Returns

The new string.

pluto
local s = "{|}hello world{|}"
print(string.lstrip(s, "{}|")) --> hello world{|}

string.rstrip

Strips or trims characters from the right side of a string.

Parameters

  1. The string to strip.
  2. A string of characters to strip. Defaults to \n\r\t\v\0.

Returns

The new string.

pluto
local s = "{|}hello world{|}"
print(string.rstrip(s, "{}|")) --> {|}hello world

string.isascii

Checks if a string is entirely composed of ASCII characters.

Parameters

  1. The string to check.
pluto
local s = "HELLOWORLD123"
print(string.isascii(s)) --> true
info

This would exclude any multi-byte characters, like emojis.


string.islower

Checks if a string is entirely composed of lowercase characters.

Parameters

  1. The string to check.
pluto
local s = "helloworld"
print(string.islower(s)) --> true
info

Whitespace characters are not lowercase characters.


string.isalpha

Checks if a string is entirely composed of alphabetic characters.

Parameters

  1. The string to check.
pluto
local s = "HELLOWORLD"
print(string.isalpha(s)) --> true
info

Whitespace characters are not alphabetic characters.


string.isupper

Checks if a string is entirely composed of uppercase characters.

Parameters

  1. The string to check.
pluto
local s = "HELLOWORLD"
print(string.isupper(s)) --> true
info

Whitespace characters are not uppercase characters.


string.isalnum

Checks if a string is entirely composed of alphanumeric characters.

Parameters

  1. The string to check.
pluto
local s = "HELLOWORLD123"
print(string.isalnum(s)) --> true
info

Whitespace characters are not alphanumeric characters.


string.iswhitespace

Checks if this string is entirely composed of whitespace characters.

Paramaters

  1. The string to check.
pluto
local s = " \t \v \f \t\t\t\t"
print(string.iswhitespace(s)) --> true

string.uformat

Same as string.format, but performs the operation under the en_US.UTF-8 locale. Ensures the same result on all systems.


string.replace

Replace substrings with another substring. Similar to string.gsub, but it operates on plain-text and is not burdened by a pattern capture limit.

Parameters

  1. original — The substring to replace.
  2. substitute — The replacement substring.
  3. max_replace — The maximum number of replacements you wish to occur. The default value is effectively 0, which means "infinite". If you pass 1, this leads to a maximum of one replacement, and so on.

Errors

An error is thrown under the following conditions:

  1. max_replace is less than zero.
  2. The length of substitute is zero.
pluto
print(string.replace("Hello, world!", "!", ".")) --> Hello, world.
print(string.replace("Hello, world!", "apple", "")) --> Hello, world!
print(string.replace("Hello, world!", "Hello", "Apple")) --> Apple, world!
print(string.replace("Hello, world!", "Hello, ", "")) --> world!

string.truncate

Truncates a given string to a specified length. If an elipsis is desired and the string was actually truncated, the last three characters of the resultant string will be replaced with an elipsis.

Parameters

  1. The string to truncate.
  2. The desired length of the truncated string.
  3. A boolean indicating whether or not to replace the last three character of the string with ... if it is truncated. This is false by default.

Returns

The truncated string.

pluto
print(string.truncate("Hello, world!", 50)) --> Hello, world!
print(string.truncate("Hello, world!", 5)) --> Hello
print(string.truncate("Hello, world!", 5, true)) --> He...

string.contains

Checks if a string contains a substring.

Parameters

  1. The string to check.
  2. The substring to check for.
pluto
local s = "hello world"
print(string.contains(s, "worl")) --> true

string.casefold

Compares two strings, agnostic of any capitalization.

Parameters

  1. The first string to compare.
  2. The second string to compare.
pluto
local s1 = "hello world"
local s2 = "heLLo WoRlD"
print(string.casefold(s1, s2)) --> true

string.formatint

This function makes an integer easier to read by inserting separator every N characters. It can handle strings representing integers, making it suitable for BigInt modules or any integer beyond Lua's representation limits. If you provide a string, it should consist solely of digits. A single unary operator is permitted at the beginning of the string to indicate whether it's a negative or positive number.

Parameters

  1. integer — The integer or string input.
  2. sep — The separator to use. This must be a single-character string.
  3. group — The grouping of each digit pair. This is N.

Errors

If the input is a string and does not meet the aforementioned criteria, an error will be thrown.

Usage Example
pluto
print(string.formatint(500)) --> 500
print(string.formatint(-5000)) --> -5,000
print(string.formatint(50000)) --> 50,000
print(string.formatint(-500000)) --> -500,000
print(string.formatint(500, ".", 2)) --> 5.00
print(string.formatint("-5000", ",", 1)) --> -5,0,0,0
print(string.formatint(50000, ",", 4)) --> 5,0000
Error Example
pluto
string.formatint("-500000.4")
pluto: test.pluto:3: argument 'integer' for string.formatint was a string, but does not represent a valid integer (bad character: '.')
stack traceback:
[C]: in function 'string.formatint'
test.pluto:3: in main chunk
[C]: in ?

string.partition

Splits a string once, on the first occurance of a separator.

Parameters

  1. The string to partition.
  2. The separator to partition the string by.
  3. A boolean specifying whether to search from the right. By default, this is false, which starts at the left.

Returns

Two strings: A substring for all the content before the first occurance of sep, and another substring for all the content afterwards.

A Basic Partition
pluto
local s = "hello world, what's up?"
local before, after = string.partition(s, " ")
assert(before == "hello")
assert(after == "world, what's up?")
Partioning From The Right
pluto
local s = "hello world, what's up?"
local before, after = string.partition(s, " ", true)
assert(before == "hello world, what's")
assert(after == "up?")

string.endswith

Checks if a string ends with a suffix.

Parameters

  1. The string to check.
  2. The substring suffix to check for.
pluto
local s = "hello world"
print(string.endswith(s, "world")) --> true

string.startswith

Checks if a string starts with a prefix.

Parameters

  1. The string to check.
  2. The substring prefix to check for.
pluto
local s = "hello world"
print(string.startswith(s, "hello")) --> true
+ \ No newline at end of file diff --git a/docs/Runtime Environment/Table.html b/docs/Runtime Environment/Table.html index 7eb3fec3..1100d318 100644 --- a/docs/Runtime Environment/Table.html +++ b/docs/Runtime Environment/Table.html @@ -4,13 +4,13 @@ Table | Pluto - +
-

Table

This page documents the changes & additions to the table library in Pluto, which is built on top of Lua 5.4's.


table.sort

This function was modified to return the input table instead of nil, such that:

pluto
local t = { 3, 2, 1 }
t = t:sort(...)

Will not result in t becoming nil.

table.sorted

Copying variant of table.sort; returns a new table instead of modifying the input table. Note that nested tables will not be copied.


table.size

Returns the number of elements in the table, counting both the array part and hash part.

Parameters

  1. The table to check.
pluto
local t = { 1, 2, 3, ["foo"] = "bar" }
print(t:size()) --> 4

table.clear

Remove all elements from the table.

Parameters

  1. The table to clear.
pluto
local t = { 1, 2, 3, ["foo"] = "bar" }
print(t:size()) --> 4
t:clear()
print(t:size()) --> 0

table.freeze

Freezes a table to prevent modification.

Parameters

  1. The table to freeze

Returns

The input table.

pluto
local t = table.freeze({...})
-- `table.freeze(t)` on another line will work fine too.
t.key = "value" -- Fails.

table.isfrozen

Checks if this table is frozen.

Parameters

  1. The table to check.
pluto
local t = {}
table.freeze(t)
assert(table.isfrozen(t) == true)

table.contains

Checks if this table contains an element.

Parameters

  1. The table to check.
  2. The element to check for.

Returns

The index or key if found, otherwise nil.

pluto
local t = { 1, 2, 3, 4, 5, 6, key = "value" }
assert(table.contains(t, 4) == 4)
assert(table.contains(t, "value") == "key")
assert(table.contains(t, "nothing") == nil)

table.find

Looks for an element in a table.

Parameters

  1. The table to check.
  2. The callback function responsible for checking each element.

Returns

The element if found, otherwise nil.

pluto
local items = {
{ id = 1, name = "Apple" },
{ id = 2, name = "Banana" },
}
print(items:find(|item| -> item.id == 1).name) --> Apple

table.reverse

Reverses the array elements of a table.

Parameters

  1. The table to reverse.

Returns

The input table.

pluto
local t = { 1, 2, hello = "world", 3, 4, 5, key = "value" }
print(dumpvar(t))
local same = t:reverse()
assert(same == t)
print(dumpvar(t))
--[[
Before:
{
[1] = 1,
[2] = 2,
[3] = 3,
[4] = 4,
[5] = 5,
["key"] = string(5) "value",
["hello"] = string(5) "world",
}
After:
{
[1] = 5,
[2] = 4,
[3] = 3,
[4] = 2,
[5] = 1,
["key"] = string(5) "value",
["hello"] = string(5) "world",
}
--]]

table.reversed

Copying variant of table.reverse; returns a new table instead of modifying the input table. Note that nested tables will not be copied.


table.reorder

Reorders the array portion of a table so it becomes a continuous array with no holes.

Parameters

  1. The table.

Returns

The input table.

pluto
local assert = require("assert")
local t1 = { 1, nil, 2, nil, nil, 3, nil, 4 }
assert.equal(t1:reorder(), { 1, 2, 3, 4 })

table.reordered

Copying variant of table.reorder; returns a new table instead of modifying the input table. Note that nested tables will not be copied.


table.foreach

Note that this function is not the same as the Lua function that was deprecated/removed in 5.1.

Parameters

  1. The table.
  2. The callback to be called for every element.
  3. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|).
pluto
local t = { 1, 2, 3 }
t:foreach(print)
--> 1
--> 2
--> 3

table.filter

Filters away keys (both array and non-array) that fail to meet the condition established by callback. Elimination is done by setting the value to nil, consider using table.reorder if you want a continuous array after filtering.

Parameters

  1. The table.
  2. The callback responsible for deciding which keys to keep or remove. This should return false or nil if you want the key to be eliminated.
  3. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|).

Returns

The input table.

pluto
data = { 1, 2, 3, 4, 5 }
data:filter(|v| -> v % 2 ~= 0):reorder():concat(" ") |> print -- "1 3 5"
data = { 2, 2, 3, 4, 4 }
data:filter(|k, v| -> k == v, true):reorder():concat(" ") |> print -- "2 3 4"

table.filtered

Copying variant of table.filter; returns a new table instead of modifying the input table. Note that nested tables will not be copied.


table.map

Remaps every key to a new value, provided by the callback function.

Parameters

  1. The table.
  2. The callback responsible for producing the updated values.
  3. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|).

Returns

The input table.

pluto
data = "41 20 68"
data:split(" "):map(tonumber):map(|v| -> v + 1):concat(" ") |> print -- "42 21 69"
data = "10 15 10"
data:split(" "):map(tonumber):map(|k, v| -> k * v, true):concat(" ") |> print -- "10 30 30"

In this example, we first use the tonumber function to turn the strings into numbers, then add 1 to them. (Although the first step is not needed in Lua/Pluto since the + operator would take care of it, it is used here for demonstration purposes.)

table.mapped

Copying variant of table.map; returns a new table instead of modifying the input table. Note that nested tables will not be copied.


table.reduce

For every value stored in the table, computes accumulator = f(value, accumulator), returning the accumulator at the end.

Parameters

  1. The table.
  2. The callback responsible for producing the updated accumulator.
  3. The initial value of accumulator. If absent, the accumulator is initialized with 0.

Returns

The accumulator.

pluto
local t = { 1, 2, 3 }
t:reduce(|value, accumulator| -> value + accumulator) |> print --> 6

table.min

Returns the smallest value stored in the table.

Parameters

  1. The table.
pluto
local t = { 1, 2, 3 }
print(t:min()) --> 1

This is identical to :reduce(math.min, math.maxinteger).

table.max

Returns the largest value stored in the table.

Parameters

  1. The table.
pluto
local t = { 1, 2, 3 }
print(t:max()) --> 3

This is identical to :reduce(math.max, math.mininteger).


table.checkall

Runs the given function against all elements, returning true if all of them match.

Parameters

  1. The table.
  2. The callback responsible for checking each element.
pluto
print({ 2, 4, 6 }:checkall(|x| -> x % 2 == 0) ? "All are even" : "Some are odd") --> All are even
print({ 1, 2, 3 }:checkall(|x| -> x % 2 == 0) ? "All are even" : "Some are odd") --> Some are odd
- +

Table

This page documents the changes & additions to the table library in Pluto, which is built on top of Lua 5.4's.


table.sort

This function was modified to return the input table instead of nil, such that:

pluto
local t = { 3, 2, 1 }
t = t:sort(...)

Will not result in t becoming nil.

table.sorted

Copying variant of table.sort; returns a new table instead of modifying the input table. Note that nested tables will not be copied.


table.size

Returns the number of elements in the table, counting both the array part and hash part.

Parameters

  1. The table to check.
pluto
local t = { 1, 2, 3, ["foo"] = "bar" }
print(t:size()) --> 4

table.clear

Remove all elements from the table.

Parameters

  1. The table to clear.
pluto
local t = { 1, 2, 3, ["foo"] = "bar" }
print(t:size()) --> 4
t:clear()
print(t:size()) --> 0

table.freeze

Freezes a table to prevent modification.

Parameters

  1. The table to freeze

Returns

The input table.

pluto
local t = table.freeze({...})
-- `table.freeze(t)` on another line will work fine too.
t.key = "value" -- Fails.

table.isfrozen

Checks if this table is frozen.

Parameters

  1. The table to check.
pluto
local t = {}
table.freeze(t)
assert(table.isfrozen(t) == true)

table.contains

Checks if this table contains an element.

Parameters

  1. The table to check.
  2. The element to check for.

Returns

The index or key if found, otherwise nil.

pluto
local t = { 1, 2, 3, 4, 5, 6, key = "value" }
assert(table.contains(t, 4) == 4)
assert(table.contains(t, "value") == "key")
assert(table.contains(t, "nothing") == nil)

table.find

Looks for an element in a table.

Parameters

  1. The table to check.
  2. The callback function responsible for checking each element.

Returns

The element if found, otherwise nil.

pluto
local items = {
{ id = 1, name = "Apple" },
{ id = 2, name = "Banana" },
}
print(items:find(|item| -> item.id == 1).name) --> Apple

table.reverse

Reverses the array elements of a table.

Parameters

  1. The table to reverse.

Returns

The input table.

pluto
local t = { 1, 2, hello = "world", 3, 4, 5, key = "value" }
print(dumpvar(t))
local same = t:reverse()
assert(same == t)
print(dumpvar(t))
--[[
Before:
{
[1] = 1,
[2] = 2,
[3] = 3,
[4] = 4,
[5] = 5,
["key"] = string(5) "value",
["hello"] = string(5) "world",
}
After:
{
[1] = 5,
[2] = 4,
[3] = 3,
[4] = 2,
[5] = 1,
["key"] = string(5) "value",
["hello"] = string(5) "world",
}
--]]

table.reversed

Copying variant of table.reverse; returns a new table instead of modifying the input table. Note that nested tables will not be copied.


table.reorder

Reorders the array portion of a table so it becomes a continuous array with no holes.

Parameters

  1. The table.

Returns

The input table.

pluto
local assert = require("assert")
local t1 = { 1, nil, 2, nil, nil, 3, nil, 4 }
assert.equal(t1:reorder(), { 1, 2, 3, 4 })

table.reordered

Copying variant of table.reorder; returns a new table instead of modifying the input table. Note that nested tables will not be copied.


table.foreach

Note that this function is not the same as the Lua function that was deprecated/removed in 5.1.

Parameters

  1. The table.
  2. The callback to be called for every element.
  3. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|).
pluto
local t = { 1, 2, 3 }
t:foreach(print)
--> 1
--> 2
--> 3

table.filter

Filters away keys (both array and non-array) that fail to meet the condition established by callback. Elimination is done by setting the value to nil, consider using table.reorder if you want a continuous array after filtering.

Parameters

  1. The table.
  2. The callback responsible for deciding which keys to keep or remove. This should return false or nil if you want the key to be eliminated.
  3. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|).

Returns

The input table.

pluto
data = { 1, 2, 3, 4, 5 }
data:filter(|v| -> v % 2 ~= 0):reorder():concat(" ") |> print -- "1 3 5"
data = { 2, 2, 3, 4, 4 }
data:filter(|k, v| -> k == v, true):reorder():concat(" ") |> print -- "2 3 4"

table.filtered

Copying variant of table.filter; returns a new table instead of modifying the input table. Note that nested tables will not be copied.


table.map

Remaps every key to a new value, provided by the callback function.

Parameters

  1. The table.
  2. The callback responsible for producing the updated values.
  3. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|).

Returns

The input table.

pluto
data = "41 20 68"
data:split(" "):map(tonumber):map(|v| -> v + 1):concat(" ") |> print -- "42 21 69"
data = "10 15 10"
data:split(" "):map(tonumber):map(|k, v| -> k * v, true):concat(" ") |> print -- "10 30 30"

In this example, we first use the tonumber function to turn the strings into numbers, then add 1 to them. (Although the first step is not needed in Lua/Pluto since the + operator would take care of it, it is used here for demonstration purposes.)

table.mapped

Copying variant of table.map; returns a new table instead of modifying the input table. Note that nested tables will not be copied.


table.reduce

For every value stored in the table, computes accumulator = f(value, accumulator), returning the accumulator at the end.

Parameters

  1. The table.
  2. The callback responsible for producing the updated accumulator.
  3. The initial value of accumulator. If absent, the accumulator is initialized with 0.

Returns

The accumulator.

pluto
local t = { 1, 2, 3 }
t:reduce(|value, accumulator| -> value + accumulator) |> print --> 6

table.min

Returns the smallest value stored in the table.

Parameters

  1. The table.
pluto
local t = { 1, 2, 3 }
print(t:min()) --> 1

This is identical to :reduce(math.min, math.maxinteger).

table.max

Returns the largest value stored in the table.

Parameters

  1. The table.
pluto
local t = { 1, 2, 3 }
print(t:max()) --> 3

This is identical to :reduce(math.max, math.mininteger).


table.checkall

Runs the given function against all elements, returning true if all of them match.

Parameters

  1. The table.
  2. The callback responsible for checking each element.
pluto
print({ 2, 4, 6 }:checkall(|x| -> x % 2 == 0) ? "All are even" : "Some are odd") --> All are even
print({ 1, 2, 3 }:checkall(|x| -> x % 2 == 0) ? "All are even" : "Some are odd") --> Some are odd
+ \ No newline at end of file diff --git a/docs/Runtime Environment/URL.html b/docs/Runtime Environment/URL.html index e838341e..cfb7b7e4 100644 --- a/docs/Runtime Environment/URL.html +++ b/docs/Runtime Environment/URL.html @@ -4,13 +4,13 @@ URL | Pluto - +
-

URL

Must be included via require.


url.encode

Returns a URL-encoded string.

Parameters

  1. The string to be encoded.
pluto
local url = require"pluto:url"
print("https://google.com/search?q="..url.encode("Pluto, a superset of Lua"))
--> https://google.com/search?q=Pluto%2C%20a%20superset%20of%20Lua

url.decode

Returns a plain string from URL-decoding the input string.

Parameters

  1. The string to be decoded.
pluto
local url = require"pluto:url"
print(url.decode("Pluto%2C%20a%20superset%20of%20Lua")) -- "Pluto, a superset of Lua"

url.parse

Splits a URL into its constituent parts.

Parameters

  1. The URL to be dissected.
pluto
local url = require"pluto:url"
print(dumpvar(url.parse("http://username:password@hostname:9090/path?arg=value#anchor")))
--> {
--> ["scheme"] = string(4) "http",
--> ["user"] = string(8) "username",
--> ["pass"] = string(8) "password",
--> ["host"] = string(8) "hostname",
--> ["port"] = 9090,
--> ["path"] = string(5) "/path",
--> ["query"] = string(9) "arg=value",
--> ["fragment"] = string(6) "anchor",
--> }
- +

URL

Must be included via require.


url.encode

Returns a URL-encoded string.

Parameters

  1. The string to be encoded.
pluto
local url = require"pluto:url"
print("https://google.com/search?q="..url.encode("Pluto, a superset of Lua"))
--> https://google.com/search?q=Pluto%2C%20a%20superset%20of%20Lua

url.decode

Returns a plain string from URL-decoding the input string.

Parameters

  1. The string to be decoded.
pluto
local url = require"pluto:url"
print(url.decode("Pluto%2C%20a%20superset%20of%20Lua")) -- "Pluto, a superset of Lua"

url.parse

Splits a URL into its constituent parts.

Parameters

  1. The URL to be dissected.
pluto
local url = require"pluto:url"
print(dumpvar(url.parse("http://username:password@hostname:9090/path?arg=value#anchor")))
--> {
--> ["scheme"] = string(4) "http",
--> ["user"] = string(8) "username",
--> ["pass"] = string(8) "password",
--> ["host"] = string(8) "hostname",
--> ["port"] = 9090,
--> ["path"] = string(5) "/path",
--> ["query"] = string(9) "arg=value",
--> ["fragment"] = string(6) "anchor",
--> }
+ \ No newline at end of file diff --git a/docs/Runtime Environment/Vector3.html b/docs/Runtime Environment/Vector3.html index 0dc9dee3..0e7d90d3 100644 --- a/docs/Runtime Environment/Vector3.html +++ b/docs/Runtime Environment/Vector3.html @@ -4,13 +4,13 @@ Vector3 | Pluto - +
-

Vector3

Must be included via require.


__construct

The constructor takes up to 3 arguments:

pluto
local vector3 = require "pluto:vector3"
print(new vector3()) --> vector3(0, 0, 0)
print(new vector3(1)) --> vector3(1, 1, 1)
print(new vector3(1, 2)) --> vector3(1, 2, 0)
print(new vector3(1, 2, 3)) --> vector3(1, 2, 3)

There is also a shorthand for this:

pluto
local vector3 = require "pluto:vector3"
print(vector3(1, 2, 3)) --> vector3(1, 2, 3)

__tostring

As seen above, the __tostring metamethod provides a string representation of the class.

__add, __sub, __mul, __div

Vector3 instances support arithmetic operations. The right-hand side can either be a Vector3 instance or a number. They create a new instance for the result.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(1) + new vector3(2)) --> vector3(3, 3, 3)
print(new vector3(0, 0.6, 0.4) * 3) --> vector3(0, 1.8, 1.2)

__eq

Vector3 instances can effortlessly be compared to each other.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(2, 2, 2) == new vector3(2)) --> true
print(new vector3(1, 2, 3) == new vector3(2)) --> false

__len, magnitude

To get the magnitude of a vector, you can either use the unary length operator (#) or call the magnitude method:

pluto
local vec = new (require"pluto:vector3") (1, 2, 3)
print(#vec) --> 3.7416573867739
print(vec:magnitude()) --> 3.7416573867739

sum

Computes the sum of the x, y and z fields.

pluto
local vec = new (require"pluto:vector3") (1, 2, 3)
print(vec:sum()) --> 6

min

Returns the value of axis with the lowest value.

pluto
local vec = new (require"pluto:vector3") (1, 2, 3)
print(vec:min()) --> 1

max

Returns the value of axis with the highest value.

pluto
local vec = new (require"pluto:vector3") (1, 2, 3)
print(vec:max()) --> 3

dot

Computes the dot product with the Vector3 given as an argument.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(1):dot(new vector3(2))) --> 6

abs

Returns a new Vector3 instance with each axis being an absolute value.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(-1, -2, 3):abs()) --> vector3(1, 2, 3)

normalized, normalised

Returns a new Vector3 instance that is a unit vector equivalent.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(0, 3, 0):normalized()) --> vector3(0.0, 1.0, 0.0)

torot

Returns a rotation vector based on the direction given by the current vector.

You can specify the up-axis and handedness of the coordinate system. By default, a left-handed Y-up system is used.

The up-axis also determines which axis contains which value:

  • Y-Up: Pitch, Yaw, Roll
  • Z-Up: Pitch, Roll, Yaw
pluto
local vector3 = require "pluto:vector3"
print(new vector3(0, 1, 0):torot("y")) -- Y up. Pointing up -> vector3(90.0, 0.0, 0)
print(new vector3(0, 0, -1):torot("z")) -- Z up. Pointing down -> vector3(-90.0, 0, -0.0)
print(new vector3(1, 0, 0):torot("yr")) -- Y up, right-handed. Pointing right -> vector3(0.0, -90.0, 0)
print(new vector3(1, 0, 0):torot("yl")) -- Y up, left-handed. Pointing right -> vector3(0.0, 90.0, 0)
print(new vector3(1, 0, 0):torot("zr")) -- Z up, right-handed. Pointing right -> vector3(0.0, 0, 90.0)
print(new vector3(0, 0, 1):torot("y")) -- Y up. Pointing forward -> vector3(0.0, 0.0, 0)
print(new vector3(0, 0, -1):torot("y")) -- Y up. Pointing backward -> vector3(0.0, 180.0, 0)

lookat

Returns a rotation vector based on the position given by the current vector and argument.

pluto
local v3 = require "pluto:vector3"
print(new v3(0):lookat(new v3(0, 1, 0), "y")) -- Y up. From origin to a point above -> vector3(90.0, 0.0, 0)

todir

Returns a direction vector based on the rotation given by the current vector.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(90, 0, 0):todir("y")) -- Y up. Pointing up -> vector3(0.0, 1.0, 6.1232339957368e-17)
print(new vector3(0, 90, 0):todir("yl")) -- Y up, left-handed. Pointing right -> vector3(1.0, 0.0, 6.1232339957368e-17)
print(new vector3(0, 90, 0):todir("yr")) -- Y up, right-handed. Pointing right -> vector3(-1.0, 0.0, 6.1232339957368e-17)
- +

Vector3

Must be included via require.


__construct

The constructor takes up to 3 arguments:

pluto
local vector3 = require "pluto:vector3"
print(new vector3()) --> vector3(0, 0, 0)
print(new vector3(1)) --> vector3(1, 1, 1)
print(new vector3(1, 2)) --> vector3(1, 2, 0)
print(new vector3(1, 2, 3)) --> vector3(1, 2, 3)

There is also a shorthand for this:

pluto
local vector3 = require "pluto:vector3"
print(vector3(1, 2, 3)) --> vector3(1, 2, 3)

__tostring

As seen above, the __tostring metamethod provides a string representation of the class.

__add, __sub, __mul, __div

Vector3 instances support arithmetic operations. The right-hand side can either be a Vector3 instance or a number. They create a new instance for the result.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(1) + new vector3(2)) --> vector3(3, 3, 3)
print(new vector3(0, 0.6, 0.4) * 3) --> vector3(0, 1.8, 1.2)

__eq

Vector3 instances can effortlessly be compared to each other.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(2, 2, 2) == new vector3(2)) --> true
print(new vector3(1, 2, 3) == new vector3(2)) --> false

__len, magnitude

To get the magnitude of a vector, you can either use the unary length operator (#) or call the magnitude method:

pluto
local vec = new (require"pluto:vector3") (1, 2, 3)
print(#vec) --> 3.7416573867739
print(vec:magnitude()) --> 3.7416573867739

sum

Computes the sum of the x, y and z fields.

pluto
local vec = new (require"pluto:vector3") (1, 2, 3)
print(vec:sum()) --> 6

min

Returns the value of axis with the lowest value.

pluto
local vec = new (require"pluto:vector3") (1, 2, 3)
print(vec:min()) --> 1

max

Returns the value of axis with the highest value.

pluto
local vec = new (require"pluto:vector3") (1, 2, 3)
print(vec:max()) --> 3

dot

Computes the dot product with the Vector3 given as an argument.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(1):dot(new vector3(2))) --> 6

abs

Returns a new Vector3 instance with each axis being an absolute value.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(-1, -2, 3):abs()) --> vector3(1, 2, 3)

normalized, normalised

Returns a new Vector3 instance that is a unit vector equivalent.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(0, 3, 0):normalized()) --> vector3(0.0, 1.0, 0.0)

torot

Returns a rotation vector based on the direction given by the current vector.

You can specify the up-axis and handedness of the coordinate system. By default, a left-handed Y-up system is used.

The up-axis also determines which axis contains which value:

  • Y-Up: Pitch, Yaw, Roll
  • Z-Up: Pitch, Roll, Yaw
pluto
local vector3 = require "pluto:vector3"
print(new vector3(0, 1, 0):torot("y")) -- Y up. Pointing up -> vector3(90.0, 0.0, 0)
print(new vector3(0, 0, -1):torot("z")) -- Z up. Pointing down -> vector3(-90.0, 0, -0.0)
print(new vector3(1, 0, 0):torot("yr")) -- Y up, right-handed. Pointing right -> vector3(0.0, -90.0, 0)
print(new vector3(1, 0, 0):torot("yl")) -- Y up, left-handed. Pointing right -> vector3(0.0, 90.0, 0)
print(new vector3(1, 0, 0):torot("zr")) -- Z up, right-handed. Pointing right -> vector3(0.0, 0, 90.0)
print(new vector3(0, 0, 1):torot("y")) -- Y up. Pointing forward -> vector3(0.0, 0.0, 0)
print(new vector3(0, 0, -1):torot("y")) -- Y up. Pointing backward -> vector3(0.0, 180.0, 0)

lookat

Returns a rotation vector based on the position given by the current vector and argument.

pluto
local v3 = require "pluto:vector3"
print(new v3(0):lookat(new v3(0, 1, 0), "y")) -- Y up. From origin to a point above -> vector3(90.0, 0.0, 0)

todir

Returns a direction vector based on the rotation given by the current vector.

pluto
local vector3 = require "pluto:vector3"
print(new vector3(90, 0, 0):todir("y")) -- Y up. Pointing up -> vector3(0.0, 1.0, 6.1232339957368e-17)
print(new vector3(0, 90, 0):todir("yl")) -- Y up, left-handed. Pointing right -> vector3(1.0, 0.0, 6.1232339957368e-17)
print(new vector3(0, 90, 0):todir("yr")) -- Y up, right-handed. Pointing right -> vector3(-1.0, 0.0, 6.1232339957368e-17)
+ \ No newline at end of file diff --git a/docs/Runtime Environment/XML.html b/docs/Runtime Environment/XML.html index 587111b5..beff460a 100644 --- a/docs/Runtime Environment/XML.html +++ b/docs/Runtime Environment/XML.html @@ -4,13 +4,13 @@ XML | Pluto - +
-

XML

Must be included via require.


xml.encode

Returns a string of XML.

Parameters

  1. data — A table or string to encode as XML.
  2. pretty — Whether to return a human-readable string of XML. Defaults to false.
pluto
local xml = require "pluto:xml"
print(xml.encode({
tag = "root",
children = {
{
tag = "entry",
attributes = {
["type"] = "primary"
},
children = {
"Text node"
}
},
{
tag = "entry"
}
}
}, true))
--> <root>
--> <entry type="primary">
--> Text node
--> </entry>
--> <entry></entry>
--> </root>

xml.decode

Returns a table representing the XML data.

Parameters

  1. data — The XML data to decode.
  2. parser — Which parser to use against the data. Can be "html", "xml" (default), or "lax" (XML but accepts attributes without =).
pluto
local xml = require "pluto:xml"
local root = xml.decode([[
<entries>
<entry type="primary">
<name>primary</name>
</entry>
</entries>
]])
print(dumpvar(root))
--> {
--> ["tag"] = string(7) "entries",
--> ["children"] = {
--> [1] = {
--> ["tag"] = string(5) "entry",
--> ["attributes"] = {
--> ["type"] = string(7) "primary",
--> },
--> ["children"] = {
--> [1] = {
--> ["tag"] = string(4) "name",
--> ["children"] = {
--> [1] = string(7) "primary",
--> },
--> },
--> },
--> },
--> },
--> }

For ease of use, the returned tables have an __index metamethod:

pluto
-- root is <entries>, so its first child is <entry>.
-- we make use of the metamethod to get to <name>:
print(dumpvar(root.children[1].name))
--> {
--> ["tag"] = string(4) "name",
--> ["children"] = {
--> [1] = string(7) "primary",
--> },
--> }

If there is no single root element, a "body" element is implied as the root:

pluto
local xml = require "pluto:xml"
print(dumpvar(xml.decode([[
<entry/>
<entry/>
]])))
--> {
--> ["tag"] = string(4) "body",
--> ["children"] = {
--> [1] = {
--> ["tag"] = string(5) "entry",
--> },
--> [2] = {
--> ["tag"] = string(5) "entry",
--> },
--> },
--> }
- +

XML

Must be included via require.


xml.encode

Returns a string of XML.

Parameters

  1. data — A table or string to encode as XML.
  2. pretty — Whether to return a human-readable string of XML. Defaults to false.
pluto
local xml = require "pluto:xml"
print(xml.encode({
tag = "root",
children = {
{
tag = "entry",
attributes = {
["type"] = "primary"
},
children = {
"Text node"
}
},
{
tag = "entry"
}
}
}, true))
--> <root>
--> <entry type="primary">
--> Text node
--> </entry>
--> <entry></entry>
--> </root>

xml.decode

Returns a table representing the XML data.

Parameters

  1. data — The XML data to decode.
  2. parser — Which parser to use against the data. Can be "html", "xml" (default), or "lax" (XML but accepts attributes without =).
pluto
local xml = require "pluto:xml"
local root = xml.decode([[
<entries>
<entry type="primary">
<name>primary</name>
</entry>
</entries>
]])
print(dumpvar(root))
--> {
--> ["tag"] = string(7) "entries",
--> ["children"] = {
--> [1] = {
--> ["tag"] = string(5) "entry",
--> ["attributes"] = {
--> ["type"] = string(7) "primary",
--> },
--> ["children"] = {
--> [1] = {
--> ["tag"] = string(4) "name",
--> ["children"] = {
--> [1] = string(7) "primary",
--> },
--> },
--> },
--> },
--> },
--> }

For ease of use, the returned tables have an __index metamethod:

pluto
-- root is <entries>, so its first child is <entry>.
-- we make use of the metamethod to get to <name>:
print(dumpvar(root.children[1].name))
--> {
--> ["tag"] = string(4) "name",
--> ["children"] = {
--> [1] = string(7) "primary",
--> },
--> }

If there is no single root element, a "body" element is implied as the root:

pluto
local xml = require "pluto:xml"
print(dumpvar(xml.decode([[
<entry/>
<entry/>
]])))
--> {
--> ["tag"] = string(4) "body",
--> ["children"] = {
--> [1] = {
--> ["tag"] = string(5) "entry",
--> },
--> [2] = {
--> ["tag"] = string(5) "entry",
--> },
--> },
--> }
+ \ No newline at end of file diff --git a/docs/category/new-features.html b/docs/category/new-features.html index 61a4f2e8..18ddef70 100644 --- a/docs/category/new-features.html +++ b/docs/category/new-features.html @@ -4,13 +4,13 @@ New Features | Pluto - +

New Features

New features implemented by Pluto.

- + \ No newline at end of file diff --git a/docs/category/optimizations.html b/docs/category/optimizations.html index e6131b85..33ce0068 100644 --- a/docs/category/optimizations.html +++ b/docs/category/optimizations.html @@ -4,13 +4,13 @@ Optimizations | Pluto - + - + \ No newline at end of file diff --git a/docs/category/qol-improvements.html b/docs/category/qol-improvements.html index e6551b79..1b3bc1d7 100644 --- a/docs/category/qol-improvements.html +++ b/docs/category/qol-improvements.html @@ -4,13 +4,13 @@ QoL Improvements | Pluto - + - + \ No newline at end of file diff --git a/docs/category/runtime-environment.html b/docs/category/runtime-environment.html index 6239d419..b7516705 100644 --- a/docs/category/runtime-environment.html +++ b/docs/category/runtime-environment.html @@ -4,13 +4,13 @@ Runtime Environment | Pluto - +

Runtime Environment

Pluto's changes to the runtime environment.

- + \ No newline at end of file diff --git a/index.html b/index.html index 2d13ad5b..751d12d8 100644 --- a/index.html +++ b/index.html @@ -4,13 +4,13 @@ Pluto | Pluto - +

Pluto

A superset of Lua 5.4 with a focus on general-purpose programming.

New Syntax

Pluto implements various popular syntaxes that are absent in Lua, such as switch statements, compound operators, ternary expressions, etc.

Compatibility

Pluto is remarkably compatible with Lua's source & bytecode. The only conflict is how our new keywords may conflict with identifiers, however we offer "Compatibility Mode" to resolve this issue.

Larger Standard Library

Dozens of new string functions, table functions, portable filesystem functions, assertion libraries for unit testing, hashing algorithms, JSON, Base64, URL encoding, Vector3, and more.

- + \ No newline at end of file diff --git a/search-index.json b/search-index.json index c58c087f..4a3cefa3 100644 --- a/search-index.json +++ b/search-index.json @@ -1 +1 @@ -[{"documents":[{"i":1,"t":"For Integrators","u":"/docs/For Integrators","b":["Documentation"]},{"i":20,"t":"Changelog","u":"/docs/Changelog","b":["Documentation"]},{"i":94,"t":"What is Pluto?","u":"/docs/Introduction","b":["Documentation"]},{"i":98,"t":"Getting Started","u":"/docs/Getting Started","b":["Documentation"]},{"i":123,"t":"Compile-Time Evaluation","u":"/docs/New Features/Compile-Time Evaluation","b":["Documentation","New Features"]},{"i":131,"t":"Break Statement","u":"/docs/New Features/Break Statement","b":["Documentation","New Features"]},{"i":133,"t":"Compiler Warnings","u":"/docs/New Features/Compiler Warnings","b":["Documentation","New Features"]},{"i":170,"t":"Continue Statement","u":"/docs/New Features/Continue Statement","b":["Documentation","New Features"]},{"i":176,"t":"Default Arguments","u":"/docs/New Features/Default Arguments","b":["Documentation","New Features"]},{"i":178,"t":"Enumerations","u":"/docs/New Features/Enumerations","b":["Documentation","New Features"]},{"i":188,"t":"Explicit Globals","u":"/docs/New Features/Explicit Globals","b":["Documentation","New Features"]},{"i":192,"t":"For-As Loop","u":"/docs/New Features/For-As Loop","b":["Documentation","New Features"]},{"i":194,"t":"Export Modifier","u":"/docs/New Features/Export Modifier","b":["Documentation","New Features"]},{"i":198,"t":"In Expressions","u":"/docs/New Features/In Expressions","b":["Documentation","New Features"]},{"i":202,"t":"Destructuring","u":"/docs/New Features/Destructuring","b":["Documentation","New Features"]},{"i":212,"t":"Lambda Expressions","u":"/docs/New Features/Lambda Expressions","b":["Documentation","New Features"]},{"i":214,"t":"Nodiscard Functions","u":"/docs/New Features/Nodiscard Functions","b":["Documentation","New Features"]},{"i":216,"t":"Named Arguments","u":"/docs/New Features/Named Arguments","b":["Documentation","New Features"]},{"i":222,"t":"Numeral Parsing","u":"/docs/New Features/Numeral Parsing","b":["Documentation","New Features"]},{"i":228,"t":"String Indexing","u":"/docs/New Features/String Indexing","b":["Documentation","New Features"]},{"i":230,"t":"Object-Oriented Programming","u":"/docs/New Features/Object-Oriented Programming","b":["Documentation","New Features"]},{"i":254,"t":"Safe Navigation","u":"/docs/New Features/Safe Navigation","b":["Documentation","New Features"]},{"i":259,"t":"String Interpolation","u":"/docs/New Features/String Interpolation","b":["Documentation","New Features"]},{"i":261,"t":"Named Varargs","u":"/docs/New Features/Named Varargs","b":["Documentation","New Features"]},{"i":263,"t":"Table Freezing","u":"/docs/New Features/Table Freezing","b":["Documentation","New Features"]},{"i":267,"t":"Ternary Expressions","u":"/docs/New Features/Ternary Expressions","b":["Documentation","New Features"]},{"i":271,"t":"Switch Blocks","u":"/docs/New Features/Switch Blocks","b":["Documentation","New Features"]},{"i":281,"t":"Editor Integration","u":"/docs/Editor Integration","b":["Documentation"]},{"i":285,"t":"Try-Catch Statement","u":"/docs/New Features/Try-Catch Statement","b":["Documentation","New Features"]},{"i":289,"t":"Type Hinting","u":"/docs/New Features/Type Hinting","b":["Documentation","New Features"]},{"i":293,"t":"New Operators","u":"/docs/New Operators","b":["Documentation"]},{"i":312,"t":"For Loops","u":"/docs/Optimizations/For Loops","b":["Documentation","Optimizations"]},{"i":316,"t":"Compatibility","u":"/docs/Compatibility","b":["Documentation"]},{"i":328,"t":"Special Arithmetic","u":"/docs/Optimizations/Special Arithmetic","b":["Documentation","Optimizations"]},{"i":330,"t":"Boolean Concatenation","u":"/docs/QoL Improvements/Boolean Concatenation","b":["Documentation","QoL Improvements"]},{"i":332,"t":"Jump Table","u":"/docs/Optimizations/Jump Table","b":["Documentation","Optimizations"]},{"i":334,"t":"Table Length","u":"/docs/Optimizations/Table Length","b":["Documentation","Optimizations"]},{"i":336,"t":"Optional Parentheses","u":"/docs/QoL Improvements/Optional Parentheses","b":["Documentation","QoL Improvements"]},{"i":338,"t":"Generalized Iteration","u":"/docs/QoL Improvements/Generalized Iteration","b":["Documentation","QoL Improvements"]},{"i":340,"t":"Removed Locals Limit","u":"/docs/QoL Improvements/Removed Locals Limit","b":["Documentation","QoL Improvements"]},{"i":342,"t":"Reserved Identifiers","u":"/docs/QoL Improvements/Reserved Identifiers","b":["Documentation","QoL Improvements"]},{"i":344,"t":"Syntax Errors","u":"/docs/QoL Improvements/Syntax Errors","b":["Documentation","QoL Improvements"]},{"i":352,"t":"Base32","u":"/docs/Runtime Environment/Base32","b":["Documentation","Runtime Environment"]},{"i":358,"t":"CaT","u":"/docs/Runtime Environment/CaT","b":["Documentation","Runtime Environment"]},{"i":364,"t":"Base64","u":"/docs/Runtime Environment/Base64","b":["Documentation","Runtime Environment"]},{"i":374,"t":"Bigint","u":"/docs/Runtime Environment/Bigint","b":["Documentation","Runtime Environment"]},{"i":400,"t":"Coroutine","u":"/docs/Runtime Environment/Coroutine","b":["Documentation","Runtime Environment"]},{"i":406,"t":"Assert","u":"/docs/Runtime Environment/Assert","b":["Documentation","Runtime Environment"]},{"i":438,"t":"Global & Base","u":"/docs/Runtime Environment/Global & Base","b":["Documentation","Runtime Environment"]},{"i":460,"t":"HTTP","u":"/docs/Runtime Environment/HTTP","b":["Documentation","Runtime Environment"]},{"i":468,"t":"Exception","u":"/docs/Runtime Environment/Exception","b":["Documentation","Runtime Environment"]},{"i":470,"t":"JSON","u":"/docs/Runtime Environment/JSON","b":["Documentation","Runtime Environment"]},{"i":476,"t":"IO","u":"/docs/Runtime Environment/IO","b":["Documentation","Runtime Environment"]},{"i":510,"t":"Scheduler","u":"/docs/Runtime Environment/Scheduler","b":["Documentation","Runtime Environment"]},{"i":524,"t":"Math","u":"/docs/Runtime Environment/Math","b":["Documentation","Runtime Environment"]},{"i":532,"t":"OS","u":"/docs/Runtime Environment/OS","b":["Documentation","Runtime Environment"]},{"i":540,"t":"Crypto","u":"/docs/Runtime Environment/Crypto","b":["Documentation","Runtime Environment"]},{"i":618,"t":"String","u":"/docs/Runtime Environment/String","b":["Documentation","Runtime Environment"]},{"i":664,"t":"URL","u":"/docs/Runtime Environment/URL","b":["Documentation","Runtime Environment"]},{"i":672,"t":"Socket","u":"/docs/Runtime Environment/Socket","b":["Documentation","Runtime Environment"]},{"i":698,"t":"XML","u":"/docs/Runtime Environment/XML","b":["Documentation","Runtime Environment"]},{"i":704,"t":"Vector3","u":"/docs/Runtime Environment/Vector3","b":["Documentation","Runtime Environment"]},{"i":734,"t":"Table","u":"/docs/Runtime Environment/Table","b":["Documentation","Runtime Environment"]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/1",[0,3.844]],["t/20",[1,4.449]],["t/94",[2,4.449]],["t/98",[3,3.424,4,3.424]],["t/123",[5,2.404,6,2.783,7,2.783]],["t/131",[8,3.424,9,2.651]],["t/133",[5,2.958,10,3.424]],["t/170",[9,2.651,11,3.424]],["t/176",[12,3.424,13,2.958]],["t/178",[14,4.449]],["t/188",[15,3.424,16,2.958]],["t/192",[17,3.844]],["t/194",[18,3.424,19,3.424]],["t/198",[20,3.445]],["t/202",[21,4.449]],["t/212",[20,2.651,22,3.424]],["t/214",[23,3.424,24,3.424]],["t/216",[13,2.958,25,2.958]],["t/222",[26,3.424,27,3.424]],["t/228",[28,2.651,29,3.424]],["t/230",[30,2.783,31,2.783,32,2.783]],["t/254",[33,3.424,34,3.424]],["t/259",[28,2.651,35,3.424]],["t/261",[25,2.958,36,3.424]],["t/263",[37,2.422,38,3.424]],["t/267",[20,2.651,39,3.424]],["t/271",[40,3.424,41,3.424]],["t/281",[0,2.958,42,3.424]],["t/285",[9,2.154,43,2.783,44,2.783]],["t/289",[45,3.424,46,3.424]],["t/293",[47,3.424,48,3.424]],["t/312",[17,3.844]],["t/316",[49,4.449]],["t/328",[50,3.424,51,3.424]],["t/330",[52,3.424,53,3.424]],["t/332",[37,2.422,54,3.424]],["t/334",[37,2.422,55,3.424]],["t/336",[56,3.424,57,3.424]],["t/338",[58,3.424,59,3.424]],["t/340",[60,2.783,61,2.783,62,2.783]],["t/342",[63,3.424,64,3.424]],["t/344",[65,3.424,66,3.424]],["t/352",[67,4.449]],["t/358",[68,4.449]],["t/364",[69,4.449]],["t/374",[70,4.449]],["t/400",[71,4.449]],["t/406",[72,4.449]],["t/438",[16,2.404,73,2.783,74,2.783]],["t/460",[75,4.449]],["t/468",[76,4.449]],["t/470",[77,4.449]],["t/476",[78,4.449]],["t/510",[79,4.449]],["t/524",[80,4.449]],["t/532",[81,4.449]],["t/540",[82,4.449]],["t/618",[28,3.445]],["t/664",[83,4.449]],["t/672",[84,4.449]],["t/698",[85,4.449]],["t/704",[86,4.449]],["t/734",[37,3.147]]],"invertedIndex":[["",{"_index":73,"t":{"438":{"position":[[7,1]]}}}],["argument",{"_index":13,"t":{"176":{"position":[[8,9]]},"216":{"position":[[6,9]]}}}],["arithmet",{"_index":51,"t":{"328":{"position":[[8,10]]}}}],["assert",{"_index":72,"t":{"406":{"position":[[0,6]]}}}],["base",{"_index":74,"t":{"438":{"position":[[9,4]]}}}],["base32",{"_index":67,"t":{"352":{"position":[[0,6]]}}}],["base64",{"_index":69,"t":{"364":{"position":[[0,6]]}}}],["bigint",{"_index":70,"t":{"374":{"position":[[0,6]]}}}],["block",{"_index":41,"t":{"271":{"position":[[7,6]]}}}],["boolean",{"_index":52,"t":{"330":{"position":[[0,7]]}}}],["break",{"_index":8,"t":{"131":{"position":[[0,5]]}}}],["cat",{"_index":68,"t":{"358":{"position":[[0,3]]}}}],["catch",{"_index":44,"t":{"285":{"position":[[4,5]]}}}],["changelog",{"_index":1,"t":{"20":{"position":[[0,9]]}}}],["compat",{"_index":49,"t":{"316":{"position":[[0,13]]}}}],["compil",{"_index":5,"t":{"123":{"position":[[0,7]]},"133":{"position":[[0,8]]}}}],["concaten",{"_index":53,"t":{"330":{"position":[[8,13]]}}}],["continu",{"_index":11,"t":{"170":{"position":[[0,8]]}}}],["coroutin",{"_index":71,"t":{"400":{"position":[[0,9]]}}}],["crypto",{"_index":82,"t":{"540":{"position":[[0,6]]}}}],["default",{"_index":12,"t":{"176":{"position":[[0,7]]}}}],["destructur",{"_index":21,"t":{"202":{"position":[[0,13]]}}}],["editor",{"_index":42,"t":{"281":{"position":[[0,6]]}}}],["enumer",{"_index":14,"t":{"178":{"position":[[0,12]]}}}],["error",{"_index":66,"t":{"344":{"position":[[7,6]]}}}],["evalu",{"_index":7,"t":{"123":{"position":[[13,10]]}}}],["except",{"_index":76,"t":{"468":{"position":[[0,9]]}}}],["explicit",{"_index":15,"t":{"188":{"position":[[0,8]]}}}],["export",{"_index":18,"t":{"194":{"position":[[0,6]]}}}],["express",{"_index":20,"t":{"198":{"position":[[3,11]]},"212":{"position":[[7,11]]},"267":{"position":[[8,11]]}}}],["freez",{"_index":38,"t":{"263":{"position":[[6,8]]}}}],["function",{"_index":24,"t":{"214":{"position":[[10,9]]}}}],["gener",{"_index":58,"t":{"338":{"position":[[0,11]]}}}],["get",{"_index":3,"t":{"98":{"position":[[0,7]]}}}],["global",{"_index":16,"t":{"188":{"position":[[9,7]]},"438":{"position":[[0,6]]}}}],["hint",{"_index":46,"t":{"289":{"position":[[5,7]]}}}],["http",{"_index":75,"t":{"460":{"position":[[0,4]]}}}],["identifi",{"_index":64,"t":{"342":{"position":[[9,11]]}}}],["index",{"_index":29,"t":{"228":{"position":[[7,8]]}}}],["integr",{"_index":0,"t":{"1":{"position":[[4,11]]},"281":{"position":[[7,11]]}}}],["interpol",{"_index":35,"t":{"259":{"position":[[7,13]]}}}],["io",{"_index":78,"t":{"476":{"position":[[0,2]]}}}],["iter",{"_index":59,"t":{"338":{"position":[[12,9]]}}}],["json",{"_index":77,"t":{"470":{"position":[[0,4]]}}}],["jump",{"_index":54,"t":{"332":{"position":[[0,4]]}}}],["lambda",{"_index":22,"t":{"212":{"position":[[0,6]]}}}],["length",{"_index":55,"t":{"334":{"position":[[6,6]]}}}],["limit",{"_index":62,"t":{"340":{"position":[[15,5]]}}}],["local",{"_index":61,"t":{"340":{"position":[[8,6]]}}}],["loop",{"_index":17,"t":{"192":{"position":[[7,4]]},"312":{"position":[[4,5]]}}}],["math",{"_index":80,"t":{"524":{"position":[[0,4]]}}}],["modifi",{"_index":19,"t":{"194":{"position":[[7,8]]}}}],["name",{"_index":25,"t":{"216":{"position":[[0,5]]},"261":{"position":[[0,5]]}}}],["navig",{"_index":34,"t":{"254":{"position":[[5,10]]}}}],["new",{"_index":47,"t":{"293":{"position":[[0,3]]}}}],["nodiscard",{"_index":23,"t":{"214":{"position":[[0,9]]}}}],["numer",{"_index":26,"t":{"222":{"position":[[0,7]]}}}],["object",{"_index":30,"t":{"230":{"position":[[0,6]]}}}],["oper",{"_index":48,"t":{"293":{"position":[[4,9]]}}}],["option",{"_index":56,"t":{"336":{"position":[[0,8]]}}}],["orient",{"_index":31,"t":{"230":{"position":[[7,8]]}}}],["os",{"_index":81,"t":{"532":{"position":[[0,2]]}}}],["parenthes",{"_index":57,"t":{"336":{"position":[[9,11]]}}}],["pars",{"_index":27,"t":{"222":{"position":[[8,7]]}}}],["pluto",{"_index":2,"t":{"94":{"position":[[8,6]]}}}],["program",{"_index":32,"t":{"230":{"position":[[16,11]]}}}],["remov",{"_index":60,"t":{"340":{"position":[[0,7]]}}}],["reserv",{"_index":63,"t":{"342":{"position":[[0,8]]}}}],["safe",{"_index":33,"t":{"254":{"position":[[0,4]]}}}],["schedul",{"_index":79,"t":{"510":{"position":[[0,9]]}}}],["socket",{"_index":84,"t":{"672":{"position":[[0,6]]}}}],["special",{"_index":50,"t":{"328":{"position":[[0,7]]}}}],["start",{"_index":4,"t":{"98":{"position":[[8,7]]}}}],["statement",{"_index":9,"t":{"131":{"position":[[6,9]]},"170":{"position":[[9,9]]},"285":{"position":[[10,9]]}}}],["string",{"_index":28,"t":{"228":{"position":[[0,6]]},"259":{"position":[[0,6]]},"618":{"position":[[0,6]]}}}],["switch",{"_index":40,"t":{"271":{"position":[[0,6]]}}}],["syntax",{"_index":65,"t":{"344":{"position":[[0,6]]}}}],["tabl",{"_index":37,"t":{"263":{"position":[[0,5]]},"332":{"position":[[5,5]]},"334":{"position":[[0,5]]},"734":{"position":[[0,5]]}}}],["ternari",{"_index":39,"t":{"267":{"position":[[0,7]]}}}],["time",{"_index":6,"t":{"123":{"position":[[8,4]]}}}],["tri",{"_index":43,"t":{"285":{"position":[[0,3]]}}}],["type",{"_index":45,"t":{"289":{"position":[[0,4]]}}}],["url",{"_index":83,"t":{"664":{"position":[[0,3]]}}}],["vararg",{"_index":36,"t":{"261":{"position":[[6,7]]}}}],["vector3",{"_index":86,"t":{"704":{"position":[[0,7]]}}}],["warn",{"_index":10,"t":{"133":{"position":[[9,8]]}}}],["xml",{"_index":85,"t":{"698":{"position":[[0,3]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3,"t":"Content Moderation","u":"/docs/For Integrators","h":"#content-moderation","p":1},{"i":4,"t":"Compiled Code","u":"/docs/For Integrators","h":"#compiled-code","p":1},{"i":6,"t":"Custom Module Filters","u":"/docs/For Integrators","h":"#custom-module-filters","p":1},{"i":8,"t":"Prevent Loading of Binary Modules","u":"/docs/For Integrators","h":"#prevent-loading-of-binary-modules","p":1},{"i":10,"t":"Execution Time Limit","u":"/docs/For Integrators","h":"#execution-time-limit","p":1},{"i":12,"t":"Infinite Loop Prevention","u":"/docs/For Integrators","h":"#infinite-loop-prevention","p":1},{"i":14,"t":"VM Dumping","u":"/docs/For Integrators","h":"#vm-dumping","p":1},{"i":16,"t":"Configuration","u":"/docs/For Integrators","h":"#configuration","p":1},{"i":18,"t":"What it looks like","u":"/docs/For Integrators","h":"#what-it-looks-like","p":1},{"i":22,"t":"0.9.5","u":"/docs/Changelog","h":"#095","p":20},{"i":24,"t":"0.9.4","u":"/docs/Changelog","h":"#094","p":20},{"i":26,"t":"0.9.3","u":"/docs/Changelog","h":"#093","p":20},{"i":28,"t":"0.9.2","u":"/docs/Changelog","h":"#092","p":20},{"i":30,"t":"0.9.1","u":"/docs/Changelog","h":"#091","p":20},{"i":32,"t":"0.9.0","u":"/docs/Changelog","h":"#090","p":20},{"i":34,"t":"0.8.2","u":"/docs/Changelog","h":"#082","p":20},{"i":36,"t":"0.8.1","u":"/docs/Changelog","h":"#081","p":20},{"i":38,"t":"0.8.0","u":"/docs/Changelog","h":"#080","p":20},{"i":40,"t":"0.7.4","u":"/docs/Changelog","h":"#074","p":20},{"i":42,"t":"0.7.3","u":"/docs/Changelog","h":"#073","p":20},{"i":44,"t":"0.7.2","u":"/docs/Changelog","h":"#072","p":20},{"i":46,"t":"0.7.1","u":"/docs/Changelog","h":"#071","p":20},{"i":48,"t":"0.7.0","u":"/docs/Changelog","h":"#070","p":20},{"i":50,"t":"0.6.3","u":"/docs/Changelog","h":"#063","p":20},{"i":52,"t":"0.6.2","u":"/docs/Changelog","h":"#062","p":20},{"i":54,"t":"0.6.1","u":"/docs/Changelog","h":"#061","p":20},{"i":56,"t":"0.6.0","u":"/docs/Changelog","h":"#060","p":20},{"i":58,"t":"0.5.4","u":"/docs/Changelog","h":"#054","p":20},{"i":60,"t":"0.5.3","u":"/docs/Changelog","h":"#053","p":20},{"i":62,"t":"0.5.2","u":"/docs/Changelog","h":"#052","p":20},{"i":64,"t":"0.5.1","u":"/docs/Changelog","h":"#051","p":20},{"i":66,"t":"0.5.0","u":"/docs/Changelog","h":"#050","p":20},{"i":68,"t":"0.4.5","u":"/docs/Changelog","h":"#045","p":20},{"i":70,"t":"0.4.4","u":"/docs/Changelog","h":"#044","p":20},{"i":72,"t":"0.4.3","u":"/docs/Changelog","h":"#043","p":20},{"i":74,"t":"0.4.2","u":"/docs/Changelog","h":"#042","p":20},{"i":76,"t":"0.4.1","u":"/docs/Changelog","h":"#041","p":20},{"i":78,"t":"0.4.0","u":"/docs/Changelog","h":"#040","p":20},{"i":80,"t":"0.3.2","u":"/docs/Changelog","h":"#032","p":20},{"i":82,"t":"0.3.1","u":"/docs/Changelog","h":"#031","p":20},{"i":84,"t":"0.3.0","u":"/docs/Changelog","h":"#030","p":20},{"i":86,"t":"0.2.2","u":"/docs/Changelog","h":"#022","p":20},{"i":88,"t":"0.2.1","u":"/docs/Changelog","h":"#021","p":20},{"i":90,"t":"0.2.0","u":"/docs/Changelog","h":"#020","p":20},{"i":92,"t":"0.1.0","u":"/docs/Changelog","h":"#010","p":20},{"i":96,"t":"What does Pluto aspire to be?","u":"/docs/Introduction","h":"#what-does-pluto-aspire-to-be","p":94},{"i":100,"t":"Write Pluto Online","u":"/docs/Getting Started","h":"#write-pluto-online","p":98},{"i":102,"t":"Prebuilt Binaries","u":"/docs/Getting Started","h":"#prebuilt-binaries","p":98},{"i":104,"t":"Packages","u":"/docs/Getting Started","h":"#packages","p":98},{"i":105,"t":"Chocolatey","u":"/docs/Getting Started","h":"#chocolatey","p":98},{"i":107,"t":"APT Repository","u":"/docs/Getting Started","h":"#apt-repository","p":98},{"i":109,"t":"AUR","u":"/docs/Getting Started","h":"#aur","p":98},{"i":111,"t":"Termux","u":"/docs/Getting Started","h":"#termux","p":98},{"i":113,"t":"Compile Pluto Yourself","u":"/docs/Getting Started","h":"#compile-pluto-yourself","p":98},{"i":115,"t":"PHP Scripts","u":"/docs/Getting Started","h":"#php-scripts","p":98},{"i":117,"t":"Visual Studio","u":"/docs/Getting Started","h":"#visual-studio","p":98},{"i":119,"t":"Make","u":"/docs/Getting Started","h":"#make","p":98},{"i":121,"t":"Sun","u":"/docs/Getting Started","h":"#sun","p":98},{"i":125,"t":"Function calls","u":"/docs/New Features/Compile-Time Evaluation","h":"#function-calls","p":123},{"i":127,"t":"Variables","u":"/docs/New Features/Compile-Time Evaluation","h":"#variables","p":123},{"i":129,"t":"Conditionals","u":"/docs/New Features/Compile-Time Evaluation","h":"#conditionals","p":123},{"i":135,"t":"Warning Types","u":"/docs/New Features/Compiler Warnings","h":"#warning-types","p":133},{"i":136,"t":"var-shadow","u":"/docs/New Features/Compiler Warnings","h":"#var-shadow","p":133},{"i":138,"t":"global-shadow","u":"/docs/New Features/Compiler Warnings","h":"#global-shadow","p":133},{"i":140,"t":"field-shadow","u":"/docs/New Features/Compiler Warnings","h":"#field-shadow","p":133},{"i":142,"t":"type-mismatch","u":"/docs/New Features/Compiler Warnings","h":"#type-mismatch","p":133},{"i":144,"t":"unreachable-code","u":"/docs/New Features/Compiler Warnings","h":"#unreachable-code","p":133},{"i":146,"t":"excessive-arguments","u":"/docs/New Features/Compiler Warnings","h":"#excessive-arguments","p":133},{"i":148,"t":"bad-practice","u":"/docs/New Features/Compiler Warnings","h":"#bad-practice","p":133},{"i":150,"t":"possible-typo","u":"/docs/New Features/Compiler Warnings","h":"#possible-typo","p":133},{"i":152,"t":"non-portable-code","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-code","p":133},{"i":154,"t":"non-portable-name","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-name","p":133},{"i":156,"t":"non-portable-bytecode","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-bytecode","p":133},{"i":158,"t":"unannotated-fallthrough","u":"/docs/New Features/Compiler Warnings","h":"#unannotated-fallthrough","p":133},{"i":160,"t":"implicit-global","u":"/docs/New Features/Compiler Warnings","h":"#implicit-global","p":133},{"i":162,"t":"discarded-return","u":"/docs/New Features/Compiler Warnings","h":"#discarded-return","p":133},{"i":164,"t":"Compile-time Configuration","u":"/docs/New Features/Compiler Warnings","h":"#compile-time-configuration","p":133},{"i":166,"t":"Changing Warning States","u":"/docs/New Features/Compiler Warnings","h":"#changing-warning-states","p":133},{"i":168,"t":"Disable Warnings On Line","u":"/docs/New Features/Compiler Warnings","h":"#disable-warnings-on-line","p":133},{"i":172,"t":"Continue's Only Argument","u":"/docs/New Features/Continue Statement","h":"#continues-only-argument","p":170},{"i":174,"t":"Using Compatibility Mode?","u":"/docs/New Features/Continue Statement","h":"#using-compatibility-mode","p":170},{"i":180,"t":"Scoped Enums","u":"/docs/New Features/Enumerations","h":"#scoped-enums","p":178},{"i":182,"t":"Reflection","u":"/docs/New Features/Enumerations","h":"#reflection","p":178},{"i":184,"t":"Anonymous Enums","u":"/docs/New Features/Enumerations","h":"#anonymous-enums","p":178},{"i":186,"t":"Using Compatibility Mode?","u":"/docs/New Features/Enumerations","h":"#using-compatibility-mode","p":178},{"i":190,"t":"Compiler Warnings","u":"/docs/New Features/Explicit Globals","h":"#compiler-warnings","p":188},{"i":196,"t":"Using Compatibility Mode?","u":"/docs/New Features/Export Modifier","h":"#using-compatibility-mode","p":194},{"i":200,"t":"Rules","u":"/docs/New Features/In Expressions","h":"#rules","p":198},{"i":204,"t":"Array destructuring","u":"/docs/New Features/Destructuring","h":"#array-destructuring","p":202},{"i":206,"t":"Table destructuring","u":"/docs/New Features/Destructuring","h":"#table-destructuring","p":202},{"i":208,"t":"Different variable name","u":"/docs/New Features/Destructuring","h":"#different-variable-name","p":202},{"i":210,"t":"Standard Library","u":"/docs/New Features/Destructuring","h":"#standard-library","p":202},{"i":218,"t":"Mixing arguments","u":"/docs/New Features/Named Arguments","h":"#mixing-arguments","p":216},{"i":220,"t":"Limitations","u":"/docs/New Features/Named Arguments","h":"#limitations","p":216},{"i":224,"t":"Cosmetic Underscores","u":"/docs/New Features/Numeral Parsing","h":"#cosmetic-underscores","p":222},{"i":226,"t":"Binary Integers","u":"/docs/New Features/Numeral Parsing","h":"#binary-integers","p":222},{"i":232,"t":"Method Creation","u":"/docs/New Features/Object-Oriented Programming","h":"#method-creation","p":230},{"i":234,"t":"Static Functions","u":"/docs/New Features/Object-Oriented Programming","h":"#static-functions","p":230},{"i":236,"t":"New Operator","u":"/docs/New Features/Object-Oriented Programming","h":"#new-operator","p":230},{"i":238,"t":"Class Statement","u":"/docs/New Features/Object-Oriented Programming","h":"#class-statement","p":230},{"i":240,"t":"Class Expression","u":"/docs/New Features/Object-Oriented Programming","h":"#class-expression","p":230},{"i":242,"t":"Extends","u":"/docs/New Features/Object-Oriented Programming","h":"#extends","p":230},{"i":244,"t":"Parent Expression","u":"/docs/New Features/Object-Oriented Programming","h":"#parent-expression","p":230},{"i":246,"t":"Private Fields","u":"/docs/New Features/Object-Oriented Programming","h":"#private-fields","p":230},{"i":248,"t":"Constructor Promotion","u":"/docs/New Features/Object-Oriented Programming","h":"#constructor-promotion","p":230},{"i":250,"t":"Instanceof Operator","u":"/docs/New Features/Object-Oriented Programming","h":"#instanceof-operator","p":230},{"i":252,"t":"Using Compatibility Mode?","u":"/docs/New Features/Object-Oriented Programming","h":"#using-compatibility-mode","p":230},{"i":255,"t":"For Member Access","u":"/docs/New Features/Safe Navigation","h":"#for-member-access","p":254},{"i":257,"t":"For Method Calls","u":"/docs/New Features/Safe Navigation","h":"#for-method-calls","p":254},{"i":265,"t":"What will this prevent?","u":"/docs/New Features/Table Freezing","h":"#what-will-this-prevent","p":263},{"i":269,"t":"Doesn't Lua already have ternaries?","u":"/docs/New Features/Ternary Expressions","h":"#doesnt-lua-already-have-ternaries","p":267},{"i":273,"t":"Switch Statement","u":"/docs/New Features/Switch Blocks","h":"#switch-statement","p":271},{"i":275,"t":"Case Blocks","u":"/docs/New Features/Switch Blocks","h":"#case-blocks","p":271},{"i":277,"t":"Switch Expression","u":"/docs/New Features/Switch Blocks","h":"#switch-expression","p":271},{"i":279,"t":"Using Compatibility Mode?","u":"/docs/New Features/Switch Blocks","h":"#using-compatibility-mode","p":271},{"i":283,"t":"Installation","u":"/docs/Editor Integration","h":"#installation","p":281},{"i":287,"t":"Using Compatibility Mode?","u":"/docs/New Features/Try-Catch Statement","h":"#using-compatibility-mode","p":285},{"i":291,"t":"What types can I use?","u":"/docs/New Features/Type Hinting","h":"#what-types-can-i-use","p":289},{"i":294,"t":"Operator Aliases","u":"/docs/New Operators","h":"#operator-aliases","p":293},{"i":296,"t":"Compound Operators","u":"/docs/New Operators","h":"#compound-operators","p":293},{"i":298,"t":"Coalescing Operator","u":"/docs/New Operators","h":"#coalescing-operator","p":293},{"i":300,"t":"Walrus Operator","u":"/docs/New Operators","h":"#walrus-operator","p":293},{"i":302,"t":"Spaceship Operator","u":"/docs/New Operators","h":"#spaceship-operator","p":293},{"i":304,"t":"Pipe Operator","u":"/docs/New Operators","h":"#pipe-operator","p":293},{"i":306,"t":"Additional Arguments","u":"/docs/New Operators","h":"#additional-arguments","p":293},{"i":308,"t":"Methods Calls","u":"/docs/New Operators","h":"#methods-calls","p":293},{"i":310,"t":"Anonymous Functions","u":"/docs/New Operators","h":"#anonymous-functions","p":293},{"i":314,"t":"How does it work?","u":"/docs/Optimizations/For Loops","h":"#how-does-it-work","p":312},{"i":318,"t":"New Keywords","u":"/docs/Compatibility","h":"#new-keywords","p":316},{"i":320,"t":"Mitigations","u":"/docs/Compatibility","h":"#mitigations","p":316},{"i":322,"t":"Compile-time Configuration (pluto_use)","u":"/docs/Compatibility","h":"#compile-time-configuration-pluto_use","p":316},{"i":324,"t":"Compatible Keywords","u":"/docs/Compatibility","h":"#compatible-keywords","p":316},{"i":326,"t":"Default Table Metatable","u":"/docs/Compatibility","h":"#default-table-metatable","p":316},{"i":346,"t":"Example 1","u":"/docs/QoL Improvements/Syntax Errors","h":"#example-1","p":344},{"i":348,"t":"Example 2","u":"/docs/QoL Improvements/Syntax Errors","h":"#example-2","p":344},{"i":350,"t":"ANSI Coloring","u":"/docs/QoL Improvements/Syntax Errors","h":"#ansi-coloring","p":344},{"i":354,"t":"base32.encode","u":"/docs/Runtime Environment/Base32","h":"#base32encode","p":352},{"i":356,"t":"base32.decode","u":"/docs/Runtime Environment/Base32","h":"#base32decode","p":352},{"i":360,"t":"cat.encode","u":"/docs/Runtime Environment/CaT","h":"#catencode","p":358},{"i":362,"t":"cat.decode","u":"/docs/Runtime Environment/CaT","h":"#catdecode","p":358},{"i":366,"t":"base64.encode","u":"/docs/Runtime Environment/Base64","h":"#base64encode","p":364},{"i":368,"t":"base64.decode","u":"/docs/Runtime Environment/Base64","h":"#base64decode","p":364},{"i":370,"t":"base64.urlencode","u":"/docs/Runtime Environment/Base64","h":"#base64urlencode","p":364},{"i":372,"t":"base64.urldecode","u":"/docs/Runtime Environment/Base64","h":"#base64urldecode","p":364},{"i":376,"t":"bigint.new","u":"/docs/Runtime Environment/Bigint","h":"#bigintnew","p":374},{"i":378,"t":"bigint.tostring, __tostring","u":"/docs/Runtime Environment/Bigint","h":"#biginttostring-__tostring","p":374},{"i":380,"t":"bigint.hex","u":"/docs/Runtime Environment/Bigint","h":"#biginthex","p":374},{"i":382,"t":"bigint.binary","u":"/docs/Runtime Environment/Bigint","h":"#bigintbinary","p":374},{"i":384,"t":"bigint.add, __add","u":"/docs/Runtime Environment/Bigint","h":"#bigintadd-__add","p":374},{"i":386,"t":"bigint.sub, __sub","u":"/docs/Runtime Environment/Bigint","h":"#bigintsub-__sub","p":374},{"i":388,"t":"bigint.mul, __mul","u":"/docs/Runtime Environment/Bigint","h":"#bigintmul-__mul","p":374},{"i":390,"t":"bigint.div","u":"/docs/Runtime Environment/Bigint","h":"#bigintdiv","p":374},{"i":392,"t":"__div","u":"/docs/Runtime Environment/Bigint","h":"#__div","p":374},{"i":394,"t":"bigint.mod, __mod","u":"/docs/Runtime Environment/Bigint","h":"#bigintmod-__mod","p":374},{"i":396,"t":"bigint.pow, __pow","u":"/docs/Runtime Environment/Bigint","h":"#bigintpow-__pow","p":374},{"i":398,"t":"bigint.bitlength","u":"/docs/Runtime Environment/Bigint","h":"#bigintbitlength","p":374},{"i":402,"t":"coroutine.xresume","u":"/docs/Runtime Environment/Coroutine","h":"#coroutinexresume","p":400},{"i":404,"t":"coroutine.sleep","u":"/docs/Runtime Environment/Coroutine","h":"#coroutinesleep","p":400},{"i":408,"t":"assert.isnil","u":"/docs/Runtime Environment/Assert","h":"#assertisnil","p":406},{"i":410,"t":"assert.istrue","u":"/docs/Runtime Environment/Assert","h":"#assertistrue","p":406},{"i":412,"t":"assert.isfalse","u":"/docs/Runtime Environment/Assert","h":"#assertisfalse","p":406},{"i":414,"t":"assert.falsy","u":"/docs/Runtime Environment/Assert","h":"#assertfalsy","p":406},{"i":416,"t":"assert.truthy","u":"/docs/Runtime Environment/Assert","h":"#asserttruthy","p":406},{"i":418,"t":"assert.notnil","u":"/docs/Runtime Environment/Assert","h":"#assertnotnil","p":406},{"i":420,"t":"assert.equal","u":"/docs/Runtime Environment/Assert","h":"#assertequal","p":406},{"i":422,"t":"assert.nequal","u":"/docs/Runtime Environment/Assert","h":"#assertnequal","p":406},{"i":424,"t":"assert.less","u":"/docs/Runtime Environment/Assert","h":"#assertless","p":406},{"i":426,"t":"assert.lesseq","u":"/docs/Runtime Environment/Assert","h":"#assertlesseq","p":406},{"i":428,"t":"assert.greater","u":"/docs/Runtime Environment/Assert","h":"#assertgreater","p":406},{"i":430,"t":"assert.greatereq","u":"/docs/Runtime Environment/Assert","h":"#assertgreatereq","p":406},{"i":432,"t":"assert.noerror","u":"/docs/Runtime Environment/Assert","h":"#assertnoerror","p":406},{"i":434,"t":"assert.haserror","u":"/docs/Runtime Environment/Assert","h":"#asserthaserror","p":406},{"i":436,"t":"assert.searcherror","u":"/docs/Runtime Environment/Assert","h":"#assertsearcherror","p":406},{"i":440,"t":"_PVERSION","u":"/docs/Runtime Environment/Global & Base","h":"#_pversion","p":438},{"i":442,"t":"_PSOUP","u":"/docs/Runtime Environment/Global & Base","h":"#_psoup","p":438},{"i":444,"t":"os.platform","u":"/docs/Runtime Environment/Global & Base","h":"#osplatform","p":438},{"i":446,"t":"package.path","u":"/docs/Runtime Environment/Global & Base","h":"#packagepath","p":438},{"i":448,"t":"Default Metatables","u":"/docs/Runtime Environment/Global & Base","h":"#default-metatables","p":438},{"i":450,"t":"dumpvar","u":"/docs/Runtime Environment/Global & Base","h":"#dumpvar","p":438},{"i":452,"t":"exportvar","u":"/docs/Runtime Environment/Global & Base","h":"#exportvar","p":438},{"i":454,"t":"range","u":"/docs/Runtime Environment/Global & Base","h":"#range","p":438},{"i":456,"t":"compareversions","u":"/docs/Runtime Environment/Global & Base","h":"#compareversions","p":438},{"i":458,"t":"wcall","u":"/docs/Runtime Environment/Global & Base","h":"#wcall","p":438},{"i":462,"t":"http.request","u":"/docs/Runtime Environment/HTTP","h":"#httprequest","p":460},{"i":464,"t":"http.hasconnection","u":"/docs/Runtime Environment/HTTP","h":"#httphasconnection","p":460},{"i":466,"t":"http.closeconnections","u":"/docs/Runtime Environment/HTTP","h":"#httpcloseconnections","p":460},{"i":472,"t":"json.encode","u":"/docs/Runtime Environment/JSON","h":"#jsonencode","p":470},{"i":474,"t":"json.decode","u":"/docs/Runtime Environment/JSON","h":"#jsondecode","p":470},{"i":478,"t":"io.rename","u":"/docs/Runtime Environment/IO","h":"#iorename","p":476},{"i":480,"t":"io.remove","u":"/docs/Runtime Environment/IO","h":"#ioremove","p":476},{"i":482,"t":"io.copy","u":"/docs/Runtime Environment/IO","h":"#iocopy","p":476},{"i":484,"t":"io.part","u":"/docs/Runtime Environment/IO","h":"#iopart","p":476},{"i":486,"t":"io.isdir","u":"/docs/Runtime Environment/IO","h":"#ioisdir","p":476},{"i":488,"t":"io.isfile","u":"/docs/Runtime Environment/IO","h":"#ioisfile","p":476},{"i":490,"t":"io.exists","u":"/docs/Runtime Environment/IO","h":"#ioexists","p":476},{"i":492,"t":"io.makedir","u":"/docs/Runtime Environment/IO","h":"#iomakedir","p":476},{"i":494,"t":"io.listdir","u":"/docs/Runtime Environment/IO","h":"#iolistdir","p":476},{"i":496,"t":"io.makedirs","u":"/docs/Runtime Environment/IO","h":"#iomakedirs","p":476},{"i":498,"t":"io.absolute","u":"/docs/Runtime Environment/IO","h":"#ioabsolute","p":476},{"i":500,"t":"io.relative","u":"/docs/Runtime Environment/IO","h":"#iorelative","p":476},{"i":502,"t":"io.contents","u":"/docs/Runtime Environment/IO","h":"#iocontents","p":476},{"i":504,"t":"io.filesize","u":"/docs/Runtime Environment/IO","h":"#iofilesize","p":476},{"i":506,"t":"io.writetime","u":"/docs/Runtime Environment/IO","h":"#iowritetime","p":476},{"i":508,"t":"io.currentdir","u":"/docs/Runtime Environment/IO","h":"#iocurrentdir","p":476},{"i":512,"t":"__construct","u":"/docs/Runtime Environment/Scheduler","h":"#__construct","p":510},{"i":514,"t":"add","u":"/docs/Runtime Environment/Scheduler","h":"#add","p":510},{"i":516,"t":"addloop","u":"/docs/Runtime Environment/Scheduler","h":"#addloop","p":510},{"i":518,"t":"run","u":"/docs/Runtime Environment/Scheduler","h":"#run","p":510},{"i":520,"t":"yieldfunc","u":"/docs/Runtime Environment/Scheduler","h":"#yieldfunc","p":510},{"i":522,"t":"errorfunc","u":"/docs/Runtime Environment/Scheduler","h":"#errorfunc","p":510},{"i":526,"t":"math.isnan","u":"/docs/Runtime Environment/Math","h":"#mathisnan","p":524},{"i":528,"t":"math.round","u":"/docs/Runtime Environment/Math","h":"#mathround","p":524},{"i":530,"t":"math.atan2","u":"/docs/Runtime Environment/Math","h":"#mathatan2","p":524},{"i":534,"t":"os.sleep","u":"/docs/Runtime Environment/OS","h":"#ossleep","p":532},{"i":536,"t":"os.nanos, os.micros, os.millis, os.seconds","u":"/docs/Runtime Environment/OS","h":"#osnanos-osmicros-osmillis-osseconds","p":532},{"i":538,"t":"os.unixseconds","u":"/docs/Runtime Environment/OS","h":"#osunixseconds","p":532},{"i":542,"t":"Non-Cryptographic Hashing Algorithms","u":"/docs/Runtime Environment/Crypto","h":"#non-cryptographic-hashing-algorithms","p":540},{"i":543,"t":"crypto.lua","u":"/docs/Runtime Environment/Crypto","h":"#cryptolua","p":540},{"i":545,"t":"crypto.md5","u":"/docs/Runtime Environment/Crypto","h":"#cryptomd5","p":540},{"i":547,"t":"crypto.djb2","u":"/docs/Runtime Environment/Crypto","h":"#cryptodjb2","p":540},{"i":549,"t":"crypto.fnv1","u":"/docs/Runtime Environment/Crypto","h":"#cryptofnv1","p":540},{"i":551,"t":"crypto.fnv1a","u":"/docs/Runtime Environment/Crypto","h":"#cryptofnv1a","p":540},{"i":553,"t":"crypto.joaat","u":"/docs/Runtime Environment/Crypto","h":"#cryptojoaat","p":540},{"i":555,"t":"crypto.sdbm","u":"/docs/Runtime Environment/Crypto","h":"#cryptosdbm","p":540},{"i":557,"t":"crypto.crc32","u":"/docs/Runtime Environment/Crypto","h":"#cryptocrc32","p":540},{"i":559,"t":"crypto.adler32","u":"/docs/Runtime Environment/Crypto","h":"#cryptoadler32","p":540},{"i":561,"t":"crypto.lookup3","u":"/docs/Runtime Environment/Crypto","h":"#cryptolookup3","p":540},{"i":563,"t":"crypto.times33","u":"/docs/Runtime Environment/Crypto","h":"#cryptotimes33","p":540},{"i":565,"t":"crypto.murmur1","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur1","p":540},{"i":567,"t":"crypto.murmur2","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2","p":540},{"i":569,"t":"crypto.murmur2a","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2a","p":540},{"i":571,"t":"crypto.murmur64a","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur64a","p":540},{"i":573,"t":"crypto.murmur64b","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur64b","p":540},{"i":575,"t":"crypto.murmur2neutral","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2neutral","p":540},{"i":577,"t":"Cryptographic Hashing Algorithms","u":"/docs/Runtime Environment/Crypto","h":"#cryptographic-hashing-algorithms","p":540},{"i":578,"t":"crypto.sha1","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha1","p":540},{"i":580,"t":"crypto.sha256","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha256","p":540},{"i":582,"t":"crypto.sha384","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha384","p":540},{"i":584,"t":"crypto.sha512","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha512","p":540},{"i":586,"t":"Cryptographic PRNGs","u":"/docs/Runtime Environment/Crypto","h":"#cryptographic-prngs","p":540},{"i":587,"t":"crypto.random","u":"/docs/Runtime Environment/Crypto","h":"#cryptorandom","p":540},{"i":589,"t":"AES-CBC, AES-CFB","u":"/docs/Runtime Environment/Crypto","h":"#aes-cbc-aes-cfb","p":540},{"i":591,"t":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt","p":540},{"i":593,"t":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt","p":540},{"i":595,"t":"AES-ECB","u":"/docs/Runtime Environment/Crypto","h":"#aes-ecb","p":540},{"i":597,"t":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-1","p":540},{"i":599,"t":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-1","p":540},{"i":601,"t":"AES-GCM","u":"/docs/Runtime Environment/Crypto","h":"#aes-gcm","p":540},{"i":603,"t":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-2","p":540},{"i":605,"t":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-2","p":540},{"i":607,"t":"RSA","u":"/docs/Runtime Environment/Crypto","h":"#rsa","p":540},{"i":608,"t":"crypto.generatekeypair","u":"/docs/Runtime Environment/Crypto","h":"#cryptogeneratekeypair","p":540},{"i":610,"t":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-3","p":540},{"i":612,"t":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-3","p":540},{"i":614,"t":"crypto.sign","u":"/docs/Runtime Environment/Crypto","h":"#cryptosign","p":540},{"i":616,"t":"crypto.verify","u":"/docs/Runtime Environment/Crypto","h":"#cryptoverify","p":540},{"i":620,"t":"string.upper","u":"/docs/Runtime Environment/String","h":"#stringupper","p":618},{"i":622,"t":"string.lower","u":"/docs/Runtime Environment/String","h":"#stringlower","p":618},{"i":624,"t":"string.split","u":"/docs/Runtime Environment/String","h":"#stringsplit","p":618},{"i":626,"t":"string.rfind","u":"/docs/Runtime Environment/String","h":"#stringrfind","p":618},{"i":628,"t":"string.strip","u":"/docs/Runtime Environment/String","h":"#stringstrip","p":618},{"i":630,"t":"string.lstrip","u":"/docs/Runtime Environment/String","h":"#stringlstrip","p":618},{"i":632,"t":"string.rstrip","u":"/docs/Runtime Environment/String","h":"#stringrstrip","p":618},{"i":634,"t":"string.isascii","u":"/docs/Runtime Environment/String","h":"#stringisascii","p":618},{"i":636,"t":"string.islower","u":"/docs/Runtime Environment/String","h":"#stringislower","p":618},{"i":638,"t":"string.isalpha","u":"/docs/Runtime Environment/String","h":"#stringisalpha","p":618},{"i":640,"t":"string.isupper","u":"/docs/Runtime Environment/String","h":"#stringisupper","p":618},{"i":642,"t":"string.isalnum","u":"/docs/Runtime Environment/String","h":"#stringisalnum","p":618},{"i":644,"t":"string.iswhitespace","u":"/docs/Runtime Environment/String","h":"#stringiswhitespace","p":618},{"i":646,"t":"string.uformat","u":"/docs/Runtime Environment/String","h":"#stringuformat","p":618},{"i":648,"t":"string.replace","u":"/docs/Runtime Environment/String","h":"#stringreplace","p":618},{"i":650,"t":"string.truncate","u":"/docs/Runtime Environment/String","h":"#stringtruncate","p":618},{"i":652,"t":"string.contains","u":"/docs/Runtime Environment/String","h":"#stringcontains","p":618},{"i":654,"t":"string.casefold","u":"/docs/Runtime Environment/String","h":"#stringcasefold","p":618},{"i":656,"t":"string.formatint","u":"/docs/Runtime Environment/String","h":"#stringformatint","p":618},{"i":658,"t":"string.partition","u":"/docs/Runtime Environment/String","h":"#stringpartition","p":618},{"i":660,"t":"string.endswith","u":"/docs/Runtime Environment/String","h":"#stringendswith","p":618},{"i":662,"t":"string.startswith","u":"/docs/Runtime Environment/String","h":"#stringstartswith","p":618},{"i":666,"t":"url.encode","u":"/docs/Runtime Environment/URL","h":"#urlencode","p":664},{"i":668,"t":"url.decode","u":"/docs/Runtime Environment/URL","h":"#urldecode","p":664},{"i":670,"t":"url.parse","u":"/docs/Runtime Environment/URL","h":"#urlparse","p":664},{"i":674,"t":"socket.connect","u":"/docs/Runtime Environment/Socket","h":"#socketconnect","p":672},{"i":676,"t":"socket.listen","u":"/docs/Runtime Environment/Socket","h":"#socketlisten","p":672},{"i":678,"t":"socket.bind","u":"/docs/Runtime Environment/Socket","h":"#socketbind","p":672},{"i":680,"t":"Socket Class","u":"/docs/Runtime Environment/Socket","h":"#socket-class","p":672},{"i":682,"t":"socket.send","u":"/docs/Runtime Environment/Socket","h":"#socketsend","p":672},{"i":684,"t":"socket.recv","u":"/docs/Runtime Environment/Socket","h":"#socketrecv","p":672},{"i":686,"t":"socket.unrecv","u":"/docs/Runtime Environment/Socket","h":"#socketunrecv","p":672},{"i":688,"t":"socket.starttls","u":"/docs/Runtime Environment/Socket","h":"#socketstarttls","p":672},{"i":690,"t":"socket.close","u":"/docs/Runtime Environment/Socket","h":"#socketclose","p":672},{"i":692,"t":"Listener Class","u":"/docs/Runtime Environment/Socket","h":"#listener-class","p":672},{"i":694,"t":"accept","u":"/docs/Runtime Environment/Socket","h":"#accept","p":672},{"i":696,"t":"hasconnection","u":"/docs/Runtime Environment/Socket","h":"#hasconnection","p":672},{"i":700,"t":"xml.encode","u":"/docs/Runtime Environment/XML","h":"#xmlencode","p":698},{"i":702,"t":"xml.decode","u":"/docs/Runtime Environment/XML","h":"#xmldecode","p":698},{"i":706,"t":"__construct","u":"/docs/Runtime Environment/Vector3","h":"#__construct","p":704},{"i":708,"t":"__tostring","u":"/docs/Runtime Environment/Vector3","h":"#__tostring","p":704},{"i":710,"t":"__add, __sub, __mul, __div","u":"/docs/Runtime Environment/Vector3","h":"#__add-__sub-__mul-__div","p":704},{"i":712,"t":"__eq","u":"/docs/Runtime Environment/Vector3","h":"#__eq","p":704},{"i":714,"t":"__len, magnitude","u":"/docs/Runtime Environment/Vector3","h":"#__len-magnitude","p":704},{"i":716,"t":"sum","u":"/docs/Runtime Environment/Vector3","h":"#sum","p":704},{"i":718,"t":"min","u":"/docs/Runtime Environment/Vector3","h":"#min","p":704},{"i":720,"t":"max","u":"/docs/Runtime Environment/Vector3","h":"#max","p":704},{"i":722,"t":"dot","u":"/docs/Runtime Environment/Vector3","h":"#dot","p":704},{"i":724,"t":"abs","u":"/docs/Runtime Environment/Vector3","h":"#abs","p":704},{"i":726,"t":"normalized, normalised","u":"/docs/Runtime Environment/Vector3","h":"#normalized-normalised","p":704},{"i":728,"t":"torot","u":"/docs/Runtime Environment/Vector3","h":"#torot","p":704},{"i":730,"t":"lookat","u":"/docs/Runtime Environment/Vector3","h":"#lookat","p":704},{"i":732,"t":"todir","u":"/docs/Runtime Environment/Vector3","h":"#todir","p":704},{"i":736,"t":"table.sort","u":"/docs/Runtime Environment/Table","h":"#tablesort","p":734},{"i":738,"t":"table.sorted","u":"/docs/Runtime Environment/Table","h":"#tablesorted","p":734},{"i":740,"t":"table.size","u":"/docs/Runtime Environment/Table","h":"#tablesize","p":734},{"i":742,"t":"table.clear","u":"/docs/Runtime Environment/Table","h":"#tableclear","p":734},{"i":744,"t":"table.freeze","u":"/docs/Runtime Environment/Table","h":"#tablefreeze","p":734},{"i":746,"t":"table.isfrozen","u":"/docs/Runtime Environment/Table","h":"#tableisfrozen","p":734},{"i":748,"t":"table.contains","u":"/docs/Runtime Environment/Table","h":"#tablecontains","p":734},{"i":750,"t":"table.find","u":"/docs/Runtime Environment/Table","h":"#tablefind","p":734},{"i":752,"t":"table.reverse","u":"/docs/Runtime Environment/Table","h":"#tablereverse","p":734},{"i":754,"t":"table.reversed","u":"/docs/Runtime Environment/Table","h":"#tablereversed","p":734},{"i":756,"t":"table.reorder","u":"/docs/Runtime Environment/Table","h":"#tablereorder","p":734},{"i":758,"t":"table.reordered","u":"/docs/Runtime Environment/Table","h":"#tablereordered","p":734},{"i":760,"t":"table.foreach","u":"/docs/Runtime Environment/Table","h":"#tableforeach","p":734},{"i":762,"t":"table.filter","u":"/docs/Runtime Environment/Table","h":"#tablefilter","p":734},{"i":764,"t":"table.filtered","u":"/docs/Runtime Environment/Table","h":"#tablefiltered","p":734},{"i":766,"t":"table.map","u":"/docs/Runtime Environment/Table","h":"#tablemap","p":734},{"i":768,"t":"table.mapped","u":"/docs/Runtime Environment/Table","h":"#tablemapped","p":734},{"i":770,"t":"table.reduce","u":"/docs/Runtime Environment/Table","h":"#tablereduce","p":734},{"i":772,"t":"table.min","u":"/docs/Runtime Environment/Table","h":"#tablemin","p":734},{"i":774,"t":"table.max","u":"/docs/Runtime Environment/Table","h":"#tablemax","p":734},{"i":776,"t":"table.checkall","u":"/docs/Runtime Environment/Table","h":"#tablecheckall","p":734}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3",[0,4.606,1,4.606]],["t/4",[2,3.497,3,3.883]],["t/6",[4,3.692,5,3.342,6,3.692]],["t/8",[5,2.788,7,2.596,8,3.08,9,2.596]],["t/10",[10,3.692,11,3.112,12,3.342]],["t/12",[7,3.112,13,3.692,14,3.692]],["t/14",[15,4.606,16,4.606]],["t/16",[17,5.162]],["t/18",[18,6.124]],["t/22",[19,6.124]],["t/24",[20,6.124]],["t/26",[21,6.124]],["t/28",[22,6.124]],["t/30",[23,6.124]],["t/32",[24,6.124]],["t/34",[25,6.124]],["t/36",[26,6.124]],["t/38",[27,6.124]],["t/40",[28,6.124]],["t/42",[29,6.124]],["t/44",[30,6.124]],["t/46",[31,6.124]],["t/48",[32,6.124]],["t/50",[33,6.124]],["t/52",[34,6.124]],["t/54",[35,6.124]],["t/56",[36,6.124]],["t/58",[37,6.124]],["t/60",[38,6.124]],["t/62",[39,6.124]],["t/64",[40,6.124]],["t/66",[41,6.124]],["t/68",[42,6.124]],["t/70",[43,6.124]],["t/72",[44,6.124]],["t/74",[45,6.124]],["t/76",[46,6.124]],["t/78",[47,6.124]],["t/80",[48,6.124]],["t/82",[49,6.124]],["t/84",[50,6.124]],["t/86",[51,6.124]],["t/88",[52,6.124]],["t/90",[53,6.124]],["t/92",[54,6.124]],["t/96",[55,3.883,56,4.606]],["t/100",[55,3.112,57,3.692,58,3.692]],["t/102",[9,3.883,59,4.606]],["t/104",[60,6.124]],["t/105",[61,6.124]],["t/107",[62,4.606,63,4.606]],["t/109",[64,6.124]],["t/111",[65,6.124]],["t/113",[2,2.803,55,3.112,66,3.692]],["t/115",[67,4.606,68,4.606]],["t/117",[69,4.606,70,4.606]],["t/119",[71,6.124]],["t/121",[72,6.124]],["t/125",[73,3.883,74,3.883]],["t/127",[75,5.544]],["t/129",[76,6.124]],["t/135",[77,3.669,78,3.883]],["t/136",[79,4.606,80,3.883]],["t/138",[80,3.883,81,4.17]],["t/140",[80,3.883,82,4.17]],["t/142",[78,3.883,83,4.606]],["t/144",[3,3.883,84,4.606]],["t/146",[85,4.606,86,3.669]],["t/148",[87,4.606,88,4.606]],["t/150",[89,4.606,90,4.606]],["t/152",[3,3.112,91,2.94,92,3.112]],["t/154",[91,2.94,92,3.112,93,3.342]],["t/156",[91,2.94,92,3.112,94,3.692]],["t/158",[95,4.606,96,4.606]],["t/160",[81,4.17,97,4.606]],["t/162",[98,4.606,99,4.606]],["t/164",[2,2.803,11,3.112,17,3.112]],["t/166",[77,2.94,100,3.692,101,3.692]],["t/168",[77,2.94,102,3.692,103,3.692]],["t/172",[86,3.669,104,4.606]],["t/174",[105,2.591,106,2.591,107,2.689]],["t/180",[108,4.606,109,4.17]],["t/182",[110,6.124]],["t/184",[109,4.17,111,4.17]],["t/186",[105,2.591,106,2.591,107,2.689]],["t/190",[2,3.497,77,3.669]],["t/196",[105,2.591,106,2.591,107,2.689]],["t/200",[112,6.124]],["t/204",[113,4.606,114,4.17]],["t/206",[114,4.17,115,4.17]],["t/208",[75,3.342,93,3.342,116,3.692]],["t/210",[117,4.606,118,4.606]],["t/218",[86,3.669,119,4.606]],["t/220",[12,5.544]],["t/224",[120,4.606,121,4.606]],["t/226",[9,3.883,122,4.606]],["t/232",[123,3.883,124,4.606]],["t/234",[73,3.883,125,4.606]],["t/236",[126,4.17,127,3.126]],["t/238",[128,3.669,129,4.17]],["t/240",[128,3.669,130,3.883]],["t/242",[131,6.124]],["t/244",[130,3.883,132,4.606]],["t/246",[82,4.17,133,4.606]],["t/248",[134,4.606,135,4.606]],["t/250",[127,3.126,136,4.606]],["t/252",[105,2.591,106,2.591,107,2.689]],["t/255",[137,4.606,138,4.606]],["t/257",[74,3.883,123,3.883]],["t/265",[7,5.162]],["t/269",[139,3.08,140,3.08,141,3.08,142,3.08]],["t/273",[129,4.17,143,4.17]],["t/275",[144,4.606,145,4.606]],["t/277",[130,3.883,143,4.17]],["t/279",[105,2.591,106,2.591,107,2.689]],["t/283",[146,6.124]],["t/287",[105,2.591,106,2.591,107,2.689]],["t/291",[78,3.883,105,3.233]],["t/294",[127,3.126,147,4.606]],["t/296",[127,3.126,148,4.606]],["t/298",[127,3.126,149,4.606]],["t/300",[127,3.126,150,4.606]],["t/302",[127,3.126,151,4.606]],["t/304",[127,3.126,152,4.606]],["t/306",[86,3.669,153,4.606]],["t/308",[74,3.883,123,3.883]],["t/310",[73,3.883,111,4.17]],["t/314",[154,6.124]],["t/318",[126,4.17,155,4.17]],["t/320",[156,6.124]],["t/322",[2,2.338,11,2.596,17,2.596,157,3.08]],["t/324",[106,3.233,155,4.17]],["t/326",[115,3.342,158,3.342,159,3.342]],["t/346",[160,4.17,161,4.606]],["t/348",[160,4.17,162,4.606]],["t/350",[163,4.606,164,4.606]],["t/354",[165,6.124]],["t/356",[166,6.124]],["t/360",[167,6.124]],["t/362",[168,6.124]],["t/366",[169,6.124]],["t/368",[170,6.124]],["t/370",[171,6.124]],["t/372",[172,6.124]],["t/376",[173,6.124]],["t/378",[174,4.606,175,4.17]],["t/380",[176,6.124]],["t/382",[177,6.124]],["t/384",[178,4.606,179,4.17]],["t/386",[180,4.606,181,4.17]],["t/388",[182,4.606,183,4.17]],["t/390",[184,6.124]],["t/392",[185,5.544]],["t/394",[186,4.606,187,4.606]],["t/396",[188,4.606,189,4.606]],["t/398",[190,6.124]],["t/402",[191,6.124]],["t/404",[192,6.124]],["t/408",[193,6.124]],["t/410",[194,6.124]],["t/412",[195,6.124]],["t/414",[196,6.124]],["t/416",[197,6.124]],["t/418",[198,6.124]],["t/420",[199,6.124]],["t/422",[200,6.124]],["t/424",[201,6.124]],["t/426",[202,6.124]],["t/428",[203,6.124]],["t/430",[204,6.124]],["t/432",[205,6.124]],["t/434",[206,6.124]],["t/436",[207,6.124]],["t/440",[208,6.124]],["t/442",[209,6.124]],["t/444",[210,6.124]],["t/446",[211,6.124]],["t/448",[158,4.17,159,4.17]],["t/450",[212,6.124]],["t/452",[213,6.124]],["t/454",[214,6.124]],["t/456",[215,6.124]],["t/458",[216,6.124]],["t/462",[217,6.124]],["t/464",[218,6.124]],["t/466",[219,6.124]],["t/472",[220,6.124]],["t/474",[221,6.124]],["t/478",[222,6.124]],["t/480",[223,6.124]],["t/482",[224,6.124]],["t/484",[225,6.124]],["t/486",[226,6.124]],["t/488",[227,6.124]],["t/490",[228,6.124]],["t/492",[229,5.544]],["t/494",[230,6.124]],["t/496",[229,5.544]],["t/498",[231,6.124]],["t/500",[232,6.124]],["t/502",[233,6.124]],["t/504",[234,6.124]],["t/506",[235,6.124]],["t/508",[236,6.124]],["t/512",[237,5.544]],["t/514",[238,6.124]],["t/516",[239,6.124]],["t/518",[240,6.124]],["t/520",[241,6.124]],["t/522",[242,6.124]],["t/526",[243,6.124]],["t/528",[244,6.124]],["t/530",[245,6.124]],["t/534",[246,6.124]],["t/536",[247,3.08,248,3.08,249,3.08,250,3.08]],["t/538",[251,6.124]],["t/542",[91,2.453,252,2.596,253,2.788,254,2.788]],["t/543",[255,6.124]],["t/545",[256,6.124]],["t/547",[257,6.124]],["t/549",[258,6.124]],["t/551",[259,6.124]],["t/553",[260,6.124]],["t/555",[261,6.124]],["t/557",[262,6.124]],["t/559",[263,6.124]],["t/561",[264,6.124]],["t/563",[265,6.124]],["t/565",[266,6.124]],["t/567",[267,6.124]],["t/569",[268,6.124]],["t/571",[269,6.124]],["t/573",[270,6.124]],["t/575",[271,6.124]],["t/577",[252,3.112,253,3.342,254,3.342]],["t/578",[272,6.124]],["t/580",[273,6.124]],["t/582",[274,6.124]],["t/584",[275,6.124]],["t/586",[252,3.883,276,4.606]],["t/587",[277,6.124]],["t/589",[278,4.123,279,3.08,280,3.08]],["t/591",[281,4.877]],["t/593",[282,4.877]],["t/595",[278,3.883,283,4.606]],["t/597",[281,4.877]],["t/599",[282,4.877]],["t/601",[278,3.883,284,4.606]],["t/603",[281,4.877]],["t/605",[282,4.877]],["t/607",[285,6.124]],["t/608",[286,6.124]],["t/610",[281,4.877]],["t/612",[282,4.877]],["t/614",[287,6.124]],["t/616",[288,6.124]],["t/620",[289,6.124]],["t/622",[290,6.124]],["t/624",[291,6.124]],["t/626",[292,6.124]],["t/628",[293,6.124]],["t/630",[294,6.124]],["t/632",[295,6.124]],["t/634",[296,6.124]],["t/636",[297,6.124]],["t/638",[298,6.124]],["t/640",[299,6.124]],["t/642",[300,6.124]],["t/644",[301,6.124]],["t/646",[302,6.124]],["t/648",[303,6.124]],["t/650",[304,6.124]],["t/652",[305,6.124]],["t/654",[306,6.124]],["t/656",[307,6.124]],["t/658",[308,6.124]],["t/660",[309,6.124]],["t/662",[310,6.124]],["t/666",[311,6.124]],["t/668",[312,6.124]],["t/670",[313,6.124]],["t/674",[314,6.124]],["t/676",[315,6.124]],["t/678",[316,6.124]],["t/680",[128,3.669,317,4.606]],["t/682",[318,6.124]],["t/684",[319,6.124]],["t/686",[320,6.124]],["t/688",[321,6.124]],["t/690",[322,6.124]],["t/692",[128,3.669,323,4.606]],["t/694",[324,6.124]],["t/696",[325,6.124]],["t/700",[326,6.124]],["t/702",[327,6.124]],["t/706",[237,5.544]],["t/708",[175,5.544]],["t/710",[179,2.788,181,2.788,183,2.788,185,2.788]],["t/712",[328,6.124]],["t/714",[329,4.606,330,4.606]],["t/716",[331,6.124]],["t/718",[332,6.124]],["t/720",[333,6.124]],["t/722",[334,6.124]],["t/724",[335,6.124]],["t/726",[336,4.606,337,4.606]],["t/728",[338,6.124]],["t/730",[339,6.124]],["t/732",[340,6.124]],["t/736",[341,5.544]],["t/738",[341,5.544]],["t/740",[342,6.124]],["t/742",[343,6.124]],["t/744",[344,6.124]],["t/746",[345,6.124]],["t/748",[346,6.124]],["t/750",[347,6.124]],["t/752",[348,5.544]],["t/754",[348,5.544]],["t/756",[349,5.544]],["t/758",[349,5.544]],["t/760",[350,6.124]],["t/762",[351,5.544]],["t/764",[351,5.544]],["t/766",[352,5.544]],["t/768",[352,5.544]],["t/770",[353,6.124]],["t/772",[354,6.124]],["t/774",[355,6.124]],["t/776",[356,6.124]]],"invertedIndex":[["0.1.0",{"_index":54,"t":{"92":{"position":[[0,5]]}}}],["0.2.0",{"_index":53,"t":{"90":{"position":[[0,5]]}}}],["0.2.1",{"_index":52,"t":{"88":{"position":[[0,5]]}}}],["0.2.2",{"_index":51,"t":{"86":{"position":[[0,5]]}}}],["0.3.0",{"_index":50,"t":{"84":{"position":[[0,5]]}}}],["0.3.1",{"_index":49,"t":{"82":{"position":[[0,5]]}}}],["0.3.2",{"_index":48,"t":{"80":{"position":[[0,5]]}}}],["0.4.0",{"_index":47,"t":{"78":{"position":[[0,5]]}}}],["0.4.1",{"_index":46,"t":{"76":{"position":[[0,5]]}}}],["0.4.2",{"_index":45,"t":{"74":{"position":[[0,5]]}}}],["0.4.3",{"_index":44,"t":{"72":{"position":[[0,5]]}}}],["0.4.4",{"_index":43,"t":{"70":{"position":[[0,5]]}}}],["0.4.5",{"_index":42,"t":{"68":{"position":[[0,5]]}}}],["0.5.0",{"_index":41,"t":{"66":{"position":[[0,5]]}}}],["0.5.1",{"_index":40,"t":{"64":{"position":[[0,5]]}}}],["0.5.2",{"_index":39,"t":{"62":{"position":[[0,5]]}}}],["0.5.3",{"_index":38,"t":{"60":{"position":[[0,5]]}}}],["0.5.4",{"_index":37,"t":{"58":{"position":[[0,5]]}}}],["0.6.0",{"_index":36,"t":{"56":{"position":[[0,5]]}}}],["0.6.1",{"_index":35,"t":{"54":{"position":[[0,5]]}}}],["0.6.2",{"_index":34,"t":{"52":{"position":[[0,5]]}}}],["0.6.3",{"_index":33,"t":{"50":{"position":[[0,5]]}}}],["0.7.0",{"_index":32,"t":{"48":{"position":[[0,5]]}}}],["0.7.1",{"_index":31,"t":{"46":{"position":[[0,5]]}}}],["0.7.2",{"_index":30,"t":{"44":{"position":[[0,5]]}}}],["0.7.3",{"_index":29,"t":{"42":{"position":[[0,5]]}}}],["0.7.4",{"_index":28,"t":{"40":{"position":[[0,5]]}}}],["0.8.0",{"_index":27,"t":{"38":{"position":[[0,5]]}}}],["0.8.1",{"_index":26,"t":{"36":{"position":[[0,5]]}}}],["0.8.2",{"_index":25,"t":{"34":{"position":[[0,5]]}}}],["0.9.0",{"_index":24,"t":{"32":{"position":[[0,5]]}}}],["0.9.1",{"_index":23,"t":{"30":{"position":[[0,5]]}}}],["0.9.2",{"_index":22,"t":{"28":{"position":[[0,5]]}}}],["0.9.3",{"_index":21,"t":{"26":{"position":[[0,5]]}}}],["0.9.4",{"_index":20,"t":{"24":{"position":[[0,5]]}}}],["0.9.5",{"_index":19,"t":{"22":{"position":[[0,5]]}}}],["1",{"_index":161,"t":{"346":{"position":[[8,1]]}}}],["2",{"_index":162,"t":{"348":{"position":[[8,1]]}}}],["__add",{"_index":179,"t":{"384":{"position":[[12,5]]},"710":{"position":[[0,6]]}}}],["__construct",{"_index":237,"t":{"512":{"position":[[0,11]]},"706":{"position":[[0,11]]}}}],["__div",{"_index":185,"t":{"392":{"position":[[0,5]]},"710":{"position":[[21,5]]}}}],["__eq",{"_index":328,"t":{"712":{"position":[[0,4]]}}}],["__len",{"_index":329,"t":{"714":{"position":[[0,6]]}}}],["__mod",{"_index":187,"t":{"394":{"position":[[12,5]]}}}],["__mul",{"_index":183,"t":{"388":{"position":[[12,5]]},"710":{"position":[[14,6]]}}}],["__pow",{"_index":189,"t":{"396":{"position":[[12,5]]}}}],["__sub",{"_index":181,"t":{"386":{"position":[[12,5]]},"710":{"position":[[7,6]]}}}],["__tostr",{"_index":175,"t":{"378":{"position":[[17,10]]},"708":{"position":[[0,10]]}}}],["_psoup",{"_index":209,"t":{"442":{"position":[[0,6]]}}}],["_pversion",{"_index":208,"t":{"440":{"position":[[0,9]]}}}],["ab",{"_index":335,"t":{"724":{"position":[[0,3]]}}}],["accept",{"_index":324,"t":{"694":{"position":[[0,6]]}}}],["access",{"_index":138,"t":{"255":{"position":[[11,6]]}}}],["add",{"_index":238,"t":{"514":{"position":[[0,3]]}}}],["addit",{"_index":153,"t":{"306":{"position":[[0,10]]}}}],["addloop",{"_index":239,"t":{"516":{"position":[[0,7]]}}}],["ae",{"_index":278,"t":{"589":{"position":[[0,3],[9,3]]},"595":{"position":[[0,3]]},"601":{"position":[[0,3]]}}}],["algorithm",{"_index":254,"t":{"542":{"position":[[26,10]]},"577":{"position":[[22,10]]}}}],["alias",{"_index":147,"t":{"294":{"position":[[9,7]]}}}],["alreadi",{"_index":141,"t":{"269":{"position":[[12,7]]}}}],["anonym",{"_index":111,"t":{"184":{"position":[[0,9]]},"310":{"position":[[0,9]]}}}],["ansi",{"_index":163,"t":{"350":{"position":[[0,4]]}}}],["apt",{"_index":62,"t":{"107":{"position":[[0,3]]}}}],["argument",{"_index":86,"t":{"146":{"position":[[10,9]]},"172":{"position":[[16,8]]},"218":{"position":[[7,9]]},"306":{"position":[[11,9]]}}}],["array",{"_index":113,"t":{"204":{"position":[[0,5]]}}}],["aspir",{"_index":56,"t":{"96":{"position":[[16,6]]}}}],["assert.equ",{"_index":199,"t":{"420":{"position":[[0,12]]}}}],["assert.falsi",{"_index":196,"t":{"414":{"position":[[0,12]]}}}],["assert.great",{"_index":203,"t":{"428":{"position":[[0,14]]}}}],["assert.greatereq",{"_index":204,"t":{"430":{"position":[[0,16]]}}}],["assert.haserror",{"_index":206,"t":{"434":{"position":[[0,15]]}}}],["assert.isfals",{"_index":195,"t":{"412":{"position":[[0,14]]}}}],["assert.isnil",{"_index":193,"t":{"408":{"position":[[0,12]]}}}],["assert.istru",{"_index":194,"t":{"410":{"position":[[0,13]]}}}],["assert.less",{"_index":201,"t":{"424":{"position":[[0,11]]}}}],["assert.lesseq",{"_index":202,"t":{"426":{"position":[[0,13]]}}}],["assert.nequ",{"_index":200,"t":{"422":{"position":[[0,13]]}}}],["assert.noerror",{"_index":205,"t":{"432":{"position":[[0,14]]}}}],["assert.notnil",{"_index":198,"t":{"418":{"position":[[0,13]]}}}],["assert.searcherror",{"_index":207,"t":{"436":{"position":[[0,18]]}}}],["assert.truthi",{"_index":197,"t":{"416":{"position":[[0,13]]}}}],["aur",{"_index":64,"t":{"109":{"position":[[0,3]]}}}],["bad",{"_index":87,"t":{"148":{"position":[[0,3]]}}}],["base32.decod",{"_index":166,"t":{"356":{"position":[[0,13]]}}}],["base32.encod",{"_index":165,"t":{"354":{"position":[[0,13]]}}}],["base64.decod",{"_index":170,"t":{"368":{"position":[[0,13]]}}}],["base64.encod",{"_index":169,"t":{"366":{"position":[[0,13]]}}}],["base64.urldecod",{"_index":172,"t":{"372":{"position":[[0,16]]}}}],["base64.urlencod",{"_index":171,"t":{"370":{"position":[[0,16]]}}}],["bigint.add",{"_index":178,"t":{"384":{"position":[[0,11]]}}}],["bigint.binari",{"_index":177,"t":{"382":{"position":[[0,13]]}}}],["bigint.bitlength",{"_index":190,"t":{"398":{"position":[[0,16]]}}}],["bigint.div",{"_index":184,"t":{"390":{"position":[[0,10]]}}}],["bigint.hex",{"_index":176,"t":{"380":{"position":[[0,10]]}}}],["bigint.mod",{"_index":186,"t":{"394":{"position":[[0,11]]}}}],["bigint.mul",{"_index":182,"t":{"388":{"position":[[0,11]]}}}],["bigint.new",{"_index":173,"t":{"376":{"position":[[0,10]]}}}],["bigint.pow",{"_index":188,"t":{"396":{"position":[[0,11]]}}}],["bigint.sub",{"_index":180,"t":{"386":{"position":[[0,11]]}}}],["bigint.tostr",{"_index":174,"t":{"378":{"position":[[0,16]]}}}],["binari",{"_index":9,"t":{"8":{"position":[[19,6]]},"102":{"position":[[9,8]]},"226":{"position":[[0,6]]}}}],["block",{"_index":145,"t":{"275":{"position":[[5,6]]}}}],["bytecod",{"_index":94,"t":{"156":{"position":[[13,8]]}}}],["call",{"_index":74,"t":{"125":{"position":[[9,5]]},"257":{"position":[[11,5]]},"308":{"position":[[8,5]]}}}],["case",{"_index":144,"t":{"275":{"position":[[0,4]]}}}],["cat.decod",{"_index":168,"t":{"362":{"position":[[0,10]]}}}],["cat.encod",{"_index":167,"t":{"360":{"position":[[0,10]]}}}],["cbc",{"_index":279,"t":{"589":{"position":[[4,4]]}}}],["cfb",{"_index":280,"t":{"589":{"position":[[13,3]]}}}],["chang",{"_index":100,"t":{"166":{"position":[[0,8]]}}}],["chocolatey",{"_index":61,"t":{"105":{"position":[[0,10]]}}}],["class",{"_index":128,"t":{"238":{"position":[[0,5]]},"240":{"position":[[0,5]]},"680":{"position":[[7,5]]},"692":{"position":[[9,5]]}}}],["coalesc",{"_index":149,"t":{"298":{"position":[[0,10]]}}}],["code",{"_index":3,"t":{"4":{"position":[[9,4]]},"144":{"position":[[12,4]]},"152":{"position":[[13,4]]}}}],["color",{"_index":164,"t":{"350":{"position":[[5,8]]}}}],["comparevers",{"_index":215,"t":{"456":{"position":[[0,15]]}}}],["compat",{"_index":106,"t":{"174":{"position":[[6,13]]},"186":{"position":[[6,13]]},"196":{"position":[[6,13]]},"252":{"position":[[6,13]]},"279":{"position":[[6,13]]},"287":{"position":[[6,13]]},"324":{"position":[[0,10]]}}}],["compil",{"_index":2,"t":{"4":{"position":[[0,8]]},"113":{"position":[[0,7]]},"164":{"position":[[0,7]]},"190":{"position":[[0,8]]},"322":{"position":[[0,7]]}}}],["compound",{"_index":148,"t":{"296":{"position":[[0,8]]}}}],["condit",{"_index":76,"t":{"129":{"position":[[0,12]]}}}],["configur",{"_index":17,"t":{"16":{"position":[[0,13]]},"164":{"position":[[13,13]]},"322":{"position":[[13,13]]}}}],["constructor",{"_index":134,"t":{"248":{"position":[[0,11]]}}}],["content",{"_index":0,"t":{"3":{"position":[[0,7]]}}}],["continue'",{"_index":104,"t":{"172":{"position":[[0,10]]}}}],["coroutine.sleep",{"_index":192,"t":{"404":{"position":[[0,15]]}}}],["coroutine.xresum",{"_index":191,"t":{"402":{"position":[[0,17]]}}}],["cosmet",{"_index":120,"t":{"224":{"position":[[0,8]]}}}],["creation",{"_index":124,"t":{"232":{"position":[[7,8]]}}}],["crypto.adler32",{"_index":263,"t":{"559":{"position":[[0,14]]}}}],["crypto.crc32",{"_index":262,"t":{"557":{"position":[[0,12]]}}}],["crypto.decrypt",{"_index":282,"t":{"593":{"position":[[0,14]]},"599":{"position":[[0,14]]},"605":{"position":[[0,14]]},"612":{"position":[[0,14]]}}}],["crypto.djb2",{"_index":257,"t":{"547":{"position":[[0,11]]}}}],["crypto.encrypt",{"_index":281,"t":{"591":{"position":[[0,14]]},"597":{"position":[[0,14]]},"603":{"position":[[0,14]]},"610":{"position":[[0,14]]}}}],["crypto.fnv1",{"_index":258,"t":{"549":{"position":[[0,11]]}}}],["crypto.fnv1a",{"_index":259,"t":{"551":{"position":[[0,12]]}}}],["crypto.generatekeypair",{"_index":286,"t":{"608":{"position":[[0,22]]}}}],["crypto.joaat",{"_index":260,"t":{"553":{"position":[[0,12]]}}}],["crypto.lookup3",{"_index":264,"t":{"561":{"position":[[0,14]]}}}],["crypto.lua",{"_index":255,"t":{"543":{"position":[[0,10]]}}}],["crypto.md5",{"_index":256,"t":{"545":{"position":[[0,10]]}}}],["crypto.murmur1",{"_index":266,"t":{"565":{"position":[[0,14]]}}}],["crypto.murmur2",{"_index":267,"t":{"567":{"position":[[0,14]]}}}],["crypto.murmur2a",{"_index":268,"t":{"569":{"position":[[0,15]]}}}],["crypto.murmur2neutr",{"_index":271,"t":{"575":{"position":[[0,21]]}}}],["crypto.murmur64a",{"_index":269,"t":{"571":{"position":[[0,16]]}}}],["crypto.murmur64b",{"_index":270,"t":{"573":{"position":[[0,16]]}}}],["crypto.random",{"_index":277,"t":{"587":{"position":[[0,13]]}}}],["crypto.sdbm",{"_index":261,"t":{"555":{"position":[[0,11]]}}}],["crypto.sha1",{"_index":272,"t":{"578":{"position":[[0,11]]}}}],["crypto.sha256",{"_index":273,"t":{"580":{"position":[[0,13]]}}}],["crypto.sha384",{"_index":274,"t":{"582":{"position":[[0,13]]}}}],["crypto.sha512",{"_index":275,"t":{"584":{"position":[[0,13]]}}}],["crypto.sign",{"_index":287,"t":{"614":{"position":[[0,11]]}}}],["crypto.times33",{"_index":265,"t":{"563":{"position":[[0,14]]}}}],["crypto.verifi",{"_index":288,"t":{"616":{"position":[[0,13]]}}}],["cryptograph",{"_index":252,"t":{"542":{"position":[[4,13]]},"577":{"position":[[0,13]]},"586":{"position":[[0,13]]}}}],["custom",{"_index":4,"t":{"6":{"position":[[0,6]]}}}],["default",{"_index":158,"t":{"326":{"position":[[0,7]]},"448":{"position":[[0,7]]}}}],["destructur",{"_index":114,"t":{"204":{"position":[[6,13]]},"206":{"position":[[6,13]]}}}],["differ",{"_index":116,"t":{"208":{"position":[[0,9]]}}}],["disabl",{"_index":102,"t":{"168":{"position":[[0,7]]}}}],["discard",{"_index":98,"t":{"162":{"position":[[0,9]]}}}],["doesn't",{"_index":139,"t":{"269":{"position":[[0,7]]}}}],["dot",{"_index":334,"t":{"722":{"position":[[0,3]]}}}],["dump",{"_index":16,"t":{"14":{"position":[[3,7]]}}}],["dumpvar",{"_index":212,"t":{"450":{"position":[[0,7]]}}}],["ecb",{"_index":283,"t":{"595":{"position":[[4,3]]}}}],["enum",{"_index":109,"t":{"180":{"position":[[7,5]]},"184":{"position":[[10,5]]}}}],["errorfunc",{"_index":242,"t":{"522":{"position":[[0,9]]}}}],["exampl",{"_index":160,"t":{"346":{"position":[[0,7]]},"348":{"position":[[0,7]]}}}],["excess",{"_index":85,"t":{"146":{"position":[[0,9]]}}}],["execut",{"_index":10,"t":{"10":{"position":[[0,9]]}}}],["exportvar",{"_index":213,"t":{"452":{"position":[[0,9]]}}}],["express",{"_index":130,"t":{"240":{"position":[[6,10]]},"244":{"position":[[7,10]]},"277":{"position":[[7,10]]}}}],["extend",{"_index":131,"t":{"242":{"position":[[0,7]]}}}],["fallthrough",{"_index":96,"t":{"158":{"position":[[12,11]]}}}],["field",{"_index":82,"t":{"140":{"position":[[0,5]]},"246":{"position":[[8,6]]}}}],["filter",{"_index":6,"t":{"6":{"position":[[14,7]]}}}],["function",{"_index":73,"t":{"125":{"position":[[0,8]]},"234":{"position":[[7,9]]},"310":{"position":[[10,9]]}}}],["gcm",{"_index":284,"t":{"601":{"position":[[4,3]]}}}],["global",{"_index":81,"t":{"138":{"position":[[0,6]]},"160":{"position":[[9,6]]}}}],["hasconnect",{"_index":325,"t":{"696":{"position":[[0,13]]}}}],["hash",{"_index":253,"t":{"542":{"position":[[18,7]]},"577":{"position":[[14,7]]}}}],["http.closeconnect",{"_index":219,"t":{"466":{"position":[[0,21]]}}}],["http.hasconnect",{"_index":218,"t":{"464":{"position":[[0,18]]}}}],["http.request",{"_index":217,"t":{"462":{"position":[[0,12]]}}}],["implicit",{"_index":97,"t":{"160":{"position":[[0,8]]}}}],["infinit",{"_index":13,"t":{"12":{"position":[[0,8]]}}}],["instal",{"_index":146,"t":{"283":{"position":[[0,12]]}}}],["instanceof",{"_index":136,"t":{"250":{"position":[[0,10]]}}}],["integ",{"_index":122,"t":{"226":{"position":[[7,8]]}}}],["io.absolut",{"_index":231,"t":{"498":{"position":[[0,11]]}}}],["io.cont",{"_index":233,"t":{"502":{"position":[[0,11]]}}}],["io.copi",{"_index":224,"t":{"482":{"position":[[0,7]]}}}],["io.currentdir",{"_index":236,"t":{"508":{"position":[[0,13]]}}}],["io.exist",{"_index":228,"t":{"490":{"position":[[0,9]]}}}],["io.files",{"_index":234,"t":{"504":{"position":[[0,11]]}}}],["io.isdir",{"_index":226,"t":{"486":{"position":[[0,8]]}}}],["io.isfil",{"_index":227,"t":{"488":{"position":[[0,9]]}}}],["io.listdir",{"_index":230,"t":{"494":{"position":[[0,10]]}}}],["io.makedir",{"_index":229,"t":{"492":{"position":[[0,10]]},"496":{"position":[[0,11]]}}}],["io.part",{"_index":225,"t":{"484":{"position":[[0,7]]}}}],["io.rel",{"_index":232,"t":{"500":{"position":[[0,11]]}}}],["io.remov",{"_index":223,"t":{"480":{"position":[[0,9]]}}}],["io.renam",{"_index":222,"t":{"478":{"position":[[0,9]]}}}],["io.writetim",{"_index":235,"t":{"506":{"position":[[0,12]]}}}],["json.decod",{"_index":221,"t":{"474":{"position":[[0,11]]}}}],["json.encod",{"_index":220,"t":{"472":{"position":[[0,11]]}}}],["keyword",{"_index":155,"t":{"318":{"position":[[4,8]]},"324":{"position":[[11,8]]}}}],["librari",{"_index":118,"t":{"210":{"position":[[9,7]]}}}],["limit",{"_index":12,"t":{"10":{"position":[[15,5]]},"220":{"position":[[0,11]]}}}],["line",{"_index":103,"t":{"168":{"position":[[20,4]]}}}],["listen",{"_index":323,"t":{"692":{"position":[[0,8]]}}}],["load",{"_index":8,"t":{"8":{"position":[[8,7]]}}}],["look",{"_index":18,"t":{"18":{"position":[[8,5]]}}}],["lookat",{"_index":339,"t":{"730":{"position":[[0,6]]}}}],["loop",{"_index":14,"t":{"12":{"position":[[9,4]]}}}],["lua",{"_index":140,"t":{"269":{"position":[[8,3]]}}}],["magnitud",{"_index":330,"t":{"714":{"position":[[7,9]]}}}],["make",{"_index":71,"t":{"119":{"position":[[0,4]]}}}],["math.atan2",{"_index":245,"t":{"530":{"position":[[0,10]]}}}],["math.isnan",{"_index":243,"t":{"526":{"position":[[0,10]]}}}],["math.round",{"_index":244,"t":{"528":{"position":[[0,10]]}}}],["max",{"_index":333,"t":{"720":{"position":[[0,3]]}}}],["member",{"_index":137,"t":{"255":{"position":[[4,6]]}}}],["metat",{"_index":159,"t":{"326":{"position":[[14,9]]},"448":{"position":[[8,10]]}}}],["method",{"_index":123,"t":{"232":{"position":[[0,6]]},"257":{"position":[[4,6]]},"308":{"position":[[0,7]]}}}],["min",{"_index":332,"t":{"718":{"position":[[0,3]]}}}],["mismatch",{"_index":83,"t":{"142":{"position":[[5,8]]}}}],["mitig",{"_index":156,"t":{"320":{"position":[[0,11]]}}}],["mix",{"_index":119,"t":{"218":{"position":[[0,6]]}}}],["mode",{"_index":107,"t":{"174":{"position":[[20,5]]},"186":{"position":[[20,5]]},"196":{"position":[[20,5]]},"252":{"position":[[20,5]]},"279":{"position":[[20,5]]},"287":{"position":[[20,5]]}}}],["moder",{"_index":1,"t":{"3":{"position":[[8,10]]}}}],["modul",{"_index":5,"t":{"6":{"position":[[7,6]]},"8":{"position":[[26,7]]}}}],["name",{"_index":93,"t":{"154":{"position":[[13,4]]},"208":{"position":[[19,4]]}}}],["new",{"_index":126,"t":{"236":{"position":[[0,3]]},"318":{"position":[[0,3]]}}}],["non",{"_index":91,"t":{"152":{"position":[[0,3]]},"154":{"position":[[0,3]]},"156":{"position":[[0,3]]},"542":{"position":[[0,3]]}}}],["normal",{"_index":336,"t":{"726":{"position":[[0,11]]}}}],["normalis",{"_index":337,"t":{"726":{"position":[[12,10]]}}}],["onlin",{"_index":58,"t":{"100":{"position":[[12,6]]}}}],["oper",{"_index":127,"t":{"236":{"position":[[4,8]]},"250":{"position":[[11,8]]},"294":{"position":[[0,8]]},"296":{"position":[[9,9]]},"298":{"position":[[11,8]]},"300":{"position":[[7,8]]},"302":{"position":[[10,8]]},"304":{"position":[[5,8]]}}}],["os.micro",{"_index":248,"t":{"536":{"position":[[10,10]]}}}],["os.milli",{"_index":249,"t":{"536":{"position":[[21,10]]}}}],["os.nano",{"_index":247,"t":{"536":{"position":[[0,9]]}}}],["os.platform",{"_index":210,"t":{"444":{"position":[[0,11]]}}}],["os.second",{"_index":250,"t":{"536":{"position":[[32,10]]}}}],["os.sleep",{"_index":246,"t":{"534":{"position":[[0,8]]}}}],["os.unixsecond",{"_index":251,"t":{"538":{"position":[[0,14]]}}}],["packag",{"_index":60,"t":{"104":{"position":[[0,8]]}}}],["package.path",{"_index":211,"t":{"446":{"position":[[0,12]]}}}],["parent",{"_index":132,"t":{"244":{"position":[[0,6]]}}}],["php",{"_index":67,"t":{"115":{"position":[[0,3]]}}}],["pipe",{"_index":152,"t":{"304":{"position":[[0,4]]}}}],["pluto",{"_index":55,"t":{"96":{"position":[[10,5]]},"100":{"position":[[6,5]]},"113":{"position":[[8,5]]}}}],["pluto_us",{"_index":157,"t":{"322":{"position":[[27,11]]}}}],["portabl",{"_index":92,"t":{"152":{"position":[[4,8]]},"154":{"position":[[4,8]]},"156":{"position":[[4,8]]}}}],["possibl",{"_index":89,"t":{"150":{"position":[[0,8]]}}}],["practic",{"_index":88,"t":{"148":{"position":[[4,8]]}}}],["prebuilt",{"_index":59,"t":{"102":{"position":[[0,8]]}}}],["prevent",{"_index":7,"t":{"8":{"position":[[0,7]]},"12":{"position":[[14,10]]},"265":{"position":[[15,8]]}}}],["privat",{"_index":133,"t":{"246":{"position":[[0,7]]}}}],["prng",{"_index":276,"t":{"586":{"position":[[14,5]]}}}],["promot",{"_index":135,"t":{"248":{"position":[[12,9]]}}}],["rang",{"_index":214,"t":{"454":{"position":[[0,5]]}}}],["reflect",{"_index":110,"t":{"182":{"position":[[0,10]]}}}],["repositori",{"_index":63,"t":{"107":{"position":[[4,10]]}}}],["return",{"_index":99,"t":{"162":{"position":[[10,6]]}}}],["rsa",{"_index":285,"t":{"607":{"position":[[0,3]]}}}],["rule",{"_index":112,"t":{"200":{"position":[[0,5]]}}}],["run",{"_index":240,"t":{"518":{"position":[[0,3]]}}}],["scope",{"_index":108,"t":{"180":{"position":[[0,6]]}}}],["script",{"_index":68,"t":{"115":{"position":[[4,7]]}}}],["shadow",{"_index":80,"t":{"136":{"position":[[4,6]]},"138":{"position":[[7,6]]},"140":{"position":[[6,6]]}}}],["socket",{"_index":317,"t":{"680":{"position":[[0,6]]}}}],["socket.bind",{"_index":316,"t":{"678":{"position":[[0,11]]}}}],["socket.clos",{"_index":322,"t":{"690":{"position":[[0,12]]}}}],["socket.connect",{"_index":314,"t":{"674":{"position":[[0,14]]}}}],["socket.listen",{"_index":315,"t":{"676":{"position":[[0,13]]}}}],["socket.recv",{"_index":319,"t":{"684":{"position":[[0,11]]}}}],["socket.send",{"_index":318,"t":{"682":{"position":[[0,11]]}}}],["socket.starttl",{"_index":321,"t":{"688":{"position":[[0,15]]}}}],["socket.unrecv",{"_index":320,"t":{"686":{"position":[[0,13]]}}}],["spaceship",{"_index":151,"t":{"302":{"position":[[0,9]]}}}],["standard",{"_index":117,"t":{"210":{"position":[[0,8]]}}}],["state",{"_index":101,"t":{"166":{"position":[[17,6]]}}}],["statement",{"_index":129,"t":{"238":{"position":[[6,9]]},"273":{"position":[[7,9]]}}}],["static",{"_index":125,"t":{"234":{"position":[[0,6]]}}}],["string.casefold",{"_index":306,"t":{"654":{"position":[[0,15]]}}}],["string.contain",{"_index":305,"t":{"652":{"position":[[0,15]]}}}],["string.endswith",{"_index":309,"t":{"660":{"position":[[0,15]]}}}],["string.formatint",{"_index":307,"t":{"656":{"position":[[0,16]]}}}],["string.isalnum",{"_index":300,"t":{"642":{"position":[[0,14]]}}}],["string.isalpha",{"_index":298,"t":{"638":{"position":[[0,14]]}}}],["string.isascii",{"_index":296,"t":{"634":{"position":[[0,14]]}}}],["string.islow",{"_index":297,"t":{"636":{"position":[[0,14]]}}}],["string.isupp",{"_index":299,"t":{"640":{"position":[[0,14]]}}}],["string.iswhitespac",{"_index":301,"t":{"644":{"position":[[0,19]]}}}],["string.low",{"_index":290,"t":{"622":{"position":[[0,12]]}}}],["string.lstrip",{"_index":294,"t":{"630":{"position":[[0,13]]}}}],["string.partit",{"_index":308,"t":{"658":{"position":[[0,16]]}}}],["string.replac",{"_index":303,"t":{"648":{"position":[[0,14]]}}}],["string.rfind",{"_index":292,"t":{"626":{"position":[[0,12]]}}}],["string.rstrip",{"_index":295,"t":{"632":{"position":[[0,13]]}}}],["string.split",{"_index":291,"t":{"624":{"position":[[0,12]]}}}],["string.startswith",{"_index":310,"t":{"662":{"position":[[0,17]]}}}],["string.strip",{"_index":293,"t":{"628":{"position":[[0,12]]}}}],["string.trunc",{"_index":304,"t":{"650":{"position":[[0,15]]}}}],["string.uformat",{"_index":302,"t":{"646":{"position":[[0,14]]}}}],["string.upp",{"_index":289,"t":{"620":{"position":[[0,12]]}}}],["studio",{"_index":70,"t":{"117":{"position":[[7,6]]}}}],["sum",{"_index":331,"t":{"716":{"position":[[0,3]]}}}],["sun",{"_index":72,"t":{"121":{"position":[[0,3]]}}}],["switch",{"_index":143,"t":{"273":{"position":[[0,6]]},"277":{"position":[[0,6]]}}}],["tabl",{"_index":115,"t":{"206":{"position":[[0,5]]},"326":{"position":[[8,5]]}}}],["table.checkal",{"_index":356,"t":{"776":{"position":[[0,14]]}}}],["table.clear",{"_index":343,"t":{"742":{"position":[[0,11]]}}}],["table.contain",{"_index":346,"t":{"748":{"position":[[0,14]]}}}],["table.filt",{"_index":351,"t":{"762":{"position":[[0,12]]},"764":{"position":[[0,14]]}}}],["table.find",{"_index":347,"t":{"750":{"position":[[0,10]]}}}],["table.foreach",{"_index":350,"t":{"760":{"position":[[0,13]]}}}],["table.freez",{"_index":344,"t":{"744":{"position":[[0,12]]}}}],["table.isfrozen",{"_index":345,"t":{"746":{"position":[[0,14]]}}}],["table.map",{"_index":352,"t":{"766":{"position":[[0,9]]},"768":{"position":[[0,12]]}}}],["table.max",{"_index":355,"t":{"774":{"position":[[0,9]]}}}],["table.min",{"_index":354,"t":{"772":{"position":[[0,9]]}}}],["table.reduc",{"_index":353,"t":{"770":{"position":[[0,12]]}}}],["table.reord",{"_index":349,"t":{"756":{"position":[[0,13]]},"758":{"position":[[0,15]]}}}],["table.revers",{"_index":348,"t":{"752":{"position":[[0,13]]},"754":{"position":[[0,14]]}}}],["table.s",{"_index":342,"t":{"740":{"position":[[0,10]]}}}],["table.sort",{"_index":341,"t":{"736":{"position":[[0,10]]},"738":{"position":[[0,12]]}}}],["termux",{"_index":65,"t":{"111":{"position":[[0,6]]}}}],["ternari",{"_index":142,"t":{"269":{"position":[[25,10]]}}}],["time",{"_index":11,"t":{"10":{"position":[[10,4]]},"164":{"position":[[8,4]]},"322":{"position":[[8,4]]}}}],["todir",{"_index":340,"t":{"732":{"position":[[0,5]]}}}],["torot",{"_index":338,"t":{"728":{"position":[[0,5]]}}}],["type",{"_index":78,"t":{"135":{"position":[[8,5]]},"142":{"position":[[0,4]]},"291":{"position":[[5,5]]}}}],["typo",{"_index":90,"t":{"150":{"position":[[9,4]]}}}],["unannot",{"_index":95,"t":{"158":{"position":[[0,11]]}}}],["underscor",{"_index":121,"t":{"224":{"position":[[9,11]]}}}],["unreach",{"_index":84,"t":{"144":{"position":[[0,11]]}}}],["url.decod",{"_index":312,"t":{"668":{"position":[[0,10]]}}}],["url.encod",{"_index":311,"t":{"666":{"position":[[0,10]]}}}],["url.pars",{"_index":313,"t":{"670":{"position":[[0,9]]}}}],["us",{"_index":105,"t":{"174":{"position":[[0,5]]},"186":{"position":[[0,5]]},"196":{"position":[[0,5]]},"252":{"position":[[0,5]]},"279":{"position":[[0,5]]},"287":{"position":[[0,5]]},"291":{"position":[[17,4]]}}}],["var",{"_index":79,"t":{"136":{"position":[[0,3]]}}}],["variabl",{"_index":75,"t":{"127":{"position":[[0,9]]},"208":{"position":[[10,8]]}}}],["visual",{"_index":69,"t":{"117":{"position":[[0,6]]}}}],["vm",{"_index":15,"t":{"14":{"position":[[0,2]]}}}],["walru",{"_index":150,"t":{"300":{"position":[[0,6]]}}}],["warn",{"_index":77,"t":{"135":{"position":[[0,7]]},"166":{"position":[[9,7]]},"168":{"position":[[8,8]]},"190":{"position":[[9,8]]}}}],["wcall",{"_index":216,"t":{"458":{"position":[[0,5]]}}}],["work",{"_index":154,"t":{"314":{"position":[[12,5]]}}}],["write",{"_index":57,"t":{"100":{"position":[[0,5]]}}}],["xml.decod",{"_index":327,"t":{"702":{"position":[[0,10]]}}}],["xml.encod",{"_index":326,"t":{"700":{"position":[[0,10]]}}}],["yieldfunc",{"_index":241,"t":{"520":{"position":[[0,9]]}}}],["yourself",{"_index":66,"t":{"113":{"position":[[14,8]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":2,"t":"The luaconf.h in Pluto provides various battle-tested mechanisms for locking down your Pluto environments. In this article, we've documented some of those. If you are an integrator who needs help configuring any of this, or who wants us to implement another mechanism, feel free to contact us on GitHub.","s":"For Integrators","u":"/docs/For Integrators","h":"","p":1},{"i":5,"t":"You can disable execution of compiled bytecode by defining PLUTO_DISABLE_COMPILED in luaconf.h or your build config.","s":"Compiled Code","u":"/docs/For Integrators","h":"#compiled-code","p":1},{"i":7,"t":"You may already have filters before passing scripts to run onto Pluto, but mechanisms such as dofile and require may be used to bypass them. To help you combat this, Pluto provides PLUTO_LOADFILE_HOOK. For example, if you set it to ContmodOnLoadfile in luaconf.h or your build config, you only need to define that function somewhere in your code, like this: cpp extern \"C\" bool ContmodOnLoadfile(const char* filename) { return !isCodeProhibited(soup::string::fromFile(filename)); } Copy This requires you to use Pluto as a static library, as otherwise this linking relationship won't work.","s":"Custom Module Filters","u":"/docs/For Integrators","h":"#custom-module-filters","p":1},{"i":9,"t":"The PLUTO_NO_BINARIES macro can be defined to totally eliminate package.loadlib and any DLL/SO loading capability from the require function. This is helpful because package.loadlib can be used to bypass sandbox restrictions by manually loading symbols from a Lua/Pluto library, and the require function can load any Lua/Pluto C Module which may or may not provide dangerous functions. This is generally vital for any sandbox. This mechanism cannot be bypassed, since it configures Pluto to compile without support for any of the aforementioned features.","s":"Prevent Loading of Binary Modules","u":"/docs/For Integrators","h":"#prevent-loading-of-binary-modules","p":1},{"i":11,"t":"To aid environments that have to be sandboxed, Pluto provides Execution Time Limit (ETL), which can be enabled by defining PLUTO_ETL_ENABLE in luaconf.h or your build config. By default, ETL allows code to run for a total of 1 ms (1.000.000 nanos). This can be changed by overwriting PLUTO_ETL_NANOS. Note that this is a hammer solution. If you only want to prevent stupid mistakes, Infinite Loop Prevention is a far better tool.","s":"Execution Time Limit","u":"/docs/For Integrators","h":"#execution-time-limit","p":1},{"i":13,"t":"Pluto can detect infinite loops by preventing too many successive iterations. This was implemented because game threads usually force users to call some sort of yield mechanism to return control to the game thread. In Pluto, you specify a hard bottleneck on iterations, then you specify a function pointer which should prevent ILP within the loop it's called in. This will produce an error due to ILP: pluto while true do end Copy This will not, with correct configuration: pluto while true do yield() end Copy If your scheduling system calls coroutine.yield at least once per tick, configuring the ILP mechanism can be as simple as defining PLUTO_ILP_ENABLE. In any case, Pluto's configuration file (luaconf.h) is worth a look at, especially to properly configure this feature. info This is a very simple mechanic. It has no performance overhead & it's lightweight. However, the compromise for this was coverage. This will reliably prevent most user error, however malicious users can find a way to block a thread still. For example, any forward jump will prevent the mechanism from breaking a loop. This can be exploited, so don't rely on this for security.","s":"Infinite Loop Prevention","u":"/docs/For Integrators","h":"#infinite-loop-prevention","p":1},{"i":15,"t":"Pluto offers an optional, configurable feature to see every instruction that is executed in the Lua VM.","s":"VM Dumping","u":"/docs/For Integrators","h":"#vm-dumping","p":1},{"i":17,"t":"VM Dump can be enabled by defining PLUTO_VMDUMP in luaconf.h or your build config. To reduce noise, you can modify PLUTO_VMDUMP_COND to set a custom condition for when VM Dump is active. By default, the condition is true. Although not a configuration specific to VM Dump, it should be noted that you can modify the output macros lua_writestring and lua_writeline.","s":"Configuration","u":"/docs/For Integrators","h":"#configuration","p":1},{"i":19,"t":"Given the following code: pluto local value = 3 switch value do case 1: case 2: case 3: case 4: case 5: print(\"Got 1-5.\") break default: print(\"Value is greater than 5.\") end -- Break jumps here. Copy It will output: VARARGPREP 0 ; prepare for 0 varargs LOADI 0 3 ; push 3 MOVE 1 0 ; move 3 into R(A) EQI 1 1 0 ; 3 == 1 EQI 1 2 1 ; 3 == 2 EQI 1 3 1 ; 3 == 3 GETTABUP 2 0 0 ; push T['print'] for function-0x247d2882520 (T=table-0x247d29ec9c8) LOADK 3 1 ; push \"Got 1-5.\" Got 1-5. CALL 2 2 1 ; call cfunc (nresults=0 nparams=0) JMP 13 ; offset=13 newpc=0x247d29e90d8 RETURN 1 1 1 ; return 0 value(s) Copy This is great at deciphering obfuscated code which may be causing problems for your environment.","s":"What it looks like","u":"/docs/For Integrators","h":"#what-it-looks-like","p":1},{"i":21,"t":"This page contains the changelogs from all releases of Pluto.","s":"Changelog","u":"/docs/Changelog","h":"","p":20},{"i":23,"t":"Fixed io.contents not returning an empty string for empty files on Windows Fixed table.clear not resetting cached length Fixed http.request allowing header values to contain CR and LF (CVE-2024-45597) Fixed strings implicitly concatenating with each other Fixed incorrect formatting with some instances of VM dumping PHP build scripts now pass on additional arguments to the compiler From Lua: Fixed wrong code gen for indices with comparisons","s":"0.9.5","u":"/docs/Changelog","h":"#095","p":20},{"i":25,"t":"Improved field-shadow warning to say which field is shadowed Improved handing of parent keyword Improved error message for if then Fixed an 'else if' warning false-positive Fixed compile-time concat sometimes causing a parse error Fixed infinite loop with nested switch expressions when flow should go to default case Fixed exception when raising argument type mismatch warning when expected type is a function Fixed a compatibility issue with return case Standard library: Made string.replace binary-safe and faster CaT module now supports the optional value encoding feature","s":"0.9.4","u":"/docs/Changelog","h":"#094","p":20},{"i":27,"t":"Added a warning for '(' being used instead of '|' for pipe operator arguments Improved error reporting when an invalid parent is given to 'extends' Fixed extending a global class unexpectedly pushing _G Fixed incorrect results when using 'not' on result of null coalescing operator As a result of this fix, the null coalescing operator is now bytecode-compatible with Lua Fixed parsing ambiguities with ternary expressions in switch cases Standard library: Fixed json.encode(json.decode(..., json.withnull + json.withorder)) producing unexpected artifacts Fixed data corruption when json.decode is used on large data Fixed insufficient TLS peer verification in HTTP library and socket.starttls in non-WASM builds (CVE-2024-32973)","s":"0.9.3","u":"/docs/Changelog","h":"#093","p":20},{"i":29,"t":"This release fixes several regressions made in 0.9.1: Fixed failing to compile on aarch64 Fixed method calls no longer working in ternary expressions even with parentheses Fixed walrus operator no longer being usable within unary operator expressions Furthermore, it improves the walrus operator in regards to disallowing UB and clarifying related error messages.","s":"0.9.2","u":"/docs/Changelog","h":"#092","p":20},{"i":31,"t":"Improved try/catch Improved parsing of for-as loops Deprecated if expressions (if a then b else c) in favor of ternary expressions (a ? b : c) Fixed instances of : starting method call when it should delimit ternary expression Fixed unreachable-code triggering for non-constant values Fixed repeat + continue being able to read uninitialized variables Fixed break and continue possibly not closing upvalues Fixed continue not working as expected when passing through switch statement Fixed switch cases being able to read uninitialized variables Fixed inconsistent behavior with safe navigtion method calls and multiple return values Fixed walrus operator being able to cause UB or corrupt the stack Fixed pipe operator possibly generating incorrect code Huge thanks to @XmiliaH for reporting the majority of bugs fixed in this update and helping fix them.","s":"0.9.1","u":"/docs/Changelog","h":"#091","p":20},{"i":33,"t":"Added $define statement Added pipe operator (|>) Added compound XOR operator (~=) Added optional global keyword and 'implicit-global' warning Added @fallthrough annotation and 'unannotated-fallthrough' warning Added function attribute and 'discarded-return' warning Added 'field-shadow' warning Lambdas can now have full bodies by starting with 'do' (e.g. |a| -> do return a end) pluto_use can now also be used via @pluto_use in comments new operator now also supports static 'new' function Deprecated ** operator (use ^ instead) Deprecated let statement (use local instead) Deprecated const statement (use local with or $define instead) Deprecated attribute (replaced by $define statement) Re-added compile-time concat optimization Fixed switch cases being able to jump into the scope of a variable Fixed being able to set nil as a default argument Standard library: Added '*' library Added 'cat' library Added 'http' library Added 'socket' library Added 'xml' library Added 'bigint' class Added 'scheduler' class Added os.platform constant Added range function Added io.contents function Added io.relative function Added copying variants of existing functions (table.sorted, table.mapped, table.filtered, table.reversed, table.reordered) Added table.size function Added table.clear function Added table.reduce, table.min, & table.max functions Added table.find function Added table.checkall function Added coroutine.sleep function Added crypto.generatekeypair function Added crypto.encrypt & crypto.decrypt functions Added crypto.sign & crypto.verify functions Added crypto.sha1, crypto.sha384, & crypto.sha512 functions Added crypto.adler32 function Added url.parse function Added math.round function json.encode now supports __order for objects json.decode now has an optional flags parameter, they can be combined via binary OR json.withnull makes it decode JSON nulls as json.null instead of nil json.withorder makes it produce __order field for objects coroutines/threads now have a metatable by default base64.encode & base32.encode changed padding parameter's default value from false to true (base64.urlencode is unchanged) Fixed crypto.fnv1 & crypto.fnv1a producing incorrect hashes for non-ASCII strings CLI: Added '-c' flag to pluto & plutoc to enable compatibility mode For integrators: Added PLUTO_READ_FILE_HOOK & PLUTO_WRITE_FILE_HOOK Added PLUTO_HTTP_REQUEST_HOOK Removed PLUTO_USE_THROW as we now default to using C++ exceptions for Lua errors to avoid breaking RAII semantics. You can still specify LUA_USE_LONGJMP if you want long jumps.","s":"0.9.0","u":"/docs/Changelog","h":"#090","p":20},{"i":35,"t":"Added variable scoping warnings to switch statements to highlight code that will break in 0.9.0 Improved some error messages Fixed base32 & base64 functions not being binary-safe Removed compile-time concat optimization because it could produce incorrect results","s":"0.8.2","u":"/docs/Changelog","h":"#082","p":20},{"i":37,"t":"Added a specialized error message for local class = etc 'exportvar' now prefixes function bytecode with 'load' Improved code generation for switch blocks Improved \"possibly unwanted function call\" warning Fixed dumpvar & exportvar not handling recursion of sub-tables Fixed assert.equal & assert.nequal ignoring extra fields in value2 Fixed 'until' possibly using a variable from wrong scope due to 'continue' Fixed var-shadow warning for named vararg being raised on the wrong line For integrators: Added PLUTO_MEMORY_LIMIT Added PLUTO_NO_DEBUGLIB Added PLUTO_NO_COROLIB For a more comprehensive overview of the changes, take a look at the commit log.","s":"0.8.1","u":"/docs/Changelog","h":"#081","p":20},{"i":39,"t":"Added switch expressions Added shorthand fallthrough syntax for switch statement & expression, e.g. case 1, 2: ... Added try...catch statement Added spaceship operator (<=>) Added safe navigation for method calls: nilable_inst?:method(), inst:nilable_method?(), nilable_inst?:nilable_method?() Added optional 'const' keyword as shorthand for local ... [= ...], enabled with pluto_use const. Added pluto_use \"VERSION+\" Tables now have a metatable by default ({ __index = _G.table }). Added '!' as an alias for 'not' Added 'private' modifier for class fields Improved 'class' and 'extends' to support indexed names Improved 'instanceof' to be usable with more complex expressions export now works in all scopes, not just the main body Updated in operator on tables to check values instead of keys \\{ is now a valid escape sequence (for interpolated strings) Fixed to-be-closed variables not working in switch cases Fixed 'new' not working as expected if it was disabled by the environment and re-enabled by 'pluto_use' Fixed 'enum class' not incrementing enumerator values Fixed not being able to use expressions such as increment in enum without parentheses Added compile-time concat optimization Warnings: Added warning for local attributes used without '<' ... '>' Now propagating types for global variables so when their value is assigned to something, mismatches can be detected. Added optional global-shadow warning which is like var-shadow but for globals that are especially vulnerable to obscure shadowing bugs (to prevent excessive annoyance). These globals include: arg,string, and table. Integrators can change this via PLUTO_COMMON_GLOBAL_NAMES Global shadow warnings do not apply to localization optimization (i.e, local table = table) var-shadow has been improved to check more enclosing scopes Improved unreachable-code Fixed var-shadow warning for locals used in switch cases despite break Added optional non-portable-code, non-portable-bytecode, and non-portable-name warning types Warnings can now be promoted to errors, e.g. @pluto_warnings error-all Standard library: Soup is now always linked in, obsoleting _PSOUP Added assertion library (see here for more preliminary detail) Added url library (encode & decode) Added exception class Added vector3 class Added dumpvar & exportvar Added string.truncate Added string.replace — a slightly faster, but mostly more straightforward alternative to gsub. Most notably, not burdened by MAX_CAPTURES Added string.formatint (supports any BigInt impl that can offer the user a string representation) Also supports any grouping & any separator without concerning locale. Added table.filter Added table.map Added table.reverse Added table.reorder Added io.currentdir Added io.part Added io.writetime Added math.isnan Added compareversions Added wcall Added math.atan2 as an alias for math.atan Added json.null io.absolute now has an optional argument to request a canonicalized absolute path Updated string.rfind to accept Lua patterns Renamed io.copyto to io.copy Renamed base64.url_encode & base64.url_decode to base64.urlencode & base64.urldecode Deprecated string.find_first_of & string.find_first_not_of in favor of string.find Deprecated string.find_last_of & string.find_last_not_of in favor of string.rfind Deprecated string.lfind in favor of string.find Deprecated crypto.hexdigest in favor of string.format Modified require Prioritizes local files now to ensure compatibility. Added require(\"pluto:libname\") to explicitly request pluto libraries if ever needed (normal still works for pluto libraries, we just check for local files first). Removed base58 For integrators: Added PLUTO_NO_FILESYSTEM - disables all filesystem access (for sandboxing). Added PLUTO_WARN_NON_PORTABLE_CODE Added PLUTO_WARN_NON_PORTABLE_BYTECODE Added PLUTO_WARN_NON_PORTABLE_NAME Added PLUTO_NO_BINARIES - disables all dll/so/c module loading (for sandboxing) Added luaG_addsrcinfo Far more information can be found at our documentation: https://pluto-lang.org/","s":"0.8.0","u":"/docs/Changelog","h":"#080","p":20},{"i":41,"t":"Fixed unexpected behavior when using a ternary expression inside of an interpolated string Fixed table.contains returning 0 instead of the actual key for non-integer key types Fixed REPL not recognizing multi-line statements Fixed Pluto-injected code corrupting bytecode For integrators: Added PLUTO_LOADCLIB_HOOK","s":"0.7.4","u":"/docs/Changelog","h":"#074","p":20},{"i":43,"t":"Updated error semantics of os.remove & os.rename to match Lua's again (return false instead of raising error), Pluto's 'io' versions of these functions remain unchanged Fixed extends not copying over metamethods Fixed \"memory allocation error: block too big\" when parsing --[[]] Fixed allowing function calls to primitives, causing ambiguities with exprstat after assignment Fixed string.upper & string.lower delimiting on '\\0' Some other improvements and bugfixes","s":"0.7.3","u":"/docs/Changelog","h":"#073","p":20},{"i":45,"t":"String interpolation now allows nested strings Improved \"unreachable code\" warning Improved some error messages Fixed string interpolation not working with string call syntax Fixed rare issues with 'new', 'extends' and 'instanceof' operators","s":"0.7.2","u":"/docs/Changelog","h":"#072","p":20},{"i":47,"t":"Fixed string interpolation not working with single-quoted strings after 0.7.0 Fixed os.sleep disregarding execution time limit Fixed scripts being able to go past execution time limit with coroutines","s":"0.7.1","u":"/docs/Changelog","h":"#071","p":20},{"i":49,"t":"Added table destructuring (local '{' NAME [= FIELD][, ...] '}' '=' TABLE) Added array destructuring (local '[' NAME[, ...] ']' '=' TABLE) Added pluto_use <* | version | token> [= false] to toggle non-compatible keywords Added pluto_use let [= false] to toggle 'let' alias for 'local' Added ++ statement Also supports ++t.prop Added constructor promotion Added compile-time conditionals Improved class expression & statement Now supports property declaration without value Now supports type hints (currently without warnings) Now supports access modifiers (currently without warnings or errors) Can now optionally use 'begin' before body Improved string interpolation to support any expression, not just variable names Improved type hints to support alternatives, e.g. string|int Named arguments may now be used in conjunction with positional arguments Improved 'new' expression to support direct member access into the table it created, e.g. print(new Human(\"John\").name) 'new' may now also be used as a statement Fixed loading of precompiled code from files with non-Latin path on Windows Fixed behavior of 'in' expression when used on a temporary table Out-of-the-box Compatibility: 'parent' may now be overwritten via local or parameter name All reserved identifiers can now be used with shorthand table syntax and goto Standard library: Added coroutine.xresume For integrators: Added PLUTO_USE_LET More detailed documentation can be found here.","s":"0.7.0","u":"/docs/Changelog","h":"#070","p":20},{"i":51,"t":"Defaults arguments now produce Lua-compatible bytecode Fixed default arguments not working for methods Fixed named arguments, etc. not working for upvalue functions Fixed 'in' expression for when right-hand operand is nested table Fixed 'in' expression being too greedy in consuming righthand operand For integrators: Added PLUTO_LUA_LINKABLE","s":"0.6.3","u":"/docs/Changelog","h":"#063","p":20},{"i":53,"t":"Optional Parentheses now works for table types and with chained \"suffix expressions\" Fixed new overwriting user-defined __index Fixed infinite recursion with multi-level parent calls Fixed some other small issues Performance: Optimized lua_insert, lua_remove, & lua_replace (Optimization by @gottfriedleibniz) Optimized luaO_ceillog2 (Inspired by @gottfriedleibniz) Enabled Lua's jump table for clang build as well Fixed a VM performance regression introduced by Pluto","s":"0.6.2","u":"/docs/Changelog","h":"#062","p":20},{"i":55,"t":"Improved suggestions (for when using plutoc with the language server) Optimized switch statement code generation (now omits cases leading to default case) Fixed producing syntax error when 'case' or 'default' is used outside of switch Fixed using 'export' outside of global scope not producing an error Fixed some confusing error messages Pulled in the latest Lua changes so some Lua bugs are now fixed","s":"0.6.1","u":"/docs/Changelog","h":"#061","p":20},{"i":57,"t":"Added attribute to force locals to be compile-time constants Added $expr syntax for compile-time evaluation of select functions Added export [NAME=VALUE | function | class] syntax Added named arguments (name=value in funcargs) Added named varargs (...NAME), automatically puts the varargs into a table with the given name A subset of Soup is now vendored with Pluto so standard library features that rely on it should now be more viable Removed deprecated \"pluto_case\" and \"pluto_default\" keywords Removed when statement Enums: Added ENUM.ENUMERATOR syntax for named enums Added ENUM CLASS NAME ... syntax to force usage of this syntax Added enum reflection for named enums (:names(), :values(), :kvmap(), :vkmap()) Object-oriented programming: Added new TABLE(...) syntax (creates new table, sets TABLE as its metatable + index, calls `:construct(...)` if exists) Added 'class' statement & expression (similar to table but without need for ',' or ';' after properties and functions) 'class' and 'local class' statements also support extends NAME which sets parent property and metatable with index Added static function NAME for use within table constructor/class definition (equal to NAME = function) Added 'parent' expression parent.PROP -> self.__parent.PROP parent:METHOD(...) -> self.__parent.METHOD(self, ...) Added TABLE instanceof METATABLE operator Type hints: Added 'int' & 'float' type hints (more restrictive than 'number') Added 'void' type hint for function return type Standard library: Added utonumber, utostring, & string.uformat Added instanceof(TABLE, METATABLE) For integrators upgrading to Pluto 0.6.0: Consider defining PLUTO_COMPATIBLE_NEW, PLUTO_COMPATIBLE_CLASS, PLUTO_COMPATIBLE_PARENT & PLUTO_COMPATIBLE_EXPORT so 'new', 'class', 'parent' & 'export' will not be reserved keywords just yet, instead 'pluto_new', 'pluto_class', 'pluto_parent' & 'pluto_export' can be used. More detailed documentation can be found here.","s":"0.6.0","u":"/docs/Changelog","h":"#060","p":20},{"i":59,"t":"Default arguments now support tables Pluto now supports building with C ABI so you can replace Lua's shared library with Pluto's without needing to change the program Fixed return before case or default causing a syntax error Fixed access violation on lua_close with strings as default parameters","s":"0.5.4","u":"/docs/Changelog","h":"#054","p":20},{"i":61,"t":"Default arguments now support compile-time constant variables, unary -, and pseudo-unary + Re-added os.remove & os.rename because they originated in Lua and should not have been removed Fixed some instances of errors not providing a code snippet and reporting the wrong line Fixed enumerators being limited to 32-bit values Fixed warning disable/enable being global-only Removed if-goto optimisation due to various edge cases where goto is not executed","s":"0.5.3","u":"/docs/Changelog","h":"#053","p":20},{"i":63,"t":"Enum statement: Now supports compile-time constant variables when setting value Fixed require, dofile, etc. not taking UTF-8 encoded paths on Windows Fixed pluto & plutoc not being able to execute files with foreign names on Windows","s":"0.5.2","u":"/docs/Changelog","h":"#052","p":20},{"i":65,"t":"Enum Statement: Now supports unary - and pseudo-unary + when setting value Replaced locals limit with registers limit so you can have more compile-time constants Fixed Pluto's IO functions not taking UTF-8 encoded paths Fixed UB when emitting unfinished string error, possibly resulting in an access violation","s":"0.5.1","u":"/docs/Changelog","h":"#051","p":20},{"i":67,"t":"Added \"for ITERABLE as VALUE\" loop Added $-strings (string interpolation) Added prefix ++ operator Added support for binary number literals. Added C-style enums Added _PSOUP global Updated package.path to look for .pluto files in working directory by default Deprecated \"pluto_case\" and \"pluto_default\" (now \"case\" and \"default\", respectively) Removed what was deprecated in 0.4.0 (sleep -> os.sleep, os.remove -> io.remove, os.rename -> io.rename) Added execution time limit (optional, must be enabled in luaconf.h) Added content moderation Standard Library: Added io.makedirs Standard Library (Soup): Added base64 Added base58 Added base32 Added json","s":"0.5.0","u":"/docs/Changelog","h":"#050","p":20},{"i":69,"t":"Improved wording of some warning & error messages Fixed excessive \"duplicate local declaration\" warnings Cherry-picked some Lua commits, so the following Lua bugs are now fixed: 'break' may not properly close variable in a 'for' loop error message in 'table.remove' 'utf8.codes' accepts spurious continuation bytes Negation in constant folding of '>>' may overflow stack overflow with nesting of coroutine.close","s":"0.4.5","u":"/docs/Changelog","h":"#045","p":20},{"i":71,"t":"Added math.rand as an alias for math.random Changed unknown type hint to be warning instead of error Reverted table.insert optimation due to unexpected behavior Some minor tweaks","s":"0.4.4","u":"/docs/Changelog","h":"#044","p":20},{"i":73,"t":"Improved most error messages, and vastly improved the internal code for them. These reserved tokens can be used as identifiers outside of their functional context: default, case Optimized the performance of table.insert. Roughly 3x faster, but still slightly slower than t[#t + 1] Pluto can now be built using Sun.","s":"0.4.3","u":"/docs/Changelog","h":"#043","p":20},{"i":75,"t":"Fixes a regression introduced in Pluto 0.4.1 that prevented the walrus operator from working within lambda functions that are passed as function arguments","s":"0.4.2","u":"/docs/Changelog","h":"#042","p":20},{"i":77,"t":"Updated lexer to tokenise in a separate pass This fixes Pluto's error messages sometimes not showing the full line Disallowed use of the walrus operator within a function call because it was found to be more janky than expected","s":"0.4.1","u":"/docs/Changelog","h":"#041","p":20},{"i":79,"t":"Additions: Walrus Operator Default parameters for functions. New standard library: lcryptlib, for various hash algorithms and cryptographic PRNGs. New warnings: Unreachable code. Too many function arguments. Improvements: Switch case may now use variables. Shorthand ternary syntax from C/C++. Warnings can be configured with comments. Improved performance of some common arithmetic algorithms. VM Dumping has been rewritten for superb runtime detail on all opcodes, their arguments, their results, etc. string.upper & string.lower take a second parameter indicating a specific index to change. Absence of this parameter preserves default behavior.","s":"0.4.0","u":"/docs/Changelog","h":"#040","p":20},{"i":81,"t":"Improvements: io.copyto will now overwrite existing files instead of throwing an exception. Improve error handling of other exception-prone IO functions.","s":"0.3.2","u":"/docs/Changelog","h":"#032","p":20},{"i":83,"t":"Bugfix: String.split would previously invoke an infinite loop when an empty string is used as the delimiter.","s":"0.3.1","u":"/docs/Changelog","h":"#031","p":20},{"i":85,"t":"Additions: Inlined method creation. STR in STR expressions. KEY in INDEXABLE expressions. Generalized iteration, no need for pairs. io.listdir Reserved keywords as valid fields. Null-coalescing operator (w/ compound operator). continue N & break N for manipulating outer loops. Optional type-hinting, with parser warnings. Safe accessor navigation, to avoid \"attempt to index nil\" errors for deeply nested fields. Changes: table.contains now returns an index if found and nil otherwise (previously returned true or false). Improvements: Switch no longer has syntactic restrictions Greater switch performance Documentation for the new changes can be found here.","s":"0.3.0","u":"/docs/Changelog","h":"#030","p":20},{"i":87,"t":"Fixes a bug with the continue keyword","s":"0.2.2","u":"/docs/Changelog","h":"#022","p":20},{"i":89,"t":"Added VM Dump Implemented long jump optimisation","s":"0.2.1","u":"/docs/Changelog","h":"#021","p":20},{"i":91,"t":"Added compile-time warnings for duplicate local declarations Added optional ANSI color sequences in various error & warning messages Added support for ternary expressions Added continue statement Added Table Freezing / Immutability Added Switch/Case statements Added user_data to global_State Added != Added compatibility mode Added table.contains Added new time functions to os api Added negative string indexing Added compound concatenation operator Added new string functions Added portable jumptable implementation that can be optionally enabled Added REPEAT .. WHEN loop support Added new IO library functions Added _PVERSION Implemented table length cache optimisation (2x speedup) Implemented optional parentheses around string literals for method invocation Increased local variable limit from 200 to 249 Rebased with Lua for latest bugfixes","s":"0.2.0","u":"/docs/Changelog","h":"#020","p":20},{"i":93,"t":"Initial version. Notable features: Lambda expressions Arbitrary character insertion in numeral literals Many compound operators ** exponent operator","s":"0.1.0","u":"/docs/Changelog","h":"#010","p":20},{"i":95,"t":"Pluto is a superset of Lua 5.4 with a focus on general-purpose programming. While being remarkably compatible with Lua 5.4 source-code & bytecode, it enhances the standard library & adds more than a dozen highly-desired syntaxes such as switch statements, compound operators, classes, class inheritance, string interpolation, type hinting, enums, and so on.","s":"What is Pluto?","u":"/docs/Introduction","h":"","p":94},{"i":97,"t":"Pluto aspires to be a version of Lua with a larger feature-set, that is all. Pluto is not a Lua-killer, an attempted successor, or any of that. Many people (rightly so) love Lua precisely because of the design philosophy. And fundamentally, Pluto is a major deviation from Lua's design philosophy. Some may prefer this, some may not.","s":"What does Pluto aspire to be?","u":"/docs/Introduction","h":"#what-does-pluto-aspire-to-be","p":94},{"i":99,"t":"This document will explain how to get started with writing Pluto in no time.","s":"Getting Started","u":"/docs/Getting Started","h":"","p":98},{"i":101,"t":"The easiest way to get started writing Pluto is to use Write Pluto Online, which runs Pluto code directly in your browser using WASM.","s":"Write Pluto Online","u":"/docs/Getting Started","h":"#write-pluto-online","p":98},{"i":103,"t":"You can find pre-built binaries of Pluto for Windows, Linux, & Mac OS over on Pluto's Github Releases page.","s":"Prebuilt Binaries","u":"/docs/Getting Started","h":"#prebuilt-binaries","p":98},{"i":106,"t":"You can easily install pluto and plutoc via Chocolatey as follows: choco install plutolang Copy","s":"Chocolatey","u":"/docs/Getting Started","h":"#chocolatey","p":98},{"i":108,"t":"You can easily install Pluto via APT as follows: wget -qO- https://calamity-inc.github.io/deb-repo/key.gpg | sudo tee /usr/share/keyrings/calamity-inc.gpg > /dev/null echo \"deb [arch=amd64 signed-by=/usr/share/keyrings/calamity-inc.gpg] https://calamity-inc.github.io/deb-repo/ buster main\" | sudo tee /etc/apt/sources.list.d/calamity-inc.list > /dev/null sudo apt update sudo apt install pluto Copy This package includes the pluto and plutoc executables, shared library, as well as headers for developers (#include ). As the \"buster\" part implies, these binaries were compiled on Debian 10, but they work on all subsequent Debian releases, as well as Ubuntu 20 and above.","s":"APT Repository","u":"/docs/Getting Started","h":"#apt-repository","p":98},{"i":110,"t":"Pluto is in the Arch User Repository under the name plutolang. This package includes the pluto and plutoc executables, shared library, as well as headers for developers (#include ).","s":"AUR","u":"/docs/Getting Started","h":"#aur","p":98},{"i":112,"t":"Pluto is available in the Termux package main repository under plutolang for binaries and libpluto for development library.","s":"Termux","u":"/docs/Getting Started","h":"#termux","p":98},{"i":114,"t":"Pluto can compile on virtually any platform, as long as there's a C++ 17 compiler for it. First, you need to clone the repository: git clone https://github.com/PlutoLang/Pluto cd Pluto Copy Then, you can use any of the build methods documented here.","s":"Compile Pluto Yourself","u":"/docs/Getting Started","h":"#compile-pluto-yourself","p":98},{"i":116,"t":"info PHP is required for this method. You can check if PHP is installed by running php -v. You can install it via sudo apt intall php-cli on Debian or sudo pacman -S php on Arch. Simply run the following commands: php scripts/compile.php clang php scripts/link_pluto.php clang php scripts/link_plutoc.php clang php scripts/link_static.php Copy You can easily modify these commands to a compiler other than clang, if you wish. There are also additional scripts for the various types of shared libraries. The binaries will be placed in the src/ directory.","s":"PHP Scripts","u":"/docs/Getting Started","h":"#php-scripts","p":98},{"i":118,"t":"In the repository you just cloned, there's a Pluto.sln you can open with Visual Studio. Within Visual Studio, open the Build > Batch Build dialog. Here, click \"Select All\", then \"Build\". The binaries will be placed in the out/ directory.","s":"Visual Studio","u":"/docs/Getting Started","h":"#visual-studio","p":98},{"i":120,"t":"You can simply run the make command: make -j PLAT={yourplatform} Copy The platform list can be found here. The binaries will be placed in the src/ directory.","s":"Make","u":"/docs/Getting Started","h":"#make","p":98},{"i":122,"t":"Pluto supports the Sun build system by providing .sun files in the src/ directory, you can use them to build pluto & plutoc: cd src sun pluto sun plutoc Copy The binaries will be placed in the src/ directory. If you wish to use Pluto as a static library in your own projects, simply add the following to your project's .sun file: require ../Pluto/src Copy Assuming a directory structure where your own project and Pluto share the same parent.","s":"Sun","u":"/docs/Getting Started","h":"#sun","p":98},{"i":124,"t":"Pluto's parser provides some powerful constructs which allow you to write code that will never be seen at runtime.","s":"Compile-Time Evaluation","u":"/docs/New Features/Compile-Time Evaluation","h":"","p":123},{"i":126,"t":"Certain standard library functions can be called at compile-time, as long as the arguments are also known at compile-time, by using the \"$\" symbol before the function call. pluto local runtime = require(\"crypto\").joaat(\"Hello, World!\") local compile = $crypto.joaat(\"Hello, World!\") assert(runtime == compile) Copy If you're unfamiliar with compile-time evaluation, this is essentially what the code turns into: pluto local runtime = require(\"crypto\").joaat(\"Hello, World!\") local compile = 847757641 -- The JOAAT hash of \"Hello, World!\" assert(runtime == compile) Copy This is available on preloaded Pluto libraries, such as: json base32 base58 base64 crypto And on the following functions: tostring utostring tonumber utonumber","s":"Function calls","u":"/docs/New Features/Compile-Time Evaluation","h":"#function-calls","p":123},{"i":128,"t":"Compile-time constant variables can be defined via the $define statement: pluto $define a = 123 Copy This may seem identical to a local declared with the const attribute: pluto local a = 123 Copy However, $define also enforces that the assigned variable is a compile-time constant: pluto local a = {} $define a = {} -- Error: variable was not assigned a compile-time constant value Copy","s":"Variables","u":"/docs/New Features/Compile-Time Evaluation","h":"#variables","p":123},{"i":130,"t":"If there is certain code you only want to have compiled in for a certain build, such as a debug build, you can use compile-time conditionals: pluto $define DEBUG = true $if DEBUG then print(\"Script running in debug mode\") $else print(\"Script running in release mode\") $end Copy In this case, only one of the two paths will be compiled in; the rest will not take up any space.","s":"Conditionals","u":"/docs/New Features/Compile-Time Evaluation","h":"#conditionals","p":123},{"i":132,"t":"This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should break. The default value is 1, thus breaking out of the current loop. Example 1 pluto for i = 1, 10 do -- Loop 1. break 1 -- This is identical to `break` without any arguments. end Copy Example 2 pluto for i = 1, 10 do -- Loop 1. for ii = 1, 5 do -- Loop 2. break 1 -- This will break from Loop 2. break 2 -- This will break from Loop 1. end end Copy","s":"Break Statement","u":"/docs/New Features/Break Statement","h":"","p":131},{"i":134,"t":"Pluto offers optional compiler warnings for certain misbehaviors.","s":"Compiler Warnings","u":"/docs/New Features/Compiler Warnings","h":"","p":133},{"i":137,"t":"This is raised when a new local is created with the same name as an existing one. pluto local var = 5 do local var = \"hello\" end Copy file.pluto:3: warning: duplicate local declaration [var-shadow] 3 | local var = \"hello\" | ^^^^^^^^^^^^^^^^^^^ here: this shadows the initial declaration of 'var' on line 1. Copy","s":"var-shadow","u":"/docs/New Features/Compiler Warnings","h":"#var-shadow","p":133},{"i":139,"t":"This is raised when a new local is created with the same name as a global variable. pluto local table = {} Copy file.pluto:1: warning: duplicate global declaration [global-shadow] 1 | local table = {} | ^^^^^^^^^^^^^^^^ here: this shadows the initial global definition of 'table' Copy To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_GLOBAL_SHADOW macro. Furthermore, this only covers the globals 'table', 'string', and 'arg' by default. Integrators can overwrite the PLUTO_COMMON_GLOBAL_NAMES macro to change this list.","s":"global-shadow","u":"/docs/New Features/Compiler Warnings","h":"#global-shadow","p":133},{"i":141,"t":"This is raised when the same field is declared multiple times in a table constructor: pluto local t = { key = \"fruit\", value = \"apple\", value = \"banana\" } Copy file.pluto:4: warning: duplicate table field [field-shadow] 4 | value = \"banana\" | ^^^^^^^^^^^^^^^^ here: this overwrites the value assigned to this field earlier Copy","s":"field-shadow","u":"/docs/New Features/Compiler Warnings","h":"#field-shadow","p":133},{"i":143,"t":"This is raised when the type of an expression doesn't match the hinted type. See Type Hinting. pluto local var: number = 5 var = \"hello\" Copy file.pluto:2: warning: variable type mismatch [type-mismatch] 2 | var = \"hello\" | ^^^^^^^^^^^^^ here: 'var' type-hinted as 'number', but assigned a string value. Copy","s":"type-mismatch","u":"/docs/New Features/Compiler Warnings","h":"#type-mismatch","p":133},{"i":145,"t":"This is raised when a block of code will never be ran. pluto for i = 1, 10 do if i == 5 then continue print(\"message\") end end Copy file.pluto:4: warning: unreachable code [unreachable-code] 4 | print(\"message\") | ^^^^^^^^^^^^^^^^ here: this code comes after an escaping 'continue' statement. Copy","s":"unreachable-code","u":"/docs/New Features/Compiler Warnings","h":"#unreachable-code","p":133},{"i":147,"t":"This is raised when too many arguments are given to a non-vararg function. pluto local function func(a, b, c) end func(1, 2, 3, 4) Copy file.pluto:5: warning: too many arguments [excessive-arguments] 5 | func(1, 2, 3, 4) | ^^^^^^^^^^^^^^^^ here: expected 3 arguments, got 4. Copy","s":"excessive-arguments","u":"/docs/New Features/Compiler Warnings","h":"#excessive-arguments","p":133},{"i":149,"t":"This is raised when the code does something stupid but not quite stupid enough to cause an error. pluto pluto_use * Copy file.pluto:1: warning: 'pluto_use *' is a bad idea because future Pluto versions may add keywords that will break your script [bad-practice] 1 | pluto_use * | ^^^^^^^^^^^ here: consider using 'pluto_use \"0.8.0\"' instead Copy","s":"bad-practice","u":"/docs/New Features/Compiler Warnings","h":"#bad-practice","p":133},{"i":151,"t":"This is raised when the code seems syntactically incorrect. pluto local magic const = 42 Copy file.pluto:1: warning: Possibly mistyped attribute [possible-typo] 1 | local magic const = 42 | ^^^^^^^^^^^^^^^^^^^^^^ here: Did you mean ''? Copy","s":"possible-typo","u":"/docs/New Features/Compiler Warnings","h":"#possible-typo","p":133},{"i":153,"t":"This is raised when the code may not be considered valid by all Pluto environments due to compatibility mode. pluto new exception(\"Not implemented\") Copy file.pluto:1: warning: non-portable keyword usage [non-portable-code] 1 | new exception(\"Not implemented\") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: use 'pluto_new' instead, or 'pluto_use' this keyword: https://pluto.do/compat Copy To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_CODE macro.","s":"non-portable-code","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-code","p":133},{"i":155,"t":"This is raised when a variable name is only valid due to compatibility mode. pluto local class = \"fruit\" Copy file.pluto:1: warning: 'class' is a non-portable name [non-portable-name] 1 | local class = \"fruit\" | ^^^^^^^^^^^^^^^^^^^^^ here: use a different name, or use 'pluto_use' to disable this keyword: https://pluto.do/compat Copy To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_NAME macro.","s":"non-portable-name","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-name","p":133},{"i":157,"t":"This is raised when the code will not run in Lua environments (when compiling Pluto to bytecode). pluto print(\"h\" in \"hello\") Copy file.pluto:1: warning: non-portable operator usage [non-portable-bytecode] 1 | print(\"h\" in \"hello\") | ^^^^^^^^^^^^^^^^^^^^^ here: this operator generates bytecode which is incompatible with Lua. Copy To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_BYTECODE macro.","s":"non-portable-bytecode","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-bytecode","p":133},{"i":159,"t":"This is raised when there's a non-obvious fallthrough in a switch block: pluto local a = 1 switch a do case 1: print(\"Case 1\") case 2: print(\"Case 2\") end Copy file.pluto:5: warning: possibly unwanted fallthrough [unannotated-fallthrough] 5 | case 2: | ^^^^^^^ here: the case on line 3 flows into this case + note: place `--@fallthrough` before this case if this is intended Copy As the warning points out, a @fallthrough annotation can be used to label the fallthrough, in turn silencing the warning: pluto local a = 1 switch a do case 1: print(\"Case 1\") -- @fallthrough case 2: print(\"Case 2\") end Copy","s":"unannotated-fallthrough","u":"/docs/New Features/Compiler Warnings","h":"#unannotated-fallthrough","p":133},{"i":161,"t":"This is raised when the global keyword is enabled and a global was declared without it. See Explicit Globals. pluto pluto_use global a = 1 Copy file.pluto:3: warning: implicit global creation [implicit-global] 3 | a = 1 | ^^^^^ here: prefix this with 'global' if creating a global was intended Copy","s":"implicit-global","u":"/docs/New Features/Compiler Warnings","h":"#implicit-global","p":133},{"i":163,"t":"This is raised when the return value of a function declared was discarded. See Nodiscard Functions. pluto local function add(a, b) return a + b end add(1, 2) Copy file.pluto:5: warning: discarding return value of function declared '' [discarded-return] 5 | add(1, 2) | ^^^^^^^^^ here Copy","s":"discarded-return","u":"/docs/New Features/Compiler Warnings","h":"#discarded-return","p":133},{"i":165,"t":"The state of each warning type can be changed during compile-time and exceptions for certain code can be made.","s":"Compile-time Configuration","u":"/docs/New Features/Compiler Warnings","h":"#compile-time-configuration","p":133},{"i":167,"t":"Warnings have 3 states: 'disable', 'enable', and 'error'. The 'error' state is a more aggressive version of 'enable' that causes compilation to fail if the warning type is raied. To change the state of a warning, write a @pluto_warnings comment with the state and warning type joined by a hyphen (-): pluto local var = 5 do -- @pluto_warnings: disable-var-shadow local var = \"hello\" -- @pluto_warnings: enable-var-shadow end Copy For this, there is also the special type, 'all', which can be used e.g. to enable all warnings except for non-portable-bytecode: pluto -- @pluto_warnings: enable-all, disable-non-portable-bytecode Copy","s":"Changing Warning States","u":"/docs/New Features/Compiler Warnings","h":"#changing-warning-states","p":133},{"i":169,"t":"To disable warnings on a specific line of code, simply put a comment on the line before it with @pluto_warnings: disable-next. pluto local var = 5 do -- @pluto_warnings: disable-next local var = \"hello\" end Copy","s":"Disable Warnings On Line","u":"/docs/New Features/Compiler Warnings","h":"#disable-warnings-on-line","p":133},{"i":171,"t":"Continue statements, like break, are meant to be used in loops. They skip the current iteration of the loop. They introduce a new keyword, continue. These cannot be used inside switch statements. Example Code pluto -- Print every number besides five. for i = 1, 10 do if i == 5 then continue end print(i) -- continue jumps here. end Copy Try It Yourself​ caution Note, continue will skip code. If any code within your loop will determine if the loop continues, make sure continue doesn't jump over it.","s":"Continue Statement","u":"/docs/New Features/Continue Statement","h":"","p":170},{"i":173,"t":"This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should skip to the end of. The default value is 1, thus skipping to the end of the current loop. Example 1 pluto for i = 1, 10 do -- Loop 1. continue 1 -- This is identical to `continue` without any arguments. end Copy Example 2 pluto for i = 1, 10 do -- Loop 1. for ii = 1, 5 do -- Loop 2. continue 1 -- This will continue from Loop 2. continue 2 -- This will continue from Loop 1. end end Copy","s":"Continue's Only Argument","u":"/docs/New Features/Continue Statement","h":"#continues-only-argument","p":170},{"i":175,"t":"You may need to use pluto_continue instead of continue. Alternatively, pluto_use continue will enable the keyword independently of environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Continue Statement","h":"#using-compatibility-mode","p":170},{"i":177,"t":"During a function declaration, parameters can now declare their own default value. Example Code pluto local function write(text = \"No text provided.\") print(text) end write() --> \"No text provided.\" write(\"Hello!\") --> \"Hello!\" Copy This code behaves identically. pluto local function write(text) if text == nil then text = \"No text provided.\" end print(text) end write() --> \"No text provided.\" write(\"Hello!\") --> \"Hello!\" Copy Try It Yourself​","s":"Default Arguments","u":"/docs/New Features/Default Arguments","h":"","p":176},{"i":179,"t":"Pluto adds the following syntax: pluto enum MyEnum begin OPTION_1, OPTION_2, OPTION_3 end assert(OPTION_1 == 1) assert(OPTION_2 == 2) assert(OPTION_3 == 3) Copy Enums can start at a base number, and increment from there. pluto enum MyEnum begin OPTION_1 = 0, OPTION_2, OPTION_3 = 5, OPTION_4 end assert(OPTION_1 == 0) assert(OPTION_2 == 1) assert(OPTION_3 == 5) assert(OPTION_4 == 6) Copy Since this enum has a name, we can also access its enumerators with that: pluto assert(MyEnum.OPTION_1 == 0) Copy","s":"Enumerations","u":"/docs/New Features/Enumerations","h":"","p":178},{"i":181,"t":"You can force usage of the ENUM.ENUMERATOR syntax by using 'enum class': pluto enum class MyEnum begin OPTION_1, OPTION_2, OPTION_3 end assert(OPTION_1 == nil) assert(MyEnum.OPTION_1 == 1) Copy","s":"Scoped Enums","u":"/docs/New Features/Enumerations","h":"#scoped-enums","p":178},{"i":183,"t":"When you have a named enum, not only can you get its enumerators, but also reflect upon it with some methods: pluto enum MyEnum begin OPTION_1, OPTION_2, OPTION_3 end for k, v in MyEnum:kvmap() do print(k, v) -- \"OPTION_1 1\" ... end Copy The following methods are available: :names(), :values(), :kvmap(), :vkmap()","s":"Reflection","u":"/docs/New Features/Enumerations","h":"#reflection","p":178},{"i":185,"t":"Enums can also be anonymous: pluto enum begin OPTION_1, OPTION_2, OPTION_3 end assert(OPTION_1 == 1) assert(OPTION_2 == 2) assert(OPTION_3 == 3) Copy","s":"Anonymous Enums","u":"/docs/New Features/Enumerations","h":"#anonymous-enums","p":178},{"i":187,"t":"You may need to use pluto_enum instead of enum. Alternatively, pluto_use enum will enable the keyword independently of environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Enumerations","h":"#using-compatibility-mode","p":178},{"i":189,"t":"The optional global keyword can be used to explicitly declare global variables. To enable it, simply do: pluto pluto_use global Copy Then it can be used like this: pluto global a = 1 Copy Being identical to the following code: pluto a = 1 Copy","s":"Explicit Globals","u":"/docs/New Features/Explicit Globals","h":"","p":188},{"i":191,"t":"When the global keyword is enabled, an 'implicit-global' warning is raised for any globals declared without it: pluto pluto_use global a = 1 Copy file.pluto:3: warning: implicit global creation [implicit-global] 3 | a = 1 | ^^^^^ here: prefix this with 'global' if creating a global was intended Copy","s":"Compiler Warnings","u":"/docs/New Features/Explicit Globals","h":"#compiler-warnings","p":188},{"i":193,"t":"When you only want to iterate over the values of a table, you can use Pluto's for-as syntax. New Code pluto local t = { 1, 2, 3, \"hello\", \"world\" } for t as value do print(value) end -- 1 -- 2 -- 3 -- hello -- world Copy That code is identical to this: Old Code pluto local t = { 1, 2, 3, \"hello\", \"world\" } for _, value in t do print(value) end Copy info The bytecode of this feature is only backwards-compatible with Lua when pairs, ipairs, or next is used. See Generalized Iteration.","s":"For-As Loop","u":"/docs/New Features/For-As Loop","h":"","p":192},{"i":195,"t":"The export modifier allows you to automatically aggregate things you want to export into a table. Old Code pluto local version = 2 local function add(a, b) return a + b end return { version = version, add = add } Copy New Code pluto export version = 2 export function add(a, b) return a + b end Copy The return statement is automatically generated at the end of the block, so it is not limited to the top-level function: pluto package.preload[\"test\"] = function() export version = 2 export function add(a, b) return a + b end -- end of scope; 'return' is automatically generated end print(require\"test\".version) Copy","s":"Export Modifier","u":"/docs/New Features/Export Modifier","h":"","p":194},{"i":197,"t":"You may need to use pluto_export instead of export. Alternatively, pluto_use export will enable the keyword independently of environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Export Modifier","h":"#using-compatibility-mode","p":194},{"i":199,"t":"The in operator has been extended to support string searches and table searches. For these purposes, it's the fastest possible solution. Searching for a substring. pluto assert(\"world\" in \"hello world\") Copy When used on tables, the in operator searches for values. It'll search for array elements and it'll search keys for their values. Searching a table for a value. pluto local t = { \"a\", \"b\", key = \"value\" } assert(\"a\" in t) -- \"a\" is an element inside of t. assert(\"b\" in t) -- \"b\" is an element inside of t. assert(\"value\" in t) -- \"value\" is the value of a key inside of t. assert(not \"random\" in t) -- \"random\" is not an element OR the value of a key inside of t. Copy","s":"In Expressions","u":"/docs/New Features/In Expressions","h":"","p":198},{"i":201,"t":"The right-hand operand must always be a table or a string. The left-hand operand must be a string if the right-hand operand is a string. The left-hand operand can be anything if the right-hand operand is a table. caution The bytecode of this feature is not backwards-compatible with Lua.","s":"Rules","u":"/docs/New Features/In Expressions","h":"#rules","p":198},{"i":203,"t":"Destructuring is a better way to assign local variables from expressions that return a table.","s":"Destructuring","u":"/docs/New Features/Destructuring","h":"","p":202},{"i":205,"t":"Assuming we have this table: pluto local t = { 3, 6, 9 } Copy This is how we would assign each value to variables called a, b, and c using the Lua and Pluto ways: Lua way pluto local a, b, c = table.unpack(t) Copy Pluto way pluto local [a, b, c] = t Copy","s":"Array destructuring","u":"/docs/New Features/Destructuring","h":"#array-destructuring","p":202},{"i":207,"t":"Assuming we have this table: pluto local t = { name = \"John\", age = 42 } Copy This is how we would assign each field to a variable of the same name using the Lua and Pluto ways: Lua way pluto local name = t.name local age = t.age Copy Pluto way pluto local { name, age } = t Copy","s":"Table destructuring","u":"/docs/New Features/Destructuring","h":"#table-destructuring","p":202},{"i":209,"t":"Assuming we have the same table as above, this is how we'd assign the name and age fields to n and a variables, respectively, using the Lua and Pluto ways: Lua way pluto local n = t.name local a = t.age Copy Pluto way pluto local { n = name, a = age } = t Copy","s":"Different variable name","u":"/docs/New Features/Destructuring","h":"#different-variable-name","p":202},{"i":211,"t":"Table destructuring can be used to require multiple standard library modules at once using the '*' module: pluto local { base64, json } = require \"*\" Copy","s":"Standard Library","u":"/docs/New Features/Destructuring","h":"#standard-library","p":202},{"i":213,"t":"Lambda expressions are an alternative way of writing anonymous functions. Lua Way pluto local s1 = \"123\" local s2 = s1:gsub(\".\", function(c) return tonumber(c) + 1 end) print(s2) -- \"234\" Copy Pluto Way pluto local s1 = \"123\" local s2 = s1:gsub(\".\", |c| -> tonumber(c) + 1) print(s2) -- \"234\" Copy Try It Yourself​ As you can see, they take an expression after the arrow, the result of which is implicitly returned. However, lambda expressions can also have full bodies using do...end: pluto local add = |a, b| -> do print($\"Adding {a} and {b} together\") return a + b end Copy They also support all other syntax you would expect of functions, such as type hints and default arguments.","s":"Lambda Expressions","u":"/docs/New Features/Lambda Expressions","h":"","p":212},{"i":215,"t":"Functions can be declared nodiscard, causing a warning to be raised when the return value is discarded: pluto local function add(a, b) return a + b end add(1, 2) Copy file.pluto:5: warning: discarding return value of function declared '' [discarded-return] 5 | add(1, 2) | ^^^^^^^^^ here Copy This can also be combined with type hints: pluto local function add(a: number, b: number): number return a + b end Copy info The warning coverage is currently limited to local functions.","s":"Nodiscard Functions","u":"/docs/New Features/Nodiscard Functions","h":"","p":214},{"i":217,"t":"Instead of positional arguments, you can use the names of arguments you want to set: pluto local function process_file(file, mode = \"r\", version = 1) print($\"Processing {file} with mode '{mode}' and version {version}\") end process_file(file = \"hello.txt\", version = 2) -- \"Processing hello.txt with mode 'r' and version 2\" Copy Try It Yourself​ Note that this example also makes use of default arguments and string interpolation.","s":"Named Arguments","u":"/docs/New Features/Named Arguments","h":"","p":216},{"i":219,"t":"You can use positional arguments for the first few arguments and then use named arguments for the latter ones, for example: pluto local function process_file(file, mode = \"r\", version = 1) print($\"Processing {file} with mode '{mode}' and version {version}\") end process_file(\"hello.txt\", version = 2) -- \"Processing hello.txt with mode 'r' and version 2\" Copy Try It Yourself​","s":"Mixing arguments","u":"/docs/New Features/Named Arguments","h":"#mixing-arguments","p":216},{"i":221,"t":"This feature is implemented entirely in the parser and therefore only works for local functions at the moment.","s":"Limitations","u":"/docs/New Features/Named Arguments","h":"#limitations","p":216},{"i":223,"t":"Pluto makes two small changes to numeral parsing.","s":"Numeral Parsing","u":"/docs/New Features/Numeral Parsing","h":"","p":222},{"i":225,"t":"You can add underscores to your numeric literals to make them more readable. Example Code pluto local n = 10_000_000 assert(n == 10000000) Copy These underscores are ignored by the compiler, so they are purely cosmetic.","s":"Cosmetic Underscores","u":"/docs/New Features/Numeral Parsing","h":"#cosmetic-underscores","p":222},{"i":227,"t":"Similar to how Lua allows you to input numbers in hexadecimal: Example Code pluto local n = 0x420 assert(n == 1056) Copy Pluto allows you to input numbers in binary as well: Example Code pluto local n = 0b1000101 assert(n == 69) Copy","s":"Binary Integers","u":"/docs/New Features/Numeral Parsing","h":"#binary-integers","p":222},{"i":229,"t":"You can index strings for their characters now, which is cleaner & 3x faster than using string.sub. String indexing only occurs when you index with an integer, either positive or negative. Positive integers index from the start of the string, and negative integers index from the end. Example Code pluto local str = \"hello world\" print(str[5]) -- \"o\" print(str[200]) -- nil print(str[-1]) -- \"d\" Copy Any character-intensive task — for example, a hash algorithm — will greatly benefit from this. Try It Yourself​ caution The bytecode of this feature is not backwards-compatible with Lua.","s":"String Indexing","u":"/docs/New Features/String Indexing","h":"","p":228},{"i":231,"t":"Pluto makes a plethora of improvements when it comes to object-oriented programming.","s":"Object-Oriented Programming","u":"/docs/New Features/Object-Oriented Programming","h":"","p":230},{"i":233,"t":"A series of methods was otherwise ugly to implement into a Lua table. Old Code pluto local t = {} function t:f1(...) end function t:f2(...) end function t:f3(...) end Copy Now, you can inline these statements inside of your table. New Code pluto local t = { function f1() end, function f2() end, function f3() end } Copy This automatically marks the functions as methods. caution Keep in mind, this produces methods, meaning you'll need to use the colon invocation syntax to avoid positional ambiguities in your parameters.","s":"Method Creation","u":"/docs/New Features/Object-Oriented Programming","h":"#method-creation","p":230},{"i":235,"t":"For consistency with the above syntax, you can use 'static function' to declare non-method functions in your tables: pluto local t = { static function say(msg) print(msg) end } t.say(\"Hello\") -- \"Hello\" Copy Try It Yourself​","s":"Static Functions","u":"/docs/New Features/Object-Oriented Programming","h":"#static-functions","p":230},{"i":237,"t":"Pluto adds an easy way to make instances with the new operator. This operator will also call the __construct method if it exists. pluto local Human = { function __construct(name) self.name = name end } local john = new Human(\"John\") print(john.name) -- John Copy Try It Yourself​ Note that for compatibility with Lua and C API classes, the new operator checks for the existence of a static 'new' function. If it exists, new X(...) will be identical to X.new(...).","s":"New Operator","u":"/docs/New Features/Object-Oriented Programming","h":"#new-operator","p":230},{"i":239,"t":"The class statement is similar to a table constructor, but it does not require commas or semicolons: pluto class Human function __construct(name) self.name = name end function __gc() print(self.name .. \" died of irrelevance\") end end local john = new Human(\"John\") Copy The class statement also supports modifiers: local class NAME, export class NAME","s":"Class Statement","u":"/docs/New Features/Object-Oriented Programming","h":"#class-statement","p":230},{"i":241,"t":"There is also a class expression, which can be used e.g. when assigning to a variable: pluto local Human = class function __construct(name) self.name = name end end Copy","s":"Class Expression","u":"/docs/New Features/Object-Oriented Programming","h":"#class-expression","p":230},{"i":243,"t":"The class statement also supports extends to specify a parent: pluto class Entity age = 1 end class Human extends Entity end local human = new Human() print(human.age) -- 1 Copy This also adds a __parent field to Human. Try It Yourself​","s":"Extends","u":"/docs/New Features/Object-Oriented Programming","h":"#extends","p":230},{"i":245,"t":"The parent expression is a shorthand for self.__parent, which also supports method call syntax, in which case it's a shorthand for self.__parent.METHOD(self, ...). pluto class Entity function __construct(name) self.name = name end end class Human extends Entity -- If we don't define __construct, the parent-constructor would be called automatically. -- However, if we overwrite it, we can use parent:__construct to call it manually. function __construct(name) parent:__construct(name) end end local human = new Human(\"John\") print(human.name) -- \"John\" Copy Note that if you have a local variable (or function parameter) called \"parent\", the parent expression will defer to it. Try It Yourself​","s":"Parent Expression","u":"/docs/New Features/Object-Oriented Programming","h":"#parent-expression","p":230},{"i":247,"t":"Pluto allows you to specify if a field is 'public' or 'private'. Private fields can only be accessed by the class that defined them. pluto class Human public name private age function __construct(name, age) self.name = name self.age = age end function getAge() return self.age end end local human = new Human(\"John\", 42) print(human.name) -- \"John\" print(human:getAge()) -- 42 print(human.age) -- nil Copy Try It Yourself​","s":"Private Fields","u":"/docs/New Features/Object-Oriented Programming","h":"#private-fields","p":230},{"i":249,"t":"Because a common task of __construct methods is to assign the value of arguments to table fields, Pluto provides a simple syntax to reduce this boilerplate: pluto class Human function __construct(public name, private age) end function getAge() return self.age end end local human = new Human(\"John\", 42) print(human.name) -- \"John\" print(human:getAge()) -- 42 print(human.age) -- nil Copy Try It Yourself​","s":"Constructor Promotion","u":"/docs/New Features/Object-Oriented Programming","h":"#constructor-promotion","p":230},{"i":251,"t":"The instanceof operator can be used to check if a table is a class instance, including inherited classes: pluto class Entity end class Human extends Entity end local e = new Entity() local h = new Human() print(e instanceof Entity) -- true print(e instanceof Human) -- false print(h instanceof Entity) -- true (by inheritance) print(h instanceof Human) -- true Copy It can also be used as a function: pluto class Entity end local e = new Entity() print(instanceof(e, Entity)) -- true Copy Try It Yourself​ info Note that, while the instanceof operator generates Lua-compatible bytecode, the instanceof function is a part of Pluto's standard library, and hence unavailable under Lua.","s":"Instanceof Operator","u":"/docs/New Features/Object-Oriented Programming","h":"#instanceof-operator","p":230},{"i":253,"t":"Some of the syntax discussed here may be different due to compatiblity mode: new -> pluto_new class -> pluto_class parent -> pluto_parent Alternatively, pluto_use new, class, parent will enable these keywords independently of environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Object-Oriented Programming","h":"#using-compatibility-mode","p":230},{"i":256,"t":"Accessing deeply nested fields which can potentially be nil was problematic, because you'd need an unreasonable amount of guard clauses to prevent an \"attempt to index nil\" error. Pluto now offers this syntax: Basic Usage pluto local person = { name = \"Alice\" } local pet_name = person.pet?.name Copy In this example, person.pet is nil. However, this does not throw an \"attempt to index nil\" error. pet_name is simply set to nil. Practical Usage pluto -- Pretend userConfig is parsed from a JSON file, or something. --- Returning the user's preferred color, or Red if they have no preferred color. local function get_color() return userConfig.colors?.preferred ?? \"Red\" end print(get_color()) Copy In this example, we also use the null coalescing operator ??. info These cannot be used for statements, like a?.b?.c = 0. They're only valid as expressions. Safe Navigation (for member access) was written by Sven Olsen.","s":"For Member Access","u":"/docs/New Features/Safe Navigation","h":"#for-member-access","p":254},{"i":258,"t":"Similarly, if you want to have optional hook functions, you can use safe method calls instead of writing conditionals: Lua Way pluto if self.onEvent then self:onEvent(event) end Copy Pluto Way pluto self:onEvent?(event) Copy You can also check if the left-hand side of : is not nil: pluto object?:onEvent(event) -- 'object' may be nil object?:onEvent?(event) -- 'object' and 'object.onEvent' may be nil Copy Note that this feature will truncate multiple return values if they're not used as part of a fixed assignment: pluto function myfunc() return 1, 2 end local a, b, c = _G:myfunc?() print(a, b, c) --> 1 2 nil print(_G:myfunc?()) --> 1 Copy","s":"For Method Calls","u":"/docs/New Features/Safe Navigation","h":"#for-method-calls","p":254},{"i":260,"t":"String interpolation is a simple alternative syntax to concatenation. Concatenation pluto local label = \"meaning of life\" local data = { value = 42 } print(\"The \" .. label .. \" is \" .. data.value) -- \"The meaning of life is 42\" Copy String Interpolation pluto local label = \"meaning of life\" local data = { value = 42 } print($\"The {label} is {data.value}\") -- \"The meaning of life is 42\" Copy Try It Yourself​ As you can see, you declare a string interpolated by prefixing it with the \"$\" symbol. Brackets can contain any expression. The result of expressions will be converted to a string as with normal concatenation, although note that Pluto supports boolean concatenation unlike Lua.","s":"String Interpolation","u":"/docs/New Features/String Interpolation","h":"","p":259},{"i":262,"t":"If you have a function that takes varargs and you want them in a table, you'd have to do something like this: pluto function vfunc(...) local args = { ... } for args as arg do print(arg) end end vfunc(\"Hello\") -- \"Hello\" Copy But, with named varargs, it can be as simple as this: pluto function vfunc(...args) for args as arg do print(arg) end end vfunc(\"Hello\") -- \"Hello\" Copy Try It Yourself​","s":"Named Varargs","u":"/docs/New Features/Named Varargs","h":"","p":261},{"i":264,"t":"Tables can now be frozen at their current state to forbid any future modification. This action is irreversible and permanent for the lifespan of the table. pluto -- Disallowing any edits to the global environment table. table.freeze(_G) _G.string = {} -- file.pluto:4: attempt to modify frozen table. Copy pluto -- Creating a constant local that's associated with a frozen table. local Frozen = table.freeze({ 1, 2, 3 }) Frozen = {} -- file.pluto:4: attempt to reassign constant. Frozen[1] = \"new value\" -- file.pluto:7: attempt to modify frozen table. rawset(Frozen, \"key\", \"value\") -- file.pluto:10: attempt to modify frozen table. Copy pluto --- Trying to swap the value with the debug library. for i = 1, 249 do local name, value = debug.getlocal(1, i) if name == \"Frozen\" then debug.setlocal(1, i, { [\"key\"] = \"hello world\" }) -- file.pluto:5: attempt to modify local variable with a frozen table. end end Copy","s":"Table Freezing","u":"/docs/New Features/Table Freezing","h":"","p":263},{"i":266,"t":"All modifications to the table from within the Lua environment will be prevented, including those from the debug library. caution If you're going to use this for a sandbox, ensure you call table.freeze before any users can access the Lua environment, otherwise they can replace that function.","s":"What will this prevent?","u":"/docs/New Features/Table Freezing","h":"#what-will-this-prevent","p":263},{"i":268,"t":"Ternary expressions behave identical as to how they would in C. They introduce no new keywords. Old Code pluto local max if a > b then max = a else max = b end Copy New Code pluto local max = a > b ? a : b Copy Try It Yourself​","s":"Ternary Expressions","u":"/docs/New Features/Ternary Expressions","h":"","p":267},{"i":270,"t":"While it is true that you can do something like this: pluto local max = a > b and a or b Copy Keep in mind that this falls apart when the true-expression has a falsy value: pluto local x = -1 x = (x == -1 and nil or x) Copy In this case, x will be -1 despite the intention being to set it to nil. There are no such issues using Pluto's ternary expressions.","s":"Doesn't Lua already have ternaries?","u":"/docs/New Features/Ternary Expressions","h":"#doesnt-lua-already-have-ternaries","p":267},{"i":272,"t":"Switch blocks consists of the following new keywords: case switch default","s":"Switch Blocks","u":"/docs/New Features/Switch Blocks","h":"","p":271},{"i":274,"t":"pluto local value = 1 switch value do case 1: print(\"There is only one!\") break case 2: print(\"There is only two!\") break end -- Break jumps here. Copy Switch statements also support fallthrough. pluto local value = 1 switch value do case 1: case 2: case 3: case 4: case 5: print(\"Got 1-5.\") break default: print(\"Value is greater than 5.\") end -- Break jumps here. Copy In this example, cases 1-4 fall through to case 5. Remember to use break whenever you do not want fallthrough. Here is an example of a potential bug: pluto local value = 1 switch value do case 1: print(\"There is only one!\") case 2: print(\"There is only two!\") end -- Output: -- There is only one! -- There is only two! <-- Uh oh. Copy The default case is executed if none of the other cases are true. For example: pluto local value = 1 switch value do case 2: case 3: break default: print(\"Value is neither 2 nor 3!\") end Copy The default case can be placed anywhere in the block. It also supports fallthrough, so remember to use break if you place it above any cases. Try It Yourself​","s":"Switch Statement","u":"/docs/New Features/Switch Blocks","h":"#switch-statement","p":271},{"i":276,"t":"Any expression can be used for the case condition: pluto switch true do case 42 == 42: print(\"42 is 42 is true\") break end Copy There is a short-hand fallthrough syntax: pluto switch value do case 1, 2, 3: print(\"1-3\") break case 4, 5, 6: print(\"4-6\") break end Copy However, note that method calls needs to be encapsulated with parentheses: pluto local t = { function getVal() return 42 end } switch 42 do case t:getVal(): -- This is interpreted as `case t: getVal():print(\"val is 42\")` print(\"val is 42\") break case (t:getVal()): -- This works as expected print(\"val is 42\") break end Copy","s":"Case Blocks","u":"/docs/New Features/Switch Blocks","h":"#case-blocks","p":271},{"i":278,"t":"Just like ternary expressions, these allow you to conditionally provide values, with massively simplified case blocks: pluto local place = 1 place = switch place do case 1 -> \"1st\" case 2 -> \"2nd\" case 3 -> \"3rd\" default -> $\"{place}th\" end print(place) --> 1st Copy Note that the case blocks here have their conditions delimited by an arrow (->) instead of a colon (:). Try It Yourself​ Despite not being able to manually fall through, the shorthand fallthrough syntax still works: pluto local function print_range(value) print(switch value do case 1, 2, 3 -> \"1-3\" case 4, 5, 6 -> \"4-6\" end) end print_range(1) --> 1-3 print_range(6) --> 4-6 print_range(9) --> nil Copy Notice how the default case was omitted in this example, so it was implicitly set to default -> nil. Try It Yourself​","s":"Switch Expression","u":"/docs/New Features/Switch Blocks","h":"#switch-expression","p":271},{"i":280,"t":"You may need to use pluto_switch instead of switch. Alternatively, pluto_use switch will enable the keyword independently of environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Switch Blocks","h":"#using-compatibility-mode","p":271},{"i":282,"t":"Although Pluto can theoretically be used with Lua-based tooling, we provide specialized support for .pluto files to enhance your coding experience with features such as: Syntax Highlighting Snippets — e.g. for when you type \"fun\" and press tab Comment Information — for editor features such as \"Toggle Comment\", \"Toggle Block Comment\" Indentation Rules — for editor features such as \"Reindent Lines\" Build Systems — run & lint scripts directly in your editor with Ctrl+(Shift+)B in Sublime Text or Ctrl+Shift+P in VS Code","s":"Editor Integration","u":"/docs/Editor Integration","h":"","p":281},{"i":284,"t":"The installation process depends on your editor: VS Code: Search for calamity-inc.pluto-syntax-highlighting in the marketplace and press \"Install.\" Sublime Text: Open the command palette (Ctrl+Shift+P), select \"Package Control: Install Package\", search for \"Pluto\", and press enter. Visual Studio: Click on Extensions > Manage Extensions. In the Online section, search for calamity-inc.pluto-vsix and press \"Download.\" IntelliJ: Clone our syntax highlighting repository and add the tmbundle folder to Editor > TextMate Bundles. If your editor is not listed here, check if it is able to load TextMate bundles, in which case you should be able to do something similar to the IntelliJ instructions above.","s":"Installation","u":"/docs/Editor Integration","h":"#installation","p":281},{"i":286,"t":"Pluto provides a more intuitive way to handle errors than pcall and xpcall. pluto local function get_fruit_rating(fruit) return switch fruit do case \"apple\" -> 8 case \"banana\" -> 7 case \"orange\" -> 9 case \"mango\" -> 10 case \"grape\" -> 6 case \"strawberry\" -> 9 case \"cucumber\", \"tomato\" -> error(\"What are you, a botanist?\") end end local function try_get_fruit_rating(fruit) try return get_fruit_rating(fruit) catch e then if e:find(\"What are you, a botanist?\") then return -10 end end end print(try_get_fruit_rating(\"apple\")) --> 8 print(try_get_fruit_rating(\"cucumber\")) --> -10 print(try_get_fruit_rating(\"car\")) --> nil Copy Try It Yourself​","s":"Try-Catch Statement","u":"/docs/New Features/Try-Catch Statement","h":"","p":285},{"i":288,"t":"You may need to use pluto_try and pluto_catch instead. Alternatively, pluto_use try, catch will enable both keywords independently of the environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Try-Catch Statement","h":"#using-compatibility-mode","p":285},{"i":290,"t":"Type-hinting looks like this: pluto local var: string = \"hello world\" Copy It works with functions too: pluto local function myfunc(a: string, b: string): number return tonumber(a) + tonumber(b) end print(myfunc(1, \"1\")) -- This will emit a warning for argument type mismatch. Copy There's no effect on performance. This is implemented entirely during the compilation phase.","s":"Type Hinting","u":"/docs/New Features/Type Hinting","h":"","p":289},{"i":292,"t":"string number int float boolean/bool function table userdata void (return type only) Prefix a ? to indicate nil-able types, e.g. ?string indicates that it may be nil or a string. You can also use | to delimit alternatives, e.g. string|int indicates that it may be a string or an int. Putting all of this together, we could also have e.g. ?string|int to indicate that it may be nil, a string, or an int. info This is a WIP feature, and it's very difficult to implement in a one-pass compiler. Allow tolerance for missing coverage, and report any bugs.","s":"What types can I use?","u":"/docs/New Features/Type Hinting","h":"#what-types-can-i-use","p":289},{"i":295,"t":"These operators function the same, but they're more consistent with what's been standardized through programming today. ! is an alias for not, the boolean inversion operator. != is an alias for ~=, the inequality operator.","s":"Operator Aliases","u":"/docs/New Operators","h":"#operator-aliases","p":293},{"i":297,"t":"A plethora of compound operators are available in Pluto: Addition: += Subtraction: -= Multiplication: *= Float division: /= Integer division: //= Modulo: %= Exponent: ^= Bitwise AND: &= Bitwise OR: |= Bitwise XOR: ~= In Lua, the inequality operator cannot be used in statements. It must be used in expressions. Because compound operators can only be used in statements (and cannot be used in expressions), this is not a compatibility break. Bitshift left: <<= Bitshift right: >>= Concatenation: ..= Nil-Coalescing: ??= pluto local a = 1 a = a + 1 a += 1 Copy info Compound operators are syntactic sugar. They'll call the same metamethods as their non-compound counterparts.","s":"Compound Operators","u":"/docs/New Operators","h":"#compound-operators","p":293},{"i":299,"t":"The nil-coalescing operator is helpful for evaluating values against nil. If the left-hand operand is nil, it returns the right-hand operand. Otherwise, it returns the left-hand operand. pluto local function say(message) print(message ?? \"The message was nil.\") end say() --> The message was nil. say(nil) --> The message was nil. say(\"Hello, world!\") --> Hello, world! Copy It's a cleaner version of this code: pluto local function say(message) if message == nil then message = \"The message was nil.\" end print(message) end say() --> The message was nil. say(nil) --> The message was nil. say(\"Hello, world!\") --> Hello, world! Copy You can even use compound assignment: pluto local function say(message) message ??= \"The message was nil.\" print(message) end say() --> The message was nil. say(nil) --> The message was nil. say(\"Hello, world!\") --> Hello, world! Copy info This operator does not implement any metamethods.","s":"Coalescing Operator","u":"/docs/New Operators","h":"#coalescing-operator","p":293},{"i":301,"t":"The Walrus operator allows you to perform assignments inside of conditional expresssions. pluto if a := get_value() then -- 'a' was assigned a truthy value. else -- 'a' was assigned a falsy value. end Copy You can imagine it like this, but note they're not always the same: pluto do local a = get_value() if a then -- 'a' was assigned a truthy value. else -- 'a' was assigned a falsy value. end end Copy Note that for while-loops, it will be executed as many times as the condition: Pluto Way pluto while a := next_value() do -- ... end Copy Lua Way pluto while true do local a = next_value() if not a then break end -- ... end Copy","s":"Walrus Operator","u":"/docs/New Operators","h":"#walrus-operator","p":293},{"i":303,"t":"The spaceship operator, also known as the three-way comparison operator, allows you to quickly compare 2 values for equality and order. pluto local eq = 1 <=> 1 local lt = 3 <=> 42 local gt = 9 <=> 5 print(eq, lt, gt) --> 0, -1, 1 Copy It works with any type that supports __eq and __lt, making it well-suited for usage in generic algorithms like sorting. The return values are designed such that you can compare them to 0, e.g. with the values from above: pluto print(eq <= 0) --> true print(lt <= 0) --> true print(gt <= 0) --> false Copy","s":"Spaceship Operator","u":"/docs/New Operators","h":"#spaceship-operator","p":293},{"i":305,"t":"The pipe operator allows you represent data pipelines more succinctly. pluto local { http, json } = require \"pluto:*\" http.request(\"https://httpbin.org/get\") |> json.decode |> dumpvar |> print --> { --> [\"args\"] = {}, --> [\"headers\"] = { --> [\"Host\"] = string(11) \"httpbin.org\", --> [\"User-Agent\"] = string(56) \"Mozilla/5.0 (compatible; Soup Library; +https://soup.do)\", --> [\"X-Amzn-Trace-Id\"] = string(40) \"Root=1-65e05b66-6aa8b7c94e7580774a804c24\", --> [\"Accept-Encoding\"] = string(13) \"deflate, gzip\", --> }, --> [\"origin\"] = string(13) \"1.2.3.4\", --> [\"url\"] = string(23) \"https://httpbin.org/get\", --> } Copy Try It Yourself​ The HTTP-to-print pipeline here would otherwise be written like this: pluto print(dumpvar(json.decode((http.request(\"https://httpbin.org/get\"))))) Copy Note that the pipe operator only passes on the first return value, which is classically achieved by wrapping the expression in an extra pair of parentheses.","s":"Pipe Operator","u":"/docs/New Operators","h":"#pipe-operator","p":293},{"i":307,"t":"It is also possible to provide additional arguments for the righthand side of the pipe operator: pluto local producer = || -> \"10\" producer() |> tonumber|16| |> print --> 16 Copy Try It Yourself​","s":"Additional Arguments","u":"/docs/New Operators","h":"#additional-arguments","p":293},{"i":309,"t":"There is specialized syntax for method calls with the pipe operator, too: pluto local producer = || -> 21 local obj = { function multiply(value) return value * self.factor end } obj.factor = 2 producer() |> obj:multiply |> print --> 42 Copy Try It Yourself​","s":"Methods Calls","u":"/docs/New Operators","h":"#methods-calls","p":293},{"i":311,"t":"The righthand side of the pipe operator can also be an anonymous function, allowing for more advanced usage like this: pluto local producer = || -> 42 producer() |> |res| -> print($\"The result was {res}\") --> The result was 42 Copy Try It Yourself​","s":"Anonymous Functions","u":"/docs/New Operators","h":"#anonymous-functions","p":293},{"i":313,"t":"The pairs and ipairs functions are optimized in Pluto. On a consistent basis, pairs & ipairs loops are 3.5x faster than their Lua counterparts.","s":"For Loops","u":"/docs/Optimizations/For Loops","h":"","p":312},{"i":315,"t":"It doesn't operate under all circumstances though, the state of the iterator is stored in the to-be-closed variable returned by these functions, which is the last variable they give. If you interact or modify this variable, then the optimization won't occur. pairs: next, table, nil, nil ipairs: ipairsaux, table, integer, nil Copy As long as you don't access the last nil value, you're fine. info This optimization was published and implemented entirely by Xmelia Hermit.","s":"How does it work?","u":"/docs/Optimizations/For Loops","h":"#how-does-it-work","p":312},{"i":317,"t":"Pluto aims to be source- and bytecode-compatible with existing Lua code such that it can simply be used as a drop-in replacement for Lua, and Lua modules can simply be used in Pluto codebases. In the vast majority of cases, we do succeed, but there are a few things to be aware of.","s":"Compatibility","u":"/docs/Compatibility","h":"","p":316},{"i":319,"t":"Pluto adds the following reserved tokens: switch continue enum new class parent export try catch Which means you can't use them as identifiers. They can still be used with short-hand table indexes and goto labels because Pluto allows reserved keywords to be used in those contexts.","s":"New Keywords","u":"/docs/Compatibility","h":"#new-keywords","p":316},{"i":321,"t":"For Integrators: Check your luaconf.h file to find the relevant macros under the \"Compatibility\" heading. For Scripters: Use pluto_use in the source files. -- @pluto_use * = false to simply disable all incompatible keywords. For Users: Pass the -c flag to pluto or plutoc. The following sections will go more in-depth on source-level mitigations (for scripters).","s":"Mitigations","u":"/docs/Compatibility","h":"#mitigations","p":316},{"i":323,"t":"You can change the meaning of Pluto's reserved tokens at any point in your scripts using the --@pluto_use comment or pluto_use statement. For example, to disable all non-compatible keywords except for switch: pluto -- @pluto_use * = false, switch Copy It is also possible to specify a version number, which is a shorthand for the keywords available at that version: \"0.2.0\" corresponds to * = false, switch, continue \"0.5.0\" corresponds to * = false, switch, continue, enum \"0.6.0\" corresponds to * = false, switch, continue, enum, new, class, parent, export \"0.8.0\" corresponds to * = false, switch, continue, enum, new, class, parent, export, try, catch So, writing a portable script that only makes use of Pluto 0.8.0's features requires this at the beginning: pluto pluto_use \"0.8.0\" Copy This feature also supports quick encompassing of optional features. So, instead of: pluto pluto_use \"0.8.0\", global Copy You can use a '+' after the version number to also enable all of the optional features. As of 0.9.0, the only optional feature is explicit globals (global). pluto pluto_use \"0.9.0+\" -- The same as pluto_use \"0.9.0\", global Copy For module developers and scripts which may be used in future versions of Pluto, we recommend you use pluto_use for two reasons: Portability. This will override the compatibility mode settings compiled into Pluto so your script will be parsed identically in all Pluto environments. Proactive compatibility. Any keywords added by future versions of Pluto will also be put in compatibility mode by these statements, so in the off-chance your script uses a future reserved keyword as a variable name, it would still parse as you intended when you wrote it.","s":"Compile-time Configuration (pluto_use)","u":"/docs/Compatibility","h":"#compile-time-configuration-pluto_use","p":316},{"i":325,"t":"Another way of using Pluto's features regardless of compatibility mode is by prefixing the keyword with pluto_. For example, switch becomes pluto_switch. These Compatibility Mode variants will always be valid, even when Compatibility Mode is disabled. These are what they look like: pluto_switch pluto_continue pluto_enum pluto_new pluto_class pluto_parent pluto_export pluto_try pluto_catch","s":"Compatible Keywords","u":"/docs/Compatibility","h":"#compatible-keywords","p":316},{"i":327,"t":"This is a feature in Pluto that, by itself, is a benign QoL improvement for developers. However, in combination with our added standard library functions like table.min, it can be an unexpected semantic change: pluto local function roll(opts) return math.random(opts.min or 1, opts.max or 100) end print(roll{ max = 10 }) Copy pluto: test.pluto:2: bad argument #1 to 'random' (number expected, got function) stack traceback: [C]: in function 'math.rand' test.pluto:2: in local 'roll' test.pluto:4: in main chunk Copy Integrators can disable this feature by defining the PLUTO_NO_DEFAULT_TABLE_METATABLE macro in their luaconf.h or build config, to aid in a smooth transition, should scripts in their ecosystem require it. Scripters are advised to use rawget and/or type to better codify their expectations. For example, the example above seems to care only about providing fallback values and not at all about type-checking, so rawget would be an excellent fit for it: pluto local function roll(opts) return math.random(rawget(opts, \"min\") or 1, rawget(opts, \"max\") or 100) end print(roll{ max = 10 }) Copy","s":"Default Table Metatable","u":"/docs/Compatibility","h":"#default-table-metatable","p":316},{"i":329,"t":"Special arithmetic algorithms are optimized by Pluto during compile-time. For example: x << 1 => x + x x ** 2 => x * x x // 2 => x >> 1 These can offer upwards of a 20% performance boost. These expressions are only optimized when both operands are integers, and no metamethod will be called.","s":"Special Arithmetic","u":"/docs/Optimizations/Special Arithmetic","h":"","p":328},{"i":331,"t":"Pluto allows you to concatenate boolean values just like you would number values: pluto local iVar = 13 local bVar = true print(\"iVar = \" .. iVar) print(\"bVar = \" .. tostring(bVar)) -- Lua way print(\"bVar = \" .. bVar) -- Pluto way Copy","s":"Boolean Concatenation","u":"/docs/QoL Improvements/Boolean Concatenation","h":"","p":330},{"i":333,"t":"Lua implemented a jump table, but it is only compatible with clang and gcc. Pluto has an additional jump table implementation for other compilers; however, it is not enabled by default because it can add minutes to compile time, depending on the setup. However, it may be beneficial to you regardless, as a jump table can increase virtual machine performance by up to 5%. If you would like to try it, define PLUTO_FORCE_JUMPTABLE in luaconf.h or your build config.","s":"Jump Table","u":"/docs/Optimizations/Jump Table","h":"","p":332},{"i":335,"t":"Pluto will cache the length of a table when you request it for the first time. This cache is refreshed whenever you make an edit to the table. It's still advisable to localize this value though, since looking through the cache and the virtual machine is expensive compared to looking up a local.","s":"Table Length","u":"/docs/Optimizations/Table Length","h":"","p":334},{"i":337,"t":"The parenthesis around some types of expressions are optional now. Gross Way pluto print((\"hello world\"):contains(\"world\")) Copy Clean Way pluto print(\"hello world\":contains(\"world\")) Copy This also works for table types.","s":"Optional Parentheses","u":"/docs/QoL Improvements/Optional Parentheses","h":"","p":336},{"i":339,"t":"Pluto's virtual machine allows you to simply iterate over tables without having to explicitly call a function: New Code pluto local t = { 1, 2, 3, \"hello\", \"world\" } for key, value in t do print(key, value) end Copy When you omit the function from the loop preparation, next is implicitly inserted. So, that code is identical to this: Old Code pluto local t = { 1, 2, 3, \"hello\", \"world\" } for key, value in next(t) do print(key, value) end Copy This is compatible with for-loop optimizations. caution The bytecode of this feature is not backwards-compatible with Lua.","s":"Generalized Iteration","u":"/docs/QoL Improvements/Generalized Iteration","h":"","p":338},{"i":341,"t":"Pluto removes the locals limit, allowing you to use compile-time constants, including enums, as much as you want. Note that you are still limited to 255 registers, so you can't have infinite dynamic variables per function.","s":"Removed Locals Limit","u":"/docs/QoL Improvements/Removed Locals Limit","h":"","p":340},{"i":343,"t":"Pluto allows you to use reserved tokens such as if from Lua and class from Pluto as identifiers with shorthand table syntax and for goto labels. Reserved tokens as identifiers with shorthand table syntax pluto local t = { class = \"key\" } print(t.class) Copy Reserved tokens as identifiers for goto labels pluto -- Print every number besides five. for i = 1, 10 do if i == 5 then goto continue end print(i) ::continue:: end Copy However, variable names and function calls will not allow you to use reserved tokens as identifiers.","s":"Reserved Identifiers","u":"/docs/QoL Improvements/Reserved Identifiers","h":"","p":342},{"i":345,"t":"The messages for syntax errors are enhanced. They include tailored messages and code snippets, which should help newer programmers identify problems quicker. It's not a game changer, but it's neat.","s":"Syntax Errors","u":"/docs/QoL Improvements/Syntax Errors","h":"","p":344},{"i":347,"t":"Problematic Code pluto if a < b and t == 5 return \"Gottem\" end Copy Emitted Syntax Error syntax error: file.pluto:1: expected 'then' to delimit condition. 1 | if a < b and t == 5 return \"Gottem\" end | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: expected 'then' symbol. Copy","s":"Example 1","u":"/docs/QoL Improvements/Syntax Errors","h":"#example-1","p":344},{"i":349,"t":"Problematic Code pluto local fn = |a, b, c| => (a == b and a < c) Copy Emitted Syntax Error syntax error: file.pluto:1: impromper lambda definition 1 | local fn = |a, b, c| => (a == b and a < c) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: expected '->' arrow syntax for lambda expression. Copy","s":"Example 2","u":"/docs/QoL Improvements/Syntax Errors","h":"#example-2","p":344},{"i":351,"t":"These errors support coloring, but it's disabled by default. Define the PLUTO_USE_COLORED_OUTPUT macro in luaconf.h or your build config to enable colored error messages. tip For Windows users, you can enable ANSI coloring support with the following command: REG ADD HKCU\\CONSOLE /f /v VirtualTerminalLevel /t REG_DWORD /d 1","s":"ANSI Coloring","u":"/docs/QoL Improvements/Syntax Errors","h":"#ansi-coloring","p":344},{"i":353,"t":"Must be included via require.","s":"Base32","u":"/docs/Runtime Environment/Base32","h":"","p":352},{"i":355,"t":"Returns an encoded base32 string. Parameters​ data — A string of data to encode. pad — Whether or not to apply padding. Defaults to true.","s":"base32.encode","u":"/docs/Runtime Environment/Base32","h":"#base32encode","p":352},{"i":357,"t":"Returns a decoded base32 string. Parameters​ data — A string of base32 data to decode.","s":"base32.decode","u":"/docs/Runtime Environment/Base32","h":"#base32decode","p":352},{"i":359,"t":"The CaT module is available via require \"pluto:cat\" and provides encoding and decoding for the Colons and Tabs format.","s":"CaT","u":"/docs/Runtime Environment/CaT","h":"","p":358},{"i":361,"t":"Returns a string of CaT. Parameters​ data — The table to encode in CaT. pluto local cat = require \"pluto:cat\" cat.encode { List = { __value = \"With Value\", Child = \"Also With Value\" } } |> io.write --> List: With Value --> Child: Also With Value Copy","s":"cat.encode","u":"/docs/Runtime Environment/CaT","h":"#catencode","p":358},{"i":363,"t":"Returns a table representing the CaT data. Parameters​ data — The CaT data to decode. presentation — How to represent the data as a table. Can be \"flat\", \"flatwithorder\", or \"full\" (default). pluto local cat = require \"pluto:cat\" local data = cat.decode [[ List: With Value Child: Also With Value ]] print(dumpvar(data)) --> { --> [1] = { --> [\"value\"] = string(10) \"With Value\", --> [\"name\"] = string(4) \"List\", --> [\"children\"] = { --> [1] = { --> [\"name\"] = string(5) \"Child\", --> [\"value\"] = string(15) \"Also With Value\", --> }, --> }, --> }, --> } Copy With the default \"full\" representation, the retuned table has an __index metamethod for ease of use: pluto print(data.List.value) --> With Value print(data.List.Child.value) --> Also With Value Copy Alternatively, the other representations are available: pluto local cat = require \"pluto:cat\" print(dumpvar(cat.decode([[ home john hello.txt: Hello, world! ]], \"flat\"))) --> { --> [\"home\"] = { --> [\"john\"] = { --> [\"hello.txt\"] = string(13) \"Hello, world!\", --> }, --> }, --> } Copy pluto local cat = require \"pluto:cat\" print(dumpvar(cat.decode([[ Primary Color: Purple Secondary Color: White ]], \"flatwithorder\"))) --> { --> [\"__order\"] = { --> [1] = string(13) \"Primary Color\", --> [2] = string(15) \"Secondary Color\", --> }, --> [\"Primary Color\"] = string(6) \"Purple\", --> [\"Secondary Color\"] = string(5) \"White\", --> } Copy","s":"cat.decode","u":"/docs/Runtime Environment/CaT","h":"#catdecode","p":358},{"i":365,"t":"Must be included via require.","s":"Base64","u":"/docs/Runtime Environment/Base64","h":"","p":364},{"i":367,"t":"Returns a base64-encoded string. Parameters​ data — A string of data to encode. pad — Whether or not to apply padding. Defaults to true. pluto local base64 = require(\"base64\") print(base64.encode(\"Hello, World!\")) --> SGVsbG8sIFdvcmxkIQ== Copy","s":"base64.encode","u":"/docs/Runtime Environment/Base64","h":"#base64encode","p":364},{"i":369,"t":"Returns a decoded base64 string. Parameters​ data — A string of base64 data. pluto local base64 = require(\"base64\") print(base64.decode(\"SGVsbG8sIFdvcmxkIQ==\")) --> Hello, world! Copy","s":"base64.decode","u":"/docs/Runtime Environment/Base64","h":"#base64decode","p":364},{"i":371,"t":"Returns a base64url-encoded string. This variant is sometimes refered to as filename safe base64. Parameters​ data — A string of data to encode. pad — Whether or not to apply padding. Defaults to false. pluto local base64 = require(\"base64\") print(base64.urlencode(\"Hello, World!\")) --> SGVsbG8sIFdvcmxkIQ Copy","s":"base64.urlencode","u":"/docs/Runtime Environment/Base64","h":"#base64urlencode","p":364},{"i":373,"t":"Similar to base64.decode except for base64url. Parameters​ data — A string of base64 data. pluto local base64 = require(\"base64\") print(base64.urldecode(\"SGVsbG8sIFdvcmxkIQ\")) --> Hello, world! Copy","s":"base64.urldecode","u":"/docs/Runtime Environment/Base64","h":"#base64urldecode","p":364},{"i":375,"t":"Must be included via require.","s":"Bigint","u":"/docs/Runtime Environment/Bigint","h":"","p":374},{"i":377,"t":"To instantiate a bigint, you can call the bigint.new function, or use the new operator. Parameters​ The decimal value of the bigint. pluto local bigint = require \"pluto:bigint\" print(new bigint(\"123\")) --> 123 Copy","s":"bigint.new","u":"/docs/Runtime Environment/Bigint","h":"#bigintnew","p":374},{"i":379,"t":"As seen above, the __tostring metamethod provides a string representation of the Bigint in decimal.","s":"bigint.tostring, __tostring","u":"/docs/Runtime Environment/Bigint","h":"#biginttostring-__tostring","p":374},{"i":381,"t":"Provides a hexadecimal representation of the Bigint. pluto local bigint = require \"pluto:bigint\" print(new bigint(\"420\"):hex()) --> 1A4 Copy","s":"bigint.hex","u":"/docs/Runtime Environment/Bigint","h":"#biginthex","p":374},{"i":383,"t":"Provides a binary representation of the Bigint. pluto local bigint = require \"pluto:bigint\" print(new bigint(\"420\"):binary()) --> 110100100 Copy","s":"bigint.binary","u":"/docs/Runtime Environment/Bigint","h":"#bigintbinary","p":374},{"i":385,"t":"Adds two bigints together. Returns a new bigint.","s":"bigint.add, __add","u":"/docs/Runtime Environment/Bigint","h":"#bigintadd-__add","p":374},{"i":387,"t":"Performs subtraction on two bigints. Returns a new bigint.","s":"bigint.sub, __sub","u":"/docs/Runtime Environment/Bigint","h":"#bigintsub-__sub","p":374},{"i":389,"t":"Performs multiplication on two bigints. Returns a new bigint.","s":"bigint.mul, __mul","u":"/docs/Runtime Environment/Bigint","h":"#bigintmul-__mul","p":374},{"i":391,"t":"Performs division on two bigints. Returns two new bigints: quotient and remainder. pluto local bigint = require \"pluto:bigint\" print(new bigint(10):div(new bigint(3))) --> 3 1 Copy","s":"bigint.div","u":"/docs/Runtime Environment/Bigint","h":"#bigintdiv","p":374},{"i":393,"t":"Performs division on two bigints. Returns a new bigint with the quotient. pluto local bigint = require \"pluto:bigint\" print(new bigint(10) / new bigint(3)) --> 3 Copy","s":"__div","u":"/docs/Runtime Environment/Bigint","h":"#__div","p":374},{"i":395,"t":"Performs divison on two bigints. Returns a new bigint with the remainder. pluto local bigint = require \"pluto:bigint\" print(new bigint(10) % new bigint(3)) --> 1 Copy","s":"bigint.mod, __mod","u":"/docs/Runtime Environment/Bigint","h":"#bigintmod-__mod","p":374},{"i":397,"t":"Performs expontentiation on two bigints. Returns a new bigint. pluto local bigint = require \"pluto:bigint\" print(new bigint(2) ^ new bigint(10)) --> 1024 Copy","s":"bigint.pow, __pow","u":"/docs/Runtime Environment/Bigint","h":"#bigintpow-__pow","p":374},{"i":399,"t":"Returns the position of the most significant set bit as a plain integer. pluto local bigint = require \"pluto:bigint\" print(new bigint(420):bitlength()) --> 9 Copy","s":"bigint.bitlength","u":"/docs/Runtime Environment/Bigint","h":"#bigintbitlength","p":374},{"i":401,"t":"This page documents the changes & additions to the coroutine library in Pluto, which is built on top of Lua 5.4's.","s":"Coroutine","u":"/docs/Runtime Environment/Coroutine","h":"","p":400},{"i":403,"t":"An alternative to coroutine.resume that rethrows any errors thrown by the coroutine.","s":"coroutine.xresume","u":"/docs/Runtime Environment/Coroutine","h":"#coroutinexresume","p":400},{"i":405,"t":"Yields the current coroutine for the given number of milliseconds. Parameters​ The number of milliseconds to yield for.","s":"coroutine.sleep","u":"/docs/Runtime Environment/Coroutine","h":"#coroutinesleep","p":400},{"i":407,"t":"Must be included via require.","s":"Assert","u":"/docs/Runtime Environment/Assert","h":"","p":406},{"i":409,"t":"Asserts that value is nil Parameters​ value — The value which should be nil. Errors​ An assertion error is thrown if the value is not nil. pluto local assert = require(\"assert\") assert.isnil(nil) -- Passes. assert.isnil(5) -- Error: --[[ test.pluto:4 -> Assertion Error: (assert.isnil) Intended Value: nil Received Value: 5 stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) [C]: in ? --]] Copy","s":"assert.isnil","u":"/docs/Runtime Environment/Assert","h":"#assertisnil","p":406},{"i":411,"t":"Asserts that value is true. Parameters​ value — The value which should be true. Errors​ An assertion error is thrown if value is not true pluto local assert = require(\"assert\") assert.istrue(true) -- Passes. assert.istrue(false) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.istrue) Intended Value: true Received Value: false stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) test.pluto:4: in main chunk [C]: in ? --]] Copy","s":"assert.istrue","u":"/docs/Runtime Environment/Assert","h":"#assertistrue","p":406},{"i":413,"t":"Asserts that value is false. Parameters​ value — The value which should be false. Errors​ An assertion error is thrown if value is not false. pluto local assert = require(\"assert\") assert.isfalse(false) -- Passes. assert.isfalse(true) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.isfalse) Intended Value: false Received Value: true stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) test.pluto:4: in main chunk [C]: in ? --]] Copy","s":"assert.isfalse","u":"/docs/Runtime Environment/Assert","h":"#assertisfalse","p":406},{"i":415,"t":"Asserts that value is a \"falsy\" value. Falsy means the value is nil or false. Parameters​ value — The value which should be falsy. Errors​ An assertion error is thrown if value is not falsy. pluto local assert = require(\"assert\") assert.falsy(nil) -- Passes. assert.falsy(false) -- Passes. assert.falsy(\"Hello, world!\") -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.falsy) Intended Value: nil or false Received Value: string(13) \"Hello, world!\" stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) test.pluto:4: in main chunk [C]: in ? --]] Copy","s":"assert.falsy","u":"/docs/Runtime Environment/Assert","h":"#assertfalsy","p":406},{"i":417,"t":"Asserts that value is a \"truthy\" value. This is the inverse of \"falsy\", a.k.a, any value that isn't nil or false is truthy. Parameters​ value — The value which should be truthy, a.k.a it should not be nil or false. Errors​ An assertion error is thrown if value is not truthy, i.e if value is nil or false. pluto local assert = require(\"assert\") assert.truthy(\"Hello, world!\") -- Passes. assert.truthy(nil) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.truthy) Intended Value: not nil or false Received Value: nil stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) test.pluto:4: in main chunk [C]: in ? --]] Copy","s":"assert.truthy","u":"/docs/Runtime Environment/Assert","h":"#asserttruthy","p":406},{"i":419,"t":"Asserts that value is not nil. Parameters​ value — The value which should not be nil. Errors​ An assertion error is thrown if value is nil. pluto local assert = require(\"assert\") assert.notnil(\"Hello, world!\") -- Passes. assert.notnil(nil) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.notnil) Intended Value: not nil Received Value: nil stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) test.pluto:4: in main chunk [C]: in ? --]] Copy","s":"assert.notnil","u":"/docs/Runtime Environment/Assert","h":"#assertnotnil","p":406},{"i":421,"t":"Asserts that value1 is equal to value2. This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step. Parameters​ value1 — The first value. value2 — The second value. Errors​ An assertion error is thrown if value1 does not equal value2. pluto local assert = require(\"assert\") assert.equal(\"Hello, world!\", \"Hello, world...\") -- Error: --[[ pluto: test.pluto:3 -> Assertion Error: (assert.equal) Intended Value: string(13) \"Hello, world!\" Received Value: string(15) \"Hello, world...\" --]] assert.equal(\"Hi there.\":split(\" \"), \"Hello there.\":split(\" \")) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.equal) Intended Value: { [1] = string(2) \"Hi\", [2] = string(6) \"there.\", } Received Value: { [1] = string(5) \"Hello\", [2] = string(6) \"there.\", } --]] Copy","s":"assert.equal","u":"/docs/Runtime Environment/Assert","h":"#assertequal","p":406},{"i":423,"t":"Asserts that value1 is not equal to value2. This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step. Parameters​ value1 — The first value. value2 — The second value. Errors​ An assertion error is thrown of value1 does equal value2. pluto local assert = require(\"assert\") assert.nequal(\"Hello, world!\", \"Hi, world!\") -- Passes. assert.nequal(\"Hi there.\":split(\" \"), \"Hello there.\":split(\" \")) -- Passes. Copy","s":"assert.nequal","u":"/docs/Runtime Environment/Assert","h":"#assertnequal","p":406},{"i":425,"t":"Asserts that value1 is less than value2. Parameters​ value1 — The first number. value2 — The second number. Errors​ An assertion error is thrown if value1 is not less than value2. pluto local assert = require(\"assert\") assert.less(1, 2) -- Passes. assert.less(1, 1) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.less) Expression: (1 < 1) == false --]] Copy","s":"assert.less","u":"/docs/Runtime Environment/Assert","h":"#assertless","p":406},{"i":427,"t":"Asserts that value1 is less than or equal to value2. Parameters​ value1 — The first number. value2 — The second number. Errors​ An assertion error is thrown if value1 is not less than or equal to value2. pluto local assert = require(\"assert\") assert.lesseq(1, 2) -- Passes. assert.lesseq(1, 0) -- Error: --[[ pluto: test.pluto:3 -> Assertion Error: (assert.lesseq) Expression: (1 <= 0) == false --]] Copy","s":"assert.lesseq","u":"/docs/Runtime Environment/Assert","h":"#assertlesseq","p":406},{"i":429,"t":"Asserts that value1 is greater than value2. Parameters​ value1 — The first number. value2 — The second number. Errors​ An assertion errros is thrown if value1 is not greater than value2. pluto local assert = require(\"assert\") assert.greater(3, 2) -- Passes. assert.greater(3, 3) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.greater) Expression: (3 > 3) == false --]] Copy","s":"assert.greater","u":"/docs/Runtime Environment/Assert","h":"#assertgreater","p":406},{"i":431,"t":"Asserts that value1 is greater than or equal to value2. Parameters​ value1 — The first number. value2 — The second number. Errors​ An assertion errros is thrown if value1 is not greater than or equal to value2. pluto local assert = require(\"assert\") assert.greatereq(3, 2) -- Passes. assert.greatereq(3, 3) -- Passes. Copy","s":"assert.greatereq","u":"/docs/Runtime Environment/Assert","h":"#assertgreatereq","p":406},{"i":433,"t":"Asserts that callback does not raise an error when called. Parameters​ callback — A function reference. ... — Any other parameters passed to this function will be passed to the callback. Errors​ An assertion error is thrown if callback raises an error. pluto local assert = require(\"assert\") assert.noerror(tostring, 400) -- Passes. assert.noerror(error, \"argument argument\") -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.noerror) An error was raised: argument argument --]] Copy","s":"assert.noerror","u":"/docs/Runtime Environment/Assert","h":"#assertnoerror","p":406},{"i":435,"t":"Asserts that callback does raise an error when called. Parameters​ callback — A function reference. ... — Any other parameters passed to this function will be passed to the callback. Errors​ An assertion error is thrown if callback does not raise an error. pluto local assert = require(\"assert\") assert.haserror(error, \"argument argument\") -- Passes. assert.haserror(tostring, 400) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.haserror) Expected an error, but there was none. --]] Copy","s":"assert.haserror","u":"/docs/Runtime Environment/Assert","h":"#asserthaserror","p":406},{"i":437,"t":"Asserts that callback raises an error, and that substring is present within the error message. Parameters​ substring — The substring that should be inside of the error message. callback — A function reference. ... — Any other parameters passed to this function will be passed to the callback. Errors​ An assertion error is thrown if: callback does not raise an error. callback does raise an error, but the error message does not contain substring. pluto local assert = require(\"assert\") assert.searcherror(\"argument\", error, \"argument argument\") -- Passes. assert.searcherror(\"something\", tostring, 400) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.searcherror) Expected an error, but there was none. --]] assert.searcherror(\"argument\", error, \"argument argument\") -- Passes. assert.searcherror(\"argument\", error, \"something something\") -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.searcherror) Absent String: argument Error Message: something s --]] Copy","s":"assert.searcherror","u":"/docs/Runtime Environment/Assert","h":"#assertsearcherror","p":406},{"i":439,"t":"This page documents the changes & additions to Pluto's runtime environment, which is built on top of Lua 5.4's.","s":"Global & Base","u":"/docs/Runtime Environment/Global & Base","h":"","p":438},{"i":441,"t":"_PVERSION is the global to check your current version of Pluto.","s":"_PVERSION","u":"/docs/Runtime Environment/Global & Base","h":"#_pversion","p":438},{"i":443,"t":"_PSOUP is a global boolean you can access to check linkage with Soup. Always true as of 0.8.0.","s":"_PSOUP","u":"/docs/Runtime Environment/Global & Base","h":"#_psoup","p":438},{"i":445,"t":"os.platform is a global string containing the host platform. Can be \"windows\", \"wasm\", \"linux\", \"macos\", \"android\", or \"unknown\". pluto if _PVERSION == nil then print(\"Plain Lua detected (\".._VERSION..\")\") else io.write(\"Pluto detected (\".._PVERSION..\"), based on \".._VERSION) if os.platform then io.write(\", running on \"..os.platform) end io.write(\"\\n\") end Copy","s":"os.platform","u":"/docs/Runtime Environment/Global & Base","h":"#osplatform","p":438},{"i":447,"t":"package.path is modified to also search for .pluto files.","s":"package.path","u":"/docs/Runtime Environment/Global & Base","h":"#packagepath","p":438},{"i":449,"t":"Tables and coroutines/threads have metatables by default, akin to how each string has a metatable by default. pluto local t = {} local c = coroutine.create(|| -> do end) -- Can do this: t:contains(1) t:concat(\"\\n\") c:resume() -- As opposed to this: table.contains(t, 1) table.concat(t, \"\\n\") coroutine.resume(c) Copy This behavior is implemented by setting the __index metamethod to the respective library (_G.table or _G.coroutine). If you override the metatable, you may want to replicate that.","s":"Default Metatables","u":"/docs/Runtime Environment/Global & Base","h":"#default-metatables","p":438},{"i":451,"t":"A debug function designed to dump values into human-readable formats. Parameters​ The value to dump. Returns​ A string representation of the value. pluto local t = { [\"hello\"] = 1234, [\"goodbye\"] = _G.table, [\"name\"] = \"John\", [\"lastname\"] = \"Doe\", [\"details\"] = { \"No details available.\" } } print(dumpvar(t)) Copy { [\"lastname\"] = string(3) \"Doe\", [\"name\"] = string(4) \"John\", [\"goodbye\"] = { [\"unpack\"] = function: 00007FF7738B3C20, [\"insert\"] = function: 00007FF7738B30D0, [\"freeze\"] = function: 00007FF7738B43F0, [\"foreach\"] = function: 00007FF7738B3220, [\"filter\"] = function: 00007FF7738B4700, [\"isfrozen\"] = function: 00007FF7738B44B0, [\"getn\"] = function: 00007FF7738B43B0, [\"pack\"] = function: 00007FF7738B3B10, [\"contains\"] = function: 00007FF7738B4540, [\"move\"] = function: 00007FF7738B34D0, [\"concat\"] = function: 00007FF7738B37F0, [\"sort\"] = function: 00007FF7738B42B0, [\"remove\"] = function: 00007FF7738B33C0, [\"map\"] = function: 00007FF7738B49A0, }, [\"hello\"] = 1234, [\"details\"] = { [1] = string(21) \"No details available.\", }, } Copy","s":"dumpvar","u":"/docs/Runtime Environment/Global & Base","h":"#dumpvar","p":438},{"i":453,"t":"Similar to dumpvar, but returns valid Lua/Pluto code. May error if the value can not be represented accordingly. Parameters​ The value to dump. pluto -- Slightly altered data from last example as C functions can not be exported. local t = { [\"hello\"] = 1234, [\"name\"] = \"John\", [\"lastname\"] = \"Doe\", [\"details\"] = { \"No details available.\" } } print(exportvar(t)) Copy { [\"hello\"] = 1234, [\"name\"] = \"John\", [\"details\"] = { [1] = \"No details available.\", }, [\"lastname\"] = \"Doe\", } Copy","s":"exportvar","u":"/docs/Runtime Environment/Global & Base","h":"#exportvar","p":438},{"i":455,"t":"Returns a table of numbers in the given range. pluto print(range(10):unpack()) --> 1 2 3 4 5 6 7 8 9 10 print(range(4, 8):unpack()) --> 4 5 6 7 8 Copy","s":"range","u":"/docs/Runtime Environment/Global & Base","h":"#range","p":438},{"i":457,"t":"Performs a three-way comparison on 2 version numbers, similar to the Spaceship Operator. pluto assert(compareversions(\"1.0.0\", \"0.9.0\") >= 0) assert(compareversions(\"1.0.0\", \"1.0.0-dev\") >= 0) Copy Note that pre-release versions (e.g. with -dev suffix) are considered to be less than their final counterparts.","s":"compareversions","u":"/docs/Runtime Environment/Global & Base","h":"#compareversions","p":438},{"i":459,"t":"Calls the given function and returns a string of warnings raised by it. pluto local w = wcall(|| -> warn(\"Bad!\")) print(w ~= \"\" ? (w:strip()) : \"No warnings\") -- Output: \"Bad!\" Copy","s":"wcall","u":"/docs/Runtime Environment/Global & Base","h":"#wcall","p":438},{"i":461,"t":"Must be included via require.","s":"HTTP","u":"/docs/Runtime Environment/HTTP","h":"","p":460},{"i":463,"t":"Performs an HTTP request. Parameters​ The URL to send a request to as a string. This parameter is optional in the sense that the options table (parameter 2) can be parameter 1 instead, but must have the \"url\" option then. The table of options. This parameter is optional if a URL was given. Options​ method: The HTTP request method to use. Defaults to GET. headers: A table of headers, e.g. { [\"Content-Type\"] = \"application/json\" }. body: An optional request payload. If provided, the Content-Length header is set appropriately, and the method is set to POST unless otherwise specified. prefer_ipv6: (Does nothing in WASM builds of Pluto.) When establishing a new connection, we attempt to lookup and connect via IPv4, retrying with IPv6 if needed. If this is set to true, we instead start with IPv6. This may be useful for \"LAN\" services that identify the LAN via IPv6 instead of IPv4. dont_reuse: (Does nothing in WASM builds of Pluto.) Force the implementation not to reuse an existing socket, which may involve waiting. Instead a new connection is opened. This may be useful when many requests are headed to the same remote and you consider the time taken by a fresh handshake to be less than the time taken to wait to reuse. dont_make_reusable: (Does nothing in WASM builds of Pluto.) If a new connection to the remote was opened to carry out the request, close it again after the request. This is useful to avoid burdening the remote for one-off requests. Returns​ On success: The response body as a string. The status code as an integer. A table of response headers. Empty in WASM builds of Pluto. The status text as a string. On failure: Nil. An approximate failure reason as an English string. Not available in WASM builds of Pluto. Multitasking​ If called inside of a coroutine, this function yields. Otherwise, it blocks. In WASM builds of Pluto, it must be called inside of a coroutine that yields to the environment as otherwise the request cannot be dispatched. info The first request to a remote may take a while — especially with HTTPS — due to the TCP and TLS handshakes. We use keep-alive to keep the connection open, so subsequent requests to the same remote will be significantly faster. pluto local http = require \"pluto:http\" local body, status_code, headers, status_text = http.request(\"https://httpbin.org/anything\") print(status_code..\" \"..status_text) if os.platform != \"wasm\" then print(dumpvar(headers)) end print(body) Copy Try It Yourself​","s":"http.request","u":"/docs/Runtime Environment/HTTP","h":"#httprequest","p":460},{"i":465,"t":"Queries if a keep-alive connection is available for a remote. This function is not available in WASM builds of Pluto. Parameters​ A partial URL identifying the remote. Partial because only the protocol, host, and port are used; additional components such as path are ignored. Multitasking​ If called inside of a coroutine, this function may yield. Otherwise, it may block. pluto local { http, scheduler } = require \"*\" local sched = new scheduler() sched:addloop(function() print(http.hasconnection(\"https://httpbin.org\")) end) sched:add(function() print((http.request(\"https://httpbin.org/anything\"))) end) sched:run() Copy","s":"http.hasconnection","u":"/docs/Runtime Environment/HTTP","h":"#httphasconnection","p":460},{"i":467,"t":"Closes all keep-alive connections like when closing the Lua state but in a non-blocking way. This function does nothing in WASM builds of Pluto. Multitasking​ This function must be called inside of a coroutine, as it will yield.","s":"http.closeconnections","u":"/docs/Runtime Environment/HTTP","h":"#httpcloseconnections","p":460},{"i":469,"t":"The exception class makes errors easier to parse with where and what members, as opposed to having a string with both. For ease of use, constructing an exception automatically throws it. pluto try new exception(\"Not implemented\") catch e then print(e) -- same as error(\"Not implemented\") print(e.what) print(e.where) end Copy Output: script.pluto:2: Not implemented Not implemented script.pluto:2 Copy Try It Yourself​","s":"Exception","u":"/docs/Runtime Environment/Exception","h":"","p":468},{"i":471,"t":"Must be included via require.","s":"JSON","u":"/docs/Runtime Environment/JSON","h":"","p":470},{"i":473,"t":"Returns a string of JSON. Parameters​ data — A boolean, number, string, or table to encode as JSON. pretty — Whether to return a human-readable string of JSON. Defaults to false. pluto local json = require(\"json\") local data data = \"Hello, World!\" print(json.encode(data, true)) --> \"Hello, World!\" data = { key = \"Hello, World!\", nested = { nested_key = 1337 } } print(json.encode(data, true)) --> { --> \"key\": \"Hello, World!\", --> \"nested\": { --> \"nested_key\": 1337 --> } --> } Copy Because Lua tables do not have order guarantees, you can add an __order field to fix the order: pluto local t = { __order = { \"a\", \"b\", \"c\" }, a = 1, b = 2, c = 3 } print(require\"json\".encode(t)) -- {\"a\":1,\"b\":2,\"c\":3} Copy The json.null value — assuming you did local json = require(\"json\") — can be used to encode JSON null values. pluto local json = require(\"json\") print(json.encode(json.null)) --> null Copy","s":"json.encode","u":"/docs/Runtime Environment/JSON","h":"#jsonencode","p":470},{"i":475,"t":"Returns multiple potential types. If you pass a serialized boolean, number, or string, then it will return the same type. If you pass a complex JSON object, it will return a table. Parameters​ data — The JSON data to decode. flags — Options to augment the return value. Multiple options can be combined with bitwise OR (|). Defaults to 0. json.withnull — decodes JSON null values as json.null instead of nil. json.withorder — adds an __order field to tables of decoded JSON objects. json.encode respects this, so this is perfect for modifying data while preserving order. pluto local json = require(\"json\") local data, encoded, decoded -- Basic Type data = \"Hello, World!\" encoded = json.encode(data, true) decoded = json.decode(encoded) assert(decoded == data) assert(type(decoded) == \"string\") -- Complex Type data = { key = \"Hello\", nested = { nested_key = 1337 } } encoded = json.encode(data, true) decoded = json.decode(encoded) assert(decoded.key == \"Hello\") assert(type(decoded) == \"table\") assert(decoded.nested.nested_key == 1337) -- Flags encoded = [[{ \"null\": null, \"string\": \"Hello\" }]] decoded = json.decode(encoded, json.withnull | json.withorder) assert(decoded.__order[1] == \"null\") assert(decoded.null == json.null) assert(json.encode(decoded, true) == encoded) Copy","s":"json.decode","u":"/docs/Runtime Environment/JSON","h":"#jsondecode","p":470},{"i":477,"t":"This page documents the changes & additions to the io library in Pluto, which is built on top of Lua 5.4's.","s":"IO","u":"/docs/Runtime Environment/IO","h":"","p":476},{"i":479,"t":"A variant of Lua's os.rename that raises an error on failure and instead has no return values.","s":"io.rename","u":"/docs/Runtime Environment/IO","h":"#iorename","p":476},{"i":481,"t":"A variant of Lua's os.remove that raises an error on failure and instead has no return values.","s":"io.remove","u":"/docs/Runtime Environment/IO","h":"#ioremove","p":476},{"i":483,"t":"Copy a file to another file, creating a new file if needed. Parameters​ A string path or file stream. A path towards the file to copy into. Returns​ A boolean indicating if the file was successfully copied. pluto if io.copy(\"./cfg/config.txt\", \"./backup_cfg/config.txt\") then print(\"Successfully created a backup config!\") else print(\"Failed to create a backup config.\") end Copy","s":"io.copy","u":"/docs/Runtime Environment/IO","h":"#iocopy","p":476},{"i":485,"t":"Extracts the given part from a path. Parameters​ A string path or file stream. The part to return, \"parent\" or \"name\". Returns​ The extracted part. pluto print(io.part(\"/path/to/foo.txt\", \"parent\")) -- \"/path/to\" print(io.part(\"/path/to/foo.txt\", \"name\")) -- \"foo.txt\" Copy","s":"io.part","u":"/docs/Runtime Environment/IO","h":"#iopart","p":476},{"i":487,"t":"Parameters​ A string path or file stream. Returns​ A boolean indicating if the path led toward a directory. pluto local path = \"./dir/main/\" local bool = io.isdir(path) if bool then print(\"Directory!\") else print(\"Not a directory!\") end Copy","s":"io.isdir","u":"/docs/Runtime Environment/IO","h":"#ioisdir","p":476},{"i":489,"t":"Parameters​ A string path or file stream. Returns​ A boolean indicating if the path led towards a file. pluto local path = \"./isfile/file\" local bool = io.isfile(path) if bool then print(\"File!\") else print(\"Not a file!\") end Copy","s":"io.isfile","u":"/docs/Runtime Environment/IO","h":"#ioisfile","p":476},{"i":491,"t":"Parameters​ A string path or file stream. Returns​ A boolean indicating if the path led towards an existing file or directory. pluto if io.exists(\"cfg/config.txt\") then print(\"Config exists!\") else print(\"Config does not exist!\") end Copy","s":"io.exists","u":"/docs/Runtime Environment/IO","h":"#ioexists","p":476},{"i":493,"t":"Create a directory. Parameters​ The path for the new directory. Returns​ A boolean indicating if the directory was successfully created. pluto if io.makedir(\"./cfg\") then print(\"Created cfg directory.\") else print(\"Failed to create cfg directory.\") end Copy","s":"io.makedir","u":"/docs/Runtime Environment/IO","h":"#iomakedir","p":476},{"i":495,"t":"List all the files within a directory. Parameters​ A string path to the directory. A boolean indicating whether or not to recurse sub-directories. Returns​ An index-based table containing file paths. pluto for _, filepath in io.listdir(\".\") do print(filepath) end Copy","s":"io.listdir","u":"/docs/Runtime Environment/IO","h":"#iolistdir","p":476},{"i":497,"t":"Creates a directory and all the non-existing parent directories in the given path. Parameters​ The string path for your new directory. pluto io.makedirs(\"A/B/C\") -- Creates \"C:\\Users\\Username\\Desktop\\Project\\A\\B\\C\" Copy","s":"io.makedirs","u":"/docs/Runtime Environment/IO","h":"#iomakedirs","p":476},{"i":499,"t":"Convert a relative path into an absolute one. Parameters​ A string path or file stream. An optional bool if the path should be canonicalized. A canonical path does not go through symlinks. Returns​ A string representing the new file path. pluto io.absolute(\"cfg/cfg.txt\") -- \"C:\\Users\\Username\\Desktop\\Project\\cfg\\cfg.txt\" Copy","s":"io.absolute","u":"/docs/Runtime Environment/IO","h":"#ioabsolute","p":476},{"i":501,"t":"Convert an absolute path into a relative one. Parameters​ A string path or file stream. Returns​ A string representing the new file path. pluto io.relative(io.absolute(\"cfg/cfg.txt\")) -- \"cfg\\cfg.txt\" Copy","s":"io.relative","u":"/docs/Runtime Environment/IO","h":"#iorelative","p":476},{"i":503,"t":"Get or set a file's contents. Parameters​ A string path or file stream. The desired content. If this parameter is absent, this function works as a getter. Returns​ If this function is acting as a getter, it will return the file's contents or nil if there was an error. pluto local text = io.contents(\"foo.txt\") or \"\" text ..= \"bar\" io.contents(\"foo.txt\", text) Copy This function is not only easier to use than the traditional io.open approach, it also performs significantly better.","s":"io.contents","u":"/docs/Runtime Environment/IO","h":"#iocontents","p":476},{"i":505,"t":"Fetch the size of a file in bytes. Parameters​ A string path or file stream. pluto if io.filesize(\"cfg/config.txt\") <= 1 then print(\"Config is too small or empty.\") end Copy","s":"io.filesize","u":"/docs/Runtime Environment/IO","h":"#iofilesize","p":476},{"i":507,"t":"Get or set a file's modification time. Parameters​ A string path or file stream. The desired timestamp. If this parameter is absent, this function works as a getter. Returns​ If this function is acting as a getter, it will return the file's last write time as seconds since the UNIX epoch. pluto local time = io.writetime(\"foo.txt\") time += 3600 io.writetime(\"foo.txt\", time) Copy This example adds an hour (= 60 minutes = 3600 seconds) to the last write time of \"foo.txt\" (or errors if that file does not exist).","s":"io.writetime","u":"/docs/Runtime Environment/IO","h":"#iowritetime","p":476},{"i":509,"t":"Get or set the current working directory. Parameters​ A path to the desired current working directory. If this parameter is absent, this function works as a getter. Returns​ If this function is acting as a getter, it will return the current working directory. pluto local cwd = io.currentdir() -- Get cwd io.currentdir(\"abc/abc\") -- Set a new cwd Copy","s":"io.currentdir","u":"/docs/Runtime Environment/IO","h":"#iocurrentdir","p":476},{"i":511,"t":"The scheduler class — available via require — can be used to easily set up coroutine-based cooperative multitasking.","s":"Scheduler","u":"/docs/Runtime Environment/Scheduler","h":"","p":510},{"i":513,"t":"The constructor takes no arguments.","s":"__construct","u":"/docs/Runtime Environment/Scheduler","h":"#__construct","p":510},{"i":515,"t":"The add method can be used to turn a function into a coroutine. The coroutine is resumed once and then added to the scheduler.","s":"add","u":"/docs/Runtime Environment/Scheduler","h":"#add","p":510},{"i":517,"t":"The addloop method is a wrapper for the add method that keeps invoking the given function until it returns false.","s":"addloop","u":"/docs/Runtime Environment/Scheduler","h":"#addloop","p":510},{"i":519,"t":"The run method activates the scheduler. The scheduler resumes all coroutines and then calls its yieldfunc until either all coroutines are finished, or coroutine throws an error — in which case it is rethrown. pluto local scheduler = new (require\"pluto:scheduler\") () local loops = 0 scheduler:addloop(function() ++loops print(loops) return loops != 5 end) scheduler:run() --> 1 --> 2 --> 3 --> 4 --> 5 scheduler:add(function() print(\"3...\") coroutine.sleep(1000) print(\"2...\") coroutine.sleep(1000) print(\"1...\") coroutine.sleep(1000) print(\"Boom!\") end) scheduler:run() --> 3... --> 2... --> 1... --> Boom! Copy","s":"run","u":"/docs/Runtime Environment/Scheduler","h":"#run","p":510},{"i":521,"t":"yieldfunc is a property on the scheduler that can be used to customize how the scheduler itself yields. By default, this is a function calling os.sleep(1). pluto local scheduler = new (require\"pluto:scheduler\") () -- Yield to OS every second instead of every millisecond. scheduler.yieldfunc = || -> os.sleep(1000) local loops = 0 scheduler:addloop(function() ++loops print(loops) return loops != 5 end) scheduler:run() --> 1 --> 2 --> 3 --> 4 --> 5 Copy","s":"yieldfunc","u":"/docs/Runtime Environment/Scheduler","h":"#yieldfunc","p":510},{"i":523,"t":"errorfunc is a property on the scheduler that can optionally be set to customize how the scheduler reports errors in its coroutines. By default, this is nil, in which case any coroutine errors are rethrown (via coroutine.xresume). pluto local { scheduler } = require \"*\" local sched = new scheduler() sched.errorfunc = |err| -> do print(debug.traceback(err)) end sched:add(function() error(\"this is urgent: fatal error\") end) Copy","s":"errorfunc","u":"/docs/Runtime Environment/Scheduler","h":"#errorfunc","p":510},{"i":525,"t":"This page documents the changes & additions to the math library in Pluto, which is built on top of Lua 5.4's.","s":"Math","u":"/docs/Runtime Environment/Math","h":"","p":524},{"i":527,"t":"Checks if a number is NaN. Parameters​ The number to check. pluto local x = 0 / 0 print(x ~= x) -- Lua way: Prove the variable is NaN because it is not equal to itself. Works, but unintuitive. print(math.isnan(x)) Copy","s":"math.isnan","u":"/docs/Runtime Environment/Math","h":"#mathisnan","p":524},{"i":529,"t":"Rounds a number to the nearest integer. Parameters​ The number to round. pluto print(math.round(2.4)) --> 2 print(math.round(2.5)) --> 3 Copy","s":"math.round","u":"/docs/Runtime Environment/Math","h":"#mathround","p":524},{"i":531,"t":"An alias of math.atan.","s":"math.atan2","u":"/docs/Runtime Environment/Math","h":"#mathatan2","p":524},{"i":533,"t":"This page documents the changes & additions to the os library in Pluto, which is built on top of Lua 5.4's.","s":"OS","u":"/docs/Runtime Environment/OS","h":"","p":532},{"i":535,"t":"Parameters​ The amount of milliseconds to sleep for. Example​ pluto os.sleep(1000) -- Pause this thread for 1000ms. Copy","s":"os.sleep","u":"/docs/Runtime Environment/OS","h":"#ossleep","p":532},{"i":537,"t":"All of these return their respective times since implementation-specific epoch.","s":"os.nanos, os.micros, os.millis, os.seconds","u":"/docs/Runtime Environment/OS","h":"#osnanos-osmicros-osmillis-osseconds","p":532},{"i":539,"t":"Returns seconds since UNIX epoch.","s":"os.unixseconds","u":"/docs/Runtime Environment/OS","h":"#osunixseconds","p":532},{"i":541,"t":"Must be included via require.","s":"Crypto","u":"/docs/Runtime Environment/Crypto","h":"","p":540},{"i":544,"t":"Hash a string using Lua's version of the DJB2 non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.lua(str) == 2871868277) Copy","s":"crypto.lua","u":"/docs/Runtime Environment/Crypto","h":"#cryptolua","p":540},{"i":546,"t":"Hash a string using the MD5 semi-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.md5(str) == \"5eb63bbbe01eeed093cb22bb8f5acdc3\") Copy","s":"crypto.md5","u":"/docs/Runtime Environment/Crypto","h":"#cryptomd5","p":540},{"i":548,"t":"Hash a string using the DJB2 non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.djb2(str) == 894552257) Copy","s":"crypto.djb2","u":"/docs/Runtime Environment/Crypto","h":"#cryptodjb2","p":540},{"i":550,"t":"Hash a string using the FNV1 non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.fnv1(str) == 9065573210506989167) Copy","s":"crypto.fnv1","u":"/docs/Runtime Environment/Crypto","h":"#cryptofnv1","p":540},{"i":552,"t":"Hash a string using the FNV1A non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.fnv1a(str) == 8618312879776256743) Copy","s":"crypto.fnv1a","u":"/docs/Runtime Environment/Crypto","h":"#cryptofnv1a","p":540},{"i":554,"t":"Hash a string using the JOAAT non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.joaat(str) == 1045060183) Copy","s":"crypto.joaat","u":"/docs/Runtime Environment/Crypto","h":"#cryptojoaat","p":540},{"i":556,"t":"Hash a string using the SDBM non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.sdbm(str) == 430867652) Copy","s":"crypto.sdbm","u":"/docs/Runtime Environment/Crypto","h":"#cryptosdbm","p":540},{"i":558,"t":"Hash a string using the CRC32 non-cryptographic hashing algorithm. Parameters​ The string to hash. The initial value for the hash. By default, this is zero. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.crc32(str) == 222957957) Copy","s":"crypto.crc32","u":"/docs/Runtime Environment/Crypto","h":"#cryptocrc32","p":540},{"i":560,"t":"Hash a string using the Adler-32 non-cryptographic hashing algorithm. Parameters​ The string to hash. The initial value for the hash. By default, this is zero. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.adler32(str) == 103547413) Copy","s":"crypto.adler32","u":"/docs/Runtime Environment/Crypto","h":"#cryptoadler32","p":540},{"i":562,"t":"Hash a string using the Lookup3 non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.lookup3(str) == 1252609637) Copy","s":"crypto.lookup3","u":"/docs/Runtime Environment/Crypto","h":"#cryptolookup3","p":540},{"i":564,"t":"Hash a string using the Times33 non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.times33(str) == 3889643616) Copy","s":"crypto.times33","u":"/docs/Runtime Environment/Crypto","h":"#cryptotimes33","p":540},{"i":566,"t":"Hash a string using the Murmur1 non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur1(str) == 3154674178) Copy","s":"crypto.murmur1","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur1","p":540},{"i":568,"t":"Hash a string using the Murmur2 non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur2(str) == 1151865881) Copy","s":"crypto.murmur2","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2","p":540},{"i":570,"t":"Hash a string using the Murmur2A non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur2a(str) == 2650573207) Copy","s":"crypto.murmur2a","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2a","p":540},{"i":572,"t":"Hash a string using the Murmur64A non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur64a(str) == -3190198453633110066) Copy","s":"crypto.murmur64a","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur64a","p":540},{"i":574,"t":"Hash a string using the Murmur64A non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur64b(str) == 7088720765356542432) Copy","s":"crypto.murmur64b","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur64b","p":540},{"i":576,"t":"Hash a string using the Murmur2Neutral non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur2neutral(str) == 1151865881) Copy","s":"crypto.murmur2neutral","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2neutral","p":540},{"i":579,"t":"Hash a string using the SHA-1 cryptographic hashing algorithm. Parameters​ The string to hash. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false. pluto local crypto = require(\"crypto\") assert(crypto.sha1(\"Pluto\") == \"bce8c9aca4120776fad6b517874aa09c46405454\") assert(crypto.sha1(\"Pluto\", true) == \"\\xbc\\xe8\\xc9\\xac\\xa4\\x12\\x07\\x76\\xfa\\xd6\\xb5\\x17\\x87\\x4a\\xa0\\x9c\\x46\\x40\\x54\\x54\") Copy","s":"crypto.sha1","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha1","p":540},{"i":581,"t":"Hash a string using the SHA-256 cryptographic hashing algorithm. Parameters​ The string to hash. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false. pluto local crypto = require(\"crypto\") assert(crypto.sha256(\"Pluto\") == \"8dad5f6a7dd2dcd8c35ec2fd7babb499bcad60d27d73fe73eca2ce025dfd3b47\") assert(crypto.sha256(\"Pluto\", true) == \"\\x8d\\xad\\x5f\\x6a\\x7d\\xd2\\xdc\\xd8\\xc3\\x5e\\xc2\\xfd\\x7b\\xab\\xb4\\x99\\xbc\\xad\\x60\\xd2\\x7d\\x73\\xfe\\x73\\xec\\xa2\\xce\\x02\\x5d\\xfd\\x3b\\x47\") Copy","s":"crypto.sha256","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha256","p":540},{"i":583,"t":"Hash a string using the SHA-384 cryptographic hashing algorithm. Parameters​ The string to hash. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false. pluto local crypto = require(\"crypto\") assert(crypto.sha384(\"Pluto\", false) == \"db890233a919b6745d632633c419e14540ff79f1a89bc4ac194b00e7f913f0f06d5d4d7d6cc2b4aaf9485d223afb8cf0\") Copy","s":"crypto.sha384","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha384","p":540},{"i":585,"t":"Hash a string using the SHA-512 cryptographic hashing algorithm. Parameters​ The string to hash. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false. pluto local crypto = require(\"crypto\") assert(crypto.sha512(\"Pluto\", false) == \"ee8410a8bf9511b94fd6669b5c3e0c4b86e8e4bf7baa8dbd2773d4d6381dd1aecebbe391bef4c6158620ab3f6b794907652d4432c2301d7e1a6caf520565cdf2\") Copy","s":"crypto.sha512","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha512","p":540},{"i":588,"t":"The crypto.random function uses your operating system's default PRNG. On Linux-based systems, this is /dev/urandom. On Windows, this is BCryptGenRandom. This is a cryptographically-secure PRNG when your system can provide those services. However, if it does not, then this is not cryptographically secure. Either way, it provides good randomness. Parameters​ The minimum value to return. The maximum value to return, as a range. pluto local crypto = require(\"crypto\") assert(crypto.random(1, 10) < 11) Copy","s":"crypto.random","u":"/docs/Runtime Environment/Crypto","h":"#cryptorandom","p":540},{"i":590,"t":"These unauthenticated AES modes take both a key and an IV. The IV must be unique and unpredictable for each encryption session to ensure security.","s":"AES-CBC, AES-CFB","u":"/docs/Runtime Environment/Crypto","h":"#aes-cbc-aes-cfb","p":540},{"i":592,"t":"Parameters​ data — The data to be encrypted. mode — \"aes-cbc-pkcs7\" or \"aes-cfb-pkcs7\" for PKCS#7 padding, or \"aes-cbc\" or \"aes-cfb\" if you know what you're doing. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively. iv — Must have a length of 16.","s":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt","p":540},{"i":594,"t":"Parameters​ data — The ciphertext to decrypt. mode — \"aes-cbc-pkcs7\" or \"aes-cfb-pkcs7\" for PKCS#7 padding, or \"aes-cbc\" or \"aes-cfb\" if you know what you're doing. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively. iv — Must have a length of 16. Returns the decrypted data on success. Throws an error if the padding was incorrect. pluto local crypto = require \"pluto:crypto\" local key = \"A Top Secret Key\" -- Encrypt local iv = range(16):map(|| -> string.char(math.random(0, 255))):concat(\"\") local plain = \"Hello, world!\" local enc = plain |> crypto.encrypt|\"aes-cbc-pkcs7\", key, iv| print(dumpvar(enc)) -- Decrypt print(crypto.decrypt(enc, \"aes-cbc-pkcs7\", key, iv)) --> Hello, world! Copy","s":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt","p":540},{"i":596,"t":"This unauthenticated AES mode takes only a key, and is considered to be the weakest. Identical plaintext blocks result in identical ciphertext blocks.","s":"AES-ECB","u":"/docs/Runtime Environment/Crypto","h":"#aes-ecb","p":540},{"i":598,"t":"Parameters​ data — The data to be encrypted. mode — \"aes-ecb-pkcs7\" for PKCS#7 padding, or \"aes-ecb\" if you know what you're doing. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.","s":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-1","p":540},{"i":600,"t":"Parameters​ mode — \"aes-ecb-pkcs7\" for PKCS#7 padding, or \"aes-ecb\" if you know what you're doing. data — The ciphertext to decrypt. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively. Returns the decrypted data on success. Throws an error if the padding was incorrect. pluto local crypto = require \"pluto:crypto\" local key = \"A Top Secret Key\" -- Encrypt local plain = \"Hello, world!\" local enc = plain |> crypto.encrypt|\"aes-ecb-pkcs7\", key| print(dumpvar(enc)) --> string(16) \"`p{����k\\21*.>jG\" -- Decrypt print(crypto.decrypt(enc, \"aes-ecb-pkcs7\", key)) --> Hello, world! Copy","s":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-1","p":540},{"i":602,"t":"This authenticated AES mode allows for additional data that will be validated although not encrypted, such as a Message Authentication Code (MAC).","s":"AES-GCM","u":"/docs/Runtime Environment/Crypto","h":"#aes-gcm","p":540},{"i":604,"t":"Parameters​ data — The data to be encrypted. mode — Must be \"aes-gcm\". AES-GCM can deal with unpadded data, hence does not need PKCS#7 padding. aadata — Authenticated data. Will not be encrypted. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively. iv — Must have a length of 16. Returns two strings: the ciphertext and the authentication tag.","s":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-2","p":540},{"i":606,"t":"Parameters​ data — The ciphertext to decrypt. mode — Must be \"aes-gcm\". aadata — Authenticated data. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively. iv — Must have a length of 16. tag — The authentication tag produced by the \"encrypt\" procedure. Returns the decrypted data on success. Throws an error if authentication or unpadding failed. pluto local crypto = require \"pluto:crypto\" local key = \"A Top Secret Key\" local aadata = \"This is Pluto!\" -- Encrypt local iv = range(16):map(|| -> string.char(math.random(0, 255))):concat(\"\") local plain = \"Hello, world!\" local enc, tag = plain |> crypto.encrypt|\"aes-gcm\", aadata, key, iv| print(dumpvar(enc)) print(dumpvar(tag)) -- Decrypt print(crypto.decrypt(enc, \"aes-gcm\", aadata, key, iv, tag)) --> Hello, world! Copy","s":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-2","p":540},{"i":609,"t":"Parameters​ mode — Must be \"rsa\". bits — A positive integer for a strict bit-length requirement, or a negative integer for a lax requirement. Common values are 1024, 2048, and 4096. Returns two tables: The public key (consisting of n and e), and the private key (consisting of p and q). The Bigint class is used for all values. pluto local pub, priv = crypto.generatekeypair(\"rsa\", 512) print(dumpvar(pub)) --> { --> [\"n\"] = 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357, --> [\"e\"] = 65537, --> } print(dumpvar(priv)) --> { --> [\"p\"] = 115443384115231951475820445136871322101870729500298182134363293112660251666017, --> [\"q\"] = 98365361248415863235179644468056200977592391948608651522703704315152579004021, --> } Copy","s":"crypto.generatekeypair","u":"/docs/Runtime Environment/Crypto","h":"#cryptogeneratekeypair","p":540},{"i":611,"t":"Parameters​ data — The data to be encrypted. mode — \"rsa-pkcs1\" for PKCS#1 padding, or \"rsa\" if you know what you're doing. key — The public or private key to use. Commonly, a public key is used to encrypt data.","s":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-3","p":540},{"i":613,"t":"Parameters​ data — The ciphertext to decrypt. mode — \"rsa-pkcs1\" for PKCS#1 padding, or \"rsa\" if you know what you're doing. key — The public or private key to use. If the data was encrypted with the public key, the private key is needed to decrypt it. pluto local { base64, bigint, crypto } = require \"pluto:*\" local priv = { p = new bigint(\"115443384115231951475820445136871322101870729500298182134363293112660251666017\"), q = new bigint(\"98365361248415863235179644468056200977592391948608651522703704315152579004021\"), } -- Derive public key local pub = { n = priv.p * priv.q, -- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357 e = new bigint(0x10001) -- 65537 } -- Encrypt local enc = crypto.encrypt(\"A secret message to the owner of the private key.\", \"rsa-pkcs1\", pub) print(base64.encode(enc)) -- Decrypt print(enc |> crypto.decrypt|\"rsa-pkcs1\", priv|) --> A secret message to the owner of the private key. Copy","s":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-3","p":540},{"i":615,"t":"Parameters​ data — The data to sign. mode — \"rsa-sha256\" or \"rsa-sha1\". key — The private key to use.","s":"crypto.sign","u":"/docs/Runtime Environment/Crypto","h":"#cryptosign","p":540},{"i":617,"t":"Parameters​ data — The data that was signed. mode — \"rsa-sha256\" or \"rsa-sha1\". key — The public key corresponding to the signer's private key. signature — The signature produced by the \"sign\" procedure. Returns a boolean that indicates if the signature validated successfully. pluto local { base64, bigint, crypto } = require \"pluto:*\" local priv = { p = new bigint(\"115443384115231951475820445136871322101870729500298182134363293112660251666017\"), q = new bigint(\"98365361248415863235179644468056200977592391948608651522703704315152579004021\"), } -- Derive public key local pub = { n = priv.p * priv.q, -- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357 e = new bigint(0x10001) -- 65537 } -- Sign local msg = \"The canary has left the nest.\" local sig = msg |> crypto.sign|\"rsa-sha256\", priv| print(base64.encode(sig)) --> un1g04+cwG8WxYDpSlj4PO/hsTqSITgYKycRuR+m3AE6ypLyUCrVHC/0j4M3DeW81ADZVda6TVkC/Ht8EdYeFw== -- Verify print(crypto.verify(msg, \"rsa-sha256\", pub, sig)) --> true Copy","s":"crypto.verify","u":"/docs/Runtime Environment/Crypto","h":"#cryptoverify","p":540},{"i":619,"t":"This page documents the changes & additions to the string library in Pluto, which is built on top of Lua 5.4's.","s":"String","u":"/docs/Runtime Environment/String","h":"","p":618},{"i":621,"t":"This function now takes a second parameter that specifies which index to capitalize. pluto local s = \"hello\" assert(s:upper(1) == \"Hello\") Copy","s":"string.upper","u":"/docs/Runtime Environment/String","h":"#stringupper","p":618},{"i":623,"t":"This function now takes a second parameter that specifies which index to make lowercase. pluto local s = \"HELLO\" assert(s:lower(1) == \"hELLO\") Copy","s":"string.lower","u":"/docs/Runtime Environment/String","h":"#stringlower","p":618},{"i":625,"t":"Splits a string by a separator. Parameters​ The string to split. The separator to split a string by. This can be any string. Returns​ A table. Splitting a string by a single character. pluto local s = \"hello world, how is everyone doing?\" local r = string.split(s, \" \") --[[ The value of 'r': { \"hello\", \"world,\", \"how\", \"is\", \"everyone\", \"doing?\" } --]] Copy Splitting a string by a substring. pluto local s = \"helloHALLOWORLDworld,HALLOWORLDhowHALLOWORLDisHALLOWORLDeveryoneHALLOWORLDdoing?\" local r = string.split(s, \"HALLOWORLD\") --[[ The value of 'r': { \"hello\", \"world,\", \"how\", \"is\", \"everyone\", \"doing?\" } --]] Copy","s":"string.split","u":"/docs/Runtime Environment/String","h":"#stringsplit","p":618},{"i":627,"t":"Identical to the base Lua string.find in every way, except it searches right-to-left instead of left-to-right.","s":"string.rfind","u":"/docs/Runtime Environment/String","h":"#stringrfind","p":618},{"i":629,"t":"Strips or trims characters from both ends of a string. Parameters​ The string to strip. A string of characters to strip. Defaults to \\n\\r\\t\\v\\0. Returns​ The new string. pluto local s = \"{|}hello world{|}\" print(string.strip(s, \"{}|\")) --> hello world Copy","s":"string.strip","u":"/docs/Runtime Environment/String","h":"#stringstrip","p":618},{"i":631,"t":"Strips or trims characters from the left side of a string. Parameters​ The string to strip. A string of characters to strip. Defaults to \\n\\r\\t\\v\\0. Returns​ The new string. pluto local s = \"{|}hello world{|}\" print(string.lstrip(s, \"{}|\")) --> hello world{|} Copy","s":"string.lstrip","u":"/docs/Runtime Environment/String","h":"#stringlstrip","p":618},{"i":633,"t":"Strips or trims characters from the right side of a string. Parameters​ The string to strip. A string of characters to strip. Defaults to \\n\\r\\t\\v\\0. Returns​ The new string. pluto local s = \"{|}hello world{|}\" print(string.rstrip(s, \"{}|\")) --> {|}hello world Copy","s":"string.rstrip","u":"/docs/Runtime Environment/String","h":"#stringrstrip","p":618},{"i":635,"t":"Checks if a string is entirely composed of ASCII characters. Parameters​ The string to check. pluto local s = \"HELLOWORLD123\" print(string.isascii(s)) --> true Copy info This would exclude any multi-byte characters, like emojis.","s":"string.isascii","u":"/docs/Runtime Environment/String","h":"#stringisascii","p":618},{"i":637,"t":"Checks if a string is entirely composed of lowercase characters. Parameters​ The string to check. pluto local s = \"helloworld\" print(string.islower(s)) --> true Copy info Whitespace characters are not lowercase characters.","s":"string.islower","u":"/docs/Runtime Environment/String","h":"#stringislower","p":618},{"i":639,"t":"Checks if a string is entirely composed of alphabetic characters. Parameters​ The string to check. pluto local s = \"HELLOWORLD\" print(string.isalpha(s)) --> true Copy info Whitespace characters are not alphabetic characters.","s":"string.isalpha","u":"/docs/Runtime Environment/String","h":"#stringisalpha","p":618},{"i":641,"t":"Checks if a string is entirely composed of uppercase characters. Parameters​ The string to check. pluto local s = \"HELLOWORLD\" print(string.isupper(s)) --> true Copy info Whitespace characters are not uppercase characters.","s":"string.isupper","u":"/docs/Runtime Environment/String","h":"#stringisupper","p":618},{"i":643,"t":"Checks if a string is entirely composed of alphanumeric characters. Parameters​ The string to check. pluto local s = \"HELLOWORLD123\" print(string.isalnum(s)) --> true Copy info Whitespace characters are not alphanumeric characters.","s":"string.isalnum","u":"/docs/Runtime Environment/String","h":"#stringisalnum","p":618},{"i":645,"t":"Checks if this string is entirely composed of whitespace characters. Paramaters​ The string to check. pluto local s = \" \\t \\v \\f \\t\\t\\t\\t\" print(string.iswhitespace(s)) --> true Copy","s":"string.iswhitespace","u":"/docs/Runtime Environment/String","h":"#stringiswhitespace","p":618},{"i":647,"t":"Same as string.format, but performs the operation under the en_US.UTF-8 locale. Ensures the same result on all systems.","s":"string.uformat","u":"/docs/Runtime Environment/String","h":"#stringuformat","p":618},{"i":649,"t":"Replace substrings with another substring. Similar to string.gsub, but it operates on plain-text and is not burdened by a pattern capture limit. Parameters​ original — The substring to replace. substitute — The replacement substring. max_replace — The maximum number of replacements you wish to occur. The default value is effectively 0, which means \"infinite\". If you pass 1, this leads to a maximum of one replacement, and so on. Errors​ An error is thrown under the following conditions: max_replace is less than zero. The length of substitute is zero. pluto print(string.replace(\"Hello, world!\", \"!\", \".\")) --> Hello, world. print(string.replace(\"Hello, world!\", \"apple\", \"\")) --> Hello, world! print(string.replace(\"Hello, world!\", \"Hello\", \"Apple\")) --> Apple, world! print(string.replace(\"Hello, world!\", \"Hello, \", \"\")) --> world! Copy","s":"string.replace","u":"/docs/Runtime Environment/String","h":"#stringreplace","p":618},{"i":651,"t":"Truncates a given string to a specified length. If an elipsis is desired and the string was actually truncated, the last three characters of the resultant string will be replaced with an elipsis. Parameters​ The string to truncate. The desired length of the truncated string. A boolean indicating whether or not to replace the last three character of the string with ... if it is truncated. This is false by default. Returns​ The truncated string. pluto print(string.truncate(\"Hello, world!\", 50)) --> Hello, world! print(string.truncate(\"Hello, world!\", 5)) --> Hello print(string.truncate(\"Hello, world!\", 5, true)) --> He... Copy","s":"string.truncate","u":"/docs/Runtime Environment/String","h":"#stringtruncate","p":618},{"i":653,"t":"Checks if a string contains a substring. Parameters​ The string to check. The substring to check for. pluto local s = \"hello world\" print(string.contains(s, \"worl\")) --> true Copy","s":"string.contains","u":"/docs/Runtime Environment/String","h":"#stringcontains","p":618},{"i":655,"t":"Compares two strings, agnostic of any capitalization. Parameters​ The first string to compare. The second string to compare. pluto local s1 = \"hello world\" local s2 = \"heLLo WoRlD\" print(string.casefold(s1, s2)) --> true Copy","s":"string.casefold","u":"/docs/Runtime Environment/String","h":"#stringcasefold","p":618},{"i":657,"t":"This function makes an integer easier to read by inserting separator every N characters. It can handle strings representing integers, making it suitable for BigInt modules or any integer beyond Lua's representation limits. If you provide a string, it should consist solely of digits. A single unary operator is permitted at the beginning of the string to indicate whether it's a negative or positive number. Parameters​ integer — The integer or string input. sep — The separator to use. This must be a single-character string. group — The grouping of each digit pair. This is N. Errors​ If the input is a string and does not meet the aforementioned criteria, an error will be thrown. Usage Example pluto print(string.formatint(500)) --> 500 print(string.formatint(-5000)) --> -5,000 print(string.formatint(50000)) --> 50,000 print(string.formatint(-500000)) --> -500,000 print(string.formatint(500, \".\", 2)) --> 5.00 print(string.formatint(\"-5000\", \",\", 1)) --> -5,0,0,0 print(string.formatint(50000, \",\", 4)) --> 5,0000 Copy Error Example pluto string.formatint(\"-500000.4\") Copy pluto: test.pluto:3: argument 'integer' for string.formatint was a string, but does not represent a valid integer (bad character: '.') stack traceback: [C]: in function 'string.formatint' test.pluto:3: in main chunk [C]: in ? Copy","s":"string.formatint","u":"/docs/Runtime Environment/String","h":"#stringformatint","p":618},{"i":659,"t":"Splits a string once, on the first occurance of a separator. Parameters​ The string to partition. The separator to partition the string by. A boolean specifying whether to search from the right. By default, this is false, which starts at the left. Returns​ Two strings: A substring for all the content before the first occurance of sep, and another substring for all the content afterwards. A Basic Partition pluto local s = \"hello world, what's up?\" local before, after = string.partition(s, \" \") assert(before == \"hello\") assert(after == \"world, what's up?\") Copy Partioning From The Right pluto local s = \"hello world, what's up?\" local before, after = string.partition(s, \" \", true) assert(before == \"hello world, what's\") assert(after == \"up?\") Copy","s":"string.partition","u":"/docs/Runtime Environment/String","h":"#stringpartition","p":618},{"i":661,"t":"Checks if a string ends with a suffix. Parameters​ The string to check. The substring suffix to check for. pluto local s = \"hello world\" print(string.endswith(s, \"world\")) --> true Copy","s":"string.endswith","u":"/docs/Runtime Environment/String","h":"#stringendswith","p":618},{"i":663,"t":"Checks if a string starts with a prefix. Parameters​ The string to check. The substring prefix to check for. pluto local s = \"hello world\" print(string.startswith(s, \"hello\")) --> true Copy","s":"string.startswith","u":"/docs/Runtime Environment/String","h":"#stringstartswith","p":618},{"i":665,"t":"Must be included via require.","s":"URL","u":"/docs/Runtime Environment/URL","h":"","p":664},{"i":667,"t":"Returns a URL-encoded string. Parameters​ The string to be encoded. pluto local url = require\"pluto:url\" print(\"https://google.com/search?q=\"..url.encode(\"Pluto, a superset of Lua\")) --> https://google.com/search?q=Pluto%2C%20a%20superset%20of%20Lua Copy","s":"url.encode","u":"/docs/Runtime Environment/URL","h":"#urlencode","p":664},{"i":669,"t":"Returns a plain string from URL-decoding the input string. Parameters​ The string to be decoded. pluto local url = require\"pluto:url\" print(url.decode(\"Pluto%2C%20a%20superset%20of%20Lua\")) -- \"Pluto, a superset of Lua\" Copy","s":"url.decode","u":"/docs/Runtime Environment/URL","h":"#urldecode","p":664},{"i":671,"t":"Splits a URL into its constituent parts. Parameters​ The URL to be dissected. pluto local url = require\"pluto:url\" print(dumpvar(url.parse(\"http://username:password@hostname:9090/path?arg=value#anchor\"))) --> { --> [\"scheme\"] = string(4) \"http\", --> [\"user\"] = string(8) \"username\", --> [\"pass\"] = string(8) \"password\", --> [\"host\"] = string(8) \"hostname\", --> [\"port\"] = 9090, --> [\"path\"] = string(5) \"/path\", --> [\"query\"] = string(9) \"arg=value\", --> [\"fragment\"] = string(6) \"anchor\", --> } Copy","s":"url.parse","u":"/docs/Runtime Environment/URL","h":"#urlparse","p":664},{"i":673,"t":"Must be included via require. This library is not available in WASM builds of Pluto.","s":"Socket","u":"/docs/Runtime Environment/Socket","h":"","p":672},{"i":675,"t":"Establishes a TCP connection. Parameters​ The host to connect to. Either an IPv4 or IPv6 address, or a domain name resolving to one. The port to contact the host on. Returns​ A socket instance on success. Nil on failure. Multitasking​ If called inside of a coroutine, this function yields. Otherwise, it blocks.","s":"socket.connect","u":"/docs/Runtime Environment/Socket","h":"#socketconnect","p":672},{"i":677,"t":"Creates a new listener for the given port. Parameters​ The port to listen on. Returns​ A listener instance on success. Nil on failure.","s":"socket.listen","u":"/docs/Runtime Environment/Socket","h":"#socketlisten","p":672},{"i":679,"t":"A convenience function that wraps socket.listen, automatically accepting new clients and spinning up a coroutine for them. Parameters​ A scheduler instance. The port to listen on. The callback function that will be called in a new coroutine for each client socket. pluto local { scheduler, socket } = require \"*\" local sched = new scheduler() socket.bind(sched, 80, |s| -> do local content = \"Hello, world!\" s:send(\"HTTP/1.1 200 OK\\r\\nConnection: Close\\r\\nContent-Length: \"..#content..\"\\r\\n\\r\\n\"..content) end) sched:run() Copy","s":"socket.bind","u":"/docs/Runtime Environment/Socket","h":"#socketbind","p":672},{"i":681,"t":"Socket instances are obtained by calling socket.connect (client), or from a listener (server).","s":"Socket Class","u":"/docs/Runtime Environment/Socket","h":"#socket-class","p":672},{"i":683,"t":"Sends data on a socket. Parameters​ The socket instance. The data to send.","s":"socket.send","u":"/docs/Runtime Environment/Socket","h":"#socketsend","p":672},{"i":685,"t":"Receive data from a socket. Parameters​ The socket instance. Returns​ If the socket is open: The oldest chunk of data received on the transport layer (TCP packet) or crypto layer (TLS record) as a string. If the socket is closed: Nil. Multitasking​ If a message is buffered, the function can return immediately. If not, it will yield if inside a coroutine, and block otherwise. pluto local socket = require \"pluto:socket\" local s = socket.connect(\"google.com\", 80) s:send(\"GET / HTTP/1.1\\r\\nHost: google.com\\r\\n\\r\\n\") print(s:recv()) Copy","s":"socket.recv","u":"/docs/Runtime Environment/Socket","h":"#socketrecv","p":672},{"i":687,"t":"Pushes a chunk of data to the front of the receive buffer, making it oldest for the purposes of socket.recv. Parameters​ The socket instance. The data to push. pluto local socket = require \"pluto:socket\" local sock = socket.connect(\"google.com\", 80) sock:unrecv(\"World\") sock:unrecv(\"Hello\") print(sock:recv()) --> Hello print(sock:recv()) --> World Copy","s":"socket.unrecv","u":"/docs/Runtime Environment/Socket","h":"#socketunrecv","p":672},{"i":689,"t":"Attempts to add the TLS crypto layer to the socket, making the transport layer a sole carrier for TLS traffic. Parameters​ The socket instance. The host name of the intended remote. This may be the same as what was passed to socket.connect. This name must be on the certificate that the remote will send. Returns​ True on success. On failure, returns false and the socket is closed. If the socket is already using TLS, returns nil. Multitasking​ If called inside of a coroutine, this function yields. Otherwise, it blocks. pluto local socket = require \"pluto:socket\" local s = socket.connect(\"pluto-lang.org\", 443) assert(s:starttls(\"pluto-lang.org\"), \"Failed to establish secure connection.\") s:send(\"GET / HTTP/1.1\\r\\nHost: pluto-lang.org\\r\\nConnection: close\\r\\n\\r\\n\") while data := s:recv() do print(data) end Copy","s":"socket.starttls","u":"/docs/Runtime Environment/Socket","h":"#socketstarttls","p":672},{"i":691,"t":"Closes a socket. Parameters​ The socket instance.","s":"socket.close","u":"/docs/Runtime Environment/Socket","h":"#socketclose","p":672},{"i":693,"t":"Listener instances are obtained by calling socket.listen.","s":"Listener Class","u":"/docs/Runtime Environment/Socket","h":"#listener-class","p":672},{"i":695,"t":"Accepts an incoming client connection, waiting until there is one. Returns​ A new socket instance. The socket can be used as per usual, with the exception of the starttls function being unavailable. Multitasking​ If there is an incoming client connection, this function returns immediately. If there is not, it waits for one. Waiting means yielding if called inside a coroutine, and blocking otherwise.","s":"accept","u":"/docs/Runtime Environment/Socket","h":"#accept","p":672},{"i":697,"t":"Checks if there is an incoming client connection. If this function returns true, the next call to accept is guaranteed not to block or yield. pluto local socket = require \"pluto:socket\" local l = socket.listen(80) or error(\"Failed to bind TCP/80\") while not l:hasconnection() do -- Visit http://localhost to break this loop os.sleep(1) end print(l:accept():recv()) Copy","s":"hasconnection","u":"/docs/Runtime Environment/Socket","h":"#hasconnection","p":672},{"i":699,"t":"Must be included via require.","s":"XML","u":"/docs/Runtime Environment/XML","h":"","p":698},{"i":701,"t":"Returns a string of XML. Parameters​ data — A table or string to encode as XML. pretty — Whether to return a human-readable string of XML. Defaults to false. pluto local xml = require \"pluto:xml\" print(xml.encode({ tag = \"root\", children = { { tag = \"entry\", attributes = { [\"type\"] = \"primary\" }, children = { \"Text node\" } }, { tag = \"entry\" } } }, true)) --> --> --> Text node --> --> --> Copy","s":"xml.encode","u":"/docs/Runtime Environment/XML","h":"#xmlencode","p":698},{"i":703,"t":"Returns a table representing the XML data. Parameters​ data — The XML data to decode. parser — Which parser to use against the data. Can be \"html\", \"xml\" (default), or \"lax\" (XML but accepts attributes without =). pluto local xml = require \"pluto:xml\" local root = xml.decode([[ primary ]]) print(dumpvar(root)) --> { --> [\"tag\"] = string(7) \"entries\", --> [\"children\"] = { --> [1] = { --> [\"tag\"] = string(5) \"entry\", --> [\"attributes\"] = { --> [\"type\"] = string(7) \"primary\", --> }, --> [\"children\"] = { --> [1] = { --> [\"tag\"] = string(4) \"name\", --> [\"children\"] = { --> [1] = string(7) \"primary\", --> }, --> }, --> }, --> }, --> }, --> } Copy For ease of use, the returned tables have an __index metamethod: pluto -- root is , so its first child is . -- we make use of the metamethod to get to : print(dumpvar(root.children[1].name)) --> { --> [\"tag\"] = string(4) \"name\", --> [\"children\"] = { --> [1] = string(7) \"primary\", --> }, --> } Copy If there is no single root element, a \"body\" element is implied as the root: pluto local xml = require \"pluto:xml\" print(dumpvar(xml.decode([[ ]]))) --> { --> [\"tag\"] = string(4) \"body\", --> [\"children\"] = { --> [1] = { --> [\"tag\"] = string(5) \"entry\", --> }, --> [2] = { --> [\"tag\"] = string(5) \"entry\", --> }, --> }, --> } Copy","s":"xml.decode","u":"/docs/Runtime Environment/XML","h":"#xmldecode","p":698},{"i":705,"t":"Must be included via require.","s":"Vector3","u":"/docs/Runtime Environment/Vector3","h":"","p":704},{"i":707,"t":"The constructor takes up to 3 arguments: pluto local vector3 = require \"pluto:vector3\" print(new vector3()) --> vector3(0, 0, 0) print(new vector3(1)) --> vector3(1, 1, 1) print(new vector3(1, 2)) --> vector3(1, 2, 0) print(new vector3(1, 2, 3)) --> vector3(1, 2, 3) Copy There is also a shorthand for this: pluto local vector3 = require \"pluto:vector3\" print(vector3(1, 2, 3)) --> vector3(1, 2, 3) Copy","s":"__construct","u":"/docs/Runtime Environment/Vector3","h":"#__construct","p":704},{"i":709,"t":"As seen above, the __tostring metamethod provides a string representation of the class.","s":"__tostring","u":"/docs/Runtime Environment/Vector3","h":"#__tostring","p":704},{"i":711,"t":"Vector3 instances support arithmetic operations. The right-hand side can either be a Vector3 instance or a number. They create a new instance for the result. pluto local vector3 = require \"pluto:vector3\" print(new vector3(1) + new vector3(2)) --> vector3(3, 3, 3) print(new vector3(0, 0.6, 0.4) * 3) --> vector3(0, 1.8, 1.2) Copy","s":"__add, __sub, __mul, __div","u":"/docs/Runtime Environment/Vector3","h":"#__add-__sub-__mul-__div","p":704},{"i":713,"t":"Vector3 instances can effortlessly be compared to each other. pluto local vector3 = require \"pluto:vector3\" print(new vector3(2, 2, 2) == new vector3(2)) --> true print(new vector3(1, 2, 3) == new vector3(2)) --> false Copy","s":"__eq","u":"/docs/Runtime Environment/Vector3","h":"#__eq","p":704},{"i":715,"t":"To get the magnitude of a vector, you can either use the unary length operator (#) or call the magnitude method: pluto local vec = new (require\"pluto:vector3\") (1, 2, 3) print(#vec) --> 3.7416573867739 print(vec:magnitude()) --> 3.7416573867739 Copy","s":"__len, magnitude","u":"/docs/Runtime Environment/Vector3","h":"#__len-magnitude","p":704},{"i":717,"t":"Computes the sum of the x, y and z fields. pluto local vec = new (require\"pluto:vector3\") (1, 2, 3) print(vec:sum()) --> 6 Copy","s":"sum","u":"/docs/Runtime Environment/Vector3","h":"#sum","p":704},{"i":719,"t":"Returns the value of axis with the lowest value. pluto local vec = new (require\"pluto:vector3\") (1, 2, 3) print(vec:min()) --> 1 Copy","s":"min","u":"/docs/Runtime Environment/Vector3","h":"#min","p":704},{"i":721,"t":"Returns the value of axis with the highest value. pluto local vec = new (require\"pluto:vector3\") (1, 2, 3) print(vec:max()) --> 3 Copy","s":"max","u":"/docs/Runtime Environment/Vector3","h":"#max","p":704},{"i":723,"t":"Computes the dot product with the Vector3 given as an argument. pluto local vector3 = require \"pluto:vector3\" print(new vector3(1):dot(new vector3(2))) --> 6 Copy","s":"dot","u":"/docs/Runtime Environment/Vector3","h":"#dot","p":704},{"i":725,"t":"Returns a new Vector3 instance with each axis being an absolute value. pluto local vector3 = require \"pluto:vector3\" print(new vector3(-1, -2, 3):abs()) --> vector3(1, 2, 3) Copy","s":"abs","u":"/docs/Runtime Environment/Vector3","h":"#abs","p":704},{"i":727,"t":"Returns a new Vector3 instance that is a unit vector equivalent. pluto local vector3 = require \"pluto:vector3\" print(new vector3(0, 3, 0):normalized()) --> vector3(0.0, 1.0, 0.0) Copy","s":"normalized, normalised","u":"/docs/Runtime Environment/Vector3","h":"#normalized-normalised","p":704},{"i":729,"t":"Returns a rotation vector based on the direction given by the current vector. You can specify the up-axis and handedness of the coordinate system. By default, a left-handed Y-up system is used. The up-axis also determines which axis contains which value: Y-Up: Pitch, Yaw, Roll Z-Up: Pitch, Roll, Yaw pluto local vector3 = require \"pluto:vector3\" print(new vector3(0, 1, 0):torot(\"y\")) -- Y up. Pointing up -> vector3(90.0, 0.0, 0) print(new vector3(0, 0, -1):torot(\"z\")) -- Z up. Pointing down -> vector3(-90.0, 0, -0.0) print(new vector3(1, 0, 0):torot(\"yr\")) -- Y up, right-handed. Pointing right -> vector3(0.0, -90.0, 0) print(new vector3(1, 0, 0):torot(\"yl\")) -- Y up, left-handed. Pointing right -> vector3(0.0, 90.0, 0) print(new vector3(1, 0, 0):torot(\"zr\")) -- Z up, right-handed. Pointing right -> vector3(0.0, 0, 90.0) print(new vector3(0, 0, 1):torot(\"y\")) -- Y up. Pointing forward -> vector3(0.0, 0.0, 0) print(new vector3(0, 0, -1):torot(\"y\")) -- Y up. Pointing backward -> vector3(0.0, 180.0, 0) Copy","s":"torot","u":"/docs/Runtime Environment/Vector3","h":"#torot","p":704},{"i":731,"t":"Returns a rotation vector based on the position given by the current vector and argument. pluto local v3 = require \"pluto:vector3\" print(new v3(0):lookat(new v3(0, 1, 0), \"y\")) -- Y up. From origin to a point above -> vector3(90.0, 0.0, 0) Copy","s":"lookat","u":"/docs/Runtime Environment/Vector3","h":"#lookat","p":704},{"i":733,"t":"Returns a direction vector based on the rotation given by the current vector. pluto local vector3 = require \"pluto:vector3\" print(new vector3(90, 0, 0):todir(\"y\")) -- Y up. Pointing up -> vector3(0.0, 1.0, 6.1232339957368e-17) print(new vector3(0, 90, 0):todir(\"yl\")) -- Y up, left-handed. Pointing right -> vector3(1.0, 0.0, 6.1232339957368e-17) print(new vector3(0, 90, 0):todir(\"yr\")) -- Y up, right-handed. Pointing right -> vector3(-1.0, 0.0, 6.1232339957368e-17) Copy","s":"todir","u":"/docs/Runtime Environment/Vector3","h":"#todir","p":704},{"i":735,"t":"This page documents the changes & additions to the table library in Pluto, which is built on top of Lua 5.4's.","s":"Table","u":"/docs/Runtime Environment/Table","h":"","p":734},{"i":737,"t":"This function was modified to return the input table instead of nil, such that: pluto local t = { 3, 2, 1 } t = t:sort(...) Copy Will not result in t becoming nil.","s":"table.sort","u":"/docs/Runtime Environment/Table","h":"#tablesort","p":734},{"i":739,"t":"Copying variant of table.sort; returns a new table instead of modifying the input table. Note that nested tables will not be copied.","s":"table.sorted","u":"/docs/Runtime Environment/Table","h":"#tablesorted","p":734},{"i":741,"t":"Returns the number of elements in the table, counting both the array part and hash part. Parameters​ The table to check. pluto local t = { 1, 2, 3, [\"foo\"] = \"bar\" } print(t:size()) --> 4 Copy","s":"table.size","u":"/docs/Runtime Environment/Table","h":"#tablesize","p":734},{"i":743,"t":"Remove all elements from the table. Parameters​ The table to clear. pluto local t = { 1, 2, 3, [\"foo\"] = \"bar\" } print(t:size()) --> 4 t:clear() print(t:size()) --> 0 Copy","s":"table.clear","u":"/docs/Runtime Environment/Table","h":"#tableclear","p":734},{"i":745,"t":"Freezes a table to prevent modification. Parameters​ The table to freeze Returns​ The input table. pluto local t = table.freeze({...}) -- `table.freeze(t)` on another line will work fine too. t.key = \"value\" -- Fails. Copy","s":"table.freeze","u":"/docs/Runtime Environment/Table","h":"#tablefreeze","p":734},{"i":747,"t":"Checks if this table is frozen. Parameters​ The table to check. pluto local t = {} table.freeze(t) assert(table.isfrozen(t) == true) Copy","s":"table.isfrozen","u":"/docs/Runtime Environment/Table","h":"#tableisfrozen","p":734},{"i":749,"t":"Checks if this table contains an element. Parameters​ The table to check. The element to check for. Returns​ The index or key if found, otherwise nil. pluto local t = { 1, 2, 3, 4, 5, 6, key = \"value\" } assert(table.contains(t, 4) == 4) assert(table.contains(t, \"value\") == \"key\") assert(table.contains(t, \"nothing\") == nil) Copy","s":"table.contains","u":"/docs/Runtime Environment/Table","h":"#tablecontains","p":734},{"i":751,"t":"Looks for an element in a table. Parameters​ The table to check. The callback function responsible for checking each element. Returns​ The element if found, otherwise nil. pluto local items = { { id = 1, name = \"Apple\" }, { id = 2, name = \"Banana\" }, } print(items:find(|item| -> item.id == 1).name) --> Apple Copy","s":"table.find","u":"/docs/Runtime Environment/Table","h":"#tablefind","p":734},{"i":753,"t":"Reverses the array elements of a table. Parameters​ The table to reverse. Returns​ The input table. pluto local t = { 1, 2, hello = \"world\", 3, 4, 5, key = \"value\" } print(dumpvar(t)) local same = t:reverse() assert(same == t) print(dumpvar(t)) --[[ Before: { [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [\"key\"] = string(5) \"value\", [\"hello\"] = string(5) \"world\", } After: { [1] = 5, [2] = 4, [3] = 3, [4] = 2, [5] = 1, [\"key\"] = string(5) \"value\", [\"hello\"] = string(5) \"world\", } --]] Copy","s":"table.reverse","u":"/docs/Runtime Environment/Table","h":"#tablereverse","p":734},{"i":755,"t":"Copying variant of table.reverse; returns a new table instead of modifying the input table. Note that nested tables will not be copied.","s":"table.reversed","u":"/docs/Runtime Environment/Table","h":"#tablereversed","p":734},{"i":757,"t":"Reorders the array portion of a table so it becomes a continuous array with no holes. Parameters​ The table. Returns​ The input table. pluto local assert = require(\"assert\") local t1 = { 1, nil, 2, nil, nil, 3, nil, 4 } assert.equal(t1:reorder(), { 1, 2, 3, 4 }) Copy","s":"table.reorder","u":"/docs/Runtime Environment/Table","h":"#tablereorder","p":734},{"i":759,"t":"Copying variant of table.reorder; returns a new table instead of modifying the input table. Note that nested tables will not be copied.","s":"table.reordered","u":"/docs/Runtime Environment/Table","h":"#tablereordered","p":734},{"i":761,"t":"Note that this function is not the same as the Lua function that was deprecated/removed in 5.1. Parameters​ The table. The callback to be called for every element. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|). pluto local t = { 1, 2, 3 } t:foreach(print) --> 1 --> 2 --> 3 Copy","s":"table.foreach","u":"/docs/Runtime Environment/Table","h":"#tableforeach","p":734},{"i":763,"t":"Filters away keys (both array and non-array) that fail to meet the condition established by callback. Elimination is done by setting the value to nil, consider using table.reorder if you want a continuous array after filtering. Parameters​ The table. The callback responsible for deciding which keys to keep or remove. This should return false or nil if you want the key to be eliminated. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|). Returns​ The input table. pluto data = { 1, 2, 3, 4, 5 } data:filter(|v| -> v % 2 ~= 0):reorder():concat(\" \") |> print -- \"1 3 5\" data = { 2, 2, 3, 4, 4 } data:filter(|k, v| -> k == v, true):reorder():concat(\" \") |> print -- \"2 3 4\" Copy","s":"table.filter","u":"/docs/Runtime Environment/Table","h":"#tablefilter","p":734},{"i":765,"t":"Copying variant of table.filter; returns a new table instead of modifying the input table. Note that nested tables will not be copied.","s":"table.filtered","u":"/docs/Runtime Environment/Table","h":"#tablefiltered","p":734},{"i":767,"t":"Remaps every key to a new value, provided by the callback function. Parameters​ The table. The callback responsible for producing the updated values. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|). Returns​ The input table. pluto data = \"41 20 68\" data:split(\" \"):map(tonumber):map(|v| -> v + 1):concat(\" \") |> print -- \"42 21 69\" data = \"10 15 10\" data:split(\" \"):map(tonumber):map(|k, v| -> k * v, true):concat(\" \") |> print -- \"10 30 30\" Copy In this example, we first use the tonumber function to turn the strings into numbers, then add 1 to them. (Although the first step is not needed in Lua/Pluto since the + operator would take care of it, it is used here for demonstration purposes.)","s":"table.map","u":"/docs/Runtime Environment/Table","h":"#tablemap","p":734},{"i":769,"t":"Copying variant of table.map; returns a new table instead of modifying the input table. Note that nested tables will not be copied.","s":"table.mapped","u":"/docs/Runtime Environment/Table","h":"#tablemapped","p":734},{"i":771,"t":"For every value stored in the table, computes accumulator = f(value, accumulator), returning the accumulator at the end. Parameters​ The table. The callback responsible for producing the updated accumulator. The initial value of accumulator. If absent, the accumulator is initialized with 0. Returns​ The accumulator. pluto local t = { 1, 2, 3 } t:reduce(|value, accumulator| -> value + accumulator) |> print --> 6 Copy","s":"table.reduce","u":"/docs/Runtime Environment/Table","h":"#tablereduce","p":734},{"i":773,"t":"Returns the smallest value stored in the table. Parameters​ The table. pluto local t = { 1, 2, 3 } print(t:min()) --> 1 Copy This is identical to :reduce(math.min, math.maxinteger).","s":"table.min","u":"/docs/Runtime Environment/Table","h":"#tablemin","p":734},{"i":775,"t":"Returns the largest value stored in the table. Parameters​ The table. pluto local t = { 1, 2, 3 } print(t:max()) --> 3 Copy This is identical to :reduce(math.max, math.mininteger).","s":"table.max","u":"/docs/Runtime Environment/Table","h":"#tablemax","p":734},{"i":777,"t":"Runs the given function against all elements, returning true if all of them match. Parameters​ The table. The callback responsible for checking each element. pluto print({ 2, 4, 6 }:checkall(|x| -> x % 2 == 0) ? \"All are even\" : \"Some are odd\") --> All are even print({ 1, 2, 3 }:checkall(|x| -> x % 2 == 0) ? \"All are even\" : \"Some are odd\") --> Some are odd Copy","s":"table.checkall","u":"/docs/Runtime Environment/Table","h":"#tablecheckall","p":734}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2",[0,4.16,1,0.482,2,3.313,3,5.034,4,6.573,5,6.573,6,6.852,7,6.573,8,5.968,9,3.662,10,6.573,11,6.573,12,3.885,13,5.271,14,3.732,15,3.475,16,4.836,17,4.268,18,3.732,19,4.836,20,6.573,21,6.573,22,5.968,23,5.968]],["t/5",[0,5.174,24,5.308,25,5.174,26,3.555,27,4.734,28,4.322,29,8.176,30,4.322,31,5.62]],["t/7",[0,3.2,1,0.468,2,2.549,6,4.055,15,2.673,16,3.72,28,2.673,30,2.673,31,3.476,32,4.591,33,4.284,34,3.374,35,2.439,36,3.476,37,3.2,38,5.057,39,2.989,40,4.591,41,2.407,42,1.597,43,4.591,44,5.057,45,5.057,46,2.549,47,2.282,48,5.057,49,1.261,50,5.057,51,1.888,52,5.057,53,5.057,54,2.439,55,3.59,56,5.057,57,5.057,58,4.591,59,0.46,60,0.965,61,5.057,62,0.406,63,3.72,64,2.226,65,2.989,66,4.591,67,5.057,68,4.591,69,2.588]],["t/9",[1,0.31,2,2.77,6,4.407,16,4.043,17,3.568,26,2.39,28,2.905,41,2.551,42,1.228,43,6.881,49,2.164,54,2.651,64,2.419,70,4.99,71,3.667,72,4.99,73,4.99,74,7.579,75,5.496,76,6.643,77,5.496,78,6.078,79,4.656,80,4.656,81,4.407,82,6.421,83,3.777,84,5.496,85,3.478,86,5.496,87,3.478,88,2.689,89,4.99,90,3.007]],["t/11",[0,3.546,1,0.316,2,2.824,9,3.122,25,3.546,28,2.962,30,2.962,31,3.852,37,3.546,51,2.093,72,5.088,78,4.494,91,5.088,92,2.528,93,3.546,94,7.681,95,2.782,96,5.604,97,1.993,98,2.962,99,1.508,100,5.604,101,5.604,102,5.604,103,2.868,104,4.123,105,5.604,106,2.868,107,5.604,108,5.088,109,3.462,110,5.453,111,5.088,112,5.604,113,3.978,114,3.066,115,5.088,116,4.494,117,5.088]],["t/13",[0,2.138,1,0.417,6,5.921,17,4.793,18,1.918,28,1.786,46,1.703,49,0.843,59,0.217,60,0.645,62,0.425,90,1.848,110,5.241,113,2.398,114,3.569,118,2.862,119,2.254,120,2.322,121,3.756,122,4.804,123,5.923,124,3.067,125,2.709,126,4.353,127,2.46,128,2.862,129,3.349,130,3.067,131,3.349,132,3.378,133,3.378,134,3.378,135,6.523,136,2.193,137,3.531,138,1.997,139,1.765,140,2.322,141,2.08,142,1.567,143,3.378,144,2.254,145,2.485,146,3.378,147,2.709,148,2.862,149,3.378,150,4.244,151,3.378,152,1.63,153,1.997,154,1.653,155,3.378,156,2.254,157,2.862,158,3.067,159,1.918,160,3.067,161,1.816,162,3.378,163,3.378,164,3.378,165,2.862,166,3.378,167,3.378,168,2.862,169,1.786,170,1.816,171,2.254,172,3.067,173,2.322,174,1.918,175,3.378,176,2.587,177,3.067,178,2.709]],["t/15",[1,0.455,17,5.233,25,5.101,90,4.41,179,6.173,180,4.063,181,5.54,182,7.318,183,2.923,184,5.93]],["t/17",[0,3.891,17,3.991,28,3.25,30,3.25,31,4.225,47,2.774,71,4.102,95,3.052,97,2.187,106,3.147,141,2.416,184,6.759,185,6.759,186,6.148,187,5.582,188,6.148,189,4.643,190,6.148,191,5.209,192,5.309,193,5.582,194,4.708,195,4.93,196,4.102,197,6.148,198,6.148]],["t/19",[1,0.17,9,1.683,49,0.753,51,1.808,59,0.652,60,0.924,62,0.389,97,1.074,99,2.786,127,1.826,142,0.894,152,3.661,173,2.076,174,2.749,196,3.231,199,1.652,200,1.749,201,0.344,202,1.388,203,3.606,204,1.522,205,2.726,206,1.652,207,3.514,208,2.742,209,2.742,210,2.313,211,1.329,212,3.02,213,4.15,214,2.742,215,2.313,216,3.02,217,5.135,218,4.396,219,3.02,220,6.061,221,3.02,222,3.02,223,3.02,224,3.02,225,3.02,226,3.02,227,3.02,228,3.02,229,3.02,230,3.02,231,2.742,232,3.02,233,3.02,234,3.02,235,3.02,236,3.02,237,3.02,238,2.076,239,2.742]],["t/21",[1,0.49,240,5.788,241,5.632,242,8.674,243,6.381]],["t/23",[26,2.238,30,2.721,35,2.483,36,3.538,51,1.922,60,0.983,98,2.721,154,2.519,183,1.867,184,3.787,185,3.787,202,1.476,241,3.342,244,4.726,245,4.674,246,5.808,247,1.715,248,3.655,249,4.674,250,5.148,251,4.362,252,2.981,253,5.148,254,3.942,255,5.148,256,5.148,257,4.674,258,4.674,259,5.148,260,4.129,261,3.942,262,3.181,263,3.538,264,4.362,265,2.721,266,4.674,267,2.353,268,2.923,269,2.323,270,4.362,271,5.148,272,3.181,273,4.362]],["t/25",[26,1.971,49,1.131,60,0.866,64,1.995,83,3.116,88,2.218,90,2.481,92,2.046,97,1.613,113,3.218,114,2.481,139,2.205,152,3.189,180,2.285,202,1.299,204,2.285,238,3.116,244,4.338,267,2.072,269,2.046,274,4.27,275,3.754,276,4.544,277,3.314,278,2.943,279,2.738,280,2.127,281,2.526,282,2.099,283,2.943,284,3.472,285,3.841,286,3.116,287,2.68,288,2.02,289,4.116,290,3.218,291,2.869,292,2.218,293,3.061,294,3.636,295,2.801,296,2.285,297,3.636,298,2.68,299,3.841,300,4.116,301,2.526,302,3.116,303,3.335,304,3.472,305,2.68]],["t/27",[27,2.362,30,2.157,42,1.638,59,0.472,64,2.691,138,2.411,139,1.361,152,1.968,183,1.479,199,2.232,204,2.056,217,3.456,244,4.52,257,3.704,258,3.704,263,2.804,267,1.864,269,1.841,274,2.232,277,1.732,279,2.464,286,2.804,288,1.818,296,2.056,298,2.411,306,2.273,307,2.273,308,1.841,309,2.896,310,3.01,311,3.124,312,4.079,313,4.08,314,2.362,315,1.996,316,4.079,317,4.079,318,4.532,319,4.499,320,4.683,321,3.456,322,2.722,323,4.079,324,3.456,325,3.456,326,3.272,327,4.079,328,2.567,329,3.456,330,3.456,331,4.079,332,4.079,333,3.272,334,4.079,335,4.079,336,3.001,337,4.079,338,1.774,339,2.896,340,4.079]],["t/29",[26,2.461,69,2.897,127,2.135,136,3.674,139,1.888,243,4.163,244,4.504,274,3.096,281,3.153,288,3.446,299,4.795,307,3.153,310,3.615,322,3.776,341,5.659,342,4.795,343,5.659,344,4.163,345,5.659,346,2.897,347,7.021,348,4.539,349,4.163,350,5.689,351,5.138,352,4.334,353,5.138,354,5.659,355,4.795,356,4.795,357,5.659,358,5.659]],["t/31",[16,2.676,35,1.754,51,2.093,54,2.703,59,0.494,60,0.694,69,1.862,85,2.302,114,1.99,127,2.114,152,1.754,174,2.065,202,1.606,204,2.824,238,2.5,244,4.782,263,2.5,265,1.923,274,3.066,286,2.5,288,3.046,295,2.247,302,2.5,307,3.809,309,2.582,310,2.3,311,2.785,322,3.739,329,3.081,338,1.581,346,2.868,350,2.676,356,3.081,359,3.637,360,2.785,361,3.245,362,3.302,363,2.427,364,2.676,365,2.785,366,3.637,367,2.361,368,3.302,369,3.959,370,5.088,371,5.604,372,2.63,373,3.852,374,2.427,375,3.302,376,2.5,377,1.833,378,3.637,379,2.676,380,3.637,381,2.582,382,2.361,383,3.637,384,3.637,385,3.637,386,3.081,387,2.582,388,2.5]],["t/33",[1,0.093,14,0.933,26,0.715,28,2.054,42,1.193,47,0.742,49,2.275,54,1.398,59,0.549,60,0.553,62,0.132,63,1.209,64,2.594,88,1.418,92,0.742,95,0.816,97,1.666,103,0.841,109,1.016,131,1.04,138,1.712,139,0.548,141,0.646,142,0.487,144,1.097,152,0.793,171,1.097,173,1.991,174,0.933,180,1.46,183,0.596,201,0.33,202,0.471,204,0.828,244,1.848,245,1.492,247,0.389,249,1.492,263,1.13,267,2.908,269,0.742,275,1.645,276,1.13,277,1.989,280,0.771,282,0.761,284,1.259,291,1.04,296,0.828,298,0.972,301,0.916,304,1.259,306,5.77,307,1.614,308,2.113,309,1.167,310,1.922,314,1.678,315,1.418,319,1.209,324,1.393,325,1.393,330,1.393,336,1.209,338,0.715,360,3.586,363,1.097,367,1.067,372,0.771,377,2.36,389,1.167,390,1.492,391,1.393,392,2.132,393,1.492,394,1.492,395,1.393,396,2.057,397,1.393,398,1.259,399,1.318,400,1.209,401,1.067,402,1.614,403,1.483,404,1.209,405,0.872,406,1.991,407,1.492,408,1.167,409,1.318,410,1.04,411,1.209,412,1.26,413,1.016,414,1.393,415,0.899,416,1.393,417,1.393,418,1.644,419,1.067,420,1.067,421,1.492,422,1.393,423,1.393,424,1.393,425,1.318,426,1.644,427,1.644,428,1.492,429,1.644,430,1.644,431,1.644,432,1.644,433,1.644,434,1.644,435,1.644,436,1.644,437,1.644,438,1.644,439,1.644,440,1.644,441,1.644,442,1.644,443,1.644,444,1.492,445,2.324,446,2.219,447,2.455,448,0.309,449,1.318,450,1.614,451,1.097,452,1.13,453,1.318,454,1.492,455,1.318,456,1.644,457,1.644,458,1.04,459,1.644,460,1.492,461,1.492,462,1.644,463,1.644,464,0.793,465,1.492,466,1.492,467,1.13,468,0.816,469,1.644,470,1.644,471,1.644,472,1.067,473,1.644,474,1.13,475,1.644,476,1.393,477,1.644,478,1.259]],["t/35",[26,2.763,49,1.585,51,2.372,59,0.408,92,2.867,138,3.755,139,2.119,174,3.607,204,3.202,244,3.022,263,4.367,274,3.476,277,2.698,281,3.54,284,4.865,301,3.54,302,4.367,306,3.54,307,3.54,318,3.925,372,2.981,377,3.202,410,4.021,411,4.674,472,4.125,479,5.383,480,5.383,481,4.865,482,4.125]],["t/37",[14,2.384,27,2.432,42,0.938,49,1.559,51,1.568,59,0.48,76,3.216,85,2.658,103,2.15,127,1.584,139,1.401,140,2.887,156,2.802,170,2.258,201,0.479,204,2.117,215,3.216,244,3.932,267,1.919,270,5.295,274,3.419,275,2.384,276,2.887,277,2.654,281,2.34,292,2.055,306,4.605,307,2.34,315,2.055,369,2.432,372,1.971,373,4.295,411,3.09,483,3.216,484,3.368,485,5.674,486,2.887,487,3.813,488,3.368,489,3.368,490,3.558,491,3.813,492,1.274,493,3.813,494,4.2,495,3.558,496,3.813,497,2.981,498,3.368,499,2.981,500,1.804,501,2.802,502,4.2,503,4.2,504,4.2,505,2.482,506,4.2,507,4.2,508,2.34,509,3.813,510,4.2]],["t/39",[1,0.124,9,0.67,12,0.711,14,1.244,15,0.636,24,1.957,26,0.523,27,0.697,39,0.711,41,0.405,42,0.673,51,0.818,59,0.561,64,1.899,66,1.092,69,1.901,70,1.092,76,0.921,78,1.757,83,0.827,87,1.908,88,1.475,92,0.543,95,1.087,97,0.428,99,0.324,103,0.616,110,0.854,115,1.092,118,1.019,126,0.803,127,0.454,139,0.731,152,1.454,154,1.072,157,1.019,171,0.803,174,0.683,179,0.921,180,1.872,181,0.827,183,0.436,189,1.244,201,0.649,202,0.864,204,1.872,205,0.405,211,0.529,244,2.052,247,0.519,267,2.603,269,0.543,274,2.032,275,0.683,276,3.323,277,2.247,280,0.565,284,0.921,288,1.655,291,0.761,293,1.014,294,0.965,295,0.743,296,0.606,298,0.711,300,1.092,302,0.827,303,0.885,305,0.711,306,5.535,307,0.67,308,0.543,310,0.899,313,0.803,314,2.498,315,2.111,338,1.311,346,0.616,349,0.885,351,1.092,360,2.844,362,3.372,365,0.921,372,1.028,374,0.803,377,1.104,387,0.854,388,1.505,392,0.885,396,0.854,400,0.885,401,1.422,402,1.68,403,0.616,405,0.362,406,2.072,409,0.965,410,1.386,411,1.611,415,0.658,422,1.019,423,1.019,424,1.019,425,0.965,451,0.803,453,0.965,455,0.965,460,1.092,472,0.781,485,1.092,488,0.965,492,1.309,499,2.14,500,0.941,505,2.55,511,1.505,512,0.565,513,1.203,514,1.019,515,1.019,516,1.203,517,1.203,518,1.203,519,0.697,520,0.921,521,1.019,522,1.677,523,0.827,524,0.743,525,0.965,526,1.092,527,0.803,528,0.781,529,1.454,530,0.565,531,0.781,532,1.092,533,1.092,534,0.803,535,1.295,536,1.989,537,0.965,538,1.203,539,0.711,540,0.854,541,1.203,542,1.203,543,0.854,544,0.921,545,0.658,546,1.203,547,1.092,548,0.965,549,1.092,550,1.019,551,1.019,552,2.14,553,1.092,554,1.019,555,0.921,556,0.921,557,1.203,558,1.019,559,0.67,560,1.203,561,0.885,562,0.854,563,0.803,564,1.203,565,1.019,566,1.203,567,1.203,568,0.727,569,1.203,570,1.092,571,1.019,572,1.203,573,1.092,574,1.203,575,0.827,576,1.092,577,0.921,578,1.203,579,1.092,580,1.203,581,1.203,582,1.203,583,1.203,584,1.092,585,1.203,586,1.092,587,1.203,588,1.856,589,1.092,590,0.965,591,0.626,592,2.19,593,0.803,594,1.092,595,2.19,596,1.092,597,1.203,598,1.203,599,1.203,600,1.203,601,1.203,602,1.203,603,1.989,604,1.203,605,1.203,606,1.203,607,1.203,608,1.092,609,1.203,610,0.965,611,1.203,612,1.019,613,1.092,614,0.683,615,1.019,616,1.203,617,1.203,618,0.781,619,1.092,620,1.092,621,1.092,622,1.203,623,1.203,624,1.092,625,0.827,626,1.203,627,1.092]],["t/41",[1,0.336,14,3.381,27,3.448,42,1.33,51,2.224,60,1.137,213,2.794,244,4.599,247,1.41,288,2.653,293,2.757,306,3.318,308,2.687,322,3.974,326,4.776,329,5.045,338,2.589,377,3.001,379,4.381,501,3.974,530,3.756,534,3.974,628,3.448,629,5.045,630,5.407,631,3.258,632,5.955,633,5.955,634,5.045,635,5.955,636,5.955]],["t/43",[49,1.806,59,0.539,60,0.983,62,0.414,98,2.721,127,1.942,139,2.794,153,3.043,170,2.768,213,2.416,238,3.538,244,4.324,274,2.817,282,2.384,286,3.538,292,2.519,308,2.323,313,3.435,321,4.362,364,3.787,388,3.538,461,4.674,476,4.362,519,2.981,539,3.043,637,4.129,638,4.129,639,4.362,640,3.538,641,4.674,642,3.942,643,5.148,644,3.942,645,3.435,646,5.148,647,5.148,648,5.148,649,5.148,650,5.148,651,4.674,652,4.674,653,4.362]],["t/45",[51,2.427,69,3.326,98,3.435,127,2.451,139,2.168,244,4.034,247,2.37,267,2.97,274,4.64,277,2.76,281,3.621,287,3.841,297,5.211,310,2.667,313,4.336,365,4.976,405,1.956,512,3.049,525,5.211,534,5.659,654,6.498]],["t/47",[25,5.532,36,4.68,69,3.485,92,3.944,93,5.532,244,4.593,247,2.07,290,4.833,307,3.794,534,4.543,655,5.46,656,6.809,657,6.809,658,6.182,659,6.809,660,6.809,661,3.866]],["t/49",[12,1.473,14,1.415,26,1.084,34,1.663,42,1.532,51,0.931,59,0.631,64,1.097,76,1.908,87,3.359,88,3.836,92,1.124,139,0.831,154,1.219,180,1.256,189,1.415,192,1.618,201,0.705,202,0.714,211,1.097,244,1.969,247,0.59,248,1.769,267,3.751,269,1.867,274,3.382,275,1.415,277,1.758,279,1.505,280,1.169,282,1.916,283,1.618,288,2.754,293,1.916,296,2.086,298,1.473,306,4.745,315,1.219,338,1.8,372,1.169,377,2.675,379,1.833,400,1.833,401,2.687,402,2.306,403,1.276,405,1.246,448,0.469,492,2.245,500,2.947,505,1.473,511,1.713,512,1.169,519,1.443,522,1.908,534,1.663,553,2.262,561,1.833,568,1.505,591,1.296,618,2.687,625,1.713,662,3.507,663,1.833,664,1.908,665,3.758,666,2.492,667,1.833,668,1.998,669,1.443,670,2.762,671,2.557,672,1.769,673,2.262,674,2.492,675,2.111,676,2.111,677,1.54,678,1.363,679,2.492,680,2.492,681,2.492,682,2.492,683,1.908,684,2.492,685,2.492,686,1.769,687,1.769,688,1.998,689,2.262,690,2.492]],["t/51",[14,3.346,27,3.413,49,1.47,69,4.069,97,2.828,138,3.483,183,2.137,244,4.58,267,2.693,269,4.058,278,3.826,287,3.483,288,3.542,296,2.97,306,3.284,307,3.284,346,3.017,375,5.351,484,4.726,492,1.788,500,2.532,691,3.826,692,6.375,693,5.893,694,5.893,695,4.993,696,5.893]],["t/53",[1,0.291,28,2.721,30,2.721,59,0.331,69,2.635,95,2.556,104,3.787,113,3.655,126,3.435,127,1.942,161,3.894,173,3.538,180,2.595,184,3.787,244,4.324,267,2.353,279,3.109,288,2.294,293,2.384,297,4.129,342,4.362,349,3.787,405,1.549,410,5.301,490,4.362,492,2.198,520,3.942,634,4.362,640,3.538,697,5.148,698,4.362,699,3.942,700,4.362,701,5.148,702,5.148,703,5.148,704,7.242,705,5.148,706,5.148,707,4.362,708,3.942,709,4.129]],["t/55",[42,1.909,51,1.994,85,3.38,97,2.643,103,2.734,138,4.392,139,2.85,152,4.122,183,2.694,204,3.745,244,4.394,267,3.396,274,2.922,281,2.976,314,3.093,377,2.692,387,3.792,410,3.38,411,3.929,467,3.671,512,2.506,527,3.564,710,5.341,711,5.341,712,4.849,713,4.525,714,4.849,715,6.746,716,5.341,717,5.341,718,4.849]],["t/57",[1,0.202,12,1.24,14,1.191,15,1.109,26,1.557,28,1.109,42,0.8,47,1.615,49,1.688,59,0.603,60,0.4,63,1.543,64,1.576,79,1.777,87,1.327,88,1.026,90,1.148,92,1.615,125,2.871,127,0.791,136,1.362,177,1.904,199,1.148,201,0.408,202,0.601,211,0.923,215,2.741,267,1.636,269,0.946,279,2.828,280,1.68,288,1.595,293,2.563,298,2.116,306,5.298,308,0.946,310,0.861,313,1.4,315,3.312,360,1.606,367,1.362,377,2.36,396,1.489,405,1.409,407,1.904,420,1.362,446,1.606,455,4.44,472,2.324,492,2.194,500,3.647,505,2.768,512,3.176,524,2.212,525,1.682,527,2.389,535,3.674,555,1.606,561,1.543,625,1.442,668,2.871,670,3.125,677,1.296,686,1.489,719,2.097,720,1.777,721,1.777,722,3.58,723,2.097,724,1.543,725,1.682,726,2.097,727,2.097,728,2.097,729,1.904,730,1.904,731,1.904,732,1.442,733,1.904,734,1.904,735,1.904,736,1.904,737,1.606,738,1.777,739,1.442,740,2.097,741,1.777,742,1.489,743,2.097,744,2.097,745,2.097,746,1.904,747,1.904,748,1.777,749,0.971,750,1.904,751,1.904,752,1.904,753,2.097,754,2.097,755,2.097,756,1.904,757,1.489,758,2.097,759,2.097,760,2.097,761,2.097,762,1.682,763,1.777,764,1.777,765,1.777]],["t/59",[1,0.336,15,3.148,30,3.148,34,3.974,54,2.872,60,1.137,64,2.621,87,3.769,88,3.917,97,3.217,103,3.048,139,1.986,152,2.872,153,3.52,238,4.093,244,3.808,247,1.41,267,3.658,269,2.687,408,4.227,448,1.121,492,1.807,512,2.794,618,3.866,640,4.093,737,4.56,766,5.955,767,4.56,768,5.407,769,5.955]],["t/61",[2,2.572,3,3.907,25,3.229,26,2.218,51,1.905,59,0.536,88,2.496,92,2.302,93,3.229,97,1.815,139,1.702,140,3.507,152,2.461,183,1.85,202,1.462,244,3.966,265,2.697,267,2.332,269,2.302,270,4.323,277,2.167,306,2.843,307,4.009,311,3.907,314,2.954,352,5.511,367,3.312,372,2.394,409,4.092,472,4.672,501,3.404,537,4.092,637,4.092,638,4.092,688,5.771,770,4.632,771,4.092,772,4.323,773,3.507,774,3.404,775,5.102,776,4.323,777,5.102]],["t/63",[1,0.355,25,3.976,26,2.732,40,5.705,41,2.115,47,2.835,59,0.404,88,3.074,92,2.835,154,3.074,202,1.801,244,3.946,248,5.889,267,2.872,305,3.714,307,3.501,367,4.079,372,2.948,377,3.167,467,4.319,484,5.039,500,2.7,508,3.501,535,3.714,591,3.268,778,5.705,779,4.812,780,6.283]],["t/65",[26,2.511,47,2.605,49,1.44,59,0.371,88,2.825,92,2.605,93,4.961,139,1.926,153,3.413,201,0.658,202,1.655,244,3.729,247,1.367,267,2.639,305,3.413,318,3.567,352,6.003,356,4.892,367,3.749,373,3.969,377,2.91,408,4.099,505,3.413,508,3.217,535,3.413,591,3.003,618,3.749,642,4.422,768,5.242,770,5.242,778,5.242,779,4.422,781,5.242,782,4.631,783,5.774]],["t/67",[0,2.619,1,0.234,25,2.619,54,1.996,59,0.565,64,2.72,69,2.118,88,2.025,92,1.867,93,2.619,95,2.055,97,2.199,114,2.264,121,2.938,152,1.996,154,2.025,156,2.762,180,2.086,202,1.186,247,1.464,267,1.891,298,3.654,301,2.306,306,5.914,310,1.699,314,2.396,360,4.734,388,2.845,452,2.845,472,2.687,481,3.169,482,2.687,486,2.845,534,2.762,535,2.446,555,3.169,558,3.507,615,3.507,637,3.319,638,3.319,658,3.758,729,3.758,730,3.758,749,1.916,784,3.319,785,4.139,786,3.758,787,2.619,788,2.619,789,4.139,790,3.758,791,4.139,792,4.139,793,2.938,794,4.139,795,4.139]],["t/69",[59,0.487,114,3.007,139,2.528,158,4.99,174,3.12,183,2.748,200,3.182,201,0.627,244,3.605,267,2.512,274,3.007,277,3.218,281,4.223,287,3.248,367,3.568,369,3.182,372,2.579,374,3.667,382,3.568,387,3.901,509,4.99,543,3.901,593,3.667,669,3.182,796,5.496,797,4.208,798,5.496,799,5.496,800,5.496,801,5.496,802,5.496,803,4.656,804,5.496,805,5.496,806,7.579,807,5.496]],["t/71",[103,3.66,139,2.385,140,4.915,277,3.036,293,3.311,306,3.984,308,3.226,326,5.734,379,5.26,410,4.525,522,5.476,670,4.771,808,6.492,809,7.15,810,6.492,811,7.15,812,6.492,813,7.15,814,7.15]],["t/73",[1,0.343,42,1.813,49,1.517,51,2.271,59,0.391,97,2.164,99,1.637,139,2.029,152,2.934,161,3.27,171,4.058,267,2.78,274,4.442,281,3.389,303,4.474,410,3.849,565,5.153,664,4.658,686,4.318,687,4.318,715,5.522,812,5.522,815,6.082,816,6.082,817,5.522,818,6.082,819,5.522,820,6.082,821,6.082,822,4.058,823,5.522]],["t/75",[1,0.425,35,3.631,49,2.323,69,3.853,110,5.344,136,4.888,244,3.581,269,3.397,310,3.09,342,6.378,350,5.538,398,5.765,709,6.037,824,7.528]],["t/77",[35,3.246,42,1.503,49,1.678,127,2.538,136,4.368,139,2.244,153,3.977,244,3.201,281,3.749,285,5.701,295,4.157,310,2.761,350,4.95,355,5.701,388,4.625,399,5.396,501,4.49,505,3.977,577,5.153,625,4.625,825,6.728,826,6.728,827,6.728,828,6.728]],["t/79",[3,3.472,17,2.943,42,1.013,49,1.649,51,1.693,59,0.291,64,1.995,97,2.352,103,2.321,119,3.025,152,2.187,161,2.438,184,3.335,185,3.335,195,3.636,204,2.285,267,2.072,268,2.574,269,2.983,272,2.801,274,3.617,277,2.808,298,2.68,310,1.861,318,2.801,322,3.025,350,3.335,365,3.472,372,2.127,379,3.335,404,3.335,405,1.99,448,1.469,464,2.187,484,3.636,508,2.526,511,3.116,512,2.127,524,2.801,561,3.335,651,4.116,652,4.116,829,4.534,830,3.235,831,2.285,832,4.116,833,4.534,834,3.841,835,3.841,836,4.534,837,4.534,838,3.636,839,4.534,840,2.738,841,4.534,842,4.116]],["t/81",[49,1.853,104,5.466,139,2.478,154,3.636,267,3.396,274,5.054,291,5.846,308,3.353,420,4.824,489,5.959,596,6.746,642,5.69,843,5.275,844,7.43]],["t/83",[42,1.801,113,5.722,114,4.41,246,6.464,247,1.909,364,5.93,653,6.83,845,8.061,846,7.318,847,7.318]],["t/85",[12,2.501,15,2.237,59,0.272,60,1.2,65,2.501,79,3.585,85,2.677,103,3.216,114,2.315,121,3.003,139,1.411,141,1.663,161,2.275,174,2.402,180,2.132,204,3.167,210,3.24,211,1.862,267,1.934,268,2.402,274,2.315,275,3.568,277,1.797,280,1.985,282,1.959,287,2.501,288,2.8,293,1.959,302,2.908,310,2.579,319,3.113,320,3.24,346,2.166,347,3.841,369,2.45,389,3.003,405,1.273,412,2.732,474,2.908,515,3.585,524,4.631,530,1.985,531,2.747,625,4.319,629,3.585,670,2.823,686,3.003,846,3.841,848,3.841,849,3.585,850,3.378,851,3.113,852,3.841,853,3.841,854,4.193,855,4.231,856,4.231,857,3.393,858,4.231,859,3.113,860,3.841,861,3.585]],["t/87",[244,4.19,280,4.133,369,5.1,387,6.253]],["t/89",[18,4.779,173,5.786,184,6.193,185,6.193,306,4.69,478,6.446,776,7.132]],["t/91",[3,2.666,18,3.776,26,1.514,49,1.659,59,0.482,64,1.532,88,2.651,92,2.444,93,2.203,95,1.729,114,1.905,139,1.161,180,3.352,183,1.262,201,0.618,247,1.575,251,2.95,252,2.016,261,2.666,277,2.301,281,1.94,288,1.551,296,1.755,306,5.969,310,1.429,322,2.323,346,1.782,349,2.561,368,3.161,369,2.016,372,1.634,377,2.731,389,2.471,405,2.001,468,1.729,492,1.644,524,2.151,533,3.161,552,2.471,629,2.95,642,2.666,653,2.95,669,2.016,718,3.161,776,2.95,784,2.792,797,2.666,862,3.161,863,2.792,864,2.95,865,3.481,866,3.481,867,3.481,868,3.481,869,2.792,870,3.161,871,2.792,872,3.481,873,2.95,874,3.481,875,3.481,876,3.161,877,3.161,878,3.161,879,3.161,880,3.161,881,3.481]],["t/93",[59,0.472,90,4.013,119,4.894,288,3.268,310,3.761,389,5.207,398,5.617,519,4.247,570,6.659,784,5.882,882,5.396,883,7.334,884,4.335,885,5.882,886,6.214,887,6.659]],["t/95",[1,0.319,27,3.277,39,3.345,51,2.113,59,0.497,64,2.491,85,3.581,183,2.804,204,2.852,247,1.34,293,2.62,296,2.852,298,3.345,307,3.153,310,2.323,315,3.784,377,2.852,389,4.017,505,3.345,512,2.656,534,3.776,535,3.345,670,3.776,737,4.334,888,4.795,889,7.733,890,5.659,891,4.539,892,5.659,893,4.795,894,4.795,895,2.943,896,5.659,897,5.659,898,4.334,899,5.138]],["t/97",[1,0.53,47,2.899,90,3.515,119,4.287,183,3.405,386,5.444,519,3.72,640,4.416,859,4.727,900,6.425,901,6.425,902,6.425,903,6.425,904,6.425,905,6.425,906,6.425,907,6.425,908,7.133,909,8.418,910,6.425,911,6.425,912,5.833]],["t/99",[1,0.482,12,5.05,92,3.855,363,5.701,913,8.544,914,5.701]],["t/101",[1,0.567,37,4.702,42,2.063,51,2.775,169,3.928,339,5.275,363,4.958,914,6.164,915,7.43,916,6.746,917,6.746,918,7.43]],["t/103",[1,0.425,23,6.835,59,0.484,153,4.45,168,6.378,240,5.023,243,5.538,248,5.344,301,4.194,644,5.765,822,5.023,869,6.037,919,6.835,920,6.378,921,6.835]],["t/106",[1,0.449,62,0.639,200,4.602,403,4.068,467,5.463,922,6.374,923,7.721,924,7.948,925,7.948,926,6.734]],["t/108",[1,0.473,25,2.738,26,1.882,59,0.539,62,0.348,64,1.904,69,2.215,200,2.506,243,3.183,254,3.314,301,2.411,388,2.974,403,2.215,467,2.974,528,2.809,545,3.496,708,4.893,767,3.314,922,3.47,923,5.124,927,6.896,928,4.327,929,4.327,930,6.389,931,6.389,932,4.327,933,7.615,934,6.389,935,4.327,936,6.389,937,6.389,938,4.327,939,4.327,940,4.327,941,3.666,942,4.327,943,4.327,944,6.389,945,4.327,946,4.327,947,3.47,948,3.314,949,3.183,950,3.929,951,5.801,952,2.673,953,3.929,954,4.327,955,3.666,956,2.809]],["t/110",[1,0.557,25,4.525,64,3.147,126,4.771,254,5.476,467,4.915,500,3.072,545,4.934,708,5.476,767,5.476,926,6.058,947,5.734,948,5.476,957,6.492,958,5.476,959,5.076]],["t/112",[1,0.442,64,3.45,301,4.368,528,5.089,926,6.642,947,6.287,948,6.003,958,6.003,959,5.565,960,4.734,961,7.839,962,7.839]],["t/114",[1,0.49,12,3.977,15,3.557,26,3.772,30,3.557,42,1.503,54,3.246,62,0.541,211,2.961,346,3.444,478,5.153,614,3.82,958,5.153,963,5.396,964,5.701,965,5.396,966,6.109,967,7.35,968,6.728,969,6.728,970,6.109]],["t/116",[3,3.772,26,2.142,36,3.386,37,4.442,41,1.658,62,0.396,64,2.168,159,2.797,189,2.797,200,2.852,266,9.518,268,2.797,293,2.281,301,2.744,346,2.521,403,2.521,466,4.472,529,2.376,707,7.551,767,3.772,787,3.117,922,3.95,923,5.629,927,4.472,933,6.372,951,4.472,957,4.472,971,3.497,972,4.926,973,4.926,974,2.562,975,3.287,976,5.629,977,4.926,978,4.926,979,4.926,980,4.926,981,4.173,982,3.497,983,4.173]],["t/118",[30,5.075,59,0.433,136,4.368,211,2.961,301,3.749,683,5.153,721,5.701,787,4.258,958,5.153,965,5.396,967,5.701,982,4.776,984,6.728,985,6.957,986,7.876,987,7.876,988,6.728,989,6.728,990,6.109]],["t/120",[37,4.702,62,0.597,211,3.27,301,4.14,450,5.147,625,5.107,787,4.702,964,6.295,975,4.958,976,5.959,982,5.275,983,6.295,991,7.43,992,7.43,993,5.466]],["t/122",[1,0.542,2,2.618,30,3.853,41,1.749,42,1.628,59,0.334,62,0.586,63,3.822,64,2.286,88,2.542,145,3.822,154,3.566,200,3.008,279,3.137,301,2.894,467,5.009,767,3.978,787,5.328,823,8.726,895,2.702,970,4.717,975,3.467,981,4.402,982,3.688,983,7.133,994,7.288,995,5.195,996,5.195,997,3.978,998,5.195,999,2.793]],["t/124",[2,4.006,51,2.968,98,4.202,153,4.698,738,6.734,838,6.374,857,6.374,914,5.304,1000,7.948,1001,7.216,1002,6.734]],["t/126",[1,0.421,26,4.171,34,2.802,39,2.482,42,0.938,49,1.861,51,1.568,59,0.617,62,0.502,64,2.75,81,3.368,92,3.367,127,2.357,200,2.432,201,0.943,269,1.895,298,2.482,452,2.887,464,2.026,478,3.216,481,3.216,482,2.727,615,3.558,720,3.558,751,3.813,752,3.813,838,5.012,960,2.536,1003,3.368,1004,3.813,1005,6.249,1006,3.47,1007,4.2,1008,6.249,1009,2.802,1010,4.2,1011,4.2,1012,3.368,1013,4.2,1014,3.813,1015,1.376,1016,4.2,1017,1.919,1018,3.813,1019,3.813]],["t/128",[1,0.477,26,3.679,28,5.098,59,0.642,62,0.68,92,3.817,139,1.749,201,0.965,202,1.503,367,5.493,372,3.97,377,2.643,396,3.722,403,2.684,406,5.815,539,4.335,669,3.036,1020,6.215,1021,4.442,1022,3.099,1023,5.243]],["t/130",[1,0.326,26,3.87,28,3.052,30,4.144,37,4.961,39,3.413,42,1.29,51,2.156,59,0.371,62,0.464,92,2.605,109,3.567,141,2.269,142,1.709,152,2.785,192,3.749,243,4.248,468,3.892,508,3.217,591,3.003,1003,6.287,1024,7.656,1025,7.839,1026,3.654,1027,3.343,1028,5.774,1029,3.749,1030,5.774]],["t/132",[1,0.38,14,2.637,46,3.391,59,0.509,62,0.541,87,2.939,97,1.652,99,2.825,114,5.418,119,3.099,142,2.342,174,5.758,180,2.341,202,1.331,205,2.92,207,2.151,269,3.036,280,2.179,550,3.935,593,3.099,671,2.869,683,3.557,699,3.557,952,4.157,1022,2.745,1031,4.217,1032,4.217,1033,4.217]],["t/134",[1,0.475,26,3.66,179,6.446,180,4.243,277,3.575,1003,6.751,1034,8.418]],["t/137",[1,0.313,59,0.654,62,0.613,99,1.493,142,1.643,201,1.123,203,2.093,207,2.569,211,2.442,276,5.244,277,2.356,292,2.715,405,1.67,420,3.603,499,6.988,500,2.384,501,3.703,669,4.418,677,3.428,797,4.249,882,4.082,999,2.984,1015,2.5,1026,3.512,1035,4.702]],["t/139",[1,0.256,14,3.754,17,2.943,26,1.971,28,2.397,42,1.013,59,0.632,62,0.531,71,4.412,92,2.046,95,2.251,97,2.352,99,1.22,103,2.321,104,3.335,201,0.89,211,1.995,247,1.074,276,4.544,277,2.808,292,2.218,293,2.099,314,5.28,353,4.116,372,2.127,405,1.364,474,3.116,492,2.603,500,1.948,543,3.218,544,3.472,547,4.116,669,2.625,677,2.801,741,3.841,797,3.472,882,3.335,993,3.335,999,2.438,1036,3.116,1037,3.335,1038,4.534,1039,4.534,1040,3.841]],["t/141",[1,0.304,59,0.697,62,0.601,92,2.433,104,3.967,201,0.615,202,2.658,206,2.95,211,2.373,275,5.266,276,3.706,277,2.29,292,2.638,381,3.827,492,2.27,530,2.53,539,3.187,667,3.967,669,3.122,797,4.129,999,2.899,1041,2.497,1042,4.568,1043,4.324,1044,6.337,1045,4.568,1046,5.392]],["t/143",[1,0.31,59,0.652,62,0.609,181,3.777,201,0.627,202,1.575,205,1.85,207,2.545,211,2.419,247,1.301,277,2.334,288,2.449,292,2.689,293,4.696,294,6.078,372,2.579,499,6.638,539,3.248,639,4.656,670,5.789,749,3.509,1015,2.484,1047,4.656,1048,5.496]],["t/145",[1,0.34,51,3.626,59,0.651,62,0.648,99,1.62,142,2.387,170,3.236,206,3.293,207,2.786,211,2.649,277,2.556,292,2.945,365,6.173,369,4.668,377,3.033,532,5.464,952,3.718,1001,5.464,1045,5.099,1049,6.018,1050,8.061,1051,5.464]],["t/147",[1,0.323,49,1.942,54,2.757,59,0.569,62,0.626,119,5.195,142,1.692,199,3.128,201,0.652,203,3.34,205,2.621,206,4.845,207,2.647,211,2.516,215,4.377,269,4.29,277,2.427,292,2.797,295,3.531,338,2.485,361,3.31,543,4.058,1052,5.716,1053,7.786,1054,4.377]],["t/149",[1,0.433,36,3.852,42,1.252,51,2.093,59,0.656,62,0.617,99,1.508,111,6.974,139,1.869,174,3.182,211,2.466,238,3.852,277,2.38,280,2.63,292,2.742,308,2.528,402,5.253,519,3.245,540,3.978,757,3.978,895,2.914,1036,3.852,1055,5.604,1056,5.604,1057,6.16,1058,5.604,1059,4.748,1060,5.088,1061,4.748]],["t/151",[1,0.347,51,2.296,59,0.656,62,0.657,99,1.655,201,0.932,211,2.706,263,4.225,277,2.611,292,3.008,373,5.62,396,4.364,406,6.315,861,5.209,1021,5.209,1036,4.225,1062,8.177,1063,5.309,1064,6.148,1065,6.148,1066,3.991]],["t/153",[1,0.399,9,2.768,14,2.821,17,3.226,18,4.01,26,2.16,28,2.627,42,1.577,51,2.637,59,0.528,62,0.568,71,3.315,92,2.242,95,2.467,97,1.767,99,1.337,140,3.415,211,2.187,277,2.999,280,3.314,292,2.431,293,2.301,296,2.504,308,2.242,338,3.071,402,2.768,405,2.125,468,2.467,474,3.415,531,3.226,543,3.527,544,3.805,552,5.013,619,4.511,732,3.415,757,3.527,762,3.985,1036,3.415,1037,3.655,1067,6.412,1068,4.511]],["t/155",[1,0.276,14,2.773,17,3.17,24,3.17,26,2.123,28,2.582,42,1.818,59,0.604,62,0.561,71,3.259,92,2.203,95,2.425,97,1.737,99,1.314,140,3.356,201,0.796,211,2.149,277,2.962,280,2.292,292,2.389,293,2.261,296,2.461,315,3.982,338,3.033,372,2.292,402,2.721,468,2.425,474,3.356,500,3.814,531,3.17,543,3.467,544,3.74,552,4.952,621,4.434,1036,3.356,1037,3.593,1042,5.91,1068,4.434,1069,4.434]],["t/157",[1,0.409,9,2.868,14,2.923,17,3.342,26,3.149,27,4.851,28,2.721,37,3.258,42,1.15,51,1.922,59,0.539,62,0.582,71,3.435,85,3.258,92,2.323,95,2.556,97,1.831,99,1.386,183,2.626,211,2.266,277,3.075,292,2.519,293,2.384,310,2.972,338,3.149,474,3.538,543,3.655,544,3.942,552,5.141,620,4.674,732,3.538,1015,2.373,1036,3.538,1037,3.787,1070,7.242,1071,4.674]],["t/159",[1,0.349,34,2.762,42,0.924,59,0.614,62,0.595,99,2.479,106,2.118,142,1.83,152,4.734,170,2.225,201,0.705,203,1.561,204,3.729,205,2.956,207,1.916,211,1.821,277,3.142,289,3.758,292,2.025,338,1.8,373,2.845,392,7.024,393,3.758,394,3.758,487,3.758,501,2.762,683,3.169,965,3.319,982,2.938,1012,3.319,1054,3.169,1072,4.139,1073,8.206,1074,2.557,1075,3.169,1076,3.319,1077,4.139]],["t/161",[1,0.333,59,0.646,62,0.639,87,3.73,95,2.926,99,2.139,181,4.051,203,2.223,211,2.594,277,2.503,280,2.766,292,2.884,314,6.233,391,6.735,402,3.284,486,4.051,669,3.413,677,3.641,849,4.993,1035,4.993,1074,3.641,1078,5.351]],["t/163",[1,0.316,49,2.352,59,0.606,60,1.8,62,0.617,142,1.659,181,3.852,201,0.639,202,2.202,205,2.585,207,2.595,211,2.466,277,2.38,292,2.742,361,4.448,395,7.988,397,7.425,669,4.448,1054,4.291,1079,4.748,1080,6.974]],["t/165",[26,3.408,51,2.927,92,3.537,103,4.012,262,4.843,277,3.329,291,4.961,293,3.63,299,6.642,1003,6.287,1081,6.003,1082,6.287]],["t/167",[1,0.367,24,4.998,26,1.925,27,3.763,42,0.989,59,0.545,62,0.522,95,4.485,103,2.267,139,2.168,142,1.311,201,0.741,203,1.67,207,2.05,238,3.044,276,4.467,277,3.836,291,2.802,293,3.565,338,2.826,344,3.258,401,2.875,404,3.258,483,3.391,499,6.021,505,2.617,519,2.564,552,4.613,554,7.186,914,2.955,1015,1.451,1081,6.495,1083,4.428,1084,4.428,1085,4.428,1086,4.428]],["t/169",[1,0.367,24,6.13,34,4.336,51,2.427,59,0.545,62,0.522,142,1.924,195,5.211,201,0.967,207,3.009,277,2.76,404,4.781,499,6.021,501,5.659,554,7.186,725,5.211,975,4.336,1015,2.13,1087,6.495]],["t/171",[1,0.273,42,1.549,46,2.44,51,3.025,59,0.446,62,0.389,99,1.303,106,2.478,114,4.839,121,3.437,136,3.144,142,2.053,173,4.765,174,2.749,204,2.44,207,2.242,211,2.131,280,2.272,369,5.806,377,3.495,405,1.457,450,2.698,628,2.804,644,3.708,671,2.991,709,3.883,749,2.242,952,2.991,1047,4.102,1088,4.842,1089,6.295,1090,3.231,1091,4.396,1092,4.396,1093,4.396,1094,2.213,1095,2.369,1096,3.562,1097,4.396,1098,4.842]],["t/173",[1,0.378,14,2.616,46,3.372,59,0.506,62,0.538,87,2.916,97,1.639,99,2.82,114,5.405,119,3.074,142,2.717,180,2.322,202,1.32,205,2.909,207,2.133,269,3.018,280,2.162,369,5.544,550,3.903,593,3.074,671,2.846,699,3.528,952,4.133,1022,2.723,1031,4.183,1032,4.183,1033,4.183,1089,6.073]],["t/175",[9,4.308,15,4.088,42,1.727,47,3.489,95,3.839,280,3.629,308,3.489,369,5.482,402,4.308,568,4.67,1099,7.021,1100,5.689]],["t/177",[1,0.399,2,4.51,46,2.504,49,2.049,51,2.637,59,0.65,62,0.568,97,1.767,142,2.432,201,0.805,202,1.424,267,2.271,412,2.16,448,0.935,669,4.089,914,4.712,1015,2.314,1022,2.937,1082,3.985,1094,2.271,1095,2.431,1101,7.062,1102,6.972,1103,7.062,1104,7.062,1105,4.511]],["t/179",[1,0.49,59,0.675,62,0.636,99,1.811,142,1.992,200,2.689,203,1.752,205,1.563,207,3.116,213,3.713,363,3.099,500,1.996,512,2.179,535,5.127,536,4.217,537,3.725,618,3.015,672,4.777,749,2.151,895,2.415,1106,5.701,1107,5.396,1108,5.396,1109,5.396,1110,5.701,1111,6.109,1112,6.109,1113,3.015,1114,4.645,1115,4.645,1116,2.939,1117,4.217]],["t/181",[1,0.384,42,1.521,59,0.562,62,0.547,99,1.832,125,5.46,142,2.016,315,4.277,412,2.961,512,3.195,535,5.167,672,4.833,731,6.182,732,4.68,1106,5.769,1107,5.46,1108,5.46,1109,5.46,1110,5.769,1117,6.182]],["t/183",[1,0.351,59,0.4,62,0.499,99,1.673,142,2.438,200,3.599,202,1.781,346,4.216,500,3.539,535,4.868,537,4.984,672,4.412,733,5.642,734,5.642,735,5.642,960,3.753,971,5.847,1106,5.266,1107,6.605,1108,4.984,1109,4.984,1118,6.215,1119,4.984,1120,6.215,1121,6.215]],["t/185",[1,0.404,59,0.635,62,0.575,99,1.924,142,2.117,203,2.697,205,2.407,535,5.33,672,5.076,1107,5.734,1108,5.734,1109,5.734,1110,6.058,1111,6.492,1112,6.492,1122,6.058]],["t/187",[9,4.308,15,4.088,42,1.727,47,3.489,95,3.839,280,3.629,308,3.489,402,4.308,535,5.596,568,4.67,1100,5.689,1123,7.021]],["t/189",[1,0.53,42,1.88,51,2.399,59,0.541,62,0.755,95,3.19,99,2.266,180,3.238,200,3.72,280,3.015,307,3.58,314,5.77,372,3.015,402,3.58,612,5.444,669,3.72,975,4.287,1022,3.798]],["t/191",[1,0.333,59,0.646,62,0.639,87,3.73,95,2.926,99,2.139,203,2.223,211,2.594,277,3.375,280,2.766,292,2.884,314,6.233,391,7.621,402,3.284,486,4.051,669,3.413,677,3.641,849,4.993,1035,4.993,1074,3.641]],["t/193",[1,0.373,27,2.625,42,1.477,51,2.914,59,0.612,62,0.531,85,2.869,90,2.481,99,2.1,109,2.801,121,4.693,142,1.957,153,2.68,159,2.574,181,3.116,183,1.644,201,0.754,202,2.237,203,2.943,205,2.627,296,2.285,405,1.364,492,1.376,512,2.127,644,3.472,851,3.335,1006,3.276,1015,2.557,1022,2.68,1041,3.971,1087,3.472,1124,6.612,1125,3.472,1126,4.116,1127,3.472,1128,3.841]],["t/195",[1,0.405,49,2.144,51,2.224,59,0.659,60,1.726,62,0.577,85,3.769,93,2.492,98,2.082,109,2.433,142,2.677,170,2.118,189,2.236,201,0.679,205,2.417,361,5.236,377,1.985,405,1.185,411,2.897,492,1.195,519,4.978,527,6.034,699,3.016,724,5.283,895,3.097,1079,6.084,1125,3.016,1129,3.938,1130,3.576,1131,2.492,1132,3.938,1133,3.938]],["t/197",[9,4.308,15,4.088,42,1.727,47,3.489,95,3.839,280,3.629,308,3.489,402,4.308,527,6.317,568,4.67,765,6.552,1100,5.689]],["t/199",[1,0.357,42,0.952,59,0.535,62,0.508,88,2.086,108,3.87,137,2.844,201,0.486,202,2.763,247,1.009,310,2.593,313,2.844,361,3.659,373,2.93,492,2.285,530,3.907,628,4.821,663,3.136,891,3.418,1006,1.789,1015,1.397,1041,4.682,1134,7.382,1135,4.262,1136,2.93,1137,4.262,1138,6.318,1139,5.556,1140,4.262,1141,4.262,1142,4.262,1143,4.262,1144,5.353]],["t/201",[27,3.72,90,3.515,183,2.33,247,2.223,278,6.716,296,3.238,492,2.555,556,4.92,691,6.096,692,8.296,1096,4.727,1127,4.92,1145,5.466,1146,6.425]],["t/203",[60,1.561,116,6.557,169,4.322,201,0.932,288,3.643,372,3.837,492,2.481,539,4.833,662,6.928]],["t/205",[1,0.557,42,1.252,54,4.227,59,0.635,62,0.704,127,2.114,169,4.633,183,2.785,201,0.999,202,1.606,203,2.114,262,3.462,361,5.075,372,2.63,492,1.7,539,3.312,997,4.291,1041,3.557,1116,3.546,1147,4.291,1148,5.604]],["t/207",[1,0.544,42,1.171,59,0.693,62,0.68,169,4.472,183,2.66,201,1.045,262,3.239,275,2.977,372,2.46,492,1.591,500,3.937,539,3.099,997,4.015,999,2.819,1041,3.396,1063,3.404,1149,3.498,1150,6.479,1151,4.76,1152,4.76]],["t/209",[1,0.532,42,1.252,59,0.672,62,0.617,169,4.633,183,2.785,201,0.999,275,3.182,372,2.63,492,1.7,500,3.3,539,3.312,788,3.546,854,5.848,956,3.638,997,4.291,999,3.013,1041,2.595,1150,5.882,1151,5.088,1152,5.088,1153,5.604]],["t/211",[1,0.389,41,2.965,42,1.968,59,0.68,62,0.554,64,3.033,83,6.054,147,5.526,201,0.786,298,4.073,381,4.892,452,4.736,482,4.474,492,2.091,662,5.839]],["t/213",[1,0.452,39,2.328,42,0.88,49,1.485,54,1.9,59,0.649,60,1.371,62,0.577,88,1.927,97,1.401,99,1.603,142,1.763,169,3.796,181,2.707,183,1.428,201,0.98,260,3.158,269,1.777,288,3.2,293,1.824,295,2.433,318,2.433,361,4.158,398,4.56,399,3.158,400,2.897,508,2.194,512,1.848,568,2.379,670,2.628,895,2.048,914,2.628,1020,5.046,1094,1.8,1095,1.927,1122,3.337,1154,5.407,1155,5.407,1156,5.955,1157,3.938,1158,5.955,1159,5.955,1160,5.955,1161,3.337,1162,3.938,1163,3.938,1164,3.337]],["t/215",[1,0.375,49,2.282,59,0.588,60,1.747,62,0.63,93,2.892,142,1.969,159,2.595,165,3.872,201,0.894,202,1.906,205,2.238,207,2.116,211,2.011,238,3.141,277,3.329,292,2.236,293,2.116,361,4.985,395,7.294,397,6.642,449,3.665,669,3.851,670,3.05,671,2.823,749,3.63,1054,3.5,1079,5.634,1080,6.038]],["t/217",[1,0.296,42,1.638,46,2.643,47,2.366,49,1.308,59,0.589,62,0.421,97,1.865,99,1.411,106,2.684,109,3.239,142,1.552,154,2.565,201,0.598,205,2.469,247,1.241,269,3.817,283,3.404,308,2.366,450,2.921,468,4.55,500,2.253,519,5.584,534,3.498,1094,2.396,1095,2.565,1165,6.659,1166,6.215,1167,4.76,1168,6.215,1169,4.442]],["t/219",[1,0.313,42,1.704,46,2.797,49,1.384,59,0.561,62,0.446,99,1.493,142,1.643,154,2.715,201,0.633,205,2.568,269,3.934,283,3.603,468,4.662,500,2.384,519,5.7,614,3.151,1026,3.512,1094,2.536,1095,2.715,1165,5.038,1166,6.464,1167,5.038,1168,4.702,1169,4.702,1170,5.038,1171,5.549,1172,5.549]],["t/221",[18,4.642,49,2.039,69,4.185,90,4.474,201,0.932,857,6.557,1173,5.456,1174,8.176,1175,8.176]],["t/223",[1,0.475,103,4.309,286,5.786,450,4.69,700,7.132,886,7.132,1027,4.874]],["t/225",[1,0.384,26,2.961,46,3.432,51,2.543,59,0.562,62,0.547,201,0.776,450,3.794,495,5.769,505,4.024,784,5.46,854,4.543,886,5.769,895,3.541,1176,8.741,1177,5.46,1178,6.809,1179,6.182,1180,6.809,1181,6.809,1182,6.809]],["t/227",[1,0.513,46,4.063,51,3.01,59,0.624,62,0.648,98,4.261,183,2.182,201,0.919,301,3.353,708,4.608,739,4.136,749,3.733,854,5.379,1179,7.319,1183,4.765,1184,5.464,1185,6.018,1186,6.018,1187,6.018,1188,5.464]],["t/229",[1,0.266,27,2.734,42,1.055,46,3.432,51,1.763,59,0.562,62,0.379,90,2.583,99,1.271,142,1.398,183,1.712,201,0.538,247,1.891,267,2.158,283,4.421,296,2.38,303,3.474,363,3.151,412,2.053,464,2.278,524,5.726,631,4.369,819,4.287,830,2.31,850,2.539,871,5.461,884,4.025,1006,1.982,1015,1.547,1094,2.158,1095,2.31,1096,3.474,1127,3.616,1189,4.287,1190,4.722,1191,3.787,1192,4.722,1193,4.722,1194,4.722,1195,4.722,1196,4.287,1197,4.722,1198,4.287,1199,4.722,1200,4.722]],["t/231",[1,0.468,274,4.539,446,6.353,450,4.622,736,7.531,737,6.353,1051,7.531,1201,7.531]],["t/233",[1,0.369,15,2.359,18,2.534,42,0.997,49,2.44,51,2.441,59,0.583,62,0.525,65,2.638,138,2.638,142,2.803,183,1.618,201,0.745,267,2.04,283,2.897,321,3.781,346,3.958,377,2.249,405,1.343,448,0.84,474,3.067,492,1.983,512,2.094,628,2.584,724,3.283,848,4.052,877,4.052,1041,3.026,1066,2.897,1096,3.283,1125,3.418,1202,4.463,1203,4.463,1204,4.463,1205,4.463,1206,4.463,1207,4.463,1208,4.463,1209,4.463,1210,4.463,1211,3.168,1212,4.052,1213,4.463,1214,3.781]],["t/235",[1,0.367,42,1.452,49,2.355,59,0.607,62,0.522,63,6.239,142,1.924,201,0.741,338,2.826,346,3.326,492,1.972,512,3.049,669,3.763,956,4.219,1015,2.13,1041,3.009,1094,2.97,1095,3.18,1215,4.781,1216,6.498,1217,6.498,1218,6.498]],["t/237",[1,0.401,49,1.772,54,2.418,59,0.61,62,0.403,63,3.687,106,2.566,127,1.891,142,1.484,169,2.65,183,1.817,201,0.81,265,2.65,296,2.526,310,3.388,315,2.453,346,2.566,405,2.854,420,5.36,450,2.793,500,2.154,529,2.418,870,4.551,895,2.607,1022,2.963,1094,2.291,1095,2.453,1149,4.742,1219,5.012,1220,4.247,1221,3.172,1222,3.838,1223,3.838,1224,3.838,1225,5.012,1226,3.558,1227,5.012]],["t/239",[1,0.313,41,1.868,49,1.903,59,0.604,62,0.446,88,2.715,142,2.581,189,3.151,201,0.87,315,4.817,377,3.845,405,1.67,492,1.684,500,3.746,527,3.703,667,4.082,739,3.814,1149,3.703,1221,3.512,1222,4.249,1223,4.249,1224,4.249,1228,5.549,1229,5.549,1230,5.549,1231,5.549,1232,5.549,1233,5.549]],["t/241",[1,0.404,42,1.597,49,1.783,59,0.58,62,0.575,142,2.67,201,0.815,288,3.186,315,4.412,372,3.355,401,4.642,500,3.072,539,4.226,1221,4.525,1222,5.476,1223,5.476]],["t/243",[1,0.347,59,0.526,62,0.494,88,3.008,99,2.201,131,3.891,142,2.421,201,0.701,275,3.49,279,3.713,313,5.456,315,4.496,377,3.099,405,1.85,895,3.197,1094,2.81,1095,3.008,1150,4.708,1221,6.197,1234,6.928,1235,5.209,1236,6.148]],["t/245",[1,0.258,28,2.416,42,1.021,49,1.955,59,0.504,62,0.367,80,3.872,88,2.236,104,3.362,106,2.339,127,3.247,137,3.05,142,2.549,152,2.204,176,3.5,201,0.758,279,5.2,288,2.963,313,3.05,315,3.254,346,2.339,372,2.145,405,1.375,448,0.86,500,1.964,511,4.571,512,2.145,667,3.362,724,3.362,746,4.149,1094,2.089,1095,2.236,1149,3.05,1220,3.872,1221,4.208,1222,5.093,1223,3.5,1224,3.5,1234,5.634,1237,4.57,1238,4.57,1239,4.57,1240,3.872,1241,4.57]],["t/247",[1,0.411,28,2.746,49,1.818,59,0.541,60,0.992,62,0.418,98,2.746,131,3.288,142,2.492,201,0.592,275,4.138,315,3.566,405,1.563,412,2.259,500,3.131,523,5.786,618,3.373,1063,4.732,1094,2.374,1095,2.542,1149,3.467,1150,6.447,1221,4.612,1222,3.978,1223,3.978,1224,3.978,1235,4.402,1240,4.402,1242,5.581,1243,6.617,1244,4.717,1245,4.717]],["t/249",[1,0.422,2,2.717,49,1.865,59,0.347,60,1.029,62,0.433,142,2.542,150,4.324,187,4.895,201,0.615,202,1.545,269,2.433,275,3.061,315,2.638,346,2.76,405,1.623,412,2.344,492,1.636,500,2.317,512,2.53,523,3.706,539,3.187,834,4.568,1063,4.856,1094,2.464,1095,2.638,1149,3.598,1150,4.129,1198,4.895,1220,4.568,1221,4.733,1224,4.129,1235,4.568,1240,4.568,1243,4.895,1244,4.895,1245,4.895,1246,5.392,1247,5.392]],["t/251",[1,0.34,27,2.312,42,1.344,49,1.501,59,0.466,62,0.484,64,1.758,85,2.527,106,2.044,141,3.168,142,2.144,153,2.36,159,2.267,183,2.182,201,0.826,265,2.111,282,1.849,296,2.013,298,2.36,310,2.47,313,2.665,315,4.232,405,2.179,492,1.212,525,7.566,529,1.926,545,2.185,899,5.464,949,2.938,959,2.835,1094,1.825,1095,1.954,1221,5.102,1234,8.227,1248,4.427,1249,3.994,1250,5.464,1251,6.018,1252,3.994,1253,3.626,1254,3.626]],["t/253",[9,3.662,47,2.966,59,0.61,95,3.264,140,4.518,211,2.893,279,5.16,280,3.084,315,4.181,402,3.662,405,2.572,468,3.264,512,3.084,568,3.97,762,5.271,763,5.569,764,5.569,1069,5.968,1100,4.836,1255,6.573,1256,6.573]],["t/256",[1,0.383,15,1.898,42,1.24,46,2.797,47,1.62,49,0.896,59,0.604,60,1.059,62,0.446,110,2.549,139,1.851,142,1.063,154,1.757,159,2.039,179,2.75,201,0.773,213,1.685,267,1.641,275,2.039,286,2.468,287,2.122,288,1.6,302,2.468,310,1.474,319,2.642,320,2.75,377,1.81,412,3.586,452,2.468,500,1.543,512,1.685,515,3.043,524,3.428,531,2.331,540,2.549,618,3.603,676,3.043,732,3.814,843,2.549,859,4.083,860,3.26,863,4.45,912,5.038,975,2.396,1060,3.26,1257,3.043,1258,3.043,1259,3.26,1260,3.591,1261,3.26,1262,3.591,1263,3.591,1264,3.043,1265,3.591,1266,3.591,1267,5.549,1268,3.591,1269,3.591,1270,3.591,1271,3.591,1272,3.591,1273,5.549,1274,3.591,1275,3.591,1276,3.591,1277,3.591,1278,2.88,1279,3.26,1280,3.591,1281,3.591]],["t/258",[1,0.502,42,1.411,49,1.576,54,3.048,59,0.535,60,1.206,62,0.669,90,2.332,99,2.026,106,2.182,109,2.633,127,1.608,142,1.871,169,3.34,180,2.148,183,1.546,192,2.767,201,0.486,202,1.222,205,2.127,244,2.028,278,2.767,302,2.93,308,1.923,346,2.182,361,3.659,381,3.026,412,3.62,446,4.839,529,2.056,539,2.519,914,2.844,949,3.136,1145,2.767,1278,3.418,1282,4.262,1283,4.262,1284,4.262,1285,4.262,1286,4.262,1287,3.136,1288,4.262,1289,4.262,1290,4.262,1291,3.87,1292,4.262,1293,4.262,1294,4.262,1295,4.262]],["t/260",[1,0.407,59,0.699,62,0.481,81,3.18,88,1.94,106,2.03,150,3.18,181,2.726,183,1.438,194,3.037,201,0.916,202,1.716,241,2.575,247,1.902,261,6.152,288,2.667,318,2.45,328,2.513,486,2.726,512,1.861,534,4.812,568,2.395,613,3.601,669,2.296,1063,5.215,1066,5.215,1076,6.442,1094,1.813,1095,1.94,1296,8.033,1297,3.966,1298,5.986,1299,3.601,1300,3.966,1301,3.36,1302,2.296,1303,3.966]],["t/262",[1,0.436,49,2.197,59,0.609,62,0.622,109,3.496,142,2.803,150,4.539,201,0.645,215,5.922,492,1.717,500,2.432,508,3.153,540,4.017,1015,2.534,1040,8.398,1094,2.586,1095,2.769,1259,5.138,1304,5.659,1305,7.733,1306,7.733,1307,5.659]],["t/264",[1,0.372,9,1.916,59,0.656,62,0.53,64,1.514,99,1.444,142,1.589,189,4.233,201,0.85,202,2.137,203,1.297,205,1.158,267,1.572,314,1.991,355,2.914,367,3.484,372,1.614,405,1.035,406,2.364,492,2.809,500,2.306,530,2.518,671,2.125,677,2.125,859,5.947,880,3.123,1006,1.444,1015,1.127,1024,2.758,1045,4.547,1054,2.634,1059,2.914,1081,2.634,1094,1.572,1308,8.636,1309,3.439,1310,2.758,1311,3.439,1312,3.439,1313,3.439,1314,3.439,1315,3.123,1316,3.439,1317,3.439,1318,3.439,1319,3.439,1320,2.914,1321,3.439,1322,3.439,1323,3.439,1324,3.439,1325,3.439,1326,3.439,1327,3.439,1328,3.439]],["t/266",[9,4.761,13,5.271,34,4.386,42,1.468,49,1.639,64,2.893,65,3.885,78,5.271,110,4.666,126,4.386,127,2.479,136,4.268,183,3.098,290,4.666,408,4.666,492,1.995,545,3.596,610,5.271,618,4.268,1009,4.386,1024,5.271,1096,4.836,1310,5.271,1320,5.569]],["t/268",[1,0.449,51,2.968,54,2.843,59,0.681,62,0.639,142,1.745,201,0.906,280,2.766,288,2.626,322,3.933,361,5.575,405,2.392,709,4.726,1022,3.483,1094,2.693,1095,2.884,1105,5.351,1125,4.513,1329,8.157]],["t/270",[1,0.422,39,3.187,42,1.204,47,2.433,59,0.626,62,0.601,99,2.311,141,2.94,152,2.601,153,3.187,201,0.853,202,1.545,288,3.333,297,4.324,307,3.004,322,3.598,361,4.331,412,3.252,540,3.827,551,4.568,1211,3.827,1212,4.895,1226,6.916,1329,4.568,1330,4.568,1331,5.392,1332,4.324,1333,5.392]],["t/272",[97,2.909,152,3.944,170,4.396,200,4.734,204,4.936,280,3.837,405,2.461,1215,6.015]],["t/274",[1,0.381,25,1.824,42,1.042,46,2.96,59,0.476,62,0.542,88,2.282,97,2.401,99,2.416,109,1.781,141,1.133,142,1.998,152,4.946,170,1.55,173,3.206,174,4.935,196,1.924,201,0.77,202,2.491,203,2.215,204,3.736,205,2.495,206,2.552,207,3.125,208,2.617,209,4.234,210,2.207,211,2.585,376,1.981,377,1.453,387,2.046,392,4.321,956,1.872,982,3.311,1026,3.717,1027,3.401,1094,1.317,1095,1.41,1257,2.442,1330,2.442,1334,6.749,1335,4.664,1336,2.617,1337,2.883,1338,2.883,1339,2.442,1340,2.883]],["t/276",[1,0.416,15,2.172,42,0.918,49,1.025,59,0.526,60,0.784,62,0.592,69,2.103,99,1.106,106,2.103,127,1.55,141,2.416,142,2.421,152,4.594,174,4.971,192,2.668,201,0.469,202,1.178,203,2.319,204,3.713,205,1.383,206,2.248,207,1.903,278,2.668,288,1.831,295,2.538,346,2.103,349,3.023,392,3.023,512,1.928,1041,2.847,1063,6.358,1116,3.891,1341,4.109,1342,3.73,1343,3.73,1344,4.109,1345,4.109,1346,4.109,1347,6.148,1348,4.109,1349,4.109,1350,6.148]],["t/278",[1,0.297,2,1.693,46,1.693,47,1.515,49,0.838,59,0.674,62,0.423,69,1.719,80,2.845,97,2.312,98,1.775,99,2.151,106,1.719,142,1.924,152,4.429,170,2.832,171,2.241,192,2.18,201,0.601,202,1.51,203,2.776,204,1.693,205,1.773,206,3.556,207,1.555,211,1.478,260,2.693,288,1.496,307,1.871,308,1.515,322,2.241,364,2.471,376,2.308,392,2.471,412,2.29,511,2.308,512,1.576,551,2.845,713,2.845,982,4.613,1094,2.407,1095,2.577,1116,4.113,1161,2.845,1214,2.845,1330,2.845,1351,3.358,1352,3.358,1353,3.358,1354,5.267,1355,3.358,1356,3.358,1357,3.358,1358,3.358,1359,3.358,1360,3.358,1361,3.358,1362,3.358,1363,3.358,1364,3.358]],["t/280",[9,4.308,15,4.088,42,1.727,47,3.489,95,3.839,204,4.772,280,3.629,308,3.489,402,4.308,568,4.67,1100,5.689,1365,7.021]],["t/282",[1,0.384,2,2.38,30,2.496,36,3.245,37,2.988,39,4.72,42,1.055,51,2.543,59,0.596,88,2.31,90,4.369,117,4.287,145,3.474,154,2.31,170,2.539,183,1.712,194,3.616,293,2.186,401,3.065,404,5.875,479,4,483,3.616,501,3.151,512,2.216,624,4.287,665,6.182,772,4,894,4,917,4.287,1102,3.352,1113,3.065,1366,4.722,1367,4.722,1368,4.722,1369,4.287,1370,4.287,1371,7.251,1372,4.722,1373,4.722,1374,4.722,1375,4.722,1376,4.722,1377,4.287,1378,4.287,1379,4.287]],["t/284",[1,0.248,51,1.641,59,0.415,76,3.365,130,3.989,152,2.119,182,3.989,211,1.934,479,5.475,512,3.032,529,2.119,540,3.119,721,3.723,739,3.02,895,2.285,916,3.989,923,6.146,947,5.182,956,2.853,958,3.365,967,3.723,976,3.524,985,3.524,986,3.989,987,3.989,990,3.989,993,3.233,1102,3.119,1134,5.869,1169,3.723,1369,6.958,1371,6.958,1377,3.989,1378,3.989,1379,3.989,1380,3.989,1381,6.462,1382,6.462,1383,4.394,1384,4.394,1385,4.394,1386,6.462,1387,4.394,1388,3.989,1389,4.394,1390,4.394,1391,6.462,1392,4.394,1393,4.394,1394,6.462,1395,6.462]],["t/286",[1,0.353,2,2.117,49,1.559,59,0.659,60,1.425,62,0.338,139,1.401,142,2.616,152,4.627,169,2.22,201,0.713,204,2.117,412,1.826,489,3.368,505,2.482,779,4.786,952,4.611,1042,3.558,1043,3.368,1044,3.558,1094,2.856,1095,2.055,1116,2.658,1147,4.786,1248,3.09,1396,4.2,1397,4.2,1398,4.2,1399,6.249,1400,3.813,1401,4.2,1402,4.2,1403,4.2,1404,4.2,1405,4.2,1406,4.2,1407,4.2,1408,6.249,1409,4.2,1410,3.216,1411,4.2,1412,4.2,1413,4.2,1414,4.2]],["t/288",[9,4.194,15,3.98,42,1.682,47,3.397,95,3.738,280,3.533,308,3.397,402,4.194,568,4.547,1094,3.441,1100,5.538,1410,5.765,1415,6.835,1416,6.835,1417,5.023]],["t/290",[1,0.431,18,3.151,26,2.413,49,1.903,59,0.491,60,1.059,62,0.613,69,2.84,99,1.493,142,1.643,156,3.703,161,2.984,201,0.87,247,2.065,269,2.504,277,2.356,293,3.533,294,4.45,361,3.213,499,3.939,670,3.703,749,2.569,782,4.45,965,4.45,1006,2.329,1015,1.818,1082,4.45,1173,3.703,1418,5.549,1419,5.549,1420,5.549,1421,5.549,1422,5.038,1423,5.549]],["t/292",[18,2.821,26,2.16,35,2.397,42,1.11,49,1.239,59,0.454,60,0.949,90,2.719,98,2.627,137,3.315,159,2.821,160,4.511,165,4.21,247,2.238,272,5.528,293,3.27,311,3.805,364,3.655,387,3.527,401,5.334,412,3.573,486,3.415,492,1.508,568,3.001,673,6.412,725,3.985,747,7.46,748,4.21,749,2.301,750,4.511,1026,3.144,1164,4.21,1424,4.969,1425,4.969,1426,4.969,1427,4.969,1428,4.969,1429,4.969]],["t/295",[49,1.74,59,0.628,298,4.123,310,4.008,376,4.794,505,4.123,522,6.798,737,5.342,999,3.75,1215,5.132,1278,5.594,1302,4.039,1430,5.594,1431,6.975,1432,6.333,1433,6.333]],["t/297",[1,0.351,42,1.84,59,0.709,62,0.335,99,2,127,1.572,159,2.367,174,2.367,183,1.512,201,0.475,261,3.193,268,2.367,288,2.769,296,2.101,310,3.38,320,3.193,338,1.813,377,3.133,381,2.959,389,5.847,390,3.785,412,1.813,631,2.281,645,2.782,691,2.707,748,3.532,861,3.532,887,3.785,960,2.518,999,2.241,1145,2.707,1201,3.785,1433,3.785,1434,3.785,1435,5.266,1436,4.169,1437,6.746,1438,6.215,1439,4.169,1440,4.169,1441,3.532]],["t/299",[1,0.372,16,2.53,18,1.953,42,0.768,49,1.646,51,1.284,59,0.656,60,1.025,62,0.53,65,2.033,137,2.295,142,2.207,159,1.953,201,0.753,202,0.986,278,4.284,281,5.609,310,2.202,320,2.634,348,2.758,389,2.442,412,4.437,519,1.991,539,2.033,645,2.295,691,2.233,692,5.292,720,2.914,1006,3.596,1015,2.163,1145,3.484,1189,3.123,1442,2.914,1443,6.599,1444,6.599,1445,6.599,1446,6.599]],["t/301",[1,0.518,25,2.916,59,0.615,62,0.695,92,2.079,98,2.435,106,3.424,114,2.521,119,3.074,141,1.811,142,2.834,161,2.477,169,3.536,174,2.616,183,1.671,192,4.343,201,0.763,202,2.477,310,1.891,350,3.389,539,5.425,556,3.528,628,2.668,999,2.477,1278,3.695,1332,5.364,1447,4.607,1448,6.689,1449,6.073,1450,4.607,1451,6.689]],["t/303",[1,0.345,39,2.411,59,0.68,60,0.779,62,0.491,69,2.088,85,2.582,88,1.996,98,2.157,99,2.193,128,3.456,141,2.403,169,2.157,201,0.836,202,2.102,203,1.539,205,1.373,207,1.889,213,4.096,273,3.456,282,1.889,293,1.889,310,2.51,401,2.649,450,2.273,514,3.456,708,3.124,732,2.804,742,2.896,830,1.996,908,3.456,956,2.649,1004,3.704,1063,2.649,1147,3.124,1452,3.456,1453,4.079,1454,4.499,1455,3.456,1456,4.079,1457,6.115,1458,6.115,1459,6.115,1460,4.079,1461,4.079,1462,4.079,1463,4.079,1464,4.079]],["t/305",[1,0.371,35,1.649,41,1.151,59,0.723,60,0.653,62,0.429,64,1.505,65,2.021,98,1.807,106,1.75,126,2.281,201,0.39,202,0.98,211,1.505,254,2.618,288,1.523,296,1.723,305,2.021,309,3.792,310,2.192,328,1.435,330,2.897,336,3.929,349,2.515,452,2.35,488,2.742,496,3.104,505,2.021,555,2.618,562,2.427,593,2.281,614,1.941,771,2.742,851,2.515,1040,2.897,1090,3.564,1094,1.562,1095,1.673,1226,2.427,1279,3.104,1465,2.427,1466,5.341,1467,3.419,1468,3.419,1469,2.515,1470,3.419,1471,3.419,1472,3.419,1473,3.419,1474,3.419,1475,3.419,1476,3.419,1477,3.419,1478,3.104,1479,3.419,1480,3.419,1481,3.419,1482,3.419,1483,4.284,1484,3.419,1485,3.419,1486,3.419,1487,3.419,1488,3.419,1489,3.419,1490,3.419,1491,3.419,1492,3.104]],["t/307",[1,0.375,2,3.352,59,0.689,62,0.534,138,5.089,201,0.758,268,3.776,269,3,309,4.721,310,2.729,373,4.571,695,5.634,952,4.108,1090,4.437,1094,3.039,1095,3.254,1287,4.892,1493,6.65,1494,4.721]],["t/309",[1,0.326,49,1.44,59,0.713,60,1.102,62,0.464,127,2.178,138,4.634,142,1.709,201,0.894,202,1.655,205,1.943,309,4.099,310,2.37,346,2.955,483,4.422,512,2.709,1063,3.749,1090,3.853,1094,2.639,1095,2.825,1495,5.242,1496,5.774,1497,5.774,1498,5.774,1499,5.774,1500,5.774]],["t/311",[1,0.355,49,1.567,59,0.678,62,0.505,98,3.322,138,4.903,201,0.717,309,4.46,310,2.579,318,5.125,409,6.653,505,3.714,695,5.324,732,4.319,1063,5.386,1094,2.872,1095,3.074,1122,5.324,1287,4.622,1299,5.705,1501,6.283]],["t/313",[1,0.425,49,1.878,59,0.484,114,4.119,183,2.73,303,5.538,410,4.764,851,6.851,1128,7.89,1215,5.538,1441,6.378,1502,7.528,1503,7.528]],["t/315",[18,3.004,49,1.32,60,1.01,62,0.425,68,4.804,121,3.756,159,3.004,176,4.052,189,3.004,202,1.517,310,2.172,372,3.99,374,3.531,410,4.672,412,4,478,4.052,492,2.24,618,3.435,631,2.895,851,3.893,959,3.756,1009,3.531,1047,4.483,1081,4.052,1087,4.052,1128,4.483,1173,3.531,1191,4.244,1504,5.291,1505,4.804,1506,4.244,1507,5.92,1508,5.291,1509,5.291,1510,5.291,1511,4.804,1512,5.291,1513,5.291,1514,5.291]],["t/317",[1,0.479,27,3.763,39,3.841,42,1.894,51,2.427,83,4.466,152,3.135,183,3.423,296,3.275,386,5.506,408,4.613,420,4.219,893,5.506,975,5.659,1130,5.9,1170,5.9,1515,6.498,1516,6.498,1517,6.498,1518,6.498,1519,6.498,1520,6.498]],["t/319",[1,0.458,13,4.878,42,2.041,98,3.215,171,4.058,200,3.522,204,3.066,278,3.949,279,3.673,280,2.854,315,2.976,369,3.522,405,1.83,492,1.846,524,3.758,527,4.058,535,3.595,664,4.658,686,5.763,687,4.318,688,4.878,817,5.522,895,3.163,1066,3.949,1076,4.878,1094,2.78,1342,5.522,1410,4.658,1521,5.522]],["t/321",[0,3.654,1,0.326,14,3.278,24,3.749,35,2.785,42,1.29,54,2.785,59,0.504,71,3.853,126,3.853,154,3.836,168,4.892,200,3.343,280,2.709,282,2.674,290,4.099,296,2.91,402,4.368,447,4.892,467,3.969,505,3.413,529,2.785,699,4.422,893,6.642,959,4.099,975,3.853,1037,5.767,1071,5.242,1388,5.242,1522,5.774,1523,5.242,1524,5.774,1525,5.774]],["t/323",[1,0.48,9,1.382,24,1.611,26,1.079,36,4.703,41,0.835,42,1.649,46,1.251,47,1.119,59,0.579,62,0.495,83,1.705,88,1.214,90,3.744,95,1.232,103,1.27,131,1.57,153,1.466,171,1.656,180,2.667,204,3.721,279,2.491,280,2.893,282,3.168,286,2.834,291,1.57,296,3.107,306,1.382,308,1.119,314,3.57,315,2.018,338,1.079,369,3.57,372,1.164,373,1.705,377,2.078,402,4.564,404,1.825,405,1.241,450,1.382,468,2.048,480,4.484,500,1.066,511,1.705,519,3.962,527,2.752,535,3.128,552,2.927,664,1.9,672,1.761,686,2.927,725,1.99,749,1.909,756,2.253,914,1.656,948,1.9,960,1.498,999,1.334,1022,1.466,1027,1.437,1059,4.484,1061,4.484,1066,1.611,1074,1.533,1075,1.9,1078,2.253,1094,1.134,1410,1.9,1526,2.481,1527,5.597,1528,2.481,1529,2.481,1530,2.481,1531,2.481,1532,2.481,1533,2.253,1534,2.253,1535,2.481,1536,2.481,1537,2.481]],["t/325",[19,4.427,24,3.907,42,1.344,46,3.033,90,3.293,153,3.557,156,4.016,169,3.181,204,3.033,280,2.824,296,4.582,348,4.826,419,3.907,468,4.513,486,4.136,531,3.907,556,4.608,762,4.826,763,5.099,764,5.099,765,5.099,1099,5.464,1123,5.464,1365,7.319,1415,5.464,1416,5.464,1538,5.464,1539,6.018,1540,5.099]],["t/327",[0,2.138,1,0.417,2,1.703,14,1.918,24,2.193,28,1.786,30,1.786,31,2.322,36,2.322,41,1.137,42,0.755,46,2.667,49,1.999,54,1.63,59,0.475,60,1.01,62,0.524,64,1.487,71,2.254,90,2.895,91,3.067,99,1.756,103,1.729,116,2.709,142,1.567,201,0.744,202,0.968,269,1.524,274,1.848,293,2.45,295,3.269,298,1.997,306,1.882,326,2.709,382,2.193,428,3.067,449,2.709,476,2.862,528,2.193,529,1.63,749,1.564,808,3.067,948,2.587,952,3.269,956,2.193,1021,2.862,1037,2.485,1057,2.709,1144,2.862,1329,5.527,1541,2.862,1542,3.378,1543,3.378,1544,5.292,1545,3.378,1546,3.378,1547,5.292,1548,5.292,1549,5.292,1550,2.322,1551,3.067,1552,2.04,1553,2.254,1554,3.378,1555,3.378,1556,3.378,1557,3.378,1558,3.067,1559,5.292,1560,3.378,1561,3.378,1562,3.067,1563,3.378,1564,3.378,1565,3.378,1566,3.378,1567,3.378,1568,3.378]],["t/329",[1,0.313,26,2.413,46,2.797,59,0.692,92,2.504,99,2.053,127,2.093,161,2.984,179,4.249,205,2.568,288,2.473,410,4.828,483,4.249,631,3.036,645,3.703,692,4.45,830,2.715,835,4.702,955,4.702,1082,4.45,1226,7.535,1417,3.703,1569,5.549,1570,5.549]],["t/331",[1,0.508,59,0.715,62,0.474,98,3.116,141,2.316,169,4.202,183,2.137,201,0.906,202,2.278,231,5.351,261,4.513,749,2.729,1302,3.413,1571,7.949,1572,7.949,1573,5.893,1574,7.949,1575,5.893]],["t/333",[0,3.691,1,0.329,18,4.482,26,3.432,28,3.084,30,3.084,31,4.009,92,2.632,95,2.896,97,2.075,161,3.136,173,6.15,183,2.115,207,2.701,268,3.312,296,2.94,492,2.715,707,4.942,878,5.296,895,3.034,963,4.678,1029,3.787,1094,2.666,1380,5.296,1538,5.296,1576,5.833,1577,5.296,1578,5.833,1579,5.833,1580,4.942,1581,5.833]],["t/335",[1,0.359,92,2.867,137,4.239,156,5.576,171,4.239,201,0.953,202,1.821,251,7.912,252,3.679,376,4.367,450,3.54,492,2.536,588,5.383,614,3.607,963,5.095,1029,4.125,1315,5.768,1336,5.768,1454,4.674,1505,5.768,1558,5.768,1580,5.383,1582,6.353,1583,6.353]],["t/337",[1,0.501,62,0.713,69,3.57,169,4.693,180,3.516,267,3.188,288,3.108,293,4.111,492,2.117,876,6.333,1584,6.975,1585,6.975,1586,6.975,1587,6.975,1588,6.975,1589,6.975,1590,6.975]],["t/339",[1,0.361,27,2.506,49,1.594,51,2.836,59,0.602,62,0.514,87,2.738,90,2.368,98,2.288,99,1.72,114,3.496,121,3.072,127,1.632,142,1.892,153,2.558,183,1.569,201,0.729,202,2.404,203,2.41,205,2.15,214,3.929,260,3.47,296,3.22,405,1.302,410,2.738,492,1.313,530,2.998,612,3.666,644,3.314,713,3.666,885,3.47,963,3.47,975,2.887,1006,2.682,1015,2.094,1022,2.558,1041,3.517,1087,3.314,1096,3.183,1125,3.314,1127,3.314,1580,3.666,1591,3.929,1592,6.389,1593,4.327]],["t/341",[1,0.38,26,2.926,42,1.503,49,1.678,92,3.036,93,5.49,98,3.557,106,3.444,109,4.157,113,4.776,148,5.701,171,4.49,201,0.767,367,4.368,372,3.157,472,4.368,535,3.977,545,3.681,781,6.109,1521,6.109,1594,6.728,1595,6.728,1596,6.728]],["t/343",[1,0.488,39,2.723,42,1.494,49,1.149,59,0.615,62,0.538,98,3.536,99,1.24,127,1.738,142,1.98,183,1.671,201,0.525,207,2.133,315,3.273,369,3.873,372,2.162,492,2.03,500,1.979,511,4.598,512,3.139,530,2.162,664,6.618,686,6.135,687,6.135,688,6.316,749,2.133,952,2.846,1041,2.133,1076,5.364,1090,3.074,1091,4.183,1092,4.183,1093,4.183,1597,4.607]],["t/345",[16,5.195,51,2.637,122,6.412,137,5.97,139,2.356,239,6.412,281,4.985,512,3.314,545,3.864,687,5.013,772,5.983,894,5.983,1598,7.062,1599,7.062,1600,7.062,1601,7.062,1602,7.062,1603,7.062]],["t/347",[1,0.329,51,2.178,59,0.679,60,1.507,62,0.634,81,4.678,99,1.57,139,2.633,142,2.337,192,3.787,207,3.655,211,2.567,295,4.877,361,4.571,364,4.291,512,3.704,782,4.678,1036,4.009,1041,3.655,1258,4.942,1604,7.894]],["t/349",[1,0.301,51,1.994,54,4.456,59,0.714,62,0.597,99,1.437,139,2.479,201,0.847,211,2.351,288,2.38,295,3.3,361,5.349,398,5.69,512,4.01,741,4.525,782,4.283,1036,3.671,1161,4.525,1258,4.525,1605,7.43,1606,5.341]],["t/351",[0,3.769,24,3.866,28,3.148,30,3.148,31,4.093,71,3.974,88,3.917,95,3.974,97,2.118,99,1.603,126,3.974,137,3.974,139,2.67,200,3.448,248,4.227,281,3.318,862,5.407,863,7.251,895,3.097,971,4.227,976,4.776,1041,2.757,1196,5.407,1607,5.955,1608,5.955,1609,5.955,1610,5.955,1611,5.407,1612,5.955,1613,5.955]],["t/353",[41,3.011,403,4.579,545,4.895]],["t/355",[59,0.589,60,1.4,97,2.609,141,2.883,247,2.17,305,5.416,328,3.846,448,1.381,458,5.799,481,5.617,548,5.882,1614,4.894]],["t/357",[59,0.511,60,1.517,247,2.28,328,4.041,448,1.496,451,6.424,481,7.372]],["t/359",[2,3.951,41,2.638,83,5.388,264,6.642,304,6.003,305,4.633,403,4.012,451,5.231,960,4.734,1214,6.642,1370,7.117,1615,6.642]],["t/361",[1,0.329,41,1.963,59,0.719,60,1.114,62,0.469,201,0.665,202,2.748,247,1.381,304,6.852,305,3.448,328,2.449,448,1.098,492,1.77,993,5.807,1615,4.942,1616,5.833,1617,5.833,1618,6.688,1619,5.296]],["t/363",[1,0.332,41,1.687,42,0.514,59,0.74,60,0.439,62,0.472,97,1.377,99,1.349,201,0.67,202,2.274,205,0.774,304,5.022,328,2.753,399,3.105,445,1.845,448,0.433,451,1.535,492,1.521,500,1.664,520,1.762,568,1.39,575,2.661,645,1.535,863,5.699,960,1.39,993,2.848,1006,1.625,1015,1.269,1149,2.583,1168,3.28,1465,2.748,1483,3.105,1615,4.247,1618,3.28,1620,2.089,1621,3.872,1622,3.872,1623,2.301,1624,2.301,1625,2.301,1626,1.845,1627,1.949,1628,2.965,1629,3.515,1630,2.301,1631,1.949,1632,2.301,1633,2.301,1634,3.872,1635,3.872,1636,4.247,1637,3.872,1638,5.012,1639,3.872,1640,1.949]],["t/365",[41,3.011,403,4.579,545,4.895]],["t/367",[1,0.367,59,0.643,60,1.241,62,0.522,97,2.312,141,2.554,201,0.741,247,2.008,305,5.013,328,3.56,448,1.223,458,5.367,482,5.506,548,5.211,1006,2.728,1614,4.336,1641,5.211,1642,6.498,1643,5.9]],["t/369",[1,0.399,59,0.631,60,1.348,62,0.568,201,0.805,247,2.119,328,3.756,448,1.329,451,4.712,482,6.376,1006,2.964,1015,2.314,1641,5.663,1644,7.062]],["t/371",[1,0.343,58,5.522,59,0.627,60,1.161,62,0.489,97,2.164,201,0.694,247,1.922,282,2.816,285,5.153,302,4.18,305,4.799,328,3.408,419,3.949,448,1.145,458,5.138,482,5.271,548,4.878,1006,2.553,1614,4.058,1641,4.878,1643,5.522,1645,5.522,1646,4.474,1647,6.082]],["t/373",[1,0.399,59,0.631,62,0.568,201,0.805,247,1.672,291,4.469,328,3.756,448,1.329,482,5.809,739,4.854,1006,2.964,1015,2.314,1641,5.663,1645,6.412,1648,7.062,1649,7.062]],["t/375",[41,3.011,403,4.579,545,4.895]],["t/377",[1,0.384,41,2.292,42,1.521,49,1.698,59,0.562,62,0.547,127,2.568,201,0.776,202,1.952,310,2.794,405,2.049,415,5.282,448,1.282,678,3.725,1020,5.769,1650,6.809,1651,6.809,1652,6.182,1653,4.68,1654,6.809]],["t/379",[2,4.121,247,1.936,415,4.474,575,5.62,645,5.456,956,5.308,1002,6.928,1652,7.423,1655,7.423]],["t/381",[1,0.425,2,3.794,41,2.534,59,0.599,62,0.605,201,0.859,415,5.095,575,5.174,678,4.119,1184,6.835,1653,5.174,1656,7.528,1657,7.528]],["t/383",[1,0.425,2,3.794,41,2.534,59,0.599,62,0.605,201,0.859,301,4.194,415,5.095,575,5.174,678,4.119,1653,5.174,1658,7.528,1659,7.528]],["t/385",[60,1.607,405,2.533,415,5.452,895,4.378,1027,4.874,1164,7.132]],["t/387",[60,1.607,161,4.526,405,2.533,415,5.452,1027,4.874,1434,7.643]],["t/389",[60,1.607,161,4.526,381,5.976,405,2.533,415,5.452,1027,4.874]],["t/391",[1,0.384,41,2.292,59,0.562,60,1.3,62,0.547,99,1.832,161,3.661,201,0.776,203,2.568,405,2.049,415,5.282,678,3.725,1027,5.061,1435,5.769,1653,4.68,1660,6.182,1661,6.182,1662,6.809,1663,5.769]],["t/393",[1,0.389,41,2.319,59,0.624,60,1.316,62,0.554,161,3.705,201,0.786,203,2.599,405,2.651,415,5.312,678,3.77,1027,3.99,1435,5.839,1653,4.736,1660,6.256,1663,5.839,1664,5.839]],["t/395",[1,0.389,41,2.319,59,0.624,60,1.316,62,0.554,99,1.855,161,3.705,201,0.786,405,2.651,415,5.312,678,3.77,1027,3.99,1653,4.736,1661,6.256,1663,5.839,1664,5.839,1665,6.891]],["t/397",[1,0.394,41,2.348,59,0.628,60,1.332,62,0.561,161,3.75,201,0.795,405,2.672,415,5.343,678,3.817,1027,4.039,1653,4.794,1664,5.91,1666,6.975,1667,6.975,1668,6.333]],["t/399",[1,0.409,41,2.437,47,3.267,59,0.584,60,1.382,62,0.582,201,0.826,283,4.701,415,3.962,631,3.962,678,3.962,774,4.832,1147,5.545,1653,4.977,1669,7.241,1670,5.327,1671,7.241]],["t/401",[1,0.442,12,4.633,59,0.504,64,3.45,103,4.012,183,2.842,240,5.231,268,4.451,661,4.451,822,5.231,1131,4.961,1672,5.565]],["t/403",[139,2.85,568,5.16,661,4.851,1673,8.544,1674,8.544,1675,4.675]],["t/405",[129,6.144,199,4.41,448,1.517,661,4.577,671,4.98,749,4.496,1676,8.226]],["t/407",[41,3.011,403,4.579,545,4.895]],["t/409",[1,0.288,35,2.461,49,1.795,54,3.471,59,0.637,62,0.41,127,1.924,139,3.185,201,0.582,202,2.839,207,2.362,247,1.704,382,3.312,412,3.937,448,0.96,559,5.044,1074,3.152,1550,3.507,1552,3.081,1675,2.792,1677,2.897,1678,5.102,1679,5.102,1680,5.102,1681,3.404,1682,3.753,1683,3.753,1684,3.753]],["t/411",[1,0.396,35,2.376,49,1.751,54,3.386,59,0.63,62,0.396,127,1.858,139,3.142,141,3.503,201,0.562,202,2.807,247,1.662,282,2.281,382,3.198,448,0.927,528,3.198,559,4.966,1074,3.043,1550,3.386,1552,4.239,1553,3.287,1675,2.695,1677,2.797,1681,3.287,1682,3.624,1683,3.624,1684,3.624,1685,4.926,1686,4.926,1687,4.926]],["t/413",[1,0.396,35,2.376,49,1.751,54,3.386,59,0.63,62,0.396,127,1.858,139,3.142,141,1.936,201,0.562,202,2.807,247,1.662,282,4.127,382,3.198,448,0.927,528,3.198,559,4.966,1074,3.043,1550,3.386,1552,4.239,1553,3.287,1675,2.695,1677,2.797,1681,3.287,1682,3.624,1683,3.624,1684,3.624,1688,4.926,1689,4.926,1690,4.926]],["t/415",[1,0.369,35,3.153,49,1.63,54,3.153,59,0.609,62,0.359,127,1.683,139,3.023,201,0.509,202,2.875,247,1.548,282,3.026,382,2.897,412,2.842,448,0.84,528,2.897,559,4.743,1006,2.744,1015,1.462,1066,2.897,1074,2.757,1332,6.827,1483,3.579,1550,3.067,1552,3.947,1553,2.978,1675,2.442,1677,2.534,1681,2.978,1682,3.283,1683,3.283,1684,3.283,1691,4.463,1692,4.463,1693,4.463,1694,4.463]],["t/417",[1,0.357,35,2.056,49,1.576,54,3.048,59,0.599,62,0.343,127,1.608,139,2.966,201,0.486,202,2.898,247,1.496,282,3.855,382,2.767,412,3.866,448,0.802,528,2.767,549,3.87,559,4.639,1006,1.789,1074,2.633,1332,3.418,1432,3.87,1449,7.56,1550,2.93,1552,3.816,1553,2.844,1675,2.332,1677,2.42,1681,2.844,1682,3.136,1683,3.136,1684,3.136,1695,6.318,1696,4.262,1697,4.262,1698,4.262,1699,4.262]],["t/419",[1,0.394,35,2.356,49,1.74,54,3.365,59,0.628,62,0.392,127,1.842,139,3.132,201,0.557,202,2.799,247,1.652,382,3.17,412,4.083,448,0.919,528,3.17,559,4.946,1006,2.05,1074,3.017,1550,3.356,1552,4.213,1553,3.259,1675,2.672,1677,2.773,1681,3.259,1682,3.593,1683,3.593,1684,3.593,1700,4.883,1701,4.883,1702,4.883]],["t/421",[1,0.363,49,1.296,59,0.687,62,0.265,99,1.398,139,2.808,156,2.202,176,2.527,201,0.376,202,2.413,205,1.749,290,2.343,376,2.268,448,0.621,492,2.212,493,4.717,497,4.561,559,4.417,614,1.874,628,1.911,742,3.688,793,2.343,840,1.993,999,2.793,1006,3.059,1015,2.598,1066,2.142,1074,3.21,1417,2.202,1430,2.646,1454,3.822,1483,2.646,1552,1.993,1628,2.527,1629,2.996,1640,4.402,1646,3.822,1675,1.806,1677,1.874,1681,3.467,1703,4.727,1704,2.996,1705,2.996,1706,2.996,1707,4.402,1708,3.3,1709,2.796,1710,3.3,1711,4.717,1712,3.3,1713,2.996]],["t/423",[1,0.258,35,3.208,49,1.659,59,0.588,62,0.367,139,2.218,156,3.05,176,3.5,201,0.521,202,1.906,290,3.244,376,3.141,448,0.86,492,2.613,497,5.565,559,4.368,614,2.595,628,2.646,742,4.721,793,3.244,840,2.76,999,3.575,1006,2.792,1015,1.498,1066,2.967,1417,3.05,1430,3.665,1454,4.892,1646,4.892,1675,2.501,1677,2.595,1703,5.767,1704,4.149,1705,4.149,1706,4.149,1707,5.634,1711,6.038,1713,4.149,1714,4.57,1715,4.57]],["t/425",[1,0.419,35,2.576,59,0.676,62,0.429,99,2.3,139,3.081,201,0.609,205,1.798,282,2.473,288,2.38,448,1.005,497,6.066,559,5.147,614,3.032,749,3.441,840,3.226,1552,3.226,1675,2.922,1677,3.032,1703,6.286,1716,5.69,1717,7.43,1718,5.341]],["t/427",[1,0.414,35,2.529,59,0.673,62,0.421,99,1.411,139,3.057,201,0.598,205,1.765,213,3.442,282,2.428,288,2.336,448,0.987,497,6.006,559,5.105,614,2.977,742,5.207,749,3.396,840,3.166,1675,2.869,1677,2.977,1703,6.224,1709,4.442,1716,5.617,1719,7.335,1720,5.243]],["t/429",[1,0.419,35,2.576,59,0.676,62,0.429,139,2.85,201,0.609,203,3.223,205,1.798,210,5.69,282,2.473,288,2.38,448,1.005,497,6.066,559,5.147,614,3.032,749,3.441,840,3.226,1552,3.226,1675,2.922,1677,3.032,1703,6.286,1721,4.849,1722,7.43,1723,5.341]],["t/431",[1,0.34,35,3.888,59,0.584,62,0.484,139,2.007,201,0.686,203,2.27,205,2.025,210,6.173,448,1.133,497,6.453,559,5.065,614,3.417,742,5.723,749,3.733,840,3.634,1675,3.293,1677,3.417,1703,6.687,1721,5.464,1724,8.061]],["t/433",[1,0.411,35,4.061,49,1.818,59,0.658,62,0.418,127,1.959,139,3.413,201,0.592,269,4.118,292,4.119,448,1.372,559,5.085,1552,3.137,1646,3.822,1675,2.842,1677,2.95,1725,5.925,1726,5.195,1727,4.402,1728,5.195,1729,5.195]],["t/435",[1,0.414,35,4.081,49,1.829,59,0.66,62,0.421,127,1.977,139,3.422,201,0.598,269,3.31,292,3.589,295,3.239,448,1.381,559,5.105,1339,4.442,1552,3.166,1646,3.857,1675,2.869,1677,2.977,1725,5.949,1727,4.442,1730,5.243,1731,5.243,1732,5.243]],["t/437",[1,0.392,35,3.756,49,1.426,59,0.65,62,0.3,136,2.423,139,3.592,201,0.426,241,2.423,247,0.884,269,3.787,281,4.338,292,3.399,295,2.306,448,1.076,540,4.932,559,4.677,628,2.161,974,1.941,1018,3.388,1136,5.352,1339,3.162,1552,3.452,1620,3.388,1646,2.746,1675,2.042,1677,2.119,1725,5.45,1727,3.162,1733,6.947,1734,3.732,1735,5.716,1736,2.858]],["t/439",[9,4.368,12,4.633,59,0.504,103,4.012,153,4.633,183,2.842,240,5.231,268,4.451,822,5.231,838,6.287,1131,4.961,1672,5.565]],["t/441",[1,0.482,314,4.947,519,4.947,529,4.121,671,5.279,873,7.239]],["t/443",[141,3.168,314,4.667,529,3.888,555,6.173,556,6.173,558,6.83,618,5.233,1061,6.83,1302,4.667,1737,8.061]],["t/445",[1,0.343,37,3.849,59,0.391,62,0.489,118,6.879,142,2.404,183,2.205,241,3.949,247,1.44,248,4.318,314,3.522,339,4.318,412,2.645,416,7.743,810,5.522,873,6.879,920,5.153,964,5.153,1113,3.949,1469,4.474,1619,5.522,1738,6.082,1739,6.082,1740,6.082,1741,8.118,1742,6.082,1743,6.082]],["t/447",[1,0.49,154,4.244,189,4.925,786,7.875,1134,6.643]],["t/449",[1,0.31,18,3.12,47,2.48,54,2.651,59,0.601,62,0.442,64,2.419,97,2.696,99,1.479,109,3.395,142,1.627,201,0.864,247,1.301,262,3.395,379,4.043,454,4.99,455,6.957,492,1.668,520,4.208,521,4.656,645,3.667,788,3.478,854,3.667,1041,2.545,1534,4.99,1744,5.496,1745,5.496,1746,5.496,1747,5.496,1748,5.496,1749,4.208,1750,5.496,1751,5.496,1752,5.496,1753,5.496,1754,5.496]],["t/451",[1,0.174,33,2.614,49,2.543,59,0.725,60,0.589,62,0.396,99,0.83,128,2.614,185,3.624,201,0.352,202,1.762,218,2.801,241,2.003,247,0.731,264,2.614,284,2.363,448,0.581,472,2.003,500,2.116,521,2.614,561,5.164,575,2.121,864,2.614,885,2.474,908,2.614,960,2.975,1015,1.614,1024,2.474,1041,1.429,1149,3.287,1177,2.474,1221,1.953,1626,2.474,1755,4.472,1756,4.926,1757,4.472,1758,4.472,1759,2.801,1760,3.085,1761,3.085,1762,3.085,1763,3.085,1764,3.085,1765,3.085,1766,3.085,1767,3.085,1768,3.085,1769,3.085,1770,3.085,1771,3.085,1772,3.085,1773,3.085,1774,3.085,1775,3.085,1776,3.085,1777,3.085,1778,3.085,1779,3.085,1780,3.085,1781,3.085]],["t/453",[1,0.258,46,2.303,49,1.14,51,1.707,54,2.204,59,0.718,60,0.872,62,0.534,82,3.872,99,1.23,139,1.524,185,3.362,201,0.521,202,1.906,328,1.918,448,0.86,488,3.665,500,2.857,527,3.05,531,2.967,561,6.334,565,3.872,739,3.141,960,4.016,1015,2.179,1041,2.116,1149,4.438,1465,3.244,1507,3.665,1755,6.038,1757,6.038,1758,6.038,1782,4.57,1783,4.57,1784,4.57]],["t/455",[1,0.367,59,0.545,60,1.241,62,0.522,99,1.749,199,3.555,203,2.451,205,2.187,206,4.64,207,3.927,417,5.506,492,1.972,749,3.009,779,6.495,952,4.015,1116,5.367,1147,4.976,1400,7.7,1785,6.498,1786,6.498,1787,6.498]],["t/457",[1,0.347,59,0.526,62,0.494,106,3.147,161,3.305,169,3.25,205,2.069,213,3.837,243,4.523,273,5.209,310,2.523,401,3.991,480,5.209,514,5.209,519,4.735,698,5.209,739,4.225,749,2.847,757,4.364,919,5.582,1441,5.209,1452,5.209,1716,4.708,1788,8.177,1789,6.148,1790,8.177,1791,6.148]],["t/459",[1,0.38,49,1.678,59,0.691,60,1.285,62,0.541,127,2.538,196,4.49,199,3.681,201,0.767,247,1.593,277,3.684,292,3.292,584,6.109,853,6.109,1057,5.396,1792,6.728,1793,6.728,1794,6.728]],["t/461",[41,3.011,403,4.579,545,4.895]],["t/463",[1,0.388,2,0.958,9,1.059,15,1.005,18,1.08,30,3.39,41,0.64,42,1.308,47,1.963,49,0.474,51,0.71,59,0.468,60,0.363,62,0.153,65,2.571,92,1.485,97,0.676,99,0.512,119,1.269,120,1.307,125,1.525,127,1.241,129,2.082,131,1.203,140,1.307,141,0.747,142,0.563,157,1.611,159,1.08,161,1.022,170,1.022,180,3.468,199,1.04,201,0.375,205,0.64,246,1.525,247,1.227,252,1.101,254,4.486,293,0.88,303,1.399,308,2.339,333,1.525,336,3.813,339,4.884,346,2.226,363,1.269,374,1.269,400,3.2,401,1.235,403,1.684,405,1.309,412,0.827,413,1.175,416,1.611,420,1.235,448,1.103,474,1.307,492,1.573,508,1.059,562,3.088,571,1.611,588,6.928,614,1.08,628,1.905,631,1.04,641,1.726,661,1.868,683,1.456,687,1.35,757,1.35,793,2.336,859,1.399,953,1.726,960,1.148,985,3.488,999,1.769,1026,1.203,1094,0.869,1095,0.93,1102,1.35,1211,2.336,1523,1.726,1533,1.726,1716,1.456,1795,1.611,1796,1.902,1797,1.902,1798,1.902,1799,1.902,1800,1.902,1801,1.902,1802,1.902,1803,3.685,1804,1.525,1805,4.158,1806,1.902,1807,2.987,1808,1.902,1809,3.949,1810,3.29,1811,1.726,1812,1.902,1813,3.29,1814,1.902,1815,2.987,1816,4.963,1817,3.29,1818,1.902,1819,3.29,1820,1.902,1821,1.902,1822,2.421,1823,3.29,1824,2.421,1825,1.902,1826,1.902,1827,1.307,1828,1.902,1829,1.611,1830,1.611,1831,1.726,1832,1.902,1833,1.902,1834,3.29,1835,1.902,1836,1.902,1837,1.902,1838,1.902]],["t/465",[1,0.394,30,2.582,39,2.886,41,1.644,42,1.091,49,1.74,59,0.604,62,0.392,65,2.886,127,1.842,129,3.09,142,2.065,144,4.655,170,2.626,201,0.796,268,2.773,336,3.593,339,3.467,405,1.47,448,0.919,495,4.138,562,3.467,591,2.54,628,2.828,661,2.773,687,3.467,960,4.213,1211,3.467,1469,3.593,1805,3.467,1816,5.91,1827,3.356,1830,4.138,1839,4.434,1840,6.976,1841,4.883,1842,3.74,1843,4.883,1844,4.138,1845,4.883,1846,4.883,1847,4.434,1848,4.883,1849,4.434]],["t/467",[1,0.394,30,3.688,49,2.214,127,2.631,129,4.414,169,3.688,170,3.75,183,2.529,338,3.033,339,4.952,374,5.924,628,4.039,661,3.96,1081,5.342,1211,4.952,1803,5.91,1805,4.952,1827,4.794,1830,5.91]],["t/469",[1,0.319,18,5.375,42,1.264,62,0.622,139,1.888,142,1.675,196,3.776,247,1.34,286,3.89,291,4.894,315,2.769,405,1.703,450,3.153,676,4.795,724,4.163,738,4.795,843,4.017,999,3.043,1067,5.138,1094,3.534,1095,2.769,1248,4.163,1250,5.138,1410,4.334,1417,3.776,1591,5.138,1631,4.795,1749,4.334,1850,4.795,1851,5.659,1852,5.659,1853,5.659,1854,7.733]],["t/471",[41,3.011,403,4.579,545,4.895]],["t/473",[1,0.343,42,0.678,54,2.346,59,0.725,60,0.928,62,0.489,97,1.08,99,0.817,141,1.911,183,1.101,201,0.868,202,1.394,203,1.145,205,1.022,244,1.444,247,1.44,275,1.724,282,1.406,287,2.874,305,2.874,319,3.577,328,2.919,361,2.816,445,3.9,448,0.572,452,5.861,453,2.435,492,1.476,530,2.282,749,1.406,895,1.579,997,2.325,1006,2.919,1015,2.279,1041,1.406,1177,2.435,1221,1.921,1302,1.758,1455,4.12,1614,2.026,1855,2.757,1856,5.522,1857,4.863,1858,4.415,1859,4.415,1860,2.757,1861,3.036,1862,3.036,1863,3.036]],["t/475",[1,0.154,35,2.153,59,0.708,60,1.248,62,0.219,97,0.971,141,2.224,180,2.249,189,1.55,201,0.509,202,1.279,213,1.281,247,1.34,275,1.55,287,1.614,293,3.026,305,4.259,308,1.232,319,4.808,324,3.781,325,3.781,328,3.426,381,3.168,412,1.187,444,2.479,445,2.19,446,3.418,447,3.781,448,0.514,449,2.19,451,5.445,452,4.952,453,3.579,492,1.717,526,4.052,530,1.281,749,1.264,788,1.728,842,2.479,895,1.42,999,1.468,1006,1.146,1015,2.142,1257,2.314,1264,2.314,1302,1.581,1437,2.479,1455,2.314,1856,2.479,1858,2.479,1859,4.052,1864,2.731,1865,2.731,1866,2.731,1867,4.463,1868,5.66,1869,2.731,1870,4.463,1871,2.731,1872,2.731,1873,2.731,1874,2.731,1875,2.731]],["t/477",[1,0.442,12,4.633,59,0.504,64,3.45,103,4.012,183,2.842,240,5.231,268,4.451,642,6.003,822,5.231,1131,4.961,1672,5.565]],["t/479",[60,1.561,139,2.727,202,2.344,292,4.001,308,3.689,419,5.308,638,6.557,640,5.62,1824,6.015]],["t/481",[60,1.561,139,2.727,202,2.344,292,4.001,308,3.689,419,5.308,637,6.557,640,5.62,1824,6.015]],["t/483",[1,0.333,15,3.116,19,4.336,31,5.463,60,1.125,62,0.774,142,1.745,154,5.067,247,1.395,272,3.641,405,1.774,448,1.109,591,4.134,677,5.557,1302,3.413,1876,3.826,1877,4.726,1878,4.993,1879,5.893,1880,5.893,1881,5.893,1882,7.949,1883,5.351]],["t/485",[1,0.38,60,1.656,62,0.541,154,3.292,199,3.681,247,1.593,279,5.239,448,1.266,500,3.727,591,4.511,949,7.063,1876,4.368,1884,8.675,1885,8.675,1886,6.728,1887,6.109]],["t/487",[1,0.367,55,6.021,59,0.545,60,1.241,62,0.522,142,1.924,154,3.18,201,0.967,247,1.539,272,4.015,448,1.223,591,4.91,787,5.367,1302,3.763,1876,4.219,1877,5.211,1888,5.506,1889,6.498,1890,6.498,1891,6.498,1892,5.9]],["t/489",[1,0.367,55,6.021,59,0.545,60,1.241,62,0.522,142,1.924,154,4.62,201,0.967,247,1.539,272,4.015,448,1.223,591,4.91,1302,3.763,1876,4.219,1877,5.211,1888,5.506,1892,5.9,1893,6.498,1894,6.498,1895,6.498]],["t/491",[1,0.389,60,1.316,62,0.554,142,2.04,154,4.31,247,1.632,272,4.257,420,6.304,448,1.297,591,4.581,787,4.361,1302,3.99,1876,4.474,1877,5.526,1888,5.839,1896,6.891,1897,7.998]],["t/493",[1,0.384,60,1.3,62,0.547,142,2.016,272,4.207,405,2.049,448,1.282,591,3.541,677,5.965,787,6.667,1302,3.943,1878,5.769,1883,6.182,1898,6.809,1899,6.809,1900,8.741]],["t/495",[1,0.363,60,1.227,62,0.516,136,4.171,142,1.902,154,4.119,241,4.171,247,1.521,272,3.969,448,1.209,490,5.444,491,5.833,492,1.95,524,3.969,591,4.378,787,5.942,852,5.833,993,4.727,1113,4.171,1126,5.833,1302,3.72,1614,4.287,1901,6.425,1902,6.425]],["t/497",[1,0.409,62,0.582,199,3.962,247,1.715,279,4.373,338,3.149,405,2.179,420,4.701,448,1.363,591,4.727,677,5.616,787,6.287,1903,7.241,1904,7.241]],["t/499",[1,0.359,55,4.51,60,1.213,62,0.511,154,4.089,180,3.202,247,1.979,290,4.51,376,4.367,405,1.912,448,1.196,589,5.768,590,5.095,591,5.36,1026,4.021,1301,5.383,1465,4.51,1876,4.125,1905,5.768,1906,6.353,1907,6.353,1908,6.353,1909,6.353]],["t/501",[1,0.399,60,1.348,62,0.568,154,4.378,247,2.119,405,2.125,448,1.329,590,5.663,591,5.107,1026,4.469,1301,5.983,1465,5.013,1876,4.585,1905,6.412,1910,7.062,1911,7.062]],["t/503",[1,0.304,42,1.204,47,2.433,49,2.142,59,0.552,60,1.428,62,0.433,69,2.76,116,4.324,139,1.798,154,2.638,161,2.899,201,0.615,247,1.277,412,2.344,448,1.408,591,2.804,793,6.096,898,4.129,1102,6.096,1736,4.129,1831,4.895,1850,4.568,1876,3.5,1912,6.791,1913,6.337,1914,4.568,1915,7.479,1916,4.568,1917,5.392,1918,5.392,1919,5.392]],["t/505",[1,0.409,59,0.466,62,0.582,99,1.949,142,2.144,154,4.448,246,5.807,247,1.715,448,1.363,591,3.766,700,6.135,803,6.135,1876,4.701,1897,6.574,1920,7.241,1921,7.241,1922,7.241]],["t/507",[1,0.278,46,2.483,47,2.222,49,1.751,59,0.573,60,1.34,62,0.396,69,2.521,92,4.419,139,1.643,154,3.434,201,0.562,247,1.166,420,3.198,448,1.321,591,2.562,840,4.239,895,2.562,898,3.772,914,4.683,1310,3.95,1507,5.629,1577,4.472,1736,3.772,1876,3.198,1887,4.472,1912,6.372,1913,5.947,1914,4.173,1923,4.926,1924,4.472,1925,4.173,1926,7.019,1927,7.019,1928,4.926,1929,4.926]],["t/509",[1,0.34,47,3.637,49,2.011,59,0.387,60,1.539,62,0.484,69,4.97,201,0.686,405,1.811,448,1.517,579,5.464,591,3.13,671,5.616,787,5.752,898,4.608,1736,4.608,1913,6.83,1914,5.099,1930,9.09,1931,6.018]],["t/511",[41,2.534,42,1.682,47,3.397,59,0.599,144,5.023,315,3.684,403,3.853,661,4.274,922,6.037,960,4.547,1029,4.888,1113,4.888,1827,5.174,1932,7.528]],["t/513",[269,4.037,508,4.985,667,6.582]],["t/515",[42,1.775,49,1.982,144,5.304,147,6.374,306,4.428,346,4.068,661,5.466,895,4.134,1012,6.374,1933,7.216]],["t/517",[49,1.955,60,1.497,199,4.289,282,3.63,346,4.887,498,6.287,847,7.117,895,4.077,1211,5.565,1934,7.839,1935,7.839]],["t/519",[1,0.252,37,2.824,59,0.698,60,0.852,62,0.359,99,1.759,114,4.231,127,1.683,139,1.489,142,1.935,144,5.16,152,2.153,193,4.052,201,0.745,203,2.465,205,2.2,206,2.442,207,3.026,213,2.094,346,2.284,405,1.343,498,3.579,661,4.391,843,3.168,1343,4.052,1933,4.052,1936,4.052,1937,4.463,1938,4.052,1939,4.052,1940,4.052,1941,4.052,1942,5.934,1943,4.463,1944,4.463,1945,7.733,1946,4.463,1947,4.463,1948,4.463]],["t/521",[1,0.283,42,1.12,49,1.25,59,0.701,60,0.957,62,0.403,97,1.783,99,1.349,114,4.517,127,1.891,129,4.497,142,1.484,144,5.509,191,4.247,201,0.81,203,1.891,205,1.687,206,2.742,207,3.29,213,2.352,308,2.262,405,1.508,668,4.02,840,3.027,869,4.02,1541,4.247,1676,4.247,1936,4.551,1939,4.551,1940,4.551,1941,4.551,1942,4.551,1949,4.551,1950,5.012,1951,4.551]],["t/523",[1,0.307,41,1.832,47,2.456,59,0.666,62,0.437,97,1.936,139,2.879,142,2.229,144,6.214,152,2.626,180,2.743,191,4.612,201,0.859,311,4.168,403,2.786,405,1.638,412,2.367,661,4.275,668,4.365,689,4.942,1844,4.612,1847,4.942,1938,4.942,1952,5.443,1953,5.443,1954,5.443,1955,5.443,1956,5.443,1957,5.443,1958,5.443]],["t/525",[1,0.442,12,4.633,59,0.504,64,3.45,103,4.012,183,2.842,240,5.231,268,4.451,822,5.231,1131,4.961,1672,5.565,1959,7.839]],["t/527",[1,0.367,59,0.607,62,0.522,69,3.326,169,3.435,183,2.356,201,0.741,213,3.98,372,3.049,448,1.223,529,4.091,742,4.613,749,3.927,1226,6.021,1541,5.506,1960,8.481,1961,6.498,1962,6.498,1963,6.498,1964,6.498]],["t/529",[1,0.425,59,0.599,62,0.605,203,2.839,205,2.534,448,1.417,631,4.119,749,4.312,1965,9.312,1966,7.528,1967,7.528,1968,7.528]],["t/531",[522,6.96,586,8.252]],["t/533",[1,0.442,12,4.633,59,0.504,64,3.45,103,4.012,183,2.842,240,5.231,268,4.451,822,5.231,869,6.287,1131,4.961,1672,5.565]],["t/535",[1,0.449,46,4.006,62,0.639,123,7.216,448,1.496,790,7.216,1261,7.216,1676,6.734,1951,7.216,1969,7.948,1970,7.948]],["t/537",[18,4.851,60,1.631,92,3.855,195,6.852,788,5.407,1925,7.239]],["t/539",[60,1.682,840,5.32,1924,7.997,1925,7.463]],["t/541",[41,3.011,403,4.579,545,4.895]],["t/544",[1,0.371,42,1.468,59,0.61,62,0.528,201,0.974,247,2.023,338,2.858,448,1.237,464,4.579,519,3.806,640,4.518,830,3.216,831,3.313,850,3.534,1015,2.154,1017,3.004,1971,5.968,1972,3.365,1973,6.573,1974,6.573]],["t/546",[1,0.38,42,1.503,59,0.617,62,0.541,201,0.989,247,2.054,448,1.266,464,4.631,830,3.292,831,3.391,850,3.618,1015,2.205,1017,3.075,1972,3.444,1975,6.728,1976,6.728,1977,6.728,1978,6.728]],["t/548",[1,0.355,42,1.403,59,0.597,60,1.2,62,0.505,201,0.946,213,2.948,247,1.964,338,2.732,448,1.183,464,4.48,631,3.438,830,3.074,831,3.167,850,3.378,1015,2.059,1017,2.872,1971,5.705,1972,3.216,1979,4.319,1980,4.319,1981,4.319,1982,6.283,1983,6.283]],["t/550",[1,0.38,42,1.503,59,0.617,62,0.541,201,0.989,247,2.054,338,2.926,448,1.266,464,4.631,830,3.292,831,3.391,850,3.618,1015,2.205,1017,3.075,1972,3.444,1984,6.728,1985,6.728,1986,6.728]],["t/552",[1,0.38,42,1.503,59,0.617,62,0.541,201,0.989,247,2.054,338,2.926,448,1.266,464,4.631,830,3.292,831,3.391,850,3.618,1015,2.205,1017,3.075,1972,3.444,1987,6.728,1988,6.728,1989,6.728]],["t/554",[1,0.355,42,1.403,59,0.597,60,1.2,62,0.505,201,0.946,213,2.948,247,1.964,338,2.732,448,1.183,464,4.48,631,3.438,830,3.074,831,3.167,850,3.378,1014,5.705,1015,2.059,1017,2.872,1972,3.216,1979,4.319,1980,4.319,1981,4.319,1990,6.283,1991,6.283]],["t/556",[1,0.355,42,1.403,59,0.597,60,1.2,62,0.505,201,0.946,213,2.948,247,1.964,338,2.732,448,1.183,464,4.48,631,3.438,830,3.074,831,3.167,850,3.378,1015,2.059,1017,2.872,1972,3.216,1979,4.319,1980,4.319,1981,4.319,1992,6.283,1993,6.283,1994,6.283]],["t/558",[1,0.336,42,1.33,59,0.581,60,1.137,62,0.479,97,2.118,201,0.913,202,1.707,213,2.794,247,1.895,338,2.589,448,1.121,464,4.664,631,3.258,830,2.914,831,3.001,850,3.202,882,4.381,1015,1.952,1017,2.722,1972,3.048,1979,4.093,1980,4.093,1981,4.093,1995,5.955,1996,5.045,1997,5.955,1998,5.955]],["t/560",[1,0.355,42,1.403,59,0.597,62,0.505,97,2.235,201,0.946,202,1.801,247,1.964,338,2.732,448,1.183,464,4.765,773,4.319,830,3.074,831,3.167,850,3.378,882,4.622,1015,2.059,1017,2.872,1972,3.216,1996,5.324,1999,6.283,2000,6.283,2001,6.283]],["t/562",[1,0.38,42,1.503,59,0.617,62,0.541,201,0.989,247,2.054,338,2.926,448,1.266,464,4.631,830,3.292,831,3.391,850,3.618,1015,2.205,1017,3.075,1972,3.444,2002,6.728,2003,6.728,2004,6.728]],["t/564",[1,0.355,42,1.403,59,0.597,60,1.2,62,0.505,201,0.946,213,2.948,247,1.964,338,2.732,448,1.183,464,4.48,631,3.438,830,3.074,831,3.167,850,3.378,1015,2.059,1017,2.872,1972,3.216,1979,4.319,1980,4.319,1981,4.319,2005,6.283,2006,6.283,2007,6.283]],["t/566",[1,0.355,42,1.403,59,0.597,60,1.2,62,0.505,201,0.946,213,2.948,247,1.964,338,2.732,448,1.183,464,4.48,631,3.438,830,3.074,831,3.167,850,3.378,1015,2.059,1017,2.872,1972,3.216,1979,4.319,1980,4.319,1981,4.319,2008,6.283,2009,6.283,2010,6.283]],["t/568",[1,0.355,42,1.403,59,0.597,60,1.2,62,0.505,201,0.946,213,2.948,247,1.964,338,2.732,448,1.183,464,4.48,631,3.438,830,3.074,831,3.167,850,3.378,1015,2.059,1017,2.872,1972,3.216,1979,4.319,1980,4.319,1981,4.319,2011,6.283,2012,6.283,2013,5.705]],["t/570",[1,0.355,42,1.403,59,0.597,60,1.2,62,0.505,201,0.946,213,2.948,247,1.964,338,2.732,448,1.183,464,4.48,631,3.438,830,3.074,831,3.167,850,3.378,1015,2.059,1017,2.872,1972,3.216,1979,4.319,1980,4.319,1981,4.319,2014,6.283,2015,6.283,2016,6.283]],["t/572",[1,0.38,42,1.503,59,0.617,62,0.541,201,0.989,247,2.054,338,2.926,448,1.266,464,4.631,830,3.292,831,3.391,850,3.618,1015,2.205,1017,3.075,1972,3.444,2017,6.109,2018,6.728,2019,6.728]],["t/574",[1,0.38,42,1.503,59,0.617,62,0.541,201,0.989,247,2.054,338,2.926,448,1.266,464,4.631,830,3.292,831,3.391,850,3.618,1015,2.205,1017,3.075,1972,3.444,2017,6.109,2020,6.728,2021,6.728]],["t/576",[1,0.38,42,1.503,59,0.617,62,0.541,201,0.989,247,2.054,338,2.926,448,1.266,464,4.631,830,3.292,831,3.391,850,3.618,1015,2.205,1017,3.075,1972,3.444,2013,6.109,2022,6.728,2023,6.728]],["t/579",[1,0.329,42,1.303,47,2.632,59,0.575,60,1.114,62,0.469,97,2.075,99,1.57,141,3.102,196,3.892,201,0.665,247,1.869,282,3.655,301,3.25,328,2.449,448,1.098,464,4.316,830,2.854,831,2.94,1017,2.666,1972,2.986,2024,4.678,2025,4.678,2026,4.291,2027,4.678,2028,4.467,2029,7.894,2030,5.833,2031,5.833]],["t/581",[1,0.329,42,1.303,47,2.632,59,0.575,60,1.114,62,0.469,97,2.075,141,3.102,196,3.892,201,0.665,247,1.869,282,3.655,301,3.25,328,2.449,448,1.098,464,4.316,830,2.854,831,2.94,1017,2.666,1972,2.986,2024,4.678,2025,4.678,2026,4.291,2027,4.678,2028,4.467,2032,4.141,2033,7.894,2034,5.833,2035,5.833]],["t/583",[1,0.34,42,1.344,47,2.715,59,0.518,60,1.149,62,0.484,97,2.141,141,2.365,196,4.016,201,0.686,247,1.909,282,4.209,301,3.353,328,2.526,448,1.133,464,4.385,830,2.945,831,3.033,1017,2.75,1972,3.08,2024,4.826,2025,4.826,2026,4.427,2027,4.826,2028,4.608,2036,6.018,2037,6.018,2038,6.018]],["t/585",[1,0.34,42,1.344,47,2.715,59,0.518,60,1.149,62,0.484,97,2.141,141,2.365,196,4.016,201,0.686,247,1.909,282,4.209,301,3.353,328,2.526,448,1.133,464,4.385,830,2.945,831,3.033,1017,2.75,1972,3.08,2024,4.826,2025,4.826,2026,4.427,2027,4.826,2028,4.608,2039,5.464,2040,6.018,2041,6.018]],["t/588",[1,0.307,2,3.795,13,4.365,42,1.216,49,1.358,59,0.484,60,1.437,62,0.437,97,1.936,145,5.539,169,2.877,178,6.038,201,0.621,202,2.158,248,3.864,310,2.234,417,4.612,448,1.025,831,3.795,832,6.835,920,4.612,952,3.363,1017,2.488,1113,3.534,1144,4.612,1811,4.942,1972,2.786,2042,5.443,2043,5.443,2044,5.443,2045,5.443,2046,5.443,2047,5.443,2048,4.942,2049,5.443,2050,5.443]],["t/590",[178,6.037,262,4.651,468,3.738,508,4.194,530,3.533,610,6.037,1417,5.023,2051,6.835,2052,5.023,2053,7.131,2054,7.528,2055,7.528,2056,4.888,2057,7.528]],["t/592",[59,0.658,252,4.478,328,3.246,448,1.065,458,3.581,468,2.81,530,2.656,773,3.89,774,3.776,788,3.581,1009,3.776,1494,5.49,2032,4.017,2052,6.614,2053,4.334,2056,3.674,2058,7.021,2059,6.202,2060,7.021,2061,4.334,2062,4.163,2063,4.017,2064,4.163,2065,4.163,2066,4.163]],["t/594",[1,0.205,41,1.224,59,0.672,60,0.694,62,0.292,120,2.5,139,1.213,201,0.946,252,3.245,263,2.5,328,2.352,406,2.5,448,0.685,458,3.546,468,1.806,530,3.893,773,2.5,774,2.427,788,2.302,843,2.582,1006,2.352,1009,2.427,1015,1.836,1017,1.662,1131,2.302,1494,3.978,1670,4.123,2032,2.582,2052,5.848,2053,5.882,2056,2.361,2058,6.974,2059,6.16,2060,5.088,2061,2.785,2062,2.676,2063,2.582,2064,2.676,2065,2.676,2066,2.676,2067,2.676,2068,5.483,2069,3.081,2070,2.917,2071,3.302,2072,3.302,2073,3.302,2074,2.917,2075,3.081,2076,3.081,2077,3.081]],["t/596",[170,5.048,318,4.713,468,3.788,508,4.251,530,3.58,757,5.416,1022,5.55,2051,6.927,2052,5.091,2067,5.613,2078,7.629,2079,7.629]],["t/598",[59,0.658,252,3.599,328,3.457,448,1.17,458,3.933,468,3.086,530,2.916,773,4.272,774,4.147,788,3.933,1009,4.147,1494,4.412,2032,4.412,2052,6.164,2056,4.035,2059,4.984,2061,4.759,2062,4.572,2063,4.412,2064,4.572,2065,4.572,2066,4.572,2080,7.477]],["t/600",[1,0.227,41,1.354,59,0.671,60,0.768,62,0.323,120,2.764,139,1.342,201,0.923,252,2.329,263,2.764,328,2.54,406,2.764,448,0.757,458,3.829,468,1.997,530,4.071,773,2.764,774,2.684,788,2.545,843,2.855,1006,2.54,1009,2.684,1015,1.983,1017,1.838,1131,2.545,1494,2.855,1670,4.451,2032,2.855,2052,5.398,2056,2.611,2059,5.832,2061,3.08,2062,2.959,2063,2.855,2064,2.959,2065,2.959,2066,2.959,2067,2.959,2068,5.832,2069,3.408,2070,3.225,2074,3.225,2075,3.408,2076,3.408,2077,3.408,2080,7.345,2081,4.022,2082,4.022]],["t/602",[39,4.509,51,2.849,98,4.033,194,5.842,268,4.332,281,4.251,328,3.203,468,3.788,531,4.953,921,6.927,2052,5.091,2056,4.953,2083,7.955]],["t/604",[15,2.797,59,0.661,60,1.01,247,1.253,252,4.275,328,3.862,448,0.996,458,3.349,468,2.627,530,2.483,773,3.637,774,3.531,788,3.349,1027,3.064,1253,4.804,1494,5.241,2032,3.756,2052,5.673,2053,4.052,2056,4.793,2061,4.052,2064,3.893,2065,3.893,2066,3.893,2067,3.893,2083,6.255,2084,6.703,2085,5.291,2086,4.804,2087,4.804,2088,4.244]],["t/606",[1,0.307,41,1.179,59,0.685,60,0.669,62,0.282,120,2.408,138,2.07,139,1.168,201,0.984,252,3.152,328,2.803,344,2.577,406,2.408,448,0.659,468,1.739,530,3.826,773,2.408,774,2.337,788,2.217,843,2.487,1006,2.285,1015,1.784,1017,1.601,1131,2.217,1494,3.864,1670,4.005,2032,2.487,2052,4.455,2053,5.766,2056,3.534,2064,2.577,2065,2.577,2066,2.577,2067,2.577,2068,5.354,2069,2.968,2070,2.809,2071,3.18,2072,3.18,2073,3.18,2074,2.809,2075,2.968,2076,2.968,2077,2.968,2083,5.657,2084,6.061,2086,3.18,2087,6.836,2088,6.038,2089,3.18,2090,3.503]],["t/609",[1,0.242,41,2.138,42,0.959,59,0.715,60,0.82,62,0.345,201,0.49,202,1.821,252,2.487,283,2.788,315,2.101,415,2.35,448,0.808,468,2.132,492,1.303,523,2.952,530,2.981,631,3.476,774,4.24,834,3.639,854,4.24,871,3.444,1027,2.487,1215,4.674,1242,3.289,1248,4.674,1668,3.899,2039,3.899,2091,3.289,2092,4.295,2093,3.899,2094,4.295,2095,4.295,2096,5.383,2097,5.383,2098,3.639,2099,3.639,2100,4.295,2101,4.295,2102,3.639,2103,3.639,2104,4.295,2105,4.295,2106,4.295]],["t/611",[42,1.894,59,0.607,328,3.963,448,1.223,458,4.112,468,3.226,523,4.466,530,4.43,1009,4.336,1242,6.495,2056,5.506,2062,4.781,2063,4.613,2091,6.495,2107,5.9,2108,5.9,2109,6.498]],["t/613",[1,0.313,15,1.898,41,1.209,42,0.802,59,0.701,62,0.289,201,0.87,281,3.092,328,2.33,405,2.041,415,1.965,448,0.676,458,2.273,468,1.783,482,2.331,523,5.244,530,4.266,854,2.396,1009,2.396,1017,1.641,1242,5.194,1248,2.642,2056,3.603,2062,2.642,2063,2.549,2067,2.642,2068,5.439,2070,4.45,2074,2.88,2091,5.194,2096,3.043,2097,3.043,2098,4.702,2099,4.702,2102,3.043,2103,3.043,2107,6.158,2108,3.26,2110,3.26,2111,3.26,2112,3.26,2113,3.26,2114,3.26,2115,3.26,2116,3.591,2117,5.549,2118,3.591,2119,3.591,2120,3.591]],["t/615",[42,1.66,59,0.646,328,3.878,448,1.399,468,3.689,523,5.107,530,4.335,941,6.295,2091,7.074,2121,6.746,2122,6.746]],["t/617",[1,0.31,41,1.194,59,0.709,60,0.677,62,0.285,138,2.096,141,1.394,201,0.935,272,2.191,287,2.096,328,2.307,405,2.025,415,1.94,448,0.668,468,1.761,482,2.302,523,2.437,530,3.556,531,2.302,854,2.366,941,5.701,1017,1.621,1145,2.302,1242,4.209,1248,2.609,1302,2.053,1527,3.22,1878,3.005,2089,3.22,2091,5.153,2096,3.005,2097,3.005,2098,4.656,2099,4.656,2102,3.005,2103,3.005,2110,3.22,2111,3.22,2112,3.22,2113,3.22,2114,3.22,2115,3.22,2121,6.109,2122,3.22,2123,3.546,2124,6.729,2125,5.496,2126,3.546,2127,5.496,2128,3.546,2129,3.546,2130,3.546,2131,3.546,2132,3.546]],["t/619",[1,0.442,12,4.633,59,0.504,64,3.45,103,4.012,183,2.842,240,5.231,247,1.856,268,4.451,822,5.231,1131,4.961,1672,5.565]],["t/621",[1,0.414,49,1.829,59,0.589,62,0.589,131,4.642,201,0.836,267,3.352,448,1.381,508,4.087,524,4.531,840,4.43,974,3.814,1015,3.003,2133,6.659,2134,7.334]],["t/623",[1,0.409,49,1.806,59,0.584,62,0.582,131,4.583,201,0.826,267,3.309,448,1.363,450,4.035,508,4.035,524,4.474,840,4.373,974,3.766,1015,2.979,2026,5.327,2135,7.241]],["t/625",[1,0.373,59,0.7,60,0.866,62,0.531,201,0.978,202,1.895,247,2.254,448,0.853,492,1.376,577,5.063,655,3.636,884,2.68,974,3.438,1006,3.276,1015,2.557,1136,3.116,1166,7.267,2063,5.54,2136,7.726,2137,7.804,2138,6.612,2139,4.534,2140,4.534]],["t/627",[169,4.144,183,2.842,291,4.961,308,3.537,603,7.117,691,6.198,1022,4.633,1113,5.089,1134,6.003,1145,6.198]],["t/629",[1,0.359,59,0.6,60,1.213,62,0.511,97,2.26,142,1.881,201,0.725,247,2.349,405,1.912,448,1.196,884,4.939,974,3.304,1006,3.508,1015,2.739,1417,4.239,2141,7.912,2142,5.383,2143,5.383,2144,6.353]],["t/631",[1,0.359,59,0.6,60,1.213,62,0.511,97,2.26,201,0.725,247,2.349,405,1.912,448,1.196,884,4.939,974,3.304,1006,3.508,1015,2.739,1145,4.125,1287,4.674,2141,7.912,2142,5.383,2143,5.383,2145,6.353]],["t/633",[1,0.359,59,0.6,60,1.213,62,0.511,97,2.26,201,0.725,247,2.349,405,1.912,448,1.196,691,4.125,884,4.939,974,3.304,1006,3.508,1015,2.739,1287,4.674,2141,7.912,2142,5.383,2143,5.383,2146,6.353]],["t/635",[1,0.38,59,0.558,62,0.541,141,2.644,159,3.82,201,0.767,247,2.054,448,1.266,465,6.109,529,4.184,634,5.701,803,5.701,884,5.127,974,3.499,1173,4.49,2147,4.95,2148,6.109,2149,6.728,2150,6.728,2151,6.728]],["t/637",[1,0.384,59,0.562,62,0.547,141,2.676,159,3.866,201,0.776,247,2.07,448,1.282,529,4.216,884,5.706,974,3.541,1173,4.543,2026,6.431,2147,5.009,2152,5.769,2153,6.809,2154,5.214]],["t/639",[1,0.384,59,0.562,62,0.547,141,2.676,159,3.866,201,0.776,247,2.07,448,1.282,529,4.216,884,5.706,974,3.541,1173,4.543,2147,5.009,2152,5.769,2154,5.214,2155,8.741,2156,6.809]],["t/641",[1,0.384,59,0.562,62,0.547,141,2.676,159,3.866,201,0.776,247,2.07,448,1.282,529,4.216,884,5.706,974,3.541,1173,4.543,2147,5.009,2152,5.769,2154,5.214,2157,8.741,2158,6.809]],["t/643",[1,0.384,59,0.562,62,0.547,141,2.676,159,3.866,201,0.776,247,2.07,448,1.282,529,4.216,884,5.706,974,3.541,1173,4.543,2147,5.009,2148,6.182,2154,5.214,2159,8.741,2160,6.809]],["t/645",[1,0.389,59,0.624,62,0.554,141,2.708,201,0.786,247,2.086,529,4.249,884,4.073,971,4.892,974,3.584,1041,3.191,1173,4.598,1611,6.256,2147,5.07,2154,5.277,2161,6.891,2162,6.891,2163,6.891]],["t/647",[145,5.767,161,4.215,201,0.894,310,3.217,318,4.843,608,7.117,610,6.287,779,6.003,959,5.565,999,5.133,2164,7.839]],["t/649",[1,0.224,19,2.918,35,1.913,59,0.669,62,0.319,93,2.51,97,1.411,99,1.067,113,2.815,139,1.997,192,2.575,200,2.296,202,1.137,213,1.861,252,2.296,310,1.628,408,6.121,448,0.746,571,3.36,594,3.601,714,3.601,739,2.726,749,1.836,771,3.18,959,2.815,981,3.36,1006,4.067,1015,2.632,1026,2.51,1043,5.783,1066,2.575,1102,2.815,1136,5.521,1191,3.18,1422,3.601,1670,2.918,1675,2.17,1716,3.037,1996,5.072,2048,5.435,2165,3.966,2166,3.966,2167,5.986,2168,5.986,2169,8.033]],["t/651",[1,0.273,59,0.569,60,0.924,62,0.389,97,1.722,131,3.064,141,1.903,199,2.649,207,3.21,247,2.374,252,4.015,272,2.991,282,2.242,318,2.991,408,4.922,448,0.911,630,4.396,884,4.098,898,5.309,1006,3.712,1015,2.272,1291,8.841,1302,2.804,1452,5.874,1507,5.56,1614,3.231,2170,6.933,2171,8.099,2172,4.842]],["t/653",[1,0.399,59,0.575,62,0.568,141,2.776,201,0.805,241,4.585,247,2.119,448,1.329,529,4.737,974,3.673,1006,2.964,1015,2.314,1136,6.15,2173,7.062,2174,7.062]],["t/655",[1,0.363,59,0.604,62,0.516,141,2.525,201,0.96,247,2.223,448,1.209,614,3.648,840,3.88,1006,3.534,1015,2.759,1027,3.72,1154,5.833,1155,7.643,1454,6.908,2133,5.833,2175,6.425,2176,6.425]],["t/657",[1,0.34,2,1.506,42,0.668,46,2.42,49,1.197,54,2.316,59,0.651,62,0.484,83,2.054,89,2.713,93,1.891,99,0.804,137,1.994,139,2.008,205,1.006,206,1.635,247,2.006,262,1.846,269,1.348,272,1.846,283,1.94,310,1.227,352,2.289,370,2.713,382,1.94,415,1.635,448,0.563,450,2.675,489,2.397,528,1.94,531,1.94,573,5.464,575,2.054,576,4.359,577,3.677,631,4.636,640,2.054,655,3.85,672,2.121,732,2.054,749,1.384,851,2.199,854,3.204,871,2.397,884,3.557,885,2.397,1057,2.397,1183,2.838,1215,2.199,1465,3.408,1550,2.054,1553,1.994,1614,1.994,1675,1.635,1709,4.068,1850,2.532,2028,3.677,2177,2.988,2178,2.988,2179,2.713,2180,2.988,2181,2.713,2182,2.713,2183,2.988,2184,4.801,2185,2.988,2186,6.018,2187,4.801,2188,2.988,2189,4.801,2190,2.988,2191,2.988,2192,2.988,2193,2.988,2194,2.988,2195,2.988,2196,2.988]],["t/659",[1,0.334,19,2.878,34,4.772,59,0.667,60,0.747,62,0.476,97,1.391,131,2.475,141,1.537,147,3.137,201,0.91,247,1.889,282,1.811,363,2.61,448,0.736,577,4.537,614,3.364,691,3.846,793,4.206,974,3.081,1006,3.349,1015,2.614,1027,2.265,1029,5.179,1134,2.995,1136,4.072,1145,2.539,1191,4.751,1264,3.314,1302,2.265,1430,6.397,1614,2.61,2136,3.314,2181,3.551,2197,7.151,2198,3.911,2199,5.924,2200,5.924,2201,5.924,2202,3.911]],["t/661",[1,0.394,59,0.571,62,0.561,141,2.742,142,2.065,201,0.795,247,2.102,448,1.313,529,4.71,698,7.521,974,3.628,1006,3.727,1015,2.286,1136,4.794,2203,6.975]],["t/663",[1,0.394,59,0.571,62,0.561,141,2.742,201,0.795,247,2.102,363,4.655,448,1.313,486,6.102,529,4.71,974,3.628,1006,2.928,1015,2.909,1136,4.794,2204,6.975]],["t/665",[41,3.011,403,4.579,545,4.895]],["t/667",[1,0.409,59,0.584,60,1.382,62,0.582,183,2.626,201,0.826,247,2.152,305,5.373,448,1.363,562,6.453,888,6.135,2205,6.135,2206,7.241,2207,7.241]],["t/669",[1,0.505,59,0.454,60,1.348,62,0.568,183,2.561,201,0.805,247,2.325,448,1.329,451,5.97,562,6.351,888,5.983,1183,4.174,1670,5.195,2205,5.983,2208,7.062]],["t/671",[1,0.273,35,2.336,59,0.732,62,0.389,126,3.231,201,0.552,336,3.562,448,0.911,562,5.75,591,3.606,949,3.562,1469,3.562,1626,3.883,1628,3.708,1640,4.102,1839,4.396,1842,3.708,2136,4.102,2205,4.102,2209,4.842,2210,4.842,2211,4.842,2212,4.842,2213,8.099,2214,4.842,2215,4.842,2216,4.842,2217,4.842,2218,4.842,2219,4.842,2220,4.842,2221,4.842]],["t/673",[1,0.468,30,4.385,41,2.792,64,3.651,339,5.889,403,4.246,545,4.539,960,5.01]],["t/675",[22,5.705,49,1.567,60,1.2,65,3.714,120,4.319,127,2.37,129,3.976,170,3.378,265,3.322,412,2.732,413,3.882,448,1.183,500,2.7,628,3.638,661,3.567,1026,3.976,1469,6.103,1804,5.039,1805,5.889,1807,5.705,1809,5.705,1824,4.622,1827,4.319,1829,5.324,1842,4.812,2222,6.283,2223,6.283,2224,6.283]],["t/677",[60,1.456,120,5.244,199,4.174,265,4.033,405,2.296,412,3.317,448,1.436,677,4.713,1824,5.613,1842,7.19,2225,8.157]],["t/679",[1,0.276,41,1.644,49,1.74,59,0.646,62,0.392,127,1.842,142,1.446,144,5.43,201,0.928,252,2.828,262,3.017,265,2.582,405,2.449,413,4.31,448,0.919,593,3.259,661,3.961,724,3.593,793,3.467,879,4.434,974,2.54,1006,2.05,1015,1.6,1029,3.17,1492,4.434,1725,3.17,1842,3.74,1844,4.138,1849,4.434,2225,3.916,2226,4.883,2227,4.434,2228,5.594,2229,4.883,2230,4.883,2231,4.138,2232,4.883,2233,4.883,2234,4.883,2235,4.883]],["t/681",[127,3.129,265,4.385,413,5.125,712,7.531,2225,6.653,2228,6.653,2236,7.531,2237,7.531]],["t/683",[265,4.385,328,4.146,413,6.102,448,1.561,1795,8.369]],["t/685",[1,0.283,41,1.687,49,1.25,59,0.531,60,1.357,62,0.403,65,2.963,129,3.172,170,2.695,201,0.81,247,1.187,265,2.65,281,2.793,328,2.983,333,4.02,374,3.345,412,2.179,413,5.859,448,0.943,628,2.902,661,2.846,974,2.607,985,4.02,1017,2.291,1553,3.345,1681,4.742,1827,3.445,1829,4.247,2231,4.247,2238,4.551,2239,4.551,2240,6.452,2241,5.012,2242,5.012,2243,4.551,2244,4.551,2245,4.02,2246,4.551,2247,4.551,2248,4.551,2249,5.012,2250,5.012]],["t/687",[1,0.336,41,2.004,59,0.622,62,0.479,201,0.913,217,6.782,265,3.148,328,3.36,413,4.945,448,1.121,450,3.318,891,4.776,1006,2.5,1015,1.952,1553,3.974,1681,3.974,2231,5.045,2238,5.407,2243,5.407,2245,4.776,2246,5.407,2251,5.955,2252,5.955,2253,5.955,2254,5.955,2255,5.955,2256,8.004]],["t/689",[1,0.345,32,3.704,35,1.968,41,1.373,42,0.911,49,1.017,59,0.524,60,1.4,62,0.328,65,2.411,120,2.804,127,1.539,129,2.582,141,1.603,142,1.208,170,2.193,178,3.272,201,0.697,265,2.157,282,1.889,328,1.712,333,5.882,344,3.001,374,2.722,412,1.774,413,5.392,448,0.768,450,2.273,500,2.627,627,5.552,628,2.362,661,2.316,859,3.001,895,2.122,974,2.122,999,2.193,1017,1.864,1074,2.52,1469,3.001,1795,3.456,1804,3.272,1805,2.896,1816,5.181,1824,3.001,1827,2.804,2179,3.704,2237,3.704,2239,3.704,2240,5.552,2245,3.272,2247,3.704,2248,3.704,2257,4.079,2258,4.079,2259,4.079,2260,4.079,2261,4.079,2262,4.079,2263,4.079,2264,4.079,2265,4.079,2266,4.079]],["t/691",[265,4.586,374,5.788,413,6.265,448,1.633]],["t/693",[127,3.272,265,4.586,2225,6.956,2227,7.875,2236,7.875]],["t/695",[42,1.303,49,1.969,60,1.507,65,3.448,124,5.296,127,2.2,129,3.691,148,4.942,170,3.136,265,3.084,291,3.691,307,3.25,405,1.756,413,4.877,498,4.678,593,3.892,628,3.378,661,3.312,1026,4.995,1066,3.787,1254,5.296,1805,5.604,1815,8.123,1827,4.009,2228,6.33,2244,5.296,2267,7.167,2268,5.833]],["t/697",[1,0.336,41,2.004,49,1.485,59,0.515,60,1.137,62,0.479,114,3.258,127,2.246,129,3.769,141,2.341,142,1.763,170,3.202,174,3.381,201,0.913,413,3.679,529,2.872,593,3.974,1087,4.56,1805,4.227,1860,5.407,1949,5.407,2228,4.776,2245,4.776,2267,5.407,2269,5.955,2270,5.955,2271,5.955,2272,5.955,2273,5.955,2274,5.955,2275,5.955,2276,5.955,2277,5.955]],["t/699",[41,3.011,403,4.579,545,4.895]],["t/701",[1,0.239,41,1.424,59,0.733,60,1.2,62,0.34,97,1.505,141,1.663,201,0.482,247,1.775,282,1.959,293,1.959,305,2.501,328,1.776,396,3.003,414,7.029,448,0.796,492,1.284,1102,4.461,1177,3.393,1221,2.677,1614,2.823,1627,5.324,1636,3.585,1855,3.841,2088,6.011,2278,3.841,2279,4.231,2280,6.806,2281,7.532,2282,6.283,2283,3.841,2284,4.231]],["t/703",[1,0.27,41,1.236,42,1.069,59,0.746,60,0.701,62,0.385,87,1.368,97,0.769,99,1.702,201,0.546,205,0.727,293,1.001,328,2.37,396,2.607,400,2.701,414,5.827,448,0.407,450,1.204,451,1.442,492,1.114,500,2.057,520,1.655,593,1.442,614,1.227,645,2.45,655,1.733,857,2.945,950,1.962,1139,2.45,1442,1.831,1465,1.534,1618,1.831,1626,3.84,1627,5.359,1628,3.667,1631,1.831,1636,4.057,2088,5.883,2093,1.962,2278,3.334,2280,5.126,2281,7.988,2283,1.962,2285,2.161,2286,2.161,2287,2.161,2288,2.161,2289,5.646,2290,2.161,2291,2.161]],["t/705",[41,3.011,403,4.579,545,4.895]],["t/707",[1,0.399,41,2.377,59,0.65,62,0.568,99,1.901,201,0.805,203,3.565,205,3.306,213,3.856,269,2.242,508,2.768,511,3.415,563,5.483,667,3.655,678,4.895,1029,3.226,2292,4.712,2293,3.805,2294,7.737,2295,4.969]],["t/709",[2,4.181,247,1.964,315,4.059,575,5.702,645,5.535,956,5.386,1002,7.028,1655,7.531]],["t/711",[1,0.316,41,1.886,59,0.635,62,0.45,88,2.742,201,0.639,203,3.305,265,4.633,278,3.638,310,2.3,318,3.462,405,2.312,563,5.848,677,3.462,678,4.203,691,3.638,749,2.595,835,4.748,1287,4.123,2292,3.739,2293,5.882,2294,4.291,2296,4.748,2297,5.604,2298,5.604,2299,5.604,2300,5.604,2301,5.604]],["t/713",[1,0.355,41,2.115,59,0.66,62,0.505,141,2.47,201,0.717,203,2.37,205,3.126,262,3.882,265,3.322,282,2.909,405,2.497,563,5.536,678,4.539,1454,4.622,2292,4.193,2294,4.812,2296,7.869,2302,6.283]],["t/715",[1,0.371,42,1.468,59,0.646,62,0.528,99,1.769,127,2.479,201,0.75,203,2.479,205,2.212,252,3.806,310,2.698,346,3.365,352,5.034,405,1.978,2303,8.545,2304,5.034,2305,5.271,2306,5.271,2307,6.573,2308,8.545,2309,6.573]],["t/717",[1,0.404,59,0.58,62,0.575,99,1.924,201,0.815,203,2.697,205,2.407,275,4.06,405,2.152,1116,4.525,1226,5.076,2305,5.734,2306,5.734,2310,6.058,2311,7.15,2312,5.734,2313,6.492,2314,7.15]],["t/719",[1,0.409,59,0.584,60,1.382,62,0.582,99,2.446,201,0.826,202,2.605,203,2.731,205,2.437,405,2.179,2305,5.807,2306,5.807,2315,5.807,2316,7.241,2317,7.241]],["t/721",[1,0.409,59,0.584,60,1.382,62,0.582,99,1.949,201,0.826,202,2.605,203,3.428,205,2.437,405,2.179,2305,5.807,2306,5.807,2315,5.807,2318,7.241,2319,7.241]],["t/723",[1,0.409,41,2.437,59,0.584,62,0.582,199,3.962,201,0.826,269,3.267,563,6.065,678,3.962,1116,4.583,2292,4.832,2296,6.135,2310,6.135,2320,7.241,2321,7.241,2322,7.241]],["t/725",[1,0.375,41,2.238,59,0.553,60,1.27,62,0.534,99,1.79,201,0.758,202,1.906,203,2.508,205,2.898,262,4.108,265,3.515,307,3.705,405,2.001,563,6.37,590,5.333,678,3.638,2292,4.437,2294,5.092,2315,5.333,2323,6.65]],["t/727",[1,0.389,41,2.319,59,0.566,60,1.316,62,0.554,201,0.786,203,2.599,265,3.643,405,2.074,563,5.878,678,3.77,2292,4.598,2293,5.277,2304,5.277,2324,6.891,2325,6.891,2326,6.891,2327,5.839,2328,6.256,2329,5.526]],["t/729",[1,0.164,8,2.644,41,0.98,42,0.65,59,0.561,60,0.556,62,0.234,97,1.036,99,0.784,131,1.843,145,3.459,172,2.644,199,1.593,201,0.332,202,0.835,213,4.599,241,1.891,278,4.408,563,3.138,671,1.799,675,2.467,678,4.587,691,4.837,1029,6.362,1075,6.42,1097,2.644,1113,1.891,1127,2.23,1145,3.053,1551,4.269,2292,1.943,2293,5.199,2294,4.529,2304,3.601,2312,6.723,2313,5.37,2315,4.743,2327,6.312,2329,4.743,2330,2.467,2331,2.912,2332,2.912,2333,4.702,2334,4.702,2335,2.912,2336,2.644,2337,2.912,2338,6.789,2339,2.912,2340,2.912,2341,2.912,2342,4.702,2343,2.912]],["t/731",[1,0.351,41,2.092,59,0.529,60,1.186,62,0.499,99,1.673,199,3.4,201,0.709,213,3.865,269,2.804,283,4.035,671,3.84,678,3.4,771,4.984,956,4.035,1029,4.035,1075,4.759,1113,4.035,2292,4.147,2304,6.307,2312,6.605,2329,4.984,2330,5.266,2336,5.642,2344,6.215,2345,6.215,2346,6.215]],["t/733",[1,0.269,41,1.602,59,0.564,60,0.909,62,0.383,199,2.605,201,0.543,213,2.234,278,4.447,563,4.571,671,2.941,675,4.034,678,4.39,691,5.209,966,7.285,1029,5.697,1075,6.144,1113,3.091,1145,3.091,2292,3.177,2293,5.246,2304,5.246,2312,6.435,2327,4.034,2328,6.219,2329,5.493,2330,4.034,2347,4.761,2348,4.761,2349,8.023,2350,6.85,2351,4.761,2352,4.761,2353,4.761]],["t/735",[1,0.442,12,4.633,59,0.504,64,3.45,103,4.012,183,2.842,240,5.231,268,4.451,492,2.379,822,5.231,1131,4.961,1672,5.565]],["t/737",[1,0.375,39,3.93,49,1.659,59,0.649,60,1.27,62,0.534,99,1.79,189,3.776,201,0.758,203,2.508,205,2.238,308,3,318,4.108,412,3.743,492,2.018,1041,4.42,1183,3.93,1540,5.634,2354,6.65]],["t/739",[60,1.456,62,0.755,106,3.905,189,4.332,287,4.509,308,3.442,405,2.296,419,4.953,421,6.927,492,3.087,1183,4.509]],["t/741",[1,0.359,59,0.663,60,1.213,62,0.511,99,1.71,201,0.725,203,2.396,205,2.138,206,3.476,448,1.196,464,3.065,492,2.536,529,3.065,663,4.674,749,2.942,949,6.148,1041,2.942,1139,4.239,1417,4.239,1916,5.383,2355,6.353,2356,5.768,2357,5.768]],["t/743",[1,0.371,59,0.687,62,0.528,99,1.769,201,0.75,203,2.479,205,2.212,206,3.596,213,3.084,448,1.237,472,4.268,492,2.593,1041,3.044,1139,4.386,1916,5.569,2356,5.968,2357,7.758,2358,6.573,2359,6.573]],["t/745",[1,0.375,19,4.892,59,0.553,60,1.27,62,0.534,69,3.404,110,4.721,201,0.758,202,1.906,344,4.892,448,1.252,492,2.897,501,4.437,864,7.294,1041,3.079,1183,3.93,1310,5.333,1320,5.634,1511,6.037,2360,6.037,2361,6.65]],["t/747",[1,0.419,59,0.646,62,0.597,141,2.92,201,0.847,448,1.399,492,2.803,529,4.456,1041,3.44,1308,6.746,2360,6.746,2362,7.43]],["t/749",[1,0.31,59,0.668,60,1.049,62,0.442,65,3.248,99,1.479,201,0.627,202,2.172,203,2.073,205,1.85,206,4.746,207,2.545,241,3.568,412,3.295,448,1.034,492,2.3,524,3.395,529,4.184,530,4.071,625,3.777,1041,2.545,1116,3.478,1139,5.057,1803,4.656,2363,8.675]],["t/751",[1,0.299,49,1.32,59,0.718,60,1.01,62,0.425,65,3.128,99,1.424,156,3.531,201,0.603,205,1.781,262,3.269,412,2.301,448,0.996,492,2.24,500,3.172,529,3.561,625,3.637,1043,5.92,1044,4.483,1139,5.673,1478,6.703,1725,3.435,1822,3.893,2364,5.291,2365,5.291,2366,5.291,2367,5.291]],["t/753",[1,0.213,34,2.523,59,0.725,60,0.722,62,0.304,99,2.272,201,0.658,202,2.008,203,3.185,205,2.842,206,4.62,207,3.91,448,0.712,492,2.126,530,3.287,663,2.782,999,2.033,1006,2.94,1015,2.295,1041,2.674,1139,2.523,1183,2.235,1628,6.003,1759,5.242,2368,5.774,2369,3.782,2370,3.782]],["t/755",[60,1.456,62,0.755,106,3.905,189,4.332,287,4.509,308,3.442,405,2.296,419,4.953,424,6.464,492,3.087,1183,4.509]],["t/757",[1,0.323,59,0.66,60,1.091,62,0.459,99,2.095,201,0.888,203,2.937,205,2.621,206,4.26,369,3.31,412,4.134,448,1.076,492,2.687,559,3.185,663,5.728,1183,3.379,1540,4.843,1677,3.245,2371,5.716,2372,5.716,2373,5.716,2374,5.716,2375,5.716]],["t/759",[60,1.456,62,0.755,106,3.905,189,4.332,287,4.509,308,3.442,405,2.296,419,4.953,425,6.118,492,3.087,1183,4.509]],["t/761",[1,0.319,49,2.197,55,4.017,59,0.658,62,0.455,99,2.081,106,2.897,127,2.135,180,2.852,183,2.052,201,0.645,202,1.622,203,2.917,205,2.603,448,1.065,492,1.717,508,3.153,530,2.656,971,5.49,999,3.043,1041,2.62,1119,4.539,1139,3.776,1725,5.021,1749,4.334,2376,5.659,2377,5.659,2378,5.659]],["t/763",[1,0.203,33,4.702,42,0.802,47,1.62,49,0.896,55,2.549,59,0.676,60,1.059,62,0.289,73,5.038,99,1.493,109,3.428,180,1.81,192,2.331,202,1.591,203,2.878,205,2.776,206,4.175,207,2.57,282,1.663,328,2.33,338,1.561,344,2.642,369,2.079,412,2.413,425,2.88,448,0.676,472,2.331,492,1.684,508,2.001,530,3.58,663,4.99,757,2.549,971,5.855,1090,3.703,1119,4.45,1183,2.122,1211,2.549,1417,2.396,1725,4.403,1749,2.75,1804,2.88,1822,2.642,2182,3.26,2379,3.591,2380,3.591,2381,3.591,2382,3.591,2383,3.591,2384,3.591,2385,3.591]],["t/765",[60,1.456,62,0.755,106,3.905,189,4.332,287,4.509,308,3.442,405,2.296,419,4.953,423,6.464,492,3.087,1183,4.509]],["t/767",[1,0.215,2,1.919,15,2.012,42,1.296,46,1.919,49,1.754,55,2.702,59,0.654,60,0.727,62,0.306,82,3.225,99,1.025,138,2.25,180,1.919,194,2.915,202,2.016,211,1.675,247,0.901,310,1.562,328,2.436,388,2.617,405,1.146,448,0.717,492,1.761,508,3.234,530,2.723,614,3.295,749,1.763,891,3.053,895,1.98,952,4.345,955,3.225,971,6.012,1012,3.053,1019,3.456,1063,2.472,1090,3.873,1119,4.654,1183,2.25,1188,3.456,1495,3.456,1562,3.456,1707,3.225,1725,4.566,1749,2.915,1822,2.801,2386,3.807,2387,3.807,2388,3.807,2389,5.804,2390,3.807,2391,3.807,2392,3.807,2393,3.807,2394,3.807,2395,5.804,2396,3.807]],["t/769",[60,1.456,62,0.755,106,3.905,189,4.332,287,4.509,308,3.442,405,2.296,419,4.953,422,6.464,492,3.087,1183,4.509]],["t/771",[1,0.299,59,0.675,60,1.409,62,0.425,99,1.424,138,3.128,142,1.567,201,0.603,202,2.437,203,1.996,205,1.781,213,2.483,388,3.637,448,0.996,492,2.24,882,5.431,1041,2.45,1090,3.531,1116,3.349,1506,4.244,1725,3.435,1736,4.052,1822,3.893,2310,4.483,2397,10.658,2398,5.291,2399,5.291]],["t/773",[1,0.384,59,0.655,60,1.3,62,0.547,99,2.353,201,0.776,202,1.952,203,2.568,205,2.292,448,1.282,492,2.653,1022,4.024,1041,3.153,1506,5.46,2400,6.809,2401,6.809,2402,6.809,2403,6.809]],["t/775",[1,0.384,59,0.655,60,1.3,62,0.547,99,1.832,201,0.776,202,1.952,203,3.297,205,2.292,448,1.282,492,2.653,1022,4.024,1041,3.153,1506,5.46,2404,6.809,2405,6.809,2406,6.809,2407,6.809]],["t/777",[1,0.288,37,3.229,49,1.273,59,0.703,60,0.974,62,0.41,99,1.373,141,2.005,199,2.792,203,1.924,205,3.047,206,2.792,213,3.377,262,3.152,348,6.686,448,0.96,492,1.548,529,2.461,639,4.323,1090,4.802,1116,3.229,1139,4.802,1226,5.108,1442,4.323,1725,3.312,1822,3.753,2408,7.196,2409,8.336]]],"invertedIndex":[["",{"_index":59,"t":{"7":{"position":[[418,1],[480,1]]},"13":{"position":[[847,1]]},"19":{"position":[[44,1],[230,1],[264,1],[282,1],[311,1],[315,2],[330,1],[334,2],[349,1],[353,2],[373,1],[452,1],[499,1],[542,1],[587,1]]},"27":{"position":[[20,3],[46,3],[506,1]]},"31":{"position":[[134,1],[138,1],[162,1],[298,1]]},"33":{"position":[[44,4],[77,4],[373,1],[514,2],[531,1],[906,3],[1356,1],[1524,1],[1569,1],[1629,1],[2057,1],[2184,1],[2259,1],[2278,1],[2360,1]]},"35":{"position":[[138,1]]},"37":{"position":[[50,1],[219,1],[287,1]]},"39":{"position":[[81,1],[111,3],[168,5],[348,3],[360,2],[363,5],[465,2],[476,1],[487,3],[497,3],[803,2],[1262,3],[1266,3],[1270,3],[1747,1],[2232,1],[2298,1],[2353,1],[2595,1],[3057,1],[3097,1],[3148,1],[3230,1]]},"43":{"position":[[37,1],[274,4],[394,1]]},"49":{"position":[[33,3],[42,2],[54,4],[59,3],[63,3],[107,3],[118,4],[123,3],[127,3],[154,2],[157,1],[167,1],[176,2],[240,2],[290,2],[412,1]]},"53":{"position":[[260,1]]},"57":{"position":[[165,1],[176,1],[607,3],[833,1],[901,1],[953,3],[960,3],[1203,1],[1254,1],[1295,1],[1324,4],[1395,1],[1543,1],[1725,1],[1779,1],[1881,1]]},"61":{"position":[[70,1],[89,1],[110,1]]},"63":{"position":[[162,1]]},"65":{"position":[[54,1]]},"67":{"position":[[41,1],[87,2],[389,1],[412,1],[436,1]]},"69":{"position":[[33,1],[347,4]]},"73":{"position":[[276,1]]},"79":{"position":[[517,1]]},"85":{"position":[[238,1]]},"91":{"position":[[114,1],[217,1],[299,2],[563,2]]},"93":{"position":[[128,2]]},"95":{"position":[[135,1],[180,1]]},"103":{"position":[[61,1]]},"108":{"position":[[107,1],[155,1],[291,1],[344,1]]},"118":{"position":[[125,1]]},"122":{"position":[[115,1]]},"126":{"position":[[136,3],[193,1],[250,1],[298,2],[432,1],[489,1],[553,2]]},"128":{"position":[[90,1],[193,1],[312,1],[314,2],[327,1],[329,2]]},"130":{"position":[[162,1]]},"132":{"position":[[203,1],[319,1],[348,1]]},"137":{"position":[[98,1],[115,1],[200,1],[212,1],[222,1],[224,19]]},"139":{"position":[[102,1],[104,2],[182,1],[196,1],[198,2],[201,1],[203,16]]},"141":{"position":[[100,1],[102,1],[108,1],[125,1],[142,1],[153,1],[222,1],[230,1],[241,1],[243,16]]},"143":{"position":[[119,1],[127,1],[206,1],[212,1],[222,1],[224,13]]},"145":{"position":[[67,1],[83,2],[193,1],[212,1],[214,16]]},"147":{"position":[[202,1],[221,1],[223,16]]},"149":{"position":[[114,1],[155,2],[264,1],[276,1],[278,1],[280,11]]},"151":{"position":[[84,1],[163,1],[183,1],[188,1],[190,22]]},"153":{"position":[[226,1],[261,1],[263,32]]},"155":{"position":[[95,1],[186,1],[200,1],[210,1],[212,21]]},"157":{"position":[[208,1],[232,1],[234,21]]},"159":{"position":[[87,1],[241,1],[251,1],[253,7],[307,1],[321,1],[516,1]]},"161":{"position":[[135,1],[212,1],[216,1],[220,1],[222,5]]},"163":{"position":[[164,1],[290,1],[302,1],[304,9]]},"167":{"position":[[296,1],[298,2],[317,1],[373,1]]},"169":{"position":[[143,1],[193,1]]},"171":{"position":[[257,1],[273,2]]},"173":{"position":[[223,1],[345,1],[374,1]]},"177":{"position":[[128,1],[177,1],[217,1],[305,2],[322,1],[374,1],[414,1]]},"179":{"position":[[106,2],[128,2],[150,2],[254,1],[278,1],[312,2],[334,2],[356,2],[378,2],[492,2]]},"181":{"position":[[152,2],[183,2]]},"183":{"position":[[225,3]]},"185":{"position":[[95,2],[117,2],[139,2]]},"189":{"position":[[179,1],[235,1]]},"191":{"position":[[137,1],[214,1],[218,1],[222,1],[224,5]]},"193":{"position":[[116,1],[118,1],[146,1],[276,1],[278,1],[306,1]]},"195":{"position":[[127,1],[165,1],[180,1],[190,1],[205,1],[211,1],[248,1],[287,1],[451,1],[479,1],[518,1]]},"199":{"position":[[383,1],[385,1],[401,1],[411,1]]},"205":{"position":[[43,1],[45,1],[55,1],[191,1],[246,1]]},"207":{"position":[[43,1],[45,1],[52,1],[66,1],[71,1],[203,1],[222,1],[257,1],[269,1],[271,1]]},"209":{"position":[[178,1],[195,1],[230,1],[234,1],[244,1],[250,1],[252,1]]},"211":{"position":[[95,3],[119,1],[134,1],[136,1],[146,3]]},"213":{"position":[[97,1],[114,1],[160,1],[218,1],[235,1],[255,1],[269,1],[502,1],[512,1],[564,1]]},"215":{"position":[[156,1],[282,1],[294,1],[296,9],[435,1]]},"217":{"position":[[130,1],[145,1],[241,1],[264,1]]},"219":{"position":[[169,1],[184,1],[296,1]]},"225":{"position":[[104,1],[126,2]]},"227":{"position":[[90,1],[107,2],[201,1],[222,2]]},"229":{"position":[[65,1],[314,1],[430,1],[462,1]]},"233":{"position":[[93,1],[95,2],[254,1],[256,1],[314,1]]},"235":{"position":[[131,1],[133,1],[175,1]]},"237":{"position":[[148,1],[150,1],[189,1],[200,1],[213,1]]},"239":{"position":[[156,1],[199,2],[202,1],[245,1]]},"241":{"position":[[105,1],[150,1]]},"243":{"position":[[86,1],[137,1]]},"245":{"position":[[158,5],[220,1],[506,1]]},"247":{"position":[[217,1],[233,1],[297,1]]},"249":{"position":[[280,1]]},"251":{"position":[[168,1],[191,1],[432,1]]},"253":{"position":[[82,1],[101,1],[123,1]]},"256":{"position":[[241,1],[243,1],[250,1],[260,1],[277,1],[661,2],[756,3],[815,1]]},"258":{"position":[[269,1],[573,1],[605,1],[637,1]]},"260":{"position":[[102,1],[133,1],[135,1],[143,1],[148,1],[161,1],[163,2],[172,2],[175,1],[180,1],[182,2],[272,1],[303,1],[305,1],[313,1],[318,1],[486,3]]},"262":{"position":[[147,1],[149,1],[151,3],[155,1]]},"264":{"position":[[247,1],[249,2],[401,1],[426,2],[436,1],[438,2],[498,1],[712,1],[742,1],[773,2],[811,1],[821,1],[837,2]]},"268":{"position":[[126,1],[139,1],[152,1],[190,1],[194,1],[198,1],[202,1]]},"270":{"position":[[70,1],[74,1],[187,1],[194,1],[199,2]]},"274":{"position":[[18,1],[214,1],[539,1],[690,1],[803,1]]},"276":{"position":[[80,2],[356,1],[358,1],[392,1]]},"278":{"position":[[137,1],[147,1],[173,1],[189,1],[205,1],[222,1],[256,1],[342,1],[344,2],[366,4],[559,1],[581,1],[615,1],[638,1],[661,1],[766,1]]},"282":{"position":[[199,1],[264,1],[353,1],[414,1],[420,1]]},"284":{"position":[[318,1],[508,1]]},"286":{"position":[[158,1],[177,1],[196,1],[214,1],[233,1],[256,1],[287,1],[529,1],[575,1],[618,1]]},"290":{"position":[[54,1],[181,1]]},"292":{"position":[[94,1],[196,1]]},"295":{"position":[[120,1],[175,2],[194,3]]},"297":{"position":[[67,2],[84,1],[102,2],[121,2],[142,3],[154,2],[167,2],[183,2],[198,2],[214,2],[456,3],[476,3],[495,3],[515,3],[533,1],[539,1],[543,1],[549,2]]},"299":{"position":[[235,2],[274,1],[308,1],[354,1],[457,2],[477,1],[533,1],[567,1],[613,1],[714,3],[768,1],[802,1],[848,1]]},"301":{"position":[[101,2],[291,1],[507,2],[529,3],[578,1],[620,3]]},"303":{"position":[[151,1],[155,3],[170,1],[174,3],[190,1],[194,3],[220,1],[472,2],[480,1],[496,2],[504,1],[520,2],[528,1]]},"305":{"position":[[83,1],[96,1],[98,1],[158,2],[173,2],[184,2],[195,1],[197,1],[201,1],[212,1],[214,3],[220,1],[234,1],[236,1],[240,1],[251,1],[281,1],[298,1],[373,1],[395,1],[454,1],[476,1],[508,1],[510,2],[515,1],[528,1],[554,1],[564,1],[606,1],[608,1]]},"307":{"position":[[118,1],[120,2],[124,1],[142,2],[158,2],[169,1]]},"309":{"position":[[95,1],[97,2],[101,1],[116,1],[118,1],[158,1],[176,1],[189,1],[204,2],[220,2],[231,1]]},"311":{"position":[[140,1],[142,2],[146,1],[162,2],[172,1],[207,1]]},"313":{"position":[[84,1]]},"321":{"position":[[170,1],[172,1]]},"323":{"position":[[229,1],[231,1],[389,1],[391,1],[440,1],[442,1],[497,1],[499,1],[582,1],[584,1],[928,3]]},"327":{"position":[[314,1],[319,2],[1094,1],[1099,2]]},"329":{"position":[[89,2],[94,2],[99,1],[105,2],[110,2],[115,1],[121,2],[126,2],[131,2]]},"331":{"position":[[99,1],[115,1],[134,1],[136,1],[138,2],[159,1],[161,1],[163,2],[205,1],[207,1],[209,2]]},"339":{"position":[[134,1],[136,1],[164,1],[358,1],[360,1],[388,1]]},"343":{"position":[[218,1],[220,1],[228,1],[236,1],[353,1],[369,2]]},"347":{"position":[[28,1],[38,2],[157,1],[164,1],[174,2],[199,1],[201,39]]},"349":{"position":[[32,1],[44,2],[50,2],[61,1],[150,1],[161,1],[173,2],[179,2],[190,1],[195,1],[197,42],[255,1],[257,2]]},"355":{"position":[[51,1],[85,1]]},"357":{"position":[[50,1]]},"361":{"position":[[42,1],[88,1],[121,1],[128,1],[130,1],[140,1],[162,1],[182,1],[184,1],[186,2],[200,1],[221,1]]},"363":{"position":[[60,1],[99,1],[208,1],[241,1],[254,2],[297,2],[323,1],[325,1],[329,1],[335,1],[337,1],[341,1],[353,1],[382,1],[393,1],[415,1],[430,1],[432,1],[436,1],[442,1],[444,1],[448,1],[459,1],[482,1],[494,1],[528,1],[530,2],[535,1],[537,2],[542,1],[544,2],[549,1],[551,1],[690,1],[734,1],[829,1],[914,3],[930,1],[932,1],[936,1],[947,1],[949,1],[953,1],[964,1],[966,1],[970,1],[986,1],[1018,1],[1020,2],[1025,1],[1027,2],[1032,1],[1034,1],[1057,1],[1152,3],[1177,1],[1179,1],[1183,1],[1197,1],[1199,1],[1203,1],[1209,1],[1241,1],[1247,1],[1281,1],[1283,2],[1288,1],[1308,1],[1332,1],[1354,1],[1377,1],[1379,1]]},"367":{"position":[[50,1],[84,1],[156,1],[216,1]]},"369":{"position":[[50,1],[96,1],[163,1]]},"371":{"position":[[115,1],[149,1],[222,1],[285,1]]},"373":{"position":[[64,1],[110,1],[178,1]]},"377":{"position":[[152,1],[204,1]]},"381":{"position":[[72,1],[130,1]]},"383":{"position":[[67,1],[128,1]]},"391":{"position":[[102,1],[170,1]]},"393":{"position":[[93,1],[139,1],[158,1]]},"395":{"position":[[93,1],[139,1],[158,1]]},"397":{"position":[[82,1],[127,1],[147,1]]},"399":{"position":[[92,1],[154,1]]},"401":{"position":[[32,1]]},"409":{"position":[[44,1],[158,1],[235,2],[252,1],[462,1],[466,2]]},"411":{"position":[[46,1],[157,1],[241,2],[265,1],[509,1],[513,2]]},"413":{"position":[[47,1],[161,1],[247,2],[271,1],[516,1],[520,2]]},"415":{"position":[[96,1],[210,1],[332,2],[356,1],[628,1],[632,2]]},"417":{"position":[[142,1],[325,1],[418,2],[442,1],[696,1],[700,2]]},"419":{"position":[[49,1],[159,1],[252,2],[276,1],[521,1],[525,2]]},"421":{"position":[[325,1],[351,1],[460,1],[541,2],[565,1],[689,2],[725,3],[752,3],[768,2],[792,1],[842,1],[848,1],[870,1],[892,1],[910,1],[916,1],[941,1],[963,1],[967,2]]},"423":{"position":[[329,1],[355,1],[460,1],[570,3],[597,3]]},"425":{"position":[[60,1],[87,1],[199,1],[278,2],[302,1],[350,1],[355,2],[366,2]]},"427":{"position":[[72,1],[99,1],[223,1],[306,2],[330,1],[380,2],[386,2],[397,2]]},"429":{"position":[[63,1],[90,1],[206,1],[291,2],[315,1],[366,1],[371,2],[382,2]]},"431":{"position":[[75,1],[102,1],[230,1]]},"433":{"position":[[80,1],[104,3],[108,1],[272,1],[388,2],[412,1],[489,2]]},"435":{"position":[[76,1],[100,3],[104,1],[276,1],[394,2],[418,1],[496,2]]},"437":{"position":[[117,1],[186,1],[210,3],[214,1],[467,1],[616,2],[640,1],[721,2],[867,2],[891,1],[984,2]]},"439":{"position":[[32,1]]},"445":{"position":[[149,2]]},"449":{"position":[[124,1],[126,2],[137,1],[160,1]]},"451":{"position":[[162,1],[164,1],[176,1],[196,1],[217,1],[240,1],[261,1],[263,1],[289,1],[291,1],[316,1],[331,1],[359,1],[391,1],[393,1],[406,1],[447,1],[488,1],[530,1],[571,1],[614,1],[653,1],[692,1],[735,1],[774,1],[815,1],[854,1],[895,1],[933,1],[963,2],[976,1],[996,1],[998,1],[1004,1],[1042,2],[1045,1]]},"453":{"position":[[237,1],[239,1],[251,1],[268,1],[291,1],[312,1],[314,1],[340,1],[342,1],[369,1],[381,1],[398,1],[420,1],[422,1],[428,1],[455,2],[471,1],[480,1]]},"455":{"position":[[81,1],[134,1]]},"457":{"position":[[136,2],[187,2]]},"459":{"position":[[86,1],[98,1],[122,2],[125,2],[128,1],[142,1]]},"463":{"position":[[391,1],[410,1],[431,2],[2029,1],[2053,1],[2226,1],[2295,1],[2394,2]]},"465":{"position":[[385,1],[403,1],[405,1],[415,3],[431,1]]},"473":{"position":[[43,1],[107,1],[196,1],[230,1],[281,1],[304,1],[306,1],[312,1],[338,1],[340,1],[353,1],[360,1],[362,1],[397,1],[399,1],[403,1],[431,1],[443,1],[447,1],[470,1],[472,1],[476,1],[478,1],[595,1],[597,1],[607,1],[609,1],[625,2],[630,1],[637,1],[644,1],[648,1],[729,1],[759,1],[777,1],[836,1],[886,1]]},"475":{"position":[[198,1],[231,1],[319,4],[353,1],[424,1],[589,1],[655,1],[681,1],[715,1],[753,2],[783,2],[817,1],[819,1],[825,1],[843,1],[845,1],[858,1],[865,1],[867,1],[877,1],[911,1],[953,2],[986,2],[1031,2],[1057,1],[1059,3],[1095,3],[1107,1],[1144,1],[1188,2],[1219,2],[1267,2]]},"477":{"position":[[32,1]]},"487":{"position":[[125,1],[152,1]]},"489":{"position":[[121,1],[150,1]]},"503":{"position":[[286,1],[314,2],[322,3]]},"505":{"position":[[116,2]]},"507":{"position":[[307,1],[338,2],[407,2],[421,1]]},"509":{"position":[[276,1]]},"511":{"position":[[20,1],[44,1]]},"519":{"position":[[177,1],[231,1],[264,2],[279,1],[346,2],[374,1],[380,1],[386,1],[392,1],[398,1],[573,1],[582,1],[591,1],[600,1]]},"521":{"position":[[178,1],[211,2],[292,1],[294,2],[298,1],[327,1],[394,2],[422,1],[428,1],[434,1],[440,1],[446,1]]},"523":{"position":[[243,1],[255,1],[257,1],[267,3],[283,1],[317,1],[326,1]]},"525":{"position":[[32,1]]},"527":{"position":[[74,1],[78,1],[90,2]]},"529":{"position":[[104,1],[133,1]]},"533":{"position":[[32,1]]},"544":{"position":[[134,1],[164,1],[197,2]]},"546":{"position":[[117,1],[147,1],[180,2]]},"548":{"position":[[174,1],[204,1],[238,2]]},"550":{"position":[[117,1],[147,1],[181,2]]},"552":{"position":[[118,1],[148,1],[183,2]]},"554":{"position":[[175,1],[205,1],[240,2]]},"556":{"position":[[174,1],[204,1],[238,2]]},"558":{"position":[[233,1],[263,1],[298,2]]},"560":{"position":[[179,1],[209,1],[246,2]]},"562":{"position":[[120,1],[150,1],[187,2]]},"564":{"position":[[177,1],[207,1],[244,2]]},"566":{"position":[[177,1],[207,1],[244,2]]},"568":{"position":[[177,1],[207,1],[244,2]]},"570":{"position":[[178,1],[208,1],[246,2]]},"572":{"position":[[122,1],[152,1],[191,2]]},"574":{"position":[[122,1],[152,1],[191,2]]},"576":{"position":[[127,1],[157,1],[201,2]]},"579":{"position":[[220,1],[268,2],[349,2]]},"581":{"position":[[222,1],[272,2],[379,2]]},"583":{"position":[[222,1],[279,2]]},"585":{"position":[[222,1],[279,2]]},"588":{"position":[[448,1],[496,1]]},"592":{"position":[[17,1],[50,1],[168,1],[213,1],[219,1],[254,1]]},"594":{"position":[[17,1],[51,1],[169,1],[214,1],[220,1],[255,1],[387,1],[430,1],[471,1],[491,1],[550,1],[578,1],[586,2],[716,1]]},"598":{"position":[[17,1],[50,1],[136,1],[181,1],[187,1]]},"600":{"position":[[17,1],[104,1],[137,1],[182,1],[188,1],[324,1],[367,1],[411,1],[439,1],[447,2],[509,1],[603,1]]},"604":{"position":[[17,1],[50,1],[151,1],[200,1],[245,1],[251,1],[286,1]]},"606":{"position":[[17,1],[51,1],[79,1],[105,1],[150,1],[156,1],[191,1],[223,1],[398,1],[441,1],[475,1],[514,1],[534,1],[593,1],[626,1],[634,2],[793,1]]},"609":{"position":[[17,1],[39,1],[350,1],[409,1],[411,1],[415,1],[423,1],[584,1],[592,1],[603,1],[605,1],[630,1],[632,1],[636,1],[644,1],[728,1],[736,1],[819,1],[821,1]]},"611":{"position":[[17,1],[50,1],[128,1]]},"613":{"position":[[17,1],[51,1],[129,1],[265,1],[290,1],[292,1],[323,1],[325,1],[329,1],[427,1],[522,1],[555,1],[557,1],[561,1],[570,1],[741,1],[772,1],[795,1],[930,2],[970,1]]},"615":{"position":[[17,1],[42,1],[76,1]]},"617":{"position":[[17,1],[50,1],[84,1],[154,1],[290,1],[315,1],[317,1],[348,1],[350,1],[354,1],[452,1],[547,1],[580,1],[582,1],[586,1],[595,1],[766,1],[797,1],[817,1],[861,1],[867,2],[930,1],[1083,1]]},"619":{"position":[[32,1]]},"621":{"position":[[99,1],[127,2]]},"623":{"position":[[103,1],[131,2]]},"625":{"position":[[199,1],[247,1],[265,1],[267,2],[272,2],[293,1],[348,1],[352,2],[409,1],[502,1],[536,2],[557,1],[612,1],[616,2]]},"629":{"position":[[184,1],[228,7],[238,1]]},"631":{"position":[[188,1],[233,7],[243,1]]},"633":{"position":[[189,1],[234,7],[244,1]]},"635":{"position":[[108,1],[153,1]]},"637":{"position":[[112,1],[154,1]]},"639":{"position":[[113,1],[155,1]]},"641":{"position":[[112,1],[154,1]]},"643":{"position":[[115,1],[160,1]]},"645":{"position":[[116,1],[118,1],[171,1]]},"649":{"position":[[166,1],[205,1],[246,1],[600,4],[605,5],[613,1],[676,4],[683,1],[758,1],[820,2],[823,4],[830,1]]},"651":{"position":[[367,3],[500,1],[561,1],[620,1]]},"653":{"position":[[116,1],[168,1]]},"655":{"position":[[140,1],[165,1],[214,1]]},"657":{"position":[[428,1],[463,1],[533,1],[735,1],[774,1],[816,1],[860,1],[899,4],[910,1],[949,4],[960,1],[1001,4],[1012,1],[1211,4],[1305,1]]},"659":{"position":[[423,1],[471,1],[493,1],[495,2],[512,2],[537,2],[606,1],[654,1],[676,1],[678,2],[701,2],[740,2]]},"661":{"position":[[121,1],[174,1]]},"663":{"position":[[123,1],[178,1]]},"667":{"position":[[84,1],[185,1]]},"669":{"position":[[113,1]]},"671":{"position":[[94,1],[207,1],[209,1],[213,1],[226,1],[248,1],[259,1],[285,1],[296,1],[322,1],[333,1],[359,1],[370,1],[380,1],[391,1],[414,1],[426,1],[453,1],[468,1],[492,1],[494,1]]},"679":{"position":[[277,1],[297,1],[299,1],[309,3],[325,1],[371,1],[390,1]]},"685":{"position":[[397,1],[430,1],[477,1]]},"687":{"position":[[179,1],[215,1],[313,1],[342,1]]},"689":{"position":[[542,1],[575,1],[706,1],[783,2]]},"697":{"position":[[161,1],[194,1]]},"701":{"position":[[42,1],[87,1],[174,1],[219,1],[238,1],[240,1],[242,1],[248,1],[270,1],[272,1],[283,1],[295,2],[307,1],[309,1],[323,1],[325,2],[328,1],[334,1],[344,1],[346,1],[348,2],[360,1],[371,1],[398,1],[412,1],[425,1],[445,1]]},"703":{"position":[[60,1],[93,1],[210,3],[230,1],[263,1],[353,3],[380,1],[382,1],[386,1],[396,1],[421,1],[436,1],[438,1],[442,1],[448,1],[450,1],[454,1],[464,1],[487,1],[504,1],[506,1],[510,1],[521,1],[546,1],[548,2],[553,1],[568,1],[570,1],[574,1],[580,1],[582,1],[586,1],[596,1],[618,1],[633,1],[635,1],[639,1],[645,1],[670,1],[672,2],[677,1],[679,2],[684,1],[686,2],[691,1],[693,2],[698,1],[700,2],[705,1],[707,1],[929,1],[931,1],[935,1],[945,1],[967,1],[982,1],[984,1],[988,1],[994,1],[1019,1],[1021,2],[1026,1],[1028,1],[1128,1],[1196,5],[1204,1],[1206,1],[1210,1],[1220,1],[1242,1],[1257,1],[1259,1],[1263,1],[1269,1],[1271,1],[1275,1],[1285,1],[1308,1],[1310,2],[1315,1],[1321,1],[1323,1],[1327,1],[1337,1],[1360,1],[1362,2],[1367,1],[1369,2],[1374,1],[1376,1]]},"707":{"position":[[61,1],[110,1],[153,1],[199,1],[248,1],[328,1],[380,1]]},"711":{"position":[[178,1],[225,1],[245,1],[295,1],[302,1]]},"713":{"position":[[82,1],[135,2],[156,1],[190,2],[211,1]]},"715":{"position":[[79,3],[129,1],[184,1],[227,1]]},"717":{"position":[[59,1],[119,1]]},"719":{"position":[[65,1],[125,1]]},"721":{"position":[[66,1],[126,1]]},"723":{"position":[[84,1],[154,1]]},"725":{"position":[[91,1],[155,1]]},"727":{"position":[[85,1],[154,1]]},"729":{"position":[[321,1],[408,1],[496,1],[601,1],[704,1],[807,1],[897,1],[988,1]]},"731":{"position":[[105,1],[216,1]]},"733":{"position":[[98,1],[186,1],[306,1],[427,1]]},"735":{"position":[[32,1]]},"737":{"position":[[94,1],[96,1],[106,1],[110,1]]},"741":{"position":[[135,1],[137,1],[156,1],[164,1],[184,1]]},"743":{"position":[[82,1],[84,1],[103,1],[111,1],[131,1],[163,1]]},"745":{"position":[[113,1],[198,1]]},"747":{"position":[[78,1],[80,2],[124,2]]},"749":{"position":[[165,1],[167,1],[191,1],[201,1],[231,2],[271,2],[317,2]]},"751":{"position":[[190,1],[192,1],[194,1],[199,1],[209,1],[219,2],[222,1],[227,1],[237,1],[248,2],[251,1],[278,1],[288,2],[302,1]]},"753":{"position":[[114,1],[116,1],[130,1],[154,1],[164,1],[195,1],[221,2],[247,2],[258,1],[264,1],[273,1],[282,1],[291,1],[300,1],[313,1],[344,1],[365,1],[374,1],[380,1],[389,1],[398,1],[407,1],[416,1],[429,1],[460,1],[481,1],[485,2]]},"757":{"position":[[154,1],[183,1],[185,1],[218,1],[247,1],[260,2]]},"761":{"position":[[280,1],[282,1],[292,1],[313,1],[319,1],[325,1]]},"763":{"position":[[528,1],[530,1],[546,1],[565,1],[569,1],[573,2],[598,2],[601,2],[626,1],[628,1],[644,1],[666,1],[670,2],[701,2],[704,2]]},"767":{"position":[[289,1],[341,1],[345,1],[359,2],[362,2],[390,1],[445,1],[449,1],[469,2],[472,2],[668,1]]},"771":{"position":[[58,1],[332,1],[334,1],[344,1],[377,1],[385,1],[400,2],[411,1]]},"773":{"position":[[85,1],[87,1],[97,1],[116,1]]},"775":{"position":[[84,1],[86,1],[96,1],[115,1]]},"777":{"position":[[196,1],[200,1],[204,2],[210,1],[227,1],[247,1],[294,1],[298,1],[302,2],[308,1],[325,1],[345,1]]}}}],["0",{"_index":213,"t":{"19":{"position":[[228,1],[244,1],[260,1],[280,1],[309,1],[369,1],[371,1],[596,1]]},"41":{"position":[[122,1]]},"43":{"position":[[423,4]]},"179":{"position":[[256,2],[315,2],[495,2]]},"256":{"position":[[817,2]]},"303":{"position":[[222,2],[421,2],[475,2],[499,2],[523,2]]},"427":{"position":[[291,2],[383,2]]},"457":{"position":[[139,2],[190,2]]},"475":{"position":[[336,2]]},"519":{"position":[[281,1]]},"521":{"position":[[329,1]]},"527":{"position":[[76,1],[80,1]]},"548":{"position":[[126,1]]},"554":{"position":[[127,1]]},"556":{"position":[[126,1]]},"558":{"position":[[185,1]]},"564":{"position":[[129,1]]},"566":{"position":[[129,1]]},"568":{"position":[[129,1]]},"570":{"position":[[130,1]]},"649":{"position":[[335,2]]},"707":{"position":[[123,2],[126,2],[215,2]]},"729":{"position":[[429,2],[453,2],[513,2],[543,2],[623,2],[647,2],[725,2],[749,2],[822,2],[852,2],[917,2],[941,2],[1010,2]]},"731":{"position":[[167,3],[237,2]]},"733":{"position":[[146,2]]},"743":{"position":[[165,1]]},"771":{"position":[[289,2]]},"777":{"position":[[207,2],[305,2]]}}}],["0):normal",{"_index":2326,"t":{"727":{"position":[[135,16]]}}}],["0):reorder():concat",{"_index":2383,"t":{"763":{"position":[[576,21]]}}}],["0):todir(\"i",{"_index":2348,"t":{"733":{"position":[[149,14]]}}}],["0):todir(\"yl",{"_index":2351,"t":{"733":{"position":[[252,15]]}}}],["0):todir(\"yr",{"_index":2353,"t":{"733":{"position":[[372,15]]}}}],["0):torot(\"i",{"_index":2335,"t":{"729":{"position":[[371,14]]}}}],["0):torot(\"yl",{"_index":2340,"t":{"729":{"position":[[650,15]]}}}],["0):torot(\"yr",{"_index":2339,"t":{"729":{"position":[[546,15]]}}}],["0):torot(\"zr",{"_index":2341,"t":{"729":{"position":[[752,15]]}}}],["0.0",{"_index":2329,"t":{"727":{"position":[[174,4]]},"729":{"position":[[424,4],[517,4],[912,4]]},"731":{"position":[[232,4]]},"733":{"position":[[321,4],[443,4]]}}}],["0.2.0",{"_index":1526,"t":{"323":{"position":[[366,7]]}}}],["0.4",{"_index":2299,"t":{"711":{"position":[[290,4]]}}}],["0.4.0",{"_index":789,"t":{"67":{"position":[[375,5]]}}}],["0.4.1",{"_index":824,"t":{"75":{"position":[[39,5]]}}}],["0.5.0",{"_index":1528,"t":{"323":{"position":[[417,7]]}}}],["0.6",{"_index":2298,"t":{"711":{"position":[[285,4]]}}}],["0.6.0",{"_index":756,"t":{"57":{"position":[[1630,6]]},"323":{"position":[[474,7]]}}}],["0.7.0",{"_index":657,"t":{"47":{"position":[[72,5]]}}}],["0.8.0",{"_index":1061,"t":{"149":{"position":[[324,8]]},"323":{"position":[[559,7],[780,7],[893,8]]},"443":{"position":[[88,6]]}}}],["0.8.0'",{"_index":1529,"t":{"323":{"position":[[715,7]]}}}],["0.9.0",{"_index":480,"t":{"35":{"position":[[90,5]]},"323":{"position":[[1008,6],[1087,8],[1121,8]]},"457":{"position":[[127,8]]}}}],["0.9.1",{"_index":343,"t":{"29":{"position":[[47,6]]}}}],["00007ff7738b30d0",{"_index":1763,"t":{"451":{"position":[[459,17]]}}}],["00007ff7738b3220",{"_index":1766,"t":{"451":{"position":[[542,17]]}}}],["00007ff7738b33c0",{"_index":1778,"t":{"451":{"position":[[907,17]]}}}],["00007ff7738b34d0",{"_index":1775,"t":{"451":{"position":[[786,17]]}}}],["00007ff7738b37f0",{"_index":1776,"t":{"451":{"position":[[827,17]]}}}],["00007ff7738b3b10",{"_index":1773,"t":{"451":{"position":[[704,17]]}}}],["00007ff7738b3c20",{"_index":1762,"t":{"451":{"position":[[418,17]]}}}],["00007ff7738b42b0",{"_index":1777,"t":{"451":{"position":[[866,17]]}}}],["00007ff7738b43b0",{"_index":1771,"t":{"451":{"position":[[665,17]]}}}],["00007ff7738b43f0",{"_index":1764,"t":{"451":{"position":[[500,17]]}}}],["00007ff7738b44b0",{"_index":1769,"t":{"451":{"position":[[626,17]]}}}],["00007ff7738b4540",{"_index":1774,"t":{"451":{"position":[[747,17]]}}}],["00007ff7738b4700",{"_index":1767,"t":{"451":{"position":[[583,17]]}}}],["00007ff7738b49a0",{"_index":1780,"t":{"451":{"position":[[945,17]]}}}],["0b1000101",{"_index":1187,"t":{"227":{"position":[[203,9]]}}}],["0x247d2882520",{"_index":223,"t":{"19":{"position":[[404,13]]}}}],["0x247d29ec9c8",{"_index":225,"t":{"19":{"position":[[427,14]]}}}],["0x420",{"_index":1185,"t":{"227":{"position":[[92,5]]}}}],["0xffffffff",{"_index":1980,"t":{"548":{"position":[[132,11]]},"554":{"position":[[133,11]]},"556":{"position":[[132,11]]},"558":{"position":[[191,11]]},"564":{"position":[[135,11]]},"566":{"position":[[135,11]]},"568":{"position":[[135,11]]},"570":{"position":[[136,11]]}}}],["1",{"_index":99,"t":{"11":{"position":[[225,1]]},"19":{"position":[[69,2],[115,1],[278,1],[305,1],[307,1],[318,1],[324,1],[328,1],[343,1],[347,1],[450,1],[464,1],[483,1],[497,1],[581,1],[583,1],[585,1]]},"39":{"position":[[105,2]]},"73":{"position":[[278,2]]},"132":{"position":[[139,2],[189,1],[205,2],[222,2],[231,1],[321,2],[338,2],[350,2],[375,1],[446,2]]},"137":{"position":[[304,2]]},"139":{"position":[[180,1]]},"145":{"position":[[69,2]]},"149":{"position":[[262,1]]},"151":{"position":[[161,1]]},"153":{"position":[[224,1]]},"155":{"position":[[184,1]]},"157":{"position":[[206,1]]},"159":{"position":[[89,1],[108,2],[123,3],[518,1],[537,2],[552,3]]},"161":{"position":[[137,1],[218,1]]},"171":{"position":[[259,2]]},"173":{"position":[[152,2],[209,1],[225,2],[242,2],[254,1],[347,2],[364,2],[376,2],[404,1],[484,2]]},"179":{"position":[[109,2],[337,2]]},"181":{"position":[[186,2]]},"183":{"position":[[222,2]]},"185":{"position":[[98,2]]},"189":{"position":[[181,1],[237,1]]},"191":{"position":[[139,1],[220,1]]},"193":{"position":[[120,2],[186,1],[280,2]]},"213":{"position":[[162,1],[271,2]]},"217":{"position":[[147,2]]},"219":{"position":[[186,2]]},"229":{"position":[[385,3]]},"243":{"position":[[88,1],[171,1]]},"258":{"position":[[550,2],[607,1],[639,1]]},"264":{"position":[[418,2],[714,2]]},"270":{"position":[[190,1],[203,1],[249,1]]},"274":{"position":[[20,1],[43,2],[216,1],[239,2],[285,1],[394,1],[541,1],[564,2],[805,1]]},"276":{"position":[[197,2]]},"278":{"position":[[139,1],[170,1],[550,2],[561,2],[617,1]]},"290":{"position":[[215,5]]},"297":{"position":[[535,1],[545,1],[552,1]]},"303":{"position":[[153,1],[159,1],[226,2],[229,1]]},"327":{"position":[[274,2],[361,2],[1043,2]]},"329":{"position":[[92,1],[134,1]]},"339":{"position":[[138,2],[362,2]]},"343":{"position":[[355,2]]},"347":{"position":[[155,1]]},"349":{"position":[[148,1]]},"351":{"position":[[323,1]]},"363":{"position":[[331,3],[438,3],[1205,3]]},"391":{"position":[[174,1]]},"395":{"position":[[160,1]]},"421":{"position":[[844,3],[912,3]]},"425":{"position":[[263,2],[347,2],[352,2]]},"427":{"position":[[377,2]]},"449":{"position":[[267,2]]},"451":{"position":[[1000,3]]},"453":{"position":[[424,3]]},"455":{"position":[[83,1]]},"463":{"position":[[174,1]]},"473":{"position":[[632,2]]},"505":{"position":[[119,1]]},"519":{"position":[[376,1],[593,4]]},"521":{"position":[[424,1]]},"579":{"position":[[28,1]]},"649":{"position":[[374,2]]},"657":{"position":[[954,3]]},"703":{"position":[[444,3],[576,3],[641,3],[990,3],[1265,3]]},"707":{"position":[[166,2],[169,2]]},"715":{"position":[[160,3]]},"717":{"position":[[90,3]]},"719":{"position":[[96,3],[127,1]]},"721":{"position":[[97,3]]},"725":{"position":[[136,2]]},"729":{"position":[[368,2]]},"731":{"position":[[164,2]]},"737":{"position":[[104,1]]},"741":{"position":[[139,2]]},"743":{"position":[[86,2]]},"749":{"position":[[169,2]]},"751":{"position":[[201,2]]},"753":{"position":[[118,2],[260,3],[266,2],[376,3],[418,2]]},"757":{"position":[[187,2],[249,2]]},"761":{"position":[[284,2],[315,1]]},"763":{"position":[[532,2],[613,2]]},"767":{"position":[[595,1]]},"771":{"position":[[336,2]]},"773":{"position":[[89,2],[118,1]]},"775":{"position":[[88,2]]},"777":{"position":[[270,2]]}}}],["1).name",{"_index":2367,"t":{"751":{"position":[[291,8]]}}}],["1):concat",{"_index":2391,"t":{"767":{"position":[[347,11]]}}}],["1):torot(\"i",{"_index":2342,"t":{"729":{"position":[[855,14],[945,14]]}}}],["1):torot(\"z",{"_index":2337,"t":{"729":{"position":[[457,14]]}}}],["1.0",{"_index":2328,"t":{"727":{"position":[[169,4]]},"733":{"position":[[201,4],[438,4]]}}}],["1.0.0",{"_index":1789,"t":{"457":{"position":[[174,6]]}}}],["1.000.000",{"_index":101,"t":{"11":{"position":[[230,10]]}}}],["1.2",{"_index":2301,"t":{"711":{"position":[[320,4]]}}}],["1.2.3.4",{"_index":1486,"t":{"305":{"position":[[541,10]]}}}],["1.8",{"_index":2300,"t":{"711":{"position":[[315,4]]}}}],["10",{"_index":952,"t":{"108":{"position":[[599,3]]},"132":{"position":[[208,2],[324,2]]},"145":{"position":[[72,2]]},"171":{"position":[[262,2]]},"173":{"position":[[228,2],[350,2]]},"286":{"position":[[216,2],[475,2],[578,2]]},"307":{"position":[[126,4]]},"327":{"position":[[316,2],[1096,2]]},"343":{"position":[[358,2]]},"455":{"position":[[101,2]]},"588":{"position":[[492,3]]},"767":{"position":[[392,3],[399,3],[484,3]]}}}],["100",{"_index":1547,"t":{"327":{"position":[[289,4],[1069,4]]}}}],["10000000",{"_index":1180,"t":{"225":{"position":[[129,9]]}}}],["1000m",{"_index":1970,"t":{"535":{"position":[[108,7]]}}}],["1024",{"_index":1668,"t":{"397":{"position":[[149,4]]},"609":{"position":[[160,5]]}}}],["103547413",{"_index":2001,"t":{"560":{"position":[[249,10]]}}}],["1045060183",{"_index":1991,"t":{"554":{"position":[[243,11]]}}}],["1056",{"_index":1186,"t":{"227":{"position":[[110,5]]}}}],["10_000_000",{"_index":1178,"t":{"225":{"position":[[106,10]]}}}],["11",{"_index":2050,"t":{"588":{"position":[[498,3]]}}}],["110100100",{"_index":1659,"t":{"383":{"position":[[130,9]]}}}],["11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357",{"_index":2102,"t":{"609":{"position":[[425,156]]},"613":{"position":[[583,155]]},"617":{"position":[[608,155]]}}}],["1151865881",{"_index":2013,"t":{"568":{"position":[[247,11]]},"576":{"position":[[204,11]]}}}],["115443384115231951475820445136871322101870729500298182134363293112660251666017",{"_index":2105,"t":{"609":{"position":[[646,79]]}}}],["123",{"_index":1020,"t":{"128":{"position":[[92,3],[195,3]]},"213":{"position":[[99,5],[220,5]]},"377":{"position":[[206,3]]}}}],["1234",{"_index":1755,"t":{"451":{"position":[[178,5],[978,5]]},"453":{"position":[[253,5],[383,5]]}}}],["1252609637",{"_index":2004,"t":{"562":{"position":[[190,11]]}}}],["128",{"_index":2065,"t":{"592":{"position":[[209,3]]},"594":{"position":[[210,3]]},"598":{"position":[[177,3]]},"600":{"position":[[178,3]]},"604":{"position":[[241,3]]},"606":{"position":[[146,3]]}}}],["13",{"_index":231,"t":{"19":{"position":[[539,2]]},"331":{"position":[[101,2]]}}}],["1337",{"_index":1859,"t":{"473":{"position":[[355,4],[463,4]]},"475":{"position":[[860,4],[1034,5]]}}}],["15",{"_index":2392,"t":{"767":{"position":[[396,2]]}}}],["16",{"_index":1494,"t":{"307":{"position":[[171,2]]},"592":{"position":[[192,3],[278,3]]},"594":{"position":[[193,3],[279,3]]},"598":{"position":[[160,3]]},"600":{"position":[[161,3]]},"604":{"position":[[224,3],[310,3]]},"606":{"position":[[129,3],[215,3]]}}}],["17",{"_index":966,"t":{"114":{"position":[[70,2]]},"733":{"position":[[223,3],[343,3],[465,3]]}}}],["180.0",{"_index":2343,"t":{"729":{"position":[[1003,6]]}}}],["192",{"_index":2066,"t":{"592":{"position":[[215,3]]},"594":{"position":[[216,3]]},"598":{"position":[[183,3]]},"600":{"position":[[184,3]]},"604":{"position":[[247,3]]},"606":{"position":[[152,3]]}}}],["1a4",{"_index":1657,"t":{"381":{"position":[[132,3]]}}}],["1st",{"_index":1354,"t":{"278":{"position":[[175,5],[258,3]]}}}],["2",{"_index":205,"t":{"19":{"position":[[77,2],[326,1],[337,1],[367,1],[493,1],[495,1]]},"39":{"position":[[108,2]]},"132":{"position":[[305,1],[366,2],[406,2],[415,1]]},"143":{"position":[[204,1]]},"147":{"position":[[122,2],[212,2]]},"159":{"position":[[132,2],[147,3],[248,2],[577,2],[592,3]]},"163":{"position":[[179,2],[299,2]]},"173":{"position":[[331,1],[392,2],[438,2],[450,1]]},"179":{"position":[[131,2]]},"185":{"position":[[120,2]]},"193":{"position":[[123,2],[191,1],[283,2]]},"195":{"position":[[129,1],[250,1],[481,1]]},"215":{"position":[[171,2],[291,2]]},"217":{"position":[[266,2],[320,2]]},"219":{"position":[[298,2],[352,2]]},"258":{"position":[[553,1],[609,1]]},"264":{"position":[[421,2]]},"274":{"position":[[85,2],[247,2],[600,2],[828,2],[878,1]]},"276":{"position":[[200,2]]},"278":{"position":[[186,1],[553,2]]},"303":{"position":[[103,1]]},"309":{"position":[[191,1]]},"329":{"position":[[108,1],[124,1]]},"339":{"position":[[141,2],[365,2]]},"363":{"position":[[1243,3]]},"421":{"position":[[866,3],[937,3]]},"425":{"position":[[234,2]]},"427":{"position":[[260,2]]},"429":{"position":[[244,2]]},"431":{"position":[[270,2]]},"455":{"position":[[85,1]]},"457":{"position":[[35,1]]},"463":{"position":[[154,2]]},"473":{"position":[[639,2]]},"519":{"position":[[382,1],[584,4]]},"521":{"position":[[430,1]]},"529":{"position":[[106,1]]},"657":{"position":[[904,3]]},"703":{"position":[[1317,3]]},"707":{"position":[[193,3],[212,2],[239,2],[261,2],[371,2],[393,2]]},"713":{"position":[[129,2],[132,2],[184,2]]},"715":{"position":[[164,2]]},"717":{"position":[[94,2]]},"719":{"position":[[100,2]]},"721":{"position":[[101,2]]},"725":{"position":[[140,2],[168,2]]},"737":{"position":[[101,2]]},"741":{"position":[[142,2]]},"743":{"position":[[89,2]]},"749":{"position":[[172,2]]},"751":{"position":[[229,2]]},"753":{"position":[[121,2],[269,3],[275,2],[385,3],[409,2]]},"757":{"position":[[195,2],[252,2]]},"761":{"position":[[287,2],[321,1]]},"763":{"position":[[535,2],[571,1],[630,2],[633,2],[716,2]]},"771":{"position":[[339,2]]},"773":{"position":[[92,2]]},"775":{"position":[[91,2]]},"777":{"position":[[172,2],[202,1],[273,2],[300,1]]}}}],["20",{"_index":955,"t":{"108":{"position":[[670,2]]},"329":{"position":[[165,3]]},"767":{"position":[[295,2]]}}}],["200",{"_index":879,"t":{"91":{"position":[[802,3]]},"679":{"position":[[425,3]]}}}],["2024",{"_index":258,"t":{"23":{"position":[[189,4]]},"27":{"position":[[718,4]]}}}],["2048",{"_index":2094,"t":{"609":{"position":[[166,5]]}}}],["21",{"_index":1495,"t":{"309":{"position":[[103,2]]},"767":{"position":[[378,2]]}}}],["222957957",{"_index":1998,"t":{"558":{"position":[[301,10]]}}}],["234",{"_index":1160,"t":{"213":{"position":[[182,5],[287,5]]}}}],["24",{"_index":2064,"t":{"592":{"position":[[196,2]]},"594":{"position":[[197,2]]},"598":{"position":[[164,2]]},"600":{"position":[[165,2]]},"604":{"position":[[228,2]]},"606":{"position":[[133,2]]}}}],["249",{"_index":880,"t":{"91":{"position":[[809,3]]},"264":{"position":[[717,3]]}}}],["255",{"_index":1595,"t":{"341":{"position":[[149,3]]}}}],["255))):concat",{"_index":2073,"t":{"594":{"position":[[520,17]]},"606":{"position":[[563,17]]}}}],["256",{"_index":2032,"t":{"581":{"position":[[28,3]]},"592":{"position":[[224,3]]},"594":{"position":[[225,3]]},"598":{"position":[[192,3]]},"600":{"position":[[193,3]]},"604":{"position":[[256,3]]},"606":{"position":[[161,3]]}}}],["2650573207",{"_index":2016,"t":{"570":{"position":[[249,11]]}}}],["2871868277",{"_index":1974,"t":{"544":{"position":[[200,11]]}}}],["2nd",{"_index":1355,"t":{"278":{"position":[[191,5]]}}}],["2x",{"_index":874,"t":{"91":{"position":[[675,3]]}}}],["3",{"_index":203,"t":{"19":{"position":[[46,1],[85,2],[262,1],[271,1],[289,1],[313,1],[332,1],[345,1],[351,1],[356,1],[448,1]]},"137":{"position":[[198,1]]},"147":{"position":[[125,2],[215,2],[255,1]]},"159":{"position":[[284,1]]},"161":{"position":[[210,1]]},"167":{"position":[[14,1]]},"179":{"position":[[153,2]]},"185":{"position":[[142,2]]},"191":{"position":[[212,1]]},"193":{"position":[[126,2],[196,1],[286,2]]},"205":{"position":[[47,2]]},"264":{"position":[[424,1]]},"274":{"position":[[255,2],[836,2],[884,4]]},"276":{"position":[[203,2],[215,3]]},"278":{"position":[[202,1],[556,1],[564,2],[619,1]]},"303":{"position":[[172,1]]},"339":{"position":[[144,2],[368,2]]},"391":{"position":[[172,1]]},"393":{"position":[[160,1]]},"429":{"position":[[276,2],[363,2],[368,2]]},"431":{"position":[[304,2]]},"455":{"position":[[87,1]]},"473":{"position":[[646,1]]},"519":{"position":[[388,1],[575,4]]},"521":{"position":[[436,1]]},"529":{"position":[[135,1]]},"707":{"position":[[28,1],[242,3],[264,2],[374,3],[396,2]]},"711":{"position":[[258,2],[261,2],[297,2]]},"713":{"position":[[187,2]]},"715":{"position":[[167,2]]},"717":{"position":[[97,2]]},"719":{"position":[[103,2]]},"721":{"position":[[104,2],[128,1]]},"725":{"position":[[171,2]]},"727":{"position":[[132,2]]},"737":{"position":[[98,2]]},"741":{"position":[[145,2]]},"743":{"position":[[92,2]]},"749":{"position":[[175,2]]},"753":{"position":[[141,2],[278,3],[284,2],[394,3],[400,2]]},"757":{"position":[[208,2],[255,2]]},"761":{"position":[[290,1],[327,1]]},"763":{"position":[[538,2],[616,1],[636,2],[719,1]]},"771":{"position":[[342,1]]},"773":{"position":[[95,1]]},"775":{"position":[[94,1],[117,1]]},"777":{"position":[[276,1]]}}}],["3):ab",{"_index":2323,"t":{"725":{"position":[[143,9]]}}}],["3.5x",{"_index":1503,"t":{"313":{"position":[[103,4]]}}}],["3.7416573867739",{"_index":2308,"t":{"715":{"position":[[186,15],[229,15]]}}}],["30",{"_index":2395,"t":{"767":{"position":[[488,2],[491,3]]}}}],["3154674178",{"_index":2010,"t":{"566":{"position":[[247,11]]}}}],["3190198453633110066",{"_index":2019,"t":{"572":{"position":[[195,20]]}}}],["32",{"_index":773,"t":{"61":{"position":[[310,2]]},"560":{"position":[[30,2]]},"592":{"position":[[202,2]]},"594":{"position":[[203,2]]},"598":{"position":[[170,2]]},"600":{"position":[[171,2]]},"604":{"position":[[234,2]]},"606":{"position":[[139,2]]}}}],["32973",{"_index":340,"t":{"27":{"position":[[723,6]]}}}],["3600",{"_index":1927,"t":{"507":{"position":[[341,4],[423,4]]}}}],["384",{"_index":2036,"t":{"583":{"position":[[28,3]]}}}],["3889643616",{"_index":2007,"t":{"564":{"position":[[247,11]]}}}],["3rd",{"_index":1356,"t":{"278":{"position":[[207,5]]}}}],["3x",{"_index":819,"t":{"73":{"position":[[229,2]]},"229":{"position":[[67,2]]}}}],["4",{"_index":206,"t":{"19":{"position":[[93,2]]},"141":{"position":[[220,1]]},"145":{"position":[[191,1]]},"147":{"position":[[128,2],[218,2],[272,2]]},"274":{"position":[[263,2],[396,1]]},"276":{"position":[[230,2]]},"278":{"position":[[572,2],[583,2],[640,1]]},"455":{"position":[[89,1],[136,1]]},"519":{"position":[[394,1]]},"521":{"position":[[442,1]]},"657":{"position":[[1006,3]]},"741":{"position":[[186,1]]},"743":{"position":[[133,1]]},"749":{"position":[[178,2],[228,2],[234,2]]},"753":{"position":[[144,2],[287,3],[293,2],[391,2],[403,3]]},"757":{"position":[[216,1],[258,1]]},"763":{"position":[[541,2],[639,2],[642,1],[721,2]]},"777":{"position":[[175,2]]}}}],["400",{"_index":1727,"t":{"433":{"position":[[317,4]]},"435":{"position":[[377,4]]},"437":{"position":[[599,4]]}}}],["4096",{"_index":2095,"t":{"609":{"position":[[176,5]]}}}],["41",{"_index":2387,"t":{"767":{"position":[[291,3]]}}}],["42",{"_index":1063,"t":{"151":{"position":[[86,2],[185,2]]},"207":{"position":[[68,2]]},"247":{"position":[[317,3],[374,2]]},"249":{"position":[[300,3],[357,2]]},"260":{"position":[[145,2],[224,3],[315,2],[385,3]]},"276":{"position":[[77,2],[83,3],[100,2],[385,2],[401,2],[482,5],[502,4],[572,4]]},"303":{"position":[[178,2]]},"309":{"position":[[233,2]]},"311":{"position":[[148,2],[224,2]]},"767":{"position":[[374,3]]}}}],["430867652",{"_index":1994,"t":{"556":{"position":[[241,10]]}}}],["443",{"_index":2261,"t":{"689":{"position":[[610,4]]}}}],["45597",{"_index":259,"t":{"23":{"position":[[194,6]]}}}],["5",{"_index":207,"t":{"19":{"position":[[101,2],[117,4],[166,4],[466,3],[485,2]]},"132":{"position":[[353,1]]},"137":{"position":[[100,1]]},"143":{"position":[[121,1]]},"145":{"position":[[86,1]]},"147":{"position":[[200,1]]},"159":{"position":[[239,1]]},"163":{"position":[[288,1]]},"167":{"position":[[319,1]]},"169":{"position":[[145,1]]},"171":{"position":[[276,1]]},"173":{"position":[[379,1]]},"179":{"position":[[280,2],[359,2]]},"215":{"position":[[280,1]]},"274":{"position":[[271,2],[287,4],[336,4],[419,2]]},"276":{"position":[[233,2]]},"278":{"position":[[575,2]]},"303":{"position":[[198,1]]},"333":{"position":[[368,3]]},"343":{"position":[[372,1]]},"347":{"position":[[41,1],[177,1]]},"409":{"position":[[322,1]]},"455":{"position":[[91,1],[138,1]]},"519":{"position":[[349,1],[400,1]]},"521":{"position":[[397,1],[448,1]]},"651":{"position":[[555,3],[608,2]]},"749":{"position":[[181,2]]},"753":{"position":[[147,2],[296,3],[302,2],[382,2],[412,3]]},"763":{"position":[[544,1],[618,2]]}}}],["5,0,0,0",{"_index":2194,"t":{"657":{"position":[[963,7]]}}}],["5,000",{"_index":2188,"t":{"657":{"position":[[777,5]]}}}],["5,0000",{"_index":2195,"t":{"657":{"position":[[1014,6]]}}}],["5.00",{"_index":2193,"t":{"657":{"position":[[912,4]]}}}],["5.1",{"_index":2377,"t":{"761":{"position":[[91,4]]}}}],["5.4",{"_index":889,"t":{"95":{"position":[[27,3],[119,3]]}}}],["5.4'",{"_index":1672,"t":{"401":{"position":[[108,6]]},"439":{"position":[[105,6]]},"477":{"position":[[101,6]]},"525":{"position":[[103,6]]},"533":{"position":[[101,6]]},"619":{"position":[[105,6]]},"735":{"position":[[104,6]]}}}],["50",{"_index":2172,"t":{"651":{"position":[[493,4]]}}}],["50,000",{"_index":2190,"t":{"657":{"position":[[818,6]]}}}],["500",{"_index":2185,"t":{"657":{"position":[[737,3]]}}}],["500,000",{"_index":2192,"t":{"657":{"position":[[863,7]]}}}],["5000",{"_index":2187,"t":{"657":{"position":[[765,6],[942,6]]}}}],["500000",{"_index":2191,"t":{"657":{"position":[[849,8]]}}}],["500000.4",{"_index":2196,"t":{"657":{"position":[[1065,10]]}}}],["512",{"_index":2039,"t":{"585":{"position":[[28,3]]},"609":{"position":[[382,4]]}}}],["5eb63bbbe01eeed093cb22bb8f5acdc3",{"_index":1978,"t":{"546":{"position":[[183,35]]}}}],["6",{"_index":1116,"t":{"179":{"position":[[381,2]]},"205":{"position":[[50,2]]},"276":{"position":[[236,2],[248,3]]},"278":{"position":[[578,1],[586,2],[642,1]]},"286":{"position":[[235,1]]},"455":{"position":[[93,1],[140,1]]},"717":{"position":[[121,1]]},"723":{"position":[[156,1]]},"749":{"position":[[184,2]]},"771":{"position":[[413,1]]},"777":{"position":[[178,1]]}}}],["6.1232339957368e",{"_index":2349,"t":{"733":{"position":[[206,16],[326,16],[448,16]]}}}],["60",{"_index":1929,"t":{"507":{"position":[[410,2]]}}}],["65537",{"_index":2103,"t":{"609":{"position":[[594,6]]},"613":{"position":[[766,5]]},"617":{"position":[[791,5]]}}}],["65e05b66",{"_index":1481,"t":{"305":{"position":[[416,8]]}}}],["68",{"_index":2388,"t":{"767":{"position":[[298,3]]}}}],["69",{"_index":1188,"t":{"227":{"position":[[225,3]]},"767":{"position":[[381,3]]}}}],["6aa8b7c94e7580774a804c24",{"_index":1482,"t":{"305":{"position":[[425,26]]}}}],["7",{"_index":1400,"t":{"286":{"position":[[179,1]]},"455":{"position":[[95,1],[142,1]]}}}],["7088720765356542432",{"_index":2021,"t":{"574":{"position":[[194,20]]}}}],["8",{"_index":779,"t":{"63":{"position":[[123,1]]},"65":{"position":[[204,1]]},"286":{"position":[[160,1],[531,1]]},"455":{"position":[[97,1],[144,1]]},"647":{"position":[[70,1]]}}}],["8):unpack",{"_index":1787,"t":{"455":{"position":[[119,12]]}}}],["80",{"_index":2231,"t":{"679":{"position":[[362,3]]},"685":{"position":[[461,3]]},"687":{"position":[[246,3]]}}}],["847757641",{"_index":1013,"t":{"126":{"position":[[491,9]]}}}],["8618312879776256743",{"_index":1989,"t":{"552":{"position":[[186,20]]}}}],["894552257",{"_index":1983,"t":{"548":{"position":[[241,10]]}}}],["8dad5f6a7dd2dcd8c35ec2fd7babb499bcad60d27d73fe73eca2ce025dfd3b47",{"_index":2034,"t":{"581":{"position":[[275,67]]}}}],["9",{"_index":1147,"t":{"205":{"position":[[53,1]]},"286":{"position":[[198,1],[258,1]]},"303":{"position":[[192,1]]},"399":{"position":[[156,1]]},"455":{"position":[[99,1]]}}}],["90",{"_index":2350,"t":{"733":{"position":[[248,3],[368,3]]}}}],["90.0",{"_index":2338,"t":{"729":{"position":[[507,5],[617,5],[719,5],[825,5]]}}}],["9065573210506989167",{"_index":1986,"t":{"550":{"position":[[184,20]]}}}],["9090",{"_index":2217,"t":{"671":{"position":[[372,5]]}}}],["98365361248415863235179644468056200977592391948608651522703704315152579004021",{"_index":2106,"t":{"609":{"position":[[738,78]]}}}],["_",{"_index":1126,"t":{"193":{"position":[[312,2]]},"495":{"position":[[210,2]]}}}],["__construct",{"_index":1220,"t":{"237":{"position":[[97,11]]},"245":{"position":[[284,12]]},"249":{"position":[[25,11]]}}}],["__construct(nam",{"_index":1222,"t":{"237":{"position":[[161,17]]},"239":{"position":[[128,17]]},"241":{"position":[[122,17]]},"245":{"position":[[192,17],[443,17]]},"247":{"position":[[184,17]]}}}],["__construct(publ",{"_index":1247,"t":{"249":{"position":[[184,18]]}}}],["__eq",{"_index":1460,"t":{"303":{"position":[[273,4]]}}}],["__gc",{"_index":1230,"t":{"239":{"position":[[176,6]]}}}],["__index",{"_index":520,"t":{"39":{"position":[[468,7]]},"53":{"position":[[120,7]]},"363":{"position":[[623,7]]},"449":{"position":[[361,7]]},"703":{"position":[[759,7]]}}}],["__lt",{"_index":1461,"t":{"303":{"position":[[282,5]]}}}],["__order",{"_index":445,"t":{"33":{"position":[[1761,7],[1966,7]]},"363":{"position":[[1185,11]]},"473":{"position":[[549,7],[599,7]]},"475":{"position":[[434,7]]}}}],["__parent",{"_index":1236,"t":{"243":{"position":[[195,8]]}}}],["__tostr",{"_index":1655,"t":{"379":{"position":[[19,10]]},"709":{"position":[[19,10]]}}}],["__valu",{"_index":1617,"t":{"361":{"position":[[132,7]]}}}],["_g",{"_index":317,"t":{"27":{"position":[[200,2]]}}}],["_g.coroutin",{"_index":1753,"t":{"449":{"position":[[419,14]]}}}],["_g.string",{"_index":1317,"t":{"264":{"position":[[237,9]]}}}],["_g.tabl",{"_index":521,"t":{"39":{"position":[[478,8]]},"449":{"position":[[406,9]]},"451":{"position":[[198,9]]}}}],["_g:myfunc",{"_index":1293,"t":{"258":{"position":[[575,12]]}}}],["_psoup",{"_index":558,"t":{"39":{"position":[[2136,6]]},"67":{"position":[[167,6]]},"443":{"position":[[0,6]]}}}],["_pversion",{"_index":873,"t":{"91":{"position":[[621,9]]},"441":{"position":[[0,9]]},"445":{"position":[[139,9],[236,18]]}}}],["_version",{"_index":1741,"t":{"445":{"position":[[187,18],[264,12]]}}}],["a\":1,\"b\":2,\"c\":3",{"_index":1862,"t":{"473":{"position":[[684,19]]}}}],["a.k.a",{"_index":1695,"t":{"417":{"position":[[72,6],[178,5]]}}}],["a?.b?.c",{"_index":1277,"t":{"256":{"position":[[807,7]]}}}],["aadata",{"_index":2087,"t":{"604":{"position":[[144,6]]},"606":{"position":[[72,6],[468,6],[663,7],[768,7]]}}}],["aarch64",{"_index":345,"t":{"29":{"position":[[82,7]]}}}],["abi",{"_index":766,"t":{"59":{"position":[[72,3]]}}}],["abov",{"_index":956,"t":{"108":{"position":[[677,6]]},"209":{"position":[[35,6]]},"235":{"position":[[25,5]]},"274":{"position":[[1023,5]]},"284":{"position":[[695,6]]},"303":{"position":[[450,6]]},"327":{"position":[[832,5]]},"379":{"position":[[8,6]]},"709":{"position":[[8,6]]},"731":{"position":[[209,5]]}}}],["absenc",{"_index":841,"t":{"79":{"position":[[595,7]]}}}],["absent",{"_index":1736,"t":{"437":{"position":[[931,6]]},"503":{"position":[[114,7]]},"507":{"position":[[125,7]]},"509":{"position":[[124,7]]},"771":{"position":[[245,7]]}}}],["absolut",{"_index":590,"t":{"39":{"position":[[2944,8]]},"499":{"position":[[32,8]]},"501":{"position":[[11,8]]},"725":{"position":[[55,8]]}}}],["accept",{"_index":593,"t":{"39":{"position":[[2982,6]]},"69":{"position":[[279,7]]},"132":{"position":[[13,7]]},"173":{"position":[[13,7]]},"305":{"position":[[456,8]]},"679":{"position":[[63,9]]},"695":{"position":[[0,7]]},"697":{"position":[[98,6]]},"703":{"position":[[183,7]]}}}],["access",{"_index":618,"t":{"39":{"position":[[3700,6]]},"49":{"position":[[538,6],[903,6]]},"59":{"position":[[232,6]]},"65":{"position":[[293,6]]},"179":{"position":[[429,6]]},"247":{"position":[[92,8]]},"256":{"position":[[0,9],[883,7]]},"266":{"position":[[223,6]]},"315":{"position":[[353,6]]},"443":{"position":[[35,6]]}}}],["accessor",{"_index":858,"t":{"85":{"position":[[328,8]]}}}],["accordingli",{"_index":1782,"t":{"453":{"position":[[100,12]]}}}],["accumul",{"_index":2397,"t":{"771":{"position":[[46,11],[69,13],[97,11],[195,12],[229,12],[257,11],[305,12],[363,12],[387,12]]}}}],["achiev",{"_index":1491,"t":{"305":{"position":[[872,8]]}}}],["act",{"_index":1914,"t":{"503":{"position":[[184,6]]},"507":{"position":[[195,6]]},"509":{"position":[[194,6]]}}}],["action",{"_index":1311,"t":{"264":{"position":[[88,6]]}}}],["activ",{"_index":193,"t":{"17":{"position":[[179,7]]},"519":{"position":[[15,9]]}}}],["actual",{"_index":630,"t":{"41":{"position":[[139,6]]},"651":{"position":[[92,8]]}}}],["ad",{"_index":306,"t":{"27":{"position":[[0,5]]},"33":{"position":[[0,5],[24,5],[49,5],[82,5],[142,5],[210,5],[278,5],[726,5],[900,5],[918,5],[938,5],[959,5],[982,5],[1002,5],[1023,5],[1047,5],[1074,5],[1095,5],[1122,5],[1149,5],[1272,5],[1298,5],[1325,5],[1378,5],[1404,5],[1434,5],[1465,5],[1503,5],[1551,5],[1595,5],[1655,5],[1685,5],[1710,5],[2253,5],[2333,5],[2384,5]]},"35":{"position":[[0,5]]},"37":{"position":[[0,5],[500,5],[525,5],[549,5]]},"39":{"position":[[0,5],[25,5],[115,5],[143,5],[174,5],[294,5],[399,5],[491,5],[523,5],[1165,5],[1214,5],[1391,5],[1913,5],[2143,5],[2206,5],[2242,5],[2264,5],[2284,5],[2310,5],[2332,5],[2470,5],[2638,5],[2657,5],[2673,5],[2693,5],[2713,5],[2733,5],[2747,5],[2766,5],[2783,5],[2805,5],[2817,5],[2860,5],[3453,5],[3648,5],[3725,5],[3760,5],[3799,5],[3834,5],[3914,5]]},"41":{"position":[[288,5]]},"49":{"position":[[0,5],[74,5],[138,5],[220,5],[284,5],[326,5],[354,5],[1341,5],[1382,5]]},"51":{"position":[[318,5]]},"57":{"position":[[0,5],[73,5],[140,5],[192,5],[239,5],[540,5],[585,5],[648,5],[757,5],[877,5],[1111,5],[1215,5],[1329,5],[1383,5],[1449,5],[1515,5],[1560,5]]},"61":{"position":[[94,5]]},"67":{"position":[[0,5],[35,5],[74,5],[99,5],[141,5],[161,5],[449,5],[517,5],[560,5],[603,5],[616,5],[629,5],[642,5]]},"71":{"position":[[0,5]]},"89":{"position":[[0,5]]},"91":{"position":[[0,5],[61,5],[133,5],[171,5],[196,5],[232,5],[261,5],[293,5],[302,5],[327,5],[348,5],[383,5],[414,5],[452,5],[479,5],[550,5],[584,5],[615,5]]},"323":{"position":[[1462,5]]},"327":{"position":[[121,5]]},"515":{"position":[[103,5]]}}}],["add",{"_index":895,"t":{"95":{"position":[[182,4]]},"122":{"position":[[283,3]]},"149":{"position":[[206,3]]},"179":{"position":[[6,4]]},"195":{"position":[[201,3],[207,3]]},"213":{"position":[[498,3]]},"225":{"position":[[8,3]]},"237":{"position":[[6,4]]},"243":{"position":[[188,4]]},"284":{"position":[[474,3]]},"319":{"position":[[6,4]]},"333":{"position":[[200,3]]},"351":{"position":[[263,3]]},"385":{"position":[[0,4]]},"473":{"position":[[542,3]]},"475":{"position":[[426,4]]},"507":{"position":[[394,4]]},"515":{"position":[[4,3]]},"517":{"position":[[40,3]]},"689":{"position":[[12,3]]},"767":{"position":[[591,3]]}}}],["add(1",{"_index":1080,"t":{"163":{"position":[[172,6],[292,6]]},"215":{"position":[[164,6],[284,6]]}}}],["add(a",{"_index":1079,"t":{"163":{"position":[[133,6]]},"195":{"position":[[146,6],[268,6],[499,6]]},"215":{"position":[[125,6],[380,6]]}}}],["addit",{"_index":268,"t":{"23":{"position":[[347,10]]},"79":{"position":[[0,10]]},"85":{"position":[[0,10]]},"116":{"position":[[441,10]]},"297":{"position":[[57,9]]},"307":{"position":[[31,10]]},"333":{"position":[[89,10]]},"401":{"position":[[34,9]]},"439":{"position":[[34,9]]},"465":{"position":[[228,10]]},"477":{"position":[[34,9]]},"525":{"position":[[34,9]]},"533":{"position":[[34,9]]},"602":{"position":[[39,10]]},"619":{"position":[[34,9]]},"735":{"position":[[34,9]]}}}],["addloop",{"_index":1934,"t":{"517":{"position":[[4,7]]}}}],["address",{"_index":2222,"t":{"675":{"position":[[89,8]]}}}],["adler",{"_index":1999,"t":{"560":{"position":[[24,5]]}}}],["advanc",{"_index":1501,"t":{"311":{"position":[[93,8]]}}}],["advis",{"_index":1558,"t":{"327":{"position":[[736,7]]},"335":{"position":[[154,9]]}}}],["ae",{"_index":2052,"t":{"590":{"position":[[22,3]]},"592":{"position":[[52,4],[71,4],[110,4],[123,4],[232,4]]},"594":{"position":[[53,4],[72,4],[111,4],[124,4],[233,4],[687,4]]},"596":{"position":[[21,3]]},"598":{"position":[[52,4],[91,4],[200,4]]},"600":{"position":[[19,4],[58,4],[201,4],[578,4]]},"602":{"position":[[19,3]]},"604":{"position":[[60,4],[71,3],[264,4]]},"606":{"position":[[61,4],[169,4],[757,4]]}}}],["aforement",{"_index":89,"t":{"9":{"position":[[529,14]]},"657":{"position":[[634,14]]}}}],["afterward",{"_index":2198,"t":{"659":{"position":[[379,11]]}}}],["ag",{"_index":1150,"t":{"207":{"position":[[62,3],[218,3],[265,3]]},"209":{"position":[[79,3],[246,3]]},"243":{"position":[[82,3]]},"247":{"position":[[171,3],[202,4],[235,3]]},"249":{"position":[[217,4]]}}}],["again",{"_index":641,"t":{"43":{"position":[[64,5]]},"463":{"position":[[1371,5]]}}}],["against",{"_index":1442,"t":{"299":{"position":[[61,7]]},"703":{"position":[[115,7]]},"777":{"position":[[24,7]]}}}],["agent",{"_index":1472,"t":{"305":{"position":[[290,7]]}}}],["aggreg",{"_index":1129,"t":{"195":{"position":[[48,9]]}}}],["aggress",{"_index":1083,"t":{"167":{"position":[[86,10]]}}}],["agnost",{"_index":2175,"t":{"655":{"position":[[22,8]]}}}],["aid",{"_index":91,"t":{"11":{"position":[[3,3]]},"327":{"position":[[648,3]]}}}],["aim",{"_index":1515,"t":{"317":{"position":[[6,4]]}}}],["akin",{"_index":1744,"t":{"449":{"position":[[58,4]]}}}],["algorithm",{"_index":830,"t":{"79":{"position":[[111,10],[383,11]]},"229":{"position":[[452,9]]},"303":{"position":[[331,10]]},"329":{"position":[[19,10]]},"544":{"position":[[72,10]]},"546":{"position":[[55,10]]},"548":{"position":[[55,10]]},"550":{"position":[[55,10]]},"552":{"position":[[56,10]]},"554":{"position":[[56,10]]},"556":{"position":[[55,10]]},"558":{"position":[[56,10]]},"560":{"position":[[59,10]]},"562":{"position":[[58,10]]},"564":{"position":[[58,10]]},"566":{"position":[[58,10]]},"568":{"position":[[58,10]]},"570":{"position":[[59,10]]},"572":{"position":[[60,10]]},"574":{"position":[[60,10]]},"576":{"position":[[65,10]]},"579":{"position":[[52,10]]},"581":{"position":[[54,10]]},"583":{"position":[[54,10]]},"585":{"position":[[54,10]]}}}],["alia",{"_index":522,"t":{"39":{"position":[[507,5],[2840,5]]},"49":{"position":[[266,5]]},"71":{"position":[[22,5]]},"295":{"position":[[128,5],[184,5]]},"531":{"position":[[3,5]]}}}],["alic",{"_index":1266,"t":{"256":{"position":[[252,7]]}}}],["aliv",{"_index":1830,"t":{"463":{"position":[[2102,5]]},"465":{"position":[[18,5]]},"467":{"position":[[16,5]]}}}],["alloc",{"_index":647,"t":{"43":{"position":[[226,10]]}}}],["allow",{"_index":98,"t":{"11":{"position":[[191,6]]},"23":{"position":[[140,8]]},"43":{"position":[[285,8]]},"45":{"position":[[25,6]]},"124":{"position":[[55,5]]},"195":{"position":[[20,6]]},"227":{"position":[[19,6],[127,6]]},"247":{"position":[[6,6]]},"278":{"position":[[37,5]]},"292":{"position":[[492,5]]},"301":{"position":[[20,6]]},"303":{"position":[[73,6]]},"305":{"position":[[18,6]]},"311":{"position":[[75,8]]},"319":{"position":[[227,6]]},"331":{"position":[[6,6]]},"339":{"position":[[24,6]]},"341":{"position":[[32,8]]},"343":{"position":[[6,6],[480,5]]},"602":{"position":[[28,6]]}}}],["alphabet",{"_index":2155,"t":{"639":{"position":[[43,10],[202,10]]}}}],["alphanumer",{"_index":2159,"t":{"643":{"position":[[43,12],[207,12]]}}}],["alreadi",{"_index":32,"t":{"7":{"position":[[8,7]]},"689":{"position":[[400,7]]}}}],["alter",{"_index":1783,"t":{"453":{"position":[[162,7]]}}}],["altern",{"_index":568,"t":{"39":{"position":[[2406,11]]},"49":{"position":[[749,13]]},"175":{"position":[[56,14]]},"187":{"position":[[48,14]]},"197":{"position":[[52,14]]},"213":{"position":[[26,11]]},"253":{"position":[[138,14]]},"260":{"position":[[33,11]]},"280":{"position":[[52,14]]},"288":{"position":[[55,14]]},"292":{"position":[[209,13]]},"363":{"position":[[757,14]]},"403":{"position":[[3,11]]}}}],["although",{"_index":194,"t":{"17":{"position":[[222,8]]},"260":{"position":[[621,8]]},"282":{"position":[[0,8]]},"602":{"position":[[78,8]]},"767":{"position":[[606,9]]}}}],["alway",{"_index":556,"t":{"39":{"position":[[2107,6]]},"201":{"position":[[28,6]]},"301":{"position":[[257,6]]},"325":{"position":[[193,6]]},"443":{"position":[[70,6]]}}}],["ambigu",{"_index":321,"t":{"27":{"position":[[386,11]]},"43":{"position":[[332,11]]},"233":{"position":[[492,11]]}}}],["amount",{"_index":1261,"t":{"256":{"position":[[112,6]]},"535":{"position":[[16,6]]}}}],["amzn",{"_index":1476,"t":{"305":{"position":[[379,4]]}}}],["anchor",{"_index":2221,"t":{"671":{"position":[[480,9]]}}}],["and/or",{"_index":1560,"t":{"327":{"position":[[758,6]]}}}],["android",{"_index":1739,"t":{"445":{"position":[[105,10]]}}}],["annot",{"_index":393,"t":{"33":{"position":[[161,10]]},"159":{"position":[[422,10]]}}}],["annoy",{"_index":544,"t":{"39":{"position":[[1548,11]]},"139":{"position":[[304,10]]},"153":{"position":[[404,10]]},"155":{"position":[[354,10]]},"157":{"position":[[351,10]]}}}],["anonym",{"_index":1122,"t":{"185":{"position":[[18,10]]},"213":{"position":[[53,9]]},"311":{"position":[[55,9]]}}}],["anoth",{"_index":19,"t":{"2":{"position":[[250,7]]},"325":{"position":[[0,7]]},"483":{"position":[[15,7]]},"649":{"position":[[24,7]]},"659":{"position":[[341,7]]},"745":{"position":[[159,7]]}}}],["ansi",{"_index":862,"t":{"91":{"position":[[76,4]]},"351":{"position":[[209,4]]}}}],["anyth",{"_index":1146,"t":{"201":{"position":[[166,8]]}}}],["anywher",{"_index":1340,"t":{"274":{"position":[[929,8]]}}}],["apart",{"_index":1331,"t":{"270":{"position":[[123,5]]}}}],["api",{"_index":870,"t":{"91":{"position":[[379,3]]},"237":{"position":[[323,3]]}}}],["appl",{"_index":1043,"t":{"141":{"position":[[127,8]]},"286":{"position":[[149,7]]},"649":{"position":[[667,8],[746,9],[760,6]]},"751":{"position":[[211,7],[304,5]]}}}],["appli",{"_index":548,"t":{"39":{"position":[[1694,5]]},"355":{"position":[[105,5]]},"367":{"position":[[104,5]]},"371":{"position":[[169,5]]}}}],["application/json",{"_index":1797,"t":{"463":{"position":[[412,18]]}}}],["approach",{"_index":1919,"t":{"503":{"position":[[435,9]]}}}],["appropri",{"_index":1799,"t":{"463":{"position":[[515,14]]}}}],["approxim",{"_index":1825,"t":{"463":{"position":[[1655,11]]}}}],["apt",{"_index":927,"t":{"108":{"position":[[33,3],[361,3],[377,3]]},"116":{"position":[[119,3]]}}}],["arbitrari",{"_index":883,"t":{"93":{"position":[[54,9]]}}}],["arch",{"_index":957,"t":{"110":{"position":[[16,4]]},"116":{"position":[[173,5]]}}}],["arch=amd64",{"_index":940,"t":{"108":{"position":[[177,11]]}}}],["aren't",{"_index":1705,"t":{"421":{"position":[[148,6]]},"423":{"position":[[152,6]]}}}],["arg",{"_index":1040,"t":{"139":{"position":[[543,5]]},"262":{"position":[[142,4],[161,4],[169,3],[314,4],[322,3]]},"305":{"position":[[203,8]]}}}],["arg,str",{"_index":546,"t":{"39":{"position":[[1583,11]]}}}],["arg=valu",{"_index":2219,"t":{"671":{"position":[[438,12]]}}}],["argument",{"_index":269,"t":{"23":{"position":[[358,9]]},"25":{"position":[[347,8]]},"27":{"position":[[68,9]]},"33":{"position":[[873,8]]},"39":{"position":[[2908,8]]},"49":{"position":[[785,9],[842,9]]},"51":{"position":[[9,9],[69,9],[115,10]]},"57":{"position":[[204,9]]},"59":{"position":[[8,9]]},"61":{"position":[[8,9]]},"75":{"position":[[145,9]]},"79":{"position":[[197,10],[473,10]]},"126":{"position":[[81,9]]},"132":{"position":[[42,8],[277,10]]},"147":{"position":[[29,9],[168,9],[189,10],[257,10]]},"173":{"position":[[42,8],[303,10]]},"213":{"position":[[674,10]]},"217":{"position":[[22,10],[58,9],[394,9]]},"219":{"position":[[23,9],[51,9],[80,9]]},"249":{"position":[[71,9]]},"290":{"position":[[253,8]]},"307":{"position":[[42,9]]},"327":{"position":[[352,8]]},"433":{"position":[[355,9],[365,10],[469,8],[478,8]]},"435":{"position":[[319,9],[329,10]]},"437":{"position":[[525,9],[535,10],[762,9],[772,10],[946,8]]},"513":{"position":[[25,10]]},"657":{"position":[[1102,8]]},"707":{"position":[[30,10]]},"723":{"position":[[54,9]]},"731":{"position":[[80,9]]}}}],["arithmet",{"_index":835,"t":{"79":{"position":[[372,10]]},"329":{"position":[[8,10]]},"711":{"position":[[26,10]]}}}],["around",{"_index":876,"t":{"91":{"position":[[721,6]]},"337":{"position":[[16,6]]}}}],["array",{"_index":663,"t":{"49":{"position":[[80,5]]},"199":{"position":[[283,5]]},"741":{"position":[[63,5]]},"753":{"position":[[13,5]]},"757":{"position":[[13,5],[65,5]]},"763":{"position":[[24,5],[38,6],[205,5]]}}}],["arrow",{"_index":1161,"t":{"213":{"position":[[365,6]]},"278":{"position":[[336,5]]},"349":{"position":[[260,5]]}}}],["articl",{"_index":10,"t":{"2":{"position":[[115,8]]}}}],["artifact",{"_index":327,"t":{"27":{"position":[[546,9]]}}}],["ascii",{"_index":465,"t":{"33":{"position":[[2234,5]]},"635":{"position":[[43,5]]}}}],["aspir",{"_index":900,"t":{"97":{"position":[[6,7]]}}}],["assert",{"_index":559,"t":{"39":{"position":[[2149,9]]},"409":{"position":[[0,7],[88,9],[151,6],[254,9]]},"411":{"position":[[0,7],[91,9],[150,6],[267,9]]},"413":{"position":[[0,7],[93,9],[154,6],[273,9]]},"415":{"position":[[0,7],[142,9],[203,6],[358,9]]},"417":{"position":[[0,7],[226,9],[318,6],[444,9]]},"419":{"position":[[0,7],[97,9],[152,6],[278,9]]},"421":{"position":[[0,7],[382,9],[453,6],[567,9],[794,9]]},"423":{"position":[[0,7],[386,9],[453,6]]},"425":{"position":[[0,7],[119,9],[192,6],[304,9]]},"427":{"position":[[0,7],[131,9],[216,6],[332,9]]},"429":{"position":[[0,7],[122,9],[199,6],[317,9]]},"431":{"position":[[0,7],[134,9],[223,6]]},"433":{"position":[[0,7],[198,9],[265,6],[414,9]]},"435":{"position":[[0,7],[194,9],[269,6],[420,9]]},"437":{"position":[[0,7],[304,9],[460,6],[642,9],[893,9]]},"757":{"position":[[147,6]]}}}],["assert(\"a",{"_index":1140,"t":{"199":{"position":[[413,10]]}}}],["assert(\"b",{"_index":1141,"t":{"199":{"position":[[464,10]]}}}],["assert(\"valu",{"_index":1142,"t":{"199":{"position":[[515,14]]}}}],["assert(\"world",{"_index":1137,"t":{"199":{"position":[[170,14]]}}}],["assert(aft",{"_index":2201,"t":{"659":{"position":[[524,12],[727,12]]}}}],["assert(befor",{"_index":2200,"t":{"659":{"position":[[498,13],[687,13]]}}}],["assert(compareversions(\"1.0.0",{"_index":1788,"t":{"457":{"position":[[95,31],[142,31]]}}}],["assert(crypto.adler32(str",{"_index":2000,"t":{"560":{"position":[[219,26]]}}}],["assert(crypto.crc32(str",{"_index":1997,"t":{"558":{"position":[[273,24]]}}}],["assert(crypto.djb2(str",{"_index":1982,"t":{"548":{"position":[[214,23]]}}}],["assert(crypto.fnv1(str",{"_index":1985,"t":{"550":{"position":[[157,23]]}}}],["assert(crypto.fnv1a(str",{"_index":1988,"t":{"552":{"position":[[158,24]]}}}],["assert(crypto.joaat(str",{"_index":1990,"t":{"554":{"position":[[215,24]]}}}],["assert(crypto.lookup3(str",{"_index":2003,"t":{"562":{"position":[[160,26]]}}}],["assert(crypto.lua(str",{"_index":1973,"t":{"544":{"position":[[174,22]]}}}],["assert(crypto.md5(str",{"_index":1977,"t":{"546":{"position":[[157,22]]}}}],["assert(crypto.murmur1(str",{"_index":2009,"t":{"566":{"position":[[217,26]]}}}],["assert(crypto.murmur2(str",{"_index":2012,"t":{"568":{"position":[[217,26]]}}}],["assert(crypto.murmur2a(str",{"_index":2015,"t":{"570":{"position":[[218,27]]}}}],["assert(crypto.murmur2neutral(str",{"_index":2023,"t":{"576":{"position":[[167,33]]}}}],["assert(crypto.murmur64a(str",{"_index":2018,"t":{"572":{"position":[[162,28]]}}}],["assert(crypto.murmur64b(str",{"_index":2020,"t":{"574":{"position":[[162,28]]}}}],["assert(crypto.random(1",{"_index":2049,"t":{"588":{"position":[[468,23]]}}}],["assert(crypto.sdbm(str",{"_index":1993,"t":{"556":{"position":[[214,23]]}}}],["assert(crypto.sha1(\"pluto",{"_index":2029,"t":{"579":{"position":[[240,27],[315,27]]}}}],["assert(crypto.sha256(\"pluto",{"_index":2033,"t":{"581":{"position":[[242,29],[343,29]]}}}],["assert(crypto.sha384(\"pluto",{"_index":2037,"t":{"583":{"position":[[242,29]]}}}],["assert(crypto.sha512(\"pluto",{"_index":2040,"t":{"585":{"position":[[242,29]]}}}],["assert(crypto.times33(str",{"_index":2006,"t":{"564":{"position":[[217,26]]}}}],["assert(decod",{"_index":1869,"t":{"475":{"position":[[738,14]]}}}],["assert(decoded.__order[1",{"_index":1873,"t":{"475":{"position":[[1162,25]]}}}],["assert(decoded.key",{"_index":1871,"t":{"475":{"position":[[934,18]]}}}],["assert(decoded.nested.nested_key",{"_index":1872,"t":{"475":{"position":[[998,32]]}}}],["assert(decoded.nul",{"_index":1874,"t":{"475":{"position":[[1199,19]]}}}],["assert(json.encode(decod",{"_index":1875,"t":{"475":{"position":[[1233,27]]}}}],["assert(myenum.option_1",{"_index":1117,"t":{"179":{"position":[[469,22]]},"181":{"position":[[160,22]]}}}],["assert(n",{"_index":1179,"t":{"225":{"position":[[117,8]]},"227":{"position":[[98,8],[213,8]]}}}],["assert(not",{"_index":1143,"t":{"199":{"position":[[582,10]]}}}],["assert(option_1",{"_index":1110,"t":{"179":{"position":[[90,15],[296,15]]},"181":{"position":[[136,15]]},"185":{"position":[[79,15]]}}}],["assert(option_2",{"_index":1111,"t":{"179":{"position":[[112,15],[318,15]]},"185":{"position":[[101,15]]}}}],["assert(option_3",{"_index":1112,"t":{"179":{"position":[[134,15],[340,15]]},"185":{"position":[[123,15]]}}}],["assert(option_4",{"_index":1115,"t":{"179":{"position":[[362,15]]}}}],["assert(runtim",{"_index":1008,"t":{"126":{"position":[[283,14],[538,14]]}}}],["assert(s:lower(1",{"_index":2135,"t":{"623":{"position":[[113,17]]}}}],["assert(s:starttls(\"pluto",{"_index":2262,"t":{"689":{"position":[[615,24]]}}}],["assert(s:upper(1",{"_index":2134,"t":{"621":{"position":[[109,17]]}}}],["assert(sam",{"_index":2370,"t":{"753":{"position":[[209,11]]}}}],["assert(table.contains(t",{"_index":2363,"t":{"749":{"position":[[203,24],[237,24],[281,24]]}}}],["assert(table.isfrozen(t",{"_index":2362,"t":{"747":{"position":[[99,24]]}}}],["assert(type(decod",{"_index":1870,"t":{"475":{"position":[[762,20],[965,20]]}}}],["assert.equ",{"_index":493,"t":{"37":{"position":[[274,12]]},"421":{"position":[[584,14],[811,14]]}}}],["assert.equal(\"hello",{"_index":1708,"t":{"421":{"position":[[480,20]]}}}],["assert.equal(\"hi",{"_index":1710,"t":{"421":{"position":[[692,16]]}}}],["assert.equal(t1:reord",{"_index":2375,"t":{"757":{"position":[[220,26]]}}}],["assert.falsi",{"_index":1694,"t":{"415":{"position":[[375,14]]}}}],["assert.falsy(\"hello",{"_index":1693,"t":{"415":{"position":[[290,20]]}}}],["assert.falsy(fals",{"_index":1692,"t":{"415":{"position":[[259,19]]}}}],["assert.falsy(nil",{"_index":1691,"t":{"415":{"position":[[230,17]]}}}],["assert.great",{"_index":1723,"t":{"429":{"position":[[334,16]]}}}],["assert.greater(3",{"_index":1722,"t":{"429":{"position":[[226,17],[258,17]]}}}],["assert.greatereq(3",{"_index":1724,"t":{"431":{"position":[[250,19],[284,19]]}}}],["assert.haserror",{"_index":1732,"t":{"435":{"position":[[437,17]]}}}],["assert.haserror(error",{"_index":1730,"t":{"435":{"position":[[296,22]]}}}],["assert.haserror(tostr",{"_index":1731,"t":{"435":{"position":[[351,25]]}}}],["assert.isfals",{"_index":1690,"t":{"413":{"position":[[290,16]]}}}],["assert.isfalse(fals",{"_index":1688,"t":{"413":{"position":[[181,21]]}}}],["assert.isfalse(tru",{"_index":1689,"t":{"413":{"position":[[214,20]]}}}],["assert.isnil",{"_index":1680,"t":{"409":{"position":[[271,14]]}}}],["assert.isnil(5",{"_index":1679,"t":{"409":{"position":[[207,15]]}}}],["assert.isnil(nil",{"_index":1678,"t":{"409":{"position":[[178,17]]}}}],["assert.istru",{"_index":1687,"t":{"411":{"position":[[284,15]]}}}],["assert.istrue(fals",{"_index":1686,"t":{"411":{"position":[[208,20]]}}}],["assert.istrue(tru",{"_index":1685,"t":{"411":{"position":[[177,19]]}}}],["assert.less",{"_index":1718,"t":{"425":{"position":[[321,13]]}}}],["assert.less(1",{"_index":1717,"t":{"425":{"position":[[219,14],[248,14]]}}}],["assert.lesseq",{"_index":1720,"t":{"427":{"position":[[349,15]]}}}],["assert.lesseq(1",{"_index":1719,"t":{"427":{"position":[[243,16],[274,16]]}}}],["assert.nequ",{"_index":494,"t":{"37":{"position":[[289,13]]}}}],["assert.nequal(\"hello",{"_index":1714,"t":{"423":{"position":[[480,21]]}}}],["assert.nequal(\"hi",{"_index":1715,"t":{"423":{"position":[[536,17]]}}}],["assert.noerror",{"_index":1729,"t":{"433":{"position":[[431,16]]}}}],["assert.noerror(error",{"_index":1728,"t":{"433":{"position":[[333,21]]}}}],["assert.noerror(tostr",{"_index":1726,"t":{"433":{"position":[[292,24]]}}}],["assert.notnil",{"_index":1702,"t":{"419":{"position":[[295,15]]}}}],["assert.notnil(\"hello",{"_index":1700,"t":{"419":{"position":[[179,21]]}}}],["assert.notnil(nil",{"_index":1701,"t":{"419":{"position":[[221,18]]}}}],["assert.searcherror",{"_index":1735,"t":{"437":{"position":[[659,20],[910,20]]}}}],["assert.searcherror(\"argu",{"_index":1733,"t":{"437":{"position":[[487,30],[724,30],[794,30]]}}}],["assert.searcherror(\"someth",{"_index":1734,"t":{"437":{"position":[[557,31]]}}}],["assert.truthi",{"_index":1699,"t":{"417":{"position":[[461,15]]}}}],["assert.truthy(\"hello",{"_index":1697,"t":{"417":{"position":[[345,21]]}}}],["assert.truthy(nil",{"_index":1698,"t":{"417":{"position":[[387,18]]}}}],["assign",{"_index":539,"t":{"39":{"position":[[1340,8]]},"43":{"position":[[364,10]]},"128":{"position":[[244,8],[359,8]]},"141":{"position":[[292,8]]},"143":{"position":[[279,8]]},"203":{"position":[[33,6]]},"205":{"position":[[83,6]]},"207":{"position":[[99,6]]},"209":{"position":[[59,6]]},"241":{"position":[[62,9]]},"249":{"position":[[51,6]]},"258":{"position":[[507,11]]},"299":{"position":[[660,11]]},"301":{"position":[[42,11],[132,8],[173,8],[326,8],[367,8]]}}}],["associ",{"_index":1319,"t":{"264":{"position":[[348,10]]}}}],["assum",{"_index":997,"t":{"122":{"position":[[356,8]]},"205":{"position":[[0,8]]},"207":{"position":[[0,8]]},"209":{"position":[[0,8]]},"473":{"position":[[731,8]]}}}],["attempt",{"_index":859,"t":{"85":{"position":[[358,8]]},"97":{"position":[[107,9]]},"256":{"position":[[150,8],[369,8]]},"264":{"position":[[269,7],[458,7],[529,7],[610,7],[857,7]]},"463":{"position":[[680,7]]},"689":{"position":[[0,8]]}}}],["attribut",{"_index":396,"t":{"33":{"position":[[237,9],[681,9]]},"39":{"position":[[1238,10]]},"57":{"position":[[18,9]]},"128":{"position":[[160,10]]},"151":{"position":[[135,9]]},"701":{"position":[[259,10]]},"703":{"position":[[191,10],[489,14]]}}}],["augment",{"_index":1865,"t":{"475":{"position":[[244,7]]}}}],["authent",{"_index":2083,"t":{"602":{"position":[[5,13],[120,14]]},"604":{"position":[[153,13],[358,14]]},"606":{"position":[[81,13],[229,14],[343,14]]}}}],["automat",{"_index":724,"t":{"57":{"position":[[270,13]]},"195":{"position":[[34,13],[324,13],[555,13]]},"233":{"position":[[326,13]]},"245":{"position":[[336,14]]},"469":{"position":[[162,13]]},"679":{"position":[[49,13]]}}}],["avail",{"_index":960,"t":{"112":{"position":[[9,9]]},"126":{"position":[[578,9]]},"183":{"position":[[264,10]]},"297":{"position":[[37,9]]},"323":{"position":[[339,9]]},"359":{"position":[[18,9]]},"363":{"position":[[802,10]]},"451":{"position":[[277,11],[1029,12]]},"453":{"position":[[328,11],[442,12]]},"463":{"position":[[1708,9]]},"465":{"position":[[38,9],[83,9]]},"511":{"position":[[22,9]]},"673":{"position":[[50,9]]}}}],["avoid",{"_index":474,"t":{"33":{"position":[[2498,5]]},"85":{"position":[[352,5]]},"139":{"position":[[288,5]]},"153":{"position":[[388,5]]},"155":{"position":[[338,5]]},"157":{"position":[[335,5]]},"233":{"position":[[475,5]]},"463":{"position":[[1414,5]]}}}],["awar",{"_index":1520,"t":{"317":{"position":[[272,5]]}}}],["away",{"_index":2379,"t":{"763":{"position":[[8,4]]}}}],["axi",{"_index":2315,"t":{"719":{"position":[[21,4]]},"721":{"position":[[21,4]]},"725":{"position":[[41,4]]},"729":{"position":[[101,4],[201,4],[228,4]]}}}],["b",{"_index":361,"t":{"31":{"position":[[89,1],[136,1]]},"147":{"position":[[104,2]]},"163":{"position":[[140,2],[166,1]]},"195":{"position":[[153,2],[167,1],[275,2],[289,1],[506,2],[520,1]]},"199":{"position":[[392,4],[484,3]]},"205":{"position":[[124,2],[186,2],[240,2]]},"213":{"position":[[508,2],[540,3],[566,1]]},"215":{"position":[[132,2],[158,1],[395,2],[437,1]]},"258":{"position":[[568,2],[597,2]]},"268":{"position":[[128,1],[154,1],[196,1],[204,1]]},"270":{"position":[[76,1],[87,1]]},"290":{"position":[[143,2]]},"347":{"position":[[30,1],[166,1]]},"349":{"position":[[38,2],[53,1],[167,2],[182,1]]},"473":{"position":[[616,4],[635,1]]}}}],["backup",{"_index":1882,"t":{"483":{"position":[[306,6],[354,6]]}}}],["backup_cfg/config.txt",{"_index":1880,"t":{"483":{"position":[[244,26]]}}}],["backward",{"_index":1127,"t":{"193":{"position":[[393,9]]},"201":{"position":[[257,9]]},"229":{"position":[[557,9]]},"339":{"position":[[538,9]]},"729":{"position":[[978,8]]}}}],["bad",{"_index":1057,"t":{"149":{"position":[[163,3],[247,4]]},"327":{"position":[[348,3]]},"459":{"position":[[170,6]]},"657":{"position":[[1195,4]]}}}],["banana",{"_index":1044,"t":{"141":{"position":[[144,8],[232,8]]},"286":{"position":[[167,8]]},"751":{"position":[[239,8]]}}}],["bar",{"_index":1916,"t":{"503":{"position":[[326,5]]},"741":{"position":[[158,5]]},"743":{"position":[[105,5]]}}}],["base",{"_index":1113,"t":{"179":{"position":[[182,4]]},"282":{"position":[[50,5]]},"445":{"position":[[255,5]]},"495":{"position":[[165,5]]},"511":{"position":[[85,5]]},"588":{"position":[[79,5]]},"627":{"position":[[17,4]]},"729":{"position":[[26,5]]},"731":{"position":[[26,5]]},"733":{"position":[[27,5]]}}}],["base32",{"_index":481,"t":{"35":{"position":[[131,6]]},"67":{"position":[[635,6]]},"126":{"position":[[632,6]]},"355":{"position":[[19,6]]},"357":{"position":[[18,6],[64,6]]}}}],["base32.encod",{"_index":457,"t":{"33":{"position":[[2059,13]]}}}],["base58",{"_index":615,"t":{"39":{"position":[[3624,6]]},"67":{"position":[[622,6]]},"126":{"position":[[639,6]]}}}],["base64",{"_index":482,"t":{"35":{"position":[[140,6]]},"67":{"position":[[609,6]]},"126":{"position":[[646,6]]},"211":{"position":[[121,7]]},"367":{"position":[[10,6],[149,6]]},"369":{"position":[[18,6],[64,6],[89,6]]},"371":{"position":[[90,7],[215,6]]},"373":{"position":[[78,6],[103,6]]},"613":{"position":[[267,7]]},"617":{"position":[[292,7]]}}}],["base64.decod",{"_index":1648,"t":{"373":{"position":[[11,13]]}}}],["base64.encod",{"_index":456,"t":{"33":{"position":[[2043,13]]}}}],["base64.url_decod",{"_index":599,"t":{"39":{"position":[[3059,17]]}}}],["base64.url_encod",{"_index":598,"t":{"39":{"position":[[3039,17]]}}}],["base64.urldecod",{"_index":600,"t":{"39":{"position":[[3099,16]]}}}],["base64.urlencod",{"_index":460,"t":{"33":{"position":[[2134,17]]},"39":{"position":[[3080,16]]}}}],["base64url",{"_index":1645,"t":{"371":{"position":[[10,9]]},"373":{"position":[[36,10]]}}}],["basi",{"_index":1502,"t":{"313":{"position":[[71,6]]}}}],["basic",{"_index":1264,"t":{"256":{"position":[[210,5]]},"475":{"position":[[639,5]]},"659":{"position":[[393,5]]}}}],["batch",{"_index":988,"t":{"118":{"position":[[127,5]]}}}],["battl",{"_index":4,"t":{"2":{"position":[[40,6]]}}}],["bce8c9aca4120776fad6b517874aa09c46405454",{"_index":2030,"t":{"579":{"position":[[271,43]]}}}],["bcryptgenrandom",{"_index":2045,"t":{"588":{"position":[[136,16]]}}}],["be",{"_index":307,"t":{"27":{"position":[[24,5]]},"29":{"position":[[204,5]]},"31":{"position":[[309,5],[503,5],[656,5]]},"33":{"position":[[784,5],[838,5]]},"35":{"position":[[161,5]]},"37":{"position":[[452,5]]},"39":{"position":[[1089,5]]},"47":{"position":[[141,5]]},"51":{"position":[[253,5]]},"61":{"position":[[293,5],[353,5]]},"63":{"position":[[175,5]]},"95":{"position":[[82,5]]},"189":{"position":[[188,5]]},"270":{"position":[[273,5]]},"278":{"position":[[400,5]]},"695":{"position":[[180,5]]},"725":{"position":[[46,5]]}}}],["becom",{"_index":1540,"t":{"325":{"position":[[132,7]]},"737":{"position":[[150,8]]},"757":{"position":[[44,7]]}}}],["befor",{"_index":34,"t":{"7":{"position":[[29,6]]},"49":{"position":[[625,6]]},"59":{"position":[[180,6]]},"126":{"position":[[147,6]]},"159":{"position":[[338,6]]},"169":{"position":[[81,6]]},"266":{"position":[[202,6]]},"659":{"position":[[302,6],[457,7],[640,7]]},"753":{"position":[[250,7]]}}}],["begin",{"_index":672,"t":{"49":{"position":[[617,7]]},"179":{"position":[[51,5],[239,5]]},"181":{"position":[[97,5]]},"183":{"position":[[128,5]]},"185":{"position":[[40,5]]},"323":{"position":[[753,10]]},"657":{"position":[[328,9]]}}}],["behav",{"_index":1105,"t":{"177":{"position":[[243,7]]},"268":{"position":[[20,6]]}}}],["behavior",{"_index":379,"t":{"31":{"position":[[565,8]]},"41":{"position":[[17,8]]},"49":{"position":[[1096,8]]},"71":{"position":[[152,8]]},"79":{"position":[[639,9]]},"449":{"position":[[322,8]]}}}],["benefici",{"_index":1579,"t":{"333":{"position":[[272,10]]}}}],["benefit",{"_index":1200,"t":{"229":{"position":[[477,7]]}}}],["benign",{"_index":1542,"t":{"327":{"position":[[49,6]]}}}],["besid",{"_index":1091,"t":{"171":{"position":[[237,7]]},"343":{"position":[[333,7]]}}}],["better",{"_index":116,"t":{"11":{"position":[[417,6]]},"203":{"position":[[19,6]]},"327":{"position":[[773,6]]},"503":{"position":[[476,7]]}}}],["between",{"_index":1979,"t":{"548":{"position":[[118,7]]},"554":{"position":[[119,7]]},"556":{"position":[[118,7]]},"558":{"position":[[177,7]]},"564":{"position":[[121,7]]},"566":{"position":[[121,7]]},"568":{"position":[[121,7]]},"570":{"position":[[122,7]]}}}],["beyond",{"_index":2178,"t":{"657":{"position":[[187,6]]}}}],["big",{"_index":648,"t":{"43":{"position":[[254,4]]}}}],["bigint",{"_index":415,"t":{"33":{"position":[[1008,8]]},"39":{"position":[[2507,6]]},"377":{"position":[[17,7],[125,7],[145,6]]},"379":{"position":[[81,6]]},"381":{"position":[[45,7],[65,6]]},"383":{"position":[[40,7],[60,6]]},"385":{"position":[[9,7],[41,7]]},"387":{"position":[[28,8],[51,7]]},"389":{"position":[[31,8],[54,7]]},"391":{"position":[[25,8],[50,8],[95,6]]},"393":{"position":[[25,8],[48,6],[86,6]]},"395":{"position":[[24,8],[47,6],[86,6]]},"397":{"position":[[32,8],[55,7],[75,6]]},"399":{"position":[[85,6]]},"609":{"position":[[291,6]]},"613":{"position":[[275,7]]},"617":{"position":[[300,7]]},"657":{"position":[[157,6]]}}}],["bigint(\"115443384115231951475820445136871322101870729500298182134363293112660251666017",{"_index":2110,"t":{"613":{"position":[[335,89]]},"617":{"position":[[360,89]]}}}],["bigint(\"123",{"_index":1654,"t":{"377":{"position":[[187,14]]}}}],["bigint(\"420\"):binari",{"_index":1658,"t":{"383":{"position":[[102,23]]}}}],["bigint(\"420\"):hex",{"_index":1656,"t":{"381":{"position":[[107,20]]}}}],["bigint(\"98365361248415863235179644468056200977592391948608651522703704315152579004021",{"_index":2111,"t":{"613":{"position":[[433,88]]},"617":{"position":[[458,88]]}}}],["bigint(0x10001",{"_index":2115,"t":{"613":{"position":[[747,15]]},"617":{"position":[[772,15]]}}}],["bigint(10",{"_index":1664,"t":{"393":{"position":[[128,10]]},"395":{"position":[[128,10]]},"397":{"position":[[133,11]]}}}],["bigint(10):div(new",{"_index":1662,"t":{"391":{"position":[[137,18]]}}}],["bigint(2",{"_index":1667,"t":{"397":{"position":[[117,9]]}}}],["bigint(3",{"_index":1663,"t":{"391":{"position":[[156,11]]},"393":{"position":[[145,10]]},"395":{"position":[[145,10]]}}}],["bigint(420):bitlength",{"_index":1671,"t":{"399":{"position":[[127,24]]}}}],["bigint.new",{"_index":1651,"t":{"377":{"position":[[42,10]]}}}],["binari",{"_index":301,"t":{"25":{"position":[[494,6]]},"33":{"position":[[1855,6]]},"35":{"position":[[167,6]]},"67":{"position":[[117,6]]},"103":{"position":[[23,8]]},"108":{"position":[[566,8]]},"112":{"position":[[77,8]]},"116":{"position":[[507,8]]},"118":{"position":[[191,8]]},"120":{"position":[[111,8]]},"122":{"position":[[162,8]]},"227":{"position":[[158,6]]},"383":{"position":[[11,6]]},"579":{"position":[[125,6]]},"581":{"position":[[127,6]]},"583":{"position":[[127,6]]},"585":{"position":[[127,6]]}}}],["bind",{"_index":2272,"t":{"697":{"position":[[234,4]]}}}],["bit",{"_index":774,"t":{"61":{"position":[[313,3]]},"399":{"position":[[49,3]]},"592":{"position":[[228,3]]},"594":{"position":[[229,3]]},"598":{"position":[[196,3]]},"600":{"position":[[197,3]]},"604":{"position":[[260,3]]},"606":{"position":[[165,3]]},"609":{"position":[[34,4],[73,3]]}}}],["bitshift",{"_index":1438,"t":{"297":{"position":[[441,8],[460,8]]}}}],["bitwis",{"_index":1437,"t":{"297":{"position":[[170,7],[186,7],[201,7]]},"475":{"position":[[308,7]]}}}],["block",{"_index":170,"t":{"13":{"position":[[1000,5]]},"37":{"position":[[147,6]]},"43":{"position":[[244,5]]},"145":{"position":[[22,5]]},"159":{"position":[[66,6]]},"195":{"position":[[366,6]]},"272":{"position":[[7,6]]},"274":{"position":[[945,6]]},"278":{"position":[[111,7],[286,6]]},"282":{"position":[[320,5]]},"463":{"position":[[1826,7]]},"465":{"position":[[366,6]]},"467":{"position":[[79,8]]},"596":{"position":[[105,6],[143,7]]},"675":{"position":[[304,7]]},"685":{"position":[[361,5]]},"689":{"position":[[515,7]]},"695":{"position":[[383,8]]},"697":{"position":[[126,5]]}}}],["bodi",{"_index":400,"t":{"33":{"position":[[333,6]]},"39":{"position":[[736,4]]},"49":{"position":[[632,4]]},"213":{"position":[[463,6]]},"463":{"position":[[434,5],[1497,4],[2255,5]]},"703":{"position":[[1073,6],[1232,7]]}}}],["boilerpl",{"_index":1246,"t":{"249":{"position":[[144,12]]}}}],["bool",{"_index":55,"t":{"7":{"position":[[373,4]]},"487":{"position":[[147,4],[172,4]]},"489":{"position":[[145,4],[171,4]]},"499":{"position":[[100,4]]},"761":{"position":[[176,4]]},"763":{"position":[[401,4]]},"767":{"position":[[162,4]]}}}],["boolean",{"_index":1302,"t":{"260":{"position":[[655,7]]},"295":{"position":[[147,7]]},"331":{"position":[[32,7]]},"443":{"position":[[19,7]]},"473":{"position":[[47,8]]},"475":{"position":[[59,8]]},"483":{"position":[[151,7]]},"487":{"position":[[53,7]]},"489":{"position":[[53,7]]},"491":{"position":[[53,7]]},"493":{"position":[[75,7]]},"495":{"position":[[85,7]]},"617":{"position":[[214,7]]},"651":{"position":[[278,7]]},"659":{"position":[[142,7]]}}}],["boolean/bool",{"_index":1424,"t":{"292":{"position":[[24,12]]}}}],["boom",{"_index":1948,"t":{"519":{"position":[[602,5]]}}}],["boost",{"_index":1570,"t":{"329":{"position":[[181,6]]}}}],["botanist",{"_index":1408,"t":{"286":{"position":[[312,11],[450,11]]}}}],["both",{"_index":1417,"t":{"288":{"position":[[103,4]]},"329":{"position":[[230,4]]},"421":{"position":[[85,4]]},"423":{"position":[[89,4]]},"469":{"position":[[113,5]]},"590":{"position":[[37,4]]},"629":{"position":[[32,4]]},"741":{"position":[[54,4]]},"763":{"position":[[18,5]]}}}],["bottleneck",{"_index":133,"t":{"13":{"position":[[244,10]]}}}],["box",{"_index":684,"t":{"49":{"position":[[1166,3]]}}}],["bracket",{"_index":1300,"t":{"260":{"position":[[498,8]]}}}],["break",{"_index":174,"t":{"13":{"position":[[1084,8]]},"19":{"position":[[122,5],[178,5]]},"31":{"position":[[358,5]]},"33":{"position":[[2504,8]]},"35":{"position":[[81,5]]},"39":{"position":[[1907,5]]},"69":{"position":[[178,7]]},"85":{"position":[[240,5]]},"132":{"position":[[111,6],[147,8],[225,5],[257,7],[369,5],[390,5],[409,5],[430,5]]},"149":{"position":[[229,5]]},"171":{"position":[[26,6]]},"274":{"position":[[74,5],[116,5],[129,5],[292,5],[348,5],[438,5],[839,5],[1001,5]]},"276":{"position":[[113,5],[219,5],[252,5],[507,5],[577,5]]},"297":{"position":[[434,6]]},"301":{"position":[[607,5]]},"697":{"position":[[308,5]]}}}],["browser",{"_index":918,"t":{"101":{"position":[[114,7]]}}}],["buffer",{"_index":2243,"t":{"685":{"position":[[265,9]]},"687":{"position":[[51,7]]}}}],["bug",{"_index":387,"t":{"31":{"position":[[809,4]]},"39":{"position":[[1521,4]]},"55":{"position":[[384,4]]},"69":{"position":[[158,4]]},"87":{"position":[[8,3]]},"274":{"position":[[516,4]]},"292":{"position":[[545,5]]}}}],["bugfix",{"_index":653,"t":{"43":{"position":[[456,8]]},"83":{"position":[[0,7]]},"91":{"position":[[841,8]]}}}],["build",{"_index":30,"t":{"5":{"position":[[103,5]]},"7":{"position":[[271,5]]},"11":{"position":[[161,5]]},"17":{"position":[[69,5]]},"23":{"position":[[321,5]]},"27":{"position":[[706,6]]},"53":{"position":[[401,5]]},"59":{"position":[[56,8]]},"114":{"position":[[219,5]]},"118":{"position":[[119,5],[133,5],[178,8]]},"122":{"position":[[23,5],[103,5]]},"130":{"position":[[73,6],[96,6]]},"282":{"position":[[400,5]]},"327":{"position":[[631,5]]},"333":{"position":[[451,5]]},"351":{"position":[[124,5]]},"463":{"position":[[623,6],[922,6],[1273,6],[1589,6],[1726,6],[1842,6]]},"465":{"position":[[101,6]]},"467":{"position":[[128,6]]},"673":{"position":[[68,6]]}}}],["built",{"_index":822,"t":{"73":{"position":[[298,5]]},"103":{"position":[[17,5]]},"401":{"position":[[88,5]]},"439":{"position":[[85,5]]},"477":{"position":[[81,5]]},"525":{"position":[[83,5]]},"533":{"position":[[81,5]]},"619":{"position":[[85,5]]},"735":{"position":[[84,5]]}}}],["bundl",{"_index":1395,"t":{"284":{"position":[[519,8],[600,8]]}}}],["burden",{"_index":571,"t":{"39":{"position":[[2445,8]]},"463":{"position":[[1420,9]]},"649":{"position":[[108,8]]}}}],["buster",{"_index":944,"t":{"108":{"position":[[278,6],[537,8]]}}}],["bvar",{"_index":1572,"t":{"331":{"position":[[110,4],[212,5]]}}}],["by=/usr/share/keyrings/calam",{"_index":942,"t":{"108":{"position":[[196,31]]}}}],["bypass",{"_index":43,"t":{"7":{"position":[[128,6]]},"9":{"position":[[196,6],[451,9]]}}}],["byte",{"_index":803,"t":{"69":{"position":[[309,5]]},"505":{"position":[[28,6]]},"635":{"position":[[199,4]]}}}],["bytecod",{"_index":27,"t":{"5":{"position":[[38,8]]},"27":{"position":[[343,8]]},"37":{"position":[[90,8]]},"39":{"position":[[1960,9]]},"41":{"position":[[262,8]]},"51":{"position":[[46,8]]},"95":{"position":[[137,9]]},"157":{"position":[[87,10],[196,9],[286,8]]},"167":{"position":[[549,9],[618,8]]},"193":{"position":[[360,8]]},"201":{"position":[[225,8]]},"229":{"position":[[525,8]]},"251":{"position":[[577,9]]},"317":{"position":[[29,8]]},"339":{"position":[[506,8]]}}}],["c",{"_index":54,"t":{"7":{"position":[[369,3]]},"9":{"position":[[326,1]]},"31":{"position":[[96,2],[140,2]]},"33":{"position":[[2261,2],[2465,3]]},"59":{"position":[[70,1]]},"67":{"position":[[147,1]]},"114":{"position":[[66,3]]},"147":{"position":[[107,2]]},"205":{"position":[[131,1],[189,1],[243,2]]},"213":{"position":[[250,3]]},"237":{"position":[[321,1]]},"258":{"position":[[571,1],[600,2]]},"268":{"position":[[61,2]]},"321":{"position":[[246,1]]},"327":{"position":[[425,4]]},"349":{"position":[[41,2],[63,2],[170,2],[192,2]]},"409":{"position":[[341,4],[454,4]]},"411":{"position":[[360,4],[501,4]]},"413":{"position":[[367,4],[508,4]]},"415":{"position":[[479,4],[620,4]]},"417":{"position":[[547,4],[688,4]]},"419":{"position":[[372,4],[513,4]]},"449":{"position":[[135,1]]},"453":{"position":[[196,1]]},"473":{"position":[[621,3],[642,1]]},"657":{"position":[[1233,4],[1297,4]]}}}],["c/c",{"_index":833,"t":{"79":{"position":[[287,6]]}}}],["c:\\users\\username\\desktop\\project\\a\\b\\c",{"_index":1904,"t":{"497":{"position":[[173,41]]}}}],["c:\\users\\username\\desktop\\project\\cfg\\cfg.txt",{"_index":1909,"t":{"499":{"position":[[275,47]]}}}],["c:resum",{"_index":1748,"t":{"449":{"position":[[215,10]]}}}],["cach",{"_index":251,"t":{"23":{"position":[[107,6]]},"91":{"position":[[656,5]]},"335":{"position":[[11,5],[84,5],[221,5]]}}}],["calam",{"_index":1381,"t":{"284":{"position":[[69,8],[373,8]]}}}],["call",{"_index":127,"t":{"13":{"position":[[143,4],[352,6],[537,5]]},"19":{"position":[[488,4],[501,4]]},"29":{"position":[[103,5]]},"31":{"position":[[180,4],[601,5]]},"37":{"position":[[191,5]]},"39":{"position":[[207,6]]},"43":{"position":[[303,5]]},"45":{"position":[[163,4]]},"53":{"position":[[177,5]]},"57":{"position":[[842,5]]},"77":{"position":[[171,4]]},"126":{"position":[[42,6],[167,5]]},"205":{"position":[[114,6]]},"237":{"position":[[88,4]]},"245":{"position":[[83,4],[329,6],[416,4],[622,6]]},"258":{"position":[[80,5]]},"266":{"position":[[184,4]]},"276":{"position":[[293,5]]},"297":{"position":[[612,4]]},"309":{"position":[[39,5]]},"329":{"position":[[284,7]]},"339":{"position":[[94,4]]},"343":{"position":[[465,5]]},"377":{"position":[[33,4]]},"409":{"position":[[444,9]]},"411":{"position":[[463,9]]},"413":{"position":[[470,9]]},"415":{"position":[[582,9]]},"417":{"position":[[650,9]]},"419":{"position":[[475,9]]},"433":{"position":[[51,7]]},"435":{"position":[[47,7]]},"459":{"position":[[0,5]]},"463":{"position":[[1760,6],[1870,6]]},"465":{"position":[[293,6]]},"467":{"position":[[181,6]]},"519":{"position":[[86,5]]},"521":{"position":[[135,7]]},"675":{"position":[[238,6]]},"679":{"position":[[215,6]]},"681":{"position":[[33,7]]},"689":{"position":[[449,6]]},"693":{"position":[[35,7]]},"695":{"position":[[352,6]]},"697":{"position":[[90,4]]},"715":{"position":[[86,4]]},"761":{"position":[[138,6]]}}}],["callback",{"_index":1725,"t":{"433":{"position":[[13,8],[71,8],[177,9],[227,8]]},"435":{"position":[[13,8],[67,8],[173,9],[223,8]]},"437":{"position":[[13,8],[177,8],[283,9],[334,8],[368,8]]},"679":{"position":[[184,8]]},"751":{"position":[[69,8]]},"761":{"position":[[123,8],[188,8]]},"763":{"position":[[92,9],[255,8],[413,8]]},"767":{"position":[[49,8],[95,8],[174,8]]},"771":{"position":[[148,8]]},"777":{"position":[[110,8]]}}}],["can't",{"_index":1521,"t":{"319":{"position":[[113,5]]},"341":{"position":[[171,5]]}}}],["canari",{"_index":2126,"t":{"617":{"position":[[824,6]]}}}],["canon",{"_index":1906,"t":{"499":{"position":[[144,9]]}}}],["canonic",{"_index":589,"t":{"39":{"position":[[2930,13]]},"499":{"position":[[127,14]]}}}],["capabl",{"_index":77,"t":{"9":{"position":[[103,10]]}}}],["capit",{"_index":2133,"t":{"621":{"position":[[73,11]]},"655":{"position":[[38,15]]}}}],["captur",{"_index":2166,"t":{"649":{"position":[[130,7]]}}}],["care",{"_index":1562,"t":{"327":{"position":[[847,4]]},"767":{"position":[[690,4]]}}}],["carri",{"_index":1821,"t":{"463":{"position":[[1339,5]]}}}],["carrier",{"_index":2257,"t":{"689":{"position":[[86,7]]}}}],["case",{"_index":152,"t":{"13":{"position":[[667,5]]},"19":{"position":[[64,4],[72,4],[80,4],[88,4],[96,4]]},"25":{"position":[[313,4],[451,4]]},"27":{"position":[[433,5]]},"31":{"position":[[497,5]]},"33":{"position":[[778,5]]},"39":{"position":[[100,4],[915,5],[1893,5]]},"55":{"position":[[124,5],[149,5],[189,6]]},"59":{"position":[[187,4]]},"61":{"position":[[420,5]]},"67":{"position":[[308,6]]},"73":{"position":[[173,4]]},"79":{"position":[[229,4]]},"130":{"position":[[286,5]]},"159":{"position":[[103,4],[127,4],[243,4],[271,4],[302,4],[350,4],[532,4],[572,4]]},"245":{"position":[[105,4]]},"270":{"position":[[232,5]]},"272":{"position":[[54,4]]},"274":{"position":[[38,4],[80,4],[234,4],[242,4],[250,4],[258,4],[266,4],[388,5],[414,4],[559,4],[595,4],[718,4],[756,5],[823,4],[831,4],[910,4],[1033,6]]},"276":{"position":[[35,4],[72,4],[192,4],[225,4],[407,4],[450,5],[513,4]]},"278":{"position":[[106,4],[165,4],[181,4],[197,4],[281,4],[545,4],[567,4],[695,4]]},"284":{"position":[[618,4]]},"286":{"position":[[144,4],[162,4],[181,4],[200,4],[219,4],[237,4],[260,4]]},"317":{"position":[[217,6]]},"519":{"position":[[188,4]]},"523":{"position":[[167,4]]}}}],["cat",{"_index":304,"t":{"25":{"position":[[517,3]]},"33":{"position":[[924,5]]},"359":{"position":[[4,3]]},"361":{"position":[[20,4],[67,4],[84,3]]},"363":{"position":[[33,3],[66,3],[204,3],[825,3],[1053,3]]}}}],["cat.decod",{"_index":1623,"t":{"363":{"position":[[243,10]]}}}],["cat.encod",{"_index":1616,"t":{"361":{"position":[[110,10]]}}}],["catch",{"_index":1410,"t":{"286":{"position":[[410,5]]},"288":{"position":[[85,5]]},"319":{"position":[[91,5]]},"323":{"position":[[650,5]]},"469":{"position":[[230,5]]}}}],["caus",{"_index":238,"t":{"19":{"position":[[670,7]]},"25":{"position":[[209,7]]},"31":{"position":[[670,5]]},"43":{"position":[[324,7]]},"59":{"position":[[203,7]]},"149":{"position":[[82,5]]},"167":{"position":[[122,6]]},"215":{"position":[[37,7]]}}}],["caution",{"_index":1096,"t":{"171":{"position":[[355,7]]},"201":{"position":[[213,7]]},"229":{"position":[[513,7]]},"233":{"position":[[372,7]]},"266":{"position":[[122,7]]},"339":{"position":[[494,7]]}}}],["cbc",{"_index":2058,"t":{"592":{"position":[[57,3],[115,4]]},"594":{"position":[[58,3],[116,4],[609,3],[692,3]]}}}],["cd",{"_index":970,"t":{"114":{"position":[[176,2]]},"122":{"position":[[125,2]]}}}],["certain",{"_index":1003,"t":{"126":{"position":[[0,7]]},"130":{"position":[[12,7],[65,7]]},"134":{"position":[[44,7]]},"165":{"position":[[85,7]]}}}],["certif",{"_index":2259,"t":{"689":{"position":[[266,11]]}}}],["cfb",{"_index":2060,"t":{"592":{"position":[[76,3],[128,4]]},"594":{"position":[[77,3],[129,4]]}}}],["cfg",{"_index":1900,"t":{"493":{"position":[[186,3],[232,3]]}}}],["cfg\\cfg.txt",{"_index":1911,"t":{"501":{"position":[[187,13]]}}}],["cfunc",{"_index":227,"t":{"19":{"position":[[506,5]]}}}],["chain",{"_index":697,"t":{"53":{"position":[[56,7]]}}}],["chanc",{"_index":1536,"t":{"323":{"position":[[1570,6]]}}}],["chang",{"_index":103,"t":{"11":{"position":[[261,7]]},"33":{"position":[[2073,7]]},"37":{"position":[[613,8]]},"39":{"position":[[1622,6]]},"55":{"position":[[364,7]]},"59":{"position":[[148,6]]},"71":{"position":[[44,7]]},"79":{"position":[[587,7]]},"85":{"position":[[414,8],[634,7]]},"139":{"position":[[626,6]]},"165":{"position":[[38,7]]},"167":{"position":[[182,6]]},"223":{"position":[[22,7]]},"323":{"position":[[8,6]]},"327":{"position":[[203,7]]},"401":{"position":[[24,7]]},"439":{"position":[[24,7]]},"477":{"position":[[24,7]]},"525":{"position":[[24,7]]},"533":{"position":[[24,7]]},"619":{"position":[[24,7]]},"735":{"position":[[24,7]]}}}],["changelog",{"_index":242,"t":{"21":{"position":[[23,10]]}}}],["changer",{"_index":1602,"t":{"345":{"position":[[174,8]]}}}],["char",{"_index":57,"t":{"7":{"position":[[402,5]]}}}],["charact",{"_index":884,"t":{"93":{"position":[[64,9]]},"229":{"position":[[32,10],[405,9]]},"625":{"position":[[174,10]]},"629":{"position":[[16,10],[100,10]]},"631":{"position":[[16,10],[104,10]]},"633":{"position":[[16,10],[105,10]]},"635":{"position":[[49,11],[204,11]]},"637":{"position":[[53,11],[182,10],[211,11]]},"639":{"position":[[54,11],[183,10],[213,11]]},"641":{"position":[[53,11],[182,10],[211,11]]},"643":{"position":[[56,11],[188,10],[220,11]]},"645":{"position":[[57,11]]},"651":{"position":[[127,10],[338,9]]},"657":{"position":[[77,11],[509,9],[1200,10]]}}}],["check",{"_index":529,"t":{"39":{"position":[[774,5],[1788,5],[3586,5]]},"116":{"position":[[46,5]]},"237":{"position":[[353,6]]},"251":{"position":[[39,5]]},"258":{"position":[[238,5]]},"284":{"position":[[563,5]]},"321":{"position":[[17,5]]},"327":{"position":[[915,9]]},"441":{"position":[[27,5]]},"443":{"position":[[45,5]]},"527":{"position":[[0,6],[53,6]]},"635":{"position":[[0,6],[87,6]]},"637":{"position":[[0,6],[91,6]]},"639":{"position":[[0,6],[92,6]]},"641":{"position":[[0,6],[91,6]]},"643":{"position":[[0,6],[94,6]]},"645":{"position":[[0,6],[95,6]]},"653":{"position":[[0,6],[67,6],[91,5]]},"661":{"position":[[0,6],[65,6],[96,5]]},"663":{"position":[[0,6],[67,6],[98,5]]},"697":{"position":[[0,6]]},"741":{"position":[[114,6]]},"747":{"position":[[0,6],[57,6]]},"749":{"position":[[0,6],[67,6],[89,5]]},"751":{"position":[[58,6],[103,8]]},"777":{"position":[[135,8]]}}}],["checkall(|x",{"_index":2408,"t":{"777":{"position":[[180,14],[278,14]]}}}],["cherri",{"_index":798,"t":{"69":{"position":[[105,6]]}}}],["child",{"_index":1618,"t":{"361":{"position":[[156,5],[223,6]]},"363":{"position":[[274,6],[471,8]]},"703":{"position":[[820,5]]}}}],["children",{"_index":1627,"t":{"363":{"position":[[417,12]]},"701":{"position":[[229,8],[298,8]]},"703":{"position":[[423,12],[555,12],[620,12],[969,12],[1244,12]]}}}],["choco",{"_index":925,"t":{"106":{"position":[[67,5]]}}}],["chocolatey",{"_index":924,"t":{"106":{"position":[[44,10]]}}}],["chunk",{"_index":1553,"t":{"327":{"position":[[506,5]]},"411":{"position":[[495,5]]},"413":{"position":[[502,5]]},"415":{"position":[[614,5]]},"417":{"position":[[682,5]]},"419":{"position":[[507,5]]},"657":{"position":[[1291,5]]},"685":{"position":[[104,5]]},"687":{"position":[[9,5]]}}}],["ciphertext",{"_index":2067,"t":{"594":{"position":[[23,10]]},"596":{"position":[[132,10]]},"600":{"position":[[110,10]]},"604":{"position":[[339,10]]},"606":{"position":[[23,10]]},"613":{"position":[[23,10]]}}}],["circumst",{"_index":1504,"t":{"315":{"position":[[29,13]]}}}],["clang",{"_index":707,"t":{"53":{"position":[[395,5]]},"116":{"position":[[238,5],[271,5],[305,5],[406,6]]},"333":{"position":[[61,5]]}}}],["clarifi",{"_index":357,"t":{"29":{"position":[[329,10]]}}}],["class",{"_index":315,"t":{"27":{"position":[[173,5]]},"33":{"position":[[1017,5],[1041,5]]},"37":{"position":[[44,5]]},"39":{"position":[[552,5],[574,7],[1037,6],[2258,5],[2278,5]]},"49":{"position":[[395,5]]},"57":{"position":[[178,6],[596,5],[883,7],[996,7],[1015,6],[1761,8]]},"95":{"position":[[276,8],[285,5]]},"155":{"position":[[89,5],[133,7],[194,5]]},"181":{"position":[[65,7],[84,5]]},"237":{"position":[[327,8]]},"239":{"position":[[4,5],[107,5],[274,5],[321,5],[340,5]]},"241":{"position":[[16,5],[107,5]]},"243":{"position":[[4,5],[69,5],[94,5]]},"245":{"position":[[170,5],[235,5]]},"247":{"position":[[108,5],[139,5]]},"249":{"position":[[163,5]]},"251":{"position":[[61,5],[97,8],[112,5],[129,5],[407,5]]},"253":{"position":[[94,5],[168,6]]},"319":{"position":[[67,5]]},"323":{"position":[[537,6],[622,6]]},"343":{"position":[[64,5],[222,5]]},"469":{"position":[[14,5]]},"511":{"position":[[14,5]]},"609":{"position":[[298,5]]},"709":{"position":[[81,6]]}}}],["classic",{"_index":1490,"t":{"305":{"position":[[860,11]]}}}],["claus",{"_index":1263,"t":{"256":{"position":[[128,7]]}}}],["clean",{"_index":1588,"t":{"337":{"position":[[129,5]]}}}],["cleaner",{"_index":1189,"t":{"229":{"position":[[57,7]]},"299":{"position":[[382,7]]}}}],["clear",{"_index":2358,"t":{"743":{"position":[[61,6]]}}}],["cli",{"_index":466,"t":{"33":{"position":[[2248,4]]},"116":{"position":[[134,3]]}}}],["click",{"_index":990,"t":{"118":{"position":[[153,5]]},"284":{"position":[[298,5]]}}}],["client",{"_index":2228,"t":{"679":{"position":[[77,7],[250,6]]},"681":{"position":[[56,9]]},"695":{"position":[[20,6],[237,6]]},"697":{"position":[[31,6]]}}}],["clone",{"_index":967,"t":{"114":{"position":[[109,5],[135,5]]},"118":{"position":[[27,7]]},"284":{"position":[[429,5]]}}}],["close",{"_index":374,"t":{"31":{"position":[[390,7]]},"39":{"position":[[876,6]]},"69":{"position":[[203,5]]},"315":{"position":[[100,6]]},"463":{"position":[[1362,5]]},"467":{"position":[[0,6],[44,7]]},"685":{"position":[[222,7]]},"689":{"position":[[375,7]]},"691":{"position":[[0,6]]}}}],["close\\r\\n\\r\\n",{"_index":2264,"t":{"689":{"position":[[756,15]]}}}],["close\\r\\ncont",{"_index":2234,"t":{"679":{"position":[[447,16]]}}}],["coalesc",{"_index":320,"t":{"27":{"position":[[262,10],[316,10]]},"85":{"position":[[183,10]]},"256":{"position":[[736,10]]},"297":{"position":[[503,11]]},"299":{"position":[[8,10]]}}}],["code",{"_index":51,"t":{"7":{"position":[[341,5]]},"11":{"position":[[198,4]]},"19":{"position":[[20,5],[652,4]]},"23":{"position":[[406,4]]},"31":{"position":[[245,4],[750,4]]},"35":{"position":[[66,4]]},"37":{"position":[[120,4]]},"39":{"position":[[1837,4],[1941,5]]},"41":{"position":[[246,4]]},"45":{"position":[[69,5]]},"49":{"position":[[1043,4]]},"55":{"position":[[97,4]]},"61":{"position":[[233,4]]},"73":{"position":[[63,4]]},"79":{"position":[[173,5]]},"95":{"position":[[130,4]]},"101":{"position":[[92,4]]},"124":{"position":[[74,4]]},"126":{"position":[[395,4]]},"130":{"position":[[20,4]]},"145":{"position":[[31,4],[167,4],[185,5],[242,4]]},"149":{"position":[[24,4]]},"151":{"position":[[24,4]]},"153":{"position":[[24,4],[218,5]]},"157":{"position":[[24,4]]},"165":{"position":[[93,4]]},"169":{"position":[[42,5]]},"171":{"position":[[204,4],[388,5],[401,4]]},"177":{"position":[[91,4],[238,4]]},"189":{"position":[[221,5]]},"193":{"position":[[97,4],[226,4],[257,4]]},"195":{"position":[[102,4],[222,4]]},"225":{"position":[[85,4]]},"227":{"position":[[71,4],[182,4]]},"229":{"position":[[293,4]]},"233":{"position":[[74,4],[235,4]]},"268":{"position":[[100,4],[169,4]]},"282":{"position":[[129,6],[517,4]]},"284":{"position":[[52,5]]},"299":{"position":[[406,5]]},"317":{"position":[[67,4]]},"339":{"position":[[115,4],[308,4],[339,4]]},"345":{"position":[[80,4]]},"347":{"position":[[12,4]]},"349":{"position":[[12,4]]},"453":{"position":[[48,5]]},"463":{"position":[[1526,4]]},"602":{"position":[[135,4]]}}}],["codebas",{"_index":1517,"t":{"317":{"position":[[182,10]]}}}],["codifi",{"_index":1561,"t":{"327":{"position":[[780,6]]}}}],["colon",{"_index":1214,"t":{"233":{"position":[[448,5]]},"278":{"position":[[360,5]]},"359":{"position":[[95,6]]}}}],["color",{"_index":863,"t":{"91":{"position":[[81,5]]},"256":{"position":[[551,6],[591,6]]},"351":{"position":[[21,9],[147,7],[214,8]]},"363":{"position":[[1115,6],[1139,6],[1231,7],[1271,7],[1300,7],[1346,7]]}}}],["combat",{"_index":44,"t":{"7":{"position":[[153,6]]}}}],["combin",{"_index":449,"t":{"33":{"position":[[1842,8]]},"215":{"position":[[333,8]]},"327":{"position":[[100,11]]},"475":{"position":[[294,8]]}}}],["come",{"_index":1051,"t":{"145":{"position":[[247,5]]},"231":{"position":[[47,5]]}}}],["comma",{"_index":1228,"t":{"239":{"position":[[79,6]]}}}],["command",{"_index":976,"t":{"116":{"position":[[204,9],[372,8]]},"120":{"position":[[28,8]]},"284":{"position":[[171,7]]},"351":{"position":[[250,8]]}}}],["comment",{"_index":404,"t":{"33":{"position":[[441,8]]},"79":{"position":[[326,9]]},"167":{"position":[[237,7]]},"169":{"position":[[61,7]]},"282":{"position":[[244,7],[302,9],[326,8]]},"323":{"position":[[106,7]]}}}],["commit",{"_index":509,"t":{"37":{"position":[[641,6]]},"69":{"position":[[128,8]]}}}],["common",{"_index":834,"t":{"79":{"position":[[365,6]]},"249":{"position":[[10,6]]},"609":{"position":[[142,6]]}}}],["commonli",{"_index":2109,"t":{"611":{"position":[[164,9]]}}}],["compar",{"_index":1454,"t":{"303":{"position":[[95,7],[405,7]]},"335":{"position":[[264,8]]},"421":{"position":[[58,7],[279,7]]},"423":{"position":[[62,7],[283,7]]},"655":{"position":[[0,8],[86,8],[116,8]]},"713":{"position":[[38,8]]}}}],["comparevers",{"_index":583,"t":{"39":{"position":[[2789,15]]}}}],["comparison",{"_index":273,"t":{"23":{"position":[[432,11]]},"303":{"position":[[52,10]]},"457":{"position":[[21,10]]}}}],["compat",{"_index":296,"t":{"25":{"position":[[419,13]]},"27":{"position":[[352,10]]},"33":{"position":[[2297,13]]},"39":{"position":[[3438,14]]},"49":{"position":[[200,10],[1170,14]]},"51":{"position":[[35,10]]},"91":{"position":[[308,13]]},"95":{"position":[[99,10]]},"153":{"position":[[90,13]]},"155":{"position":[[57,13]]},"193":{"position":[[403,10]]},"201":{"position":[[267,10]]},"229":{"position":[[567,10]]},"237":{"position":[[294,13]]},"251":{"position":[[566,10]]},"297":{"position":[[420,13]]},"305":{"position":[[324,12]]},"317":{"position":[[38,10]]},"321":{"position":[[81,15]]},"323":{"position":[[170,10],[1307,13],[1434,14],[1516,13]]},"325":{"position":[[52,13],[160,13],[220,13]]},"333":{"position":[[45,10]]},"339":{"position":[[454,10],[548,10]]}}}],["compatibl",{"_index":1256,"t":{"253":{"position":[[58,12]]}}}],["compil",{"_index":26,"t":{"5":{"position":[[29,8]]},"9":{"position":[[490,7]]},"23":{"position":[[375,8]]},"25":{"position":[[179,7]]},"29":{"position":[[71,7]]},"33":{"position":[[732,7]]},"35":{"position":[[187,7]]},"39":{"position":[[1171,7]]},"49":{"position":[[360,7]]},"57":{"position":[[50,7],[96,7]]},"61":{"position":[[30,7]]},"63":{"position":[[29,7]]},"65":{"position":[[139,7]]},"91":{"position":[[6,7]]},"108":{"position":[[580,8]]},"114":{"position":[[10,7],[73,8]]},"116":{"position":[[386,8]]},"126":{"position":[[52,7],[109,7],[242,7],[301,8],[341,7],[481,7],[556,8]]},"128":{"position":[[0,7],[267,7],[370,7]]},"130":{"position":[[47,8],[115,7],[326,8]]},"134":{"position":[[22,8]]},"139":{"position":[[388,7]]},"153":{"position":[[488,7]]},"155":{"position":[[438,7]]},"157":{"position":[[68,9],[435,7]]},"165":{"position":[[53,7]]},"167":{"position":[[129,11]]},"225":{"position":[[181,9]]},"290":{"position":[[356,11]]},"292":{"position":[[482,9]]},"323":{"position":[[1335,8]]},"329":{"position":[[60,7]]},"333":{"position":[[136,10],[215,7]]},"341":{"position":[[52,7]]}}}],["complex",{"_index":526,"t":{"39":{"position":[[666,7]]},"475":{"position":[[136,7],[799,7]]}}}],["compon",{"_index":1843,"t":{"465":{"position":[[239,10]]}}}],["compos",{"_index":2147,"t":{"635":{"position":[[31,8]]},"637":{"position":[[31,8]]},"639":{"position":[[31,8]]},"641":{"position":[[31,8]]},"643":{"position":[[31,8]]},"645":{"position":[[34,8]]}}}],["compound",{"_index":389,"t":{"33":{"position":[[55,8]]},"85":{"position":[[207,8]]},"91":{"position":[[420,8]]},"93":{"position":[[109,8]]},"95":{"position":[[256,8]]},"297":{"position":[[14,8],[319,8],[564,8],[651,8]]},"299":{"position":[[651,8]]}}}],["comprehens",{"_index":506,"t":{"37":{"position":[[583,13]]}}}],["compromis",{"_index":164,"t":{"13":{"position":[[880,10]]}}}],["comput",{"_index":2310,"t":{"717":{"position":[[0,8]]},"723":{"position":[[0,8]]},"771":{"position":[[37,8]]}}}],["concat",{"_index":284,"t":{"25":{"position":[[192,6]]},"33":{"position":[[745,6]]},"35":{"position":[[200,6]]},"39":{"position":[[1184,6]]},"451":{"position":[[804,10]]}}}],["concaten",{"_index":261,"t":{"23":{"position":[[226,13]]},"91":{"position":[[429,13]]},"260":{"position":[[55,14],[70,13],[606,14],[663,13]]},"297":{"position":[[480,14]]},"331":{"position":[[20,11]]}}}],["concern",{"_index":578,"t":{"39":{"position":[[2619,10]]}}}],["condit",{"_index":192,"t":{"17":{"position":[[149,9],[203,9]]},"49":{"position":[[373,12]]},"130":{"position":[[128,13]]},"258":{"position":[[105,13]]},"276":{"position":[[40,10]]},"278":{"position":[[309,10]]},"301":{"position":[[64,11],[472,10]]},"347":{"position":[[144,10]]},"649":{"position":[[479,11]]},"763":{"position":[[67,9]]}}}],["condition",{"_index":1351,"t":{"278":{"position":[[50,13]]}}}],["config",{"_index":31,"t":{"5":{"position":[[109,7]]},"7":{"position":[[277,7]]},"11":{"position":[[167,7]]},"17":{"position":[[75,7]]},"327":{"position":[[637,7]]},"333":{"position":[[457,7]]},"351":{"position":[[130,6]]},"483":{"position":[[313,9],[361,9]]}}}],["configur",{"_index":17,"t":{"2":{"position":[[196,11]]},"9":{"position":[[470,10]]},"13":{"position":[[459,14],[583,11],[681,13],[755,9]]},"15":{"position":[[26,12]]},"17":{"position":[[237,13]]},"79":{"position":[[310,10]]},"139":{"position":[[401,13]]},"153":{"position":[[501,13]]},"155":{"position":[[451,13]]},"157":{"position":[[448,13]]}}}],["confus",{"_index":716,"t":{"55":{"position":[[314,9]]}}}],["conjunct",{"_index":674,"t":{"49":{"position":[[814,11]]}}}],["connect",{"_index":1805,"t":{"463":{"position":[[665,11],[702,7],[1039,10],[1300,10],[2120,10]]},"465":{"position":[[24,10]]},"467":{"position":[[22,11]]},"675":{"position":[[18,11],[54,7]]},"689":{"position":[[680,13]]},"695":{"position":[[27,11],[244,11]]},"697":{"position":[[38,11]]}}}],["consid",{"_index":757,"t":{"57":{"position":[[1637,8]]},"149":{"position":[[298,8]]},"153":{"position":[[40,10]]},"457":{"position":[[257,10]]},"463":{"position":[[1137,8]]},"596":{"position":[[55,10]]},"763":{"position":[[151,8]]}}}],["consist",{"_index":1215,"t":{"235":{"position":[[4,11]]},"272":{"position":[[14,8]]},"295":{"position":[[52,10]]},"313":{"position":[[60,10]]},"609":{"position":[[217,11],[262,11]]},"657":{"position":[[258,7]]}}}],["const",{"_index":406,"t":{"33":{"position":[[598,5],[630,7]]},"39":{"position":[[309,7],[352,7],[392,6]]},"128":{"position":[[154,5],[185,7],[304,7]]},"151":{"position":[[78,5],[177,5],[232,10]]},"264":{"position":[[393,7]]},"594":{"position":[[422,7]]},"600":{"position":[[359,7]]},"606":{"position":[[433,7]]}}}],["constant",{"_index":367,"t":{"31":{"position":[[269,8]]},"33":{"position":[[1065,8]]},"57":{"position":[[63,9]]},"61":{"position":[[43,8]]},"63":{"position":[[42,8]]},"65":{"position":[[152,9]]},"69":{"position":[[327,8]]},"128":{"position":[[13,8],[280,9],[383,8]]},"264":{"position":[[326,8],[478,9]]},"341":{"position":[[65,10]]}}}],["constexpr",{"_index":407,"t":{"33":{"position":[[669,11]]},"57":{"position":[[6,11]]}}}],["constitu",{"_index":2209,"t":{"671":{"position":[[22,11]]}}}],["construct",{"_index":738,"t":{"57":{"position":[[848,17]]},"124":{"position":[[38,10]]},"469":{"position":[[136,12]]}}}],["constructor",{"_index":667,"t":{"49":{"position":[[332,11]]},"141":{"position":[[73,12]]},"239":{"position":[[42,12]]},"245":{"position":[[308,11]]},"513":{"position":[[4,11]]},"707":{"position":[[4,11]]}}}],["constructor/class",{"_index":740,"t":{"57":{"position":[[1159,17]]}}}],["consum",{"_index":694,"t":{"51":{"position":[[273,9]]}}}],["contact",{"_index":22,"t":{"2":{"position":[[282,7]]},"675":{"position":[[145,7]]}}}],["contain",{"_index":241,"t":{"21":{"position":[[10,8]]},"23":{"position":[[166,7]]},"260":{"position":[[511,7]]},"437":{"position":[[429,7]]},"445":{"position":[[31,10]]},"451":{"position":[[722,12]]},"495":{"position":[[177,10]]},"653":{"position":[[19,8]]},"729":{"position":[[233,8]]},"749":{"position":[[21,8]]}}}],["content",{"_index":793,"t":{"67":{"position":[[523,7]]},"421":{"position":[[252,8]]},"423":{"position":[[256,8]]},"463":{"position":[[393,9],[486,7]]},"503":{"position":[[20,9],[84,8],[230,8]]},"659":{"position":[[294,7],[371,7]]},"679":{"position":[[382,7]]}}}],["content..\"\\r\\n\\r\\n\"..cont",{"_index":2235,"t":{"679":{"position":[[472,33]]}}}],["context",{"_index":817,"t":{"73":{"position":[[155,8]]},"319":{"position":[[272,9]]}}}],["continu",{"_index":369,"t":{"31":{"position":[[300,8],[368,8],[413,8]]},"37":{"position":[[399,10]]},"69":{"position":[[296,12]]},"85":{"position":[[227,8]]},"87":{"position":[[21,8]]},"91":{"position":[[177,8]]},"145":{"position":[[93,8],[271,10]]},"171":{"position":[[0,8],[139,9],[283,8],[308,8],[369,8],[450,10],[471,8]]},"173":{"position":[[245,8],[280,10],[395,8],[419,8],[441,8],[465,8]]},"175":{"position":[[46,9],[81,8]]},"319":{"position":[[49,8]]},"323":{"position":[[408,8],[459,9],[516,9],[601,9]]},"343":{"position":[[384,8],[406,12]]},"757":{"position":[[54,10]]},"763":{"position":[[194,10]]}}}],["contmodonloadfil",{"_index":48,"t":{"7":{"position":[[232,17]]}}}],["contmodonloadfile(const",{"_index":56,"t":{"7":{"position":[[378,23]]}}}],["control",{"_index":130,"t":{"13":{"position":[[187,7]]},"284":{"position":[[219,8]]}}}],["conveni",{"_index":2226,"t":{"679":{"position":[[2,11]]}}}],["convert",{"_index":1301,"t":{"260":{"position":[[569,9]]},"499":{"position":[[0,7]]},"501":{"position":[[0,7]]}}}],["cooper",{"_index":1932,"t":{"511":{"position":[[91,11]]}}}],["coordin",{"_index":2332,"t":{"729":{"position":[[128,10]]}}}],["copi",{"_index":62,"t":{"7":{"position":[[482,4]]},"13":{"position":[[426,4],[506,4]]},"19":{"position":[[196,4],[607,4]]},"33":{"position":[[1155,7]]},"43":{"position":[[187,7]]},"106":{"position":[[91,4]]},"108":{"position":[[395,4]]},"114":{"position":[[185,4]]},"116":{"position":[[339,4]]},"120":{"position":[[65,4]]},"122":{"position":[[153,4],[351,4]]},"126":{"position":[[310,4],[565,4]]},"128":{"position":[[96,4],[199,4],[398,4]]},"130":{"position":[[273,4]]},"132":{"position":[[292,4],[457,4]]},"137":{"position":[[129,4],[307,4]]},"139":{"position":[[107,4],[280,4]]},"141":{"position":[[155,4],[323,4]]},"143":{"position":[[137,4],[304,4]]},"145":{"position":[[127,4],[293,4]]},"147":{"position":[[131,4],[275,4]]},"149":{"position":[[116,4],[341,4]]},"151":{"position":[[89,4],[243,4]]},"153":{"position":[[149,4],[380,4]]},"155":{"position":[[105,4],[330,4]]},"157":{"position":[[126,4],[327,4]]},"159":{"position":[[155,4],[375,4],[600,4]]},"161":{"position":[[139,4],[294,4]]},"163":{"position":[[182,4],[319,4]]},"167":{"position":[[425,4],[627,4]]},"169":{"position":[[207,4]]},"171":{"position":[[333,4]]},"173":{"position":[[318,4],[495,4]]},"177":{"position":[[228,4],[425,4]]},"179":{"position":[[156,4],[384,4],[498,4]]},"181":{"position":[[189,4]]},"183":{"position":[[233,4]]},"185":{"position":[[145,4]]},"189":{"position":[[128,4],[183,4],[239,4]]},"191":{"position":[[141,4],[296,4]]},"193":{"position":[[216,4],[346,4]]},"195":{"position":[[213,4],[295,4],[612,4]]},"199":{"position":[[203,4],[673,4]]},"205":{"position":[[57,4],[209,4],[250,4]]},"207":{"position":[[73,4],[230,4],[275,4]]},"209":{"position":[[203,4],[256,4]]},"211":{"position":[[150,4]]},"213":{"position":[[188,4],[293,4],[572,4]]},"215":{"position":[[174,4],[311,4],[443,4]]},"217":{"position":[[323,4]]},"219":{"position":[[355,4]]},"225":{"position":[[139,4]]},"227":{"position":[[116,4],[229,4]]},"229":{"position":[[396,4]]},"233":{"position":[[167,4],[316,4]]},"235":{"position":[[203,4]]},"237":{"position":[[258,4]]},"239":{"position":[[265,4]]},"241":{"position":[[165,4]]},"243":{"position":[[173,4]]},"245":{"position":[[554,4]]},"247":{"position":[[401,4]]},"249":{"position":[[384,4]]},"251":{"position":[[361,4],[484,4]]},"256":{"position":[[296,4],[693,4]]},"258":{"position":[[178,4],[220,4],[403,4],[641,4]]},"260":{"position":[[228,4],[389,4]]},"262":{"position":[[221,4],[374,4]]},"264":{"position":[[301,4],[642,4],[919,4]]},"268":{"position":[[160,4],[206,4]]},"270":{"position":[[89,4],[219,4]]},"274":{"position":[[147,4],[366,4],[701,4],[893,4]]},"276":{"position":[[123,4],[262,4],[587,4]]},"278":{"position":[[262,4],[667,4]]},"286":{"position":[[624,4]]},"290":{"position":[[70,4],[277,4]]},"297":{"position":[[554,4]]},"299":{"position":[[370,4],[629,4],[864,4]]},"301":{"position":[[201,4],[399,4],[537,4],[628,4]]},"303":{"position":[[231,4],[536,4]]},"305":{"position":[[610,4],[779,4]]},"307":{"position":[[174,4]]},"309":{"position":[[236,4]]},"311":{"position":[[227,4]]},"315":{"position":[[327,4]]},"323":{"position":[[247,4],[788,4],[909,4],[1137,4]]},"327":{"position":[[322,4],[512,4],[1102,4]]},"331":{"position":[[231,4]]},"337":{"position":[[124,4],[184,4]]},"339":{"position":[[211,4],[441,4]]},"343":{"position":[[253,4],[423,4]]},"347":{"position":[[63,4],[271,4]]},"349":{"position":[[66,4],[296,4]]},"361":{"position":[[246,4]]},"363":{"position":[[553,4],[752,4],[1036,4],[1381,4]]},"367":{"position":[[239,4]]},"369":{"position":[[179,4]]},"371":{"position":[[306,4]]},"373":{"position":[[194,4]]},"377":{"position":[[210,4]]},"381":{"position":[[136,4]]},"383":{"position":[[140,4]]},"391":{"position":[[176,4]]},"393":{"position":[[162,4]]},"395":{"position":[[162,4]]},"397":{"position":[[154,4]]},"399":{"position":[[158,4]]},"409":{"position":[[469,4]]},"411":{"position":[[516,4]]},"413":{"position":[[523,4]]},"415":{"position":[[635,4]]},"417":{"position":[[703,4]]},"419":{"position":[[528,4]]},"421":{"position":[[970,4]]},"423":{"position":[[612,4]]},"425":{"position":[[369,4]]},"427":{"position":[[400,4]]},"429":{"position":[[385,4]]},"431":{"position":[[318,4]]},"433":{"position":[[492,4]]},"435":{"position":[[499,4]]},"437":{"position":[[987,4]]},"445":{"position":[[359,4]]},"449":{"position":[[312,4]]},"451":{"position":[[311,4],[1047,4]]},"453":{"position":[[364,4],[482,4]]},"455":{"position":[[146,4]]},"457":{"position":[[193,4]]},"459":{"position":[[177,4]]},"463":{"position":[[2449,4]]},"465":{"position":[[620,4]]},"469":{"position":[[321,4],[397,4]]},"473":{"position":[[480,4],[704,4],[893,4]]},"475":{"position":[[1279,4]]},"483":{"position":[[0,4],[129,4],[199,7],[375,4]]},"485":{"position":[[269,4]]},"487":{"position":[[237,4]]},"489":{"position":[[226,4]]},"491":{"position":[[234,4]]},"493":{"position":[[253,4]]},"495":{"position":[[264,4]]},"497":{"position":[[215,4]]},"499":{"position":[[323,4]]},"501":{"position":[[201,4]]},"503":{"position":[[361,4]]},"505":{"position":[[169,4]]},"507":{"position":[[376,4]]},"509":{"position":[[347,4]]},"519":{"position":[[608,4]]},"521":{"position":[[450,4]]},"523":{"position":[[426,4]]},"527":{"position":[[214,4]]},"529":{"position":[[137,4]]},"535":{"position":[[116,4]]},"544":{"position":[[212,4]]},"546":{"position":[[219,4]]},"548":{"position":[[252,4]]},"550":{"position":[[205,4]]},"552":{"position":[[207,4]]},"554":{"position":[[255,4]]},"556":{"position":[[252,4]]},"558":{"position":[[312,4]]},"560":{"position":[[260,4]]},"562":{"position":[[202,4]]},"564":{"position":[[259,4]]},"566":{"position":[[259,4]]},"568":{"position":[[259,4]]},"570":{"position":[[261,4]]},"572":{"position":[[216,4]]},"574":{"position":[[215,4]]},"576":{"position":[[216,4]]},"579":{"position":[[436,4]]},"581":{"position":[[514,4]]},"583":{"position":[[382,4]]},"585":{"position":[[414,4]]},"588":{"position":[[502,4]]},"594":{"position":[[732,4]]},"600":{"position":[[619,4]]},"606":{"position":[[809,4]]},"609":{"position":[[823,4]]},"613":{"position":[[1022,4]]},"617":{"position":[[1090,4]]},"621":{"position":[[139,4]]},"623":{"position":[[143,4]]},"625":{"position":[[355,4],[619,4]]},"629":{"position":[[252,4]]},"631":{"position":[[260,4]]},"633":{"position":[[261,4]]},"635":{"position":[[160,4]]},"637":{"position":[[161,4]]},"639":{"position":[[162,4]]},"641":{"position":[[161,4]]},"643":{"position":[[167,4]]},"645":{"position":[[178,4]]},"649":{"position":[[839,4]]},"651":{"position":[[628,4]]},"653":{"position":[[175,4]]},"655":{"position":[[221,4]]},"657":{"position":[[1021,4],[1076,4],[1307,4]]},"659":{"position":[[561,4],[750,4]]},"661":{"position":[[181,4]]},"663":{"position":[[185,4]]},"667":{"position":[[250,4]]},"669":{"position":[[220,4]]},"671":{"position":[[496,4]]},"679":{"position":[[523,4]]},"685":{"position":[[534,4]]},"687":{"position":[[350,4]]},"689":{"position":[[814,4]]},"697":{"position":[[365,4]]},"701":{"position":[[455,4]]},"703":{"position":[[709,4],[1030,4],[1378,4]]},"707":{"position":[[267,4],[399,4]]},"711":{"position":[[325,4]]},"713":{"position":[[219,4]]},"715":{"position":[[245,4]]},"717":{"position":[[123,4]]},"719":{"position":[[129,4]]},"721":{"position":[[130,4]]},"723":{"position":[[158,4]]},"725":{"position":[[174,4]]},"727":{"position":[[179,4]]},"729":{"position":[[1013,4]]},"731":{"position":[[240,4]]},"733":{"position":[[469,4]]},"737":{"position":[[124,4]]},"739":{"position":[[0,7],[125,7]]},"741":{"position":[[188,4]]},"743":{"position":[[167,4]]},"745":{"position":[[218,4]]},"747":{"position":[[133,4]]},"749":{"position":[[325,4]]},"751":{"position":[[310,4]]},"753":{"position":[[488,4]]},"755":{"position":[[0,7],[128,7]]},"757":{"position":[[263,4]]},"759":{"position":[[0,7],[128,7]]},"761":{"position":[[329,4]]},"763":{"position":[[724,4]]},"765":{"position":[[0,7],[127,7]]},"767":{"position":[[495,4]]},"769":{"position":[[0,7],[124,7]]},"771":{"position":[[415,4]]},"773":{"position":[[120,4]]},"775":{"position":[[119,4]]},"777":{"position":[[360,4]]}}}],["coroutin",{"_index":661,"t":{"47":{"position":[[189,10]]},"401":{"position":[[51,9]]},"403":{"position":[[74,10]]},"405":{"position":[[19,9]]},"463":{"position":[[1779,10],[1889,9]]},"465":{"position":[[312,10]]},"467":{"position":[[200,10]]},"511":{"position":[[75,9]]},"515":{"position":[[53,10],[68,9]]},"519":{"position":[[66,10],[123,10],[151,9]]},"523":{"position":[[121,11],[176,9]]},"675":{"position":[[257,10]]},"679":{"position":[[103,9],[231,9]]},"685":{"position":[[346,10]]},"689":{"position":[[468,10]]},"695":{"position":[[368,10]]}}}],["coroutine.clos",{"_index":807,"t":{"69":{"position":[[396,15]]}}}],["coroutine.cr",{"_index":1745,"t":{"449":{"position":[[139,19]]}}}],["coroutine.resum",{"_index":1673,"t":{"403":{"position":[[18,16]]}}}],["coroutine.resume(c",{"_index":1752,"t":{"449":{"position":[[292,19]]}}}],["coroutine.sleep",{"_index":432,"t":{"33":{"position":[[1440,15]]}}}],["coroutine.sleep(1000",{"_index":1945,"t":{"519":{"position":[[441,21],[477,21],[513,21]]}}}],["coroutine.xresum",{"_index":689,"t":{"49":{"position":[[1347,17]]},"523":{"position":[[211,19]]}}}],["coroutine.yield",{"_index":146,"t":{"13":{"position":[[543,15]]}}}],["coroutines/thread",{"_index":454,"t":{"33":{"position":[[1992,18]]},"449":{"position":[[11,18]]}}}],["correct",{"_index":143,"t":{"13":{"position":[[451,7]]}}}],["correspond",{"_index":1527,"t":{"323":{"position":[[374,11],[425,11],[482,11],[567,11]]},"617":{"position":[[101,13]]}}}],["corrupt",{"_index":329,"t":{"27":{"position":[[567,10]]},"31":{"position":[[682,7]]},"41":{"position":[[251,10]]}}}],["cosmet",{"_index":1182,"t":{"225":{"position":[[210,9]]}}}],["count",{"_index":2355,"t":{"741":{"position":[[45,8]]}}}],["counterpart",{"_index":1441,"t":{"297":{"position":[[660,13]]},"313":{"position":[[130,13]]},"457":{"position":[[296,13]]}}}],["cover",{"_index":1039,"t":{"139":{"position":[[501,6]]}}}],["coverag",{"_index":165,"t":{"13":{"position":[[904,9]]},"215":{"position":[[465,8]]},"292":{"position":[[520,9]]}}}],["cpp",{"_index":52,"t":{"7":{"position":[[358,3]]}}}],["cr",{"_index":255,"t":{"23":{"position":[[174,2]]}}}],["crc32",{"_index":1995,"t":{"558":{"position":[[24,5]]}}}],["creat",{"_index":677,"t":{"49":{"position":[[928,8]]},"57":{"position":[[785,8]]},"137":{"position":[[35,7]]},"139":{"position":[[35,7]]},"161":{"position":[[263,8]]},"191":{"position":[[265,8]]},"264":{"position":[[315,8]]},"483":{"position":[[29,8],[296,7],[345,6]]},"493":{"position":[[0,6],[128,8],[225,6]]},"497":{"position":[[0,7],[165,7]]},"677":{"position":[[0,7]]},"711":{"position":[[120,6]]}}}],["creation",{"_index":849,"t":{"85":{"position":[[26,9]]},"161":{"position":[[183,8]]},"191":{"position":[[185,8]]}}}],["criteria",{"_index":2183,"t":{"657":{"position":[[649,9]]}}}],["crypto",{"_index":1017,"t":{"126":{"position":[[653,6]]},"544":{"position":[[127,6]]},"546":{"position":[[110,6]]},"548":{"position":[[167,6]]},"550":{"position":[[110,6]]},"552":{"position":[[111,6]]},"554":{"position":[[168,6]]},"556":{"position":[[167,6]]},"558":{"position":[[226,6]]},"560":{"position":[[172,6]]},"562":{"position":[[113,6]]},"564":{"position":[[170,6]]},"566":{"position":[[170,6]]},"568":{"position":[[170,6]]},"570":{"position":[[171,6]]},"572":{"position":[[115,6]]},"574":{"position":[[115,6]]},"576":{"position":[[120,6]]},"579":{"position":[[213,6]]},"581":{"position":[[215,6]]},"583":{"position":[[215,6]]},"585":{"position":[[215,6]]},"588":{"position":[[441,6]]},"594":{"position":[[380,6]]},"600":{"position":[[317,6]]},"606":{"position":[[391,6]]},"613":{"position":[[283,6]]},"617":{"position":[[308,6]]},"685":{"position":[[166,6]]},"689":{"position":[[24,6]]}}}],["crypto.adler32",{"_index":441,"t":{"33":{"position":[[1661,14]]}}}],["crypto.decrypt",{"_index":435,"t":{"33":{"position":[[1526,14]]}}}],["crypto.decrypt|\"rsa",{"_index":2120,"t":{"613":{"position":[[933,19]]}}}],["crypto.encrypt",{"_index":434,"t":{"33":{"position":[[1509,14]]}}}],["crypto.encrypt(\"a",{"_index":2116,"t":{"613":{"position":[[797,17]]}}}],["crypto.encrypt|\"a",{"_index":2075,"t":{"594":{"position":[[589,19]]},"600":{"position":[[450,19]]},"606":{"position":[[637,19]]}}}],["crypto.fnv1",{"_index":462,"t":{"33":{"position":[[2172,11]]}}}],["crypto.fnv1a",{"_index":463,"t":{"33":{"position":[[2186,12]]}}}],["crypto.generatekeypair",{"_index":433,"t":{"33":{"position":[[1471,22]]}}}],["crypto.generatekeypair(\"rsa",{"_index":2100,"t":{"609":{"position":[[352,29]]}}}],["crypto.hexdigest",{"_index":607,"t":{"39":{"position":[[3340,16]]}}}],["crypto.joaat(\"hello",{"_index":1007,"t":{"126":{"position":[[252,21]]}}}],["crypto.random",{"_index":2042,"t":{"588":{"position":[[4,13]]}}}],["crypto.sha1",{"_index":438,"t":{"33":{"position":[[1601,12]]}}}],["crypto.sha384",{"_index":439,"t":{"33":{"position":[[1614,14]]}}}],["crypto.sha512",{"_index":440,"t":{"33":{"position":[[1631,13]]}}}],["crypto.sign",{"_index":436,"t":{"33":{"position":[[1557,11]]}}}],["crypto.sign|\"rsa",{"_index":2128,"t":{"617":{"position":[[870,16]]}}}],["crypto.verifi",{"_index":437,"t":{"33":{"position":[[1571,13]]}}}],["cryptograph",{"_index":831,"t":{"79":{"position":[[126,13]]},"544":{"position":[[50,13]]},"546":{"position":[[33,13]]},"548":{"position":[[33,13]]},"550":{"position":[[33,13]]},"552":{"position":[[34,13]]},"554":{"position":[[34,13]]},"556":{"position":[[33,13]]},"558":{"position":[[34,13]]},"560":{"position":[[37,13]]},"562":{"position":[[36,13]]},"564":{"position":[[36,13]]},"566":{"position":[[36,13]]},"568":{"position":[[36,13]]},"570":{"position":[[37,13]]},"572":{"position":[[38,13]]},"574":{"position":[[38,13]]},"576":{"position":[[43,13]]},"579":{"position":[[30,13]]},"581":{"position":[[32,13]]},"583":{"position":[[32,13]]},"585":{"position":[[32,13]]},"588":{"position":[[163,17],[280,17]]}}}],["ctrl+(shift+)b",{"_index":1376,"t":{"282":{"position":[[464,14]]}}}],["ctrl+shift+p",{"_index":1378,"t":{"282":{"position":[[498,12]]},"284":{"position":[[187,15]]}}}],["cucumb",{"_index":1405,"t":{"286":{"position":[[265,11]]}}}],["current",{"_index":671,"t":{"49":{"position":[[496,10],[555,10]]},"132":{"position":[[167,7]]},"171":{"position":[[78,7]]},"173":{"position":[[187,7]]},"215":{"position":[[477,9]]},"264":{"position":[[34,7]]},"405":{"position":[[11,7]]},"441":{"position":[[38,7]]},"509":{"position":[[15,7],[76,7],[233,7]]},"729":{"position":[[62,7]]},"731":{"position":[[61,7]]},"733":{"position":[[62,7]]}}}],["custom",{"_index":191,"t":{"17":{"position":[[142,6]]},"521":{"position":[[61,9]]},"523":{"position":[[71,9]]}}}],["cve",{"_index":257,"t":{"23":{"position":[[184,4]]},"27":{"position":[[713,4]]}}}],["cwd",{"_index":1930,"t":{"509":{"position":[[272,3],[301,3],[343,3]]}}}],["d",{"_index":1196,"t":{"229":{"position":[[392,3]]},"351":{"position":[[320,2]]}}}],["danger",{"_index":84,"t":{"9":{"position":[[364,9]]}}}],["data",{"_index":328,"t":{"27":{"position":[[562,4],[612,4]]},"260":{"position":[[128,4],[298,4]]},"305":{"position":[[39,4]]},"355":{"position":[[46,4],[65,4]]},"357":{"position":[[45,4],[71,4]]},"361":{"position":[[37,4]]},"363":{"position":[[37,5],[55,4],[70,4],[122,4],[236,4]]},"367":{"position":[[45,4],[64,4]]},"369":{"position":[[45,4],[71,5]]},"371":{"position":[[110,4],[129,4]]},"373":{"position":[[59,4],[85,5]]},"453":{"position":[[170,4]]},"473":{"position":[[38,4],[220,4],[225,4],[299,4]]},"475":{"position":[[193,4],[209,4],[543,4],[613,5],[650,4],[756,5],[812,4]]},"579":{"position":[[132,5]]},"581":{"position":[[134,5]]},"583":{"position":[[134,5]]},"585":{"position":[[134,5]]},"592":{"position":[[12,4],[23,4]]},"594":{"position":[[12,4],[305,4]]},"598":{"position":[[12,4],[23,4]]},"600":{"position":[[99,4],[242,4]]},"602":{"position":[[50,4]]},"604":{"position":[[12,4],[23,4],[102,5],[167,5]]},"606":{"position":[[12,4],[95,5],[307,4]]},"611":{"position":[[12,4],[23,4],[206,5]]},"613":{"position":[[12,4],[172,4]]},"615":{"position":[[12,4],[23,4]]},"617":{"position":[[12,4],[23,4]]},"683":{"position":[[6,4],[61,4]]},"685":{"position":[[8,4],[113,4]]},"687":{"position":[[18,4],[146,4]]},"689":{"position":[[778,4]]},"701":{"position":[[37,4]]},"703":{"position":[[37,5],[55,4],[70,4],[127,5]]},"763":{"position":[[523,4],[621,4]]},"767":{"position":[[284,4],[385,4]]}}}],["data.valu",{"_index":1298,"t":{"260":{"position":[[185,11],[343,14]]}}}],["data:filter(|k",{"_index":2384,"t":{"763":{"position":[[646,15]]}}}],["data:filter(|v",{"_index":2382,"t":{"763":{"position":[[548,15]]}}}],["data:split",{"_index":2389,"t":{"767":{"position":[[302,12],[403,12]]}}}],["db890233a919b6745d632633c419e14540ff79f1a89bc4ac194b00e7f913f0f06d5d4d7d6cc2b4aaf9485d223afb8cf0",{"_index":2038,"t":{"583":{"position":[[282,99]]}}}],["deal",{"_index":2085,"t":{"604":{"position":[[83,4]]}}}],["deb",{"_index":939,"t":{"108":{"position":[[172,4]]}}}],["debian",{"_index":951,"t":{"108":{"position":[[592,6],[635,6]]},"116":{"position":[[141,6]]}}}],["debug",{"_index":1024,"t":{"130":{"position":[[90,5],[156,5],[173,5],[209,5]]},"264":{"position":[[691,5]]},"266":{"position":[[107,5]]},"451":{"position":[[2,5]]}}}],["debug.getlocal(1",{"_index":1327,"t":{"264":{"position":[[744,17]]}}}],["debug.setlocal(1",{"_index":1328,"t":{"264":{"position":[[790,17]]}}}],["decid",{"_index":2381,"t":{"763":{"position":[[280,8]]}}}],["decim",{"_index":1652,"t":{"377":{"position":[[104,7]]},"379":{"position":[[91,8]]}}}],["deciph",{"_index":236,"t":{"19":{"position":[[629,11]]}}}],["declar",{"_index":669,"t":{"49":{"position":[[446,11]]},"69":{"position":[[83,12]]},"91":{"position":[[48,12]]},"128":{"position":[[136,8]]},"137":{"position":[[173,11],[275,11]]},"139":{"position":[[152,11]]},"141":{"position":[[38,8]]},"161":{"position":[[67,8]]},"163":{"position":[[51,8],[246,8]]},"177":{"position":[[18,12],[50,7]]},"189":{"position":[[54,7]]},"191":{"position":[[91,8]]},"215":{"position":[[17,8],[238,8]]},"235":{"position":[[72,7]]},"260":{"position":[[431,7]]}}}],["decod",{"_index":451,"t":{"33":{"position":[[1888,6]]},"39":{"position":[[2234,7]]},"357":{"position":[[10,7],[79,7]]},"359":{"position":[[78,8]]},"363":{"position":[[78,7]]},"369":{"position":[[10,7]]},"475":{"position":[[217,7],[355,7],[461,7],[628,7],[707,7],[903,7],[1099,7]]},"669":{"position":[[32,8],[88,8]]},"703":{"position":[[78,7]]}}}],["decrypt",{"_index":2068,"t":{"594":{"position":[[37,8],[295,9],[653,7]]},"600":{"position":[[124,8],[232,9],[544,7]]},"606":{"position":[[37,8],[297,9],[723,7]]},"613":{"position":[[37,8],[241,7],[912,7]]}}}],["deepli",{"_index":860,"t":{"85":{"position":[[392,6]]},"256":{"position":[[10,6]]}}}],["default",{"_index":97,"t":{"11":{"position":[[178,8]]},"17":{"position":[[190,8]]},"19":{"position":[[128,8]]},"25":{"position":[[305,7]]},"33":{"position":[[865,7],[2035,7],[2101,7],[2448,7]]},"39":{"position":[[457,7]]},"51":{"position":[[0,8],[61,7]]},"55":{"position":[[141,7],[199,9]]},"59":{"position":[[0,7],[195,7],[278,7]]},"61":{"position":[[0,7]]},"67":{"position":[[251,7],[319,10]]},"73":{"position":[[164,8]]},"79":{"position":[[27,7],[631,7]]},"132":{"position":[[122,7]]},"139":{"position":[[343,8],[552,8]]},"153":{"position":[[443,8]]},"155":{"position":[[393,8]]},"157":{"position":[[390,8]]},"173":{"position":[[135,7]]},"177":{"position":[[68,7]]},"213":{"position":[[666,7]]},"217":{"position":[[386,7]]},"272":{"position":[[66,7]]},"274":{"position":[[298,8],[710,7],[845,8],[902,7]]},"278":{"position":[[213,7],[687,7],[757,7]]},"333":{"position":[[177,7]]},"351":{"position":[[52,8]]},"355":{"position":[[120,8]]},"363":{"position":[[181,10],[567,7]]},"367":{"position":[[119,8]]},"371":{"position":[[184,8]]},"449":{"position":[[49,8],[101,8]]},"463":{"position":[[340,8]]},"473":{"position":[[160,8]]},"475":{"position":[[324,8]]},"521":{"position":[[107,8]]},"523":{"position":[[136,8]]},"558":{"position":[[134,8]]},"560":{"position":[[137,8]]},"579":{"position":[[177,8]]},"581":{"position":[[179,8]]},"583":{"position":[[179,8]]},"585":{"position":[[179,8]]},"588":{"position":[[56,7]]},"629":{"position":[[121,8]]},"631":{"position":[[125,8]]},"633":{"position":[[126,8]]},"649":{"position":[[306,7]]},"651":{"position":[[408,8]]},"659":{"position":[[198,8]]},"701":{"position":[[139,8]]},"703":{"position":[[154,10]]},"729":{"position":[[150,8]]}}}],["defer",{"_index":1241,"t":{"245":{"position":[[666,5]]}}}],["defin",{"_index":28,"t":{"5":{"position":[[50,8]]},"7":{"position":[[302,6]]},"9":{"position":[[35,7]]},"11":{"position":[[114,8]]},"13":{"position":[[633,8]]},"17":{"position":[[26,8]]},"33":{"position":[[6,7],[641,7],[704,7]]},"53":{"position":[[112,7]]},"57":{"position":[[1646,8]]},"128":{"position":[[39,7],[55,7],[80,7],[213,7],[317,7]]},"130":{"position":[[148,7]]},"139":{"position":[[435,6]]},"153":{"position":[[535,6]]},"155":{"position":[[485,6]]},"157":{"position":[[482,6]]},"245":{"position":[[277,6]]},"247":{"position":[[119,7]]},"327":{"position":[[557,8]]},"333":{"position":[[401,6]]},"351":{"position":[[61,6]]}}}],["definit",{"_index":741,"t":{"57":{"position":[[1177,10]]},"139":{"position":[[258,10]]},"349":{"position":[[137,10]]}}}],["deflat",{"_index":1484,"t":{"305":{"position":[[489,9]]}}}],["delimit",{"_index":364,"t":{"31":{"position":[[200,7]]},"43":{"position":[[409,10]]},"83":{"position":[[98,10]]},"278":{"position":[[320,9]]},"292":{"position":[[201,7]]},"347":{"position":[[136,7]]}}}],["demonstr",{"_index":2396,"t":{"767":{"position":[[722,13]]}}}],["depend",{"_index":1380,"t":{"284":{"position":[[25,7]]},"333":{"position":[[229,9]]}}}],["deprec",{"_index":360,"t":{"31":{"position":[[52,10]]},"33":{"position":[[503,10],[542,10],[587,10],[658,10]]},"39":{"position":[[3116,10],[3199,10],[3281,10],[3329,10]]},"57":{"position":[[457,10]]},"67":{"position":[[259,10],[361,10]]}}}],["deprecated/remov",{"_index":2376,"t":{"761":{"position":[[69,18]]}}}],["depth",{"_index":1524,"t":{"321":{"position":[[312,5]]}}}],["deriv",{"_index":2112,"t":{"613":{"position":[[527,6]]},"617":{"position":[[552,6]]}}}],["design",{"_index":908,"t":{"97":{"position":[[203,6],[279,6]]},"303":{"position":[[378,8]]},"451":{"position":[[17,8]]}}}],["desir",{"_index":898,"t":{"95":{"position":[[212,7]]},"503":{"position":[[76,7]]},"507":{"position":[[85,7]]},"509":{"position":[[68,7]]},"651":{"position":[[65,7],[236,7]]}}}],["despit",{"_index":551,"t":{"39":{"position":[[1899,7]]},"270":{"position":[[251,7]]},"278":{"position":[[388,7]]}}}],["destructur",{"_index":662,"t":{"49":{"position":[[12,13],[86,13]]},"203":{"position":[[0,13]]},"211":{"position":[[6,13]]}}}],["detail",{"_index":561,"t":{"39":{"position":[[2198,7]]},"49":{"position":[[1407,8]]},"57":{"position":[[1916,8]]},"79":{"position":[[444,6]]},"451":{"position":[[249,11],[269,7],[984,11],[1021,7]]},"453":{"position":[[300,11],[320,7],[408,11],[434,7]]}}}],["detect",{"_index":118,"t":{"13":{"position":[[10,6]]},"39":{"position":[[1381,9]]},"445":{"position":[[178,8],[227,8]]}}}],["determin",{"_index":1097,"t":{"171":{"position":[[428,9]]},"729":{"position":[[211,10]]}}}],["dev",{"_index":1790,"t":{"457":{"position":[[181,5],[241,3]]}}}],["dev/nul",{"_index":937,"t":{"108":{"position":[[157,9],[346,9]]}}}],["dev/urandom",{"_index":2044,"t":{"588":{"position":[[102,13]]}}}],["develop",{"_index":948,"t":{"108":{"position":[[495,10]]},"110":{"position":[[158,10]]},"112":{"position":[[103,11]]},"323":{"position":[[1153,10]]},"327":{"position":[[76,11]]}}}],["deviat",{"_index":911,"t":{"97":{"position":[[258,9]]}}}],["di",{"_index":1232,"t":{"239":{"position":[[204,4]]}}}],["dialog",{"_index":989,"t":{"118":{"position":[[139,7]]}}}],["differ",{"_index":1069,"t":{"155":{"position":[[246,9]]},"253":{"position":[[41,9]]}}}],["difficult",{"_index":1427,"t":{"292":{"position":[[445,9]]}}}],["digit",{"_index":2028,"t":{"579":{"position":[[166,7]]},"581":{"position":[[168,7]]},"583":{"position":[[168,7]]},"585":{"position":[[168,7]]},"657":{"position":[[276,7],[556,5]]}}}],["dir/main",{"_index":1889,"t":{"487":{"position":[[127,13]]}}}],["direct",{"_index":675,"t":{"49":{"position":[[889,6]]},"729":{"position":[[39,9]]},"733":{"position":[[10,9]]}}}],["directli",{"_index":917,"t":{"101":{"position":[[97,8]]},"282":{"position":[[435,8]]}}}],["directori",{"_index":787,"t":{"67":{"position":[[238,9]]},"116":{"position":[[543,10]]},"118":{"position":[[227,10]]},"120":{"position":[[147,10]]},"122":{"position":[[72,10],[198,10],[367,9]]},"487":{"position":[[97,10],[220,12]]},"491":{"position":[[116,10]]},"493":{"position":[[9,10],[53,10],[101,9],[190,12],[236,12]]},"495":{"position":[[28,10],[72,10],[134,12]]},"497":{"position":[[10,9],[52,11],[124,10]]},"509":{"position":[[31,10],[92,10],[249,10]]}}}],["disabl",{"_index":24,"t":{"5":{"position":[[8,7]]},"39":{"position":[[967,8],[3676,8],[3860,8]]},"155":{"position":[[284,7]]},"167":{"position":[[24,10],[344,7],[597,7]]},"169":{"position":[[3,7],[113,7],[170,7]]},"321":{"position":[[190,7]]},"323":{"position":[[154,7]]},"325":{"position":[[242,9]]},"327":{"position":[[533,7]]},"351":{"position":[[40,8]]}}}],["disable/en",{"_index":775,"t":{"61":{"position":[[338,14]]}}}],["disallow",{"_index":355,"t":{"29":{"position":[[310,11]]},"77":{"position":[[115,10]]},"264":{"position":[[165,11]]}}}],["discard",{"_index":397,"t":{"33":{"position":[[251,10]]},"163":{"position":[[76,10],[210,10],[269,10]]},"215":{"position":[[93,10],[202,10],[261,10]]}}}],["discuss",{"_index":1255,"t":{"253":{"position":[[19,9]]}}}],["dispatch",{"_index":1828,"t":{"463":{"position":[[1965,11]]}}}],["disregard",{"_index":659,"t":{"47":{"position":[[93,12]]}}}],["dissect",{"_index":2210,"t":{"671":{"position":[[67,10]]}}}],["divis",{"_index":1435,"t":{"297":{"position":[[111,9],[132,9]]},"391":{"position":[[9,8]]},"393":{"position":[[9,8]]}}}],["divison",{"_index":1665,"t":{"395":{"position":[[9,7]]}}}],["djb2",{"_index":1971,"t":{"544":{"position":[[41,4]]},"548":{"position":[[24,4]]}}}],["dll/so",{"_index":75,"t":{"9":{"position":[[88,6]]}}}],["dll/so/c",{"_index":622,"t":{"39":{"position":[[3873,8]]}}}],["do",{"_index":2063,"t":{"592":{"position":[[157,6]]},"594":{"position":[[158,6]]},"598":{"position":[[125,6]]},"600":{"position":[[92,6]]},"611":{"position":[[117,6]]},"613":{"position":[[118,6]]},"625":{"position":[[231,7],[339,8],[603,8]]}}}],["do...end",{"_index":1162,"t":{"213":{"position":[[476,9]]}}}],["document",{"_index":12,"t":{"2":{"position":[[130,10]]},"39":{"position":[[3977,14]]},"49":{"position":[[1416,13]]},"57":{"position":[[1925,13]]},"85":{"position":[[608,13]]},"99":{"position":[[5,8]]},"114":{"position":[[233,10]]},"401":{"position":[[10,9]]},"439":{"position":[[10,9]]},"477":{"position":[[10,9]]},"525":{"position":[[10,9]]},"533":{"position":[[10,9]]},"619":{"position":[[10,9]]},"735":{"position":[[10,9]]}}}],["doe",{"_index":1758,"t":{"451":{"position":[[242,6],[343,6]]},"453":{"position":[[293,6],[473,6]]}}}],["doesn't",{"_index":1047,"t":{"143":{"position":[[46,7]]},"171":{"position":[[480,7]]},"315":{"position":[[3,7]]}}}],["dofil",{"_index":40,"t":{"7":{"position":[[94,6]]},"63":{"position":[[95,7]]}}}],["domain",{"_index":2223,"t":{"675":{"position":[[103,6]]}}}],["don't",{"_index":176,"t":{"13":{"position":[[1127,5]]},"245":{"position":[[271,5]]},"315":{"position":[[347,5]]},"421":{"position":[[186,5]]},"423":{"position":[[190,5]]}}}],["done",{"_index":2380,"t":{"763":{"position":[[117,4]]}}}],["dont_make_reus",{"_index":1820,"t":{"463":{"position":[[1231,19]]}}}],["dont_reus",{"_index":1812,"t":{"463":{"position":[[888,11]]}}}],["dot",{"_index":2320,"t":{"723":{"position":[[13,3]]}}}],["down",{"_index":8,"t":{"2":{"position":[[77,4]]},"729":{"position":[[490,4]]}}}],["download",{"_index":1390,"t":{"284":{"position":[[407,11]]}}}],["dozen",{"_index":896,"t":{"95":{"position":[[199,5]]}}}],["drop",{"_index":1516,"t":{"317":{"position":[[109,4]]}}}],["due",{"_index":140,"t":{"13":{"position":[[390,3]]},"37":{"position":[[392,3]]},"61":{"position":[[400,3]]},"71":{"position":[[134,3]]},"153":{"position":[[83,3]]},"155":{"position":[[50,3]]},"253":{"position":[[51,3]]},"463":{"position":[[2055,3]]}}}],["dump",{"_index":185,"t":{"17":{"position":[[3,4],[171,4],[266,5]]},"23":{"position":[[309,7]]},"79":{"position":[[398,7]]},"89":{"position":[[9,4]]},"451":{"position":[[29,4],[95,5]]},"453":{"position":[[138,5]]}}}],["dumpvar",{"_index":488,"t":{"37":{"position":[[211,7]]},"39":{"position":[[2290,7]]},"305":{"position":[[176,7]]},"453":{"position":[[11,8]]}}}],["duplic",{"_index":797,"t":{"69":{"position":[[66,10]]},"91":{"position":[[32,9]]},"137":{"position":[[157,9]]},"139":{"position":[[135,9]]},"141":{"position":[[183,9]]}}}],["dure",{"_index":1082,"t":{"165":{"position":[[46,6]]},"177":{"position":[[0,6]]},"290":{"position":[[345,6]]},"329":{"position":[[53,6]]}}}],["dynam",{"_index":1596,"t":{"341":{"position":[[191,7]]}}}],["e",{"_index":1248,"t":{"251":{"position":[[166,1],[430,1]]},"286":{"position":[[416,1]]},"469":{"position":[[236,1]]},"609":{"position":[[238,3],[586,5]]},"613":{"position":[[739,1]]},"617":{"position":[[764,1]]}}}],["e.g",{"_index":401,"t":{"33":{"position":[[362,5]]},"39":{"position":[[95,4],[2046,4]]},"49":{"position":[[763,4],[937,4]]},"167":{"position":[[497,4]]},"241":{"position":[[52,4]]},"282":{"position":[[201,4]]},"292":{"position":[[124,4],[223,4],[333,4]]},"303":{"position":[[424,4]]},"457":{"position":[[229,5]]},"463":{"position":[[386,4]]}}}],["e:find(\"what",{"_index":1411,"t":{"286":{"position":[[426,12]]}}}],["each",{"_index":262,"t":{"23":{"position":[[245,4]]},"165":{"position":[[13,4]]},"205":{"position":[[90,4]]},"207":{"position":[[106,4]]},"449":{"position":[[70,4]]},"590":{"position":[[103,4]]},"657":{"position":[[551,4]]},"679":{"position":[[245,4]]},"713":{"position":[[50,4]]},"725":{"position":[[36,4]]},"751":{"position":[[112,4]]},"777":{"position":[[144,4]]}}}],["earlier",{"_index":1046,"t":{"141":{"position":[[315,7]]}}}],["eas",{"_index":1631,"t":{"363":{"position":[[646,4]]},"469":{"position":[[123,4]]},"703":{"position":[[718,4]]}}}],["easi",{"_index":1219,"t":{"237":{"position":[[14,4]]}}}],["easier",{"_index":1850,"t":{"469":{"position":[[33,6]]},"503":{"position":[[392,6]]},"657":{"position":[[31,6]]}}}],["easiest",{"_index":915,"t":{"101":{"position":[[4,7]]}}}],["easili",{"_index":922,"t":{"106":{"position":[[8,6]]},"108":{"position":[[8,6]]},"116":{"position":[[352,6]]},"511":{"position":[[61,6]]}}}],["ecb",{"_index":2080,"t":{"598":{"position":[[57,3],[96,4]]},"600":{"position":[[24,3],[63,4],[470,3],[583,3]]}}}],["echo",{"_index":938,"t":{"108":{"position":[[167,4]]}}}],["ecosystem",{"_index":1557,"t":{"327":{"position":[[700,9]]}}}],["edg",{"_index":777,"t":{"61":{"position":[[415,4]]}}}],["edit",{"_index":1315,"t":{"264":{"position":[[181,5]]},"335":{"position":[[124,4]]}}}],["editor",{"_index":1371,"t":{"282":{"position":[[270,6],[359,6],[452,6]]},"284":{"position":[[41,7],[501,6],[536,6]]}}}],["ee8410a8bf9511b94fd6669b5c3e0c4b86e8e4bf7baa8dbd2773d4d6381dd1aecebbe391bef4c6158620ab3f6b794907652d4432c2301d7e1a6caf520565cdf2",{"_index":2041,"t":{"585":{"position":[[282,131]]}}}],["effect",{"_index":1422,"t":{"290":{"position":[[293,6]]},"649":{"position":[[323,11]]}}}],["effortlessli",{"_index":2302,"t":{"713":{"position":[[22,12]]}}}],["element",{"_index":1139,"t":{"199":{"position":[[289,8],[443,7],[494,7],[630,7]]},"703":{"position":[[1062,8],[1080,7]]},"741":{"position":[[22,8]]},"743":{"position":[[11,8]]},"749":{"position":[[33,8],[78,7]]},"751":{"position":[[13,7],[117,8],[139,7]]},"753":{"position":[[19,8]]},"761":{"position":[[155,8]]},"777":{"position":[[36,9],[149,8]]}}}],["elimin",{"_index":73,"t":{"9":{"position":[[54,9]]},"763":{"position":[[102,11],[377,11]]}}}],["elipsi",{"_index":2170,"t":{"651":{"position":[[54,7],[187,8]]}}}],["emit",{"_index":782,"t":{"65":{"position":[[234,8]]},"290":{"position":[[234,4]]},"347":{"position":[[68,7]]},"349":{"position":[[71,7]]}}}],["emoji",{"_index":2151,"t":{"635":{"position":[[221,7]]}}}],["empti",{"_index":246,"t":{"23":{"position":[[35,5],[52,5]]},"83":{"position":[[70,5]]},"463":{"position":[[1575,5]]},"505":{"position":[[156,8]]}}}],["en_us.utf",{"_index":2164,"t":{"647":{"position":[[60,9]]}}}],["enabl",{"_index":95,"t":{"11":{"position":[[103,7]]},"17":{"position":[[15,7]]},"33":{"position":[[2290,6]]},"39":{"position":[[369,7],[1002,7]]},"53":{"position":[[366,7]]},"67":{"position":[[495,7]]},"91":{"position":[[542,7]]},"139":{"position":[[355,6]]},"153":{"position":[[455,6]]},"155":{"position":[[405,6]]},"157":{"position":[[402,6]]},"161":{"position":[[42,7]]},"167":{"position":[[35,9],[108,8],[403,6],[505,6],[585,6]]},"175":{"position":[[95,6]]},"187":{"position":[[83,6]]},"189":{"position":[[83,6]]},"191":{"position":[[27,8]]},"197":{"position":[[89,6]]},"253":{"position":[[187,6]]},"280":{"position":[[89,6]]},"288":{"position":[[96,6]]},"323":{"position":[[965,6]]},"333":{"position":[[166,7]]},"351":{"position":[[140,6],[202,6]]}}}],["enc",{"_index":2074,"t":{"594":{"position":[[574,3]]},"600":{"position":[[435,3]]},"606":{"position":[[617,4]]},"613":{"position":[[791,3]]}}}],["encapsul",{"_index":1345,"t":{"276":{"position":[[311,12]]}}}],["enclos",{"_index":550,"t":{"39":{"position":[[1799,9]]},"132":{"position":[[85,9]]},"173":{"position":[[85,9]]}}}],["encod",{"_index":305,"t":{"25":{"position":[[560,8]]},"39":{"position":[[2224,7]]},"63":{"position":[[125,7]]},"65":{"position":[[206,7]]},"305":{"position":[[465,10]]},"355":{"position":[[11,7],[73,7]]},"359":{"position":[[65,8]]},"361":{"position":[[57,6]]},"367":{"position":[[17,7],[72,7]]},"371":{"position":[[20,7],[137,7]]},"473":{"position":[[84,6],[794,6]]},"475":{"position":[[619,8],[673,7],[869,7],[1049,7],[1270,8]]},"667":{"position":[[14,7],[59,8]]},"701":{"position":[[65,6]]}}}],["encompass",{"_index":1531,"t":{"323":{"position":[[826,12]]}}}],["encrypt",{"_index":2056,"t":{"590":{"position":[[108,10]]},"592":{"position":[[34,10]]},"594":{"position":[[454,7]]},"598":{"position":[[34,10]]},"600":{"position":[[391,7]]},"602":{"position":[[91,10]]},"604":{"position":[[34,10],[185,10]]},"606":{"position":[[264,9],[497,7]]},"611":{"position":[[34,10],[198,7]]},"613":{"position":[[181,9],[777,7]]}}}],["end",{"_index":142,"t":{"13":{"position":[[422,3],[502,3]]},"19":{"position":[[171,3]]},"33":{"position":[[387,4]]},"130":{"position":[[268,4]]},"132":{"position":[[288,3],[449,3],[453,3]]},"137":{"position":[[125,3]]},"145":{"position":[[119,3],[123,3]]},"147":{"position":[[110,3]]},"159":{"position":[[151,3],[596,3]]},"163":{"position":[[168,3]]},"167":{"position":[[421,3]]},"169":{"position":[[203,3]]},"171":{"position":[[292,3],[329,3]]},"173":{"position":[[123,3],[176,3],[314,3],[487,3],[491,3]]},"177":{"position":[[163,3],[344,3],[360,3]]},"179":{"position":[[86,3],[292,3]]},"181":{"position":[[132,3]]},"183":{"position":[[163,3],[229,3]]},"185":{"position":[[75,3]]},"193":{"position":[[179,3],[342,3]]},"195":{"position":[[169,3],[291,3],[355,3],[522,3],[529,3],[579,3]]},"213":{"position":[[164,4],[568,3]]},"215":{"position":[[160,3],[439,3]]},"217":{"position":[[219,3]]},"219":{"position":[[258,3]]},"229":{"position":[[280,4]]},"233":{"position":[[117,3],[140,3],[163,3],[272,4],[291,4],[310,3]]},"235":{"position":[[171,3]]},"237":{"position":[[196,3]]},"239":{"position":[[163,3],[226,3],[230,3]]},"241":{"position":[[157,3],[161,3]]},"243":{"position":[[90,3],[121,3]]},"245":{"position":[[227,3],[231,3],[486,3],[490,3]]},"247":{"position":[[239,3],[277,3],[281,3]]},"249":{"position":[[222,3],[260,3],[264,3]]},"251":{"position":[[125,3],[156,3],[420,3]]},"256":{"position":[[670,3]]},"258":{"position":[[174,3],[555,3]]},"262":{"position":[[187,3],[191,3],[340,3],[344,3]]},"264":{"position":[[911,3],[915,3]]},"268":{"position":[[156,3]]},"274":{"position":[[122,3],[341,3],[631,3],[889,3]]},"276":{"position":[[119,3],[258,3],[388,3],[583,3]]},"278":{"position":[[237,3],[589,4],[594,3]]},"286":{"position":[[324,3],[328,3],[478,3],[482,3],[486,3]]},"290":{"position":[[195,3]]},"299":{"position":[[262,3],[502,3],[521,3],[756,3]]},"301":{"position":[[197,3],[391,3],[395,3],[533,3],[613,3],[624,3]]},"309":{"position":[[172,3]]},"327":{"position":[[294,3],[1074,3]]},"339":{"position":[[207,3],[437,3]]},"343":{"position":[[393,3],[419,3]]},"347":{"position":[[59,3],[195,3]]},"445":{"position":[[336,3],[355,3]]},"449":{"position":[[165,4]]},"463":{"position":[[2433,3]]},"465":{"position":[[523,4],[603,4]]},"469":{"position":[[317,3]]},"483":{"position":[[371,3]]},"487":{"position":[[233,3]]},"489":{"position":[[222,3]]},"491":{"position":[[230,3]]},"493":{"position":[[249,3]]},"495":{"position":[[260,3]]},"505":{"position":[[165,3]]},"519":{"position":[[351,4],[550,4]]},"521":{"position":[[399,4]]},"523":{"position":[[359,3],[421,4]]},"629":{"position":[[37,4]]},"661":{"position":[[19,4]]},"679":{"position":[[506,4]]},"689":{"position":[[810,3]]},"697":{"position":[[336,3]]},"771":{"position":[[116,4]]}}}],["enforc",{"_index":1023,"t":{"128":{"position":[[226,8]]}}}],["english",{"_index":1826,"t":{"463":{"position":[[1688,7]]}}}],["enhanc",{"_index":894,"t":{"95":{"position":[[150,8]]},"282":{"position":[[116,7]]},"345":{"position":[[35,9]]}}}],["enough",{"_index":1056,"t":{"149":{"position":[[72,6]]}}}],["ensur",{"_index":610,"t":{"39":{"position":[[3431,6]]},"266":{"position":[[173,6]]},"590":{"position":[[130,6]]},"647":{"position":[[80,7]]}}}],["enter",{"_index":1385,"t":{"284":{"position":[[276,6]]}}}],["entir",{"_index":1173,"t":{"221":{"position":[[28,8]]},"290":{"position":[[336,8]]},"315":{"position":[[446,8]]},"635":{"position":[[22,8]]},"637":{"position":[[22,8]]},"639":{"position":[[22,8]]},"641":{"position":[[22,8]]},"643":{"position":[[22,8]]},"645":{"position":[[25,8]]}}}],["entiti",{"_index":1234,"t":{"243":{"position":[[75,6],[114,6]]},"245":{"position":[[176,6],[255,6]]},"251":{"position":[[118,6],[149,6],[174,8],[224,7],[294,7],[413,6],[438,8],[467,8]]}}}],["entri",{"_index":2281,"t":{"701":{"position":[[250,8],[336,7],[373,6],[414,8]]},"703":{"position":[[279,9],[289,6],[333,8],[342,10],[408,10],[476,8],[796,10],[829,8],[1178,8],[1187,8],[1297,8],[1349,8]]}}}],["entry>primaryjg",{"_index":2082,"t":{"600":{"position":[[522,18]]}}}],["q",{"_index":2097,"t":{"609":{"position":[[283,3],[730,5]]},"613":{"position":[[425,1]]},"617":{"position":[[450,1]]}}}],["qo",{"_index":929,"t":{"108":{"position":[[55,2]]}}}],["qol",{"_index":1543,"t":{"327":{"position":[[56,3]]}}}],["queri",{"_index":1839,"t":{"465":{"position":[[0,7]]},"671":{"position":[[416,9]]}}}],["quick",{"_index":1530,"t":{"323":{"position":[[820,5]]}}}],["quicker",{"_index":1601,"t":{"345":{"position":[[149,8]]}}}],["quickli",{"_index":1453,"t":{"303":{"position":[[87,7]]}}}],["quit",{"_index":1055,"t":{"149":{"position":[[59,5]]}}}],["quot",{"_index":656,"t":{"47":{"position":[[51,6]]}}}],["quotient",{"_index":1660,"t":{"391":{"position":[[59,8]]},"393":{"position":[[64,9]]}}}],["r",{"_index":1166,"t":{"217":{"position":[[132,4],[304,3]]},"219":{"position":[[171,4],[336,3]]},"625":{"position":[[245,1],[288,4],[500,1],[552,4]]}}}],["r(a",{"_index":219,"t":{"19":{"position":[[296,4]]}}}],["rai",{"_index":1084,"t":{"167":{"position":[[172,6]]}}}],["raii",{"_index":475,"t":{"33":{"position":[[2513,4]]}}}],["rais",{"_index":292,"t":{"25":{"position":[[339,7]]},"37":{"position":[[458,6]]},"43":{"position":[[95,7]]},"137":{"position":[[8,6]]},"139":{"position":[[8,6]]},"141":{"position":[[8,6]]},"143":{"position":[[8,6]]},"145":{"position":[[8,6]]},"147":{"position":[[8,6]]},"149":{"position":[[8,6]]},"151":{"position":[[8,6]]},"153":{"position":[[8,6]]},"155":{"position":[[8,6]]},"157":{"position":[[8,6]]},"159":{"position":[[8,6]]},"161":{"position":[[8,6]]},"163":{"position":[[8,6]]},"191":{"position":[[68,6]]},"215":{"position":[[61,6]]},"433":{"position":[[31,5],[236,6],[461,7]]},"435":{"position":[[27,5],[241,5]]},"437":{"position":[[22,6],[352,5],[382,5]]},"459":{"position":[[58,6]]},"479":{"position":[[34,6]]},"481":{"position":[[34,6]]}}}],["ran",{"_index":1049,"t":{"145":{"position":[[50,4]]}}}],["random",{"_index":1144,"t":{"199":{"position":[[593,8],[611,8]]},"327":{"position":[[367,8]]},"588":{"position":[[335,11]]}}}],["rang",{"_index":417,"t":{"33":{"position":[[1080,5]]},"455":{"position":[[40,6]]},"588":{"position":[[422,6]]}}}],["range(16):map",{"_index":2071,"t":{"594":{"position":[[473,16]]},"606":{"position":[[516,16]]}}}],["rare",{"_index":654,"t":{"45":{"position":[[181,4]]}}}],["raw",{"_index":2025,"t":{"579":{"position":[[121,3]]},"581":{"position":[[123,3]]},"583":{"position":[[123,3]]},"585":{"position":[[123,3]]}}}],["rawget",{"_index":1559,"t":{"327":{"position":[[751,6],[928,6]]}}}],["rawget(opt",{"_index":1568,"t":{"327":{"position":[[1046,12]]}}}],["rawset(frozen",{"_index":1324,"t":{"264":{"position":[[561,14]]}}}],["re",{"_index":409,"t":{"33":{"position":[[723,2]]},"39":{"position":[[999,2]]},"61":{"position":[[91,2]]},"311":{"position":[[165,5],[197,7]]}}}],["read",{"_index":370,"t":{"31":{"position":[[323,4],[517,4]]},"657":{"position":[[41,4]]}}}],["readabl",{"_index":1177,"t":{"225":{"position":[[67,9]]},"451":{"position":[[52,8]]},"473":{"position":[[135,8]]},"701":{"position":[[115,8]]}}}],["reason",{"_index":1533,"t":{"323":{"position":[[1262,8]]},"463":{"position":[[1675,6]]}}}],["reassign",{"_index":1321,"t":{"264":{"position":[[469,8]]}}}],["rebas",{"_index":881,"t":{"91":{"position":[[813,7]]}}}],["receiv",{"_index":1681,"t":{"409":{"position":[[306,8]]},"411":{"position":[[321,8]]},"413":{"position":[[329,8]]},"415":{"position":[[419,8]]},"417":{"position":[[510,8]]},"419":{"position":[[335,8]]},"421":{"position":[[642,8],[894,8]]},"685":{"position":[[0,7],[118,8]]},"687":{"position":[[43,7]]}}}],["recogn",{"_index":633,"t":{"41":{"position":[[191,11]]}}}],["recommend",{"_index":1532,"t":{"323":{"position":[[1226,9]]}}}],["record",{"_index":2242,"t":{"685":{"position":[[184,7]]}}}],["recurs",{"_index":490,"t":{"37":{"position":[[244,9]]},"53":{"position":[[143,9]]},"495":{"position":[[122,7]]}}}],["red",{"_index":1273,"t":{"256":{"position":[[561,3],[664,5]]}}}],["reduc",{"_index":187,"t":{"17":{"position":[[86,6]]},"249":{"position":[[132,6]]}}}],["reduce(math.max",{"_index":2406,"t":{"775":{"position":[[145,17]]}}}],["reduce(math.min",{"_index":2402,"t":{"773":{"position":[[146,17]]}}}],["refer",{"_index":1646,"t":{"371":{"position":[[62,7]]},"421":{"position":[[102,9],[192,9]]},"423":{"position":[[106,9],[196,9]]},"433":{"position":[[93,10]]},"435":{"position":[[89,10]]},"437":{"position":[[199,10]]}}}],["reflect",{"_index":733,"t":{"57":{"position":[[659,10]]},"183":{"position":[[75,7]]}}}],["refresh",{"_index":1582,"t":{"335":{"position":[[93,9]]}}}],["reg",{"_index":1609,"t":{"351":{"position":[[259,3]]}}}],["reg_dword",{"_index":1613,"t":{"351":{"position":[[310,9]]}}}],["regard",{"_index":354,"t":{"29":{"position":[[299,7]]}}}],["regardless",{"_index":1538,"t":{"325":{"position":[[38,10]]},"333":{"position":[[290,11]]}}}],["regist",{"_index":781,"t":{"65":{"position":[[102,9]]},"341":{"position":[[153,10]]}}}],["regress",{"_index":342,"t":{"29":{"position":[[27,11]]},"53":{"position":[[438,10]]},"75":{"position":[[8,10]]}}}],["reindent",{"_index":1374,"t":{"282":{"position":[[383,9]]}}}],["rel",{"_index":1905,"t":{"499":{"position":[[10,8]]},"501":{"position":[[32,8]]}}}],["relat",{"_index":358,"t":{"29":{"position":[[340,7]]}}}],["relationship",{"_index":67,"t":{"7":{"position":[[565,12]]}}}],["releas",{"_index":243,"t":{"21":{"position":[[43,8]]},"29":{"position":[[5,7]]},"103":{"position":[[93,8]]},"108":{"position":[[642,9]]},"130":{"position":[[253,7]]},"457":{"position":[[212,7]]}}}],["relev",{"_index":1522,"t":{"321":{"position":[[55,8]]}}}],["reli",{"_index":177,"t":{"13":{"position":[[1133,4]]},"57":{"position":[[412,4]]}}}],["reliabl",{"_index":166,"t":{"13":{"position":[[924,8]]}}}],["remain",{"_index":643,"t":{"43":{"position":[[152,6]]}}}],["remaind",{"_index":1661,"t":{"391":{"position":[[72,10]]},"395":{"position":[[63,10]]}}}],["remap",{"_index":2386,"t":{"767":{"position":[[0,6]]}}}],["remark",{"_index":892,"t":{"95":{"position":[[88,10]]}}}],["rememb",{"_index":1335,"t":{"274":{"position":[[422,8],[985,8]]}}}],["remot",{"_index":1816,"t":{"463":{"position":[[1122,6],[1318,6],[1434,6],[2005,6],[2172,6]]},"465":{"position":[[54,7],[160,7]]},"689":{"position":[[174,7],[287,6]]}}}],["remov",{"_index":472,"t":{"33":{"position":[[2414,7]]},"35":{"position":[[179,7]]},"39":{"position":[[3616,7]]},"57":{"position":[[449,7],[510,7]]},"61":{"position":[[178,7],[371,7]]},"67":{"position":[[344,7]]},"341":{"position":[[6,7]]},"451":{"position":[[884,10]]},"743":{"position":[[0,6]]},"763":{"position":[[311,7]]}}}],["renam",{"_index":595,"t":{"39":{"position":[[3002,7],[3031,7]]}}}],["reorder",{"_index":2371,"t":{"757":{"position":[[0,8]]}}}],["repeat",{"_index":368,"t":{"31":{"position":[[291,6]]},"91":{"position":[[556,6]]}}}],["repl",{"_index":632,"t":{"41":{"position":[[182,4]]}}}],["replac",{"_index":408,"t":{"33":{"position":[[691,9]]},"59":{"position":[[87,7]]},"65":{"position":[[75,8]]},"266":{"position":[[270,7]]},"317":{"position":[[117,11]]},"649":{"position":[[0,7],[185,8],[211,11],[270,12],[408,12]]},"651":{"position":[[170,8],[315,7]]}}}],["replic",{"_index":1754,"t":{"449":{"position":[[481,9]]}}}],["repo",{"_index":943,"t":{"108":{"position":[[272,5]]}}}],["repo/key.gpg",{"_index":932,"t":{"108":{"position":[[94,12]]}}}],["report",{"_index":311,"t":{"27":{"position":[[93,9]]},"31":{"position":[[783,9]]},"61":{"position":[[250,9]]},"292":{"position":[[534,6]]},"523":{"position":[[99,7]]}}}],["repositori",{"_index":958,"t":{"110":{"position":[[26,10]]},"112":{"position":[[46,10]]},"114":{"position":[[119,11]]},"118":{"position":[[7,10]]},"284":{"position":[[459,10]]}}}],["repres",{"_index":1465,"t":{"305":{"position":[[29,9]]},"363":{"position":[[16,12],[108,9]]},"453":{"position":[[88,11]]},"499":{"position":[[207,12]]},"501":{"position":[[106,12]]},"657":{"position":[[111,12],[1169,9]]},"703":{"position":[[16,12]]}}}],["represent",{"_index":575,"t":{"39":{"position":[[2552,15]]},"363":{"position":[[582,15],[782,15]]},"379":{"position":[[59,14]]},"381":{"position":[[23,14]]},"383":{"position":[[18,14]]},"451":{"position":[[119,14]]},"657":{"position":[[200,14]]},"709":{"position":[[59,14]]}}}],["request",{"_index":588,"t":{"39":{"position":[[2920,7],[3498,7]]},"335":{"position":[[48,7]]},"463":{"position":[[17,8],[56,7],[317,7],[452,7],[1090,8],[1353,8],[1387,8],[1453,9],[1947,7],[1992,7],[2151,8]]}}}],["requir",{"_index":41,"t":{"7":{"position":[[105,7],[492,8]]},"9":{"position":[[123,7],[286,7]]},"39":{"position":[[3392,7]]},"63":{"position":[[86,8]]},"116":{"position":[[12,8]]},"122":{"position":[[330,7]]},"211":{"position":[[35,7],[138,7]]},"239":{"position":[[71,7]]},"305":{"position":[[100,7]]},"323":{"position":[[732,8]]},"327":{"position":[[710,7]]},"353":{"position":[[21,8]]},"359":{"position":[[32,7]]},"361":{"position":[[90,7]]},"363":{"position":[[210,7],[831,7],[1059,7]]},"365":{"position":[[21,8]]},"375":{"position":[[21,8]]},"377":{"position":[[154,7]]},"381":{"position":[[74,7]]},"383":{"position":[[69,7]]},"391":{"position":[[104,7]]},"393":{"position":[[95,7]]},"395":{"position":[[95,7]]},"397":{"position":[[84,7]]},"399":{"position":[[94,7]]},"407":{"position":[[21,8]]},"461":{"position":[[21,8]]},"463":{"position":[[2228,7]]},"465":{"position":[[407,7]]},"471":{"position":[[21,8]]},"511":{"position":[[36,7]]},"523":{"position":[[259,7]]},"541":{"position":[[21,8]]},"594":{"position":[[389,7]]},"600":{"position":[[326,7]]},"606":{"position":[[400,7]]},"609":{"position":[[84,12],[129,12]]},"613":{"position":[[294,7]]},"617":{"position":[[319,7]]},"665":{"position":[[21,8]]},"673":{"position":[[21,8]]},"679":{"position":[[301,7]]},"685":{"position":[[399,7]]},"687":{"position":[[181,7]]},"689":{"position":[[544,7]]},"697":{"position":[[163,7]]},"699":{"position":[[21,8]]},"701":{"position":[[176,7]]},"703":{"position":[[232,7],[1130,7]]},"705":{"position":[[21,8]]},"707":{"position":[[63,7],[330,7]]},"711":{"position":[[180,7]]},"713":{"position":[[84,7]]},"723":{"position":[[86,7]]},"725":{"position":[[93,7]]},"727":{"position":[[87,7]]},"729":{"position":[[323,7]]},"731":{"position":[[107,7]]},"733":{"position":[[100,7]]}}}],["require\"pluto:schedul",{"_index":1939,"t":{"519":{"position":[[237,26]]},"521":{"position":[[184,26]]}}}],["require\"pluto:url",{"_index":2205,"t":{"667":{"position":[[86,18]]},"669":{"position":[[115,18]]},"671":{"position":[[96,18]]}}}],["require\"pluto:vector3",{"_index":2306,"t":{"715":{"position":[[135,24]]},"717":{"position":[[65,24]]},"719":{"position":[[71,24]]},"721":{"position":[[72,24]]}}}],["require(\"assert",{"_index":1677,"t":{"409":{"position":[[160,17]]},"411":{"position":[[159,17]]},"413":{"position":[[163,17]]},"415":{"position":[[212,17]]},"417":{"position":[[327,17]]},"419":{"position":[[161,17]]},"421":{"position":[[462,17]]},"423":{"position":[[462,17]]},"425":{"position":[[201,17]]},"427":{"position":[[225,17]]},"429":{"position":[[208,17]]},"431":{"position":[[232,17]]},"433":{"position":[[274,17]]},"435":{"position":[[278,17]]},"437":{"position":[[469,17]]},"757":{"position":[[156,17]]}}}],["require(\"base64",{"_index":1641,"t":{"367":{"position":[[158,17]]},"369":{"position":[[98,17]]},"371":{"position":[[224,17]]},"373":{"position":[[112,17]]}}}],["require(\"crypto",{"_index":1972,"t":{"544":{"position":[[136,17]]},"546":{"position":[[119,17]]},"548":{"position":[[176,17]]},"550":{"position":[[119,17]]},"552":{"position":[[120,17]]},"554":{"position":[[177,17]]},"556":{"position":[[176,17]]},"558":{"position":[[235,17]]},"560":{"position":[[181,17]]},"562":{"position":[[122,17]]},"564":{"position":[[179,17]]},"566":{"position":[[179,17]]},"568":{"position":[[179,17]]},"570":{"position":[[180,17]]},"572":{"position":[[124,17]]},"574":{"position":[[124,17]]},"576":{"position":[[129,17]]},"579":{"position":[[222,17]]},"581":{"position":[[224,17]]},"583":{"position":[[224,17]]},"585":{"position":[[224,17]]},"588":{"position":[[450,17]]}}}],["require(\"crypto\").joaat(\"hello",{"_index":1005,"t":{"126":{"position":[[195,31],[434,31]]}}}],["require(\"json",{"_index":1856,"t":{"473":{"position":[[198,15],[761,15],[838,15]]},"475":{"position":[[591,15]]}}}],["require(\"pluto:libnam",{"_index":611,"t":{"39":{"position":[[3459,24]]}}}],["reserv",{"_index":686,"t":{"49":{"position":[[1249,8]]},"57":{"position":[[1802,8]]},"73":{"position":[[84,8]]},"85":{"position":[[143,8]]},"319":{"position":[[25,8],[234,8]]},"323":{"position":[[38,8],[1603,8]]},"343":{"position":[[24,8],[145,8],[258,8],[497,8]]}}}],["reset",{"_index":250,"t":{"23":{"position":[[97,9]]}}}],["resolv",{"_index":2224,"t":{"675":{"position":[[115,9]]}}}],["respect",{"_index":788,"t":{"67":{"position":[[330,13]]},"209":{"position":[[112,13]]},"449":{"position":[[387,10]]},"475":{"position":[[495,8]]},"537":{"position":[[26,10]]},"592":{"position":[[237,13]]},"594":{"position":[[238,13]]},"598":{"position":[[205,13]]},"600":{"position":[[206,13]]},"604":{"position":[[269,13]]},"606":{"position":[[174,13]]}}}],["respons",{"_index":1822,"t":{"463":{"position":[[1488,8],[1557,8]]},"751":{"position":[[87,11]]},"763":{"position":[[264,11]]},"767":{"position":[[104,11]]},"771":{"position":[[157,11]]},"777":{"position":[[119,11]]}}}],["rest",{"_index":1028,"t":{"130":{"position":[[343,4]]}}}],["restrict",{"_index":79,"t":{"9":{"position":[[211,12]]},"57":{"position":[[1422,11]]},"85":{"position":[[568,12]]}}}],["result",{"_index":318,"t":{"27":{"position":[[219,7],[247,6],[287,6]]},"35":{"position":[[255,7]]},"65":{"position":[[277,9]]},"79":{"position":[[490,8]]},"213":{"position":[[376,6]]},"260":{"position":[[539,6]]},"311":{"position":[[186,6],[213,6]]},"596":{"position":[[112,6]]},"647":{"position":[[97,6]]},"651":{"position":[[145,9]]},"711":{"position":[[150,7]]},"737":{"position":[[138,6]]}}}],["resum",{"_index":1933,"t":{"515":{"position":[[81,7]]},"519":{"position":[[54,7]]}}}],["rethrow",{"_index":1674,"t":{"403":{"position":[[40,8]]}}}],["rethrown",{"_index":1938,"t":{"519":{"position":[[199,9]]},"523":{"position":[[197,8]]}}}],["retri",{"_index":1808,"t":{"463":{"position":[[720,8]]}}}],["retun",{"_index":1630,"t":{"363":{"position":[[602,7]]}}}],["return",{"_index":60,"t":{"7":{"position":[[420,6]]},"13":{"position":[[180,6]]},"19":{"position":[[574,6],[589,6]]},"23":{"position":[[22,9]]},"25":{"position":[[444,6]]},"31":{"position":[[620,6]]},"33":{"position":[[262,7],[378,6]]},"41":{"position":[[112,9]]},"43":{"position":[[70,7]]},"57":{"position":[[1485,6]]},"59":{"position":[[173,6]]},"85":{"position":[[442,7],[498,8]]},"163":{"position":[[24,6],[155,6],[221,6],[280,7]]},"195":{"position":[[156,6],[173,6],[278,6],[304,6],[509,6],[543,8]]},"203":{"position":[[78,6]]},"213":{"position":[[141,6],[406,9],[555,6]]},"215":{"position":[[77,6],[147,6],[213,6],[272,7],[426,6]]},"247":{"position":[[261,6]]},"249":{"position":[[244,6]]},"256":{"position":[[520,9],[625,6]]},"258":{"position":[[454,6],[543,6]]},"276":{"position":[[378,6]]},"286":{"position":[[121,6],[379,6],[467,6]]},"290":{"position":[[162,6]]},"292":{"position":[[66,7]]},"299":{"position":[[110,7],[156,7]]},"303":{"position":[[360,6]]},"305":{"position":[[837,6]]},"309":{"position":[[145,6]]},"315":{"position":[[116,8]]},"327":{"position":[[243,6],[1001,6]]},"347":{"position":[[43,6],[179,6]]},"355":{"position":[[0,7]]},"357":{"position":[[0,7]]},"361":{"position":[[0,7]]},"363":{"position":[[0,7]]},"367":{"position":[[0,7]]},"369":{"position":[[0,7]]},"371":{"position":[[0,7]]},"385":{"position":[[27,7]]},"387":{"position":[[37,7]]},"389":{"position":[[40,7]]},"391":{"position":[[34,7]]},"393":{"position":[[34,7]]},"395":{"position":[[33,7]]},"397":{"position":[[41,7]]},"399":{"position":[[0,7]]},"451":{"position":[[101,8]]},"453":{"position":[[24,7]]},"455":{"position":[[0,7]]},"459":{"position":[[29,7]]},"463":{"position":[[1463,8]]},"473":{"position":[[0,7],[120,6]]},"475":{"position":[[0,7],[100,6],[165,6],[256,6]]},"479":{"position":[[80,6]]},"481":{"position":[[80,6]]},"483":{"position":[[140,8]]},"485":{"position":[[91,7],[119,8]]},"487":{"position":[[42,8]]},"489":{"position":[[42,8]]},"491":{"position":[[42,8]]},"493":{"position":[[64,8]]},"495":{"position":[[147,8]]},"499":{"position":[[189,8]]},"501":{"position":[[88,8]]},"503":{"position":[[155,8],[212,6]]},"507":{"position":[[166,8],[223,6]]},"509":{"position":[[165,8],[222,6]]},"517":{"position":[[99,7]]},"519":{"position":[[333,6]]},"521":{"position":[[381,6]]},"537":{"position":[[13,6]]},"539":{"position":[[0,7]]},"548":{"position":[[98,8]]},"554":{"position":[[99,8]]},"556":{"position":[[98,8]]},"558":{"position":[[157,8]]},"564":{"position":[[101,8]]},"566":{"position":[[101,8]]},"568":{"position":[[101,8]]},"570":{"position":[[102,8]]},"579":{"position":[[113,7]]},"581":{"position":[[115,7]]},"583":{"position":[[115,7]]},"585":{"position":[[115,7]]},"588":{"position":[[380,7],[409,7]]},"594":{"position":[[283,7]]},"600":{"position":[[220,7]]},"604":{"position":[[314,7]]},"606":{"position":[[285,7]]},"609":{"position":[[182,7]]},"617":{"position":[[204,7]]},"625":{"position":[[125,8]]},"629":{"position":[[145,8]]},"631":{"position":[[149,8]]},"633":{"position":[[150,8]]},"651":{"position":[[417,8]]},"659":{"position":[[248,8]]},"667":{"position":[[0,7]]},"669":{"position":[[0,7]]},"675":{"position":[[166,8]]},"677":{"position":[[78,8]]},"685":{"position":[[61,8],[292,6]]},"689":{"position":[[305,8],[343,7],[419,7]]},"695":{"position":[[67,8],[270,7]]},"697":{"position":[[67,7]]},"701":{"position":[[0,7],[100,6]]},"703":{"position":[[0,7],[735,8]]},"719":{"position":[[0,7]]},"721":{"position":[[0,7]]},"725":{"position":[[0,7]]},"727":{"position":[[0,7]]},"729":{"position":[[0,7]]},"731":{"position":[[0,7]]},"733":{"position":[[0,7]]},"737":{"position":[[30,6]]},"739":{"position":[[31,7]]},"741":{"position":[[0,7]]},"745":{"position":[[73,8]]},"749":{"position":[[100,8]]},"751":{"position":[[126,8]]},"753":{"position":[[74,8]]},"755":{"position":[[34,7]]},"757":{"position":[[109,8]]},"759":{"position":[[34,7]]},"763":{"position":[[331,6],[491,8]]},"765":{"position":[[33,7]]},"767":{"position":[[252,8]]},"769":{"position":[[30,7]]},"771":{"position":[[83,9],[292,8]]},"773":{"position":[[0,7]]},"775":{"position":[[0,7]]},"777":{"position":[[46,9]]}}}],["reus",{"_index":1813,"t":{"463":{"position":[[972,5],[1224,6]]}}}],["revers",{"_index":2368,"t":{"753":{"position":[[0,8],[65,8]]}}}],["revert",{"_index":811,"t":{"71":{"position":[[101,8]]}}}],["rewritten",{"_index":836,"t":{"79":{"position":[[415,9]]}}}],["right",{"_index":691,"t":{"51":{"position":[[196,5]]},"201":{"position":[[4,5],[105,5],[182,5]]},"297":{"position":[[469,6]]},"299":{"position":[[122,5]]},"627":{"position":[[71,5],[104,6]]},"633":{"position":[[36,5]]},"659":{"position":[[188,6],[586,5]]},"711":{"position":[[53,5]]},"729":{"position":[[571,5],[594,5],[697,5],[777,5],[800,5]]},"733":{"position":[[299,5],[397,5],[420,5]]}}}],["righthand",{"_index":695,"t":{"51":{"position":[[283,9]]},"307":{"position":[[60,9]]},"311":{"position":[[4,9]]}}}],["rightli",{"_index":905,"t":{"97":{"position":[[156,8]]}}}],["roll",{"_index":1551,"t":{"327":{"position":[[477,6]]},"729":{"position":[[273,4],[291,5]]}}}],["roll(opt",{"_index":1544,"t":{"327":{"position":[[232,10],[990,10]]}}}],["root",{"_index":2280,"t":{"701":{"position":[[221,7],[362,6],[447,7]]},"703":{"position":[[258,4],[788,4],[1057,4],[1106,5]]}}}],["root=1",{"_index":1480,"t":{"305":{"position":[[408,7]]}}}],["rotat",{"_index":2330,"t":{"729":{"position":[[10,8]]},"731":{"position":[[10,8]]},"733":{"position":[[40,8]]}}}],["roughli",{"_index":818,"t":{"73":{"position":[[221,7]]}}}],["round",{"_index":1965,"t":{"529":{"position":[[0,6],[66,6]]}}}],["rsa",{"_index":2091,"t":{"609":{"position":[[27,6]]},"611":{"position":[[52,4],[87,5]]},"613":{"position":[[53,4],[88,5],[865,4]]},"615":{"position":[[44,4],[60,4]]},"617":{"position":[[52,4],[68,4],[1056,4]]}}}],["rule",{"_index":1373,"t":{"282":{"position":[[347,5]]}}}],["run",{"_index":37,"t":{"7":{"position":[[55,3]]},"11":{"position":[[206,3]]},"101":{"position":[[81,4]]},"116":{"position":[[75,7],[186,3]]},"120":{"position":[[15,3]]},"130":{"position":[[198,7],[242,7]]},"157":{"position":[[38,3]]},"282":{"position":[[416,3]]},"445":{"position":[[309,7]]},"519":{"position":[[4,3]]},"777":{"position":[[0,4]]}}}],["runtim",{"_index":838,"t":{"79":{"position":[[436,7]]},"124":{"position":[[106,8]]},"126":{"position":[[185,7],[424,7]]},"439":{"position":[[55,7]]}}}],["s",{"_index":974,"t":{"116":{"position":[[164,1]]},"437":{"position":[[980,1]]},"621":{"position":[[97,1]]},"623":{"position":[[101,1]]},"625":{"position":[[197,1],[407,1]]},"629":{"position":[[182,1]]},"631":{"position":[[186,1]]},"633":{"position":[[187,1]]},"635":{"position":[[106,1]]},"637":{"position":[[110,1]]},"639":{"position":[[111,1]]},"641":{"position":[[110,1]]},"643":{"position":[[113,1]]},"645":{"position":[[114,1]]},"653":{"position":[[114,1]]},"659":{"position":[[421,1],[604,1]]},"661":{"position":[[119,1]]},"663":{"position":[[121,1]]},"679":{"position":[[366,3]]},"685":{"position":[[428,1]]},"689":{"position":[[573,1]]}}}],["s1",{"_index":1154,"t":{"213":{"position":[[94,2],[215,2]]},"655":{"position":[[137,2]]}}}],["s1:gsub",{"_index":1156,"t":{"213":{"position":[[116,12],[237,12]]}}}],["s2",{"_index":1155,"t":{"213":{"position":[[111,2],[232,2]]},"655":{"position":[[162,2],[207,4]]}}}],["s:recv",{"_index":2265,"t":{"689":{"position":[[786,8]]}}}],["s:send(\"get",{"_index":2247,"t":{"685":{"position":[[465,11]]},"689":{"position":[[694,11]]}}}],["s:send(\"http/1.1",{"_index":2232,"t":{"679":{"position":[[408,16]]}}}],["safe",{"_index":302,"t":{"25":{"position":[[501,4]]},"31":{"position":[[579,4]]},"35":{"position":[[174,4]]},"39":{"position":[[180,4]]},"85":{"position":[[323,4]]},"256":{"position":[[855,4]]},"258":{"position":[[68,4]]},"371":{"position":[[85,4]]}}}],["same",{"_index":999,"t":{"122":{"position":[[430,4]]},"137":{"position":[[52,4]]},"139":{"position":[[52,4]]},"141":{"position":[[24,4]]},"207":{"position":[[138,4]]},"209":{"position":[[21,4]]},"295":{"position":[[29,5]]},"297":{"position":[[621,4]]},"301":{"position":[[268,5]]},"323":{"position":[[1103,4]]},"421":{"position":[[167,4],[206,4]]},"423":{"position":[[171,4],[210,4]]},"463":{"position":[[1117,4],[2167,4]]},"469":{"position":[[255,4]]},"475":{"position":[[111,4]]},"647":{"position":[[0,4],[92,4]]},"689":{"position":[[198,4]]},"753":{"position":[[190,4]]},"761":{"position":[[35,4]]}}}],["sandbox",{"_index":78,"t":{"9":{"position":[[203,7],[417,8]]},"11":{"position":[[36,10]]},"39":{"position":[[3712,12],[3902,11]]},"266":{"position":[[164,8]]}}}],["say(\"hello",{"_index":1446,"t":{"299":{"position":[[331,11],[590,11],[825,11]]}}}],["say(messag",{"_index":1443,"t":{"299":{"position":[[208,12],[433,12],[693,12]]}}}],["say(msg",{"_index":1216,"t":{"235":{"position":[[151,8]]}}}],["say(nil",{"_index":1445,"t":{"299":{"position":[[297,8],[556,8],[791,8]]}}}],["sched",{"_index":1844,"t":{"465":{"position":[[425,5]]},"523":{"position":[[277,5]]},"679":{"position":[[319,5]]}}}],["sched.errorfunc",{"_index":1953,"t":{"523":{"position":[[301,15]]}}}],["sched:add(funct",{"_index":1847,"t":{"465":{"position":[[528,20]]},"523":{"position":[[363,20]]}}}],["sched:addloop(funct",{"_index":1845,"t":{"465":{"position":[[449,24]]}}}],["sched:run",{"_index":1849,"t":{"465":{"position":[[608,11]]},"679":{"position":[[511,11]]}}}],["schedul",{"_index":144,"t":{"13":{"position":[[519,10]]},"33":{"position":[[1029,11]]},"465":{"position":[[393,9],[437,11]]},"511":{"position":[[4,9]]},"515":{"position":[[116,10]]},"519":{"position":[[29,10],[44,9],[221,9]]},"521":{"position":[[31,9],[79,9],[168,9]]},"523":{"position":[[31,9],[89,9],[245,9],[289,11]]},"679":{"position":[[137,9],[279,10],[331,11]]}}}],["scheduler.yieldfunc",{"_index":1950,"t":{"521":{"position":[[272,19]]}}}],["scheduler:add(funct",{"_index":1943,"t":{"519":{"position":[[402,24]]}}}],["scheduler:addloop(funct",{"_index":1940,"t":{"519":{"position":[[283,28]]},"521":{"position":[[331,28]]}}}],["scheduler:run",{"_index":1942,"t":{"519":{"position":[[356,15],[555,15]]},"521":{"position":[[404,15]]}}}],["scheme",{"_index":2212,"t":{"671":{"position":[[215,10]]}}}],["scope",{"_index":411,"t":{"33":{"position":[[812,5]]},"35":{"position":[[15,7]]},"37":{"position":[[386,5]]},"39":{"position":[[710,7],[1809,6]]},"55":{"position":[[274,5]]},"195":{"position":[[536,6]]}}}],["script",{"_index":36,"t":{"7":{"position":[[44,7]]},"23":{"position":[[327,7]]},"47":{"position":[[133,7]]},"116":{"position":[[452,7]]},"149":{"position":[[240,6]]},"282":{"position":[[427,7]]},"323":{"position":[[75,7],[679,6],[1168,7],[1363,6],[1582,6]]},"327":{"position":[[683,7]]}}}],["script.pluto:2",{"_index":1854,"t":{"469":{"position":[[334,15],[382,14]]}}}],["scripter",{"_index":1037,"t":{"139":{"position":[[366,9]]},"153":{"position":[[466,9]]},"155":{"position":[[416,9]]},"157":{"position":[[413,9]]},"321":{"position":[[110,10],[351,11]]},"327":{"position":[[722,9]]}}}],["scripts/compile.php",{"_index":977,"t":{"116":{"position":[[218,19]]}}}],["scripts/link_pluto.php",{"_index":978,"t":{"116":{"position":[[248,22]]}}}],["scripts/link_plutoc.php",{"_index":979,"t":{"116":{"position":[[281,23]]}}}],["scripts/link_static.php",{"_index":980,"t":{"116":{"position":[[315,23]]}}}],["sdbm",{"_index":1992,"t":{"556":{"position":[[24,4]]}}}],["search",{"_index":1134,"t":{"199":{"position":[[52,8],[71,9],[137,9],[245,8],[272,6],[308,6],[338,9]]},"284":{"position":[[58,6],[246,6],[362,6]]},"447":{"position":[[33,6]]},"627":{"position":[[62,8]]},"659":{"position":[[172,6]]}}}],["second",{"_index":840,"t":{"79":{"position":[[539,6]]},"421":{"position":[[357,6]]},"423":{"position":[[361,6]]},"425":{"position":[[93,6]]},"427":{"position":[[105,6]]},"429":{"position":[[96,6]]},"431":{"position":[[108,6]]},"507":{"position":[[260,7],[428,8]]},"521":{"position":[[235,6]]},"539":{"position":[[8,7]]},"621":{"position":[[26,6]]},"623":{"position":[[26,6]]},"655":{"position":[[99,6]]}}}],["secondari",{"_index":1638,"t":{"363":{"position":[[1129,9],[1260,10],[1334,11]]}}}],["secret",{"_index":2070,"t":{"594":{"position":[[439,6]]},"600":{"position":[[376,6]]},"606":{"position":[[450,6]]},"613":{"position":[[815,6],[974,6]]}}}],["section",{"_index":1388,"t":{"284":{"position":[[353,8]]},"321":{"position":[[287,8]]}}}],["secur",{"_index":178,"t":{"13":{"position":[[1150,9]]},"588":{"position":[[181,6],[298,7]]},"590":{"position":[[137,9]]},"689":{"position":[[673,6]]}}}],["see",{"_index":181,"t":{"15":{"position":[[50,3]]},"39":{"position":[[2167,4]]},"143":{"position":[[77,3]]},"161":{"position":[[88,3]]},"163":{"position":[[87,3]]},"193":{"position":[[460,3]]},"213":{"position":[[326,4]]},"260":{"position":[[422,4]]}}}],["seem",{"_index":1021,"t":{"128":{"position":[[110,4]]},"151":{"position":[[29,5]]},"327":{"position":[[838,5]]}}}],["seen",{"_index":1002,"t":{"124":{"position":[[98,4]]},"379":{"position":[[3,4]]},"709":{"position":[[3,4]]}}}],["select",{"_index":721,"t":{"57":{"position":[[123,6]]},"118":{"position":[[159,7]]},"284":{"position":[[203,6]]}}}],["self.__par",{"_index":1237,"t":{"245":{"position":[[41,14]]}}}],["self.__parent.method(self",{"_index":746,"t":{"57":{"position":[[1297,26]]},"245":{"position":[[131,26]]}}}],["self.__parent.prop",{"_index":744,"t":{"57":{"position":[[1256,18]]}}}],["self.ag",{"_index":1243,"t":{"247":{"position":[[224,8],[268,8]]},"249":{"position":[[251,8]]}}}],["self.factor",{"_index":1498,"t":{"309":{"position":[[160,11]]}}}],["self.nam",{"_index":1223,"t":{"237":{"position":[[179,9]]},"239":{"position":[[146,9]]},"241":{"position":[[140,9]]},"245":{"position":[[210,9]]},"247":{"position":[[207,9]]}}}],["self.onev",{"_index":1284,"t":{"258":{"position":[[136,12]]}}}],["self:onevent(ev",{"_index":1285,"t":{"258":{"position":[[154,19]]}}}],["self:onevent?(ev",{"_index":1286,"t":{"258":{"position":[[199,20]]}}}],["semant",{"_index":476,"t":{"33":{"position":[[2518,10]]},"43":{"position":[[14,9]]},"327":{"position":[[194,8]]}}}],["semi",{"_index":1976,"t":{"546":{"position":[[28,4]]}}}],["semicolon",{"_index":1229,"t":{"239":{"position":[[89,11]]}}}],["send",{"_index":1795,"t":{"463":{"position":[[49,4]]},"683":{"position":[[0,5],[69,5]]},"689":{"position":[[299,5]]}}}],["sens",{"_index":1796,"t":{"463":{"position":[[114,5]]}}}],["sep",{"_index":2181,"t":{"657":{"position":[[459,3]]},"659":{"position":[[332,4]]}}}],["separ",{"_index":577,"t":{"39":{"position":[[2601,9]]},"77":{"position":[[31,8]]},"625":{"position":[[21,10],[69,9]]},"657":{"position":[[59,9],[469,9]]},"659":{"position":[[50,10],[102,9]]}}}],["sequenc",{"_index":533,"t":{"39":{"position":[[828,8]]},"91":{"position":[[87,9]]}}}],["seri",{"_index":1202,"t":{"233":{"position":[[2,6]]}}}],["serial",{"_index":1864,"t":{"475":{"position":[[48,10]]}}}],["server",{"_index":712,"t":{"55":{"position":[[62,7]]},"681":{"position":[[85,9]]}}}],["servic",{"_index":1811,"t":{"463":{"position":[[831,8]]},"588":{"position":[[228,9]]}}}],["session",{"_index":2057,"t":{"590":{"position":[[119,7]]}}}],["set",{"_index":47,"t":{"7":{"position":[[222,3]]},"17":{"position":[[136,3]]},"33":{"position":[[852,3]]},"57":{"position":[[805,4],[1065,4]]},"63":{"position":[[66,7]]},"65":{"position":[[61,7]]},"97":{"position":[[59,4]]},"175":{"position":[[143,9]]},"187":{"position":[[131,9]]},"197":{"position":[[137,9]]},"217":{"position":[[80,4]]},"253":{"position":[[238,9]]},"256":{"position":[[418,3]]},"270":{"position":[[282,3]]},"278":{"position":[[750,3]]},"280":{"position":[[137,9]]},"288":{"position":[[150,9]]},"323":{"position":[[1326,8]]},"399":{"position":[[45,3]]},"449":{"position":[[349,7]]},"463":{"position":[[511,3],[548,3],[761,3]]},"503":{"position":[[7,3]]},"507":{"position":[[7,3]]},"509":{"position":[[7,3],[333,3]]},"511":{"position":[[68,3]]},"523":{"position":[[64,3]]},"579":{"position":[[100,3]]},"581":{"position":[[102,3]]},"583":{"position":[[102,3]]},"585":{"position":[[102,3]]},"763":{"position":[[125,7]]}}}],["setup",{"_index":1578,"t":{"333":{"position":[[246,6]]}}}],["sever",{"_index":341,"t":{"29":{"position":[[19,7]]}}}],["sgvsbg8sifdvcmxkiq",{"_index":1643,"t":{"367":{"position":[[218,20]]},"371":{"position":[[287,18]]}}}],["sha",{"_index":2024,"t":{"579":{"position":[[24,3]]},"581":{"position":[[24,3]]},"583":{"position":[[24,3]]},"585":{"position":[[24,3]]}}}],["sha1",{"_index":2122,"t":{"615":{"position":[[65,6]]},"617":{"position":[[73,6]]}}}],["sha256",{"_index":2121,"t":{"615":{"position":[[49,7]]},"617":{"position":[[57,7],[887,8],[1061,8]]}}}],["shadow",{"_index":276,"t":{"25":{"position":[[15,6],[52,8]]},"33":{"position":[[291,7]]},"37":{"position":[[420,6]]},"39":{"position":[[1413,6],[1446,6],[1511,9],[1671,6],[1760,6],[1852,6]]},"137":{"position":[[190,7],[255,7]]},"139":{"position":[[172,7],[231,7]]},"141":{"position":[[212,7]]},"167":{"position":[[356,6],[414,6]]}}}],["share",{"_index":767,"t":{"59":{"position":[[101,6]]},"108":{"position":[[456,6]]},"110":{"position":[[119,6]]},"116":{"position":[[485,6]]},"122":{"position":[[420,5]]}}}],["short",{"_index":1342,"t":{"276":{"position":[[139,5]]},"319":{"position":[[172,5]]}}}],["shorthand",{"_index":511,"t":{"39":{"position":[[31,9],[328,9]]},"49":{"position":[[1291,9]]},"79":{"position":[[257,9]]},"245":{"position":[[27,9],[117,9]]},"278":{"position":[[441,9]]},"323":{"position":[[312,9]]},"343":{"position":[[101,9],[181,9]]},"707":{"position":[[288,9]]}}}],["show",{"_index":827,"t":{"77":{"position":[[93,7]]}}}],["side",{"_index":1287,"t":{"258":{"position":[[261,4]]},"307":{"position":[[70,4]]},"311":{"position":[[14,4]]},"631":{"position":[[41,4]]},"633":{"position":[[42,4]]},"711":{"position":[[64,4]]}}}],["sig",{"_index":2127,"t":{"617":{"position":[[857,3],[1075,5]]}}}],["sign",{"_index":941,"t":{"108":{"position":[[189,6]]},"615":{"position":[[31,5]]},"617":{"position":[[37,7],[186,6],[802,4]]}}}],["signatur",{"_index":2124,"t":{"617":{"position":[[144,9],[160,9],[244,9]]}}}],["signer'",{"_index":2123,"t":{"617":{"position":[[122,8]]}}}],["signific",{"_index":1669,"t":{"399":{"position":[[33,11]]}}}],["significantli",{"_index":1831,"t":{"463":{"position":[[2187,13]]},"503":{"position":[[462,13]]}}}],["silenc",{"_index":1077,"t":{"159":{"position":[[479,9]]}}}],["similar",{"_index":739,"t":{"57":{"position":[[914,8]]},"227":{"position":[[0,7]]},"239":{"position":[[23,7]]},"284":{"position":[[658,7]]},"373":{"position":[[0,7]]},"453":{"position":[[0,7]]},"457":{"position":[[54,7]]},"649":{"position":[[43,7]]}}}],["similarli",{"_index":1282,"t":{"258":{"position":[[0,10]]}}}],["simpl",{"_index":150,"t":{"13":{"position":[[623,6],[799,6]]},"249":{"position":[[115,6]]},"260":{"position":[[26,6]]},"262":{"position":[[264,6]]}}}],["simpli",{"_index":975,"t":{"116":{"position":[[179,6]]},"120":{"position":[[8,6]]},"122":{"position":[[276,6]]},"169":{"position":[[48,6]]},"189":{"position":[[94,6]]},"256":{"position":[[411,6]]},"317":{"position":[[89,6],[158,6]]},"321":{"position":[[183,6]]},"339":{"position":[[38,6]]}}}],["simplifi",{"_index":1353,"t":{"278":{"position":[[95,10]]}}}],["singl",{"_index":655,"t":{"47":{"position":[[44,6]]},"625":{"position":[[167,6]]},"657":{"position":[[286,6],[502,6]]},"703":{"position":[[1050,6]]}}}],["size",{"_index":1921,"t":{"505":{"position":[[10,4]]}}}],["skip",{"_index":1089,"t":{"171":{"position":[[69,4],[383,4]]},"173":{"position":[[111,4],[160,8]]}}}],["sleep",{"_index":790,"t":{"67":{"position":[[381,6]]},"535":{"position":[[42,5]]}}}],["slightli",{"_index":565,"t":{"39":{"position":[[2357,8]]},"73":{"position":[[250,8]]},"453":{"position":[[153,8]]}}}],["slower",{"_index":820,"t":{"73":{"position":[[259,6]]}}}],["small",{"_index":700,"t":{"53":{"position":[[200,5]]},"223":{"position":[[16,5]]},"505":{"position":[[147,5]]}}}],["smallest",{"_index":2400,"t":{"773":{"position":[[12,8]]}}}],["smooth",{"_index":1555,"t":{"327":{"position":[[657,6]]}}}],["snippet",{"_index":772,"t":{"61":{"position":[[238,7]]},"282":{"position":[[190,8]]},"345":{"position":[[85,9]]}}}],["sock",{"_index":2253,"t":{"687":{"position":[[210,4]]}}}],["sock:unrecv(\"hello",{"_index":2255,"t":{"687":{"position":[[271,20]]}}}],["sock:unrecv(\"world",{"_index":2254,"t":{"687":{"position":[[250,20]]}}}],["socket",{"_index":413,"t":{"33":{"position":[[965,8]]},"463":{"position":[[990,7]]},"675":{"position":[[177,6]]},"679":{"position":[[257,7],[290,6]]},"681":{"position":[[0,6]]},"683":{"position":[[16,7],[40,6]]},"685":{"position":[[20,7],[44,6],[77,6],[212,6],[390,6]]},"687":{"position":[[125,6],[172,6]]},"689":{"position":[[44,7],[127,6],[365,6],[390,6],[535,6]]},"691":{"position":[[9,7],[33,6]]},"695":{"position":[[82,6],[103,6]]},"697":{"position":[[154,6]]}}}],["socket.bind(sch",{"_index":2230,"t":{"679":{"position":[[343,18]]}}}],["socket.connect",{"_index":2237,"t":{"681":{"position":[[41,14]]},"689":{"position":[[225,15]]}}}],["socket.connect(\"google.com",{"_index":2246,"t":{"685":{"position":[[432,28]]},"687":{"position":[[217,28]]}}}],["socket.connect(\"pluto",{"_index":2260,"t":{"689":{"position":[[577,21]]}}}],["socket.listen",{"_index":2227,"t":{"679":{"position":[[34,14]]},"693":{"position":[[43,14]]}}}],["socket.listen(80",{"_index":2270,"t":{"697":{"position":[[196,17]]}}}],["socket.recv",{"_index":2252,"t":{"687":{"position":[[96,12]]}}}],["socket.starttl",{"_index":337,"t":{"27":{"position":[[678,15]]}}}],["sole",{"_index":2179,"t":{"657":{"position":[[266,6]]},"689":{"position":[[81,4]]}}}],["solut",{"_index":108,"t":{"11":{"position":[[328,9]]},"199":{"position":[[127,9]]}}}],["someth",{"_index":540,"t":{"39":{"position":[[1352,10]]},"149":{"position":[[34,9]]},"256":{"position":[[505,10]]},"262":{"position":[[89,9]]},"270":{"position":[[33,9]]},"284":{"position":[[648,9]]},"437":{"position":[[832,10],[843,11],[970,9]]}}}],["sometim",{"_index":285,"t":{"25":{"position":[[199,9]]},"77":{"position":[[79,9]]},"371":{"position":[[52,9]]}}}],["somewher",{"_index":50,"t":{"7":{"position":[[323,9]]}}}],["sort",{"_index":128,"t":{"13":{"position":[[153,4]]},"303":{"position":[[347,8]]},"451":{"position":[[845,8]]}}}],["soup",{"_index":555,"t":{"39":{"position":[[2095,4]]},"57":{"position":[[346,4]]},"67":{"position":[[595,7]]},"305":{"position":[[337,4]]},"443":{"position":[[64,5]]}}}],["sourc",{"_index":893,"t":{"95":{"position":[[123,6]]},"317":{"position":[[17,6]]},"321":{"position":[[142,6],[321,6]]}}}],["space",{"_index":1030,"t":{"130":{"position":[[369,6]]}}}],["spaceship",{"_index":514,"t":{"39":{"position":[[149,9]]},"303":{"position":[[4,9]]},"457":{"position":[[69,9]]}}}],["special",{"_index":483,"t":{"37":{"position":[[8,11]]},"167":{"position":[[458,7]]},"282":{"position":[[76,11]]},"309":{"position":[[9,11]]},"329":{"position":[[0,7]]}}}],["specif",{"_index":195,"t":{"17":{"position":[[251,8]]},"79":{"position":[[569,8]]},"169":{"position":[[25,8]]},"537":{"position":[[64,8]]}}}],["specifi",{"_index":131,"t":{"13":{"position":[[229,7],[279,7]]},"33":{"position":[[2543,7]]},"243":{"position":[[45,7]]},"247":{"position":[[20,7]]},"323":{"position":[[275,7]]},"463":{"position":[[577,10]]},"621":{"position":[[48,9]]},"623":{"position":[[48,9]]},"651":{"position":[[30,9]]},"659":{"position":[[150,10]]},"729":{"position":[[86,7]]}}}],["speedup",{"_index":875,"t":{"91":{"position":[[679,8]]}}}],["spin",{"_index":2229,"t":{"679":{"position":[[89,8]]}}}],["split",{"_index":2136,"t":{"625":{"position":[[0,6],[58,6],[82,5],[143,9],[360,9]]},"659":{"position":[[0,6]]},"671":{"position":[[0,6]]}}}],["spuriou",{"_index":802,"t":{"69":{"position":[[287,8]]}}}],["src",{"_index":983,"t":{"116":{"position":[[538,4]]},"120":{"position":[[142,4]]},"122":{"position":[[67,4],[128,3],[193,4]]}}}],["stack",{"_index":382,"t":{"31":{"position":[[694,5]]},"69":{"position":[[365,5]]},"327":{"position":[[408,5]]},"409":{"position":[[324,5]]},"411":{"position":[[343,5]]},"413":{"position":[[350,5]]},"415":{"position":[[462,5]]},"417":{"position":[[530,5]]},"419":{"position":[[355,5]]},"657":{"position":[[1216,5]]}}}],["standard",{"_index":298,"t":{"25":{"position":[[456,8]]},"27":{"position":[[439,8]]},"33":{"position":[[882,8]]},"39":{"position":[[2077,8]]},"49":{"position":[[1323,8]]},"57":{"position":[[381,8],[1497,8]]},"67":{"position":[[542,8],[578,8]]},"79":{"position":[[65,8]]},"95":{"position":[[163,8]]},"126":{"position":[[8,8]]},"211":{"position":[[52,8]]},"251":{"position":[[632,8]]},"295":{"position":[[80,12]]},"327":{"position":[[127,8]]}}}],["start",{"_index":363,"t":{"31":{"position":[[164,8]]},"33":{"position":[[343,8]]},"99":{"position":[[38,7]]},"101":{"position":[[23,7]]},"179":{"position":[[171,5]]},"229":{"position":[[222,5]]},"463":{"position":[[785,5]]},"659":{"position":[[228,6]]},"663":{"position":[[19,6]]}}}],["starttl",{"_index":2268,"t":{"695":{"position":[[162,8]]}}}],["state",{"_index":1081,"t":{"165":{"position":[[4,5]]},"167":{"position":[[16,7],[70,5],[193,5],[254,5]]},"264":{"position":[[42,5]]},"315":{"position":[[55,5]]},"467":{"position":[[60,5]]}}}],["statement",{"_index":377,"t":{"31":{"position":[[474,9]]},"33":{"position":[[14,9],[557,9],[604,9],[712,10]]},"35":{"position":[[42,10]]},"39":{"position":[[71,9],[133,9]]},"41":{"position":[[214,10]]},"49":{"position":[[293,9],[414,9],[1004,9]]},"55":{"position":[[87,9]]},"57":{"position":[[523,9],[891,9],[1022,10]]},"63":{"position":[[5,10]]},"65":{"position":[[5,10]]},"91":{"position":[[186,9],[250,10]]},"95":{"position":[[244,11]]},"128":{"position":[[63,10]]},"145":{"position":[[282,10]]},"171":{"position":[[9,11],[184,11]]},"195":{"position":[[311,9]]},"233":{"position":[[198,10]]},"239":{"position":[[10,9],[280,9]]},"243":{"position":[[10,9]]},"256":{"position":[[790,11]]},"274":{"position":[[159,10]]},"297":{"position":[[267,11],[358,10]]},"323":{"position":[[127,10],[1544,11]]}}}],["static",{"_index":63,"t":{"7":{"position":[[523,6]]},"33":{"position":[[481,6]]},"57":{"position":[[1117,6]]},"122":{"position":[[239,6]]},"235":{"position":[[51,7],[135,6]]},"237":{"position":[[383,6]]}}}],["statu",{"_index":1823,"t":{"463":{"position":[[1519,6],[1610,6]]}}}],["status_cod",{"_index":1833,"t":{"463":{"position":[[2261,12]]}}}],["status_text",{"_index":1834,"t":{"463":{"position":[[2283,11],[2363,15]]}}}],["step",{"_index":1707,"t":{"421":{"position":[[292,4],[300,5]]},"423":{"position":[[296,4],[304,5]]},"767":{"position":[[626,4]]}}}],["still",{"_index":171,"t":{"13":{"position":[[1015,6]]},"33":{"position":[[2537,5]]},"39":{"position":[[3545,5]]},"73":{"position":[[244,5]]},"278":{"position":[[470,5]]},"319":{"position":[[153,5]]},"323":{"position":[[1649,5]]},"335":{"position":[[148,5]]},"341":{"position":[[132,5]]}}}],["store",{"_index":1506,"t":{"315":{"position":[[80,6]]},"771":{"position":[[16,6]]},"773":{"position":[[27,6]]},"775":{"position":[[26,6]]}}}],["str",{"_index":850,"t":{"85":{"position":[[36,3],[43,3]]},"229":{"position":[[310,3]]},"544":{"position":[[160,3]]},"546":{"position":[[143,3]]},"548":{"position":[[200,3]]},"550":{"position":[[143,3]]},"552":{"position":[[144,3]]},"554":{"position":[[201,3]]},"556":{"position":[[200,3]]},"558":{"position":[[259,3]]},"560":{"position":[[205,3]]},"562":{"position":[[146,3]]},"564":{"position":[[203,3]]},"566":{"position":[[203,3]]},"568":{"position":[[203,3]]},"570":{"position":[[204,3]]},"572":{"position":[[148,3]]},"574":{"position":[[148,3]]},"576":{"position":[[153,3]]}}}],["straightforward",{"_index":567,"t":{"39":{"position":[[2390,15]]}}}],["strawberri",{"_index":1404,"t":{"286":{"position":[[242,12]]}}}],["stream",{"_index":1876,"t":{"483":{"position":[[94,7]]},"485":{"position":[[71,7]]},"487":{"position":[[34,7]]},"489":{"position":[[34,7]]},"491":{"position":[[34,7]]},"499":{"position":[[80,7]]},"501":{"position":[[80,7]]},"503":{"position":[[64,7]]},"505":{"position":[[69,7]]},"507":{"position":[[73,7]]}}}],["strict",{"_index":2092,"t":{"609":{"position":[[66,6]]}}}],["string",{"_index":247,"t":{"23":{"position":[[41,6],[207,7]]},"33":{"position":[[2240,7]]},"39":{"position":[[855,8],[2545,6]]},"41":{"position":[[84,6]]},"45":{"position":[[0,6],[39,7],[118,6],[156,6]]},"47":{"position":[[6,6],[58,7]]},"49":{"position":[[646,6]]},"59":{"position":[[267,7]]},"65":{"position":[[254,6]]},"67":{"position":[[43,7],[51,7]]},"83":{"position":[[76,6]]},"91":{"position":[[398,6],[462,6],[728,6]]},"95":{"position":[[304,6]]},"139":{"position":[[529,9]]},"143":{"position":[[290,6]]},"199":{"position":[[45,6]]},"201":{"position":[[51,7],[91,6],[129,7]]},"217":{"position":[[408,6]]},"229":{"position":[[14,7],[100,6],[235,7]]},"260":{"position":[[0,6],[233,6],[441,6],[584,6]]},"290":{"position":[[47,6],[135,7],[146,8]]},"292":{"position":[[0,6],[129,7],[171,7],[266,6],[384,7]]},"355":{"position":[[26,7],[55,6]]},"357":{"position":[[25,7],[54,6]]},"361":{"position":[[10,6]]},"367":{"position":[[25,7],[54,6]]},"369":{"position":[[25,7],[54,6]]},"371":{"position":[[28,7],[119,6]]},"373":{"position":[[68,6]]},"379":{"position":[[52,6]]},"409":{"position":[[366,7],[406,8]]},"411":{"position":[[385,7],[425,8]]},"413":{"position":[[392,7],[432,8]]},"415":{"position":[[504,7],[544,8]]},"417":{"position":[[572,7],[612,8]]},"419":{"position":[[397,7],[437,8]]},"437":{"position":[[938,7]]},"445":{"position":[[24,6]]},"449":{"position":[[75,6]]},"451":{"position":[[112,6]]},"459":{"position":[[39,6]]},"463":{"position":[[72,7],[1507,7],[1627,7],[1696,7]]},"469":{"position":[[101,6]]},"473":{"position":[[10,6],[64,7],[144,6]]},"475":{"position":[[79,7],[786,9],[1077,9]]},"483":{"position":[[74,6]]},"485":{"position":[[51,6]]},"487":{"position":[[14,6]]},"489":{"position":[[14,6]]},"491":{"position":[[14,6]]},"495":{"position":[[53,6]]},"497":{"position":[[99,6]]},"499":{"position":[[60,6],[200,6]]},"501":{"position":[[60,6],[99,6]]},"503":{"position":[[44,6]]},"505":{"position":[[49,6]]},"507":{"position":[[53,6]]},"544":{"position":[[7,6],[99,6]]},"546":{"position":[[7,6],[82,6]]},"548":{"position":[[7,6],[82,6]]},"550":{"position":[[7,6],[82,6]]},"552":{"position":[[7,6],[83,6]]},"554":{"position":[[7,6],[83,6]]},"556":{"position":[[7,6],[82,6]]},"558":{"position":[[7,6],[83,6]]},"560":{"position":[[7,6],[86,6]]},"562":{"position":[[7,6],[85,6]]},"564":{"position":[[7,6],[85,6]]},"566":{"position":[[7,6],[85,6]]},"568":{"position":[[7,6],[85,6]]},"570":{"position":[[7,6],[86,6]]},"572":{"position":[[7,6],[87,6]]},"574":{"position":[[7,6],[87,6]]},"576":{"position":[[7,6],[92,6]]},"579":{"position":[[7,6],[79,6]]},"581":{"position":[[7,6],[81,6]]},"583":{"position":[[7,6],[81,6]]},"585":{"position":[[7,6],[81,6]]},"604":{"position":[[326,8]]},"619":{"position":[[51,6]]},"625":{"position":[[9,6],[48,6],[90,6],[117,7],[155,6],[372,6]]},"629":{"position":[[47,7],[71,6],[90,6],[162,7]]},"631":{"position":[[51,7],[75,6],[94,6],[166,7]]},"633":{"position":[[52,7],[76,6],[95,6],[167,7]]},"635":{"position":[[12,6],[77,6]]},"637":{"position":[[12,6],[81,6]]},"639":{"position":[[12,6],[82,6]]},"641":{"position":[[12,6],[81,6]]},"643":{"position":[[12,6],[84,6]]},"645":{"position":[[15,6],[85,6]]},"651":{"position":[[18,6],[81,6],[155,6],[212,6],[268,7],[355,6],[440,7]]},"653":{"position":[[12,6],[57,6]]},"655":{"position":[[13,8],[76,6],[106,6]]},"657":{"position":[[103,7],[240,7],[345,6],[445,6],[519,7],[605,6],[1148,7]]},"659":{"position":[[9,6],[77,6],[129,6],[261,8]]},"661":{"position":[[12,6],[55,6]]},"663":{"position":[[12,6],[57,6]]},"667":{"position":[[22,7],[46,6]]},"669":{"position":[[16,6],[51,7],[75,6]]},"685":{"position":[[197,7]]},"701":{"position":[[10,6],[55,6],[124,6]]},"709":{"position":[[52,6]]},"767":{"position":[[564,7]]}}}],["string(10",{"_index":1625,"t":{"363":{"position":[[355,10]]}}}],["string(11",{"_index":1470,"t":{"305":{"position":[[253,10]]}}}],["string(13",{"_index":1483,"t":{"305":{"position":[[478,10],[530,10]]},"363":{"position":[[988,10],[1211,10]]},"415":{"position":[[435,10]]},"421":{"position":[[615,10]]}}}],["string(15",{"_index":1629,"t":{"363":{"position":[[496,10],[1249,10]]},"421":{"position":[[658,10]]}}}],["string(16",{"_index":2081,"t":{"600":{"position":[[511,10]]}}}],["string(2",{"_index":1712,"t":{"421":{"position":[[850,9]]}}}],["string(21",{"_index":1781,"t":{"451":{"position":[[1006,10]]}}}],["string(23",{"_index":1487,"t":{"305":{"position":[[566,10]]}}}],["string(3",{"_index":1760,"t":{"451":{"position":[[333,9]]}}}],["string(4",{"_index":1626,"t":{"363":{"position":[[395,9]]},"451":{"position":[[361,9]]},"671":{"position":[[228,9]]},"703":{"position":[[598,9],[947,9],[1222,9]]}}}],["string(40",{"_index":1479,"t":{"305":{"position":[[397,10]]}}}],["string(5",{"_index":1628,"t":{"363":{"position":[[461,9],[1356,9]]},"421":{"position":[[918,9]]},"671":{"position":[[393,9]]},"703":{"position":[[466,9],[1287,9],[1339,9]]},"753":{"position":[[315,9],[346,9],[431,9],[462,9]]}}}],["string(56",{"_index":1473,"t":{"305":{"position":[[300,10]]}}}],["string(6",{"_index":1640,"t":{"363":{"position":[[1310,9]]},"421":{"position":[[872,9],[943,9]]},"671":{"position":[[470,9]]}}}],["string(7",{"_index":2289,"t":{"703":{"position":[[398,9],[523,9],[647,9],[996,9]]}}}],["string(8",{"_index":2213,"t":{"671":{"position":[[261,9],[298,9],[335,9]]}}}],["string(9",{"_index":2218,"t":{"671":{"position":[[428,9]]}}}],["string.char(math.random(0",{"_index":2072,"t":{"594":{"position":[[493,26]]},"606":{"position":[[536,26]]}}}],["string.find",{"_index":603,"t":{"39":{"position":[[3187,11],[3317,11]]},"627":{"position":[[26,11]]}}}],["string.find_first_not_of",{"_index":602,"t":{"39":{"position":[[3150,24]]}}}],["string.find_first_of",{"_index":601,"t":{"39":{"position":[[3127,20]]}}}],["string.find_last_not_of",{"_index":605,"t":{"39":{"position":[[3232,23]]}}}],["string.find_last_of",{"_index":604,"t":{"39":{"position":[[3210,19]]}}}],["string.format",{"_index":608,"t":{"39":{"position":[[3369,13]]},"647":{"position":[[8,14]]}}}],["string.formatint",{"_index":573,"t":{"39":{"position":[[2476,16]]},"657":{"position":[[1046,18],[1125,16],[1250,18]]}}}],["string.gsub",{"_index":2165,"t":{"649":{"position":[[54,12]]}}}],["string.lfind",{"_index":606,"t":{"39":{"position":[[3292,12]]}}}],["string.low",{"_index":652,"t":{"43":{"position":[[396,12]]},"79":{"position":[[519,12]]}}}],["string.partition(",{"_index":2199,"t":{"659":{"position":[[473,19],[656,19]]}}}],["string.replac",{"_index":300,"t":{"25":{"position":[[479,14]]},"39":{"position":[[2338,14]]}}}],["string.rfind",{"_index":592,"t":{"39":{"position":[[2966,12],[3268,12]]}}}],["string.split",{"_index":845,"t":{"83":{"position":[[8,12]]}}}],["string.split(",{"_index":2138,"t":{"625":{"position":[[249,15],[504,15]]}}}],["string.sub",{"_index":1190,"t":{"229":{"position":[[88,11]]}}}],["string.trunc",{"_index":564,"t":{"39":{"position":[[2316,15]]}}}],["string.uformat",{"_index":753,"t":{"57":{"position":[[1545,14]]}}}],["string.upp",{"_index":651,"t":{"43":{"position":[[381,12]]},"79":{"position":[[504,12]]}}}],["string|int",{"_index":673,"t":{"49":{"position":[[768,10]]},"292":{"position":[[228,10],[338,11]]}}}],["strip",{"_index":2141,"t":{"629":{"position":[[0,6],[81,6],[114,6]]},"631":{"position":[[0,6],[85,6],[118,6]]},"633":{"position":[[0,6],[86,6],[119,6]]}}}],["structur",{"_index":998,"t":{"122":{"position":[[377,9]]}}}],["studio",{"_index":987,"t":{"118":{"position":[[80,7],[102,7]]},"284":{"position":[[290,7]]}}}],["stupid",{"_index":111,"t":{"11":{"position":[[366,6]]},"149":{"position":[[44,6],[65,6]]}}}],["style",{"_index":785,"t":{"67":{"position":[[149,5]]}}}],["sub",{"_index":491,"t":{"37":{"position":[[257,3]]},"495":{"position":[[130,3]]}}}],["sublim",{"_index":1377,"t":{"282":{"position":[[482,7]]},"284":{"position":[[148,7]]}}}],["subsequ",{"_index":953,"t":{"108":{"position":[[624,10]]},"463":{"position":[[2140,10]]}}}],["subset",{"_index":726,"t":{"57":{"position":[[336,6]]}}}],["substitut",{"_index":2167,"t":{"649":{"position":[[194,10],[536,10]]}}}],["substr",{"_index":1136,"t":{"199":{"position":[[153,10]]},"437":{"position":[[48,9],[107,9],[123,9],[437,10]]},"625":{"position":[[384,10]]},"649":{"position":[[8,10],[32,10],[172,9],[223,10]]},"653":{"position":[[30,10],[78,9]]},"659":{"position":[[272,9],[349,9]]},"661":{"position":[[76,9]]},"663":{"position":[[78,9]]}}}],["subtract",{"_index":1434,"t":{"297":{"position":[[70,12]]},"387":{"position":[[9,11]]}}}],["succe",{"_index":1519,"t":{"317":{"position":[[230,8]]}}}],["success",{"_index":120,"t":{"13":{"position":[[55,10]]},"463":{"position":[[1475,8]]},"594":{"position":[[313,8]]},"600":{"position":[[250,8]]},"606":{"position":[[315,8]]},"675":{"position":[[196,8]]},"677":{"position":[[110,8]]},"689":{"position":[[322,8]]}}}],["successfulli",{"_index":1878,"t":{"483":{"position":[[186,12]]},"493":{"position":[[115,12]]},"617":{"position":[[264,13]]}}}],["successor",{"_index":903,"t":{"97":{"position":[[117,10]]}}}],["succinctli",{"_index":1467,"t":{"305":{"position":[[59,11]]}}}],["such",{"_index":39,"t":{"7":{"position":[[86,4]]},"39":{"position":[[1119,4]]},"95":{"position":[[229,4]]},"126":{"position":[[618,4]]},"130":{"position":[[80,4]]},"213":{"position":[[643,4]]},"270":{"position":[[310,4]]},"282":{"position":[[161,4],[286,4],[375,4]]},"303":{"position":[[387,4]]},"317":{"position":[[72,4]]},"343":{"position":[[40,4]]},"465":{"position":[[250,4]]},"602":{"position":[[102,4]]},"737":{"position":[[69,4]]}}}],["sudo",{"_index":933,"t":{"108":{"position":[[109,4],[293,4],[356,4],[372,4]]},"116":{"position":[[114,4],[151,4]]}}}],["suffix",{"_index":698,"t":{"53":{"position":[[64,7]]},"457":{"position":[[245,7]]},"661":{"position":[[31,7],[86,6]]}}}],["sugar",{"_index":1439,"t":{"297":{"position":[[597,6]]}}}],["suggest",{"_index":710,"t":{"55":{"position":[[9,11]]}}}],["suit",{"_index":1462,"t":{"303":{"position":[[303,6]]}}}],["suitabl",{"_index":2177,"t":{"657":{"position":[[144,8]]}}}],["sum",{"_index":2311,"t":{"717":{"position":[[13,3]]}}}],["sun",{"_index":823,"t":{"73":{"position":[[310,4]]},"122":{"position":[[19,3],[49,4],[132,3],[142,3],[319,4]]}}}],["superb",{"_index":837,"t":{"79":{"position":[[429,6]]}}}],["superset",{"_index":888,"t":{"95":{"position":[[11,8]]},"667":{"position":[[164,8]]},"669":{"position":[[203,8]]}}}],["support",{"_index":88,"t":{"9":{"position":[[506,7]]},"25":{"position":[[532,8]]},"33":{"position":[[472,8],[1752,8]]},"39":{"position":[[599,7],[2493,9],[2573,8]]},"49":{"position":[[308,8],[428,8],[476,8],[529,8],[670,7],[741,7],[881,7]]},"57":{"position":[[1038,7]]},"59":{"position":[[22,7],[47,8]]},"61":{"position":[[22,7]]},"63":{"position":[[20,8]]},"65":{"position":[[20,8]]},"67":{"position":[[105,7]]},"91":{"position":[[139,7],[576,7]]},"122":{"position":[[6,8]]},"199":{"position":[[37,7]]},"213":{"position":[[587,7]]},"239":{"position":[[295,8]]},"243":{"position":[[25,8]]},"245":{"position":[[67,8]]},"260":{"position":[[646,8]]},"274":{"position":[[175,7],[960,8]]},"282":{"position":[[88,7]]},"303":{"position":[[264,8]]},"323":{"position":[[811,8]]},"351":{"position":[[13,7],[223,7]]},"711":{"position":[[18,7]]}}}],["sure",{"_index":1098,"t":{"171":{"position":[[466,4]]}}}],["sven",{"_index":1280,"t":{"256":{"position":[[906,4]]}}}],["swap",{"_index":1326,"t":{"264":{"position":[[667,4]]}}}],["switch",{"_index":204,"t":{"19":{"position":[[48,6]]},"25":{"position":[[263,6]]},"27":{"position":[[426,6]]},"31":{"position":[[467,6],[490,6]]},"33":{"position":[[771,6]]},"35":{"position":[[35,6]]},"37":{"position":[[140,6]]},"39":{"position":[[6,6],[64,6],[908,6],[1886,6]]},"55":{"position":[[80,6],[228,6]]},"79":{"position":[[222,6]]},"85":{"position":[[537,6],[589,6]]},"95":{"position":[[237,6]]},"159":{"position":[[59,6],[91,6],[520,6]]},"171":{"position":[[177,6]]},"272":{"position":[[0,6],[59,6]]},"274":{"position":[[22,6],[152,6],[218,6],[543,6],[807,6]]},"276":{"position":[[57,6],[176,6],[394,6]]},"278":{"position":[[149,6]]},"280":{"position":[[44,7],[77,6]]},"286":{"position":[[128,6]]},"319":{"position":[[42,6]]},"323":{"position":[[201,7],[240,6],[400,7],[451,7],[508,7],[593,7]]},"325":{"position":[[125,6]]}}}],["switch/cas",{"_index":866,"t":{"91":{"position":[[238,11]]}}}],["symbol",{"_index":81,"t":{"9":{"position":[[244,7]]},"126":{"position":[[140,6]]},"260":{"position":[[490,7]]},"347":{"position":[[263,7]]}}}],["symlink",{"_index":1907,"t":{"499":{"position":[[179,9]]}}}],["syntact",{"_index":861,"t":{"85":{"position":[[558,9]]},"151":{"position":[[35,13]]},"297":{"position":[[587,9]]}}}],["syntax",{"_index":512,"t":{"39":{"position":[[53,6]]},"45":{"position":[[168,6]]},"49":{"position":[[1307,6]]},"55":{"position":[[171,6]]},"57":{"position":[[85,6],[185,6],[562,6],[611,6],[641,6],[778,6]]},"59":{"position":[[213,6]]},"79":{"position":[[275,6]]},"95":{"position":[[220,8]]},"179":{"position":[[25,7]]},"181":{"position":[[43,6]]},"193":{"position":[[85,7]]},"213":{"position":[[605,6]]},"233":{"position":[[465,6]]},"235":{"position":[[31,7]]},"245":{"position":[[88,7]]},"249":{"position":[[122,6]]},"253":{"position":[[12,6]]},"256":{"position":[[202,7]]},"260":{"position":[[45,6]]},"276":{"position":[[162,7]]},"278":{"position":[[463,6]]},"282":{"position":[[170,6]]},"284":{"position":[[88,6],[439,6]]},"309":{"position":[[21,6]]},"343":{"position":[[117,6],[197,6]]},"345":{"position":[[17,6]]},"347":{"position":[[76,6],[89,6]]},"349":{"position":[[79,6],[92,6],[266,6]]}}}],["system",{"_index":145,"t":{"13":{"position":[[530,6]]},"122":{"position":[[29,6]]},"282":{"position":[[406,7]]},"588":{"position":[[85,8],[203,6]]},"647":{"position":[[111,8]]},"729":{"position":[[139,7],[178,6]]}}}],["system'",{"_index":2043,"t":{"588":{"position":[[47,8]]}}}],["t",{"_index":1041,"t":{"141":{"position":[[98,1]]},"193":{"position":[[114,1],[152,1],[274,1],[324,1]]},"199":{"position":[[381,1],[427,2],[461,2],[478,2],[512,2],[533,2],[579,2],[605,2],[670,2]]},"205":{"position":[[41,1],[248,1]]},"207":{"position":[[41,1],[273,1]]},"209":{"position":[[254,1]]},"233":{"position":[[91,1],[252,1]]},"235":{"position":[[129,1]]},"276":{"position":[[354,1],[456,2]]},"339":{"position":[[132,1],[184,1],[356,1]]},"343":{"position":[[216,1]]},"347":{"position":[[36,1],[172,1]]},"351":{"position":[[307,2]]},"449":{"position":[[122,1]]},"451":{"position":[[160,1]]},"453":{"position":[[235,1]]},"473":{"position":[[593,1]]},"645":{"position":[[120,2]]},"737":{"position":[[92,1],[108,1],[148,1]]},"741":{"position":[[133,1]]},"743":{"position":[[80,1]]},"745":{"position":[[111,1]]},"747":{"position":[[76,1]]},"749":{"position":[[163,1]]},"753":{"position":[[112,1],[224,2]]},"761":{"position":[[278,1]]},"771":{"position":[[330,1]]},"773":{"position":[[83,1]]},"775":{"position":[[82,1]]}}}],["t.age",{"_index":1152,"t":{"207":{"position":[[224,5]]},"209":{"position":[[197,5]]}}}],["t.key",{"_index":2361,"t":{"745":{"position":[[192,5]]}}}],["t.name",{"_index":1151,"t":{"207":{"position":[[205,6]]},"209":{"position":[[180,6]]}}}],["t.prop",{"_index":666,"t":{"49":{"position":[[317,8]]}}}],["t.say(\"hello",{"_index":1218,"t":{"235":{"position":[[177,14]]}}}],["t1",{"_index":2374,"t":{"757":{"position":[[180,2]]}}}],["t:clear",{"_index":2359,"t":{"743":{"position":[[135,9]]}}}],["t:concat(\"\\n",{"_index":1747,"t":{"449":{"position":[[200,14]]}}}],["t:contains(1",{"_index":1746,"t":{"449":{"position":[[186,13]]}}}],["t:f1",{"_index":1204,"t":{"233":{"position":[[107,9]]}}}],["t:f2",{"_index":1205,"t":{"233":{"position":[[130,9]]}}}],["t:f3",{"_index":1206,"t":{"233":{"position":[[153,9]]}}}],["t:foreach(print",{"_index":2378,"t":{"761":{"position":[[294,16]]}}}],["t:getval",{"_index":1347,"t":{"276":{"position":[[412,11],[518,13]]}}}],["t:reduce(|valu",{"_index":2399,"t":{"771":{"position":[[346,16]]}}}],["t:revers",{"_index":2369,"t":{"753":{"position":[[197,11]]}}}],["t:sort",{"_index":2354,"t":{"737":{"position":[[112,11]]}}}],["t=tabl",{"_index":224,"t":{"19":{"position":[[418,8]]}}}],["t[#t",{"_index":821,"t":{"73":{"position":[[271,4]]}}}],["t['print",{"_index":222,"t":{"19":{"position":[[380,10]]}}}],["t\\t\\t\\t",{"_index":2162,"t":{"645":{"position":[[129,9]]}}}],["tab",{"_index":1370,"t":{"282":{"position":[[240,3]]},"359":{"position":[[106,4]]}}}],["tabl",{"_index":492,"t":{"37":{"position":[[261,6]]},"39":{"position":[[426,6],[764,6],[1599,6],[1741,5],[1749,6]]},"49":{"position":[[6,5],[67,6],[131,6],[919,5],[1149,5],[1301,5]]},"51":{"position":[[225,5]]},"53":{"position":[[35,5],[385,5]]},"57":{"position":[[308,5],[767,10],[798,6],[810,5],[926,5],[1153,5],[1335,5]]},"59":{"position":[[30,6]]},"91":{"position":[[202,5],[643,5]]},"139":{"position":[[96,5],[190,5],[272,7],[520,8]]},"141":{"position":[[67,5],[193,5]]},"193":{"position":[[51,6]]},"195":{"position":[[91,6]]},"199":{"position":[[65,5],[221,7],[350,5]]},"201":{"position":[[40,5],[206,6]]},"203":{"position":[[87,6]]},"205":{"position":[[22,6]]},"207":{"position":[[22,6]]},"209":{"position":[[26,5]]},"211":{"position":[[0,5]]},"233":{"position":[[63,6],[224,6]]},"235":{"position":[[109,7]]},"239":{"position":[[36,5]]},"249":{"position":[[84,5]]},"251":{"position":[[50,5]]},"262":{"position":[[65,6]]},"264":{"position":[[0,6],[149,6],[213,6],[294,6],[373,6],[554,6],[635,6],[904,6]]},"266":{"position":[[25,5]]},"292":{"position":[[46,5]]},"315":{"position":[[272,6],[307,6]]},"319":{"position":[[183,5]]},"333":{"position":[[23,6],[105,5],[312,5]]},"335":{"position":[[33,5],[136,6]]},"337":{"position":[[209,5]]},"339":{"position":[[58,6]]},"343":{"position":[[111,5],[191,5]]},"361":{"position":[[48,5]]},"363":{"position":[[10,5],[132,6],[610,5]]},"421":{"position":[[66,7],[141,6],[211,7],[268,6]]},"423":{"position":[[70,7],[145,6],[215,7],[272,6]]},"449":{"position":[[0,6]]},"455":{"position":[[10,5]]},"463":{"position":[[137,5],[226,5],[368,5],[1548,5]]},"473":{"position":[[75,5],[497,6]]},"475":{"position":[[174,6],[451,6],[989,8]]},"495":{"position":[[171,5]]},"609":{"position":[[194,7]]},"625":{"position":[[136,6]]},"701":{"position":[[46,5]]},"703":{"position":[[10,5],[744,6]]},"735":{"position":[[51,5]]},"737":{"position":[[47,5]]},"739":{"position":[[45,5],[82,6],[106,6]]},"741":{"position":[[38,6],[105,5]]},"743":{"position":[[29,6],[52,5]]},"745":{"position":[[10,5],[57,5],[92,6]]},"747":{"position":[[15,5],[48,5]]},"749":{"position":[[15,5],[58,5]]},"751":{"position":[[26,6],[49,5]]},"753":{"position":[[33,6],[56,5],[93,6]]},"755":{"position":[[48,5],[85,6],[109,6]]},"757":{"position":[[32,5],[102,6],[128,6]]},"759":{"position":[[48,5],[85,6],[109,6]]},"761":{"position":[[112,6]]},"763":{"position":[[244,6],[510,6]]},"765":{"position":[[47,5],[84,6],[108,6]]},"767":{"position":[[84,6],[271,6]]},"769":{"position":[[44,5],[81,6],[105,6]]},"771":{"position":[[30,6],[137,6]]},"773":{"position":[[41,6],[64,6]]},"775":{"position":[[40,6],[63,6]]},"777":{"position":[[99,6]]}}}],["table'",{"_index":1704,"t":{"421":{"position":[[94,7]]},"423":{"position":[[98,7]]}}}],["table.checkal",{"_index":431,"t":{"33":{"position":[[1410,14]]}}}],["table.clear",{"_index":249,"t":{"23":{"position":[[81,11]]},"33":{"position":[[1304,11]]}}}],["table.concat(t",{"_index":1751,"t":{"449":{"position":[[270,15]]}}}],["table.contain",{"_index":629,"t":{"41":{"position":[[97,14]]},"85":{"position":[[423,14]]},"91":{"position":[[333,14]]}}}],["table.contains(t",{"_index":1750,"t":{"449":{"position":[[249,17]]}}}],["table.filt",{"_index":423,"t":{"33":{"position":[[1223,15]]},"39":{"position":[[2644,12]]},"765":{"position":[[19,13]]}}}],["table.find",{"_index":430,"t":{"33":{"position":[[1384,10]]}}}],["table.freez",{"_index":1320,"t":{"264":{"position":[[403,14]]},"266":{"position":[[189,12]]},"745":{"position":[[115,19]]}}}],["table.freeze(_g",{"_index":1316,"t":{"264":{"position":[[220,16]]}}}],["table.freeze(t",{"_index":2360,"t":{"745":{"position":[[138,17]]},"747":{"position":[[83,15]]}}}],["table.insert",{"_index":812,"t":{"71":{"position":[[110,12]]},"73":{"position":[[207,13]]}}}],["table.map",{"_index":422,"t":{"33":{"position":[[1209,13]]},"39":{"position":[[2663,9]]},"769":{"position":[[19,10]]}}}],["table.max",{"_index":429,"t":{"33":{"position":[[1358,9]]}}}],["table.min",{"_index":428,"t":{"33":{"position":[[1345,10]]},"327":{"position":[[159,10]]}}}],["table.reduc",{"_index":427,"t":{"33":{"position":[[1331,13]]}}}],["table.remov",{"_index":800,"t":{"69":{"position":[[251,14]]}}}],["table.reord",{"_index":425,"t":{"33":{"position":[[1255,16]]},"39":{"position":[[2699,13]]},"759":{"position":[[19,14]]},"763":{"position":[[166,13]]}}}],["table.revers",{"_index":424,"t":{"33":{"position":[[1239,15]]},"39":{"position":[[2679,13]]},"755":{"position":[[19,14]]}}}],["table.s",{"_index":426,"t":{"33":{"position":[[1278,10]]}}}],["table.sort",{"_index":421,"t":{"33":{"position":[[1194,14]]},"739":{"position":[[19,11]]}}}],["table.unpack(t",{"_index":1148,"t":{"205":{"position":[[193,15]]}}}],["tag",{"_index":2088,"t":{"604":{"position":[[373,4]]},"606":{"position":[[219,3],[244,3],[622,3],[785,5]]},"701":{"position":[[215,3],[244,3],[330,3]]},"703":{"position":[[388,7],[456,7],[588,7],[937,7],[1212,7],[1277,7],[1329,7]]}}}],["tail",{"_index":1684,"t":{"409":{"position":[[435,8]]},"411":{"position":[[454,8]]},"413":{"position":[[461,8]]},"415":{"position":[[573,8]]},"417":{"position":[[641,8]]},"419":{"position":[[466,8]]}}}],["tailor",{"_index":1598,"t":{"345":{"position":[[58,8]]}}}],["take",{"_index":508,"t":{"37":{"position":[[622,4]]},"63":{"position":[[112,6]]},"65":{"position":[[193,6]]},"79":{"position":[[532,4]]},"130":{"position":[[357,4]]},"213":{"position":[[336,4]]},"262":{"position":[[28,5]]},"463":{"position":[[2016,4]]},"513":{"position":[[16,5]]},"590":{"position":[[32,4]]},"596":{"position":[[30,5]]},"621":{"position":[[18,5]]},"623":{"position":[[18,5]]},"707":{"position":[[16,5]]},"761":{"position":[[211,5]]},"763":{"position":[[436,5]]},"767":{"position":[[197,5],[685,4]]}}}],["taken",{"_index":1817,"t":{"463":{"position":[[1155,5],[1207,5]]}}}],["task",{"_index":1198,"t":{"229":{"position":[[425,4]]},"249":{"position":[[17,4]]}}}],["tcp",{"_index":1829,"t":{"463":{"position":[[2066,3]]},"675":{"position":[[14,3]]},"685":{"position":[[150,4]]}}}],["tcp/80",{"_index":2273,"t":{"697":{"position":[[239,8]]}}}],["tee",{"_index":934,"t":{"108":{"position":[[114,3],[298,3]]}}}],["tell",{"_index":1031,"t":{"132":{"position":[[57,5]]},"173":{"position":[[57,5]]}}}],["temporari",{"_index":682,"t":{"49":{"position":[[1139,9]]}}}],["termux",{"_index":961,"t":{"112":{"position":[[26,6]]}}}],["ternari",{"_index":322,"t":{"27":{"position":[[403,7]]},"29":{"position":[[130,7]]},"31":{"position":[[111,7],[208,7]]},"41":{"position":[[39,7]]},"79":{"position":[[267,7]]},"91":{"position":[[151,7]]},"268":{"position":[[0,7]]},"270":{"position":[[336,7]]},"278":{"position":[[10,7]]}}}],["test",{"_index":5,"t":{"2":{"position":[[47,6]]}}}],["test.pluto:2",{"_index":1549,"t":{"327":{"position":[[334,13],[454,13]]}}}],["test.pluto:3",{"_index":1709,"t":{"421":{"position":[[551,12]]},"427":{"position":[[316,12]]},"657":{"position":[[1088,13],[1269,13]]}}}],["test.pluto:4",{"_index":1552,"t":{"327":{"position":[[484,13]]},"409":{"position":[[238,12]]},"411":{"position":[[251,12],[473,13]]},"413":{"position":[[257,12],[480,13]]},"415":{"position":[[342,12],[592,13]]},"417":{"position":[[428,12],[660,13]]},"419":{"position":[[262,12],[485,13]]},"421":{"position":[[778,12]]},"425":{"position":[[288,12]]},"429":{"position":[[301,12]]},"433":{"position":[[398,12]]},"435":{"position":[[404,12]]},"437":{"position":[[626,12],[877,12]]}}}],["text",{"_index":1102,"t":{"177":{"position":[[134,4],[183,4],[300,4],[317,4],[328,4],[380,4]]},"282":{"position":[[490,4]]},"284":{"position":[[156,5]]},"463":{"position":[[1617,4]]},"503":{"position":[[281,4],[317,4],[355,5]]},"649":{"position":[[92,4]]},"701":{"position":[[311,5],[400,4]]}}}],["textmat",{"_index":1394,"t":{"284":{"position":[[510,8],[591,8]]}}}],["thank",{"_index":384,"t":{"31":{"position":[[760,6]]}}}],["that'",{"_index":1318,"t":{"264":{"position":[[341,6]]}}}],["theoret",{"_index":1366,"t":{"282":{"position":[[19,13]]}}}],["there'",{"_index":965,"t":{"114":{"position":[[56,7]]},"118":{"position":[[35,7]]},"159":{"position":[[20,7]]},"290":{"position":[[282,7]]}}}],["there.\":split",{"_index":1711,"t":{"421":{"position":[[709,15],[736,15]]},"423":{"position":[[554,15],[581,15]]}}}],["therefor",{"_index":1174,"t":{"221":{"position":[[55,9]]}}}],["they'll",{"_index":1440,"t":{"297":{"position":[[604,7]]}}}],["they'r",{"_index":1278,"t":{"256":{"position":[[820,7]]},"258":{"position":[[471,7]]},"295":{"position":[[39,7]]},"301":{"position":[[245,7]]}}}],["thing",{"_index":1130,"t":{"195":{"position":[[58,6]]},"317":{"position":[[259,6]]}}}],["those",{"_index":13,"t":{"2":{"position":[[149,6]]},"266":{"position":[[92,5]]},"319":{"position":[[266,5]]},"588":{"position":[[222,5]]}}}],["though",{"_index":1505,"t":{"315":{"position":[[43,7]]},"335":{"position":[[187,7]]}}}],["thread",{"_index":123,"t":{"13":{"position":[[112,7],[207,7],[1008,6]]},"535":{"position":[[97,6]]}}}],["three",{"_index":1452,"t":{"303":{"position":[[42,5]]},"457":{"position":[[11,5]]},"651":{"position":[[121,5],[332,5]]}}}],["through",{"_index":376,"t":{"31":{"position":[[459,7]]},"274":{"position":[[403,7]]},"278":{"position":[[428,8]]},"295":{"position":[[93,7]]},"335":{"position":[[209,7]]},"421":{"position":[[240,7]]},"423":{"position":[[244,7]]},"499":{"position":[[171,7]]}}}],["throw",{"_index":843,"t":{"81":{"position":[[69,8]]},"256":{"position":[[360,5]]},"469":{"position":[[176,6]]},"519":{"position":[[161,6]]},"594":{"position":[[322,6]]},"600":{"position":[[259,6]]},"606":{"position":[[324,6]]}}}],["thrown",{"_index":1675,"t":{"403":{"position":[[60,6]]},"409":{"position":[[107,6]]},"411":{"position":[[110,6]]},"413":{"position":[[112,6]]},"415":{"position":[[161,6]]},"417":{"position":[[245,6]]},"419":{"position":[[116,6]]},"421":{"position":[[401,6]]},"423":{"position":[[405,6]]},"425":{"position":[[138,6]]},"427":{"position":[[150,6]]},"429":{"position":[[142,6]]},"431":{"position":[[154,6]]},"433":{"position":[[217,6]]},"435":{"position":[[213,6]]},"437":{"position":[[323,6]]},"649":{"position":[[452,6]]},"657":{"position":[[676,7]]}}}],["thu",{"_index":1032,"t":{"132":{"position":[[142,4]]},"173":{"position":[[155,4]]}}}],["tick",{"_index":149,"t":{"13":{"position":[[577,5]]}}}],["time",{"_index":92,"t":{"11":{"position":[[72,4]]},"25":{"position":[[187,4]]},"33":{"position":[[740,4]]},"35":{"position":[[195,4]]},"39":{"position":[[1179,4]]},"47":{"position":[[116,4],[173,4]]},"49":{"position":[[368,4]]},"57":{"position":[[58,4],[104,4]]},"61":{"position":[[38,4]]},"63":{"position":[[37,4]]},"65":{"position":[[147,4]]},"67":{"position":[[465,4]]},"91":{"position":[[14,4],[358,4]]},"99":{"position":[[71,5]]},"126":{"position":[[60,5],[117,5],[349,4]]},"128":{"position":[[8,4],[275,4],[378,4]]},"130":{"position":[[123,4]]},"139":{"position":[[396,4]]},"141":{"position":[[56,5]]},"153":{"position":[[496,4]]},"155":{"position":[[446,4]]},"157":{"position":[[443,4]]},"165":{"position":[[61,4]]},"301":{"position":[[459,5]]},"329":{"position":[[68,5]]},"333":{"position":[[223,5]]},"335":{"position":[[73,5]]},"341":{"position":[[60,4]]},"463":{"position":[[1150,4],[1202,4]]},"507":{"position":[[33,5],[252,4],[302,4],[333,4],[370,5],[455,4]]},"537":{"position":[[37,5]]}}}],["times33",{"_index":2005,"t":{"564":{"position":[[24,7]]}}}],["timestamp",{"_index":1923,"t":{"507":{"position":[[93,10]]}}}],["tip",{"_index":1608,"t":{"351":{"position":[[171,3]]}}}],["tl",{"_index":333,"t":{"27":{"position":[[636,3]]},"463":{"position":[[2074,3]]},"685":{"position":[[179,4]]},"689":{"position":[[20,3],[98,3],[414,4]]}}}],["tmbundl",{"_index":1392,"t":{"284":{"position":[[482,8]]}}}],["today",{"_index":1431,"t":{"295":{"position":[[113,6]]}}}],["togeth",{"_index":1164,"t":{"213":{"position":[[544,10]]},"292":{"position":[[304,9]]},"385":{"position":[[17,9]]}}}],["toggl",{"_index":665,"t":{"49":{"position":[[189,6],[253,6]]},"282":{"position":[[294,7],[312,7]]}}}],["token",{"_index":664,"t":{"49":{"position":[[169,6]]},"73":{"position":[[93,6]]},"319":{"position":[[34,7]]},"323":{"position":[[47,6]]},"343":{"position":[[33,6],[154,6],[267,6],[506,6]]}}}],["tokenis",{"_index":826,"t":{"77":{"position":[[17,8]]}}}],["toler",{"_index":1428,"t":{"292":{"position":[[498,9]]}}}],["tomato",{"_index":1406,"t":{"286":{"position":[[277,8]]}}}],["tonumb",{"_index":1019,"t":{"126":{"position":[[711,8]]},"767":{"position":[[534,8]]}}}],["tonumber(a",{"_index":1419,"t":{"290":{"position":[[169,11]]}}}],["tonumber(b",{"_index":1420,"t":{"290":{"position":[[183,11]]}}}],["tonumber(c",{"_index":1158,"t":{"213":{"position":[[148,11],[257,11]]}}}],["tonumber|16",{"_index":1493,"t":{"307":{"position":[[145,12]]}}}],["tool",{"_index":117,"t":{"11":{"position":[[424,5]]},"282":{"position":[[56,8]]}}}],["top",{"_index":1131,"t":{"195":{"position":[[401,3]]},"401":{"position":[[97,3]]},"439":{"position":[[94,3]]},"477":{"position":[[90,3]]},"525":{"position":[[92,3]]},"533":{"position":[[90,3]]},"594":{"position":[[435,3]]},"600":{"position":[[372,3]]},"606":{"position":[[446,3]]},"619":{"position":[[94,3]]},"735":{"position":[[93,3]]}}}],["tostr",{"_index":1018,"t":{"126":{"position":[[692,8]]},"437":{"position":[[589,9]]}}}],["tostring(bvar",{"_index":1575,"t":{"331":{"position":[[166,15]]}}}],["total",{"_index":72,"t":{"9":{"position":[[46,7]]},"11":{"position":[[216,5]]}}}],["toward",{"_index":1877,"t":{"483":{"position":[[109,7]]},"487":{"position":[[88,6]]},"489":{"position":[[88,7]]},"491":{"position":[[88,7]]}}}],["trace",{"_index":1477,"t":{"305":{"position":[[384,5]]}}}],["traceback",{"_index":1550,"t":{"327":{"position":[[414,10]]},"409":{"position":[[330,10]]},"411":{"position":[[349,10]]},"413":{"position":[[356,10]]},"415":{"position":[[468,10]]},"417":{"position":[[536,10]]},"419":{"position":[[361,10]]},"657":{"position":[[1222,10]]}}}],["tradit",{"_index":1917,"t":{"503":{"position":[[415,11]]}}}],["traffic",{"_index":2258,"t":{"689":{"position":[[102,8]]}}}],["transit",{"_index":1556,"t":{"327":{"position":[[664,11]]}}}],["transport",{"_index":2239,"t":{"685":{"position":[[134,9]]},"689":{"position":[[63,9]]}}}],["tri",{"_index":1094,"t":{"171":{"position":[[338,3]]},"177":{"position":[[430,3]]},"213":{"position":[[298,3]]},"217":{"position":[[328,3]]},"219":{"position":[[360,3]]},"229":{"position":[[496,3]]},"235":{"position":[[208,3]]},"237":{"position":[[263,3]]},"243":{"position":[[220,3]]},"245":{"position":[[679,3]]},"247":{"position":[[406,3]]},"249":{"position":[[389,3]]},"251":{"position":[[489,3]]},"260":{"position":[[394,3]]},"262":{"position":[[379,3]]},"264":{"position":[[657,6]]},"268":{"position":[[211,3]]},"274":{"position":[[1040,3]]},"278":{"position":[[371,3],[773,3]]},"286":{"position":[[375,3],[629,3]]},"288":{"position":[[80,4]]},"305":{"position":[[615,3]]},"307":{"position":[[179,3]]},"309":{"position":[[241,3]]},"311":{"position":[[232,3]]},"319":{"position":[[87,3]]},"323":{"position":[[645,4]]},"333":{"position":[[393,3]]},"463":{"position":[[2454,3]]},"469":{"position":[[193,3],[402,3]]}}}],["trigger",{"_index":366,"t":{"31":{"position":[[250,10]]}}}],["trim",{"_index":2142,"t":{"629":{"position":[[10,5]]},"631":{"position":[[10,5]]},"633":{"position":[[10,5]]}}}],["true",{"_index":141,"t":{"13":{"position":[[414,4],[486,4]]},"17":{"position":[[216,5]]},"33":{"position":[[2129,4]]},"85":{"position":[[507,4]]},"130":{"position":[[164,4]]},"251":{"position":[[235,4],[305,4],[356,4],[479,4]]},"270":{"position":[[12,4],[138,4]]},"274":{"position":[[766,5]]},"276":{"position":[[64,4],[106,6]]},"301":{"position":[[562,4]]},"303":{"position":[[482,4],[506,4]]},"331":{"position":[[117,4]]},"355":{"position":[[132,5]]},"367":{"position":[[131,5]]},"411":{"position":[[22,5],[74,5],[133,4],[316,4]]},"413":{"position":[[345,4]]},"443":{"position":[[77,4]]},"463":{"position":[[768,5]]},"473":{"position":[[272,6],[388,6]]},"475":{"position":[[701,5],[897,5],[1261,5]]},"579":{"position":[[107,5],[343,5]]},"581":{"position":[[109,5],[373,5]]},"583":{"position":[[109,5]]},"585":{"position":[[109,5]]},"617":{"position":[[1085,4]]},"635":{"position":[[155,4]]},"637":{"position":[[156,4]]},"639":{"position":[[157,4]]},"641":{"position":[[156,4]]},"643":{"position":[[162,4]]},"645":{"position":[[173,4]]},"651":{"position":[[611,6]]},"653":{"position":[[170,4]]},"655":{"position":[[216,4]]},"659":{"position":[[681,5]]},"661":{"position":[[176,4]]},"663":{"position":[[180,4]]},"689":{"position":[[314,4]]},"697":{"position":[[75,5]]},"701":{"position":[[351,6]]},"713":{"position":[[158,4]]},"747":{"position":[[127,5]]},"777":{"position":[[56,4]]}}}],["true):concat",{"_index":2394,"t":{"767":{"position":[[454,14]]}}}],["true):reorder():concat",{"_index":2385,"t":{"763":{"position":[[676,24]]}}}],["truncat",{"_index":1291,"t":{"258":{"position":[[436,8]]},"651":{"position":[[0,9],[101,10],[222,9],[258,9],[380,10],[430,9]]}}}],["truthi",{"_index":1449,"t":{"301":{"position":[[143,6],[337,6]]},"417":{"position":[[24,8],[116,7],[170,7],[268,7]]}}}],["try...catch",{"_index":513,"t":{"39":{"position":[[121,11]]}}}],["try/catch",{"_index":359,"t":{"31":{"position":[[9,9]]}}}],["try_get_fruit_rating(fruit",{"_index":1409,"t":{"286":{"position":[[347,27]]}}}],["turn",{"_index":1012,"t":{"126":{"position":[[400,5]]},"159":{"position":[[474,4]]},"515":{"position":[[30,4]]},"767":{"position":[[555,4]]}}}],["tweak",{"_index":814,"t":{"71":{"position":[[172,6]]}}}],["two",{"_index":1027,"t":{"130":{"position":[[308,3]]},"223":{"position":[[12,3]]},"274":{"position":[[109,6],[624,6],[685,4]]},"323":{"position":[[1258,3]]},"385":{"position":[[5,3]]},"387":{"position":[[24,3]]},"389":{"position":[[27,3]]},"391":{"position":[[21,3],[42,3]]},"393":{"position":[[21,3]]},"395":{"position":[[20,3]]},"397":{"position":[[28,3]]},"604":{"position":[[322,3]]},"609":{"position":[[190,3]]},"655":{"position":[[9,3]]},"659":{"position":[[257,3]]}}}],["type",{"_index":293,"t":{"25":{"position":[[356,4],[392,4]]},"39":{"position":[[1290,5],[2000,5]]},"41":{"position":[[170,5]]},"49":{"position":[[485,4],[727,4]]},"53":{"position":[[41,5]]},"57":{"position":[[1371,4],[1405,4],[1462,4],[1492,4]]},"71":{"position":[[60,4]]},"85":{"position":[[287,4]]},"95":{"position":[[326,4]]},"116":{"position":[[476,5]]},"139":{"position":[[328,4]]},"143":{"position":[[24,4],[71,5],[81,4],[174,4],[188,5],[250,4]]},"153":{"position":[[428,4]]},"155":{"position":[[378,4]]},"157":{"position":[[375,4]]},"165":{"position":[[26,4]]},"167":{"position":[[164,4],[272,4],[466,5]]},"213":{"position":[[651,4]]},"215":{"position":[[347,4]]},"282":{"position":[[219,4]]},"290":{"position":[[0,4],[262,4]]},"292":{"position":[[74,4],[117,6]]},"303":{"position":[[254,4]]},"327":{"position":[[765,4],[910,4]]},"337":{"position":[[28,5],[215,6]]},"463":{"position":[[403,6]]},"475":{"position":[[27,6],[116,5],[645,4],[807,4]]},"701":{"position":[[274,8]]},"703":{"position":[[512,8]]}}}],["type=\"primari",{"_index":2283,"t":{"701":{"position":[[380,15]]},"703":{"position":[[296,15]]}}}],["typo",{"_index":1065,"t":{"151":{"position":[[155,5]]}}}],["ub",{"_index":356,"t":{"29":{"position":[[322,2]]},"31":{"position":[[676,2]]},"65":{"position":[[226,2]]}}}],["ubuntu",{"_index":954,"t":{"108":{"position":[[663,6]]}}}],["ugli",{"_index":1203,"t":{"233":{"position":[[34,4]]}}}],["uh",{"_index":1337,"t":{"274":{"position":[[694,2]]}}}],["un1g04+cwg8wxydpslj4po/hstqsitgykycrur+m3ae6yplyucrvhc/0j4m3dew81adzvda6tvkc/ht8edyefw",{"_index":2130,"t":{"617":{"position":[[932,88]]}}}],["unannot",{"_index":394,"t":{"33":{"position":[[176,12]]},"159":{"position":[[213,12]]}}}],["unari",{"_index":352,"t":{"29":{"position":[[224,5]]},"61":{"position":[[63,5],[83,5]]},"65":{"position":[[29,5],[48,5]]},"657":{"position":[[293,5]]},"715":{"position":[[57,5]]}}}],["unauthent",{"_index":2051,"t":{"590":{"position":[[6,15]]},"596":{"position":[[5,15]]}}}],["unavail",{"_index":1254,"t":{"251":{"position":[[660,11]]},"695":{"position":[[186,12]]}}}],["unchang",{"_index":461,"t":{"33":{"position":[[2155,10]]},"43":{"position":[[159,9]]}}}],["under",{"_index":959,"t":{"110":{"position":[[37,5]]},"112":{"position":[[57,5]]},"251":{"position":[[672,5]]},"315":{"position":[[19,5]]},"321":{"position":[[71,5]]},"647":{"position":[[50,5]]},"649":{"position":[[459,5]]}}}],["underscor",{"_index":1176,"t":{"225":{"position":[[12,11],[150,11]]}}}],["unexpect",{"_index":326,"t":{"27":{"position":[[535,10]]},"41":{"position":[[6,10]]},"71":{"position":[[141,10]]},"327":{"position":[[183,10]]}}}],["unexpectedli",{"_index":316,"t":{"27":{"position":[[179,12]]}}}],["unfamiliar",{"_index":1010,"t":{"126":{"position":[[325,10]]}}}],["unfinish",{"_index":783,"t":{"65":{"position":[[243,10]]}}}],["uniniti",{"_index":371,"t":{"31":{"position":[[328,13],[522,13]]}}}],["unintuit",{"_index":1963,"t":{"527":{"position":[[180,12]]}}}],["uniqu",{"_index":2054,"t":{"590":{"position":[[74,6]]}}}],["unit",{"_index":2324,"t":{"727":{"position":[[41,4]]}}}],["unix",{"_index":1924,"t":{"507":{"position":[[278,4]]},"539":{"position":[[22,4]]}}}],["unknown",{"_index":810,"t":{"71":{"position":[[52,7]]},"445":{"position":[[119,10]]}}}],["unless",{"_index":1801,"t":{"463":{"position":[[560,6]]}}}],["unlik",{"_index":1303,"t":{"260":{"position":[[677,6]]}}}],["unpack",{"_index":1761,"t":{"451":{"position":[[395,10]]}}}],["unpad",{"_index":2086,"t":{"604":{"position":[[93,8]]},"606":{"position":[[361,9]]}}}],["unpredict",{"_index":2055,"t":{"590":{"position":[[85,13]]}}}],["unreach",{"_index":365,"t":{"31":{"position":[[233,11]]},"39":{"position":[[1825,11]]},"45":{"position":[[56,12]]},"79":{"position":[[161,11]]},"145":{"position":[[155,11],[172,12]]}}}],["unreason",{"_index":1260,"t":{"256":{"position":[[99,12]]}}}],["until",{"_index":498,"t":{"37":{"position":[[341,7]]},"517":{"position":[[90,5]]},"519":{"position":[[106,5]]},"695":{"position":[[47,5]]}}}],["unwant",{"_index":487,"t":{"37":{"position":[[173,8]]},"159":{"position":[[192,8]]}}}],["up",{"_index":1029,"t":{"130":{"position":[[362,2]]},"333":{"position":[[362,2]]},"335":{"position":[[284,2]]},"511":{"position":[[72,2]]},"659":{"position":[[446,4],[555,5],[629,4],[743,6]]},"679":{"position":[[98,2]]},"707":{"position":[[22,2]]},"729":{"position":[[98,2],[175,2],[198,2],[257,3],[280,3],[391,3],[404,2],[477,3],[567,3],[671,3],[773,3],[875,3],[965,3]]},"731":{"position":[[182,3]]},"733":{"position":[[169,3],[182,2],[273,3],[393,3]]}}}],["updat",{"_index":388,"t":{"31":{"position":[[828,6]]},"39":{"position":[[741,7],[2958,7]]},"43":{"position":[[0,7]]},"67":{"position":[[181,7]]},"77":{"position":[[0,7]]},"108":{"position":[[365,6]]},"767":{"position":[[134,7]]},"771":{"position":[[187,7]]}}}],["upgrad",{"_index":755,"t":{"57":{"position":[[1611,9]]}}}],["upon",{"_index":1118,"t":{"183":{"position":[[83,4]]}}}],["uppercas",{"_index":2157,"t":{"641":{"position":[[43,9],[201,9]]}}}],["upvalu",{"_index":375,"t":{"31":{"position":[[398,8]]},"51":{"position":[[147,7]]}}}],["upward",{"_index":1569,"t":{"329":{"position":[[152,7]]}}}],["urgent",{"_index":1957,"t":{"523":{"position":[[399,7]]}}}],["url",{"_index":562,"t":{"39":{"position":[[2212,3]]},"305":{"position":[[556,7]]},"463":{"position":[[42,3],[203,5],[276,3]]},"465":{"position":[[140,3]]},"667":{"position":[[10,3],[80,3]]},"669":{"position":[[28,3],[109,3]]},"671":{"position":[[9,3],[57,3],[90,3]]}}}],["url.pars",{"_index":442,"t":{"33":{"position":[[1691,9]]}}}],["us",{"_index":42,"t":{"7":{"position":[[120,4],[508,3]]},"9":{"position":[[188,4]]},"27":{"position":[[30,4],[232,5],[598,4]]},"33":{"position":[[418,4],[526,4],[567,4],[614,4],[2459,5]]},"37":{"position":[[358,5]]},"39":{"position":[[1103,3],[1249,4],[1878,4]]},"41":{"position":[[31,5]]},"49":{"position":[[613,3],[806,4],[994,4],[1129,4],[1281,4]]},"55":{"position":[[31,5],[212,4],[241,5]]},"57":{"position":[[1142,3],[1905,5]]},"73":{"position":[[107,4],[304,5]]},"77":{"position":[[126,3]]},"79":{"position":[[242,3]]},"83":{"position":[[86,4]]},"101":{"position":[[51,3],[122,5]]},"114":{"position":[[204,3]]},"122":{"position":[[91,3],[224,3]]},"126":{"position":[[126,5]]},"130":{"position":[[111,3]]},"139":{"position":[[380,3]]},"149":{"position":[[307,5]]},"153":{"position":[[302,3],[480,3]]},"155":{"position":[[240,3],[265,3],[430,3]]},"157":{"position":[[427,3]]},"159":{"position":[[440,4]]},"167":{"position":[[492,4]]},"171":{"position":[[49,4],[165,4]]},"175":{"position":[[16,3]]},"181":{"position":[[53,5]]},"187":{"position":[[16,3]]},"189":{"position":[[35,4],[148,4]]},"193":{"position":[[66,3],[454,5]]},"197":{"position":[[16,3]]},"199":{"position":[[213,4]]},"205":{"position":[[133,5]]},"207":{"position":[[148,5]]},"209":{"position":[[126,5]]},"211":{"position":[[27,4],[85,5]]},"213":{"position":[[470,5]]},"217":{"position":[[41,3],[379,3]]},"219":{"position":[[8,3],[70,3]]},"229":{"position":[[82,5]]},"233":{"position":[[440,3]]},"235":{"position":[[47,3]]},"241":{"position":[[47,4]]},"245":{"position":[[390,3]]},"251":{"position":[[31,4],[381,4]]},"256":{"position":[[723,3],[781,4]]},"258":{"position":[[64,3],[483,4]]},"266":{"position":[[149,3]]},"270":{"position":[[322,5]]},"274":{"position":[[434,3],[997,3]]},"276":{"position":[[22,4]]},"280":{"position":[[16,3]]},"282":{"position":[[36,4]]},"288":{"position":[[16,3]]},"292":{"position":[[192,3]]},"297":{"position":[[259,4],[290,4],[350,4],[384,4]]},"299":{"position":[[647,3]]},"317":{"position":[[99,4],[168,4]]},"319":{"position":[[119,3],[162,4],[258,4]]},"321":{"position":[[121,3]]},"323":{"position":[[83,5],[702,3],[922,3],[1189,4],[1240,3],[1589,4]]},"325":{"position":[[15,5]]},"327":{"position":[[747,3]]},"341":{"position":[[48,3]]},"343":{"position":[[20,3],[493,3]]},"363":{"position":[[654,4]]},"377":{"position":[[66,3]]},"463":{"position":[[335,4],[814,6],[1073,6],[1404,6],[2093,3]]},"465":{"position":[[222,5]]},"469":{"position":[[131,4]]},"473":{"position":[[786,4]]},"503":{"position":[[402,3]]},"511":{"position":[[53,4]]},"515":{"position":[[22,4]]},"521":{"position":[[53,4]]},"544":{"position":[[14,5]]},"546":{"position":[[14,5]]},"548":{"position":[[14,5]]},"550":{"position":[[14,5]]},"552":{"position":[[14,5]]},"554":{"position":[[14,5]]},"556":{"position":[[14,5]]},"558":{"position":[[14,5]]},"560":{"position":[[14,5]]},"562":{"position":[[14,5]]},"564":{"position":[[14,5]]},"566":{"position":[[14,5]]},"568":{"position":[[14,5]]},"570":{"position":[[14,5]]},"572":{"position":[[14,5]]},"574":{"position":[[14,5]]},"576":{"position":[[14,5]]},"579":{"position":[[14,5]]},"581":{"position":[[14,5]]},"583":{"position":[[14,5]]},"585":{"position":[[14,5]]},"588":{"position":[[27,4]]},"609":{"position":[[307,4]]},"611":{"position":[[159,4],[190,4]]},"613":{"position":[[160,4]]},"615":{"position":[[97,4]]},"657":{"position":[[482,4]]},"689":{"position":[[408,5]]},"695":{"position":[[117,4]]},"703":{"position":[[111,3],[726,4],[849,3]]},"715":{"position":[[49,3]]},"729":{"position":[[188,5]]},"763":{"position":[[160,5]]},"767":{"position":[[526,3],[708,4]]}}}],["usabl",{"_index":351,"t":{"29":{"position":[[210,6]]},"39":{"position":[[649,6]]}}}],["usag",{"_index":732,"t":{"57":{"position":[[627,5]]},"153":{"position":[[198,5]]},"157":{"position":[[176,5]]},"181":{"position":[[14,5]]},"256":{"position":[[216,5],[440,5]]},"303":{"position":[[314,5]]},"311":{"position":[[102,5]]},"657":{"position":[[684,5]]}}}],["user",{"_index":126,"t":{"13":{"position":[[134,5],[946,4],[976,5]]},"39":{"position":[[2538,4]]},"53":{"position":[[107,4]]},"110":{"position":[[21,4]]},"266":{"position":[[213,5]]},"305":{"position":[[283,6]]},"321":{"position":[[229,6]]},"351":{"position":[[187,6]]},"671":{"position":[[250,8]]}}}],["user'",{"_index":1272,"t":{"256":{"position":[[534,6]]}}}],["user_data",{"_index":867,"t":{"91":{"position":[[267,9]]}}}],["userconfig",{"_index":1271,"t":{"256":{"position":[[463,10]]}}}],["userconfig.colors?.pref",{"_index":1275,"t":{"256":{"position":[[632,28]]}}}],["userdata",{"_index":1425,"t":{"292":{"position":[[52,8]]}}}],["usernam",{"_index":2214,"t":{"671":{"position":[[271,11]]}}}],["usr/share/keyrings/calam",{"_index":935,"t":{"108":{"position":[[118,28]]}}}],["usual",{"_index":124,"t":{"13":{"position":[[120,7]]},"695":{"position":[[129,6]]}}}],["utf",{"_index":778,"t":{"63":{"position":[[119,3]]},"65":{"position":[[200,3]]}}}],["utf8.cod",{"_index":801,"t":{"69":{"position":[[266,12]]}}}],["utonumb",{"_index":751,"t":{"57":{"position":[[1521,10]]},"126":{"position":[[720,9]]}}}],["utostr",{"_index":752,"t":{"57":{"position":[[1532,10]]},"126":{"position":[[701,9]]}}}],["v",{"_index":971,"t":{"116":{"position":[[88,2]]},"183":{"position":[[174,1],[206,2]]},"351":{"position":[[283,2]]},"645":{"position":[[123,2]]},"761":{"position":[[228,3],[259,6]]},"763":{"position":[[453,3],[484,6],[567,1],[662,2],[673,2]]},"767":{"position":[[214,3],[245,6],[343,1],[441,2],[451,2]]}}}],["v3",{"_index":2344,"t":{"731":{"position":[[102,2]]}}}],["v3(0",{"_index":2346,"t":{"731":{"position":[[158,5]]}}}],["v3(0):lookat(new",{"_index":2345,"t":{"731":{"position":[[141,16]]}}}],["valid",{"_index":531,"t":{"39":{"position":[[815,5]]},"85":{"position":[[164,5]]},"153":{"position":[[51,5]]},"155":{"position":[[44,5]]},"256":{"position":[[833,5]]},"325":{"position":[[203,6]]},"453":{"position":[[32,5]]},"602":{"position":[[68,9]]},"617":{"position":[[254,9]]},"657":{"position":[[1181,5]]}}}],["valu",{"_index":202,"t":{"19":{"position":[[38,5],[55,5]]},"23":{"position":[[156,6]]},"25":{"position":[[554,5]]},"31":{"position":[[278,6],[627,6]]},"33":{"position":[[2109,5]]},"39":{"position":[[780,6],[1072,6],[1331,5]]},"49":{"position":[[466,5]]},"57":{"position":[[697,10]]},"61":{"position":[[317,6]]},"63":{"position":[[74,5]]},"65":{"position":[[69,5]]},"67":{"position":[[23,6]]},"128":{"position":[[392,5]]},"132":{"position":[[130,5]]},"141":{"position":[[119,5],[136,5],[224,5],[286,5]]},"143":{"position":[[297,6]]},"163":{"position":[[31,5],[228,5]]},"173":{"position":[[143,5]]},"177":{"position":[[76,6]]},"183":{"position":[[285,10]]},"193":{"position":[[39,6],[157,5],[315,5]]},"199":{"position":[[258,7],[330,7],[362,6],[403,7],[539,7],[554,5],[645,5]]},"205":{"position":[[95,5]]},"215":{"position":[[84,5],[220,5]]},"249":{"position":[[62,5]]},"258":{"position":[[461,6]]},"260":{"position":[[137,5],[307,5]]},"264":{"position":[[505,6],[583,8],[676,5],[736,5]]},"270":{"position":[[166,6]]},"274":{"position":[[12,5],[29,5],[208,5],[225,5],[533,5],[550,5],[797,5],[814,5]]},"276":{"position":[[183,5]]},"278":{"position":[[72,7],[536,5]]},"299":{"position":[[54,6]]},"301":{"position":[[150,6],[190,6],[344,6],[384,6]]},"303":{"position":[[105,6],[367,6],[438,6]]},"305":{"position":[[844,6]]},"309":{"position":[[152,5]]},"315":{"position":[[373,6]]},"327":{"position":[[882,6]]},"331":{"position":[[40,6],[74,7]]},"335":{"position":[[181,5]]},"339":{"position":[[175,5],[200,6],[399,5],[430,6]]},"361":{"position":[[148,7],[175,6],[213,5],[240,5]]},"363":{"position":[[268,5],[291,5],[343,9],[372,7],[484,9],[518,7],[697,5],[746,5]]},"377":{"position":[[112,5]]},"409":{"position":[[13,5],[38,5],[50,5],[121,5],[295,6],[315,6]]},"411":{"position":[[13,5],[40,5],[52,5],[120,5],[309,6],[330,6]]},"413":{"position":[[13,5],[41,5],[53,5],[122,5],[316,6],[338,6]]},"415":{"position":[[13,5],[32,6],[55,5],[90,5],[102,5],[171,5],[399,6],[428,6]]},"417":{"position":[[13,5],[33,6],[83,5],[136,5],[148,5],[255,5],[283,5],[486,6],[519,6]]},"419":{"position":[[13,5],[43,5],[55,5],[126,5],[320,6],[344,6]]},"421":{"position":[[337,6],[364,6],[608,6],[651,6],[835,6],[903,6]]},"423":{"position":[[341,6],[368,6]]},"451":{"position":[[34,6],[86,5],[141,6]]},"453":{"position":[[71,5],[129,5]]},"473":{"position":[[723,5],[811,7]]},"475":{"position":[[263,6],[373,6]]},"479":{"position":[[87,7]]},"481":{"position":[[87,7]]},"558":{"position":[[111,5]]},"560":{"position":[[114,5]]},"588":{"position":[[371,5],[400,5]]},"609":{"position":[[149,6],[320,7]]},"625":{"position":[[279,5],[543,5]]},"649":{"position":[[314,5]]},"719":{"position":[[12,5],[42,6]]},"721":{"position":[[12,5],[43,6]]},"725":{"position":[[64,6]]},"729":{"position":[[248,6]]},"745":{"position":[[200,7]]},"749":{"position":[[193,7],[262,8]]},"753":{"position":[[156,7],[325,8],[441,8]]},"761":{"position":[[253,5]]},"763":{"position":[[137,5],[478,5]]},"767":{"position":[[26,6],[142,7],[239,5]]},"771":{"position":[[10,5],[220,5],[379,5]]},"773":{"position":[[21,5]]},"775":{"position":[[20,5]]}}}],["value(",{"_index":234,"t":{"19":{"position":[[598,8]]}}}],["value1",{"_index":1703,"t":{"421":{"position":[[13,6],[318,6],[411,6]]},"423":{"position":[[13,6],[322,6],[415,6]]},"425":{"position":[[13,6],[53,6],[148,6]]},"427":{"position":[[13,6],[65,6],[160,6]]},"429":{"position":[[13,6],[56,6],[152,6]]},"431":{"position":[[13,6],[68,6],[164,6]]}}}],["value2",{"_index":497,"t":{"37":{"position":[[328,6]]},"421":{"position":[[32,7],[344,6],[433,7]]},"423":{"position":[[36,7],[348,6],[433,7]]},"425":{"position":[[33,7],[80,6],[172,7]]},"427":{"position":[[45,7],[92,6],[196,7]]},"429":{"position":[[36,7],[83,6],[179,7]]},"431":{"position":[[48,7],[95,6],[203,7]]}}}],["var",{"_index":499,"t":{"37":{"position":[[416,3]]},"39":{"position":[[1442,3],[1756,3],[1848,3]]},"137":{"position":[[94,3],[111,3],[185,4],[208,3],[290,5]]},"143":{"position":[[107,4],[123,3],[208,3],[244,5]]},"167":{"position":[[313,3],[352,3],[369,3],[410,3]]},"169":{"position":[[139,3],[189,3]]},"290":{"position":[[42,4]]}}}],["vararg",{"_index":215,"t":{"19":{"position":[[246,7]]},"37":{"position":[[445,6]]},"57":{"position":[[251,7],[293,7]]},"147":{"position":[[58,6]]},"262":{"position":[[34,7],[242,8]]}}}],["varargprep",{"_index":212,"t":{"19":{"position":[[217,10]]}}}],["variabl",{"_index":372,"t":{"31":{"position":[[342,9],[536,9]]},"33":{"position":[[823,8]]},"35":{"position":[[6,8]]},"37":{"position":[[366,8]]},"39":{"position":[[883,9],[1307,9]]},"49":{"position":[[703,8]]},"61":{"position":[[52,10]]},"63":{"position":[[51,9]]},"69":{"position":[[209,8]]},"79":{"position":[[246,10]]},"91":{"position":[[782,8]]},"128":{"position":[[22,9],[253,8],[342,8]]},"139":{"position":[[74,9]]},"143":{"position":[[165,8]]},"155":{"position":[[22,8]]},"189":{"position":[[69,10]]},"203":{"position":[[46,9]]},"205":{"position":[[104,9]]},"207":{"position":[[122,8]]},"209":{"position":[[101,10]]},"241":{"position":[[77,9]]},"245":{"position":[[589,8]]},"264":{"position":[[881,8]]},"315":{"position":[[107,8],[163,8],[214,9]]},"323":{"position":[[1625,8]]},"341":{"position":[[199,9]]},"343":{"position":[[437,8]]},"527":{"position":[[118,8]]}}}],["variant",{"_index":419,"t":{"33":{"position":[[1163,8]]},"325":{"position":[[179,8]]},"371":{"position":[[41,7]]},"479":{"position":[[2,7]]},"481":{"position":[[2,7]]},"739":{"position":[[8,7]]},"755":{"position":[[8,7]]},"759":{"position":[[8,7]]},"765":{"position":[[8,7]]},"769":{"position":[[8,7]]}}}],["variou",{"_index":3,"t":{"2":{"position":[[32,7]]},"61":{"position":[[407,7]]},"79":{"position":[[98,7]]},"91":{"position":[[100,7]]},"116":{"position":[[468,7]]}}}],["vast",{"_index":1518,"t":{"317":{"position":[[200,4]]}}}],["vastli",{"_index":815,"t":{"73":{"position":[[34,6]]}}}],["vec",{"_index":2305,"t":{"715":{"position":[[125,3]]},"717":{"position":[[55,3]]},"719":{"position":[[61,3]]},"721":{"position":[[62,3]]}}}],["vector",{"_index":2304,"t":{"715":{"position":[[26,7]]},"727":{"position":[[46,6]]},"729":{"position":[[19,6],[70,7]]},"731":{"position":[[19,6],[69,6]]},"733":{"position":[[20,6],[70,7]]}}}],["vector3",{"_index":563,"t":{"39":{"position":[[2270,7]]},"707":{"position":[[53,7],[97,10],[320,7]]},"711":{"position":[[0,7],[85,7],[170,7]]},"713":{"position":[[0,7],[74,7]]},"723":{"position":[[34,7],[76,7]]},"725":{"position":[[14,7],[83,7],[127,8]]},"727":{"position":[[14,7],[77,7]]},"729":{"position":[[313,7],[498,8]]},"733":{"position":[[90,7],[429,8]]}}}],["vector3(0",{"_index":2293,"t":{"707":{"position":[[112,10]]},"711":{"position":[[274,10],[304,10]]},"727":{"position":[[121,10]]},"729":{"position":[[357,10],[442,10],[841,10],[930,10]]},"733":{"position":[[237,10],[357,10]]}}}],["vector3(0.0",{"_index":2327,"t":{"727":{"position":[[156,12]]},"729":{"position":[[603,12],[706,12],[809,12],[899,12],[990,12]]},"733":{"position":[[188,12]]}}}],["vector3(1",{"_index":2294,"t":{"707":{"position":[[139,11],[155,10],[182,10],[201,10],[228,10],[250,10],[382,10]]},"711":{"position":[[214,10]]},"713":{"position":[[173,10]]},"725":{"position":[[157,10]]},"729":{"position":[[532,10],[636,10],[738,10]]}}}],["vector3(1):dot(new",{"_index":2322,"t":{"723":{"position":[[120,18]]}}}],["vector3(1.0",{"_index":2352,"t":{"733":{"position":[[308,12]]}}}],["vector3(2",{"_index":2296,"t":{"711":{"position":[[231,11]]},"713":{"position":[[118,10],[142,11],[197,11]]},"723":{"position":[[139,12]]}}}],["vector3(3",{"_index":2297,"t":{"711":{"position":[[247,10]]}}}],["vector3(90",{"_index":2347,"t":{"733":{"position":[[134,11]]}}}],["vector3(90.0",{"_index":2336,"t":{"729":{"position":[[410,13]]},"731":{"position":[[218,13]]}}}],["vendor",{"_index":727,"t":{"57":{"position":[[358,8]]}}}],["veri",{"_index":160,"t":{"13":{"position":[[794,4]]},"292":{"position":[[440,4]]}}}],["verif",{"_index":335,"t":{"27":{"position":[[645,12]]}}}],["verifi",{"_index":2131,"t":{"617":{"position":[[1024,6]]}}}],["version",{"_index":519,"t":{"39":{"position":[[415,10]]},"43":{"position":[[124,8]]},"49":{"position":[[159,7]]},"93":{"position":[[8,8]]},"97":{"position":[[22,7]]},"149":{"position":[[193,8]]},"167":{"position":[[97,7]]},"195":{"position":[[119,7],[182,7],[192,8],[240,7],[471,7]]},"217":{"position":[[137,7],[199,7],[207,11],[256,7],[312,7]]},"219":{"position":[[176,7],[238,7],[246,11],[288,7],[344,7]]},"299":{"position":[[390,7]]},"323":{"position":[[285,7],[357,8],[942,7],[1204,8],[1478,8]]},"441":{"position":[[46,7]]},"457":{"position":[[37,7],[220,8]]},"544":{"position":[[26,7]]}}}],["vfunc",{"_index":1304,"t":{"262":{"position":[[125,10]]}}}],["vfunc(\"hello",{"_index":1306,"t":{"262":{"position":[[195,14],[348,14]]}}}],["vfunc(...arg",{"_index":1307,"t":{"262":{"position":[[295,14]]}}}],["via",{"_index":403,"t":{"33":{"position":[[423,3],[1851,3]]},"39":{"position":[[1634,3]]},"49":{"position":[[1217,3]]},"106":{"position":[[40,3]]},"108":{"position":[[29,3]]},"116":{"position":[[110,3]]},"128":{"position":[[47,3]]},"353":{"position":[[17,3]]},"359":{"position":[[28,3]]},"365":{"position":[[17,3]]},"375":{"position":[[17,3]]},"407":{"position":[[17,3]]},"461":{"position":[[17,3]]},"463":{"position":[[710,3],[862,3]]},"471":{"position":[[17,3]]},"511":{"position":[[32,3]]},"523":{"position":[[206,4]]},"541":{"position":[[17,3]]},"665":{"position":[[17,3]]},"673":{"position":[[17,3]]},"699":{"position":[[17,3]]},"705":{"position":[[17,3]]}}}],["viabl",{"_index":728,"t":{"57":{"position":[[442,6]]}}}],["violat",{"_index":768,"t":{"59":{"position":[[239,9]]},"65":{"position":[[300,9]]}}}],["virtual",{"_index":963,"t":{"114":{"position":[[21,9]]},"333":{"position":[[331,7]]},"335":{"position":[[235,7]]},"339":{"position":[[8,7]]}}}],["virtualterminallevel",{"_index":1612,"t":{"351":{"position":[[286,20]]}}}],["visit",{"_index":2275,"t":{"697":{"position":[[282,5]]}}}],["visual",{"_index":986,"t":{"118":{"position":[[73,6],[95,6]]},"284":{"position":[[283,6]]}}}],["vital",{"_index":86,"t":{"9":{"position":[[403,5]]}}}],["vkmap",{"_index":735,"t":{"57":{"position":[[718,9]]},"183":{"position":[[306,8]]}}}],["vm",{"_index":184,"t":{"15":{"position":[[100,3]]},"17":{"position":[[0,2],[168,2],[263,2]]},"23":{"position":[[306,2]]},"53":{"position":[[423,2]]},"79":{"position":[[395,2]]},"89":{"position":[[6,2]]}}}],["void",{"_index":750,"t":{"57":{"position":[[1455,6]]},"292":{"position":[[61,4]]}}}],["vs",{"_index":1379,"t":{"282":{"position":[[514,2]]},"284":{"position":[[49,2]]}}}],["vsix",{"_index":1389,"t":{"284":{"position":[[392,4]]}}}],["vulner",{"_index":541,"t":{"39":{"position":[[1489,10]]}}}],["w",{"_index":853,"t":{"85":{"position":[[203,3]]},"459":{"position":[[84,1]]}}}],["w:strip",{"_index":1794,"t":{"459":{"position":[[130,11]]}}}],["wait",{"_index":1815,"t":{"463":{"position":[[1016,8],[1216,4]]},"695":{"position":[[39,7],[311,5],[326,7]]}}}],["walru",{"_index":350,"t":{"29":{"position":[[178,6],[280,6]]},"31":{"position":[[640,6]]},"75":{"position":[[64,6]]},"77":{"position":[[137,6]]},"79":{"position":[[11,6]]},"301":{"position":[[4,6]]}}}],["want",{"_index":109,"t":{"11":{"position":[[350,4]]},"33":{"position":[[2574,4]]},"130":{"position":[[34,4]]},"193":{"position":[[14,4]]},"195":{"position":[[69,4]]},"217":{"position":[[72,4]]},"258":{"position":[[18,4]]},"262":{"position":[[50,4]]},"274":{"position":[[464,4]]},"341":{"position":[[108,5]]},"449":{"position":[[473,4]]},"763":{"position":[[187,4],[358,4]]}}}],["warn",{"_index":277,"t":{"25":{"position":[[22,7],[150,7],[370,7]]},"27":{"position":[[8,7]]},"33":{"position":[[134,7],[202,7],[270,7],[299,7]]},"35":{"position":[[23,8]]},"37":{"position":[[197,7],[427,7]]},"39":{"position":[[1204,9],[1220,7],[1420,7],[1678,8],[1859,7],[1992,7],[2006,8]]},"45":{"position":[[75,7]]},"49":{"position":[[515,9],[574,8]]},"61":{"position":[[330,7]]},"69":{"position":[[25,7],[96,8]]},"71":{"position":[[76,7]]},"79":{"position":[[151,9],[294,8]]},"85":{"position":[[313,9]]},"91":{"position":[[19,8],[116,7]]},"134":{"position":[[31,8]]},"137":{"position":[[148,8]]},"139":{"position":[[126,8],[320,7]]},"141":{"position":[[174,8]]},"143":{"position":[[156,8]]},"145":{"position":[[146,8]]},"147":{"position":[[150,8]]},"149":{"position":[[135,8]]},"151":{"position":[[108,8]]},"153":{"position":[[168,8],[420,7]]},"155":{"position":[[124,8],[370,7]]},"157":{"position":[[145,8],[367,7]]},"159":{"position":[[174,8],[387,7],[493,8]]},"161":{"position":[[158,8]]},"163":{"position":[[201,8]]},"165":{"position":[[18,7]]},"167":{"position":[[0,8],[156,7],[204,8],[264,7],[516,8]]},"169":{"position":[[11,8]]},"191":{"position":[[57,7],[160,8]]},"215":{"position":[[47,7],[193,8],[457,7]]},"290":{"position":[[241,7]]},"459":{"position":[[49,8],[148,10]]}}}],["warn(\"bad",{"_index":1792,"t":{"459":{"position":[[100,13]]}}}],["wasm",{"_index":339,"t":{"27":{"position":[[701,4]]},"101":{"position":[[128,5]]},"445":{"position":[[79,7]]},"463":{"position":[[618,4],[917,4],[1268,4],[1584,4],[1721,4],[1837,4],[2397,6]]},"465":{"position":[[96,4]]},"467":{"position":[[123,4]]},"673":{"position":[[63,4]]}}}],["way",{"_index":169,"t":{"13":{"position":[[993,3]]},"101":{"position":[[12,3]]},"203":{"position":[[26,3]]},"205":{"position":[[157,5],[167,3],[220,3]]},"207":{"position":[[172,5],[182,3],[241,3]]},"209":{"position":[[150,5],[160,3],[214,3]]},"213":{"position":[[38,3],[78,3],[199,3]]},"237":{"position":[[19,3]]},"258":{"position":[[123,3],[189,3]]},"286":{"position":[[32,3]]},"301":{"position":[[489,3],[546,3]]},"303":{"position":[[48,3]]},"325":{"position":[[8,3]]},"331":{"position":[[189,3],[227,3]]},"337":{"position":[[73,3],[135,3]]},"457":{"position":[[17,3]]},"467":{"position":[[88,4]]},"527":{"position":[[103,4]]},"588":{"position":[[313,4]]},"627":{"position":[[47,4]]}}}],["wcall",{"_index":584,"t":{"39":{"position":[[2811,5]]},"459":{"position":[[88,8]]}}}],["we'd",{"_index":1153,"t":{"209":{"position":[[54,4]]}}}],["we'v",{"_index":11,"t":{"2":{"position":[[124,5]]}}}],["weakest",{"_index":2078,"t":{"596":{"position":[[76,8]]}}}],["well",{"_index":708,"t":{"53":{"position":[[410,4]]},"108":{"position":[[475,4],[655,4]]},"110":{"position":[[138,4]]},"227":{"position":[[168,5]]},"303":{"position":[[298,4]]}}}],["wget",{"_index":928,"t":{"108":{"position":[[49,4]]}}}],["what'",{"_index":1430,"t":{"295":{"position":[[68,6]]},"421":{"position":[[116,6]]},"423":{"position":[[120,6]]},"659":{"position":[[439,6],[548,6],[622,6],[718,8]]}}}],["whenev",{"_index":1336,"t":{"274":{"position":[[444,8]]},"335":{"position":[[103,8]]}}}],["whether",{"_index":1614,"t":{"355":{"position":[[87,7]]},"367":{"position":[[86,7]]},"371":{"position":[[151,7]]},"473":{"position":[[109,7]]},"495":{"position":[[104,7]]},"651":{"position":[[297,7]]},"657":{"position":[[364,7]]},"659":{"position":[[161,7]]},"701":{"position":[[89,7]]}}}],["white",{"_index":1639,"t":{"363":{"position":[[1146,5],[1366,8]]}}}],["whitespac",{"_index":2154,"t":{"637":{"position":[[171,10]]},"639":{"position":[[172,10]]},"641":{"position":[[171,10]]},"643":{"position":[[177,10]]},"645":{"position":[[46,10]]}}}],["window",{"_index":248,"t":{"23":{"position":[[67,7]]},"49":{"position":[[1082,7]]},"63":{"position":[[142,7],[225,7]]},"103":{"position":[[45,8]]},"351":{"position":[[179,7]]},"445":{"position":[[68,10]]},"588":{"position":[[119,8]]}}}],["wip",{"_index":1426,"t":{"292":{"position":[[418,3]]}}}],["wish",{"_index":981,"t":{"116":{"position":[[420,5]]},"122":{"position":[[216,4]]},"649":{"position":[[287,4]]}}}],["within",{"_index":136,"t":{"13":{"position":[[331,6]]},"29":{"position":[[217,6]]},"57":{"position":[[1146,6]]},"75":{"position":[[93,6]]},"77":{"position":[[153,6]]},"118":{"position":[[88,6]]},"171":{"position":[[406,6]]},"266":{"position":[[36,6]]},"437":{"position":[[69,6]]},"495":{"position":[[19,6]]}}}],["without",{"_index":87,"t":{"9":{"position":[[498,7]]},"39":{"position":[[1145,7],[1254,7],[2611,7]]},"49":{"position":[[458,7],[507,7],[566,7]]},"57":{"position":[[936,7]]},"59":{"position":[[129,7]]},"132":{"position":[[265,7]]},"161":{"position":[[76,7]]},"173":{"position":[[291,7]]},"191":{"position":[[100,7]]},"339":{"position":[[65,7]]},"703":{"position":[[202,7]]}}}],["won't",{"_index":68,"t":{"7":{"position":[[578,5]]},"315":{"position":[[246,5]]}}}],["word",{"_index":796,"t":{"69":{"position":[[9,7]]}}}],["work",{"_index":69,"t":{"7":{"position":[[584,5]]},"29":{"position":[[119,7]]},"31":{"position":[[426,7]]},"39":{"position":[[697,5],[897,7],[937,7],[3551,5]]},"45":{"position":[[143,7]]},"47":{"position":[[31,7]]},"51":{"position":[[83,7],[135,7]]},"53":{"position":[[25,5]]},"67":{"position":[[230,7]]},"75":{"position":[[85,7]]},"108":{"position":[[612,4]]},"221":{"position":[[70,5]]},"276":{"position":[[540,5]]},"278":{"position":[[476,6]]},"290":{"position":[[78,5]]},"303":{"position":[[239,5]]},"337":{"position":[[199,5]]},"503":{"position":[[136,5]]},"507":{"position":[[147,5]]},"509":{"position":[[23,7],[84,7],[146,5],[241,7]]},"527":{"position":[[169,6]]},"745":{"position":[[177,4]]}}}],["worl",{"_index":2174,"t":{"653":{"position":[[157,8]]}}}],["world",{"_index":1006,"t":{"126":{"position":[[227,8],[274,8],[466,8],[530,7]]},"193":{"position":[[138,7],[210,5],[298,7]]},"199":{"position":[[195,7]]},"229":{"position":[[323,6]]},"264":{"position":[[830,6]]},"290":{"position":[[63,6]]},"299":{"position":[[343,8],[363,6],[602,8],[622,6],[837,8],[857,6]]},"339":{"position":[[156,7],[380,7]]},"363":{"position":[[907,6],[1007,8]]},"367":{"position":[[204,9]]},"369":{"position":[[172,6]]},"371":{"position":[[273,9]]},"373":{"position":[[187,6]]},"415":{"position":[[311,8],[454,7]]},"417":{"position":[[367,8]]},"419":{"position":[[201,8]]},"421":{"position":[[501,8],[518,10],[634,7],[677,9]]},"423":{"position":[[502,8],[516,8]]},"473":{"position":[[240,7],[291,7],[322,8],[420,8]]},"475":{"position":[[665,7]]},"594":{"position":[[560,7],[725,6]]},"600":{"position":[[421,7],[612,6]]},"606":{"position":[[603,7],[802,6]]},"625":{"position":[[208,6],[304,9],[568,9]]},"629":{"position":[[196,9],[246,5]]},"631":{"position":[[200,9],[251,8]]},"633":{"position":[[201,9],[255,5]]},"649":{"position":[[591,8],[622,6],[658,8],[692,6],[728,8],[767,6],[803,8],[832,6]]},"651":{"position":[[484,8],[509,6],[546,8],[599,8]]},"653":{"position":[[125,6]]},"655":{"position":[[149,6],[174,6]]},"659":{"position":[[432,6],[540,7],[615,6],[711,6]]},"661":{"position":[[130,6],[162,9]]},"663":{"position":[[132,6]]},"679":{"position":[[400,7]]},"687":{"position":[[344,5]]},"753":{"position":[[132,8],[356,8],[472,8]]}}}],["world\"):contains(\"world",{"_index":1587,"t":{"337":{"position":[[97,26]]}}}],["world\":contains(\"world",{"_index":1590,"t":{"337":{"position":[[158,25]]}}}],["worth",{"_index":155,"t":{"13":{"position":[[715,5]]}}}],["wrap",{"_index":1492,"t":{"305":{"position":[[884,8]]},"679":{"position":[[28,5]]}}}],["wrapper",{"_index":1935,"t":{"517":{"position":[[24,7]]}}}],["write",{"_index":914,"t":{"99":{"position":[[51,7]]},"101":{"position":[[31,7],[55,5]]},"124":{"position":[[68,5]]},"167":{"position":[[213,5]]},"177":{"position":[[167,7],[364,7]]},"213":{"position":[[45,7]]},"258":{"position":[[97,7]]},"323":{"position":[[660,7]]},"507":{"position":[[246,5],[449,5]]}}}],["write(\"hello",{"_index":1104,"t":{"177":{"position":[[199,15],[396,15]]}}}],["write(text",{"_index":1101,"t":{"177":{"position":[[117,10],[285,11]]}}}],["written",{"_index":1279,"t":{"256":{"position":[[895,7]]},"305":{"position":[[683,7]]}}}],["wrong",{"_index":270,"t":{"23":{"position":[[400,5]]},"37":{"position":[[380,5],[472,5]]},"61":{"position":[[264,5]]}}}],["wrote",{"_index":1537,"t":{"323":{"position":[[1686,5]]}}}],["x",{"_index":1226,"t":{"237":{"position":[[424,6]]},"270":{"position":[[185,1],[192,1],[196,2],[216,2],[238,1]]},"305":{"position":[[375,3]]},"329":{"position":[[87,1],[97,1],[101,1],[103,1],[113,1],[117,1],[119,1],[129,1]]},"527":{"position":[[72,1],[93,2]]},"717":{"position":[[24,2]]},"777":{"position":[[198,1],[296,1]]}}}],["x.new",{"_index":1227,"t":{"237":{"position":[[452,11]]}}}],["x8d\\xad\\x5f\\x6a\\x7d\\xd2\\xdc\\xd8\\xc3\\x5e\\xc2\\xfd\\x7b\\xab\\xb4\\x99\\xbc\\xad\\x60\\xd2\\x7d\\x73\\xfe\\x73\\xec\\xa2\\xce\\x02\\x5d\\xfd\\x3b\\x47",{"_index":2035,"t":{"581":{"position":[[382,131]]}}}],["xbc\\xe8\\xc9\\xac\\xa4\\x12\\x07\\x76\\xfa\\xd6\\xb5\\x17\\x87\\x4a\\xa0\\x9c\\x46\\x40\\x54\\x54",{"_index":2031,"t":{"579":{"position":[[352,83]]}}}],["xmelia",{"_index":1513,"t":{"315":{"position":[[458,6]]}}}],["xmiliah",{"_index":385,"t":{"31":{"position":[[770,8]]}}}],["xml",{"_index":414,"t":{"33":{"position":[[988,5]]},"701":{"position":[[20,4],[75,4],[134,4],[170,3]]},"703":{"position":[[33,3],[66,3],[148,5],[174,4],[226,3],[1124,3]]}}}],["xml.decod",{"_index":2286,"t":{"703":{"position":[[265,13]]}}}],["xor",{"_index":390,"t":{"33":{"position":[[64,3]]},"297":{"position":[[209,4]]}}}],["xpcall",{"_index":1398,"t":{"286":{"position":[[68,7]]}}}],["y",{"_index":2312,"t":{"717":{"position":[[27,1]]},"729":{"position":[[173,1],[255,1],[389,1],[565,1],[669,1],[873,1],[963,1]]},"731":{"position":[[171,5],[180,1]]},"733":{"position":[[167,1],[271,1],[391,1]]}}}],["yaw",{"_index":2334,"t":{"729":{"position":[[268,4],[297,3]]}}}],["yield",{"_index":129,"t":{"13":{"position":[[161,5],[494,7]]},"405":{"position":[[0,6],[109,5]]},"463":{"position":[[1804,7],[1904,6]]},"465":{"position":[[341,6]]},"467":{"position":[[222,6]]},"521":{"position":[[96,7],[217,5]]},"675":{"position":[[282,7]]},"685":{"position":[[328,5]]},"689":{"position":[[493,7]]},"695":{"position":[[340,8]]},"697":{"position":[[135,6]]}}}],["yieldfunc",{"_index":1936,"t":{"519":{"position":[[96,9]]},"521":{"position":[[0,9]]}}}],["you'd",{"_index":1259,"t":{"256":{"position":[[85,5]]},"262":{"position":[[72,5]]}}}],["you'll",{"_index":1213,"t":{"233":{"position":[[425,6]]}}}],["you'r",{"_index":1009,"t":{"126":{"position":[[318,6]]},"266":{"position":[[133,6]]},"315":{"position":[[380,6]]},"592":{"position":[[150,6]]},"594":{"position":[[151,6]]},"598":{"position":[[118,6]]},"600":{"position":[[85,6]]},"611":{"position":[[110,6]]},"613":{"position":[[111,6]]}}}],["yourself",{"_index":1095,"t":{"171":{"position":[[345,9]]},"177":{"position":[[437,9]]},"213":{"position":[[305,9]]},"217":{"position":[[335,9]]},"219":{"position":[[367,9]]},"229":{"position":[[503,9]]},"235":{"position":[[215,9]]},"237":{"position":[[270,9]]},"243":{"position":[[227,9]]},"245":{"position":[[686,9]]},"247":{"position":[[413,9]]},"249":{"position":[[396,9]]},"251":{"position":[[496,9]]},"260":{"position":[[401,9]]},"262":{"position":[[386,9]]},"268":{"position":[[218,9]]},"274":{"position":[[1047,9]]},"278":{"position":[[378,9],[780,9]]},"286":{"position":[[636,9]]},"305":{"position":[[622,9]]},"307":{"position":[[186,9]]},"309":{"position":[[248,9]]},"311":{"position":[[239,9]]},"463":{"position":[[2461,9]]},"469":{"position":[[409,9]]}}}],["z",{"_index":2313,"t":{"717":{"position":[[33,1]]},"729":{"position":[[278,1],[475,1],[771,1]]}}}],["zero",{"_index":1996,"t":{"558":{"position":[[151,5]]},"560":{"position":[[154,5]]},"649":{"position":[[516,5],[550,5]]}}}]],"pipeline":["stemmer"]}}] \ No newline at end of file +[{"documents":[{"i":1,"t":"Changelog","u":"/docs/Changelog","b":["Documentation"]},{"i":75,"t":"Compatibility","u":"/docs/Compatibility","b":["Documentation"]},{"i":87,"t":"What is Pluto?","u":"/docs/Introduction","b":["Documentation"]},{"i":91,"t":"Editor Integration","u":"/docs/Editor Integration","b":["Documentation"]},{"i":95,"t":"For Integrators","u":"/docs/For Integrators","b":["Documentation"]},{"i":114,"t":"Break Statement","u":"/docs/New Features/Break Statement","b":["Documentation","New Features"]},{"i":116,"t":"Getting Started","u":"/docs/Getting Started","b":["Documentation"]},{"i":141,"t":"Compiler Warnings","u":"/docs/New Features/Compiler Warnings","b":["Documentation","New Features"]},{"i":178,"t":"Compile-Time Evaluation","u":"/docs/New Features/Compile-Time Evaluation","b":["Documentation","New Features"]},{"i":186,"t":"Default Arguments","u":"/docs/New Features/Default Arguments","b":["Documentation","New Features"]},{"i":188,"t":"Destructuring","u":"/docs/New Features/Destructuring","b":["Documentation","New Features"]},{"i":198,"t":"Explicit Globals","u":"/docs/New Features/Explicit Globals","b":["Documentation","New Features"]},{"i":202,"t":"Continue Statement","u":"/docs/New Features/Continue Statement","b":["Documentation","New Features"]},{"i":208,"t":"Export Modifier","u":"/docs/New Features/Export Modifier","b":["Documentation","New Features"]},{"i":212,"t":"Enumerations","u":"/docs/New Features/Enumerations","b":["Documentation","New Features"]},{"i":222,"t":"For-As Loop","u":"/docs/New Features/For-As Loop","b":["Documentation","New Features"]},{"i":224,"t":"Lambda Expressions","u":"/docs/New Features/Lambda Expressions","b":["Documentation","New Features"]},{"i":226,"t":"In Expressions","u":"/docs/New Features/In Expressions","b":["Documentation","New Features"]},{"i":230,"t":"Named Varargs","u":"/docs/New Features/Named Varargs","b":["Documentation","New Features"]},{"i":232,"t":"Named Arguments","u":"/docs/New Features/Named Arguments","b":["Documentation","New Features"]},{"i":238,"t":"Nodiscard Functions","u":"/docs/New Features/Nodiscard Functions","b":["Documentation","New Features"]},{"i":240,"t":"Safe Navigation","u":"/docs/New Features/Safe Navigation","b":["Documentation","New Features"]},{"i":245,"t":"String Indexing","u":"/docs/New Features/String Indexing","b":["Documentation","New Features"]},{"i":247,"t":"String Interpolation","u":"/docs/New Features/String Interpolation","b":["Documentation","New Features"]},{"i":249,"t":"Switch Blocks","u":"/docs/New Features/Switch Blocks","b":["Documentation","New Features"]},{"i":259,"t":"Numeral Parsing","u":"/docs/New Features/Numeral Parsing","b":["Documentation","New Features"]},{"i":265,"t":"Ternary Expressions","u":"/docs/New Features/Ternary Expressions","b":["Documentation","New Features"]},{"i":269,"t":"Object-Oriented Programming","u":"/docs/New Features/Object-Oriented Programming","b":["Documentation","New Features"]},{"i":293,"t":"Try-Catch Statement","u":"/docs/New Features/Try-Catch Statement","b":["Documentation","New Features"]},{"i":297,"t":"Table Freezing","u":"/docs/New Features/Table Freezing","b":["Documentation","New Features"]},{"i":301,"t":"Type Hinting","u":"/docs/New Features/Type Hinting","b":["Documentation","New Features"]},{"i":305,"t":"For Loops","u":"/docs/Optimizations/For Loops","b":["Documentation","Optimizations"]},{"i":309,"t":"New Operators","u":"/docs/New Operators","b":["Documentation"]},{"i":328,"t":"Jump Table","u":"/docs/Optimizations/Jump Table","b":["Documentation","Optimizations"]},{"i":330,"t":"Special Arithmetic","u":"/docs/Optimizations/Special Arithmetic","b":["Documentation","Optimizations"]},{"i":332,"t":"Table Length","u":"/docs/Optimizations/Table Length","b":["Documentation","Optimizations"]},{"i":334,"t":"Boolean Concatenation","u":"/docs/QoL Improvements/Boolean Concatenation","b":["Documentation","QoL Improvements"]},{"i":336,"t":"Removed Locals Limit","u":"/docs/QoL Improvements/Removed Locals Limit","b":["Documentation","QoL Improvements"]},{"i":338,"t":"Generalized Iteration","u":"/docs/QoL Improvements/Generalized Iteration","b":["Documentation","QoL Improvements"]},{"i":340,"t":"Optional Parentheses","u":"/docs/QoL Improvements/Optional Parentheses","b":["Documentation","QoL Improvements"]},{"i":342,"t":"Reserved Identifiers","u":"/docs/QoL Improvements/Reserved Identifiers","b":["Documentation","QoL Improvements"]},{"i":344,"t":"Base32","u":"/docs/Runtime Environment/Base32","b":["Documentation","Runtime Environment"]},{"i":350,"t":"Base64","u":"/docs/Runtime Environment/Base64","b":["Documentation","Runtime Environment"]},{"i":360,"t":"Assert","u":"/docs/Runtime Environment/Assert","b":["Documentation","Runtime Environment"]},{"i":392,"t":"CaT","u":"/docs/Runtime Environment/CaT","b":["Documentation","Runtime Environment"]},{"i":398,"t":"Bigint","u":"/docs/Runtime Environment/Bigint","b":["Documentation","Runtime Environment"]},{"i":424,"t":"Crypto","u":"/docs/Runtime Environment/Crypto","b":["Documentation","Runtime Environment"]},{"i":502,"t":"Global & Base","u":"/docs/Runtime Environment/Global & Base","b":["Documentation","Runtime Environment"]},{"i":524,"t":"Coroutine","u":"/docs/Runtime Environment/Coroutine","b":["Documentation","Runtime Environment"]},{"i":530,"t":"Exception","u":"/docs/Runtime Environment/Exception","b":["Documentation","Runtime Environment"]},{"i":532,"t":"HTTP","u":"/docs/Runtime Environment/HTTP","b":["Documentation","Runtime Environment"]},{"i":540,"t":"IO","u":"/docs/Runtime Environment/IO","b":["Documentation","Runtime Environment"]},{"i":574,"t":"Math","u":"/docs/Runtime Environment/Math","b":["Documentation","Runtime Environment"]},{"i":582,"t":"Syntax Errors","u":"/docs/QoL Improvements/Syntax Errors","b":["Documentation","QoL Improvements"]},{"i":590,"t":"JSON","u":"/docs/Runtime Environment/JSON","b":["Documentation","Runtime Environment"]},{"i":596,"t":"OS","u":"/docs/Runtime Environment/OS","b":["Documentation","Runtime Environment"]},{"i":604,"t":"Socket","u":"/docs/Runtime Environment/Socket","b":["Documentation","Runtime Environment"]},{"i":630,"t":"String","u":"/docs/Runtime Environment/String","b":["Documentation","Runtime Environment"]},{"i":676,"t":"Scheduler","u":"/docs/Runtime Environment/Scheduler","b":["Documentation","Runtime Environment"]},{"i":690,"t":"URL","u":"/docs/Runtime Environment/URL","b":["Documentation","Runtime Environment"]},{"i":698,"t":"Vector3","u":"/docs/Runtime Environment/Vector3","b":["Documentation","Runtime Environment"]},{"i":728,"t":"XML","u":"/docs/Runtime Environment/XML","b":["Documentation","Runtime Environment"]},{"i":734,"t":"Table","u":"/docs/Runtime Environment/Table","b":["Documentation","Runtime Environment"]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/1",[0,4.449]],["t/75",[1,4.449]],["t/87",[2,4.449]],["t/91",[3,3.424,4,2.958]],["t/95",[4,3.844]],["t/114",[5,3.424,6,2.651]],["t/116",[7,3.424,8,3.424]],["t/141",[9,2.958,10,3.424]],["t/178",[9,2.404,11,2.783,12,2.783]],["t/186",[13,3.424,14,2.958]],["t/188",[15,4.449]],["t/198",[16,3.424,17,2.958]],["t/202",[6,2.651,18,3.424]],["t/208",[19,3.424,20,3.424]],["t/212",[21,4.449]],["t/222",[22,3.844]],["t/224",[23,3.424,24,2.651]],["t/226",[24,3.445]],["t/230",[25,2.958,26,3.424]],["t/232",[14,2.958,25,2.958]],["t/238",[27,3.424,28,3.424]],["t/240",[29,3.424,30,3.424]],["t/245",[31,2.651,32,3.424]],["t/247",[31,2.651,33,3.424]],["t/249",[34,3.424,35,3.424]],["t/259",[36,3.424,37,3.424]],["t/265",[24,2.651,38,3.424]],["t/269",[39,2.783,40,2.783,41,2.783]],["t/293",[6,2.154,42,2.783,43,2.783]],["t/297",[44,2.422,45,3.424]],["t/301",[46,3.424,47,3.424]],["t/305",[22,3.844]],["t/309",[48,3.424,49,3.424]],["t/328",[44,2.422,50,3.424]],["t/330",[51,3.424,52,3.424]],["t/332",[44,2.422,53,3.424]],["t/334",[54,3.424,55,3.424]],["t/336",[56,2.783,57,2.783,58,2.783]],["t/338",[59,3.424,60,3.424]],["t/340",[61,3.424,62,3.424]],["t/342",[63,3.424,64,3.424]],["t/344",[65,4.449]],["t/350",[66,4.449]],["t/360",[67,4.449]],["t/392",[68,4.449]],["t/398",[69,4.449]],["t/424",[70,4.449]],["t/502",[17,2.404,71,2.783,72,2.783]],["t/524",[73,4.449]],["t/530",[74,4.449]],["t/532",[75,4.449]],["t/540",[76,4.449]],["t/574",[77,4.449]],["t/582",[78,3.424,79,3.424]],["t/590",[80,4.449]],["t/596",[81,4.449]],["t/604",[82,4.449]],["t/630",[31,3.445]],["t/676",[83,4.449]],["t/690",[84,4.449]],["t/698",[85,4.449]],["t/728",[86,4.449]],["t/734",[44,3.147]]],"invertedIndex":[["",{"_index":71,"t":{"502":{"position":[[7,1]]}}}],["argument",{"_index":14,"t":{"186":{"position":[[8,9]]},"232":{"position":[[6,9]]}}}],["arithmet",{"_index":52,"t":{"330":{"position":[[8,10]]}}}],["assert",{"_index":67,"t":{"360":{"position":[[0,6]]}}}],["base",{"_index":72,"t":{"502":{"position":[[9,4]]}}}],["base32",{"_index":65,"t":{"344":{"position":[[0,6]]}}}],["base64",{"_index":66,"t":{"350":{"position":[[0,6]]}}}],["bigint",{"_index":69,"t":{"398":{"position":[[0,6]]}}}],["block",{"_index":35,"t":{"249":{"position":[[7,6]]}}}],["boolean",{"_index":54,"t":{"334":{"position":[[0,7]]}}}],["break",{"_index":5,"t":{"114":{"position":[[0,5]]}}}],["cat",{"_index":68,"t":{"392":{"position":[[0,3]]}}}],["catch",{"_index":43,"t":{"293":{"position":[[4,5]]}}}],["changelog",{"_index":0,"t":{"1":{"position":[[0,9]]}}}],["compat",{"_index":1,"t":{"75":{"position":[[0,13]]}}}],["compil",{"_index":9,"t":{"141":{"position":[[0,8]]},"178":{"position":[[0,7]]}}}],["concaten",{"_index":55,"t":{"334":{"position":[[8,13]]}}}],["continu",{"_index":18,"t":{"202":{"position":[[0,8]]}}}],["coroutin",{"_index":73,"t":{"524":{"position":[[0,9]]}}}],["crypto",{"_index":70,"t":{"424":{"position":[[0,6]]}}}],["default",{"_index":13,"t":{"186":{"position":[[0,7]]}}}],["destructur",{"_index":15,"t":{"188":{"position":[[0,13]]}}}],["editor",{"_index":3,"t":{"91":{"position":[[0,6]]}}}],["enumer",{"_index":21,"t":{"212":{"position":[[0,12]]}}}],["error",{"_index":79,"t":{"582":{"position":[[7,6]]}}}],["evalu",{"_index":12,"t":{"178":{"position":[[13,10]]}}}],["except",{"_index":74,"t":{"530":{"position":[[0,9]]}}}],["explicit",{"_index":16,"t":{"198":{"position":[[0,8]]}}}],["export",{"_index":19,"t":{"208":{"position":[[0,6]]}}}],["express",{"_index":24,"t":{"224":{"position":[[7,11]]},"226":{"position":[[3,11]]},"265":{"position":[[8,11]]}}}],["freez",{"_index":45,"t":{"297":{"position":[[6,8]]}}}],["function",{"_index":28,"t":{"238":{"position":[[10,9]]}}}],["gener",{"_index":59,"t":{"338":{"position":[[0,11]]}}}],["get",{"_index":7,"t":{"116":{"position":[[0,7]]}}}],["global",{"_index":17,"t":{"198":{"position":[[9,7]]},"502":{"position":[[0,6]]}}}],["hint",{"_index":47,"t":{"301":{"position":[[5,7]]}}}],["http",{"_index":75,"t":{"532":{"position":[[0,4]]}}}],["identifi",{"_index":64,"t":{"342":{"position":[[9,11]]}}}],["index",{"_index":32,"t":{"245":{"position":[[7,8]]}}}],["integr",{"_index":4,"t":{"91":{"position":[[7,11]]},"95":{"position":[[4,11]]}}}],["interpol",{"_index":33,"t":{"247":{"position":[[7,13]]}}}],["io",{"_index":76,"t":{"540":{"position":[[0,2]]}}}],["iter",{"_index":60,"t":{"338":{"position":[[12,9]]}}}],["json",{"_index":80,"t":{"590":{"position":[[0,4]]}}}],["jump",{"_index":50,"t":{"328":{"position":[[0,4]]}}}],["lambda",{"_index":23,"t":{"224":{"position":[[0,6]]}}}],["length",{"_index":53,"t":{"332":{"position":[[6,6]]}}}],["limit",{"_index":58,"t":{"336":{"position":[[15,5]]}}}],["local",{"_index":57,"t":{"336":{"position":[[8,6]]}}}],["loop",{"_index":22,"t":{"222":{"position":[[7,4]]},"305":{"position":[[4,5]]}}}],["math",{"_index":77,"t":{"574":{"position":[[0,4]]}}}],["modifi",{"_index":20,"t":{"208":{"position":[[7,8]]}}}],["name",{"_index":25,"t":{"230":{"position":[[0,5]]},"232":{"position":[[0,5]]}}}],["navig",{"_index":30,"t":{"240":{"position":[[5,10]]}}}],["new",{"_index":48,"t":{"309":{"position":[[0,3]]}}}],["nodiscard",{"_index":27,"t":{"238":{"position":[[0,9]]}}}],["numer",{"_index":36,"t":{"259":{"position":[[0,7]]}}}],["object",{"_index":39,"t":{"269":{"position":[[0,6]]}}}],["oper",{"_index":49,"t":{"309":{"position":[[4,9]]}}}],["option",{"_index":61,"t":{"340":{"position":[[0,8]]}}}],["orient",{"_index":40,"t":{"269":{"position":[[7,8]]}}}],["os",{"_index":81,"t":{"596":{"position":[[0,2]]}}}],["parenthes",{"_index":62,"t":{"340":{"position":[[9,11]]}}}],["pars",{"_index":37,"t":{"259":{"position":[[8,7]]}}}],["pluto",{"_index":2,"t":{"87":{"position":[[8,6]]}}}],["program",{"_index":41,"t":{"269":{"position":[[16,11]]}}}],["remov",{"_index":56,"t":{"336":{"position":[[0,7]]}}}],["reserv",{"_index":63,"t":{"342":{"position":[[0,8]]}}}],["safe",{"_index":29,"t":{"240":{"position":[[0,4]]}}}],["schedul",{"_index":83,"t":{"676":{"position":[[0,9]]}}}],["socket",{"_index":82,"t":{"604":{"position":[[0,6]]}}}],["special",{"_index":51,"t":{"330":{"position":[[0,7]]}}}],["start",{"_index":8,"t":{"116":{"position":[[8,7]]}}}],["statement",{"_index":6,"t":{"114":{"position":[[6,9]]},"202":{"position":[[9,9]]},"293":{"position":[[10,9]]}}}],["string",{"_index":31,"t":{"245":{"position":[[0,6]]},"247":{"position":[[0,6]]},"630":{"position":[[0,6]]}}}],["switch",{"_index":34,"t":{"249":{"position":[[0,6]]}}}],["syntax",{"_index":78,"t":{"582":{"position":[[0,6]]}}}],["tabl",{"_index":44,"t":{"297":{"position":[[0,5]]},"328":{"position":[[5,5]]},"332":{"position":[[0,5]]},"734":{"position":[[0,5]]}}}],["ternari",{"_index":38,"t":{"265":{"position":[[0,7]]}}}],["time",{"_index":11,"t":{"178":{"position":[[8,4]]}}}],["tri",{"_index":42,"t":{"293":{"position":[[0,3]]}}}],["type",{"_index":46,"t":{"301":{"position":[[0,4]]}}}],["url",{"_index":84,"t":{"690":{"position":[[0,3]]}}}],["vararg",{"_index":26,"t":{"230":{"position":[[6,7]]}}}],["vector3",{"_index":85,"t":{"698":{"position":[[0,7]]}}}],["warn",{"_index":10,"t":{"141":{"position":[[9,8]]}}}],["xml",{"_index":86,"t":{"728":{"position":[[0,3]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3,"t":"0.9.5","u":"/docs/Changelog","h":"#095","p":1},{"i":5,"t":"0.9.4","u":"/docs/Changelog","h":"#094","p":1},{"i":7,"t":"0.9.3","u":"/docs/Changelog","h":"#093","p":1},{"i":9,"t":"0.9.2","u":"/docs/Changelog","h":"#092","p":1},{"i":11,"t":"0.9.1","u":"/docs/Changelog","h":"#091","p":1},{"i":13,"t":"0.9.0","u":"/docs/Changelog","h":"#090","p":1},{"i":15,"t":"0.8.2","u":"/docs/Changelog","h":"#082","p":1},{"i":17,"t":"0.8.1","u":"/docs/Changelog","h":"#081","p":1},{"i":19,"t":"0.8.0","u":"/docs/Changelog","h":"#080","p":1},{"i":21,"t":"0.7.4","u":"/docs/Changelog","h":"#074","p":1},{"i":23,"t":"0.7.3","u":"/docs/Changelog","h":"#073","p":1},{"i":25,"t":"0.7.2","u":"/docs/Changelog","h":"#072","p":1},{"i":27,"t":"0.7.1","u":"/docs/Changelog","h":"#071","p":1},{"i":29,"t":"0.7.0","u":"/docs/Changelog","h":"#070","p":1},{"i":31,"t":"0.6.3","u":"/docs/Changelog","h":"#063","p":1},{"i":33,"t":"0.6.2","u":"/docs/Changelog","h":"#062","p":1},{"i":35,"t":"0.6.1","u":"/docs/Changelog","h":"#061","p":1},{"i":37,"t":"0.6.0","u":"/docs/Changelog","h":"#060","p":1},{"i":39,"t":"0.5.4","u":"/docs/Changelog","h":"#054","p":1},{"i":41,"t":"0.5.3","u":"/docs/Changelog","h":"#053","p":1},{"i":43,"t":"0.5.2","u":"/docs/Changelog","h":"#052","p":1},{"i":45,"t":"0.5.1","u":"/docs/Changelog","h":"#051","p":1},{"i":47,"t":"0.5.0","u":"/docs/Changelog","h":"#050","p":1},{"i":49,"t":"0.4.5","u":"/docs/Changelog","h":"#045","p":1},{"i":51,"t":"0.4.4","u":"/docs/Changelog","h":"#044","p":1},{"i":53,"t":"0.4.3","u":"/docs/Changelog","h":"#043","p":1},{"i":55,"t":"0.4.2","u":"/docs/Changelog","h":"#042","p":1},{"i":57,"t":"0.4.1","u":"/docs/Changelog","h":"#041","p":1},{"i":59,"t":"0.4.0","u":"/docs/Changelog","h":"#040","p":1},{"i":61,"t":"0.3.2","u":"/docs/Changelog","h":"#032","p":1},{"i":63,"t":"0.3.1","u":"/docs/Changelog","h":"#031","p":1},{"i":65,"t":"0.3.0","u":"/docs/Changelog","h":"#030","p":1},{"i":67,"t":"0.2.2","u":"/docs/Changelog","h":"#022","p":1},{"i":69,"t":"0.2.1","u":"/docs/Changelog","h":"#021","p":1},{"i":71,"t":"0.2.0","u":"/docs/Changelog","h":"#020","p":1},{"i":73,"t":"0.1.0","u":"/docs/Changelog","h":"#010","p":1},{"i":77,"t":"New Keywords","u":"/docs/Compatibility","h":"#new-keywords","p":75},{"i":79,"t":"Mitigations","u":"/docs/Compatibility","h":"#mitigations","p":75},{"i":81,"t":"Compile-time Configuration (pluto_use)","u":"/docs/Compatibility","h":"#compile-time-configuration-pluto_use","p":75},{"i":83,"t":"Compatible Keywords","u":"/docs/Compatibility","h":"#compatible-keywords","p":75},{"i":85,"t":"Default Table Metatable","u":"/docs/Compatibility","h":"#default-table-metatable","p":75},{"i":89,"t":"What does Pluto aspire to be?","u":"/docs/Introduction","h":"#what-does-pluto-aspire-to-be","p":87},{"i":93,"t":"Installation","u":"/docs/Editor Integration","h":"#installation","p":91},{"i":97,"t":"Content Moderation","u":"/docs/For Integrators","h":"#content-moderation","p":95},{"i":98,"t":"Compiled Code","u":"/docs/For Integrators","h":"#compiled-code","p":95},{"i":100,"t":"Custom Module Filters","u":"/docs/For Integrators","h":"#custom-module-filters","p":95},{"i":102,"t":"Prevent Loading of Binary Modules","u":"/docs/For Integrators","h":"#prevent-loading-of-binary-modules","p":95},{"i":104,"t":"Execution Time Limit","u":"/docs/For Integrators","h":"#execution-time-limit","p":95},{"i":106,"t":"Infinite Loop Prevention","u":"/docs/For Integrators","h":"#infinite-loop-prevention","p":95},{"i":108,"t":"VM Dumping","u":"/docs/For Integrators","h":"#vm-dumping","p":95},{"i":110,"t":"Configuration","u":"/docs/For Integrators","h":"#configuration","p":95},{"i":112,"t":"What it looks like","u":"/docs/For Integrators","h":"#what-it-looks-like","p":95},{"i":118,"t":"Write Pluto Online","u":"/docs/Getting Started","h":"#write-pluto-online","p":116},{"i":120,"t":"Prebuilt Binaries","u":"/docs/Getting Started","h":"#prebuilt-binaries","p":116},{"i":122,"t":"Packages","u":"/docs/Getting Started","h":"#packages","p":116},{"i":123,"t":"Chocolatey","u":"/docs/Getting Started","h":"#chocolatey","p":116},{"i":125,"t":"APT Repository","u":"/docs/Getting Started","h":"#apt-repository","p":116},{"i":127,"t":"AUR","u":"/docs/Getting Started","h":"#aur","p":116},{"i":129,"t":"Termux","u":"/docs/Getting Started","h":"#termux","p":116},{"i":131,"t":"Compile Pluto Yourself","u":"/docs/Getting Started","h":"#compile-pluto-yourself","p":116},{"i":133,"t":"PHP Scripts","u":"/docs/Getting Started","h":"#php-scripts","p":116},{"i":135,"t":"Visual Studio","u":"/docs/Getting Started","h":"#visual-studio","p":116},{"i":137,"t":"Make","u":"/docs/Getting Started","h":"#make","p":116},{"i":139,"t":"Sun","u":"/docs/Getting Started","h":"#sun","p":116},{"i":143,"t":"Warning Types","u":"/docs/New Features/Compiler Warnings","h":"#warning-types","p":141},{"i":144,"t":"var-shadow","u":"/docs/New Features/Compiler Warnings","h":"#var-shadow","p":141},{"i":146,"t":"global-shadow","u":"/docs/New Features/Compiler Warnings","h":"#global-shadow","p":141},{"i":148,"t":"field-shadow","u":"/docs/New Features/Compiler Warnings","h":"#field-shadow","p":141},{"i":150,"t":"type-mismatch","u":"/docs/New Features/Compiler Warnings","h":"#type-mismatch","p":141},{"i":152,"t":"unreachable-code","u":"/docs/New Features/Compiler Warnings","h":"#unreachable-code","p":141},{"i":154,"t":"excessive-arguments","u":"/docs/New Features/Compiler Warnings","h":"#excessive-arguments","p":141},{"i":156,"t":"bad-practice","u":"/docs/New Features/Compiler Warnings","h":"#bad-practice","p":141},{"i":158,"t":"possible-typo","u":"/docs/New Features/Compiler Warnings","h":"#possible-typo","p":141},{"i":160,"t":"non-portable-code","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-code","p":141},{"i":162,"t":"non-portable-name","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-name","p":141},{"i":164,"t":"non-portable-bytecode","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-bytecode","p":141},{"i":166,"t":"unannotated-fallthrough","u":"/docs/New Features/Compiler Warnings","h":"#unannotated-fallthrough","p":141},{"i":168,"t":"implicit-global","u":"/docs/New Features/Compiler Warnings","h":"#implicit-global","p":141},{"i":170,"t":"discarded-return","u":"/docs/New Features/Compiler Warnings","h":"#discarded-return","p":141},{"i":172,"t":"Compile-time Configuration","u":"/docs/New Features/Compiler Warnings","h":"#compile-time-configuration","p":141},{"i":174,"t":"Changing Warning States","u":"/docs/New Features/Compiler Warnings","h":"#changing-warning-states","p":141},{"i":176,"t":"Disable Warnings On Line","u":"/docs/New Features/Compiler Warnings","h":"#disable-warnings-on-line","p":141},{"i":180,"t":"Function calls","u":"/docs/New Features/Compile-Time Evaluation","h":"#function-calls","p":178},{"i":182,"t":"Variables","u":"/docs/New Features/Compile-Time Evaluation","h":"#variables","p":178},{"i":184,"t":"Conditionals","u":"/docs/New Features/Compile-Time Evaluation","h":"#conditionals","p":178},{"i":190,"t":"Array destructuring","u":"/docs/New Features/Destructuring","h":"#array-destructuring","p":188},{"i":192,"t":"Table destructuring","u":"/docs/New Features/Destructuring","h":"#table-destructuring","p":188},{"i":194,"t":"Different variable name","u":"/docs/New Features/Destructuring","h":"#different-variable-name","p":188},{"i":196,"t":"Standard Library","u":"/docs/New Features/Destructuring","h":"#standard-library","p":188},{"i":200,"t":"Compiler Warnings","u":"/docs/New Features/Explicit Globals","h":"#compiler-warnings","p":198},{"i":204,"t":"Continue's Only Argument","u":"/docs/New Features/Continue Statement","h":"#continues-only-argument","p":202},{"i":206,"t":"Using Compatibility Mode?","u":"/docs/New Features/Continue Statement","h":"#using-compatibility-mode","p":202},{"i":210,"t":"Using Compatibility Mode?","u":"/docs/New Features/Export Modifier","h":"#using-compatibility-mode","p":208},{"i":214,"t":"Scoped Enums","u":"/docs/New Features/Enumerations","h":"#scoped-enums","p":212},{"i":216,"t":"Reflection","u":"/docs/New Features/Enumerations","h":"#reflection","p":212},{"i":218,"t":"Anonymous Enums","u":"/docs/New Features/Enumerations","h":"#anonymous-enums","p":212},{"i":220,"t":"Using Compatibility Mode?","u":"/docs/New Features/Enumerations","h":"#using-compatibility-mode","p":212},{"i":228,"t":"Rules","u":"/docs/New Features/In Expressions","h":"#rules","p":226},{"i":234,"t":"Mixing arguments","u":"/docs/New Features/Named Arguments","h":"#mixing-arguments","p":232},{"i":236,"t":"Limitations","u":"/docs/New Features/Named Arguments","h":"#limitations","p":232},{"i":241,"t":"For Member Access","u":"/docs/New Features/Safe Navigation","h":"#for-member-access","p":240},{"i":243,"t":"For Method Calls","u":"/docs/New Features/Safe Navigation","h":"#for-method-calls","p":240},{"i":251,"t":"Switch Statement","u":"/docs/New Features/Switch Blocks","h":"#switch-statement","p":249},{"i":253,"t":"Case Blocks","u":"/docs/New Features/Switch Blocks","h":"#case-blocks","p":249},{"i":255,"t":"Switch Expression","u":"/docs/New Features/Switch Blocks","h":"#switch-expression","p":249},{"i":257,"t":"Using Compatibility Mode?","u":"/docs/New Features/Switch Blocks","h":"#using-compatibility-mode","p":249},{"i":261,"t":"Cosmetic Underscores","u":"/docs/New Features/Numeral Parsing","h":"#cosmetic-underscores","p":259},{"i":263,"t":"Binary Integers","u":"/docs/New Features/Numeral Parsing","h":"#binary-integers","p":259},{"i":267,"t":"Doesn't Lua already have ternaries?","u":"/docs/New Features/Ternary Expressions","h":"#doesnt-lua-already-have-ternaries","p":265},{"i":271,"t":"Method Creation","u":"/docs/New Features/Object-Oriented Programming","h":"#method-creation","p":269},{"i":273,"t":"Static Functions","u":"/docs/New Features/Object-Oriented Programming","h":"#static-functions","p":269},{"i":275,"t":"New Operator","u":"/docs/New Features/Object-Oriented Programming","h":"#new-operator","p":269},{"i":277,"t":"Class Statement","u":"/docs/New Features/Object-Oriented Programming","h":"#class-statement","p":269},{"i":279,"t":"Class Expression","u":"/docs/New Features/Object-Oriented Programming","h":"#class-expression","p":269},{"i":281,"t":"Extends","u":"/docs/New Features/Object-Oriented Programming","h":"#extends","p":269},{"i":283,"t":"Parent Expression","u":"/docs/New Features/Object-Oriented Programming","h":"#parent-expression","p":269},{"i":285,"t":"Private Fields","u":"/docs/New Features/Object-Oriented Programming","h":"#private-fields","p":269},{"i":287,"t":"Constructor Promotion","u":"/docs/New Features/Object-Oriented Programming","h":"#constructor-promotion","p":269},{"i":289,"t":"Instanceof Operator","u":"/docs/New Features/Object-Oriented Programming","h":"#instanceof-operator","p":269},{"i":291,"t":"Using Compatibility Mode?","u":"/docs/New Features/Object-Oriented Programming","h":"#using-compatibility-mode","p":269},{"i":295,"t":"Using Compatibility Mode?","u":"/docs/New Features/Try-Catch Statement","h":"#using-compatibility-mode","p":293},{"i":299,"t":"What will this prevent?","u":"/docs/New Features/Table Freezing","h":"#what-will-this-prevent","p":297},{"i":303,"t":"What types can I use?","u":"/docs/New Features/Type Hinting","h":"#what-types-can-i-use","p":301},{"i":307,"t":"How does it work?","u":"/docs/Optimizations/For Loops","h":"#how-does-it-work","p":305},{"i":310,"t":"Operator Aliases","u":"/docs/New Operators","h":"#operator-aliases","p":309},{"i":312,"t":"Compound Operators","u":"/docs/New Operators","h":"#compound-operators","p":309},{"i":314,"t":"Coalescing Operator","u":"/docs/New Operators","h":"#coalescing-operator","p":309},{"i":316,"t":"Walrus Operator","u":"/docs/New Operators","h":"#walrus-operator","p":309},{"i":318,"t":"Spaceship Operator","u":"/docs/New Operators","h":"#spaceship-operator","p":309},{"i":320,"t":"Pipe Operator","u":"/docs/New Operators","h":"#pipe-operator","p":309},{"i":322,"t":"Additional Arguments","u":"/docs/New Operators","h":"#additional-arguments","p":309},{"i":324,"t":"Methods Calls","u":"/docs/New Operators","h":"#methods-calls","p":309},{"i":326,"t":"Anonymous Functions","u":"/docs/New Operators","h":"#anonymous-functions","p":309},{"i":346,"t":"base32.encode","u":"/docs/Runtime Environment/Base32","h":"#base32encode","p":344},{"i":348,"t":"base32.decode","u":"/docs/Runtime Environment/Base32","h":"#base32decode","p":344},{"i":352,"t":"base64.encode","u":"/docs/Runtime Environment/Base64","h":"#base64encode","p":350},{"i":354,"t":"base64.decode","u":"/docs/Runtime Environment/Base64","h":"#base64decode","p":350},{"i":356,"t":"base64.urlencode","u":"/docs/Runtime Environment/Base64","h":"#base64urlencode","p":350},{"i":358,"t":"base64.urldecode","u":"/docs/Runtime Environment/Base64","h":"#base64urldecode","p":350},{"i":362,"t":"assert.isnil","u":"/docs/Runtime Environment/Assert","h":"#assertisnil","p":360},{"i":364,"t":"assert.istrue","u":"/docs/Runtime Environment/Assert","h":"#assertistrue","p":360},{"i":366,"t":"assert.isfalse","u":"/docs/Runtime Environment/Assert","h":"#assertisfalse","p":360},{"i":368,"t":"assert.falsy","u":"/docs/Runtime Environment/Assert","h":"#assertfalsy","p":360},{"i":370,"t":"assert.truthy","u":"/docs/Runtime Environment/Assert","h":"#asserttruthy","p":360},{"i":372,"t":"assert.notnil","u":"/docs/Runtime Environment/Assert","h":"#assertnotnil","p":360},{"i":374,"t":"assert.equal","u":"/docs/Runtime Environment/Assert","h":"#assertequal","p":360},{"i":376,"t":"assert.nequal","u":"/docs/Runtime Environment/Assert","h":"#assertnequal","p":360},{"i":378,"t":"assert.less","u":"/docs/Runtime Environment/Assert","h":"#assertless","p":360},{"i":380,"t":"assert.lesseq","u":"/docs/Runtime Environment/Assert","h":"#assertlesseq","p":360},{"i":382,"t":"assert.greater","u":"/docs/Runtime Environment/Assert","h":"#assertgreater","p":360},{"i":384,"t":"assert.greatereq","u":"/docs/Runtime Environment/Assert","h":"#assertgreatereq","p":360},{"i":386,"t":"assert.noerror","u":"/docs/Runtime Environment/Assert","h":"#assertnoerror","p":360},{"i":388,"t":"assert.haserror","u":"/docs/Runtime Environment/Assert","h":"#asserthaserror","p":360},{"i":390,"t":"assert.searcherror","u":"/docs/Runtime Environment/Assert","h":"#assertsearcherror","p":360},{"i":394,"t":"cat.encode","u":"/docs/Runtime Environment/CaT","h":"#catencode","p":392},{"i":396,"t":"cat.decode","u":"/docs/Runtime Environment/CaT","h":"#catdecode","p":392},{"i":400,"t":"bigint.new","u":"/docs/Runtime Environment/Bigint","h":"#bigintnew","p":398},{"i":402,"t":"bigint.tostring, __tostring","u":"/docs/Runtime Environment/Bigint","h":"#biginttostring-__tostring","p":398},{"i":404,"t":"bigint.hex","u":"/docs/Runtime Environment/Bigint","h":"#biginthex","p":398},{"i":406,"t":"bigint.binary","u":"/docs/Runtime Environment/Bigint","h":"#bigintbinary","p":398},{"i":408,"t":"bigint.add, __add","u":"/docs/Runtime Environment/Bigint","h":"#bigintadd-__add","p":398},{"i":410,"t":"bigint.sub, __sub","u":"/docs/Runtime Environment/Bigint","h":"#bigintsub-__sub","p":398},{"i":412,"t":"bigint.mul, __mul","u":"/docs/Runtime Environment/Bigint","h":"#bigintmul-__mul","p":398},{"i":414,"t":"bigint.div","u":"/docs/Runtime Environment/Bigint","h":"#bigintdiv","p":398},{"i":416,"t":"__div","u":"/docs/Runtime Environment/Bigint","h":"#__div","p":398},{"i":418,"t":"bigint.mod, __mod","u":"/docs/Runtime Environment/Bigint","h":"#bigintmod-__mod","p":398},{"i":420,"t":"bigint.pow, __pow","u":"/docs/Runtime Environment/Bigint","h":"#bigintpow-__pow","p":398},{"i":422,"t":"bigint.bitlength","u":"/docs/Runtime Environment/Bigint","h":"#bigintbitlength","p":398},{"i":426,"t":"Non-Cryptographic Hashing Algorithms","u":"/docs/Runtime Environment/Crypto","h":"#non-cryptographic-hashing-algorithms","p":424},{"i":427,"t":"crypto.lua","u":"/docs/Runtime Environment/Crypto","h":"#cryptolua","p":424},{"i":429,"t":"crypto.md5","u":"/docs/Runtime Environment/Crypto","h":"#cryptomd5","p":424},{"i":431,"t":"crypto.djb2","u":"/docs/Runtime Environment/Crypto","h":"#cryptodjb2","p":424},{"i":433,"t":"crypto.fnv1","u":"/docs/Runtime Environment/Crypto","h":"#cryptofnv1","p":424},{"i":435,"t":"crypto.fnv1a","u":"/docs/Runtime Environment/Crypto","h":"#cryptofnv1a","p":424},{"i":437,"t":"crypto.joaat","u":"/docs/Runtime Environment/Crypto","h":"#cryptojoaat","p":424},{"i":439,"t":"crypto.sdbm","u":"/docs/Runtime Environment/Crypto","h":"#cryptosdbm","p":424},{"i":441,"t":"crypto.crc32","u":"/docs/Runtime Environment/Crypto","h":"#cryptocrc32","p":424},{"i":443,"t":"crypto.adler32","u":"/docs/Runtime Environment/Crypto","h":"#cryptoadler32","p":424},{"i":445,"t":"crypto.lookup3","u":"/docs/Runtime Environment/Crypto","h":"#cryptolookup3","p":424},{"i":447,"t":"crypto.times33","u":"/docs/Runtime Environment/Crypto","h":"#cryptotimes33","p":424},{"i":449,"t":"crypto.murmur1","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur1","p":424},{"i":451,"t":"crypto.murmur2","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2","p":424},{"i":453,"t":"crypto.murmur2a","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2a","p":424},{"i":455,"t":"crypto.murmur64a","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur64a","p":424},{"i":457,"t":"crypto.murmur64b","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur64b","p":424},{"i":459,"t":"crypto.murmur2neutral","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2neutral","p":424},{"i":461,"t":"Cryptographic Hashing Algorithms","u":"/docs/Runtime Environment/Crypto","h":"#cryptographic-hashing-algorithms","p":424},{"i":462,"t":"crypto.sha1","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha1","p":424},{"i":464,"t":"crypto.sha256","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha256","p":424},{"i":466,"t":"crypto.sha384","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha384","p":424},{"i":468,"t":"crypto.sha512","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha512","p":424},{"i":470,"t":"Cryptographic PRNGs","u":"/docs/Runtime Environment/Crypto","h":"#cryptographic-prngs","p":424},{"i":471,"t":"crypto.random","u":"/docs/Runtime Environment/Crypto","h":"#cryptorandom","p":424},{"i":473,"t":"AES-CBC, AES-CFB","u":"/docs/Runtime Environment/Crypto","h":"#aes-cbc-aes-cfb","p":424},{"i":475,"t":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt","p":424},{"i":477,"t":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt","p":424},{"i":479,"t":"AES-ECB","u":"/docs/Runtime Environment/Crypto","h":"#aes-ecb","p":424},{"i":481,"t":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-1","p":424},{"i":483,"t":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-1","p":424},{"i":485,"t":"AES-GCM","u":"/docs/Runtime Environment/Crypto","h":"#aes-gcm","p":424},{"i":487,"t":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-2","p":424},{"i":489,"t":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-2","p":424},{"i":491,"t":"RSA","u":"/docs/Runtime Environment/Crypto","h":"#rsa","p":424},{"i":492,"t":"crypto.generatekeypair","u":"/docs/Runtime Environment/Crypto","h":"#cryptogeneratekeypair","p":424},{"i":494,"t":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-3","p":424},{"i":496,"t":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-3","p":424},{"i":498,"t":"crypto.sign","u":"/docs/Runtime Environment/Crypto","h":"#cryptosign","p":424},{"i":500,"t":"crypto.verify","u":"/docs/Runtime Environment/Crypto","h":"#cryptoverify","p":424},{"i":504,"t":"_PVERSION","u":"/docs/Runtime Environment/Global & Base","h":"#_pversion","p":502},{"i":506,"t":"_PSOUP","u":"/docs/Runtime Environment/Global & Base","h":"#_psoup","p":502},{"i":508,"t":"os.platform","u":"/docs/Runtime Environment/Global & Base","h":"#osplatform","p":502},{"i":510,"t":"package.path","u":"/docs/Runtime Environment/Global & Base","h":"#packagepath","p":502},{"i":512,"t":"Default Metatables","u":"/docs/Runtime Environment/Global & Base","h":"#default-metatables","p":502},{"i":514,"t":"dumpvar","u":"/docs/Runtime Environment/Global & Base","h":"#dumpvar","p":502},{"i":516,"t":"exportvar","u":"/docs/Runtime Environment/Global & Base","h":"#exportvar","p":502},{"i":518,"t":"range","u":"/docs/Runtime Environment/Global & Base","h":"#range","p":502},{"i":520,"t":"compareversions","u":"/docs/Runtime Environment/Global & Base","h":"#compareversions","p":502},{"i":522,"t":"wcall","u":"/docs/Runtime Environment/Global & Base","h":"#wcall","p":502},{"i":526,"t":"coroutine.xresume","u":"/docs/Runtime Environment/Coroutine","h":"#coroutinexresume","p":524},{"i":528,"t":"coroutine.sleep","u":"/docs/Runtime Environment/Coroutine","h":"#coroutinesleep","p":524},{"i":534,"t":"http.request","u":"/docs/Runtime Environment/HTTP","h":"#httprequest","p":532},{"i":536,"t":"http.hasconnection","u":"/docs/Runtime Environment/HTTP","h":"#httphasconnection","p":532},{"i":538,"t":"http.closeconnections","u":"/docs/Runtime Environment/HTTP","h":"#httpcloseconnections","p":532},{"i":542,"t":"io.rename","u":"/docs/Runtime Environment/IO","h":"#iorename","p":540},{"i":544,"t":"io.remove","u":"/docs/Runtime Environment/IO","h":"#ioremove","p":540},{"i":546,"t":"io.copy","u":"/docs/Runtime Environment/IO","h":"#iocopy","p":540},{"i":548,"t":"io.part","u":"/docs/Runtime Environment/IO","h":"#iopart","p":540},{"i":550,"t":"io.isdir","u":"/docs/Runtime Environment/IO","h":"#ioisdir","p":540},{"i":552,"t":"io.isfile","u":"/docs/Runtime Environment/IO","h":"#ioisfile","p":540},{"i":554,"t":"io.exists","u":"/docs/Runtime Environment/IO","h":"#ioexists","p":540},{"i":556,"t":"io.makedir","u":"/docs/Runtime Environment/IO","h":"#iomakedir","p":540},{"i":558,"t":"io.listdir","u":"/docs/Runtime Environment/IO","h":"#iolistdir","p":540},{"i":560,"t":"io.makedirs","u":"/docs/Runtime Environment/IO","h":"#iomakedirs","p":540},{"i":562,"t":"io.absolute","u":"/docs/Runtime Environment/IO","h":"#ioabsolute","p":540},{"i":564,"t":"io.relative","u":"/docs/Runtime Environment/IO","h":"#iorelative","p":540},{"i":566,"t":"io.contents","u":"/docs/Runtime Environment/IO","h":"#iocontents","p":540},{"i":568,"t":"io.filesize","u":"/docs/Runtime Environment/IO","h":"#iofilesize","p":540},{"i":570,"t":"io.writetime","u":"/docs/Runtime Environment/IO","h":"#iowritetime","p":540},{"i":572,"t":"io.currentdir","u":"/docs/Runtime Environment/IO","h":"#iocurrentdir","p":540},{"i":576,"t":"math.isnan","u":"/docs/Runtime Environment/Math","h":"#mathisnan","p":574},{"i":578,"t":"math.round","u":"/docs/Runtime Environment/Math","h":"#mathround","p":574},{"i":580,"t":"math.atan2","u":"/docs/Runtime Environment/Math","h":"#mathatan2","p":574},{"i":584,"t":"Example 1","u":"/docs/QoL Improvements/Syntax Errors","h":"#example-1","p":582},{"i":586,"t":"Example 2","u":"/docs/QoL Improvements/Syntax Errors","h":"#example-2","p":582},{"i":588,"t":"ANSI Coloring","u":"/docs/QoL Improvements/Syntax Errors","h":"#ansi-coloring","p":582},{"i":592,"t":"json.encode","u":"/docs/Runtime Environment/JSON","h":"#jsonencode","p":590},{"i":594,"t":"json.decode","u":"/docs/Runtime Environment/JSON","h":"#jsondecode","p":590},{"i":598,"t":"os.sleep","u":"/docs/Runtime Environment/OS","h":"#ossleep","p":596},{"i":600,"t":"os.nanos, os.micros, os.millis, os.seconds","u":"/docs/Runtime Environment/OS","h":"#osnanos-osmicros-osmillis-osseconds","p":596},{"i":602,"t":"os.unixseconds","u":"/docs/Runtime Environment/OS","h":"#osunixseconds","p":596},{"i":606,"t":"socket.connect","u":"/docs/Runtime Environment/Socket","h":"#socketconnect","p":604},{"i":608,"t":"socket.listen","u":"/docs/Runtime Environment/Socket","h":"#socketlisten","p":604},{"i":610,"t":"socket.bind","u":"/docs/Runtime Environment/Socket","h":"#socketbind","p":604},{"i":612,"t":"Socket Class","u":"/docs/Runtime Environment/Socket","h":"#socket-class","p":604},{"i":614,"t":"socket.send","u":"/docs/Runtime Environment/Socket","h":"#socketsend","p":604},{"i":616,"t":"socket.recv","u":"/docs/Runtime Environment/Socket","h":"#socketrecv","p":604},{"i":618,"t":"socket.unrecv","u":"/docs/Runtime Environment/Socket","h":"#socketunrecv","p":604},{"i":620,"t":"socket.starttls","u":"/docs/Runtime Environment/Socket","h":"#socketstarttls","p":604},{"i":622,"t":"socket.close","u":"/docs/Runtime Environment/Socket","h":"#socketclose","p":604},{"i":624,"t":"Listener Class","u":"/docs/Runtime Environment/Socket","h":"#listener-class","p":604},{"i":626,"t":"accept","u":"/docs/Runtime Environment/Socket","h":"#accept","p":604},{"i":628,"t":"hasconnection","u":"/docs/Runtime Environment/Socket","h":"#hasconnection","p":604},{"i":632,"t":"string.upper","u":"/docs/Runtime Environment/String","h":"#stringupper","p":630},{"i":634,"t":"string.lower","u":"/docs/Runtime Environment/String","h":"#stringlower","p":630},{"i":636,"t":"string.split","u":"/docs/Runtime Environment/String","h":"#stringsplit","p":630},{"i":638,"t":"string.rfind","u":"/docs/Runtime Environment/String","h":"#stringrfind","p":630},{"i":640,"t":"string.strip","u":"/docs/Runtime Environment/String","h":"#stringstrip","p":630},{"i":642,"t":"string.lstrip","u":"/docs/Runtime Environment/String","h":"#stringlstrip","p":630},{"i":644,"t":"string.rstrip","u":"/docs/Runtime Environment/String","h":"#stringrstrip","p":630},{"i":646,"t":"string.isascii","u":"/docs/Runtime Environment/String","h":"#stringisascii","p":630},{"i":648,"t":"string.islower","u":"/docs/Runtime Environment/String","h":"#stringislower","p":630},{"i":650,"t":"string.isalpha","u":"/docs/Runtime Environment/String","h":"#stringisalpha","p":630},{"i":652,"t":"string.isupper","u":"/docs/Runtime Environment/String","h":"#stringisupper","p":630},{"i":654,"t":"string.isalnum","u":"/docs/Runtime Environment/String","h":"#stringisalnum","p":630},{"i":656,"t":"string.iswhitespace","u":"/docs/Runtime Environment/String","h":"#stringiswhitespace","p":630},{"i":658,"t":"string.uformat","u":"/docs/Runtime Environment/String","h":"#stringuformat","p":630},{"i":660,"t":"string.replace","u":"/docs/Runtime Environment/String","h":"#stringreplace","p":630},{"i":662,"t":"string.truncate","u":"/docs/Runtime Environment/String","h":"#stringtruncate","p":630},{"i":664,"t":"string.contains","u":"/docs/Runtime Environment/String","h":"#stringcontains","p":630},{"i":666,"t":"string.casefold","u":"/docs/Runtime Environment/String","h":"#stringcasefold","p":630},{"i":668,"t":"string.formatint","u":"/docs/Runtime Environment/String","h":"#stringformatint","p":630},{"i":670,"t":"string.partition","u":"/docs/Runtime Environment/String","h":"#stringpartition","p":630},{"i":672,"t":"string.endswith","u":"/docs/Runtime Environment/String","h":"#stringendswith","p":630},{"i":674,"t":"string.startswith","u":"/docs/Runtime Environment/String","h":"#stringstartswith","p":630},{"i":678,"t":"__construct","u":"/docs/Runtime Environment/Scheduler","h":"#__construct","p":676},{"i":680,"t":"add","u":"/docs/Runtime Environment/Scheduler","h":"#add","p":676},{"i":682,"t":"addloop","u":"/docs/Runtime Environment/Scheduler","h":"#addloop","p":676},{"i":684,"t":"run","u":"/docs/Runtime Environment/Scheduler","h":"#run","p":676},{"i":686,"t":"yieldfunc","u":"/docs/Runtime Environment/Scheduler","h":"#yieldfunc","p":676},{"i":688,"t":"errorfunc","u":"/docs/Runtime Environment/Scheduler","h":"#errorfunc","p":676},{"i":692,"t":"url.encode","u":"/docs/Runtime Environment/URL","h":"#urlencode","p":690},{"i":694,"t":"url.decode","u":"/docs/Runtime Environment/URL","h":"#urldecode","p":690},{"i":696,"t":"url.parse","u":"/docs/Runtime Environment/URL","h":"#urlparse","p":690},{"i":700,"t":"__construct","u":"/docs/Runtime Environment/Vector3","h":"#__construct","p":698},{"i":702,"t":"__tostring","u":"/docs/Runtime Environment/Vector3","h":"#__tostring","p":698},{"i":704,"t":"__add, __sub, __mul, __div","u":"/docs/Runtime Environment/Vector3","h":"#__add-__sub-__mul-__div","p":698},{"i":706,"t":"__eq","u":"/docs/Runtime Environment/Vector3","h":"#__eq","p":698},{"i":708,"t":"__len, magnitude","u":"/docs/Runtime Environment/Vector3","h":"#__len-magnitude","p":698},{"i":710,"t":"sum","u":"/docs/Runtime Environment/Vector3","h":"#sum","p":698},{"i":712,"t":"min","u":"/docs/Runtime Environment/Vector3","h":"#min","p":698},{"i":714,"t":"max","u":"/docs/Runtime Environment/Vector3","h":"#max","p":698},{"i":716,"t":"dot","u":"/docs/Runtime Environment/Vector3","h":"#dot","p":698},{"i":718,"t":"abs","u":"/docs/Runtime Environment/Vector3","h":"#abs","p":698},{"i":720,"t":"normalized, normalised","u":"/docs/Runtime Environment/Vector3","h":"#normalized-normalised","p":698},{"i":722,"t":"torot","u":"/docs/Runtime Environment/Vector3","h":"#torot","p":698},{"i":724,"t":"lookat","u":"/docs/Runtime Environment/Vector3","h":"#lookat","p":698},{"i":726,"t":"todir","u":"/docs/Runtime Environment/Vector3","h":"#todir","p":698},{"i":730,"t":"xml.encode","u":"/docs/Runtime Environment/XML","h":"#xmlencode","p":728},{"i":732,"t":"xml.decode","u":"/docs/Runtime Environment/XML","h":"#xmldecode","p":728},{"i":736,"t":"table.sort","u":"/docs/Runtime Environment/Table","h":"#tablesort","p":734},{"i":738,"t":"table.sorted","u":"/docs/Runtime Environment/Table","h":"#tablesorted","p":734},{"i":740,"t":"table.size","u":"/docs/Runtime Environment/Table","h":"#tablesize","p":734},{"i":742,"t":"table.clear","u":"/docs/Runtime Environment/Table","h":"#tableclear","p":734},{"i":744,"t":"table.freeze","u":"/docs/Runtime Environment/Table","h":"#tablefreeze","p":734},{"i":746,"t":"table.isfrozen","u":"/docs/Runtime Environment/Table","h":"#tableisfrozen","p":734},{"i":748,"t":"table.contains","u":"/docs/Runtime Environment/Table","h":"#tablecontains","p":734},{"i":750,"t":"table.find","u":"/docs/Runtime Environment/Table","h":"#tablefind","p":734},{"i":752,"t":"table.reverse","u":"/docs/Runtime Environment/Table","h":"#tablereverse","p":734},{"i":754,"t":"table.reversed","u":"/docs/Runtime Environment/Table","h":"#tablereversed","p":734},{"i":756,"t":"table.reorder","u":"/docs/Runtime Environment/Table","h":"#tablereorder","p":734},{"i":758,"t":"table.reordered","u":"/docs/Runtime Environment/Table","h":"#tablereordered","p":734},{"i":760,"t":"table.foreach","u":"/docs/Runtime Environment/Table","h":"#tableforeach","p":734},{"i":762,"t":"table.filter","u":"/docs/Runtime Environment/Table","h":"#tablefilter","p":734},{"i":764,"t":"table.filtered","u":"/docs/Runtime Environment/Table","h":"#tablefiltered","p":734},{"i":766,"t":"table.map","u":"/docs/Runtime Environment/Table","h":"#tablemap","p":734},{"i":768,"t":"table.mapped","u":"/docs/Runtime Environment/Table","h":"#tablemapped","p":734},{"i":770,"t":"table.reduce","u":"/docs/Runtime Environment/Table","h":"#tablereduce","p":734},{"i":772,"t":"table.min","u":"/docs/Runtime Environment/Table","h":"#tablemin","p":734},{"i":774,"t":"table.max","u":"/docs/Runtime Environment/Table","h":"#tablemax","p":734},{"i":776,"t":"table.checkall","u":"/docs/Runtime Environment/Table","h":"#tablecheckall","p":734}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3",[0,6.124]],["t/5",[1,6.124]],["t/7",[2,6.124]],["t/9",[3,6.124]],["t/11",[4,6.124]],["t/13",[5,6.124]],["t/15",[6,6.124]],["t/17",[7,6.124]],["t/19",[8,6.124]],["t/21",[9,6.124]],["t/23",[10,6.124]],["t/25",[11,6.124]],["t/27",[12,6.124]],["t/29",[13,6.124]],["t/31",[14,6.124]],["t/33",[15,6.124]],["t/35",[16,6.124]],["t/37",[17,6.124]],["t/39",[18,6.124]],["t/41",[19,6.124]],["t/43",[20,6.124]],["t/45",[21,6.124]],["t/47",[22,6.124]],["t/49",[23,6.124]],["t/51",[24,6.124]],["t/53",[25,6.124]],["t/55",[26,6.124]],["t/57",[27,6.124]],["t/59",[28,6.124]],["t/61",[29,6.124]],["t/63",[30,6.124]],["t/65",[31,6.124]],["t/67",[32,6.124]],["t/69",[33,6.124]],["t/71",[34,6.124]],["t/73",[35,6.124]],["t/77",[36,4.17,37,4.17]],["t/79",[38,6.124]],["t/81",[39,2.338,40,2.596,41,2.596,42,3.08]],["t/83",[37,4.17,43,3.233]],["t/85",[44,3.342,45,3.342,46,3.342]],["t/89",[47,3.883,48,4.606]],["t/93",[49,6.124]],["t/97",[50,4.606,51,4.606]],["t/98",[39,3.497,52,3.883]],["t/100",[53,3.692,54,3.342,55,3.692]],["t/102",[54,2.788,56,2.596,57,3.08,58,2.596]],["t/104",[40,3.112,59,3.692,60,3.342]],["t/106",[56,3.112,61,3.692,62,3.692]],["t/108",[63,4.606,64,4.606]],["t/110",[41,5.162]],["t/112",[65,6.124]],["t/118",[47,3.112,66,3.692,67,3.692]],["t/120",[58,3.883,68,4.606]],["t/122",[69,6.124]],["t/123",[70,6.124]],["t/125",[71,4.606,72,4.606]],["t/127",[73,6.124]],["t/129",[74,6.124]],["t/131",[39,2.803,47,3.112,75,3.692]],["t/133",[76,4.606,77,4.606]],["t/135",[78,4.606,79,4.606]],["t/137",[80,6.124]],["t/139",[81,6.124]],["t/143",[82,3.669,83,3.883]],["t/144",[84,4.606,85,3.883]],["t/146",[85,3.883,86,4.17]],["t/148",[85,3.883,87,4.17]],["t/150",[83,3.883,88,4.606]],["t/152",[52,3.883,89,4.606]],["t/154",[90,4.606,91,3.669]],["t/156",[92,4.606,93,4.606]],["t/158",[94,4.606,95,4.606]],["t/160",[52,3.112,96,2.94,97,3.112]],["t/162",[96,2.94,97,3.112,98,3.342]],["t/164",[96,2.94,97,3.112,99,3.692]],["t/166",[100,4.606,101,4.606]],["t/168",[86,4.17,102,4.606]],["t/170",[103,4.606,104,4.606]],["t/172",[39,2.803,40,3.112,41,3.112]],["t/174",[82,2.94,105,3.692,106,3.692]],["t/176",[82,2.94,107,3.692,108,3.692]],["t/180",[109,3.883,110,3.883]],["t/182",[111,5.544]],["t/184",[112,6.124]],["t/190",[113,4.606,114,4.17]],["t/192",[45,4.17,114,4.17]],["t/194",[98,3.342,111,3.342,115,3.692]],["t/196",[116,4.606,117,4.606]],["t/200",[39,3.497,82,3.669]],["t/204",[91,3.669,118,4.606]],["t/206",[43,2.591,119,2.591,120,2.689]],["t/210",[43,2.591,119,2.591,120,2.689]],["t/214",[121,4.606,122,4.17]],["t/216",[123,6.124]],["t/218",[122,4.17,124,4.17]],["t/220",[43,2.591,119,2.591,120,2.689]],["t/228",[125,6.124]],["t/234",[91,3.669,126,4.606]],["t/236",[60,5.544]],["t/241",[127,4.606,128,4.606]],["t/243",[110,3.883,129,3.883]],["t/251",[130,4.17,131,4.17]],["t/253",[132,4.606,133,4.606]],["t/255",[130,4.17,134,3.883]],["t/257",[43,2.591,119,2.591,120,2.689]],["t/261",[135,4.606,136,4.606]],["t/263",[58,3.883,137,4.606]],["t/267",[138,3.08,139,3.08,140,3.08,141,3.08]],["t/271",[129,3.883,142,4.606]],["t/273",[109,3.883,143,4.606]],["t/275",[36,4.17,144,3.126]],["t/277",[131,4.17,145,3.669]],["t/279",[134,3.883,145,3.669]],["t/281",[146,6.124]],["t/283",[134,3.883,147,4.606]],["t/285",[87,4.17,148,4.606]],["t/287",[149,4.606,150,4.606]],["t/289",[144,3.126,151,4.606]],["t/291",[43,2.591,119,2.591,120,2.689]],["t/295",[43,2.591,119,2.591,120,2.689]],["t/299",[56,5.162]],["t/303",[83,3.883,119,3.233]],["t/307",[152,6.124]],["t/310",[144,3.126,153,4.606]],["t/312",[144,3.126,154,4.606]],["t/314",[144,3.126,155,4.606]],["t/316",[144,3.126,156,4.606]],["t/318",[144,3.126,157,4.606]],["t/320",[144,3.126,158,4.606]],["t/322",[91,3.669,159,4.606]],["t/324",[110,3.883,129,3.883]],["t/326",[109,3.883,124,4.17]],["t/346",[160,6.124]],["t/348",[161,6.124]],["t/352",[162,6.124]],["t/354",[163,6.124]],["t/356",[164,6.124]],["t/358",[165,6.124]],["t/362",[166,6.124]],["t/364",[167,6.124]],["t/366",[168,6.124]],["t/368",[169,6.124]],["t/370",[170,6.124]],["t/372",[171,6.124]],["t/374",[172,6.124]],["t/376",[173,6.124]],["t/378",[174,6.124]],["t/380",[175,6.124]],["t/382",[176,6.124]],["t/384",[177,6.124]],["t/386",[178,6.124]],["t/388",[179,6.124]],["t/390",[180,6.124]],["t/394",[181,6.124]],["t/396",[182,6.124]],["t/400",[183,6.124]],["t/402",[184,4.606,185,4.17]],["t/404",[186,6.124]],["t/406",[187,6.124]],["t/408",[188,4.606,189,4.17]],["t/410",[190,4.606,191,4.17]],["t/412",[192,4.606,193,4.17]],["t/414",[194,6.124]],["t/416",[195,5.544]],["t/418",[196,4.606,197,4.606]],["t/420",[198,4.606,199,4.606]],["t/422",[200,6.124]],["t/426",[96,2.453,201,2.596,202,2.788,203,2.788]],["t/427",[204,6.124]],["t/429",[205,6.124]],["t/431",[206,6.124]],["t/433",[207,6.124]],["t/435",[208,6.124]],["t/437",[209,6.124]],["t/439",[210,6.124]],["t/441",[211,6.124]],["t/443",[212,6.124]],["t/445",[213,6.124]],["t/447",[214,6.124]],["t/449",[215,6.124]],["t/451",[216,6.124]],["t/453",[217,6.124]],["t/455",[218,6.124]],["t/457",[219,6.124]],["t/459",[220,6.124]],["t/461",[201,3.112,202,3.342,203,3.342]],["t/462",[221,6.124]],["t/464",[222,6.124]],["t/466",[223,6.124]],["t/468",[224,6.124]],["t/470",[201,3.883,225,4.606]],["t/471",[226,6.124]],["t/473",[227,4.123,228,3.08,229,3.08]],["t/475",[230,4.877]],["t/477",[231,4.877]],["t/479",[227,3.883,232,4.606]],["t/481",[230,4.877]],["t/483",[231,4.877]],["t/485",[227,3.883,233,4.606]],["t/487",[230,4.877]],["t/489",[231,4.877]],["t/491",[234,6.124]],["t/492",[235,6.124]],["t/494",[230,4.877]],["t/496",[231,4.877]],["t/498",[236,6.124]],["t/500",[237,6.124]],["t/504",[238,6.124]],["t/506",[239,6.124]],["t/508",[240,6.124]],["t/510",[241,6.124]],["t/512",[44,4.17,46,4.17]],["t/514",[242,6.124]],["t/516",[243,6.124]],["t/518",[244,6.124]],["t/520",[245,6.124]],["t/522",[246,6.124]],["t/526",[247,6.124]],["t/528",[248,6.124]],["t/534",[249,6.124]],["t/536",[250,6.124]],["t/538",[251,6.124]],["t/542",[252,6.124]],["t/544",[253,6.124]],["t/546",[254,6.124]],["t/548",[255,6.124]],["t/550",[256,6.124]],["t/552",[257,6.124]],["t/554",[258,6.124]],["t/556",[259,5.544]],["t/558",[260,6.124]],["t/560",[259,5.544]],["t/562",[261,6.124]],["t/564",[262,6.124]],["t/566",[263,6.124]],["t/568",[264,6.124]],["t/570",[265,6.124]],["t/572",[266,6.124]],["t/576",[267,6.124]],["t/578",[268,6.124]],["t/580",[269,6.124]],["t/584",[270,4.17,271,4.606]],["t/586",[270,4.17,272,4.606]],["t/588",[273,4.606,274,4.606]],["t/592",[275,6.124]],["t/594",[276,6.124]],["t/598",[277,6.124]],["t/600",[278,3.08,279,3.08,280,3.08,281,3.08]],["t/602",[282,6.124]],["t/606",[283,6.124]],["t/608",[284,6.124]],["t/610",[285,6.124]],["t/612",[145,3.669,286,4.606]],["t/614",[287,6.124]],["t/616",[288,6.124]],["t/618",[289,6.124]],["t/620",[290,6.124]],["t/622",[291,6.124]],["t/624",[145,3.669,292,4.606]],["t/626",[293,6.124]],["t/628",[294,6.124]],["t/632",[295,6.124]],["t/634",[296,6.124]],["t/636",[297,6.124]],["t/638",[298,6.124]],["t/640",[299,6.124]],["t/642",[300,6.124]],["t/644",[301,6.124]],["t/646",[302,6.124]],["t/648",[303,6.124]],["t/650",[304,6.124]],["t/652",[305,6.124]],["t/654",[306,6.124]],["t/656",[307,6.124]],["t/658",[308,6.124]],["t/660",[309,6.124]],["t/662",[310,6.124]],["t/664",[311,6.124]],["t/666",[312,6.124]],["t/668",[313,6.124]],["t/670",[314,6.124]],["t/672",[315,6.124]],["t/674",[316,6.124]],["t/678",[317,5.544]],["t/680",[318,6.124]],["t/682",[319,6.124]],["t/684",[320,6.124]],["t/686",[321,6.124]],["t/688",[322,6.124]],["t/692",[323,6.124]],["t/694",[324,6.124]],["t/696",[325,6.124]],["t/700",[317,5.544]],["t/702",[185,5.544]],["t/704",[189,2.788,191,2.788,193,2.788,195,2.788]],["t/706",[326,6.124]],["t/708",[327,4.606,328,4.606]],["t/710",[329,6.124]],["t/712",[330,6.124]],["t/714",[331,6.124]],["t/716",[332,6.124]],["t/718",[333,6.124]],["t/720",[334,4.606,335,4.606]],["t/722",[336,6.124]],["t/724",[337,6.124]],["t/726",[338,6.124]],["t/730",[339,6.124]],["t/732",[340,6.124]],["t/736",[341,5.544]],["t/738",[341,5.544]],["t/740",[342,6.124]],["t/742",[343,6.124]],["t/744",[344,6.124]],["t/746",[345,6.124]],["t/748",[346,6.124]],["t/750",[347,6.124]],["t/752",[348,5.544]],["t/754",[348,5.544]],["t/756",[349,5.544]],["t/758",[349,5.544]],["t/760",[350,6.124]],["t/762",[351,5.544]],["t/764",[351,5.544]],["t/766",[352,5.544]],["t/768",[352,5.544]],["t/770",[353,6.124]],["t/772",[354,6.124]],["t/774",[355,6.124]],["t/776",[356,6.124]]],"invertedIndex":[["0.1.0",{"_index":35,"t":{"73":{"position":[[0,5]]}}}],["0.2.0",{"_index":34,"t":{"71":{"position":[[0,5]]}}}],["0.2.1",{"_index":33,"t":{"69":{"position":[[0,5]]}}}],["0.2.2",{"_index":32,"t":{"67":{"position":[[0,5]]}}}],["0.3.0",{"_index":31,"t":{"65":{"position":[[0,5]]}}}],["0.3.1",{"_index":30,"t":{"63":{"position":[[0,5]]}}}],["0.3.2",{"_index":29,"t":{"61":{"position":[[0,5]]}}}],["0.4.0",{"_index":28,"t":{"59":{"position":[[0,5]]}}}],["0.4.1",{"_index":27,"t":{"57":{"position":[[0,5]]}}}],["0.4.2",{"_index":26,"t":{"55":{"position":[[0,5]]}}}],["0.4.3",{"_index":25,"t":{"53":{"position":[[0,5]]}}}],["0.4.4",{"_index":24,"t":{"51":{"position":[[0,5]]}}}],["0.4.5",{"_index":23,"t":{"49":{"position":[[0,5]]}}}],["0.5.0",{"_index":22,"t":{"47":{"position":[[0,5]]}}}],["0.5.1",{"_index":21,"t":{"45":{"position":[[0,5]]}}}],["0.5.2",{"_index":20,"t":{"43":{"position":[[0,5]]}}}],["0.5.3",{"_index":19,"t":{"41":{"position":[[0,5]]}}}],["0.5.4",{"_index":18,"t":{"39":{"position":[[0,5]]}}}],["0.6.0",{"_index":17,"t":{"37":{"position":[[0,5]]}}}],["0.6.1",{"_index":16,"t":{"35":{"position":[[0,5]]}}}],["0.6.2",{"_index":15,"t":{"33":{"position":[[0,5]]}}}],["0.6.3",{"_index":14,"t":{"31":{"position":[[0,5]]}}}],["0.7.0",{"_index":13,"t":{"29":{"position":[[0,5]]}}}],["0.7.1",{"_index":12,"t":{"27":{"position":[[0,5]]}}}],["0.7.2",{"_index":11,"t":{"25":{"position":[[0,5]]}}}],["0.7.3",{"_index":10,"t":{"23":{"position":[[0,5]]}}}],["0.7.4",{"_index":9,"t":{"21":{"position":[[0,5]]}}}],["0.8.0",{"_index":8,"t":{"19":{"position":[[0,5]]}}}],["0.8.1",{"_index":7,"t":{"17":{"position":[[0,5]]}}}],["0.8.2",{"_index":6,"t":{"15":{"position":[[0,5]]}}}],["0.9.0",{"_index":5,"t":{"13":{"position":[[0,5]]}}}],["0.9.1",{"_index":4,"t":{"11":{"position":[[0,5]]}}}],["0.9.2",{"_index":3,"t":{"9":{"position":[[0,5]]}}}],["0.9.3",{"_index":2,"t":{"7":{"position":[[0,5]]}}}],["0.9.4",{"_index":1,"t":{"5":{"position":[[0,5]]}}}],["0.9.5",{"_index":0,"t":{"3":{"position":[[0,5]]}}}],["1",{"_index":271,"t":{"584":{"position":[[8,1]]}}}],["2",{"_index":272,"t":{"586":{"position":[[8,1]]}}}],["__add",{"_index":189,"t":{"408":{"position":[[12,5]]},"704":{"position":[[0,6]]}}}],["__construct",{"_index":317,"t":{"678":{"position":[[0,11]]},"700":{"position":[[0,11]]}}}],["__div",{"_index":195,"t":{"416":{"position":[[0,5]]},"704":{"position":[[21,5]]}}}],["__eq",{"_index":326,"t":{"706":{"position":[[0,4]]}}}],["__len",{"_index":327,"t":{"708":{"position":[[0,6]]}}}],["__mod",{"_index":197,"t":{"418":{"position":[[12,5]]}}}],["__mul",{"_index":193,"t":{"412":{"position":[[12,5]]},"704":{"position":[[14,6]]}}}],["__pow",{"_index":199,"t":{"420":{"position":[[12,5]]}}}],["__sub",{"_index":191,"t":{"410":{"position":[[12,5]]},"704":{"position":[[7,6]]}}}],["__tostr",{"_index":185,"t":{"402":{"position":[[17,10]]},"702":{"position":[[0,10]]}}}],["_psoup",{"_index":239,"t":{"506":{"position":[[0,6]]}}}],["_pversion",{"_index":238,"t":{"504":{"position":[[0,9]]}}}],["ab",{"_index":333,"t":{"718":{"position":[[0,3]]}}}],["accept",{"_index":293,"t":{"626":{"position":[[0,6]]}}}],["access",{"_index":128,"t":{"241":{"position":[[11,6]]}}}],["add",{"_index":318,"t":{"680":{"position":[[0,3]]}}}],["addit",{"_index":159,"t":{"322":{"position":[[0,10]]}}}],["addloop",{"_index":319,"t":{"682":{"position":[[0,7]]}}}],["ae",{"_index":227,"t":{"473":{"position":[[0,3],[9,3]]},"479":{"position":[[0,3]]},"485":{"position":[[0,3]]}}}],["algorithm",{"_index":203,"t":{"426":{"position":[[26,10]]},"461":{"position":[[22,10]]}}}],["alias",{"_index":153,"t":{"310":{"position":[[9,7]]}}}],["alreadi",{"_index":140,"t":{"267":{"position":[[12,7]]}}}],["anonym",{"_index":124,"t":{"218":{"position":[[0,9]]},"326":{"position":[[0,9]]}}}],["ansi",{"_index":273,"t":{"588":{"position":[[0,4]]}}}],["apt",{"_index":71,"t":{"125":{"position":[[0,3]]}}}],["argument",{"_index":91,"t":{"154":{"position":[[10,9]]},"204":{"position":[[16,8]]},"234":{"position":[[7,9]]},"322":{"position":[[11,9]]}}}],["array",{"_index":113,"t":{"190":{"position":[[0,5]]}}}],["aspir",{"_index":48,"t":{"89":{"position":[[16,6]]}}}],["assert.equ",{"_index":172,"t":{"374":{"position":[[0,12]]}}}],["assert.falsi",{"_index":169,"t":{"368":{"position":[[0,12]]}}}],["assert.great",{"_index":176,"t":{"382":{"position":[[0,14]]}}}],["assert.greatereq",{"_index":177,"t":{"384":{"position":[[0,16]]}}}],["assert.haserror",{"_index":179,"t":{"388":{"position":[[0,15]]}}}],["assert.isfals",{"_index":168,"t":{"366":{"position":[[0,14]]}}}],["assert.isnil",{"_index":166,"t":{"362":{"position":[[0,12]]}}}],["assert.istru",{"_index":167,"t":{"364":{"position":[[0,13]]}}}],["assert.less",{"_index":174,"t":{"378":{"position":[[0,11]]}}}],["assert.lesseq",{"_index":175,"t":{"380":{"position":[[0,13]]}}}],["assert.nequ",{"_index":173,"t":{"376":{"position":[[0,13]]}}}],["assert.noerror",{"_index":178,"t":{"386":{"position":[[0,14]]}}}],["assert.notnil",{"_index":171,"t":{"372":{"position":[[0,13]]}}}],["assert.searcherror",{"_index":180,"t":{"390":{"position":[[0,18]]}}}],["assert.truthi",{"_index":170,"t":{"370":{"position":[[0,13]]}}}],["aur",{"_index":73,"t":{"127":{"position":[[0,3]]}}}],["bad",{"_index":92,"t":{"156":{"position":[[0,3]]}}}],["base32.decod",{"_index":161,"t":{"348":{"position":[[0,13]]}}}],["base32.encod",{"_index":160,"t":{"346":{"position":[[0,13]]}}}],["base64.decod",{"_index":163,"t":{"354":{"position":[[0,13]]}}}],["base64.encod",{"_index":162,"t":{"352":{"position":[[0,13]]}}}],["base64.urldecod",{"_index":165,"t":{"358":{"position":[[0,16]]}}}],["base64.urlencod",{"_index":164,"t":{"356":{"position":[[0,16]]}}}],["bigint.add",{"_index":188,"t":{"408":{"position":[[0,11]]}}}],["bigint.binari",{"_index":187,"t":{"406":{"position":[[0,13]]}}}],["bigint.bitlength",{"_index":200,"t":{"422":{"position":[[0,16]]}}}],["bigint.div",{"_index":194,"t":{"414":{"position":[[0,10]]}}}],["bigint.hex",{"_index":186,"t":{"404":{"position":[[0,10]]}}}],["bigint.mod",{"_index":196,"t":{"418":{"position":[[0,11]]}}}],["bigint.mul",{"_index":192,"t":{"412":{"position":[[0,11]]}}}],["bigint.new",{"_index":183,"t":{"400":{"position":[[0,10]]}}}],["bigint.pow",{"_index":198,"t":{"420":{"position":[[0,11]]}}}],["bigint.sub",{"_index":190,"t":{"410":{"position":[[0,11]]}}}],["bigint.tostr",{"_index":184,"t":{"402":{"position":[[0,16]]}}}],["binari",{"_index":58,"t":{"102":{"position":[[19,6]]},"120":{"position":[[9,8]]},"263":{"position":[[0,6]]}}}],["block",{"_index":133,"t":{"253":{"position":[[5,6]]}}}],["bytecod",{"_index":99,"t":{"164":{"position":[[13,8]]}}}],["call",{"_index":110,"t":{"180":{"position":[[9,5]]},"243":{"position":[[11,5]]},"324":{"position":[[8,5]]}}}],["case",{"_index":132,"t":{"253":{"position":[[0,4]]}}}],["cat.decod",{"_index":182,"t":{"396":{"position":[[0,10]]}}}],["cat.encod",{"_index":181,"t":{"394":{"position":[[0,10]]}}}],["cbc",{"_index":228,"t":{"473":{"position":[[4,4]]}}}],["cfb",{"_index":229,"t":{"473":{"position":[[13,3]]}}}],["chang",{"_index":105,"t":{"174":{"position":[[0,8]]}}}],["chocolatey",{"_index":70,"t":{"123":{"position":[[0,10]]}}}],["class",{"_index":145,"t":{"277":{"position":[[0,5]]},"279":{"position":[[0,5]]},"612":{"position":[[7,5]]},"624":{"position":[[9,5]]}}}],["coalesc",{"_index":155,"t":{"314":{"position":[[0,10]]}}}],["code",{"_index":52,"t":{"98":{"position":[[9,4]]},"152":{"position":[[12,4]]},"160":{"position":[[13,4]]}}}],["color",{"_index":274,"t":{"588":{"position":[[5,8]]}}}],["comparevers",{"_index":245,"t":{"520":{"position":[[0,15]]}}}],["compat",{"_index":43,"t":{"83":{"position":[[0,10]]},"206":{"position":[[6,13]]},"210":{"position":[[6,13]]},"220":{"position":[[6,13]]},"257":{"position":[[6,13]]},"291":{"position":[[6,13]]},"295":{"position":[[6,13]]}}}],["compil",{"_index":39,"t":{"81":{"position":[[0,7]]},"98":{"position":[[0,8]]},"131":{"position":[[0,7]]},"172":{"position":[[0,7]]},"200":{"position":[[0,8]]}}}],["compound",{"_index":154,"t":{"312":{"position":[[0,8]]}}}],["condit",{"_index":112,"t":{"184":{"position":[[0,12]]}}}],["configur",{"_index":41,"t":{"81":{"position":[[13,13]]},"110":{"position":[[0,13]]},"172":{"position":[[13,13]]}}}],["constructor",{"_index":149,"t":{"287":{"position":[[0,11]]}}}],["content",{"_index":50,"t":{"97":{"position":[[0,7]]}}}],["continue'",{"_index":118,"t":{"204":{"position":[[0,10]]}}}],["coroutine.sleep",{"_index":248,"t":{"528":{"position":[[0,15]]}}}],["coroutine.xresum",{"_index":247,"t":{"526":{"position":[[0,17]]}}}],["cosmet",{"_index":135,"t":{"261":{"position":[[0,8]]}}}],["creation",{"_index":142,"t":{"271":{"position":[[7,8]]}}}],["crypto.adler32",{"_index":212,"t":{"443":{"position":[[0,14]]}}}],["crypto.crc32",{"_index":211,"t":{"441":{"position":[[0,12]]}}}],["crypto.decrypt",{"_index":231,"t":{"477":{"position":[[0,14]]},"483":{"position":[[0,14]]},"489":{"position":[[0,14]]},"496":{"position":[[0,14]]}}}],["crypto.djb2",{"_index":206,"t":{"431":{"position":[[0,11]]}}}],["crypto.encrypt",{"_index":230,"t":{"475":{"position":[[0,14]]},"481":{"position":[[0,14]]},"487":{"position":[[0,14]]},"494":{"position":[[0,14]]}}}],["crypto.fnv1",{"_index":207,"t":{"433":{"position":[[0,11]]}}}],["crypto.fnv1a",{"_index":208,"t":{"435":{"position":[[0,12]]}}}],["crypto.generatekeypair",{"_index":235,"t":{"492":{"position":[[0,22]]}}}],["crypto.joaat",{"_index":209,"t":{"437":{"position":[[0,12]]}}}],["crypto.lookup3",{"_index":213,"t":{"445":{"position":[[0,14]]}}}],["crypto.lua",{"_index":204,"t":{"427":{"position":[[0,10]]}}}],["crypto.md5",{"_index":205,"t":{"429":{"position":[[0,10]]}}}],["crypto.murmur1",{"_index":215,"t":{"449":{"position":[[0,14]]}}}],["crypto.murmur2",{"_index":216,"t":{"451":{"position":[[0,14]]}}}],["crypto.murmur2a",{"_index":217,"t":{"453":{"position":[[0,15]]}}}],["crypto.murmur2neutr",{"_index":220,"t":{"459":{"position":[[0,21]]}}}],["crypto.murmur64a",{"_index":218,"t":{"455":{"position":[[0,16]]}}}],["crypto.murmur64b",{"_index":219,"t":{"457":{"position":[[0,16]]}}}],["crypto.random",{"_index":226,"t":{"471":{"position":[[0,13]]}}}],["crypto.sdbm",{"_index":210,"t":{"439":{"position":[[0,11]]}}}],["crypto.sha1",{"_index":221,"t":{"462":{"position":[[0,11]]}}}],["crypto.sha256",{"_index":222,"t":{"464":{"position":[[0,13]]}}}],["crypto.sha384",{"_index":223,"t":{"466":{"position":[[0,13]]}}}],["crypto.sha512",{"_index":224,"t":{"468":{"position":[[0,13]]}}}],["crypto.sign",{"_index":236,"t":{"498":{"position":[[0,11]]}}}],["crypto.times33",{"_index":214,"t":{"447":{"position":[[0,14]]}}}],["crypto.verifi",{"_index":237,"t":{"500":{"position":[[0,13]]}}}],["cryptograph",{"_index":201,"t":{"426":{"position":[[4,13]]},"461":{"position":[[0,13]]},"470":{"position":[[0,13]]}}}],["custom",{"_index":53,"t":{"100":{"position":[[0,6]]}}}],["default",{"_index":44,"t":{"85":{"position":[[0,7]]},"512":{"position":[[0,7]]}}}],["destructur",{"_index":114,"t":{"190":{"position":[[6,13]]},"192":{"position":[[6,13]]}}}],["differ",{"_index":115,"t":{"194":{"position":[[0,9]]}}}],["disabl",{"_index":107,"t":{"176":{"position":[[0,7]]}}}],["discard",{"_index":103,"t":{"170":{"position":[[0,9]]}}}],["doesn't",{"_index":138,"t":{"267":{"position":[[0,7]]}}}],["dot",{"_index":332,"t":{"716":{"position":[[0,3]]}}}],["dump",{"_index":64,"t":{"108":{"position":[[3,7]]}}}],["dumpvar",{"_index":242,"t":{"514":{"position":[[0,7]]}}}],["ecb",{"_index":232,"t":{"479":{"position":[[4,3]]}}}],["enum",{"_index":122,"t":{"214":{"position":[[7,5]]},"218":{"position":[[10,5]]}}}],["errorfunc",{"_index":322,"t":{"688":{"position":[[0,9]]}}}],["exampl",{"_index":270,"t":{"584":{"position":[[0,7]]},"586":{"position":[[0,7]]}}}],["excess",{"_index":90,"t":{"154":{"position":[[0,9]]}}}],["execut",{"_index":59,"t":{"104":{"position":[[0,9]]}}}],["exportvar",{"_index":243,"t":{"516":{"position":[[0,9]]}}}],["express",{"_index":134,"t":{"255":{"position":[[7,10]]},"279":{"position":[[6,10]]},"283":{"position":[[7,10]]}}}],["extend",{"_index":146,"t":{"281":{"position":[[0,7]]}}}],["fallthrough",{"_index":101,"t":{"166":{"position":[[12,11]]}}}],["field",{"_index":87,"t":{"148":{"position":[[0,5]]},"285":{"position":[[8,6]]}}}],["filter",{"_index":55,"t":{"100":{"position":[[14,7]]}}}],["function",{"_index":109,"t":{"180":{"position":[[0,8]]},"273":{"position":[[7,9]]},"326":{"position":[[10,9]]}}}],["gcm",{"_index":233,"t":{"485":{"position":[[4,3]]}}}],["global",{"_index":86,"t":{"146":{"position":[[0,6]]},"168":{"position":[[9,6]]}}}],["hasconnect",{"_index":294,"t":{"628":{"position":[[0,13]]}}}],["hash",{"_index":202,"t":{"426":{"position":[[18,7]]},"461":{"position":[[14,7]]}}}],["http.closeconnect",{"_index":251,"t":{"538":{"position":[[0,21]]}}}],["http.hasconnect",{"_index":250,"t":{"536":{"position":[[0,18]]}}}],["http.request",{"_index":249,"t":{"534":{"position":[[0,12]]}}}],["implicit",{"_index":102,"t":{"168":{"position":[[0,8]]}}}],["infinit",{"_index":61,"t":{"106":{"position":[[0,8]]}}}],["instal",{"_index":49,"t":{"93":{"position":[[0,12]]}}}],["instanceof",{"_index":151,"t":{"289":{"position":[[0,10]]}}}],["integ",{"_index":137,"t":{"263":{"position":[[7,8]]}}}],["io.absolut",{"_index":261,"t":{"562":{"position":[[0,11]]}}}],["io.cont",{"_index":263,"t":{"566":{"position":[[0,11]]}}}],["io.copi",{"_index":254,"t":{"546":{"position":[[0,7]]}}}],["io.currentdir",{"_index":266,"t":{"572":{"position":[[0,13]]}}}],["io.exist",{"_index":258,"t":{"554":{"position":[[0,9]]}}}],["io.files",{"_index":264,"t":{"568":{"position":[[0,11]]}}}],["io.isdir",{"_index":256,"t":{"550":{"position":[[0,8]]}}}],["io.isfil",{"_index":257,"t":{"552":{"position":[[0,9]]}}}],["io.listdir",{"_index":260,"t":{"558":{"position":[[0,10]]}}}],["io.makedir",{"_index":259,"t":{"556":{"position":[[0,10]]},"560":{"position":[[0,11]]}}}],["io.part",{"_index":255,"t":{"548":{"position":[[0,7]]}}}],["io.rel",{"_index":262,"t":{"564":{"position":[[0,11]]}}}],["io.remov",{"_index":253,"t":{"544":{"position":[[0,9]]}}}],["io.renam",{"_index":252,"t":{"542":{"position":[[0,9]]}}}],["io.writetim",{"_index":265,"t":{"570":{"position":[[0,12]]}}}],["json.decod",{"_index":276,"t":{"594":{"position":[[0,11]]}}}],["json.encod",{"_index":275,"t":{"592":{"position":[[0,11]]}}}],["keyword",{"_index":37,"t":{"77":{"position":[[4,8]]},"83":{"position":[[11,8]]}}}],["librari",{"_index":117,"t":{"196":{"position":[[9,7]]}}}],["limit",{"_index":60,"t":{"104":{"position":[[15,5]]},"236":{"position":[[0,11]]}}}],["line",{"_index":108,"t":{"176":{"position":[[20,4]]}}}],["listen",{"_index":292,"t":{"624":{"position":[[0,8]]}}}],["load",{"_index":57,"t":{"102":{"position":[[8,7]]}}}],["look",{"_index":65,"t":{"112":{"position":[[8,5]]}}}],["lookat",{"_index":337,"t":{"724":{"position":[[0,6]]}}}],["loop",{"_index":62,"t":{"106":{"position":[[9,4]]}}}],["lua",{"_index":139,"t":{"267":{"position":[[8,3]]}}}],["magnitud",{"_index":328,"t":{"708":{"position":[[7,9]]}}}],["make",{"_index":80,"t":{"137":{"position":[[0,4]]}}}],["math.atan2",{"_index":269,"t":{"580":{"position":[[0,10]]}}}],["math.isnan",{"_index":267,"t":{"576":{"position":[[0,10]]}}}],["math.round",{"_index":268,"t":{"578":{"position":[[0,10]]}}}],["max",{"_index":331,"t":{"714":{"position":[[0,3]]}}}],["member",{"_index":127,"t":{"241":{"position":[[4,6]]}}}],["metat",{"_index":46,"t":{"85":{"position":[[14,9]]},"512":{"position":[[8,10]]}}}],["method",{"_index":129,"t":{"243":{"position":[[4,6]]},"271":{"position":[[0,6]]},"324":{"position":[[0,7]]}}}],["min",{"_index":330,"t":{"712":{"position":[[0,3]]}}}],["mismatch",{"_index":88,"t":{"150":{"position":[[5,8]]}}}],["mitig",{"_index":38,"t":{"79":{"position":[[0,11]]}}}],["mix",{"_index":126,"t":{"234":{"position":[[0,6]]}}}],["mode",{"_index":120,"t":{"206":{"position":[[20,5]]},"210":{"position":[[20,5]]},"220":{"position":[[20,5]]},"257":{"position":[[20,5]]},"291":{"position":[[20,5]]},"295":{"position":[[20,5]]}}}],["moder",{"_index":51,"t":{"97":{"position":[[8,10]]}}}],["modul",{"_index":54,"t":{"100":{"position":[[7,6]]},"102":{"position":[[26,7]]}}}],["name",{"_index":98,"t":{"162":{"position":[[13,4]]},"194":{"position":[[19,4]]}}}],["new",{"_index":36,"t":{"77":{"position":[[0,3]]},"275":{"position":[[0,3]]}}}],["non",{"_index":96,"t":{"160":{"position":[[0,3]]},"162":{"position":[[0,3]]},"164":{"position":[[0,3]]},"426":{"position":[[0,3]]}}}],["normal",{"_index":334,"t":{"720":{"position":[[0,11]]}}}],["normalis",{"_index":335,"t":{"720":{"position":[[12,10]]}}}],["onlin",{"_index":67,"t":{"118":{"position":[[12,6]]}}}],["oper",{"_index":144,"t":{"275":{"position":[[4,8]]},"289":{"position":[[11,8]]},"310":{"position":[[0,8]]},"312":{"position":[[9,9]]},"314":{"position":[[11,8]]},"316":{"position":[[7,8]]},"318":{"position":[[10,8]]},"320":{"position":[[5,8]]}}}],["os.micro",{"_index":279,"t":{"600":{"position":[[10,10]]}}}],["os.milli",{"_index":280,"t":{"600":{"position":[[21,10]]}}}],["os.nano",{"_index":278,"t":{"600":{"position":[[0,9]]}}}],["os.platform",{"_index":240,"t":{"508":{"position":[[0,11]]}}}],["os.second",{"_index":281,"t":{"600":{"position":[[32,10]]}}}],["os.sleep",{"_index":277,"t":{"598":{"position":[[0,8]]}}}],["os.unixsecond",{"_index":282,"t":{"602":{"position":[[0,14]]}}}],["packag",{"_index":69,"t":{"122":{"position":[[0,8]]}}}],["package.path",{"_index":241,"t":{"510":{"position":[[0,12]]}}}],["parent",{"_index":147,"t":{"283":{"position":[[0,6]]}}}],["php",{"_index":76,"t":{"133":{"position":[[0,3]]}}}],["pipe",{"_index":158,"t":{"320":{"position":[[0,4]]}}}],["pluto",{"_index":47,"t":{"89":{"position":[[10,5]]},"118":{"position":[[6,5]]},"131":{"position":[[8,5]]}}}],["pluto_us",{"_index":42,"t":{"81":{"position":[[27,11]]}}}],["portabl",{"_index":97,"t":{"160":{"position":[[4,8]]},"162":{"position":[[4,8]]},"164":{"position":[[4,8]]}}}],["possibl",{"_index":94,"t":{"158":{"position":[[0,8]]}}}],["practic",{"_index":93,"t":{"156":{"position":[[4,8]]}}}],["prebuilt",{"_index":68,"t":{"120":{"position":[[0,8]]}}}],["prevent",{"_index":56,"t":{"102":{"position":[[0,7]]},"106":{"position":[[14,10]]},"299":{"position":[[15,8]]}}}],["privat",{"_index":148,"t":{"285":{"position":[[0,7]]}}}],["prng",{"_index":225,"t":{"470":{"position":[[14,5]]}}}],["promot",{"_index":150,"t":{"287":{"position":[[12,9]]}}}],["rang",{"_index":244,"t":{"518":{"position":[[0,5]]}}}],["reflect",{"_index":123,"t":{"216":{"position":[[0,10]]}}}],["repositori",{"_index":72,"t":{"125":{"position":[[4,10]]}}}],["return",{"_index":104,"t":{"170":{"position":[[10,6]]}}}],["rsa",{"_index":234,"t":{"491":{"position":[[0,3]]}}}],["rule",{"_index":125,"t":{"228":{"position":[[0,5]]}}}],["run",{"_index":320,"t":{"684":{"position":[[0,3]]}}}],["scope",{"_index":121,"t":{"214":{"position":[[0,6]]}}}],["script",{"_index":77,"t":{"133":{"position":[[4,7]]}}}],["shadow",{"_index":85,"t":{"144":{"position":[[4,6]]},"146":{"position":[[7,6]]},"148":{"position":[[6,6]]}}}],["socket",{"_index":286,"t":{"612":{"position":[[0,6]]}}}],["socket.bind",{"_index":285,"t":{"610":{"position":[[0,11]]}}}],["socket.clos",{"_index":291,"t":{"622":{"position":[[0,12]]}}}],["socket.connect",{"_index":283,"t":{"606":{"position":[[0,14]]}}}],["socket.listen",{"_index":284,"t":{"608":{"position":[[0,13]]}}}],["socket.recv",{"_index":288,"t":{"616":{"position":[[0,11]]}}}],["socket.send",{"_index":287,"t":{"614":{"position":[[0,11]]}}}],["socket.starttl",{"_index":290,"t":{"620":{"position":[[0,15]]}}}],["socket.unrecv",{"_index":289,"t":{"618":{"position":[[0,13]]}}}],["spaceship",{"_index":157,"t":{"318":{"position":[[0,9]]}}}],["standard",{"_index":116,"t":{"196":{"position":[[0,8]]}}}],["state",{"_index":106,"t":{"174":{"position":[[17,6]]}}}],["statement",{"_index":131,"t":{"251":{"position":[[7,9]]},"277":{"position":[[6,9]]}}}],["static",{"_index":143,"t":{"273":{"position":[[0,6]]}}}],["string.casefold",{"_index":312,"t":{"666":{"position":[[0,15]]}}}],["string.contain",{"_index":311,"t":{"664":{"position":[[0,15]]}}}],["string.endswith",{"_index":315,"t":{"672":{"position":[[0,15]]}}}],["string.formatint",{"_index":313,"t":{"668":{"position":[[0,16]]}}}],["string.isalnum",{"_index":306,"t":{"654":{"position":[[0,14]]}}}],["string.isalpha",{"_index":304,"t":{"650":{"position":[[0,14]]}}}],["string.isascii",{"_index":302,"t":{"646":{"position":[[0,14]]}}}],["string.islow",{"_index":303,"t":{"648":{"position":[[0,14]]}}}],["string.isupp",{"_index":305,"t":{"652":{"position":[[0,14]]}}}],["string.iswhitespac",{"_index":307,"t":{"656":{"position":[[0,19]]}}}],["string.low",{"_index":296,"t":{"634":{"position":[[0,12]]}}}],["string.lstrip",{"_index":300,"t":{"642":{"position":[[0,13]]}}}],["string.partit",{"_index":314,"t":{"670":{"position":[[0,16]]}}}],["string.replac",{"_index":309,"t":{"660":{"position":[[0,14]]}}}],["string.rfind",{"_index":298,"t":{"638":{"position":[[0,12]]}}}],["string.rstrip",{"_index":301,"t":{"644":{"position":[[0,13]]}}}],["string.split",{"_index":297,"t":{"636":{"position":[[0,12]]}}}],["string.startswith",{"_index":316,"t":{"674":{"position":[[0,17]]}}}],["string.strip",{"_index":299,"t":{"640":{"position":[[0,12]]}}}],["string.trunc",{"_index":310,"t":{"662":{"position":[[0,15]]}}}],["string.uformat",{"_index":308,"t":{"658":{"position":[[0,14]]}}}],["string.upp",{"_index":295,"t":{"632":{"position":[[0,12]]}}}],["studio",{"_index":79,"t":{"135":{"position":[[7,6]]}}}],["sum",{"_index":329,"t":{"710":{"position":[[0,3]]}}}],["sun",{"_index":81,"t":{"139":{"position":[[0,3]]}}}],["switch",{"_index":130,"t":{"251":{"position":[[0,6]]},"255":{"position":[[0,6]]}}}],["tabl",{"_index":45,"t":{"85":{"position":[[8,5]]},"192":{"position":[[0,5]]}}}],["table.checkal",{"_index":356,"t":{"776":{"position":[[0,14]]}}}],["table.clear",{"_index":343,"t":{"742":{"position":[[0,11]]}}}],["table.contain",{"_index":346,"t":{"748":{"position":[[0,14]]}}}],["table.filt",{"_index":351,"t":{"762":{"position":[[0,12]]},"764":{"position":[[0,14]]}}}],["table.find",{"_index":347,"t":{"750":{"position":[[0,10]]}}}],["table.foreach",{"_index":350,"t":{"760":{"position":[[0,13]]}}}],["table.freez",{"_index":344,"t":{"744":{"position":[[0,12]]}}}],["table.isfrozen",{"_index":345,"t":{"746":{"position":[[0,14]]}}}],["table.map",{"_index":352,"t":{"766":{"position":[[0,9]]},"768":{"position":[[0,12]]}}}],["table.max",{"_index":355,"t":{"774":{"position":[[0,9]]}}}],["table.min",{"_index":354,"t":{"772":{"position":[[0,9]]}}}],["table.reduc",{"_index":353,"t":{"770":{"position":[[0,12]]}}}],["table.reord",{"_index":349,"t":{"756":{"position":[[0,13]]},"758":{"position":[[0,15]]}}}],["table.revers",{"_index":348,"t":{"752":{"position":[[0,13]]},"754":{"position":[[0,14]]}}}],["table.s",{"_index":342,"t":{"740":{"position":[[0,10]]}}}],["table.sort",{"_index":341,"t":{"736":{"position":[[0,10]]},"738":{"position":[[0,12]]}}}],["termux",{"_index":74,"t":{"129":{"position":[[0,6]]}}}],["ternari",{"_index":141,"t":{"267":{"position":[[25,10]]}}}],["time",{"_index":40,"t":{"81":{"position":[[8,4]]},"104":{"position":[[10,4]]},"172":{"position":[[8,4]]}}}],["todir",{"_index":338,"t":{"726":{"position":[[0,5]]}}}],["torot",{"_index":336,"t":{"722":{"position":[[0,5]]}}}],["type",{"_index":83,"t":{"143":{"position":[[8,5]]},"150":{"position":[[0,4]]},"303":{"position":[[5,5]]}}}],["typo",{"_index":95,"t":{"158":{"position":[[9,4]]}}}],["unannot",{"_index":100,"t":{"166":{"position":[[0,11]]}}}],["underscor",{"_index":136,"t":{"261":{"position":[[9,11]]}}}],["unreach",{"_index":89,"t":{"152":{"position":[[0,11]]}}}],["url.decod",{"_index":324,"t":{"694":{"position":[[0,10]]}}}],["url.encod",{"_index":323,"t":{"692":{"position":[[0,10]]}}}],["url.pars",{"_index":325,"t":{"696":{"position":[[0,9]]}}}],["us",{"_index":119,"t":{"206":{"position":[[0,5]]},"210":{"position":[[0,5]]},"220":{"position":[[0,5]]},"257":{"position":[[0,5]]},"291":{"position":[[0,5]]},"295":{"position":[[0,5]]},"303":{"position":[[17,4]]}}}],["var",{"_index":84,"t":{"144":{"position":[[0,3]]}}}],["variabl",{"_index":111,"t":{"182":{"position":[[0,9]]},"194":{"position":[[10,8]]}}}],["visual",{"_index":78,"t":{"135":{"position":[[0,6]]}}}],["vm",{"_index":63,"t":{"108":{"position":[[0,2]]}}}],["walru",{"_index":156,"t":{"316":{"position":[[0,6]]}}}],["warn",{"_index":82,"t":{"143":{"position":[[0,7]]},"174":{"position":[[9,7]]},"176":{"position":[[8,8]]},"200":{"position":[[9,8]]}}}],["wcall",{"_index":246,"t":{"522":{"position":[[0,5]]}}}],["work",{"_index":152,"t":{"307":{"position":[[12,5]]}}}],["write",{"_index":66,"t":{"118":{"position":[[0,5]]}}}],["xml.decod",{"_index":340,"t":{"732":{"position":[[0,10]]}}}],["xml.encod",{"_index":339,"t":{"730":{"position":[[0,10]]}}}],["yieldfunc",{"_index":321,"t":{"686":{"position":[[0,9]]}}}],["yourself",{"_index":75,"t":{"131":{"position":[[14,8]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":2,"t":"This page contains the changelogs from all releases of Pluto.","s":"Changelog","u":"/docs/Changelog","h":"","p":1},{"i":4,"t":"Fixed io.contents not returning an empty string for empty files on Windows Fixed table.clear not resetting cached length Fixed http.request allowing header values to contain CR and LF (CVE-2024-45597) Fixed strings implicitly concatenating with each other Fixed incorrect formatting with some instances of VM dumping PHP build scripts now pass on additional arguments to the compiler From Lua: Fixed wrong code gen for indices with comparisons","s":"0.9.5","u":"/docs/Changelog","h":"#095","p":1},{"i":6,"t":"Improved field-shadow warning to say which field is shadowed Improved handing of parent keyword Improved error message for if then Fixed an 'else if' warning false-positive Fixed compile-time concat sometimes causing a parse error Fixed infinite loop with nested switch expressions when flow should go to default case Fixed exception when raising argument type mismatch warning when expected type is a function Fixed a compatibility issue with return case Standard library: Made string.replace binary-safe and faster CaT module now supports the optional value encoding feature","s":"0.9.4","u":"/docs/Changelog","h":"#094","p":1},{"i":8,"t":"Added a warning for '(' being used instead of '|' for pipe operator arguments Improved error reporting when an invalid parent is given to 'extends' Fixed extending a global class unexpectedly pushing _G Fixed incorrect results when using 'not' on result of null coalescing operator As a result of this fix, the null coalescing operator is now bytecode-compatible with Lua Fixed parsing ambiguities with ternary expressions in switch cases Standard library: Fixed json.encode(json.decode(..., json.withnull + json.withorder)) producing unexpected artifacts Fixed data corruption when json.decode is used on large data Fixed insufficient TLS peer verification in HTTP library and socket.starttls in non-WASM builds (CVE-2024-32973)","s":"0.9.3","u":"/docs/Changelog","h":"#093","p":1},{"i":10,"t":"This release fixes several regressions made in 0.9.1: Fixed failing to compile on aarch64 Fixed method calls no longer working in ternary expressions even with parentheses Fixed walrus operator no longer being usable within unary operator expressions Furthermore, it improves the walrus operator in regards to disallowing UB and clarifying related error messages.","s":"0.9.2","u":"/docs/Changelog","h":"#092","p":1},{"i":12,"t":"Improved try/catch Improved parsing of for-as loops Deprecated if expressions (if a then b else c) in favor of ternary expressions (a ? b : c) Fixed instances of : starting method call when it should delimit ternary expression Fixed unreachable-code triggering for non-constant values Fixed repeat + continue being able to read uninitialized variables Fixed break and continue possibly not closing upvalues Fixed continue not working as expected when passing through switch statement Fixed switch cases being able to read uninitialized variables Fixed inconsistent behavior with safe navigtion method calls and multiple return values Fixed walrus operator being able to cause UB or corrupt the stack Fixed pipe operator possibly generating incorrect code Huge thanks to @XmiliaH for reporting the majority of bugs fixed in this update and helping fix them.","s":"0.9.1","u":"/docs/Changelog","h":"#091","p":1},{"i":14,"t":"Added $define statement Added pipe operator (|>) Added compound XOR operator (~=) Added optional global keyword and 'implicit-global' warning Added @fallthrough annotation and 'unannotated-fallthrough' warning Added function attribute and 'discarded-return' warning Added 'field-shadow' warning Lambdas can now have full bodies by starting with 'do' (e.g. |a| -> do return a end) pluto_use can now also be used via @pluto_use in comments new operator now also supports static 'new' function Deprecated ** operator (use ^ instead) Deprecated let statement (use local instead) Deprecated const statement (use local with or $define instead) Deprecated attribute (replaced by $define statement) Re-added compile-time concat optimization Fixed switch cases being able to jump into the scope of a variable Fixed being able to set nil as a default argument Standard library: Added '*' library Added 'cat' library Added 'http' library Added 'socket' library Added 'xml' library Added 'bigint' class Added 'scheduler' class Added os.platform constant Added range function Added io.contents function Added io.relative function Added copying variants of existing functions (table.sorted, table.mapped, table.filtered, table.reversed, table.reordered) Added table.size function Added table.clear function Added table.reduce, table.min, & table.max functions Added table.find function Added table.checkall function Added coroutine.sleep function Added crypto.generatekeypair function Added crypto.encrypt & crypto.decrypt functions Added crypto.sign & crypto.verify functions Added crypto.sha1, crypto.sha384, & crypto.sha512 functions Added crypto.adler32 function Added url.parse function Added math.round function json.encode now supports __order for objects json.decode now has an optional flags parameter, they can be combined via binary OR json.withnull makes it decode JSON nulls as json.null instead of nil json.withorder makes it produce __order field for objects coroutines/threads now have a metatable by default base64.encode & base32.encode changed padding parameter's default value from false to true (base64.urlencode is unchanged) Fixed crypto.fnv1 & crypto.fnv1a producing incorrect hashes for non-ASCII strings CLI: Added '-c' flag to pluto & plutoc to enable compatibility mode For integrators: Added PLUTO_READ_FILE_HOOK & PLUTO_WRITE_FILE_HOOK Added PLUTO_HTTP_REQUEST_HOOK Removed PLUTO_USE_THROW as we now default to using C++ exceptions for Lua errors to avoid breaking RAII semantics. You can still specify LUA_USE_LONGJMP if you want long jumps.","s":"0.9.0","u":"/docs/Changelog","h":"#090","p":1},{"i":16,"t":"Added variable scoping warnings to switch statements to highlight code that will break in 0.9.0 Improved some error messages Fixed base32 & base64 functions not being binary-safe Removed compile-time concat optimization because it could produce incorrect results","s":"0.8.2","u":"/docs/Changelog","h":"#082","p":1},{"i":18,"t":"Added a specialized error message for local class = etc 'exportvar' now prefixes function bytecode with 'load' Improved code generation for switch blocks Improved \"possibly unwanted function call\" warning Fixed dumpvar & exportvar not handling recursion of sub-tables Fixed assert.equal & assert.nequal ignoring extra fields in value2 Fixed 'until' possibly using a variable from wrong scope due to 'continue' Fixed var-shadow warning for named vararg being raised on the wrong line For integrators: Added PLUTO_MEMORY_LIMIT Added PLUTO_NO_DEBUGLIB Added PLUTO_NO_COROLIB For a more comprehensive overview of the changes, take a look at the commit log.","s":"0.8.1","u":"/docs/Changelog","h":"#081","p":1},{"i":20,"t":"Added switch expressions Added shorthand fallthrough syntax for switch statement & expression, e.g. case 1, 2: ... Added try...catch statement Added spaceship operator (<=>) Added safe navigation for method calls: nilable_inst?:method(), inst:nilable_method?(), nilable_inst?:nilable_method?() Added optional 'const' keyword as shorthand for local ... [= ...], enabled with pluto_use const. Added pluto_use \"VERSION+\" Tables now have a metatable by default ({ __index = _G.table }). Added '!' as an alias for 'not' Added 'private' modifier for class fields Improved 'class' and 'extends' to support indexed names Improved 'instanceof' to be usable with more complex expressions export now works in all scopes, not just the main body Updated in operator on tables to check values instead of keys \\{ is now a valid escape sequence (for interpolated strings) Fixed to-be-closed variables not working in switch cases Fixed 'new' not working as expected if it was disabled by the environment and re-enabled by 'pluto_use' Fixed 'enum class' not incrementing enumerator values Fixed not being able to use expressions such as increment in enum without parentheses Added compile-time concat optimization Warnings: Added warning for local attributes used without '<' ... '>' Now propagating types for global variables so when their value is assigned to something, mismatches can be detected. Added optional global-shadow warning which is like var-shadow but for globals that are especially vulnerable to obscure shadowing bugs (to prevent excessive annoyance). These globals include: arg,string, and table. Integrators can change this via PLUTO_COMMON_GLOBAL_NAMES Global shadow warnings do not apply to localization optimization (i.e, local table = table) var-shadow has been improved to check more enclosing scopes Improved unreachable-code Fixed var-shadow warning for locals used in switch cases despite break Added optional non-portable-code, non-portable-bytecode, and non-portable-name warning types Warnings can now be promoted to errors, e.g. @pluto_warnings error-all Standard library: Soup is now always linked in, obsoleting _PSOUP Added assertion library (see here for more preliminary detail) Added url library (encode & decode) Added exception class Added vector3 class Added dumpvar & exportvar Added string.truncate Added string.replace — a slightly faster, but mostly more straightforward alternative to gsub. Most notably, not burdened by MAX_CAPTURES Added string.formatint (supports any BigInt impl that can offer the user a string representation) Also supports any grouping & any separator without concerning locale. Added table.filter Added table.map Added table.reverse Added table.reorder Added io.currentdir Added io.part Added io.writetime Added math.isnan Added compareversions Added wcall Added math.atan2 as an alias for math.atan Added json.null io.absolute now has an optional argument to request a canonicalized absolute path Updated string.rfind to accept Lua patterns Renamed io.copyto to io.copy Renamed base64.url_encode & base64.url_decode to base64.urlencode & base64.urldecode Deprecated string.find_first_of & string.find_first_not_of in favor of string.find Deprecated string.find_last_of & string.find_last_not_of in favor of string.rfind Deprecated string.lfind in favor of string.find Deprecated crypto.hexdigest in favor of string.format Modified require Prioritizes local files now to ensure compatibility. Added require(\"pluto:libname\") to explicitly request pluto libraries if ever needed (normal still works for pluto libraries, we just check for local files first). Removed base58 For integrators: Added PLUTO_NO_FILESYSTEM - disables all filesystem access (for sandboxing). Added PLUTO_WARN_NON_PORTABLE_CODE Added PLUTO_WARN_NON_PORTABLE_BYTECODE Added PLUTO_WARN_NON_PORTABLE_NAME Added PLUTO_NO_BINARIES - disables all dll/so/c module loading (for sandboxing) Added luaG_addsrcinfo Far more information can be found at our documentation: https://pluto-lang.org/","s":"0.8.0","u":"/docs/Changelog","h":"#080","p":1},{"i":22,"t":"Fixed unexpected behavior when using a ternary expression inside of an interpolated string Fixed table.contains returning 0 instead of the actual key for non-integer key types Fixed REPL not recognizing multi-line statements Fixed Pluto-injected code corrupting bytecode For integrators: Added PLUTO_LOADCLIB_HOOK","s":"0.7.4","u":"/docs/Changelog","h":"#074","p":1},{"i":24,"t":"Updated error semantics of os.remove & os.rename to match Lua's again (return false instead of raising error), Pluto's 'io' versions of these functions remain unchanged Fixed extends not copying over metamethods Fixed \"memory allocation error: block too big\" when parsing --[[]] Fixed allowing function calls to primitives, causing ambiguities with exprstat after assignment Fixed string.upper & string.lower delimiting on '\\0' Some other improvements and bugfixes","s":"0.7.3","u":"/docs/Changelog","h":"#073","p":1},{"i":26,"t":"String interpolation now allows nested strings Improved \"unreachable code\" warning Improved some error messages Fixed string interpolation not working with string call syntax Fixed rare issues with 'new', 'extends' and 'instanceof' operators","s":"0.7.2","u":"/docs/Changelog","h":"#072","p":1},{"i":28,"t":"Fixed string interpolation not working with single-quoted strings after 0.7.0 Fixed os.sleep disregarding execution time limit Fixed scripts being able to go past execution time limit with coroutines","s":"0.7.1","u":"/docs/Changelog","h":"#071","p":1},{"i":30,"t":"Added table destructuring (local '{' NAME [= FIELD][, ...] '}' '=' TABLE) Added array destructuring (local '[' NAME[, ...] ']' '=' TABLE) Added pluto_use <* | version | token> [= false] to toggle non-compatible keywords Added pluto_use let [= false] to toggle 'let' alias for 'local' Added ++ statement Also supports ++t.prop Added constructor promotion Added compile-time conditionals Improved class expression & statement Now supports property declaration without value Now supports type hints (currently without warnings) Now supports access modifiers (currently without warnings or errors) Can now optionally use 'begin' before body Improved string interpolation to support any expression, not just variable names Improved type hints to support alternatives, e.g. string|int Named arguments may now be used in conjunction with positional arguments Improved 'new' expression to support direct member access into the table it created, e.g. print(new Human(\"John\").name) 'new' may now also be used as a statement Fixed loading of precompiled code from files with non-Latin path on Windows Fixed behavior of 'in' expression when used on a temporary table Out-of-the-box Compatibility: 'parent' may now be overwritten via local or parameter name All reserved identifiers can now be used with shorthand table syntax and goto Standard library: Added coroutine.xresume For integrators: Added PLUTO_USE_LET More detailed documentation can be found here.","s":"0.7.0","u":"/docs/Changelog","h":"#070","p":1},{"i":32,"t":"Defaults arguments now produce Lua-compatible bytecode Fixed default arguments not working for methods Fixed named arguments, etc. not working for upvalue functions Fixed 'in' expression for when right-hand operand is nested table Fixed 'in' expression being too greedy in consuming righthand operand For integrators: Added PLUTO_LUA_LINKABLE","s":"0.6.3","u":"/docs/Changelog","h":"#063","p":1},{"i":34,"t":"Optional Parentheses now works for table types and with chained \"suffix expressions\" Fixed new overwriting user-defined __index Fixed infinite recursion with multi-level parent calls Fixed some other small issues Performance: Optimized lua_insert, lua_remove, & lua_replace (Optimization by @gottfriedleibniz) Optimized luaO_ceillog2 (Inspired by @gottfriedleibniz) Enabled Lua's jump table for clang build as well Fixed a VM performance regression introduced by Pluto","s":"0.6.2","u":"/docs/Changelog","h":"#062","p":1},{"i":36,"t":"Improved suggestions (for when using plutoc with the language server) Optimized switch statement code generation (now omits cases leading to default case) Fixed producing syntax error when 'case' or 'default' is used outside of switch Fixed using 'export' outside of global scope not producing an error Fixed some confusing error messages Pulled in the latest Lua changes so some Lua bugs are now fixed","s":"0.6.1","u":"/docs/Changelog","h":"#061","p":1},{"i":38,"t":"Added attribute to force locals to be compile-time constants Added $expr syntax for compile-time evaluation of select functions Added export [NAME=VALUE | function | class] syntax Added named arguments (name=value in funcargs) Added named varargs (...NAME), automatically puts the varargs into a table with the given name A subset of Soup is now vendored with Pluto so standard library features that rely on it should now be more viable Removed deprecated \"pluto_case\" and \"pluto_default\" keywords Removed when statement Enums: Added ENUM.ENUMERATOR syntax for named enums Added ENUM CLASS NAME ... syntax to force usage of this syntax Added enum reflection for named enums (:names(), :values(), :kvmap(), :vkmap()) Object-oriented programming: Added new TABLE(...) syntax (creates new table, sets TABLE as its metatable + index, calls `:construct(...)` if exists) Added 'class' statement & expression (similar to table but without need for ',' or ';' after properties and functions) 'class' and 'local class' statements also support extends NAME which sets parent property and metatable with index Added static function NAME for use within table constructor/class definition (equal to NAME = function) Added 'parent' expression parent.PROP -> self.__parent.PROP parent:METHOD(...) -> self.__parent.METHOD(self, ...) Added TABLE instanceof METATABLE operator Type hints: Added 'int' & 'float' type hints (more restrictive than 'number') Added 'void' type hint for function return type Standard library: Added utonumber, utostring, & string.uformat Added instanceof(TABLE, METATABLE) For integrators upgrading to Pluto 0.6.0: Consider defining PLUTO_COMPATIBLE_NEW, PLUTO_COMPATIBLE_CLASS, PLUTO_COMPATIBLE_PARENT & PLUTO_COMPATIBLE_EXPORT so 'new', 'class', 'parent' & 'export' will not be reserved keywords just yet, instead 'pluto_new', 'pluto_class', 'pluto_parent' & 'pluto_export' can be used. More detailed documentation can be found here.","s":"0.6.0","u":"/docs/Changelog","h":"#060","p":1},{"i":40,"t":"Default arguments now support tables Pluto now supports building with C ABI so you can replace Lua's shared library with Pluto's without needing to change the program Fixed return before case or default causing a syntax error Fixed access violation on lua_close with strings as default parameters","s":"0.5.4","u":"/docs/Changelog","h":"#054","p":1},{"i":42,"t":"Default arguments now support compile-time constant variables, unary -, and pseudo-unary + Re-added os.remove & os.rename because they originated in Lua and should not have been removed Fixed some instances of errors not providing a code snippet and reporting the wrong line Fixed enumerators being limited to 32-bit values Fixed warning disable/enable being global-only Removed if-goto optimisation due to various edge cases where goto is not executed","s":"0.5.3","u":"/docs/Changelog","h":"#053","p":1},{"i":44,"t":"Enum statement: Now supports compile-time constant variables when setting value Fixed require, dofile, etc. not taking UTF-8 encoded paths on Windows Fixed pluto & plutoc not being able to execute files with foreign names on Windows","s":"0.5.2","u":"/docs/Changelog","h":"#052","p":1},{"i":46,"t":"Enum Statement: Now supports unary - and pseudo-unary + when setting value Replaced locals limit with registers limit so you can have more compile-time constants Fixed Pluto's IO functions not taking UTF-8 encoded paths Fixed UB when emitting unfinished string error, possibly resulting in an access violation","s":"0.5.1","u":"/docs/Changelog","h":"#051","p":1},{"i":48,"t":"Added \"for ITERABLE as VALUE\" loop Added $-strings (string interpolation) Added prefix ++ operator Added support for binary number literals. Added C-style enums Added _PSOUP global Updated package.path to look for .pluto files in working directory by default Deprecated \"pluto_case\" and \"pluto_default\" (now \"case\" and \"default\", respectively) Removed what was deprecated in 0.4.0 (sleep -> os.sleep, os.remove -> io.remove, os.rename -> io.rename) Added execution time limit (optional, must be enabled in luaconf.h) Added content moderation Standard Library: Added io.makedirs Standard Library (Soup): Added base64 Added base58 Added base32 Added json","s":"0.5.0","u":"/docs/Changelog","h":"#050","p":1},{"i":50,"t":"Improved wording of some warning & error messages Fixed excessive \"duplicate local declaration\" warnings Cherry-picked some Lua commits, so the following Lua bugs are now fixed: 'break' may not properly close variable in a 'for' loop error message in 'table.remove' 'utf8.codes' accepts spurious continuation bytes Negation in constant folding of '>>' may overflow stack overflow with nesting of coroutine.close","s":"0.4.5","u":"/docs/Changelog","h":"#045","p":1},{"i":52,"t":"Added math.rand as an alias for math.random Changed unknown type hint to be warning instead of error Reverted table.insert optimation due to unexpected behavior Some minor tweaks","s":"0.4.4","u":"/docs/Changelog","h":"#044","p":1},{"i":54,"t":"Improved most error messages, and vastly improved the internal code for them. These reserved tokens can be used as identifiers outside of their functional context: default, case Optimized the performance of table.insert. Roughly 3x faster, but still slightly slower than t[#t + 1] Pluto can now be built using Sun.","s":"0.4.3","u":"/docs/Changelog","h":"#043","p":1},{"i":56,"t":"Fixes a regression introduced in Pluto 0.4.1 that prevented the walrus operator from working within lambda functions that are passed as function arguments","s":"0.4.2","u":"/docs/Changelog","h":"#042","p":1},{"i":58,"t":"Updated lexer to tokenise in a separate pass This fixes Pluto's error messages sometimes not showing the full line Disallowed use of the walrus operator within a function call because it was found to be more janky than expected","s":"0.4.1","u":"/docs/Changelog","h":"#041","p":1},{"i":60,"t":"Additions: Walrus Operator Default parameters for functions. New standard library: lcryptlib, for various hash algorithms and cryptographic PRNGs. New warnings: Unreachable code. Too many function arguments. Improvements: Switch case may now use variables. Shorthand ternary syntax from C/C++. Warnings can be configured with comments. Improved performance of some common arithmetic algorithms. VM Dumping has been rewritten for superb runtime detail on all opcodes, their arguments, their results, etc. string.upper & string.lower take a second parameter indicating a specific index to change. Absence of this parameter preserves default behavior.","s":"0.4.0","u":"/docs/Changelog","h":"#040","p":1},{"i":62,"t":"Improvements: io.copyto will now overwrite existing files instead of throwing an exception. Improve error handling of other exception-prone IO functions.","s":"0.3.2","u":"/docs/Changelog","h":"#032","p":1},{"i":64,"t":"Bugfix: String.split would previously invoke an infinite loop when an empty string is used as the delimiter.","s":"0.3.1","u":"/docs/Changelog","h":"#031","p":1},{"i":66,"t":"Additions: Inlined method creation. STR in STR expressions. KEY in INDEXABLE expressions. Generalized iteration, no need for pairs. io.listdir Reserved keywords as valid fields. Null-coalescing operator (w/ compound operator). continue N & break N for manipulating outer loops. Optional type-hinting, with parser warnings. Safe accessor navigation, to avoid \"attempt to index nil\" errors for deeply nested fields. Changes: table.contains now returns an index if found and nil otherwise (previously returned true or false). Improvements: Switch no longer has syntactic restrictions Greater switch performance Documentation for the new changes can be found here.","s":"0.3.0","u":"/docs/Changelog","h":"#030","p":1},{"i":68,"t":"Fixes a bug with the continue keyword","s":"0.2.2","u":"/docs/Changelog","h":"#022","p":1},{"i":70,"t":"Added VM Dump Implemented long jump optimisation","s":"0.2.1","u":"/docs/Changelog","h":"#021","p":1},{"i":72,"t":"Added compile-time warnings for duplicate local declarations Added optional ANSI color sequences in various error & warning messages Added support for ternary expressions Added continue statement Added Table Freezing / Immutability Added Switch/Case statements Added user_data to global_State Added != Added compatibility mode Added table.contains Added new time functions to os api Added negative string indexing Added compound concatenation operator Added new string functions Added portable jumptable implementation that can be optionally enabled Added REPEAT .. WHEN loop support Added new IO library functions Added _PVERSION Implemented table length cache optimisation (2x speedup) Implemented optional parentheses around string literals for method invocation Increased local variable limit from 200 to 249 Rebased with Lua for latest bugfixes","s":"0.2.0","u":"/docs/Changelog","h":"#020","p":1},{"i":74,"t":"Initial version. Notable features: Lambda expressions Arbitrary character insertion in numeral literals Many compound operators ** exponent operator","s":"0.1.0","u":"/docs/Changelog","h":"#010","p":1},{"i":76,"t":"Pluto aims to be source- and bytecode-compatible with existing Lua code such that it can simply be used as a drop-in replacement for Lua, and Lua modules can simply be used in Pluto codebases. In the vast majority of cases, we do succeed, but there are a few things to be aware of.","s":"Compatibility","u":"/docs/Compatibility","h":"","p":75},{"i":78,"t":"Pluto adds the following reserved tokens: switch continue enum new class parent export try catch Which means you can't use them as identifiers. They can still be used with short-hand table indexes and goto labels because Pluto allows reserved keywords to be used in those contexts.","s":"New Keywords","u":"/docs/Compatibility","h":"#new-keywords","p":75},{"i":80,"t":"For Integrators: Check your luaconf.h file to find the relevant macros under the \"Compatibility\" heading. For Scripters: Use pluto_use in the source files. -- @pluto_use * = false to simply disable all incompatible keywords. For Users: Pass the -c flag to pluto or plutoc. The following sections will go more in-depth on source-level mitigations (for scripters).","s":"Mitigations","u":"/docs/Compatibility","h":"#mitigations","p":75},{"i":82,"t":"You can change the meaning of Pluto's reserved tokens at any point in your scripts using the --@pluto_use comment or pluto_use statement. For example, to disable all non-compatible keywords except for switch: pluto -- @pluto_use * = false, switch Copy It is also possible to specify a version number, which is a shorthand for the keywords available at that version: \"0.2.0\" corresponds to * = false, switch, continue \"0.5.0\" corresponds to * = false, switch, continue, enum \"0.6.0\" corresponds to * = false, switch, continue, enum, new, class, parent, export \"0.8.0\" corresponds to * = false, switch, continue, enum, new, class, parent, export, try, catch So, writing a portable script that only makes use of Pluto 0.8.0's features requires this at the beginning: pluto pluto_use \"0.8.0\" Copy This feature also supports quick encompassing of optional features. So, instead of: pluto pluto_use \"0.8.0\", global Copy You can use a '+' after the version number to also enable all of the optional features. As of 0.9.0, the only optional feature is explicit globals (global). pluto pluto_use \"0.9.0+\" -- The same as pluto_use \"0.9.0\", global Copy For module developers and scripts which may be used in future versions of Pluto, we recommend you use pluto_use for two reasons: Portability. This will override the compatibility mode settings compiled into Pluto so your script will be parsed identically in all Pluto environments. Proactive compatibility. Any keywords added by future versions of Pluto will also be put in compatibility mode by these statements, so in the off-chance your script uses a future reserved keyword as a variable name, it would still parse as you intended when you wrote it.","s":"Compile-time Configuration (pluto_use)","u":"/docs/Compatibility","h":"#compile-time-configuration-pluto_use","p":75},{"i":84,"t":"Another way of using Pluto's features regardless of compatibility mode is by prefixing the keyword with pluto_. For example, switch becomes pluto_switch. These Compatibility Mode variants will always be valid, even when Compatibility Mode is disabled. These are what they look like: pluto_switch pluto_continue pluto_enum pluto_new pluto_class pluto_parent pluto_export pluto_try pluto_catch","s":"Compatible Keywords","u":"/docs/Compatibility","h":"#compatible-keywords","p":75},{"i":86,"t":"This is a feature in Pluto that, by itself, is a benign QoL improvement for developers. However, in combination with our added standard library functions like table.min, it can be an unexpected semantic change: pluto local function roll(opts) return math.random(opts.min or 1, opts.max or 100) end print(roll{ max = 10 }) Copy pluto: test.pluto:2: bad argument #1 to 'random' (number expected, got function) stack traceback: [C]: in function 'math.rand' test.pluto:2: in local 'roll' test.pluto:4: in main chunk Copy Integrators can disable this feature by defining the PLUTO_NO_DEFAULT_TABLE_METATABLE macro in their luaconf.h or build config, to aid in a smooth transition, should scripts in their ecosystem require it. Scripters are advised to use rawget and/or type to better codify their expectations. For example, the example above seems to care only about providing fallback values and not at all about type-checking, so rawget would be an excellent fit for it: pluto local function roll(opts) return math.random(rawget(opts, \"min\") or 1, rawget(opts, \"max\") or 100) end print(roll{ max = 10 }) Copy","s":"Default Table Metatable","u":"/docs/Compatibility","h":"#default-table-metatable","p":75},{"i":88,"t":"Pluto is a superset of Lua 5.4 with a focus on general-purpose programming. While being remarkably compatible with Lua 5.4 source-code & bytecode, it enhances the standard library & adds more than a dozen highly-desired syntaxes such as switch statements, compound operators, classes, class inheritance, string interpolation, type hinting, enums, and so on.","s":"What is Pluto?","u":"/docs/Introduction","h":"","p":87},{"i":90,"t":"Pluto aspires to be a version of Lua with a larger feature-set, that is all. Pluto is not a Lua-killer, an attempted successor, or any of that. Many people (rightly so) love Lua precisely because of the design philosophy. And fundamentally, Pluto is a major deviation from Lua's design philosophy. Some may prefer this, some may not.","s":"What does Pluto aspire to be?","u":"/docs/Introduction","h":"#what-does-pluto-aspire-to-be","p":87},{"i":92,"t":"Although Pluto can theoretically be used with Lua-based tooling, we provide specialized support for .pluto files to enhance your coding experience with features such as: Syntax Highlighting Snippets — e.g. for when you type \"fun\" and press tab Comment Information — for editor features such as \"Toggle Comment\", \"Toggle Block Comment\" Indentation Rules — for editor features such as \"Reindent Lines\" Build Systems — run & lint scripts directly in your editor with Ctrl+(Shift+)B in Sublime Text or Ctrl+Shift+P in VS Code","s":"Editor Integration","u":"/docs/Editor Integration","h":"","p":91},{"i":94,"t":"The installation process depends on your editor: VS Code: Search for calamity-inc.pluto-syntax-highlighting in the marketplace and press \"Install.\" Sublime Text: Open the command palette (Ctrl+Shift+P), select \"Package Control: Install Package\", search for \"Pluto\", and press enter. Visual Studio: Click on Extensions > Manage Extensions. In the Online section, search for calamity-inc.pluto-vsix and press \"Download.\" IntelliJ: Clone our syntax highlighting repository and add the tmbundle folder to Editor > TextMate Bundles. If your editor is not listed here, check if it is able to load TextMate bundles, in which case you should be able to do something similar to the IntelliJ instructions above.","s":"Installation","u":"/docs/Editor Integration","h":"#installation","p":91},{"i":96,"t":"The luaconf.h in Pluto provides various battle-tested mechanisms for locking down your Pluto environments. In this article, we've documented some of those. If you are an integrator who needs help configuring any of this, or who wants us to implement another mechanism, feel free to contact us on GitHub.","s":"For Integrators","u":"/docs/For Integrators","h":"","p":95},{"i":99,"t":"You can disable execution of compiled bytecode by defining PLUTO_DISABLE_COMPILED in luaconf.h or your build config.","s":"Compiled Code","u":"/docs/For Integrators","h":"#compiled-code","p":95},{"i":101,"t":"You may already have filters before passing scripts to run onto Pluto, but mechanisms such as dofile and require may be used to bypass them. To help you combat this, Pluto provides PLUTO_LOADFILE_HOOK. For example, if you set it to ContmodOnLoadfile in luaconf.h or your build config, you only need to define that function somewhere in your code, like this: cpp extern \"C\" bool ContmodOnLoadfile(const char* filename) { return !isCodeProhibited(soup::string::fromFile(filename)); } Copy This requires you to use Pluto as a static library, as otherwise this linking relationship won't work.","s":"Custom Module Filters","u":"/docs/For Integrators","h":"#custom-module-filters","p":95},{"i":103,"t":"The PLUTO_NO_BINARIES macro can be defined to totally eliminate package.loadlib and any DLL/SO loading capability from the require function. This is helpful because package.loadlib can be used to bypass sandbox restrictions by manually loading symbols from a Lua/Pluto library, and the require function can load any Lua/Pluto C Module which may or may not provide dangerous functions. This is generally vital for any sandbox. This mechanism cannot be bypassed, since it configures Pluto to compile without support for any of the aforementioned features.","s":"Prevent Loading of Binary Modules","u":"/docs/For Integrators","h":"#prevent-loading-of-binary-modules","p":95},{"i":105,"t":"To aid environments that have to be sandboxed, Pluto provides Execution Time Limit (ETL), which can be enabled by defining PLUTO_ETL_ENABLE in luaconf.h or your build config. By default, ETL allows code to run for a total of 1 ms (1.000.000 nanos). This can be changed by overwriting PLUTO_ETL_NANOS. Note that this is a hammer solution. If you only want to prevent stupid mistakes, Infinite Loop Prevention is a far better tool.","s":"Execution Time Limit","u":"/docs/For Integrators","h":"#execution-time-limit","p":95},{"i":107,"t":"Pluto can detect infinite loops by preventing too many successive iterations. This was implemented because game threads usually force users to call some sort of yield mechanism to return control to the game thread. In Pluto, you specify a hard bottleneck on iterations, then you specify a function pointer which should prevent ILP within the loop it's called in. This will produce an error due to ILP: pluto while true do end Copy This will not, with correct configuration: pluto while true do yield() end Copy If your scheduling system calls coroutine.yield at least once per tick, configuring the ILP mechanism can be as simple as defining PLUTO_ILP_ENABLE. In any case, Pluto's configuration file (luaconf.h) is worth a look at, especially to properly configure this feature. info This is a very simple mechanic. It has no performance overhead & it's lightweight. However, the compromise for this was coverage. This will reliably prevent most user error, however malicious users can find a way to block a thread still. For example, any forward jump will prevent the mechanism from breaking a loop. This can be exploited, so don't rely on this for security.","s":"Infinite Loop Prevention","u":"/docs/For Integrators","h":"#infinite-loop-prevention","p":95},{"i":109,"t":"Pluto offers an optional, configurable feature to see every instruction that is executed in the Lua VM.","s":"VM Dumping","u":"/docs/For Integrators","h":"#vm-dumping","p":95},{"i":111,"t":"VM Dump can be enabled by defining PLUTO_VMDUMP in luaconf.h or your build config. To reduce noise, you can modify PLUTO_VMDUMP_COND to set a custom condition for when VM Dump is active. By default, the condition is true. Although not a configuration specific to VM Dump, it should be noted that you can modify the output macros lua_writestring and lua_writeline.","s":"Configuration","u":"/docs/For Integrators","h":"#configuration","p":95},{"i":113,"t":"Given the following code: pluto local value = 3 switch value do case 1: case 2: case 3: case 4: case 5: print(\"Got 1-5.\") break default: print(\"Value is greater than 5.\") end -- Break jumps here. Copy It will output: VARARGPREP 0 ; prepare for 0 varargs LOADI 0 3 ; push 3 MOVE 1 0 ; move 3 into R(A) EQI 1 1 0 ; 3 == 1 EQI 1 2 1 ; 3 == 2 EQI 1 3 1 ; 3 == 3 GETTABUP 2 0 0 ; push T['print'] for function-0x247d2882520 (T=table-0x247d29ec9c8) LOADK 3 1 ; push \"Got 1-5.\" Got 1-5. CALL 2 2 1 ; call cfunc (nresults=0 nparams=0) JMP 13 ; offset=13 newpc=0x247d29e90d8 RETURN 1 1 1 ; return 0 value(s) Copy This is great at deciphering obfuscated code which may be causing problems for your environment.","s":"What it looks like","u":"/docs/For Integrators","h":"#what-it-looks-like","p":95},{"i":115,"t":"This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should break. The default value is 1, thus breaking out of the current loop. Example 1 pluto for i = 1, 10 do -- Loop 1. break 1 -- This is identical to `break` without any arguments. end Copy Example 2 pluto for i = 1, 10 do -- Loop 1. for ii = 1, 5 do -- Loop 2. break 1 -- This will break from Loop 2. break 2 -- This will break from Loop 1. end end Copy","s":"Break Statement","u":"/docs/New Features/Break Statement","h":"","p":114},{"i":117,"t":"This document will explain how to get started with writing Pluto in no time.","s":"Getting Started","u":"/docs/Getting Started","h":"","p":116},{"i":119,"t":"The easiest way to get started writing Pluto is to use Write Pluto Online, which runs Pluto code directly in your browser using WASM.","s":"Write Pluto Online","u":"/docs/Getting Started","h":"#write-pluto-online","p":116},{"i":121,"t":"You can find pre-built binaries of Pluto for Windows, Linux, & Mac OS over on Pluto's Github Releases page.","s":"Prebuilt Binaries","u":"/docs/Getting Started","h":"#prebuilt-binaries","p":116},{"i":124,"t":"You can easily install pluto and plutoc via Chocolatey as follows: choco install plutolang Copy","s":"Chocolatey","u":"/docs/Getting Started","h":"#chocolatey","p":116},{"i":126,"t":"You can easily install Pluto via APT as follows: wget -qO- https://calamity-inc.github.io/deb-repo/key.gpg | sudo tee /usr/share/keyrings/calamity-inc.gpg > /dev/null echo \"deb [arch=amd64 signed-by=/usr/share/keyrings/calamity-inc.gpg] https://calamity-inc.github.io/deb-repo/ buster main\" | sudo tee /etc/apt/sources.list.d/calamity-inc.list > /dev/null sudo apt update sudo apt install pluto Copy This package includes the pluto and plutoc executables, shared library, as well as headers for developers (#include ). As the \"buster\" part implies, these binaries were compiled on Debian 10, but they work on all subsequent Debian releases, as well as Ubuntu 20 and above.","s":"APT Repository","u":"/docs/Getting Started","h":"#apt-repository","p":116},{"i":128,"t":"Pluto is in the Arch User Repository under the name plutolang. This package includes the pluto and plutoc executables, shared library, as well as headers for developers (#include ).","s":"AUR","u":"/docs/Getting Started","h":"#aur","p":116},{"i":130,"t":"Pluto is available in the Termux package main repository under plutolang for binaries and libpluto for development library.","s":"Termux","u":"/docs/Getting Started","h":"#termux","p":116},{"i":132,"t":"Pluto can compile on virtually any platform, as long as there's a C++ 17 compiler for it. First, you need to clone the repository: git clone https://github.com/PlutoLang/Pluto cd Pluto Copy Then, you can use any of the build methods documented here.","s":"Compile Pluto Yourself","u":"/docs/Getting Started","h":"#compile-pluto-yourself","p":116},{"i":134,"t":"info PHP is required for this method. You can check if PHP is installed by running php -v. You can install it via sudo apt intall php-cli on Debian or sudo pacman -S php on Arch. Simply run the following commands: php scripts/compile.php clang php scripts/link_pluto.php clang php scripts/link_plutoc.php clang php scripts/link_static.php Copy You can easily modify these commands to a compiler other than clang, if you wish. There are also additional scripts for the various types of shared libraries. The binaries will be placed in the src/ directory.","s":"PHP Scripts","u":"/docs/Getting Started","h":"#php-scripts","p":116},{"i":136,"t":"In the repository you just cloned, there's a Pluto.sln you can open with Visual Studio. Within Visual Studio, open the Build > Batch Build dialog. Here, click \"Select All\", then \"Build\". The binaries will be placed in the out/ directory.","s":"Visual Studio","u":"/docs/Getting Started","h":"#visual-studio","p":116},{"i":138,"t":"You can simply run the make command: make -j PLAT={yourplatform} Copy The platform list can be found here. The binaries will be placed in the src/ directory.","s":"Make","u":"/docs/Getting Started","h":"#make","p":116},{"i":140,"t":"Pluto supports the Sun build system by providing .sun files in the src/ directory, you can use them to build pluto & plutoc: cd src sun pluto sun plutoc Copy The binaries will be placed in the src/ directory. If you wish to use Pluto as a static library in your own projects, simply add the following to your project's .sun file: require ../Pluto/src Copy Assuming a directory structure where your own project and Pluto share the same parent.","s":"Sun","u":"/docs/Getting Started","h":"#sun","p":116},{"i":142,"t":"Pluto offers optional compiler warnings for certain misbehaviors.","s":"Compiler Warnings","u":"/docs/New Features/Compiler Warnings","h":"","p":141},{"i":145,"t":"This is raised when a new local is created with the same name as an existing one. pluto local var = 5 do local var = \"hello\" end Copy file.pluto:3: warning: duplicate local declaration [var-shadow] 3 | local var = \"hello\" | ^^^^^^^^^^^^^^^^^^^ here: this shadows the initial declaration of 'var' on line 1. Copy","s":"var-shadow","u":"/docs/New Features/Compiler Warnings","h":"#var-shadow","p":141},{"i":147,"t":"This is raised when a new local is created with the same name as a global variable. pluto local table = {} Copy file.pluto:1: warning: duplicate global declaration [global-shadow] 1 | local table = {} | ^^^^^^^^^^^^^^^^ here: this shadows the initial global definition of 'table' Copy To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_GLOBAL_SHADOW macro. Furthermore, this only covers the globals 'table', 'string', and 'arg' by default. Integrators can overwrite the PLUTO_COMMON_GLOBAL_NAMES macro to change this list.","s":"global-shadow","u":"/docs/New Features/Compiler Warnings","h":"#global-shadow","p":141},{"i":149,"t":"This is raised when the same field is declared multiple times in a table constructor: pluto local t = { key = \"fruit\", value = \"apple\", value = \"banana\" } Copy file.pluto:4: warning: duplicate table field [field-shadow] 4 | value = \"banana\" | ^^^^^^^^^^^^^^^^ here: this overwrites the value assigned to this field earlier Copy","s":"field-shadow","u":"/docs/New Features/Compiler Warnings","h":"#field-shadow","p":141},{"i":151,"t":"This is raised when the type of an expression doesn't match the hinted type. See Type Hinting. pluto local var: number = 5 var = \"hello\" Copy file.pluto:2: warning: variable type mismatch [type-mismatch] 2 | var = \"hello\" | ^^^^^^^^^^^^^ here: 'var' type-hinted as 'number', but assigned a string value. Copy","s":"type-mismatch","u":"/docs/New Features/Compiler Warnings","h":"#type-mismatch","p":141},{"i":153,"t":"This is raised when a block of code will never be ran. pluto for i = 1, 10 do if i == 5 then continue print(\"message\") end end Copy file.pluto:4: warning: unreachable code [unreachable-code] 4 | print(\"message\") | ^^^^^^^^^^^^^^^^ here: this code comes after an escaping 'continue' statement. Copy","s":"unreachable-code","u":"/docs/New Features/Compiler Warnings","h":"#unreachable-code","p":141},{"i":155,"t":"This is raised when too many arguments are given to a non-vararg function. pluto local function func(a, b, c) end func(1, 2, 3, 4) Copy file.pluto:5: warning: too many arguments [excessive-arguments] 5 | func(1, 2, 3, 4) | ^^^^^^^^^^^^^^^^ here: expected 3 arguments, got 4. Copy","s":"excessive-arguments","u":"/docs/New Features/Compiler Warnings","h":"#excessive-arguments","p":141},{"i":157,"t":"This is raised when the code does something stupid but not quite stupid enough to cause an error. pluto pluto_use * Copy file.pluto:1: warning: 'pluto_use *' is a bad idea because future Pluto versions may add keywords that will break your script [bad-practice] 1 | pluto_use * | ^^^^^^^^^^^ here: consider using 'pluto_use \"0.8.0\"' instead Copy","s":"bad-practice","u":"/docs/New Features/Compiler Warnings","h":"#bad-practice","p":141},{"i":159,"t":"This is raised when the code seems syntactically incorrect. pluto local magic const = 42 Copy file.pluto:1: warning: Possibly mistyped attribute [possible-typo] 1 | local magic const = 42 | ^^^^^^^^^^^^^^^^^^^^^^ here: Did you mean ''? Copy","s":"possible-typo","u":"/docs/New Features/Compiler Warnings","h":"#possible-typo","p":141},{"i":161,"t":"This is raised when the code may not be considered valid by all Pluto environments due to compatibility mode. pluto new exception(\"Not implemented\") Copy file.pluto:1: warning: non-portable keyword usage [non-portable-code] 1 | new exception(\"Not implemented\") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: use 'pluto_new' instead, or 'pluto_use' this keyword: https://pluto.do/compat Copy To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_CODE macro.","s":"non-portable-code","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-code","p":141},{"i":163,"t":"This is raised when a variable name is only valid due to compatibility mode. pluto local class = \"fruit\" Copy file.pluto:1: warning: 'class' is a non-portable name [non-portable-name] 1 | local class = \"fruit\" | ^^^^^^^^^^^^^^^^^^^^^ here: use a different name, or use 'pluto_use' to disable this keyword: https://pluto.do/compat Copy To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_NAME macro.","s":"non-portable-name","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-name","p":141},{"i":165,"t":"This is raised when the code will not run in Lua environments (when compiling Pluto to bytecode). pluto print(\"h\" in \"hello\") Copy file.pluto:1: warning: non-portable operator usage [non-portable-bytecode] 1 | print(\"h\" in \"hello\") | ^^^^^^^^^^^^^^^^^^^^^ here: this operator generates bytecode which is incompatible with Lua. Copy To avoid excessive annoyance, this warning type is off by default. To enable it, scripters can use the compile-time configuration and integrators can define the PLUTO_WARN_NON_PORTABLE_BYTECODE macro.","s":"non-portable-bytecode","u":"/docs/New Features/Compiler Warnings","h":"#non-portable-bytecode","p":141},{"i":167,"t":"This is raised when there's a non-obvious fallthrough in a switch block: pluto local a = 1 switch a do case 1: print(\"Case 1\") case 2: print(\"Case 2\") end Copy file.pluto:5: warning: possibly unwanted fallthrough [unannotated-fallthrough] 5 | case 2: | ^^^^^^^ here: the case on line 3 flows into this case + note: place `--@fallthrough` before this case if this is intended Copy As the warning points out, a @fallthrough annotation can be used to label the fallthrough, in turn silencing the warning: pluto local a = 1 switch a do case 1: print(\"Case 1\") -- @fallthrough case 2: print(\"Case 2\") end Copy","s":"unannotated-fallthrough","u":"/docs/New Features/Compiler Warnings","h":"#unannotated-fallthrough","p":141},{"i":169,"t":"This is raised when the global keyword is enabled and a global was declared without it. See Explicit Globals. pluto pluto_use global a = 1 Copy file.pluto:3: warning: implicit global creation [implicit-global] 3 | a = 1 | ^^^^^ here: prefix this with 'global' if creating a global was intended Copy","s":"implicit-global","u":"/docs/New Features/Compiler Warnings","h":"#implicit-global","p":141},{"i":171,"t":"This is raised when the return value of a function declared was discarded. See Nodiscard Functions. pluto local function add(a, b) return a + b end add(1, 2) Copy file.pluto:5: warning: discarding return value of function declared '' [discarded-return] 5 | add(1, 2) | ^^^^^^^^^ here Copy","s":"discarded-return","u":"/docs/New Features/Compiler Warnings","h":"#discarded-return","p":141},{"i":173,"t":"The state of each warning type can be changed during compile-time and exceptions for certain code can be made.","s":"Compile-time Configuration","u":"/docs/New Features/Compiler Warnings","h":"#compile-time-configuration","p":141},{"i":175,"t":"Warnings have 3 states: 'disable', 'enable', and 'error'. The 'error' state is a more aggressive version of 'enable' that causes compilation to fail if the warning type is raied. To change the state of a warning, write a @pluto_warnings comment with the state and warning type joined by a hyphen (-): pluto local var = 5 do -- @pluto_warnings: disable-var-shadow local var = \"hello\" -- @pluto_warnings: enable-var-shadow end Copy For this, there is also the special type, 'all', which can be used e.g. to enable all warnings except for non-portable-bytecode: pluto -- @pluto_warnings: enable-all, disable-non-portable-bytecode Copy","s":"Changing Warning States","u":"/docs/New Features/Compiler Warnings","h":"#changing-warning-states","p":141},{"i":177,"t":"To disable warnings on a specific line of code, simply put a comment on the line before it with @pluto_warnings: disable-next. pluto local var = 5 do -- @pluto_warnings: disable-next local var = \"hello\" end Copy","s":"Disable Warnings On Line","u":"/docs/New Features/Compiler Warnings","h":"#disable-warnings-on-line","p":141},{"i":179,"t":"Pluto's parser provides some powerful constructs which allow you to write code that will never be seen at runtime.","s":"Compile-Time Evaluation","u":"/docs/New Features/Compile-Time Evaluation","h":"","p":178},{"i":181,"t":"Certain standard library functions can be called at compile-time, as long as the arguments are also known at compile-time, by using the \"$\" symbol before the function call. pluto local runtime = require(\"crypto\").joaat(\"Hello, World!\") local compile = $crypto.joaat(\"Hello, World!\") assert(runtime == compile) Copy If you're unfamiliar with compile-time evaluation, this is essentially what the code turns into: pluto local runtime = require(\"crypto\").joaat(\"Hello, World!\") local compile = 847757641 -- The JOAAT hash of \"Hello, World!\" assert(runtime == compile) Copy This is available on preloaded Pluto libraries, such as: json base32 base58 base64 crypto And on the following functions: tostring utostring tonumber utonumber","s":"Function calls","u":"/docs/New Features/Compile-Time Evaluation","h":"#function-calls","p":178},{"i":183,"t":"Compile-time constant variables can be defined via the $define statement: pluto $define a = 123 Copy This may seem identical to a local declared with the const attribute: pluto local a = 123 Copy However, $define also enforces that the assigned variable is a compile-time constant: pluto local a = {} $define a = {} -- Error: variable was not assigned a compile-time constant value Copy","s":"Variables","u":"/docs/New Features/Compile-Time Evaluation","h":"#variables","p":178},{"i":185,"t":"If there is certain code you only want to have compiled in for a certain build, such as a debug build, you can use compile-time conditionals: pluto $define DEBUG = true $if DEBUG then print(\"Script running in debug mode\") $else print(\"Script running in release mode\") $end Copy In this case, only one of the two paths will be compiled in; the rest will not take up any space.","s":"Conditionals","u":"/docs/New Features/Compile-Time Evaluation","h":"#conditionals","p":178},{"i":187,"t":"During a function declaration, parameters can now declare their own default value. Example Code pluto local function write(text = \"No text provided.\") print(text) end write() --> \"No text provided.\" write(\"Hello!\") --> \"Hello!\" Copy This code behaves identically. pluto local function write(text) if text == nil then text = \"No text provided.\" end print(text) end write() --> \"No text provided.\" write(\"Hello!\") --> \"Hello!\" Copy Try It Yourself​","s":"Default Arguments","u":"/docs/New Features/Default Arguments","h":"","p":186},{"i":189,"t":"Destructuring is a better way to assign local variables from expressions that return a table.","s":"Destructuring","u":"/docs/New Features/Destructuring","h":"","p":188},{"i":191,"t":"Assuming we have this table: pluto local t = { 3, 6, 9 } Copy This is how we would assign each value to variables called a, b, and c using the Lua and Pluto ways: Lua way pluto local a, b, c = table.unpack(t) Copy Pluto way pluto local [a, b, c] = t Copy","s":"Array destructuring","u":"/docs/New Features/Destructuring","h":"#array-destructuring","p":188},{"i":193,"t":"Assuming we have this table: pluto local t = { name = \"John\", age = 42 } Copy This is how we would assign each field to a variable of the same name using the Lua and Pluto ways: Lua way pluto local name = t.name local age = t.age Copy Pluto way pluto local { name, age } = t Copy","s":"Table destructuring","u":"/docs/New Features/Destructuring","h":"#table-destructuring","p":188},{"i":195,"t":"Assuming we have the same table as above, this is how we'd assign the name and age fields to n and a variables, respectively, using the Lua and Pluto ways: Lua way pluto local n = t.name local a = t.age Copy Pluto way pluto local { n = name, a = age } = t Copy","s":"Different variable name","u":"/docs/New Features/Destructuring","h":"#different-variable-name","p":188},{"i":197,"t":"Table destructuring can be used to require multiple standard library modules at once using the '*' module: pluto local { base64, json } = require \"*\" Copy","s":"Standard Library","u":"/docs/New Features/Destructuring","h":"#standard-library","p":188},{"i":199,"t":"The optional global keyword can be used to explicitly declare global variables. To enable it, simply do: pluto pluto_use global Copy Then it can be used like this: pluto global a = 1 Copy Being identical to the following code: pluto a = 1 Copy","s":"Explicit Globals","u":"/docs/New Features/Explicit Globals","h":"","p":198},{"i":201,"t":"When the global keyword is enabled, an 'implicit-global' warning is raised for any globals declared without it: pluto pluto_use global a = 1 Copy file.pluto:3: warning: implicit global creation [implicit-global] 3 | a = 1 | ^^^^^ here: prefix this with 'global' if creating a global was intended Copy","s":"Compiler Warnings","u":"/docs/New Features/Explicit Globals","h":"#compiler-warnings","p":198},{"i":203,"t":"Continue statements, like break, are meant to be used in loops. They skip the current iteration of the loop. They introduce a new keyword, continue. These cannot be used inside switch statements. Example Code pluto -- Print every number besides five. for i = 1, 10 do if i == 5 then continue end print(i) -- continue jumps here. end Copy Try It Yourself​ caution Note, continue will skip code. If any code within your loop will determine if the loop continues, make sure continue doesn't jump over it.","s":"Continue Statement","u":"/docs/New Features/Continue Statement","h":"","p":202},{"i":205,"t":"This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should skip to the end of. The default value is 1, thus skipping to the end of the current loop. Example 1 pluto for i = 1, 10 do -- Loop 1. continue 1 -- This is identical to `continue` without any arguments. end Copy Example 2 pluto for i = 1, 10 do -- Loop 1. for ii = 1, 5 do -- Loop 2. continue 1 -- This will continue from Loop 2. continue 2 -- This will continue from Loop 1. end end Copy","s":"Continue's Only Argument","u":"/docs/New Features/Continue Statement","h":"#continues-only-argument","p":202},{"i":207,"t":"You may need to use pluto_continue instead of continue. Alternatively, pluto_use continue will enable the keyword independently of environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Continue Statement","h":"#using-compatibility-mode","p":202},{"i":209,"t":"The export modifier allows you to automatically aggregate things you want to export into a table. Old Code pluto local version = 2 local function add(a, b) return a + b end return { version = version, add = add } Copy New Code pluto export version = 2 export function add(a, b) return a + b end Copy The return statement is automatically generated at the end of the block, so it is not limited to the top-level function: pluto package.preload[\"test\"] = function() export version = 2 export function add(a, b) return a + b end -- end of scope; 'return' is automatically generated end print(require\"test\".version) Copy","s":"Export Modifier","u":"/docs/New Features/Export Modifier","h":"","p":208},{"i":211,"t":"You may need to use pluto_export instead of export. Alternatively, pluto_use export will enable the keyword independently of environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Export Modifier","h":"#using-compatibility-mode","p":208},{"i":213,"t":"Pluto adds the following syntax: pluto enum MyEnum begin OPTION_1, OPTION_2, OPTION_3 end assert(OPTION_1 == 1) assert(OPTION_2 == 2) assert(OPTION_3 == 3) Copy Enums can start at a base number, and increment from there. pluto enum MyEnum begin OPTION_1 = 0, OPTION_2, OPTION_3 = 5, OPTION_4 end assert(OPTION_1 == 0) assert(OPTION_2 == 1) assert(OPTION_3 == 5) assert(OPTION_4 == 6) Copy Since this enum has a name, we can also access its enumerators with that: pluto assert(MyEnum.OPTION_1 == 0) Copy","s":"Enumerations","u":"/docs/New Features/Enumerations","h":"","p":212},{"i":215,"t":"You can force usage of the ENUM.ENUMERATOR syntax by using 'enum class': pluto enum class MyEnum begin OPTION_1, OPTION_2, OPTION_3 end assert(OPTION_1 == nil) assert(MyEnum.OPTION_1 == 1) Copy","s":"Scoped Enums","u":"/docs/New Features/Enumerations","h":"#scoped-enums","p":212},{"i":217,"t":"When you have a named enum, not only can you get its enumerators, but also reflect upon it with some methods: pluto enum MyEnum begin OPTION_1, OPTION_2, OPTION_3 end for k, v in MyEnum:kvmap() do print(k, v) -- \"OPTION_1 1\" ... end Copy The following methods are available: :names(), :values(), :kvmap(), :vkmap()","s":"Reflection","u":"/docs/New Features/Enumerations","h":"#reflection","p":212},{"i":219,"t":"Enums can also be anonymous: pluto enum begin OPTION_1, OPTION_2, OPTION_3 end assert(OPTION_1 == 1) assert(OPTION_2 == 2) assert(OPTION_3 == 3) Copy","s":"Anonymous Enums","u":"/docs/New Features/Enumerations","h":"#anonymous-enums","p":212},{"i":221,"t":"You may need to use pluto_enum instead of enum. Alternatively, pluto_use enum will enable the keyword independently of environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Enumerations","h":"#using-compatibility-mode","p":212},{"i":223,"t":"When you only want to iterate over the values of a table, you can use Pluto's for-as syntax. New Code pluto local t = { 1, 2, 3, \"hello\", \"world\" } for t as value do print(value) end -- 1 -- 2 -- 3 -- hello -- world Copy That code is identical to this: Old Code pluto local t = { 1, 2, 3, \"hello\", \"world\" } for _, value in t do print(value) end Copy info The bytecode of this feature is only backwards-compatible with Lua when pairs, ipairs, or next is used. See Generalized Iteration.","s":"For-As Loop","u":"/docs/New Features/For-As Loop","h":"","p":222},{"i":225,"t":"Lambda expressions are an alternative way of writing anonymous functions. Lua Way pluto local s1 = \"123\" local s2 = s1:gsub(\".\", function(c) return tonumber(c) + 1 end) print(s2) -- \"234\" Copy Pluto Way pluto local s1 = \"123\" local s2 = s1:gsub(\".\", |c| -> tonumber(c) + 1) print(s2) -- \"234\" Copy Try It Yourself​ As you can see, they take an expression after the arrow, the result of which is implicitly returned. However, lambda expressions can also have full bodies using do...end: pluto local add = |a, b| -> do print($\"Adding {a} and {b} together\") return a + b end Copy They also support all other syntax you would expect of functions, such as type hints and default arguments.","s":"Lambda Expressions","u":"/docs/New Features/Lambda Expressions","h":"","p":224},{"i":227,"t":"The in operator has been extended to support string searches and table searches. For these purposes, it's the fastest possible solution. Searching for a substring. pluto assert(\"world\" in \"hello world\") Copy When used on tables, the in operator searches for values. It'll search for array elements and it'll search keys for their values. Searching a table for a value. pluto local t = { \"a\", \"b\", key = \"value\" } assert(\"a\" in t) -- \"a\" is an element inside of t. assert(\"b\" in t) -- \"b\" is an element inside of t. assert(\"value\" in t) -- \"value\" is the value of a key inside of t. assert(not \"random\" in t) -- \"random\" is not an element OR the value of a key inside of t. Copy","s":"In Expressions","u":"/docs/New Features/In Expressions","h":"","p":226},{"i":229,"t":"The right-hand operand must always be a table or a string. The left-hand operand must be a string if the right-hand operand is a string. The left-hand operand can be anything if the right-hand operand is a table. caution The bytecode of this feature is not backwards-compatible with Lua.","s":"Rules","u":"/docs/New Features/In Expressions","h":"#rules","p":226},{"i":231,"t":"If you have a function that takes varargs and you want them in a table, you'd have to do something like this: pluto function vfunc(...) local args = { ... } for args as arg do print(arg) end end vfunc(\"Hello\") -- \"Hello\" Copy But, with named varargs, it can be as simple as this: pluto function vfunc(...args) for args as arg do print(arg) end end vfunc(\"Hello\") -- \"Hello\" Copy Try It Yourself​","s":"Named Varargs","u":"/docs/New Features/Named Varargs","h":"","p":230},{"i":233,"t":"Instead of positional arguments, you can use the names of arguments you want to set: pluto local function process_file(file, mode = \"r\", version = 1) print($\"Processing {file} with mode '{mode}' and version {version}\") end process_file(file = \"hello.txt\", version = 2) -- \"Processing hello.txt with mode 'r' and version 2\" Copy Try It Yourself​ Note that this example also makes use of default arguments and string interpolation.","s":"Named Arguments","u":"/docs/New Features/Named Arguments","h":"","p":232},{"i":235,"t":"You can use positional arguments for the first few arguments and then use named arguments for the latter ones, for example: pluto local function process_file(file, mode = \"r\", version = 1) print($\"Processing {file} with mode '{mode}' and version {version}\") end process_file(\"hello.txt\", version = 2) -- \"Processing hello.txt with mode 'r' and version 2\" Copy Try It Yourself​","s":"Mixing arguments","u":"/docs/New Features/Named Arguments","h":"#mixing-arguments","p":232},{"i":237,"t":"This feature is implemented entirely in the parser and therefore only works for local functions at the moment.","s":"Limitations","u":"/docs/New Features/Named Arguments","h":"#limitations","p":232},{"i":239,"t":"Functions can be declared nodiscard, causing a warning to be raised when the return value is discarded: pluto local function add(a, b) return a + b end add(1, 2) Copy file.pluto:5: warning: discarding return value of function declared '' [discarded-return] 5 | add(1, 2) | ^^^^^^^^^ here Copy This can also be combined with type hints: pluto local function add(a: number, b: number): number return a + b end Copy info The warning coverage is currently limited to local functions.","s":"Nodiscard Functions","u":"/docs/New Features/Nodiscard Functions","h":"","p":238},{"i":242,"t":"Accessing deeply nested fields which can potentially be nil was problematic, because you'd need an unreasonable amount of guard clauses to prevent an \"attempt to index nil\" error. Pluto now offers this syntax: Basic Usage pluto local person = { name = \"Alice\" } local pet_name = person.pet?.name Copy In this example, person.pet is nil. However, this does not throw an \"attempt to index nil\" error. pet_name is simply set to nil. Practical Usage pluto -- Pretend userConfig is parsed from a JSON file, or something. --- Returning the user's preferred color, or Red if they have no preferred color. local function get_color() return userConfig.colors?.preferred ?? \"Red\" end print(get_color()) Copy In this example, we also use the null coalescing operator ??. info These cannot be used for statements, like a?.b?.c = 0. They're only valid as expressions. Safe Navigation (for member access) was written by Sven Olsen.","s":"For Member Access","u":"/docs/New Features/Safe Navigation","h":"#for-member-access","p":240},{"i":244,"t":"Similarly, if you want to have optional hook functions, you can use safe method calls instead of writing conditionals: Lua Way pluto if self.onEvent then self:onEvent(event) end Copy Pluto Way pluto self:onEvent?(event) Copy You can also check if the left-hand side of : is not nil: pluto object?:onEvent(event) -- 'object' may be nil object?:onEvent?(event) -- 'object' and 'object.onEvent' may be nil Copy Note that this feature will truncate multiple return values if they're not used as part of a fixed assignment: pluto function myfunc() return 1, 2 end local a, b, c = _G:myfunc?() print(a, b, c) --> 1 2 nil print(_G:myfunc?()) --> 1 Copy","s":"For Method Calls","u":"/docs/New Features/Safe Navigation","h":"#for-method-calls","p":240},{"i":246,"t":"You can index strings for their characters now, which is cleaner & 3x faster than using string.sub. String indexing only occurs when you index with an integer, either positive or negative. Positive integers index from the start of the string, and negative integers index from the end. Example Code pluto local str = \"hello world\" print(str[5]) -- \"o\" print(str[200]) -- nil print(str[-1]) -- \"d\" Copy Any character-intensive task — for example, a hash algorithm — will greatly benefit from this. Try It Yourself​ caution The bytecode of this feature is not backwards-compatible with Lua.","s":"String Indexing","u":"/docs/New Features/String Indexing","h":"","p":245},{"i":248,"t":"String interpolation is a simple alternative syntax to concatenation. Concatenation pluto local label = \"meaning of life\" local data = { value = 42 } print(\"The \" .. label .. \" is \" .. data.value) -- \"The meaning of life is 42\" Copy String Interpolation pluto local label = \"meaning of life\" local data = { value = 42 } print($\"The {label} is {data.value}\") -- \"The meaning of life is 42\" Copy Try It Yourself​ As you can see, you declare a string interpolated by prefixing it with the \"$\" symbol. Brackets can contain any expression. The result of expressions will be converted to a string as with normal concatenation, although note that Pluto supports boolean concatenation unlike Lua.","s":"String Interpolation","u":"/docs/New Features/String Interpolation","h":"","p":247},{"i":250,"t":"Switch blocks consists of the following new keywords: case switch default","s":"Switch Blocks","u":"/docs/New Features/Switch Blocks","h":"","p":249},{"i":252,"t":"pluto local value = 1 switch value do case 1: print(\"There is only one!\") break case 2: print(\"There is only two!\") break end -- Break jumps here. Copy Switch statements also support fallthrough. pluto local value = 1 switch value do case 1: case 2: case 3: case 4: case 5: print(\"Got 1-5.\") break default: print(\"Value is greater than 5.\") end -- Break jumps here. Copy In this example, cases 1-4 fall through to case 5. Remember to use break whenever you do not want fallthrough. Here is an example of a potential bug: pluto local value = 1 switch value do case 1: print(\"There is only one!\") case 2: print(\"There is only two!\") end -- Output: -- There is only one! -- There is only two! <-- Uh oh. Copy The default case is executed if none of the other cases are true. For example: pluto local value = 1 switch value do case 2: case 3: break default: print(\"Value is neither 2 nor 3!\") end Copy The default case can be placed anywhere in the block. It also supports fallthrough, so remember to use break if you place it above any cases. Try It Yourself​","s":"Switch Statement","u":"/docs/New Features/Switch Blocks","h":"#switch-statement","p":249},{"i":254,"t":"Any expression can be used for the case condition: pluto switch true do case 42 == 42: print(\"42 is 42 is true\") break end Copy There is a short-hand fallthrough syntax: pluto switch value do case 1, 2, 3: print(\"1-3\") break case 4, 5, 6: print(\"4-6\") break end Copy However, note that method calls needs to be encapsulated with parentheses: pluto local t = { function getVal() return 42 end } switch 42 do case t:getVal(): -- This is interpreted as `case t: getVal():print(\"val is 42\")` print(\"val is 42\") break case (t:getVal()): -- This works as expected print(\"val is 42\") break end Copy","s":"Case Blocks","u":"/docs/New Features/Switch Blocks","h":"#case-blocks","p":249},{"i":256,"t":"Just like ternary expressions, these allow you to conditionally provide values, with massively simplified case blocks: pluto local place = 1 place = switch place do case 1 -> \"1st\" case 2 -> \"2nd\" case 3 -> \"3rd\" default -> $\"{place}th\" end print(place) --> 1st Copy Note that the case blocks here have their conditions delimited by an arrow (->) instead of a colon (:). Try It Yourself​ Despite not being able to manually fall through, the shorthand fallthrough syntax still works: pluto local function print_range(value) print(switch value do case 1, 2, 3 -> \"1-3\" case 4, 5, 6 -> \"4-6\" end) end print_range(1) --> 1-3 print_range(6) --> 4-6 print_range(9) --> nil Copy Notice how the default case was omitted in this example, so it was implicitly set to default -> nil. Try It Yourself​","s":"Switch Expression","u":"/docs/New Features/Switch Blocks","h":"#switch-expression","p":249},{"i":258,"t":"You may need to use pluto_switch instead of switch. Alternatively, pluto_use switch will enable the keyword independently of environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Switch Blocks","h":"#using-compatibility-mode","p":249},{"i":260,"t":"Pluto makes two small changes to numeral parsing.","s":"Numeral Parsing","u":"/docs/New Features/Numeral Parsing","h":"","p":259},{"i":262,"t":"You can add underscores to your numeric literals to make them more readable. Example Code pluto local n = 10_000_000 assert(n == 10000000) Copy These underscores are ignored by the compiler, so they are purely cosmetic.","s":"Cosmetic Underscores","u":"/docs/New Features/Numeral Parsing","h":"#cosmetic-underscores","p":259},{"i":264,"t":"Similar to how Lua allows you to input numbers in hexadecimal: Example Code pluto local n = 0x420 assert(n == 1056) Copy Pluto allows you to input numbers in binary as well: Example Code pluto local n = 0b1000101 assert(n == 69) Copy","s":"Binary Integers","u":"/docs/New Features/Numeral Parsing","h":"#binary-integers","p":259},{"i":266,"t":"Ternary expressions behave identical as to how they would in C. They introduce no new keywords. Old Code pluto local max if a > b then max = a else max = b end Copy New Code pluto local max = a > b ? a : b Copy Try It Yourself​","s":"Ternary Expressions","u":"/docs/New Features/Ternary Expressions","h":"","p":265},{"i":268,"t":"While it is true that you can do something like this: pluto local max = a > b and a or b Copy Keep in mind that this falls apart when the true-expression has a falsy value: pluto local x = -1 x = (x == -1 and nil or x) Copy In this case, x will be -1 despite the intention being to set it to nil. There are no such issues using Pluto's ternary expressions.","s":"Doesn't Lua already have ternaries?","u":"/docs/New Features/Ternary Expressions","h":"#doesnt-lua-already-have-ternaries","p":265},{"i":270,"t":"Pluto makes a plethora of improvements when it comes to object-oriented programming.","s":"Object-Oriented Programming","u":"/docs/New Features/Object-Oriented Programming","h":"","p":269},{"i":272,"t":"A series of methods was otherwise ugly to implement into a Lua table. Old Code pluto local t = {} function t:f1(...) end function t:f2(...) end function t:f3(...) end Copy Now, you can inline these statements inside of your table. New Code pluto local t = { function f1() end, function f2() end, function f3() end } Copy This automatically marks the functions as methods. caution Keep in mind, this produces methods, meaning you'll need to use the colon invocation syntax to avoid positional ambiguities in your parameters.","s":"Method Creation","u":"/docs/New Features/Object-Oriented Programming","h":"#method-creation","p":269},{"i":274,"t":"For consistency with the above syntax, you can use 'static function' to declare non-method functions in your tables: pluto local t = { static function say(msg) print(msg) end } t.say(\"Hello\") -- \"Hello\" Copy Try It Yourself​","s":"Static Functions","u":"/docs/New Features/Object-Oriented Programming","h":"#static-functions","p":269},{"i":276,"t":"Pluto adds an easy way to make instances with the new operator. This operator will also call the __construct method if it exists. pluto local Human = { function __construct(name) self.name = name end } local john = new Human(\"John\") print(john.name) -- John Copy Try It Yourself​ Note that for compatibility with Lua and C API classes, the new operator checks for the existence of a static 'new' function. If it exists, new X(...) will be identical to X.new(...).","s":"New Operator","u":"/docs/New Features/Object-Oriented Programming","h":"#new-operator","p":269},{"i":278,"t":"The class statement is similar to a table constructor, but it does not require commas or semicolons: pluto class Human function __construct(name) self.name = name end function __gc() print(self.name .. \" died of irrelevance\") end end local john = new Human(\"John\") Copy The class statement also supports modifiers: local class NAME, export class NAME","s":"Class Statement","u":"/docs/New Features/Object-Oriented Programming","h":"#class-statement","p":269},{"i":280,"t":"There is also a class expression, which can be used e.g. when assigning to a variable: pluto local Human = class function __construct(name) self.name = name end end Copy","s":"Class Expression","u":"/docs/New Features/Object-Oriented Programming","h":"#class-expression","p":269},{"i":282,"t":"The class statement also supports extends to specify a parent: pluto class Entity age = 1 end class Human extends Entity end local human = new Human() print(human.age) -- 1 Copy This also adds a __parent field to Human. Try It Yourself​","s":"Extends","u":"/docs/New Features/Object-Oriented Programming","h":"#extends","p":269},{"i":284,"t":"The parent expression is a shorthand for self.__parent, which also supports method call syntax, in which case it's a shorthand for self.__parent.METHOD(self, ...). pluto class Entity function __construct(name) self.name = name end end class Human extends Entity -- If we don't define __construct, the parent-constructor would be called automatically. -- However, if we overwrite it, we can use parent:__construct to call it manually. function __construct(name) parent:__construct(name) end end local human = new Human(\"John\") print(human.name) -- \"John\" Copy Note that if you have a local variable (or function parameter) called \"parent\", the parent expression will defer to it. Try It Yourself​","s":"Parent Expression","u":"/docs/New Features/Object-Oriented Programming","h":"#parent-expression","p":269},{"i":286,"t":"Pluto allows you to specify if a field is 'public' or 'private'. Private fields can only be accessed by the class that defined them. pluto class Human public name private age function __construct(name, age) self.name = name self.age = age end function getAge() return self.age end end local human = new Human(\"John\", 42) print(human.name) -- \"John\" print(human:getAge()) -- 42 print(human.age) -- nil Copy Try It Yourself​","s":"Private Fields","u":"/docs/New Features/Object-Oriented Programming","h":"#private-fields","p":269},{"i":288,"t":"Because a common task of __construct methods is to assign the value of arguments to table fields, Pluto provides a simple syntax to reduce this boilerplate: pluto class Human function __construct(public name, private age) end function getAge() return self.age end end local human = new Human(\"John\", 42) print(human.name) -- \"John\" print(human:getAge()) -- 42 print(human.age) -- nil Copy Try It Yourself​","s":"Constructor Promotion","u":"/docs/New Features/Object-Oriented Programming","h":"#constructor-promotion","p":269},{"i":290,"t":"The instanceof operator can be used to check if a table is a class instance, including inherited classes: pluto class Entity end class Human extends Entity end local e = new Entity() local h = new Human() print(e instanceof Entity) -- true print(e instanceof Human) -- false print(h instanceof Entity) -- true (by inheritance) print(h instanceof Human) -- true Copy It can also be used as a function: pluto class Entity end local e = new Entity() print(instanceof(e, Entity)) -- true Copy Try It Yourself​ info Note that, while the instanceof operator generates Lua-compatible bytecode, the instanceof function is a part of Pluto's standard library, and hence unavailable under Lua.","s":"Instanceof Operator","u":"/docs/New Features/Object-Oriented Programming","h":"#instanceof-operator","p":269},{"i":292,"t":"Some of the syntax discussed here may be different due to compatiblity mode: new -> pluto_new class -> pluto_class parent -> pluto_parent Alternatively, pluto_use new, class, parent will enable these keywords independently of environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Object-Oriented Programming","h":"#using-compatibility-mode","p":269},{"i":294,"t":"Pluto provides a more intuitive way to handle errors than pcall and xpcall. pluto local function get_fruit_rating(fruit) return switch fruit do case \"apple\" -> 8 case \"banana\" -> 7 case \"orange\" -> 9 case \"mango\" -> 10 case \"grape\" -> 6 case \"strawberry\" -> 9 case \"cucumber\", \"tomato\" -> error(\"What are you, a botanist?\") end end local function try_get_fruit_rating(fruit) try return get_fruit_rating(fruit) catch e then if e:find(\"What are you, a botanist?\") then return -10 end end end print(try_get_fruit_rating(\"apple\")) --> 8 print(try_get_fruit_rating(\"cucumber\")) --> -10 print(try_get_fruit_rating(\"car\")) --> nil Copy Try It Yourself​","s":"Try-Catch Statement","u":"/docs/New Features/Try-Catch Statement","h":"","p":293},{"i":296,"t":"You may need to use pluto_try and pluto_catch instead. Alternatively, pluto_use try, catch will enable both keywords independently of the environment settings.","s":"Using Compatibility Mode?","u":"/docs/New Features/Try-Catch Statement","h":"#using-compatibility-mode","p":293},{"i":298,"t":"Tables can now be frozen at their current state to forbid any future modification. This action is irreversible and permanent for the lifespan of the table. pluto -- Disallowing any edits to the global environment table. table.freeze(_G) _G.string = {} -- file.pluto:4: attempt to modify frozen table. Copy pluto -- Creating a constant local that's associated with a frozen table. local Frozen = table.freeze({ 1, 2, 3 }) Frozen = {} -- file.pluto:4: attempt to reassign constant. Frozen[1] = \"new value\" -- file.pluto:7: attempt to modify frozen table. rawset(Frozen, \"key\", \"value\") -- file.pluto:10: attempt to modify frozen table. Copy pluto --- Trying to swap the value with the debug library. for i = 1, 249 do local name, value = debug.getlocal(1, i) if name == \"Frozen\" then debug.setlocal(1, i, { [\"key\"] = \"hello world\" }) -- file.pluto:5: attempt to modify local variable with a frozen table. end end Copy","s":"Table Freezing","u":"/docs/New Features/Table Freezing","h":"","p":297},{"i":300,"t":"All modifications to the table from within the Lua environment will be prevented, including those from the debug library. caution If you're going to use this for a sandbox, ensure you call table.freeze before any users can access the Lua environment, otherwise they can replace that function.","s":"What will this prevent?","u":"/docs/New Features/Table Freezing","h":"#what-will-this-prevent","p":297},{"i":302,"t":"Type-hinting looks like this: pluto local var: string = \"hello world\" Copy It works with functions too: pluto local function myfunc(a: string, b: string): number return tonumber(a) + tonumber(b) end print(myfunc(1, \"1\")) -- This will emit a warning for argument type mismatch. Copy There's no effect on performance. This is implemented entirely during the compilation phase.","s":"Type Hinting","u":"/docs/New Features/Type Hinting","h":"","p":301},{"i":304,"t":"string number int float boolean/bool function table userdata void (return type only) Prefix a ? to indicate nil-able types, e.g. ?string indicates that it may be nil or a string. You can also use | to delimit alternatives, e.g. string|int indicates that it may be a string or an int. Putting all of this together, we could also have e.g. ?string|int to indicate that it may be nil, a string, or an int. info This is a WIP feature, and it's very difficult to implement in a one-pass compiler. Allow tolerance for missing coverage, and report any bugs.","s":"What types can I use?","u":"/docs/New Features/Type Hinting","h":"#what-types-can-i-use","p":301},{"i":306,"t":"The pairs and ipairs functions are optimized in Pluto. On a consistent basis, pairs & ipairs loops are 3.5x faster than their Lua counterparts.","s":"For Loops","u":"/docs/Optimizations/For Loops","h":"","p":305},{"i":308,"t":"It doesn't operate under all circumstances though, the state of the iterator is stored in the to-be-closed variable returned by these functions, which is the last variable they give. If you interact or modify this variable, then the optimization won't occur. pairs: next, table, nil, nil ipairs: ipairsaux, table, integer, nil Copy As long as you don't access the last nil value, you're fine. info This optimization was published and implemented entirely by Xmelia Hermit.","s":"How does it work?","u":"/docs/Optimizations/For Loops","h":"#how-does-it-work","p":305},{"i":311,"t":"These operators function the same, but they're more consistent with what's been standardized through programming today. ! is an alias for not, the boolean inversion operator. != is an alias for ~=, the inequality operator.","s":"Operator Aliases","u":"/docs/New Operators","h":"#operator-aliases","p":309},{"i":313,"t":"A plethora of compound operators are available in Pluto: Addition: += Subtraction: -= Multiplication: *= Float division: /= Integer division: //= Modulo: %= Exponent: ^= Bitwise AND: &= Bitwise OR: |= Bitwise XOR: ~= In Lua, the inequality operator cannot be used in statements. It must be used in expressions. Because compound operators can only be used in statements (and cannot be used in expressions), this is not a compatibility break. Bitshift left: <<= Bitshift right: >>= Concatenation: ..= Nil-Coalescing: ??= pluto local a = 1 a = a + 1 a += 1 Copy info Compound operators are syntactic sugar. They'll call the same metamethods as their non-compound counterparts.","s":"Compound Operators","u":"/docs/New Operators","h":"#compound-operators","p":309},{"i":315,"t":"The nil-coalescing operator is helpful for evaluating values against nil. If the left-hand operand is nil, it returns the right-hand operand. Otherwise, it returns the left-hand operand. pluto local function say(message) print(message ?? \"The message was nil.\") end say() --> The message was nil. say(nil) --> The message was nil. say(\"Hello, world!\") --> Hello, world! Copy It's a cleaner version of this code: pluto local function say(message) if message == nil then message = \"The message was nil.\" end print(message) end say() --> The message was nil. say(nil) --> The message was nil. say(\"Hello, world!\") --> Hello, world! Copy You can even use compound assignment: pluto local function say(message) message ??= \"The message was nil.\" print(message) end say() --> The message was nil. say(nil) --> The message was nil. say(\"Hello, world!\") --> Hello, world! Copy info This operator does not implement any metamethods.","s":"Coalescing Operator","u":"/docs/New Operators","h":"#coalescing-operator","p":309},{"i":317,"t":"The Walrus operator allows you to perform assignments inside of conditional expresssions. pluto if a := get_value() then -- 'a' was assigned a truthy value. else -- 'a' was assigned a falsy value. end Copy You can imagine it like this, but note they're not always the same: pluto do local a = get_value() if a then -- 'a' was assigned a truthy value. else -- 'a' was assigned a falsy value. end end Copy Note that for while-loops, it will be executed as many times as the condition: Pluto Way pluto while a := next_value() do -- ... end Copy Lua Way pluto while true do local a = next_value() if not a then break end -- ... end Copy","s":"Walrus Operator","u":"/docs/New Operators","h":"#walrus-operator","p":309},{"i":319,"t":"The spaceship operator, also known as the three-way comparison operator, allows you to quickly compare 2 values for equality and order. pluto local eq = 1 <=> 1 local lt = 3 <=> 42 local gt = 9 <=> 5 print(eq, lt, gt) --> 0, -1, 1 Copy It works with any type that supports __eq and __lt, making it well-suited for usage in generic algorithms like sorting. The return values are designed such that you can compare them to 0, e.g. with the values from above: pluto print(eq <= 0) --> true print(lt <= 0) --> true print(gt <= 0) --> false Copy","s":"Spaceship Operator","u":"/docs/New Operators","h":"#spaceship-operator","p":309},{"i":321,"t":"The pipe operator allows you represent data pipelines more succinctly. pluto local { http, json } = require \"pluto:*\" http.request(\"https://httpbin.org/get\") |> json.decode |> dumpvar |> print --> { --> [\"args\"] = {}, --> [\"headers\"] = { --> [\"Host\"] = string(11) \"httpbin.org\", --> [\"User-Agent\"] = string(56) \"Mozilla/5.0 (compatible; Soup Library; +https://soup.do)\", --> [\"X-Amzn-Trace-Id\"] = string(40) \"Root=1-65e05b66-6aa8b7c94e7580774a804c24\", --> [\"Accept-Encoding\"] = string(13) \"deflate, gzip\", --> }, --> [\"origin\"] = string(13) \"1.2.3.4\", --> [\"url\"] = string(23) \"https://httpbin.org/get\", --> } Copy Try It Yourself​ The HTTP-to-print pipeline here would otherwise be written like this: pluto print(dumpvar(json.decode((http.request(\"https://httpbin.org/get\"))))) Copy Note that the pipe operator only passes on the first return value, which is classically achieved by wrapping the expression in an extra pair of parentheses.","s":"Pipe Operator","u":"/docs/New Operators","h":"#pipe-operator","p":309},{"i":323,"t":"It is also possible to provide additional arguments for the righthand side of the pipe operator: pluto local producer = || -> \"10\" producer() |> tonumber|16| |> print --> 16 Copy Try It Yourself​","s":"Additional Arguments","u":"/docs/New Operators","h":"#additional-arguments","p":309},{"i":325,"t":"There is specialized syntax for method calls with the pipe operator, too: pluto local producer = || -> 21 local obj = { function multiply(value) return value * self.factor end } obj.factor = 2 producer() |> obj:multiply |> print --> 42 Copy Try It Yourself​","s":"Methods Calls","u":"/docs/New Operators","h":"#methods-calls","p":309},{"i":327,"t":"The righthand side of the pipe operator can also be an anonymous function, allowing for more advanced usage like this: pluto local producer = || -> 42 producer() |> |res| -> print($\"The result was {res}\") --> The result was 42 Copy Try It Yourself​","s":"Anonymous Functions","u":"/docs/New Operators","h":"#anonymous-functions","p":309},{"i":329,"t":"Lua implemented a jump table, but it is only compatible with clang and gcc. Pluto has an additional jump table implementation for other compilers; however, it is not enabled by default because it can add minutes to compile time, depending on the setup. However, it may be beneficial to you regardless, as a jump table can increase virtual machine performance by up to 5%. If you would like to try it, define PLUTO_FORCE_JUMPTABLE in luaconf.h or your build config.","s":"Jump Table","u":"/docs/Optimizations/Jump Table","h":"","p":328},{"i":331,"t":"Special arithmetic algorithms are optimized by Pluto during compile-time. For example: x << 1 => x + x x ** 2 => x * x x // 2 => x >> 1 These can offer upwards of a 20% performance boost. These expressions are only optimized when both operands are integers, and no metamethod will be called.","s":"Special Arithmetic","u":"/docs/Optimizations/Special Arithmetic","h":"","p":330},{"i":333,"t":"Pluto will cache the length of a table when you request it for the first time. This cache is refreshed whenever you make an edit to the table. It's still advisable to localize this value though, since looking through the cache and the virtual machine is expensive compared to looking up a local.","s":"Table Length","u":"/docs/Optimizations/Table Length","h":"","p":332},{"i":335,"t":"Pluto allows you to concatenate boolean values just like you would number values: pluto local iVar = 13 local bVar = true print(\"iVar = \" .. iVar) print(\"bVar = \" .. tostring(bVar)) -- Lua way print(\"bVar = \" .. bVar) -- Pluto way Copy","s":"Boolean Concatenation","u":"/docs/QoL Improvements/Boolean Concatenation","h":"","p":334},{"i":337,"t":"Pluto removes the locals limit, allowing you to use compile-time constants, including enums, as much as you want. Note that you are still limited to 255 registers, so you can't have infinite dynamic variables per function.","s":"Removed Locals Limit","u":"/docs/QoL Improvements/Removed Locals Limit","h":"","p":336},{"i":339,"t":"Pluto's virtual machine allows you to simply iterate over tables without having to explicitly call a function: New Code pluto local t = { 1, 2, 3, \"hello\", \"world\" } for key, value in t do print(key, value) end Copy When you omit the function from the loop preparation, next is implicitly inserted. So, that code is identical to this: Old Code pluto local t = { 1, 2, 3, \"hello\", \"world\" } for key, value in next(t) do print(key, value) end Copy This is compatible with for-loop optimizations. caution The bytecode of this feature is not backwards-compatible with Lua.","s":"Generalized Iteration","u":"/docs/QoL Improvements/Generalized Iteration","h":"","p":338},{"i":341,"t":"The parenthesis around some types of expressions are optional now. Gross Way pluto print((\"hello world\"):contains(\"world\")) Copy Clean Way pluto print(\"hello world\":contains(\"world\")) Copy This also works for table types.","s":"Optional Parentheses","u":"/docs/QoL Improvements/Optional Parentheses","h":"","p":340},{"i":343,"t":"Pluto allows you to use reserved tokens such as if from Lua and class from Pluto as identifiers with shorthand table syntax and for goto labels. Reserved tokens as identifiers with shorthand table syntax pluto local t = { class = \"key\" } print(t.class) Copy Reserved tokens as identifiers for goto labels pluto -- Print every number besides five. for i = 1, 10 do if i == 5 then goto continue end print(i) ::continue:: end Copy However, variable names and function calls will not allow you to use reserved tokens as identifiers.","s":"Reserved Identifiers","u":"/docs/QoL Improvements/Reserved Identifiers","h":"","p":342},{"i":345,"t":"Must be included via require.","s":"Base32","u":"/docs/Runtime Environment/Base32","h":"","p":344},{"i":347,"t":"Returns an encoded base32 string. Parameters​ data — A string of data to encode. pad — Whether or not to apply padding. Defaults to true.","s":"base32.encode","u":"/docs/Runtime Environment/Base32","h":"#base32encode","p":344},{"i":349,"t":"Returns a decoded base32 string. Parameters​ data — A string of base32 data to decode.","s":"base32.decode","u":"/docs/Runtime Environment/Base32","h":"#base32decode","p":344},{"i":351,"t":"Must be included via require.","s":"Base64","u":"/docs/Runtime Environment/Base64","h":"","p":350},{"i":353,"t":"Returns a base64-encoded string. Parameters​ data — A string of data to encode. pad — Whether or not to apply padding. Defaults to true. pluto local base64 = require(\"base64\") print(base64.encode(\"Hello, World!\")) --> SGVsbG8sIFdvcmxkIQ== Copy","s":"base64.encode","u":"/docs/Runtime Environment/Base64","h":"#base64encode","p":350},{"i":355,"t":"Returns a decoded base64 string. Parameters​ data — A string of base64 data. pluto local base64 = require(\"base64\") print(base64.decode(\"SGVsbG8sIFdvcmxkIQ==\")) --> Hello, world! Copy","s":"base64.decode","u":"/docs/Runtime Environment/Base64","h":"#base64decode","p":350},{"i":357,"t":"Returns a base64url-encoded string. This variant is sometimes refered to as filename safe base64. Parameters​ data — A string of data to encode. pad — Whether or not to apply padding. Defaults to false. pluto local base64 = require(\"base64\") print(base64.urlencode(\"Hello, World!\")) --> SGVsbG8sIFdvcmxkIQ Copy","s":"base64.urlencode","u":"/docs/Runtime Environment/Base64","h":"#base64urlencode","p":350},{"i":359,"t":"Similar to base64.decode except for base64url. Parameters​ data — A string of base64 data. pluto local base64 = require(\"base64\") print(base64.urldecode(\"SGVsbG8sIFdvcmxkIQ\")) --> Hello, world! Copy","s":"base64.urldecode","u":"/docs/Runtime Environment/Base64","h":"#base64urldecode","p":350},{"i":361,"t":"Must be included via require.","s":"Assert","u":"/docs/Runtime Environment/Assert","h":"","p":360},{"i":363,"t":"Asserts that value is nil Parameters​ value — The value which should be nil. Errors​ An assertion error is thrown if the value is not nil. pluto local assert = require(\"assert\") assert.isnil(nil) -- Passes. assert.isnil(5) -- Error: --[[ test.pluto:4 -> Assertion Error: (assert.isnil) Intended Value: nil Received Value: 5 stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) [C]: in ? --]] Copy","s":"assert.isnil","u":"/docs/Runtime Environment/Assert","h":"#assertisnil","p":360},{"i":365,"t":"Asserts that value is true. Parameters​ value — The value which should be true. Errors​ An assertion error is thrown if value is not true pluto local assert = require(\"assert\") assert.istrue(true) -- Passes. assert.istrue(false) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.istrue) Intended Value: true Received Value: false stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) test.pluto:4: in main chunk [C]: in ? --]] Copy","s":"assert.istrue","u":"/docs/Runtime Environment/Assert","h":"#assertistrue","p":360},{"i":367,"t":"Asserts that value is false. Parameters​ value — The value which should be false. Errors​ An assertion error is thrown if value is not false. pluto local assert = require(\"assert\") assert.isfalse(false) -- Passes. assert.isfalse(true) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.isfalse) Intended Value: false Received Value: true stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) test.pluto:4: in main chunk [C]: in ? --]] Copy","s":"assert.isfalse","u":"/docs/Runtime Environment/Assert","h":"#assertisfalse","p":360},{"i":369,"t":"Asserts that value is a \"falsy\" value. Falsy means the value is nil or false. Parameters​ value — The value which should be falsy. Errors​ An assertion error is thrown if value is not falsy. pluto local assert = require(\"assert\") assert.falsy(nil) -- Passes. assert.falsy(false) -- Passes. assert.falsy(\"Hello, world!\") -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.falsy) Intended Value: nil or false Received Value: string(13) \"Hello, world!\" stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) test.pluto:4: in main chunk [C]: in ? --]] Copy","s":"assert.falsy","u":"/docs/Runtime Environment/Assert","h":"#assertfalsy","p":360},{"i":371,"t":"Asserts that value is a \"truthy\" value. This is the inverse of \"falsy\", a.k.a, any value that isn't nil or false is truthy. Parameters​ value — The value which should be truthy, a.k.a it should not be nil or false. Errors​ An assertion error is thrown if value is not truthy, i.e if value is nil or false. pluto local assert = require(\"assert\") assert.truthy(\"Hello, world!\") -- Passes. assert.truthy(nil) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.truthy) Intended Value: not nil or false Received Value: nil stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) test.pluto:4: in main chunk [C]: in ? --]] Copy","s":"assert.truthy","u":"/docs/Runtime Environment/Assert","h":"#asserttruthy","p":360},{"i":373,"t":"Asserts that value is not nil. Parameters​ value — The value which should not be nil. Errors​ An assertion error is thrown if value is nil. pluto local assert = require(\"assert\") assert.notnil(\"Hello, world!\") -- Passes. assert.notnil(nil) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.notnil) Intended Value: not nil Received Value: nil stack traceback: [C]: in function 'error' [string \"pluto:assert\"]:75: in function <[string \"pluto:assert\"]:46> (...tail calls...) test.pluto:4: in main chunk [C]: in ? --]] Copy","s":"assert.notnil","u":"/docs/Runtime Environment/Assert","h":"#assertnotnil","p":360},{"i":375,"t":"Asserts that value1 is equal to value2. This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step. Parameters​ value1 — The first value. value2 — The second value. Errors​ An assertion error is thrown if value1 does not equal value2. pluto local assert = require(\"assert\") assert.equal(\"Hello, world!\", \"Hello, world...\") -- Error: --[[ pluto: test.pluto:3 -> Assertion Error: (assert.equal) Intended Value: string(13) \"Hello, world!\" Received Value: string(15) \"Hello, world...\" --]] assert.equal(\"Hi there.\":split(\" \"), \"Hello there.\":split(\" \")) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.equal) Intended Value: { [1] = string(2) \"Hi\", [2] = string(6) \"there.\", } Received Value: { [1] = string(5) \"Hello\", [2] = string(6) \"there.\", } --]] Copy","s":"assert.equal","u":"/docs/Runtime Environment/Assert","h":"#assertequal","p":360},{"i":377,"t":"Asserts that value1 is not equal to value2. This function can compare tables, looking at both the table's reference and what's inside it. If the tables aren't exactly the same (meaning they don't reference the same table), the function will go through the contents of the tables and compare them step by step. Parameters​ value1 — The first value. value2 — The second value. Errors​ An assertion error is thrown of value1 does equal value2. pluto local assert = require(\"assert\") assert.nequal(\"Hello, world!\", \"Hi, world!\") -- Passes. assert.nequal(\"Hi there.\":split(\" \"), \"Hello there.\":split(\" \")) -- Passes. Copy","s":"assert.nequal","u":"/docs/Runtime Environment/Assert","h":"#assertnequal","p":360},{"i":379,"t":"Asserts that value1 is less than value2. Parameters​ value1 — The first number. value2 — The second number. Errors​ An assertion error is thrown if value1 is not less than value2. pluto local assert = require(\"assert\") assert.less(1, 2) -- Passes. assert.less(1, 1) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.less) Expression: (1 < 1) == false --]] Copy","s":"assert.less","u":"/docs/Runtime Environment/Assert","h":"#assertless","p":360},{"i":381,"t":"Asserts that value1 is less than or equal to value2. Parameters​ value1 — The first number. value2 — The second number. Errors​ An assertion error is thrown if value1 is not less than or equal to value2. pluto local assert = require(\"assert\") assert.lesseq(1, 2) -- Passes. assert.lesseq(1, 0) -- Error: --[[ pluto: test.pluto:3 -> Assertion Error: (assert.lesseq) Expression: (1 <= 0) == false --]] Copy","s":"assert.lesseq","u":"/docs/Runtime Environment/Assert","h":"#assertlesseq","p":360},{"i":383,"t":"Asserts that value1 is greater than value2. Parameters​ value1 — The first number. value2 — The second number. Errors​ An assertion errros is thrown if value1 is not greater than value2. pluto local assert = require(\"assert\") assert.greater(3, 2) -- Passes. assert.greater(3, 3) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.greater) Expression: (3 > 3) == false --]] Copy","s":"assert.greater","u":"/docs/Runtime Environment/Assert","h":"#assertgreater","p":360},{"i":385,"t":"Asserts that value1 is greater than or equal to value2. Parameters​ value1 — The first number. value2 — The second number. Errors​ An assertion errros is thrown if value1 is not greater than or equal to value2. pluto local assert = require(\"assert\") assert.greatereq(3, 2) -- Passes. assert.greatereq(3, 3) -- Passes. Copy","s":"assert.greatereq","u":"/docs/Runtime Environment/Assert","h":"#assertgreatereq","p":360},{"i":387,"t":"Asserts that callback does not raise an error when called. Parameters​ callback — A function reference. ... — Any other parameters passed to this function will be passed to the callback. Errors​ An assertion error is thrown if callback raises an error. pluto local assert = require(\"assert\") assert.noerror(tostring, 400) -- Passes. assert.noerror(error, \"argument argument\") -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.noerror) An error was raised: argument argument --]] Copy","s":"assert.noerror","u":"/docs/Runtime Environment/Assert","h":"#assertnoerror","p":360},{"i":389,"t":"Asserts that callback does raise an error when called. Parameters​ callback — A function reference. ... — Any other parameters passed to this function will be passed to the callback. Errors​ An assertion error is thrown if callback does not raise an error. pluto local assert = require(\"assert\") assert.haserror(error, \"argument argument\") -- Passes. assert.haserror(tostring, 400) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.haserror) Expected an error, but there was none. --]] Copy","s":"assert.haserror","u":"/docs/Runtime Environment/Assert","h":"#asserthaserror","p":360},{"i":391,"t":"Asserts that callback raises an error, and that substring is present within the error message. Parameters​ substring — The substring that should be inside of the error message. callback — A function reference. ... — Any other parameters passed to this function will be passed to the callback. Errors​ An assertion error is thrown if: callback does not raise an error. callback does raise an error, but the error message does not contain substring. pluto local assert = require(\"assert\") assert.searcherror(\"argument\", error, \"argument argument\") -- Passes. assert.searcherror(\"something\", tostring, 400) -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.searcherror) Expected an error, but there was none. --]] assert.searcherror(\"argument\", error, \"argument argument\") -- Passes. assert.searcherror(\"argument\", error, \"something something\") -- Error: --[[ pluto: test.pluto:4 -> Assertion Error: (assert.searcherror) Absent String: argument Error Message: something s --]] Copy","s":"assert.searcherror","u":"/docs/Runtime Environment/Assert","h":"#assertsearcherror","p":360},{"i":393,"t":"The CaT module is available via require \"pluto:cat\" and provides encoding and decoding for the Colons and Tabs format.","s":"CaT","u":"/docs/Runtime Environment/CaT","h":"","p":392},{"i":395,"t":"Returns a string of CaT. Parameters​ data — The table to encode in CaT. pluto local cat = require \"pluto:cat\" cat.encode { List = { __value = \"With Value\", Child = \"Also With Value\" } } |> io.write --> List: With Value --> Child: Also With Value Copy","s":"cat.encode","u":"/docs/Runtime Environment/CaT","h":"#catencode","p":392},{"i":397,"t":"Returns a table representing the CaT data. Parameters​ data — The CaT data to decode. presentation — How to represent the data as a table. Can be \"flat\", \"flatwithorder\", or \"full\" (default). pluto local cat = require \"pluto:cat\" local data = cat.decode [[ List: With Value Child: Also With Value ]] print(dumpvar(data)) --> { --> [1] = { --> [\"value\"] = string(10) \"With Value\", --> [\"name\"] = string(4) \"List\", --> [\"children\"] = { --> [1] = { --> [\"name\"] = string(5) \"Child\", --> [\"value\"] = string(15) \"Also With Value\", --> }, --> }, --> }, --> } Copy With the default \"full\" representation, the retuned table has an __index metamethod for ease of use: pluto print(data.List.value) --> With Value print(data.List.Child.value) --> Also With Value Copy Alternatively, the other representations are available: pluto local cat = require \"pluto:cat\" print(dumpvar(cat.decode([[ home john hello.txt: Hello, world! ]], \"flat\"))) --> { --> [\"home\"] = { --> [\"john\"] = { --> [\"hello.txt\"] = string(13) \"Hello, world!\", --> }, --> }, --> } Copy pluto local cat = require \"pluto:cat\" print(dumpvar(cat.decode([[ Primary Color: Purple Secondary Color: White ]], \"flatwithorder\"))) --> { --> [\"__order\"] = { --> [1] = string(13) \"Primary Color\", --> [2] = string(15) \"Secondary Color\", --> }, --> [\"Primary Color\"] = string(6) \"Purple\", --> [\"Secondary Color\"] = string(5) \"White\", --> } Copy","s":"cat.decode","u":"/docs/Runtime Environment/CaT","h":"#catdecode","p":392},{"i":399,"t":"Must be included via require.","s":"Bigint","u":"/docs/Runtime Environment/Bigint","h":"","p":398},{"i":401,"t":"To instantiate a bigint, you can call the bigint.new function, or use the new operator. Parameters​ The decimal value of the bigint. pluto local bigint = require \"pluto:bigint\" print(new bigint(\"123\")) --> 123 Copy","s":"bigint.new","u":"/docs/Runtime Environment/Bigint","h":"#bigintnew","p":398},{"i":403,"t":"As seen above, the __tostring metamethod provides a string representation of the Bigint in decimal.","s":"bigint.tostring, __tostring","u":"/docs/Runtime Environment/Bigint","h":"#biginttostring-__tostring","p":398},{"i":405,"t":"Provides a hexadecimal representation of the Bigint. pluto local bigint = require \"pluto:bigint\" print(new bigint(\"420\"):hex()) --> 1A4 Copy","s":"bigint.hex","u":"/docs/Runtime Environment/Bigint","h":"#biginthex","p":398},{"i":407,"t":"Provides a binary representation of the Bigint. pluto local bigint = require \"pluto:bigint\" print(new bigint(\"420\"):binary()) --> 110100100 Copy","s":"bigint.binary","u":"/docs/Runtime Environment/Bigint","h":"#bigintbinary","p":398},{"i":409,"t":"Adds two bigints together. Returns a new bigint.","s":"bigint.add, __add","u":"/docs/Runtime Environment/Bigint","h":"#bigintadd-__add","p":398},{"i":411,"t":"Performs subtraction on two bigints. Returns a new bigint.","s":"bigint.sub, __sub","u":"/docs/Runtime Environment/Bigint","h":"#bigintsub-__sub","p":398},{"i":413,"t":"Performs multiplication on two bigints. Returns a new bigint.","s":"bigint.mul, __mul","u":"/docs/Runtime Environment/Bigint","h":"#bigintmul-__mul","p":398},{"i":415,"t":"Performs division on two bigints. Returns two new bigints: quotient and remainder. pluto local bigint = require \"pluto:bigint\" print(new bigint(10):div(new bigint(3))) --> 3 1 Copy","s":"bigint.div","u":"/docs/Runtime Environment/Bigint","h":"#bigintdiv","p":398},{"i":417,"t":"Performs division on two bigints. Returns a new bigint with the quotient. pluto local bigint = require \"pluto:bigint\" print(new bigint(10) / new bigint(3)) --> 3 Copy","s":"__div","u":"/docs/Runtime Environment/Bigint","h":"#__div","p":398},{"i":419,"t":"Performs divison on two bigints. Returns a new bigint with the remainder. pluto local bigint = require \"pluto:bigint\" print(new bigint(10) % new bigint(3)) --> 1 Copy","s":"bigint.mod, __mod","u":"/docs/Runtime Environment/Bigint","h":"#bigintmod-__mod","p":398},{"i":421,"t":"Performs expontentiation on two bigints. Returns a new bigint. pluto local bigint = require \"pluto:bigint\" print(new bigint(2) ^ new bigint(10)) --> 1024 Copy","s":"bigint.pow, __pow","u":"/docs/Runtime Environment/Bigint","h":"#bigintpow-__pow","p":398},{"i":423,"t":"Returns the position of the most significant set bit as a plain integer. pluto local bigint = require \"pluto:bigint\" print(new bigint(420):bitlength()) --> 9 Copy","s":"bigint.bitlength","u":"/docs/Runtime Environment/Bigint","h":"#bigintbitlength","p":398},{"i":425,"t":"Must be included via require.","s":"Crypto","u":"/docs/Runtime Environment/Crypto","h":"","p":424},{"i":428,"t":"Hash a string using Lua's version of the DJB2 non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.lua(str) == 2871868277) Copy","s":"crypto.lua","u":"/docs/Runtime Environment/Crypto","h":"#cryptolua","p":424},{"i":430,"t":"Hash a string using the MD5 semi-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.md5(str) == \"5eb63bbbe01eeed093cb22bb8f5acdc3\") Copy","s":"crypto.md5","u":"/docs/Runtime Environment/Crypto","h":"#cryptomd5","p":424},{"i":432,"t":"Hash a string using the DJB2 non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.djb2(str) == 894552257) Copy","s":"crypto.djb2","u":"/docs/Runtime Environment/Crypto","h":"#cryptodjb2","p":424},{"i":434,"t":"Hash a string using the FNV1 non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.fnv1(str) == 9065573210506989167) Copy","s":"crypto.fnv1","u":"/docs/Runtime Environment/Crypto","h":"#cryptofnv1","p":424},{"i":436,"t":"Hash a string using the FNV1A non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.fnv1a(str) == 8618312879776256743) Copy","s":"crypto.fnv1a","u":"/docs/Runtime Environment/Crypto","h":"#cryptofnv1a","p":424},{"i":438,"t":"Hash a string using the JOAAT non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.joaat(str) == 1045060183) Copy","s":"crypto.joaat","u":"/docs/Runtime Environment/Crypto","h":"#cryptojoaat","p":424},{"i":440,"t":"Hash a string using the SDBM non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.sdbm(str) == 430867652) Copy","s":"crypto.sdbm","u":"/docs/Runtime Environment/Crypto","h":"#cryptosdbm","p":424},{"i":442,"t":"Hash a string using the CRC32 non-cryptographic hashing algorithm. Parameters​ The string to hash. The initial value for the hash. By default, this is zero. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.crc32(str) == 222957957) Copy","s":"crypto.crc32","u":"/docs/Runtime Environment/Crypto","h":"#cryptocrc32","p":424},{"i":444,"t":"Hash a string using the Adler-32 non-cryptographic hashing algorithm. Parameters​ The string to hash. The initial value for the hash. By default, this is zero. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.adler32(str) == 103547413) Copy","s":"crypto.adler32","u":"/docs/Runtime Environment/Crypto","h":"#cryptoadler32","p":424},{"i":446,"t":"Hash a string using the Lookup3 non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.lookup3(str) == 1252609637) Copy","s":"crypto.lookup3","u":"/docs/Runtime Environment/Crypto","h":"#cryptolookup3","p":424},{"i":448,"t":"Hash a string using the Times33 non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.times33(str) == 3889643616) Copy","s":"crypto.times33","u":"/docs/Runtime Environment/Crypto","h":"#cryptotimes33","p":424},{"i":450,"t":"Hash a string using the Murmur1 non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur1(str) == 3154674178) Copy","s":"crypto.murmur1","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur1","p":424},{"i":452,"t":"Hash a string using the Murmur2 non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur2(str) == 1151865881) Copy","s":"crypto.murmur2","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2","p":424},{"i":454,"t":"Hash a string using the Murmur2A non-cryptographic hashing algorithm. Parameters​ The string to hash. Returns​ An integer between 0 and 0xffffffff, inclusive. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur2a(str) == 2650573207) Copy","s":"crypto.murmur2a","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2a","p":424},{"i":456,"t":"Hash a string using the Murmur64A non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur64a(str) == -3190198453633110066) Copy","s":"crypto.murmur64a","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur64a","p":424},{"i":458,"t":"Hash a string using the Murmur64A non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur64b(str) == 7088720765356542432) Copy","s":"crypto.murmur64b","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur64b","p":424},{"i":460,"t":"Hash a string using the Murmur2Neutral non-cryptographic hashing algorithm. Parameters​ The string to hash. pluto local crypto = require(\"crypto\") local str = \"hello\" assert(crypto.murmur2neutral(str) == 1151865881) Copy","s":"crypto.murmur2neutral","u":"/docs/Runtime Environment/Crypto","h":"#cryptomurmur2neutral","p":424},{"i":463,"t":"Hash a string using the SHA-1 cryptographic hashing algorithm. Parameters​ The string to hash. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false. pluto local crypto = require(\"crypto\") assert(crypto.sha1(\"Pluto\") == \"bce8c9aca4120776fad6b517874aa09c46405454\") assert(crypto.sha1(\"Pluto\", true) == \"\\xbc\\xe8\\xc9\\xac\\xa4\\x12\\x07\\x76\\xfa\\xd6\\xb5\\x17\\x87\\x4a\\xa0\\x9c\\x46\\x40\\x54\\x54\") Copy","s":"crypto.sha1","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha1","p":424},{"i":465,"t":"Hash a string using the SHA-256 cryptographic hashing algorithm. Parameters​ The string to hash. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false. pluto local crypto = require(\"crypto\") assert(crypto.sha256(\"Pluto\") == \"8dad5f6a7dd2dcd8c35ec2fd7babb499bcad60d27d73fe73eca2ce025dfd3b47\") assert(crypto.sha256(\"Pluto\", true) == \"\\x8d\\xad\\x5f\\x6a\\x7d\\xd2\\xdc\\xd8\\xc3\\x5e\\xc2\\xfd\\x7b\\xab\\xb4\\x99\\xbc\\xad\\x60\\xd2\\x7d\\x73\\xfe\\x73\\xec\\xa2\\xce\\x02\\x5d\\xfd\\x3b\\x47\") Copy","s":"crypto.sha256","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha256","p":424},{"i":467,"t":"Hash a string using the SHA-384 cryptographic hashing algorithm. Parameters​ The string to hash. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false. pluto local crypto = require(\"crypto\") assert(crypto.sha384(\"Pluto\", false) == \"db890233a919b6745d632633c419e14540ff79f1a89bc4ac194b00e7f913f0f06d5d4d7d6cc2b4aaf9485d223afb8cf0\") Copy","s":"crypto.sha384","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha384","p":424},{"i":469,"t":"Hash a string using the SHA-512 cryptographic hashing algorithm. Parameters​ The string to hash. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false. pluto local crypto = require(\"crypto\") assert(crypto.sha512(\"Pluto\", false) == \"ee8410a8bf9511b94fd6669b5c3e0c4b86e8e4bf7baa8dbd2773d4d6381dd1aecebbe391bef4c6158620ab3f6b794907652d4432c2301d7e1a6caf520565cdf2\") Copy","s":"crypto.sha512","u":"/docs/Runtime Environment/Crypto","h":"#cryptosha512","p":424},{"i":472,"t":"The crypto.random function uses your operating system's default PRNG. On Linux-based systems, this is /dev/urandom. On Windows, this is BCryptGenRandom. This is a cryptographically-secure PRNG when your system can provide those services. However, if it does not, then this is not cryptographically secure. Either way, it provides good randomness. Parameters​ The minimum value to return. The maximum value to return, as a range. pluto local crypto = require(\"crypto\") assert(crypto.random(1, 10) < 11) Copy","s":"crypto.random","u":"/docs/Runtime Environment/Crypto","h":"#cryptorandom","p":424},{"i":474,"t":"These unauthenticated AES modes take both a key and an IV. The IV must be unique and unpredictable for each encryption session to ensure security.","s":"AES-CBC, AES-CFB","u":"/docs/Runtime Environment/Crypto","h":"#aes-cbc-aes-cfb","p":424},{"i":476,"t":"Parameters​ data — The data to be encrypted. mode — \"aes-cbc-pkcs7\" or \"aes-cfb-pkcs7\" for PKCS#7 padding, or \"aes-cbc\" or \"aes-cfb\" if you know what you're doing. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively. iv — Must have a length of 16.","s":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt","p":424},{"i":478,"t":"Parameters​ data — The ciphertext to decrypt. mode — \"aes-cbc-pkcs7\" or \"aes-cfb-pkcs7\" for PKCS#7 padding, or \"aes-cbc\" or \"aes-cfb\" if you know what you're doing. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively. iv — Must have a length of 16. Returns the decrypted data on success. Throws an error if the padding was incorrect. pluto local crypto = require \"pluto:crypto\" local key = \"A Top Secret Key\" -- Encrypt local iv = range(16):map(|| -> string.char(math.random(0, 255))):concat(\"\") local plain = \"Hello, world!\" local enc = plain |> crypto.encrypt|\"aes-cbc-pkcs7\", key, iv| print(dumpvar(enc)) -- Decrypt print(crypto.decrypt(enc, \"aes-cbc-pkcs7\", key, iv)) --> Hello, world! Copy","s":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt","p":424},{"i":480,"t":"This unauthenticated AES mode takes only a key, and is considered to be the weakest. Identical plaintext blocks result in identical ciphertext blocks.","s":"AES-ECB","u":"/docs/Runtime Environment/Crypto","h":"#aes-ecb","p":424},{"i":482,"t":"Parameters​ data — The data to be encrypted. mode — \"aes-ecb-pkcs7\" for PKCS#7 padding, or \"aes-ecb\" if you know what you're doing. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively.","s":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-1","p":424},{"i":484,"t":"Parameters​ mode — \"aes-ecb-pkcs7\" for PKCS#7 padding, or \"aes-ecb\" if you know what you're doing. data — The ciphertext to decrypt. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively. Returns the decrypted data on success. Throws an error if the padding was incorrect. pluto local crypto = require \"pluto:crypto\" local key = \"A Top Secret Key\" -- Encrypt local plain = \"Hello, world!\" local enc = plain |> crypto.encrypt|\"aes-ecb-pkcs7\", key| print(dumpvar(enc)) --> string(16) \"`p{����k\\21*.>jG\" -- Decrypt print(crypto.decrypt(enc, \"aes-ecb-pkcs7\", key)) --> Hello, world! Copy","s":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-1","p":424},{"i":486,"t":"This authenticated AES mode allows for additional data that will be validated although not encrypted, such as a Message Authentication Code (MAC).","s":"AES-GCM","u":"/docs/Runtime Environment/Crypto","h":"#aes-gcm","p":424},{"i":488,"t":"Parameters​ data — The data to be encrypted. mode — Must be \"aes-gcm\". AES-GCM can deal with unpadded data, hence does not need PKCS#7 padding. aadata — Authenticated data. Will not be encrypted. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively. iv — Must have a length of 16. Returns two strings: the ciphertext and the authentication tag.","s":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-2","p":424},{"i":490,"t":"Parameters​ data — The ciphertext to decrypt. mode — Must be \"aes-gcm\". aadata — Authenticated data. key — Must have a length of 16, 24 or 32 for 128-, 192-, or 256-bit AES, respectively. iv — Must have a length of 16. tag — The authentication tag produced by the \"encrypt\" procedure. Returns the decrypted data on success. Throws an error if authentication or unpadding failed. pluto local crypto = require \"pluto:crypto\" local key = \"A Top Secret Key\" local aadata = \"This is Pluto!\" -- Encrypt local iv = range(16):map(|| -> string.char(math.random(0, 255))):concat(\"\") local plain = \"Hello, world!\" local enc, tag = plain |> crypto.encrypt|\"aes-gcm\", aadata, key, iv| print(dumpvar(enc)) print(dumpvar(tag)) -- Decrypt print(crypto.decrypt(enc, \"aes-gcm\", aadata, key, iv, tag)) --> Hello, world! Copy","s":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-2","p":424},{"i":493,"t":"Parameters​ mode — Must be \"rsa\". bits — A positive integer for a strict bit-length requirement, or a negative integer for a lax requirement. Common values are 1024, 2048, and 4096. Returns two tables: The public key (consisting of n and e), and the private key (consisting of p and q). The Bigint class is used for all values. pluto local pub, priv = crypto.generatekeypair(\"rsa\", 512) print(dumpvar(pub)) --> { --> [\"n\"] = 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357, --> [\"e\"] = 65537, --> } print(dumpvar(priv)) --> { --> [\"p\"] = 115443384115231951475820445136871322101870729500298182134363293112660251666017, --> [\"q\"] = 98365361248415863235179644468056200977592391948608651522703704315152579004021, --> } Copy","s":"crypto.generatekeypair","u":"/docs/Runtime Environment/Crypto","h":"#cryptogeneratekeypair","p":424},{"i":495,"t":"Parameters​ data — The data to be encrypted. mode — \"rsa-pkcs1\" for PKCS#1 padding, or \"rsa\" if you know what you're doing. key — The public or private key to use. Commonly, a public key is used to encrypt data.","s":"crypto.encrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptoencrypt-3","p":424},{"i":497,"t":"Parameters​ data — The ciphertext to decrypt. mode — \"rsa-pkcs1\" for PKCS#1 padding, or \"rsa\" if you know what you're doing. key — The public or private key to use. If the data was encrypted with the public key, the private key is needed to decrypt it. pluto local { base64, bigint, crypto } = require \"pluto:*\" local priv = { p = new bigint(\"115443384115231951475820445136871322101870729500298182134363293112660251666017\"), q = new bigint(\"98365361248415863235179644468056200977592391948608651522703704315152579004021\"), } -- Derive public key local pub = { n = priv.p * priv.q, -- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357 e = new bigint(0x10001) -- 65537 } -- Encrypt local enc = crypto.encrypt(\"A secret message to the owner of the private key.\", \"rsa-pkcs1\", pub) print(base64.encode(enc)) -- Decrypt print(enc |> crypto.decrypt|\"rsa-pkcs1\", priv|) --> A secret message to the owner of the private key. Copy","s":"crypto.decrypt","u":"/docs/Runtime Environment/Crypto","h":"#cryptodecrypt-3","p":424},{"i":499,"t":"Parameters​ data — The data to sign. mode — \"rsa-sha256\" or \"rsa-sha1\". key — The private key to use.","s":"crypto.sign","u":"/docs/Runtime Environment/Crypto","h":"#cryptosign","p":424},{"i":501,"t":"Parameters​ data — The data that was signed. mode — \"rsa-sha256\" or \"rsa-sha1\". key — The public key corresponding to the signer's private key. signature — The signature produced by the \"sign\" procedure. Returns a boolean that indicates if the signature validated successfully. pluto local { base64, bigint, crypto } = require \"pluto:*\" local priv = { p = new bigint(\"115443384115231951475820445136871322101870729500298182134363293112660251666017\"), q = new bigint(\"98365361248415863235179644468056200977592391948608651522703704315152579004021\"), } -- Derive public key local pub = { n = priv.p * priv.q, -- 11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357 e = new bigint(0x10001) -- 65537 } -- Sign local msg = \"The canary has left the nest.\" local sig = msg |> crypto.sign|\"rsa-sha256\", priv| print(base64.encode(sig)) --> un1g04+cwG8WxYDpSlj4PO/hsTqSITgYKycRuR+m3AE6ypLyUCrVHC/0j4M3DeW81ADZVda6TVkC/Ht8EdYeFw== -- Verify print(crypto.verify(msg, \"rsa-sha256\", pub, sig)) --> true Copy","s":"crypto.verify","u":"/docs/Runtime Environment/Crypto","h":"#cryptoverify","p":424},{"i":503,"t":"This page documents the changes & additions to Pluto's runtime environment, which is built on top of Lua 5.4's.","s":"Global & Base","u":"/docs/Runtime Environment/Global & Base","h":"","p":502},{"i":505,"t":"_PVERSION is the global to check your current version of Pluto.","s":"_PVERSION","u":"/docs/Runtime Environment/Global & Base","h":"#_pversion","p":502},{"i":507,"t":"_PSOUP is a global boolean you can access to check linkage with Soup. Always true as of 0.8.0.","s":"_PSOUP","u":"/docs/Runtime Environment/Global & Base","h":"#_psoup","p":502},{"i":509,"t":"os.platform is a global string containing the host platform. Can be \"windows\", \"wasm\", \"linux\", \"macos\", \"android\", or \"unknown\". pluto if _PVERSION == nil then print(\"Plain Lua detected (\".._VERSION..\")\") else io.write(\"Pluto detected (\".._PVERSION..\"), based on \".._VERSION) if os.platform then io.write(\", running on \"..os.platform) end io.write(\"\\n\") end Copy","s":"os.platform","u":"/docs/Runtime Environment/Global & Base","h":"#osplatform","p":502},{"i":511,"t":"package.path is modified to also search for .pluto files.","s":"package.path","u":"/docs/Runtime Environment/Global & Base","h":"#packagepath","p":502},{"i":513,"t":"Tables and coroutines/threads have metatables by default, akin to how each string has a metatable by default. pluto local t = {} local c = coroutine.create(|| -> do end) -- Can do this: t:contains(1) t:concat(\"\\n\") c:resume() -- As opposed to this: table.contains(t, 1) table.concat(t, \"\\n\") coroutine.resume(c) Copy This behavior is implemented by setting the __index metamethod to the respective library (_G.table or _G.coroutine). If you override the metatable, you may want to replicate that.","s":"Default Metatables","u":"/docs/Runtime Environment/Global & Base","h":"#default-metatables","p":502},{"i":515,"t":"A debug function designed to dump values into human-readable formats. Parameters​ The value to dump. Returns​ A string representation of the value. pluto local t = { [\"hello\"] = 1234, [\"goodbye\"] = _G.table, [\"name\"] = \"John\", [\"lastname\"] = \"Doe\", [\"details\"] = { \"No details available.\" } } print(dumpvar(t)) Copy { [\"lastname\"] = string(3) \"Doe\", [\"name\"] = string(4) \"John\", [\"goodbye\"] = { [\"unpack\"] = function: 00007FF7738B3C20, [\"insert\"] = function: 00007FF7738B30D0, [\"freeze\"] = function: 00007FF7738B43F0, [\"foreach\"] = function: 00007FF7738B3220, [\"filter\"] = function: 00007FF7738B4700, [\"isfrozen\"] = function: 00007FF7738B44B0, [\"getn\"] = function: 00007FF7738B43B0, [\"pack\"] = function: 00007FF7738B3B10, [\"contains\"] = function: 00007FF7738B4540, [\"move\"] = function: 00007FF7738B34D0, [\"concat\"] = function: 00007FF7738B37F0, [\"sort\"] = function: 00007FF7738B42B0, [\"remove\"] = function: 00007FF7738B33C0, [\"map\"] = function: 00007FF7738B49A0, }, [\"hello\"] = 1234, [\"details\"] = { [1] = string(21) \"No details available.\", }, } Copy","s":"dumpvar","u":"/docs/Runtime Environment/Global & Base","h":"#dumpvar","p":502},{"i":517,"t":"Similar to dumpvar, but returns valid Lua/Pluto code. May error if the value can not be represented accordingly. Parameters​ The value to dump. pluto -- Slightly altered data from last example as C functions can not be exported. local t = { [\"hello\"] = 1234, [\"name\"] = \"John\", [\"lastname\"] = \"Doe\", [\"details\"] = { \"No details available.\" } } print(exportvar(t)) Copy { [\"hello\"] = 1234, [\"name\"] = \"John\", [\"details\"] = { [1] = \"No details available.\", }, [\"lastname\"] = \"Doe\", } Copy","s":"exportvar","u":"/docs/Runtime Environment/Global & Base","h":"#exportvar","p":502},{"i":519,"t":"Returns a table of numbers in the given range. pluto print(range(10):unpack()) --> 1 2 3 4 5 6 7 8 9 10 print(range(4, 8):unpack()) --> 4 5 6 7 8 Copy","s":"range","u":"/docs/Runtime Environment/Global & Base","h":"#range","p":502},{"i":521,"t":"Performs a three-way comparison on 2 version numbers, similar to the Spaceship Operator. pluto assert(compareversions(\"1.0.0\", \"0.9.0\") >= 0) assert(compareversions(\"1.0.0\", \"1.0.0-dev\") >= 0) Copy Note that pre-release versions (e.g. with -dev suffix) are considered to be less than their final counterparts.","s":"compareversions","u":"/docs/Runtime Environment/Global & Base","h":"#compareversions","p":502},{"i":523,"t":"Calls the given function and returns a string of warnings raised by it. pluto local w = wcall(|| -> warn(\"Bad!\")) print(w ~= \"\" ? (w:strip()) : \"No warnings\") -- Output: \"Bad!\" Copy","s":"wcall","u":"/docs/Runtime Environment/Global & Base","h":"#wcall","p":502},{"i":525,"t":"This page documents the changes & additions to the coroutine library in Pluto, which is built on top of Lua 5.4's.","s":"Coroutine","u":"/docs/Runtime Environment/Coroutine","h":"","p":524},{"i":527,"t":"An alternative to coroutine.resume that rethrows any errors thrown by the coroutine.","s":"coroutine.xresume","u":"/docs/Runtime Environment/Coroutine","h":"#coroutinexresume","p":524},{"i":529,"t":"Yields the current coroutine for the given number of milliseconds. Parameters​ The number of milliseconds to yield for.","s":"coroutine.sleep","u":"/docs/Runtime Environment/Coroutine","h":"#coroutinesleep","p":524},{"i":531,"t":"The exception class makes errors easier to parse with where and what members, as opposed to having a string with both. For ease of use, constructing an exception automatically throws it. pluto try new exception(\"Not implemented\") catch e then print(e) -- same as error(\"Not implemented\") print(e.what) print(e.where) end Copy Output: script.pluto:2: Not implemented Not implemented script.pluto:2 Copy Try It Yourself​","s":"Exception","u":"/docs/Runtime Environment/Exception","h":"","p":530},{"i":533,"t":"Must be included via require.","s":"HTTP","u":"/docs/Runtime Environment/HTTP","h":"","p":532},{"i":535,"t":"Performs an HTTP request. Parameters​ The URL to send a request to as a string. This parameter is optional in the sense that the options table (parameter 2) can be parameter 1 instead, but must have the \"url\" option then. The table of options. This parameter is optional if a URL was given. Options​ method: The HTTP request method to use. Defaults to GET. headers: A table of headers, e.g. { [\"Content-Type\"] = \"application/json\" }. body: An optional request payload. If provided, the Content-Length header is set appropriately, and the method is set to POST unless otherwise specified. prefer_ipv6: (Does nothing in WASM builds of Pluto.) When establishing a new connection, we attempt to lookup and connect via IPv4, retrying with IPv6 if needed. If this is set to true, we instead start with IPv6. This may be useful for \"LAN\" services that identify the LAN via IPv6 instead of IPv4. dont_reuse: (Does nothing in WASM builds of Pluto.) Force the implementation not to reuse an existing socket, which may involve waiting. Instead a new connection is opened. This may be useful when many requests are headed to the same remote and you consider the time taken by a fresh handshake to be less than the time taken to wait to reuse. dont_make_reusable: (Does nothing in WASM builds of Pluto.) If a new connection to the remote was opened to carry out the request, close it again after the request. This is useful to avoid burdening the remote for one-off requests. Returns​ On success: The response body as a string. The status code as an integer. A table of response headers. Empty in WASM builds of Pluto. The status text as a string. On failure: Nil. An approximate failure reason as an English string. Not available in WASM builds of Pluto. Multitasking​ If called inside of a coroutine, this function yields. Otherwise, it blocks. In WASM builds of Pluto, it must be called inside of a coroutine that yields to the environment as otherwise the request cannot be dispatched. info The first request to a remote may take a while — especially with HTTPS — due to the TCP and TLS handshakes. We use keep-alive to keep the connection open, so subsequent requests to the same remote will be significantly faster. pluto local http = require \"pluto:http\" local body, status_code, headers, status_text = http.request(\"https://httpbin.org/anything\") print(status_code..\" \"..status_text) if os.platform != \"wasm\" then print(dumpvar(headers)) end print(body) Copy Try It Yourself​","s":"http.request","u":"/docs/Runtime Environment/HTTP","h":"#httprequest","p":532},{"i":537,"t":"Queries if a keep-alive connection is available for a remote. This function is not available in WASM builds of Pluto. Parameters​ A partial URL identifying the remote. Partial because only the protocol, host, and port are used; additional components such as path are ignored. Multitasking​ If called inside of a coroutine, this function may yield. Otherwise, it may block. pluto local { http, scheduler } = require \"*\" local sched = new scheduler() sched:addloop(function() print(http.hasconnection(\"https://httpbin.org\")) end) sched:add(function() print((http.request(\"https://httpbin.org/anything\"))) end) sched:run() Copy","s":"http.hasconnection","u":"/docs/Runtime Environment/HTTP","h":"#httphasconnection","p":532},{"i":539,"t":"Closes all keep-alive connections like when closing the Lua state but in a non-blocking way. This function does nothing in WASM builds of Pluto. Multitasking​ This function must be called inside of a coroutine, as it will yield.","s":"http.closeconnections","u":"/docs/Runtime Environment/HTTP","h":"#httpcloseconnections","p":532},{"i":541,"t":"This page documents the changes & additions to the io library in Pluto, which is built on top of Lua 5.4's.","s":"IO","u":"/docs/Runtime Environment/IO","h":"","p":540},{"i":543,"t":"A variant of Lua's os.rename that raises an error on failure and instead has no return values.","s":"io.rename","u":"/docs/Runtime Environment/IO","h":"#iorename","p":540},{"i":545,"t":"A variant of Lua's os.remove that raises an error on failure and instead has no return values.","s":"io.remove","u":"/docs/Runtime Environment/IO","h":"#ioremove","p":540},{"i":547,"t":"Copy a file to another file, creating a new file if needed. Parameters​ A string path or file stream. A path towards the file to copy into. Returns​ A boolean indicating if the file was successfully copied. pluto if io.copy(\"./cfg/config.txt\", \"./backup_cfg/config.txt\") then print(\"Successfully created a backup config!\") else print(\"Failed to create a backup config.\") end Copy","s":"io.copy","u":"/docs/Runtime Environment/IO","h":"#iocopy","p":540},{"i":549,"t":"Extracts the given part from a path. Parameters​ A string path or file stream. The part to return, \"parent\" or \"name\". Returns​ The extracted part. pluto print(io.part(\"/path/to/foo.txt\", \"parent\")) -- \"/path/to\" print(io.part(\"/path/to/foo.txt\", \"name\")) -- \"foo.txt\" Copy","s":"io.part","u":"/docs/Runtime Environment/IO","h":"#iopart","p":540},{"i":551,"t":"Parameters​ A string path or file stream. Returns​ A boolean indicating if the path led toward a directory. pluto local path = \"./dir/main/\" local bool = io.isdir(path) if bool then print(\"Directory!\") else print(\"Not a directory!\") end Copy","s":"io.isdir","u":"/docs/Runtime Environment/IO","h":"#ioisdir","p":540},{"i":553,"t":"Parameters​ A string path or file stream. Returns​ A boolean indicating if the path led towards a file. pluto local path = \"./isfile/file\" local bool = io.isfile(path) if bool then print(\"File!\") else print(\"Not a file!\") end Copy","s":"io.isfile","u":"/docs/Runtime Environment/IO","h":"#ioisfile","p":540},{"i":555,"t":"Parameters​ A string path or file stream. Returns​ A boolean indicating if the path led towards an existing file or directory. pluto if io.exists(\"cfg/config.txt\") then print(\"Config exists!\") else print(\"Config does not exist!\") end Copy","s":"io.exists","u":"/docs/Runtime Environment/IO","h":"#ioexists","p":540},{"i":557,"t":"Create a directory. Parameters​ The path for the new directory. Returns​ A boolean indicating if the directory was successfully created. pluto if io.makedir(\"./cfg\") then print(\"Created cfg directory.\") else print(\"Failed to create cfg directory.\") end Copy","s":"io.makedir","u":"/docs/Runtime Environment/IO","h":"#iomakedir","p":540},{"i":559,"t":"List all the files within a directory. Parameters​ A string path to the directory. A boolean indicating whether or not to recurse sub-directories. Returns​ An index-based table containing file paths. pluto for _, filepath in io.listdir(\".\") do print(filepath) end Copy","s":"io.listdir","u":"/docs/Runtime Environment/IO","h":"#iolistdir","p":540},{"i":561,"t":"Creates a directory and all the non-existing parent directories in the given path. Parameters​ The string path for your new directory. pluto io.makedirs(\"A/B/C\") -- Creates \"C:\\Users\\Username\\Desktop\\Project\\A\\B\\C\" Copy","s":"io.makedirs","u":"/docs/Runtime Environment/IO","h":"#iomakedirs","p":540},{"i":563,"t":"Convert a relative path into an absolute one. Parameters​ A string path or file stream. An optional bool if the path should be canonicalized. A canonical path does not go through symlinks. Returns​ A string representing the new file path. pluto io.absolute(\"cfg/cfg.txt\") -- \"C:\\Users\\Username\\Desktop\\Project\\cfg\\cfg.txt\" Copy","s":"io.absolute","u":"/docs/Runtime Environment/IO","h":"#ioabsolute","p":540},{"i":565,"t":"Convert an absolute path into a relative one. Parameters​ A string path or file stream. Returns​ A string representing the new file path. pluto io.relative(io.absolute(\"cfg/cfg.txt\")) -- \"cfg\\cfg.txt\" Copy","s":"io.relative","u":"/docs/Runtime Environment/IO","h":"#iorelative","p":540},{"i":567,"t":"Get or set a file's contents. Parameters​ A string path or file stream. The desired content. If this parameter is absent, this function works as a getter. Returns​ If this function is acting as a getter, it will return the file's contents or nil if there was an error. pluto local text = io.contents(\"foo.txt\") or \"\" text ..= \"bar\" io.contents(\"foo.txt\", text) Copy This function is not only easier to use than the traditional io.open approach, it also performs significantly better.","s":"io.contents","u":"/docs/Runtime Environment/IO","h":"#iocontents","p":540},{"i":569,"t":"Fetch the size of a file in bytes. Parameters​ A string path or file stream. pluto if io.filesize(\"cfg/config.txt\") <= 1 then print(\"Config is too small or empty.\") end Copy","s":"io.filesize","u":"/docs/Runtime Environment/IO","h":"#iofilesize","p":540},{"i":571,"t":"Get or set a file's modification time. Parameters​ A string path or file stream. The desired timestamp. If this parameter is absent, this function works as a getter. Returns​ If this function is acting as a getter, it will return the file's last write time as seconds since the UNIX epoch. pluto local time = io.writetime(\"foo.txt\") time += 3600 io.writetime(\"foo.txt\", time) Copy This example adds an hour (= 60 minutes = 3600 seconds) to the last write time of \"foo.txt\" (or errors if that file does not exist).","s":"io.writetime","u":"/docs/Runtime Environment/IO","h":"#iowritetime","p":540},{"i":573,"t":"Get or set the current working directory. Parameters​ A path to the desired current working directory. If this parameter is absent, this function works as a getter. Returns​ If this function is acting as a getter, it will return the current working directory. pluto local cwd = io.currentdir() -- Get cwd io.currentdir(\"abc/abc\") -- Set a new cwd Copy","s":"io.currentdir","u":"/docs/Runtime Environment/IO","h":"#iocurrentdir","p":540},{"i":575,"t":"This page documents the changes & additions to the math library in Pluto, which is built on top of Lua 5.4's.","s":"Math","u":"/docs/Runtime Environment/Math","h":"","p":574},{"i":577,"t":"Checks if a number is NaN. Parameters​ The number to check. pluto local x = 0 / 0 print(x ~= x) -- Lua way: Prove the variable is NaN because it is not equal to itself. Works, but unintuitive. print(math.isnan(x)) Copy","s":"math.isnan","u":"/docs/Runtime Environment/Math","h":"#mathisnan","p":574},{"i":579,"t":"Rounds a number to the nearest integer. Parameters​ The number to round. pluto print(math.round(2.4)) --> 2 print(math.round(2.5)) --> 3 Copy","s":"math.round","u":"/docs/Runtime Environment/Math","h":"#mathround","p":574},{"i":581,"t":"An alias of math.atan.","s":"math.atan2","u":"/docs/Runtime Environment/Math","h":"#mathatan2","p":574},{"i":583,"t":"The messages for syntax errors are enhanced. They include tailored messages and code snippets, which should help newer programmers identify problems quicker. It's not a game changer, but it's neat.","s":"Syntax Errors","u":"/docs/QoL Improvements/Syntax Errors","h":"","p":582},{"i":585,"t":"Problematic Code pluto if a < b and t == 5 return \"Gottem\" end Copy Emitted Syntax Error syntax error: file.pluto:1: expected 'then' to delimit condition. 1 | if a < b and t == 5 return \"Gottem\" end | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: expected 'then' symbol. Copy","s":"Example 1","u":"/docs/QoL Improvements/Syntax Errors","h":"#example-1","p":582},{"i":587,"t":"Problematic Code pluto local fn = |a, b, c| => (a == b and a < c) Copy Emitted Syntax Error syntax error: file.pluto:1: impromper lambda definition 1 | local fn = |a, b, c| => (a == b and a < c) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here: expected '->' arrow syntax for lambda expression. Copy","s":"Example 2","u":"/docs/QoL Improvements/Syntax Errors","h":"#example-2","p":582},{"i":589,"t":"These errors support coloring, but it's disabled by default. Define the PLUTO_USE_COLORED_OUTPUT macro in luaconf.h or your build config to enable colored error messages. tip For Windows users, you can enable ANSI coloring support with the following command: REG ADD HKCU\\CONSOLE /f /v VirtualTerminalLevel /t REG_DWORD /d 1","s":"ANSI Coloring","u":"/docs/QoL Improvements/Syntax Errors","h":"#ansi-coloring","p":582},{"i":591,"t":"Must be included via require.","s":"JSON","u":"/docs/Runtime Environment/JSON","h":"","p":590},{"i":593,"t":"Returns a string of JSON. Parameters​ data — A boolean, number, string, or table to encode as JSON. pretty — Whether to return a human-readable string of JSON. Defaults to false. pluto local json = require(\"json\") local data data = \"Hello, World!\" print(json.encode(data, true)) --> \"Hello, World!\" data = { key = \"Hello, World!\", nested = { nested_key = 1337 } } print(json.encode(data, true)) --> { --> \"key\": \"Hello, World!\", --> \"nested\": { --> \"nested_key\": 1337 --> } --> } Copy Because Lua tables do not have order guarantees, you can add an __order field to fix the order: pluto local t = { __order = { \"a\", \"b\", \"c\" }, a = 1, b = 2, c = 3 } print(require\"json\".encode(t)) -- {\"a\":1,\"b\":2,\"c\":3} Copy The json.null value — assuming you did local json = require(\"json\") — can be used to encode JSON null values. pluto local json = require(\"json\") print(json.encode(json.null)) --> null Copy","s":"json.encode","u":"/docs/Runtime Environment/JSON","h":"#jsonencode","p":590},{"i":595,"t":"Returns multiple potential types. If you pass a serialized boolean, number, or string, then it will return the same type. If you pass a complex JSON object, it will return a table. Parameters​ data — The JSON data to decode. flags — Options to augment the return value. Multiple options can be combined with bitwise OR (|). Defaults to 0. json.withnull — decodes JSON null values as json.null instead of nil. json.withorder — adds an __order field to tables of decoded JSON objects. json.encode respects this, so this is perfect for modifying data while preserving order. pluto local json = require(\"json\") local data, encoded, decoded -- Basic Type data = \"Hello, World!\" encoded = json.encode(data, true) decoded = json.decode(encoded) assert(decoded == data) assert(type(decoded) == \"string\") -- Complex Type data = { key = \"Hello\", nested = { nested_key = 1337 } } encoded = json.encode(data, true) decoded = json.decode(encoded) assert(decoded.key == \"Hello\") assert(type(decoded) == \"table\") assert(decoded.nested.nested_key == 1337) -- Flags encoded = [[{ \"null\": null, \"string\": \"Hello\" }]] decoded = json.decode(encoded, json.withnull | json.withorder) assert(decoded.__order[1] == \"null\") assert(decoded.null == json.null) assert(json.encode(decoded, true) == encoded) Copy","s":"json.decode","u":"/docs/Runtime Environment/JSON","h":"#jsondecode","p":590},{"i":597,"t":"This page documents the changes & additions to the os library in Pluto, which is built on top of Lua 5.4's.","s":"OS","u":"/docs/Runtime Environment/OS","h":"","p":596},{"i":599,"t":"Parameters​ The amount of milliseconds to sleep for. Example​ pluto os.sleep(1000) -- Pause this thread for 1000ms. Copy","s":"os.sleep","u":"/docs/Runtime Environment/OS","h":"#ossleep","p":596},{"i":601,"t":"All of these return their respective times since implementation-specific epoch.","s":"os.nanos, os.micros, os.millis, os.seconds","u":"/docs/Runtime Environment/OS","h":"#osnanos-osmicros-osmillis-osseconds","p":596},{"i":603,"t":"Returns seconds since UNIX epoch.","s":"os.unixseconds","u":"/docs/Runtime Environment/OS","h":"#osunixseconds","p":596},{"i":605,"t":"Must be included via require. This library is not available in WASM builds of Pluto.","s":"Socket","u":"/docs/Runtime Environment/Socket","h":"","p":604},{"i":607,"t":"Establishes a TCP connection. Parameters​ The host to connect to. Either an IPv4 or IPv6 address, or a domain name resolving to one. The port to contact the host on. Returns​ A socket instance on success. Nil on failure. Multitasking​ If called inside of a coroutine, this function yields. Otherwise, it blocks.","s":"socket.connect","u":"/docs/Runtime Environment/Socket","h":"#socketconnect","p":604},{"i":609,"t":"Creates a new listener for the given port. Parameters​ The port to listen on. Returns​ A listener instance on success. Nil on failure.","s":"socket.listen","u":"/docs/Runtime Environment/Socket","h":"#socketlisten","p":604},{"i":611,"t":"A convenience function that wraps socket.listen, automatically accepting new clients and spinning up a coroutine for them. Parameters​ A scheduler instance. The port to listen on. The callback function that will be called in a new coroutine for each client socket. pluto local { scheduler, socket } = require \"*\" local sched = new scheduler() socket.bind(sched, 80, |s| -> do local content = \"Hello, world!\" s:send(\"HTTP/1.1 200 OK\\r\\nConnection: Close\\r\\nContent-Length: \"..#content..\"\\r\\n\\r\\n\"..content) end) sched:run() Copy","s":"socket.bind","u":"/docs/Runtime Environment/Socket","h":"#socketbind","p":604},{"i":613,"t":"Socket instances are obtained by calling socket.connect (client), or from a listener (server).","s":"Socket Class","u":"/docs/Runtime Environment/Socket","h":"#socket-class","p":604},{"i":615,"t":"Sends data on a socket. Parameters​ The socket instance. The data to send.","s":"socket.send","u":"/docs/Runtime Environment/Socket","h":"#socketsend","p":604},{"i":617,"t":"Receive data from a socket. Parameters​ The socket instance. Returns​ If the socket is open: The oldest chunk of data received on the transport layer (TCP packet) or crypto layer (TLS record) as a string. If the socket is closed: Nil. Multitasking​ If a message is buffered, the function can return immediately. If not, it will yield if inside a coroutine, and block otherwise. pluto local socket = require \"pluto:socket\" local s = socket.connect(\"google.com\", 80) s:send(\"GET / HTTP/1.1\\r\\nHost: google.com\\r\\n\\r\\n\") print(s:recv()) Copy","s":"socket.recv","u":"/docs/Runtime Environment/Socket","h":"#socketrecv","p":604},{"i":619,"t":"Pushes a chunk of data to the front of the receive buffer, making it oldest for the purposes of socket.recv. Parameters​ The socket instance. The data to push. pluto local socket = require \"pluto:socket\" local sock = socket.connect(\"google.com\", 80) sock:unrecv(\"World\") sock:unrecv(\"Hello\") print(sock:recv()) --> Hello print(sock:recv()) --> World Copy","s":"socket.unrecv","u":"/docs/Runtime Environment/Socket","h":"#socketunrecv","p":604},{"i":621,"t":"Attempts to add the TLS crypto layer to the socket, making the transport layer a sole carrier for TLS traffic. Parameters​ The socket instance. The host name of the intended remote. This may be the same as what was passed to socket.connect. This name must be on the certificate that the remote will send. Returns​ True on success. On failure, returns false and the socket is closed. If the socket is already using TLS, returns nil. Multitasking​ If called inside of a coroutine, this function yields. Otherwise, it blocks. pluto local socket = require \"pluto:socket\" local s = socket.connect(\"pluto-lang.org\", 443) assert(s:starttls(\"pluto-lang.org\"), \"Failed to establish secure connection.\") s:send(\"GET / HTTP/1.1\\r\\nHost: pluto-lang.org\\r\\nConnection: close\\r\\n\\r\\n\") while data := s:recv() do print(data) end Copy","s":"socket.starttls","u":"/docs/Runtime Environment/Socket","h":"#socketstarttls","p":604},{"i":623,"t":"Closes a socket. Parameters​ The socket instance.","s":"socket.close","u":"/docs/Runtime Environment/Socket","h":"#socketclose","p":604},{"i":625,"t":"Listener instances are obtained by calling socket.listen.","s":"Listener Class","u":"/docs/Runtime Environment/Socket","h":"#listener-class","p":604},{"i":627,"t":"Accepts an incoming client connection, waiting until there is one. Returns​ A new socket instance. The socket can be used as per usual, with the exception of the starttls function being unavailable. Multitasking​ If there is an incoming client connection, this function returns immediately. If there is not, it waits for one. Waiting means yielding if called inside a coroutine, and blocking otherwise.","s":"accept","u":"/docs/Runtime Environment/Socket","h":"#accept","p":604},{"i":629,"t":"Checks if there is an incoming client connection. If this function returns true, the next call to accept is guaranteed not to block or yield. pluto local socket = require \"pluto:socket\" local l = socket.listen(80) or error(\"Failed to bind TCP/80\") while not l:hasconnection() do -- Visit http://localhost to break this loop os.sleep(1) end print(l:accept():recv()) Copy","s":"hasconnection","u":"/docs/Runtime Environment/Socket","h":"#hasconnection","p":604},{"i":631,"t":"This page documents the changes & additions to the string library in Pluto, which is built on top of Lua 5.4's.","s":"String","u":"/docs/Runtime Environment/String","h":"","p":630},{"i":633,"t":"This function now takes a second parameter that specifies which index to capitalize. pluto local s = \"hello\" assert(s:upper(1) == \"Hello\") Copy","s":"string.upper","u":"/docs/Runtime Environment/String","h":"#stringupper","p":630},{"i":635,"t":"This function now takes a second parameter that specifies which index to make lowercase. pluto local s = \"HELLO\" assert(s:lower(1) == \"hELLO\") Copy","s":"string.lower","u":"/docs/Runtime Environment/String","h":"#stringlower","p":630},{"i":637,"t":"Splits a string by a separator. Parameters​ The string to split. The separator to split a string by. This can be any string. Returns​ A table. Splitting a string by a single character. pluto local s = \"hello world, how is everyone doing?\" local r = string.split(s, \" \") --[[ The value of 'r': { \"hello\", \"world,\", \"how\", \"is\", \"everyone\", \"doing?\" } --]] Copy Splitting a string by a substring. pluto local s = \"helloHALLOWORLDworld,HALLOWORLDhowHALLOWORLDisHALLOWORLDeveryoneHALLOWORLDdoing?\" local r = string.split(s, \"HALLOWORLD\") --[[ The value of 'r': { \"hello\", \"world,\", \"how\", \"is\", \"everyone\", \"doing?\" } --]] Copy","s":"string.split","u":"/docs/Runtime Environment/String","h":"#stringsplit","p":630},{"i":639,"t":"Identical to the base Lua string.find in every way, except it searches right-to-left instead of left-to-right.","s":"string.rfind","u":"/docs/Runtime Environment/String","h":"#stringrfind","p":630},{"i":641,"t":"Strips or trims characters from both ends of a string. Parameters​ The string to strip. A string of characters to strip. Defaults to \\n\\r\\t\\v\\0. Returns​ The new string. pluto local s = \"{|}hello world{|}\" print(string.strip(s, \"{}|\")) --> hello world Copy","s":"string.strip","u":"/docs/Runtime Environment/String","h":"#stringstrip","p":630},{"i":643,"t":"Strips or trims characters from the left side of a string. Parameters​ The string to strip. A string of characters to strip. Defaults to \\n\\r\\t\\v\\0. Returns​ The new string. pluto local s = \"{|}hello world{|}\" print(string.lstrip(s, \"{}|\")) --> hello world{|} Copy","s":"string.lstrip","u":"/docs/Runtime Environment/String","h":"#stringlstrip","p":630},{"i":645,"t":"Strips or trims characters from the right side of a string. Parameters​ The string to strip. A string of characters to strip. Defaults to \\n\\r\\t\\v\\0. Returns​ The new string. pluto local s = \"{|}hello world{|}\" print(string.rstrip(s, \"{}|\")) --> {|}hello world Copy","s":"string.rstrip","u":"/docs/Runtime Environment/String","h":"#stringrstrip","p":630},{"i":647,"t":"Checks if a string is entirely composed of ASCII characters. Parameters​ The string to check. pluto local s = \"HELLOWORLD123\" print(string.isascii(s)) --> true Copy info This would exclude any multi-byte characters, like emojis.","s":"string.isascii","u":"/docs/Runtime Environment/String","h":"#stringisascii","p":630},{"i":649,"t":"Checks if a string is entirely composed of lowercase characters. Parameters​ The string to check. pluto local s = \"helloworld\" print(string.islower(s)) --> true Copy info Whitespace characters are not lowercase characters.","s":"string.islower","u":"/docs/Runtime Environment/String","h":"#stringislower","p":630},{"i":651,"t":"Checks if a string is entirely composed of alphabetic characters. Parameters​ The string to check. pluto local s = \"HELLOWORLD\" print(string.isalpha(s)) --> true Copy info Whitespace characters are not alphabetic characters.","s":"string.isalpha","u":"/docs/Runtime Environment/String","h":"#stringisalpha","p":630},{"i":653,"t":"Checks if a string is entirely composed of uppercase characters. Parameters​ The string to check. pluto local s = \"HELLOWORLD\" print(string.isupper(s)) --> true Copy info Whitespace characters are not uppercase characters.","s":"string.isupper","u":"/docs/Runtime Environment/String","h":"#stringisupper","p":630},{"i":655,"t":"Checks if a string is entirely composed of alphanumeric characters. Parameters​ The string to check. pluto local s = \"HELLOWORLD123\" print(string.isalnum(s)) --> true Copy info Whitespace characters are not alphanumeric characters.","s":"string.isalnum","u":"/docs/Runtime Environment/String","h":"#stringisalnum","p":630},{"i":657,"t":"Checks if this string is entirely composed of whitespace characters. Paramaters​ The string to check. pluto local s = \" \\t \\v \\f \\t\\t\\t\\t\" print(string.iswhitespace(s)) --> true Copy","s":"string.iswhitespace","u":"/docs/Runtime Environment/String","h":"#stringiswhitespace","p":630},{"i":659,"t":"Same as string.format, but performs the operation under the en_US.UTF-8 locale. Ensures the same result on all systems.","s":"string.uformat","u":"/docs/Runtime Environment/String","h":"#stringuformat","p":630},{"i":661,"t":"Replace substrings with another substring. Similar to string.gsub, but it operates on plain-text and is not burdened by a pattern capture limit. Parameters​ original — The substring to replace. substitute — The replacement substring. max_replace — The maximum number of replacements you wish to occur. The default value is effectively 0, which means \"infinite\". If you pass 1, this leads to a maximum of one replacement, and so on. Errors​ An error is thrown under the following conditions: max_replace is less than zero. The length of substitute is zero. pluto print(string.replace(\"Hello, world!\", \"!\", \".\")) --> Hello, world. print(string.replace(\"Hello, world!\", \"apple\", \"\")) --> Hello, world! print(string.replace(\"Hello, world!\", \"Hello\", \"Apple\")) --> Apple, world! print(string.replace(\"Hello, world!\", \"Hello, \", \"\")) --> world! Copy","s":"string.replace","u":"/docs/Runtime Environment/String","h":"#stringreplace","p":630},{"i":663,"t":"Truncates a given string to a specified length. If an elipsis is desired and the string was actually truncated, the last three characters of the resultant string will be replaced with an elipsis. Parameters​ The string to truncate. The desired length of the truncated string. A boolean indicating whether or not to replace the last three character of the string with ... if it is truncated. This is false by default. Returns​ The truncated string. pluto print(string.truncate(\"Hello, world!\", 50)) --> Hello, world! print(string.truncate(\"Hello, world!\", 5)) --> Hello print(string.truncate(\"Hello, world!\", 5, true)) --> He... Copy","s":"string.truncate","u":"/docs/Runtime Environment/String","h":"#stringtruncate","p":630},{"i":665,"t":"Checks if a string contains a substring. Parameters​ The string to check. The substring to check for. pluto local s = \"hello world\" print(string.contains(s, \"worl\")) --> true Copy","s":"string.contains","u":"/docs/Runtime Environment/String","h":"#stringcontains","p":630},{"i":667,"t":"Compares two strings, agnostic of any capitalization. Parameters​ The first string to compare. The second string to compare. pluto local s1 = \"hello world\" local s2 = \"heLLo WoRlD\" print(string.casefold(s1, s2)) --> true Copy","s":"string.casefold","u":"/docs/Runtime Environment/String","h":"#stringcasefold","p":630},{"i":669,"t":"This function makes an integer easier to read by inserting separator every N characters. It can handle strings representing integers, making it suitable for BigInt modules or any integer beyond Lua's representation limits. If you provide a string, it should consist solely of digits. A single unary operator is permitted at the beginning of the string to indicate whether it's a negative or positive number. Parameters​ integer — The integer or string input. sep — The separator to use. This must be a single-character string. group — The grouping of each digit pair. This is N. Errors​ If the input is a string and does not meet the aforementioned criteria, an error will be thrown. Usage Example pluto print(string.formatint(500)) --> 500 print(string.formatint(-5000)) --> -5,000 print(string.formatint(50000)) --> 50,000 print(string.formatint(-500000)) --> -500,000 print(string.formatint(500, \".\", 2)) --> 5.00 print(string.formatint(\"-5000\", \",\", 1)) --> -5,0,0,0 print(string.formatint(50000, \",\", 4)) --> 5,0000 Copy Error Example pluto string.formatint(\"-500000.4\") Copy pluto: test.pluto:3: argument 'integer' for string.formatint was a string, but does not represent a valid integer (bad character: '.') stack traceback: [C]: in function 'string.formatint' test.pluto:3: in main chunk [C]: in ? Copy","s":"string.formatint","u":"/docs/Runtime Environment/String","h":"#stringformatint","p":630},{"i":671,"t":"Splits a string once, on the first occurance of a separator. Parameters​ The string to partition. The separator to partition the string by. A boolean specifying whether to search from the right. By default, this is false, which starts at the left. Returns​ Two strings: A substring for all the content before the first occurance of sep, and another substring for all the content afterwards. A Basic Partition pluto local s = \"hello world, what's up?\" local before, after = string.partition(s, \" \") assert(before == \"hello\") assert(after == \"world, what's up?\") Copy Partioning From The Right pluto local s = \"hello world, what's up?\" local before, after = string.partition(s, \" \", true) assert(before == \"hello world, what's\") assert(after == \"up?\") Copy","s":"string.partition","u":"/docs/Runtime Environment/String","h":"#stringpartition","p":630},{"i":673,"t":"Checks if a string ends with a suffix. Parameters​ The string to check. The substring suffix to check for. pluto local s = \"hello world\" print(string.endswith(s, \"world\")) --> true Copy","s":"string.endswith","u":"/docs/Runtime Environment/String","h":"#stringendswith","p":630},{"i":675,"t":"Checks if a string starts with a prefix. Parameters​ The string to check. The substring prefix to check for. pluto local s = \"hello world\" print(string.startswith(s, \"hello\")) --> true Copy","s":"string.startswith","u":"/docs/Runtime Environment/String","h":"#stringstartswith","p":630},{"i":677,"t":"The scheduler class — available via require — can be used to easily set up coroutine-based cooperative multitasking.","s":"Scheduler","u":"/docs/Runtime Environment/Scheduler","h":"","p":676},{"i":679,"t":"The constructor takes no arguments.","s":"__construct","u":"/docs/Runtime Environment/Scheduler","h":"#__construct","p":676},{"i":681,"t":"The add method can be used to turn a function into a coroutine. The coroutine is resumed once and then added to the scheduler.","s":"add","u":"/docs/Runtime Environment/Scheduler","h":"#add","p":676},{"i":683,"t":"The addloop method is a wrapper for the add method that keeps invoking the given function until it returns false.","s":"addloop","u":"/docs/Runtime Environment/Scheduler","h":"#addloop","p":676},{"i":685,"t":"The run method activates the scheduler. The scheduler resumes all coroutines and then calls its yieldfunc until either all coroutines are finished, or coroutine throws an error — in which case it is rethrown. pluto local scheduler = new (require\"pluto:scheduler\") () local loops = 0 scheduler:addloop(function() ++loops print(loops) return loops != 5 end) scheduler:run() --> 1 --> 2 --> 3 --> 4 --> 5 scheduler:add(function() print(\"3...\") coroutine.sleep(1000) print(\"2...\") coroutine.sleep(1000) print(\"1...\") coroutine.sleep(1000) print(\"Boom!\") end) scheduler:run() --> 3... --> 2... --> 1... --> Boom! Copy","s":"run","u":"/docs/Runtime Environment/Scheduler","h":"#run","p":676},{"i":687,"t":"yieldfunc is a property on the scheduler that can be used to customize how the scheduler itself yields. By default, this is a function calling os.sleep(1). pluto local scheduler = new (require\"pluto:scheduler\") () -- Yield to OS every second instead of every millisecond. scheduler.yieldfunc = || -> os.sleep(1000) local loops = 0 scheduler:addloop(function() ++loops print(loops) return loops != 5 end) scheduler:run() --> 1 --> 2 --> 3 --> 4 --> 5 Copy","s":"yieldfunc","u":"/docs/Runtime Environment/Scheduler","h":"#yieldfunc","p":676},{"i":689,"t":"errorfunc is a property on the scheduler that can optionally be set to customize how the scheduler reports errors in its coroutines. By default, this is nil, in which case any coroutine errors are rethrown (via coroutine.xresume). pluto local { scheduler } = require \"*\" local sched = new scheduler() sched.errorfunc = |err| -> do print(debug.traceback(err)) end sched:add(function() error(\"this is urgent: fatal error\") end) Copy","s":"errorfunc","u":"/docs/Runtime Environment/Scheduler","h":"#errorfunc","p":676},{"i":691,"t":"Must be included via require.","s":"URL","u":"/docs/Runtime Environment/URL","h":"","p":690},{"i":693,"t":"Returns a URL-encoded string. Parameters​ The string to be encoded. pluto local url = require\"pluto:url\" print(\"https://google.com/search?q=\"..url.encode(\"Pluto, a superset of Lua\")) --> https://google.com/search?q=Pluto%2C%20a%20superset%20of%20Lua Copy","s":"url.encode","u":"/docs/Runtime Environment/URL","h":"#urlencode","p":690},{"i":695,"t":"Returns a plain string from URL-decoding the input string. Parameters​ The string to be decoded. pluto local url = require\"pluto:url\" print(url.decode(\"Pluto%2C%20a%20superset%20of%20Lua\")) -- \"Pluto, a superset of Lua\" Copy","s":"url.decode","u":"/docs/Runtime Environment/URL","h":"#urldecode","p":690},{"i":697,"t":"Splits a URL into its constituent parts. Parameters​ The URL to be dissected. pluto local url = require\"pluto:url\" print(dumpvar(url.parse(\"http://username:password@hostname:9090/path?arg=value#anchor\"))) --> { --> [\"scheme\"] = string(4) \"http\", --> [\"user\"] = string(8) \"username\", --> [\"pass\"] = string(8) \"password\", --> [\"host\"] = string(8) \"hostname\", --> [\"port\"] = 9090, --> [\"path\"] = string(5) \"/path\", --> [\"query\"] = string(9) \"arg=value\", --> [\"fragment\"] = string(6) \"anchor\", --> } Copy","s":"url.parse","u":"/docs/Runtime Environment/URL","h":"#urlparse","p":690},{"i":699,"t":"Must be included via require.","s":"Vector3","u":"/docs/Runtime Environment/Vector3","h":"","p":698},{"i":701,"t":"The constructor takes up to 3 arguments: pluto local vector3 = require \"pluto:vector3\" print(new vector3()) --> vector3(0, 0, 0) print(new vector3(1)) --> vector3(1, 1, 1) print(new vector3(1, 2)) --> vector3(1, 2, 0) print(new vector3(1, 2, 3)) --> vector3(1, 2, 3) Copy There is also a shorthand for this: pluto local vector3 = require \"pluto:vector3\" print(vector3(1, 2, 3)) --> vector3(1, 2, 3) Copy","s":"__construct","u":"/docs/Runtime Environment/Vector3","h":"#__construct","p":698},{"i":703,"t":"As seen above, the __tostring metamethod provides a string representation of the class.","s":"__tostring","u":"/docs/Runtime Environment/Vector3","h":"#__tostring","p":698},{"i":705,"t":"Vector3 instances support arithmetic operations. The right-hand side can either be a Vector3 instance or a number. They create a new instance for the result. pluto local vector3 = require \"pluto:vector3\" print(new vector3(1) + new vector3(2)) --> vector3(3, 3, 3) print(new vector3(0, 0.6, 0.4) * 3) --> vector3(0, 1.8, 1.2) Copy","s":"__add, __sub, __mul, __div","u":"/docs/Runtime Environment/Vector3","h":"#__add-__sub-__mul-__div","p":698},{"i":707,"t":"Vector3 instances can effortlessly be compared to each other. pluto local vector3 = require \"pluto:vector3\" print(new vector3(2, 2, 2) == new vector3(2)) --> true print(new vector3(1, 2, 3) == new vector3(2)) --> false Copy","s":"__eq","u":"/docs/Runtime Environment/Vector3","h":"#__eq","p":698},{"i":709,"t":"To get the magnitude of a vector, you can either use the unary length operator (#) or call the magnitude method: pluto local vec = new (require\"pluto:vector3\") (1, 2, 3) print(#vec) --> 3.7416573867739 print(vec:magnitude()) --> 3.7416573867739 Copy","s":"__len, magnitude","u":"/docs/Runtime Environment/Vector3","h":"#__len-magnitude","p":698},{"i":711,"t":"Computes the sum of the x, y and z fields. pluto local vec = new (require\"pluto:vector3\") (1, 2, 3) print(vec:sum()) --> 6 Copy","s":"sum","u":"/docs/Runtime Environment/Vector3","h":"#sum","p":698},{"i":713,"t":"Returns the value of axis with the lowest value. pluto local vec = new (require\"pluto:vector3\") (1, 2, 3) print(vec:min()) --> 1 Copy","s":"min","u":"/docs/Runtime Environment/Vector3","h":"#min","p":698},{"i":715,"t":"Returns the value of axis with the highest value. pluto local vec = new (require\"pluto:vector3\") (1, 2, 3) print(vec:max()) --> 3 Copy","s":"max","u":"/docs/Runtime Environment/Vector3","h":"#max","p":698},{"i":717,"t":"Computes the dot product with the Vector3 given as an argument. pluto local vector3 = require \"pluto:vector3\" print(new vector3(1):dot(new vector3(2))) --> 6 Copy","s":"dot","u":"/docs/Runtime Environment/Vector3","h":"#dot","p":698},{"i":719,"t":"Returns a new Vector3 instance with each axis being an absolute value. pluto local vector3 = require \"pluto:vector3\" print(new vector3(-1, -2, 3):abs()) --> vector3(1, 2, 3) Copy","s":"abs","u":"/docs/Runtime Environment/Vector3","h":"#abs","p":698},{"i":721,"t":"Returns a new Vector3 instance that is a unit vector equivalent. pluto local vector3 = require \"pluto:vector3\" print(new vector3(0, 3, 0):normalized()) --> vector3(0.0, 1.0, 0.0) Copy","s":"normalized, normalised","u":"/docs/Runtime Environment/Vector3","h":"#normalized-normalised","p":698},{"i":723,"t":"Returns a rotation vector based on the direction given by the current vector. You can specify the up-axis and handedness of the coordinate system. By default, a left-handed Y-up system is used. The up-axis also determines which axis contains which value: Y-Up: Pitch, Yaw, Roll Z-Up: Pitch, Roll, Yaw pluto local vector3 = require \"pluto:vector3\" print(new vector3(0, 1, 0):torot(\"y\")) -- Y up. Pointing up -> vector3(90.0, 0.0, 0) print(new vector3(0, 0, -1):torot(\"z\")) -- Z up. Pointing down -> vector3(-90.0, 0, -0.0) print(new vector3(1, 0, 0):torot(\"yr\")) -- Y up, right-handed. Pointing right -> vector3(0.0, -90.0, 0) print(new vector3(1, 0, 0):torot(\"yl\")) -- Y up, left-handed. Pointing right -> vector3(0.0, 90.0, 0) print(new vector3(1, 0, 0):torot(\"zr\")) -- Z up, right-handed. Pointing right -> vector3(0.0, 0, 90.0) print(new vector3(0, 0, 1):torot(\"y\")) -- Y up. Pointing forward -> vector3(0.0, 0.0, 0) print(new vector3(0, 0, -1):torot(\"y\")) -- Y up. Pointing backward -> vector3(0.0, 180.0, 0) Copy","s":"torot","u":"/docs/Runtime Environment/Vector3","h":"#torot","p":698},{"i":725,"t":"Returns a rotation vector based on the position given by the current vector and argument. pluto local v3 = require \"pluto:vector3\" print(new v3(0):lookat(new v3(0, 1, 0), \"y\")) -- Y up. From origin to a point above -> vector3(90.0, 0.0, 0) Copy","s":"lookat","u":"/docs/Runtime Environment/Vector3","h":"#lookat","p":698},{"i":727,"t":"Returns a direction vector based on the rotation given by the current vector. pluto local vector3 = require \"pluto:vector3\" print(new vector3(90, 0, 0):todir(\"y\")) -- Y up. Pointing up -> vector3(0.0, 1.0, 6.1232339957368e-17) print(new vector3(0, 90, 0):todir(\"yl\")) -- Y up, left-handed. Pointing right -> vector3(1.0, 0.0, 6.1232339957368e-17) print(new vector3(0, 90, 0):todir(\"yr\")) -- Y up, right-handed. Pointing right -> vector3(-1.0, 0.0, 6.1232339957368e-17) Copy","s":"todir","u":"/docs/Runtime Environment/Vector3","h":"#todir","p":698},{"i":729,"t":"Must be included via require.","s":"XML","u":"/docs/Runtime Environment/XML","h":"","p":728},{"i":731,"t":"Returns a string of XML. Parameters​ data — A table or string to encode as XML. pretty — Whether to return a human-readable string of XML. Defaults to false. pluto local xml = require \"pluto:xml\" print(xml.encode({ tag = \"root\", children = { { tag = \"entry\", attributes = { [\"type\"] = \"primary\" }, children = { \"Text node\" } }, { tag = \"entry\" } } }, true)) --> --> --> Text node --> --> --> Copy","s":"xml.encode","u":"/docs/Runtime Environment/XML","h":"#xmlencode","p":728},{"i":733,"t":"Returns a table representing the XML data. Parameters​ data — The XML data to decode. parser — Which parser to use against the data. Can be \"html\", \"xml\" (default), or \"lax\" (XML but accepts attributes without =). pluto local xml = require \"pluto:xml\" local root = xml.decode([[ primary ]]) print(dumpvar(root)) --> { --> [\"tag\"] = string(7) \"entries\", --> [\"children\"] = { --> [1] = { --> [\"tag\"] = string(5) \"entry\", --> [\"attributes\"] = { --> [\"type\"] = string(7) \"primary\", --> }, --> [\"children\"] = { --> [1] = { --> [\"tag\"] = string(4) \"name\", --> [\"children\"] = { --> [1] = string(7) \"primary\", --> }, --> }, --> }, --> }, --> }, --> } Copy For ease of use, the returned tables have an __index metamethod: pluto -- root is , so its first child is . -- we make use of the metamethod to get to : print(dumpvar(root.children[1].name)) --> { --> [\"tag\"] = string(4) \"name\", --> [\"children\"] = { --> [1] = string(7) \"primary\", --> }, --> } Copy If there is no single root element, a \"body\" element is implied as the root: pluto local xml = require \"pluto:xml\" print(dumpvar(xml.decode([[ ]]))) --> { --> [\"tag\"] = string(4) \"body\", --> [\"children\"] = { --> [1] = { --> [\"tag\"] = string(5) \"entry\", --> }, --> [2] = { --> [\"tag\"] = string(5) \"entry\", --> }, --> }, --> } Copy","s":"xml.decode","u":"/docs/Runtime Environment/XML","h":"#xmldecode","p":728},{"i":735,"t":"This page documents the changes & additions to the table library in Pluto, which is built on top of Lua 5.4's.","s":"Table","u":"/docs/Runtime Environment/Table","h":"","p":734},{"i":737,"t":"This function was modified to return the input table instead of nil, such that: pluto local t = { 3, 2, 1 } t = t:sort(...) Copy Will not result in t becoming nil.","s":"table.sort","u":"/docs/Runtime Environment/Table","h":"#tablesort","p":734},{"i":739,"t":"Copying variant of table.sort; returns a new table instead of modifying the input table. Note that nested tables will not be copied.","s":"table.sorted","u":"/docs/Runtime Environment/Table","h":"#tablesorted","p":734},{"i":741,"t":"Returns the number of elements in the table, counting both the array part and hash part. Parameters​ The table to check. pluto local t = { 1, 2, 3, [\"foo\"] = \"bar\" } print(t:size()) --> 4 Copy","s":"table.size","u":"/docs/Runtime Environment/Table","h":"#tablesize","p":734},{"i":743,"t":"Remove all elements from the table. Parameters​ The table to clear. pluto local t = { 1, 2, 3, [\"foo\"] = \"bar\" } print(t:size()) --> 4 t:clear() print(t:size()) --> 0 Copy","s":"table.clear","u":"/docs/Runtime Environment/Table","h":"#tableclear","p":734},{"i":745,"t":"Freezes a table to prevent modification. Parameters​ The table to freeze Returns​ The input table. pluto local t = table.freeze({...}) -- `table.freeze(t)` on another line will work fine too. t.key = \"value\" -- Fails. Copy","s":"table.freeze","u":"/docs/Runtime Environment/Table","h":"#tablefreeze","p":734},{"i":747,"t":"Checks if this table is frozen. Parameters​ The table to check. pluto local t = {} table.freeze(t) assert(table.isfrozen(t) == true) Copy","s":"table.isfrozen","u":"/docs/Runtime Environment/Table","h":"#tableisfrozen","p":734},{"i":749,"t":"Checks if this table contains an element. Parameters​ The table to check. The element to check for. Returns​ The index or key if found, otherwise nil. pluto local t = { 1, 2, 3, 4, 5, 6, key = \"value\" } assert(table.contains(t, 4) == 4) assert(table.contains(t, \"value\") == \"key\") assert(table.contains(t, \"nothing\") == nil) Copy","s":"table.contains","u":"/docs/Runtime Environment/Table","h":"#tablecontains","p":734},{"i":751,"t":"Looks for an element in a table. Parameters​ The table to check. The callback function responsible for checking each element. Returns​ The element if found, otherwise nil. pluto local items = { { id = 1, name = \"Apple\" }, { id = 2, name = \"Banana\" }, } print(items:find(|item| -> item.id == 1).name) --> Apple Copy","s":"table.find","u":"/docs/Runtime Environment/Table","h":"#tablefind","p":734},{"i":753,"t":"Reverses the array elements of a table. Parameters​ The table to reverse. Returns​ The input table. pluto local t = { 1, 2, hello = \"world\", 3, 4, 5, key = \"value\" } print(dumpvar(t)) local same = t:reverse() assert(same == t) print(dumpvar(t)) --[[ Before: { [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [\"key\"] = string(5) \"value\", [\"hello\"] = string(5) \"world\", } After: { [1] = 5, [2] = 4, [3] = 3, [4] = 2, [5] = 1, [\"key\"] = string(5) \"value\", [\"hello\"] = string(5) \"world\", } --]] Copy","s":"table.reverse","u":"/docs/Runtime Environment/Table","h":"#tablereverse","p":734},{"i":755,"t":"Copying variant of table.reverse; returns a new table instead of modifying the input table. Note that nested tables will not be copied.","s":"table.reversed","u":"/docs/Runtime Environment/Table","h":"#tablereversed","p":734},{"i":757,"t":"Reorders the array portion of a table so it becomes a continuous array with no holes. Parameters​ The table. Returns​ The input table. pluto local assert = require(\"assert\") local t1 = { 1, nil, 2, nil, nil, 3, nil, 4 } assert.equal(t1:reorder(), { 1, 2, 3, 4 }) Copy","s":"table.reorder","u":"/docs/Runtime Environment/Table","h":"#tablereorder","p":734},{"i":759,"t":"Copying variant of table.reorder; returns a new table instead of modifying the input table. Note that nested tables will not be copied.","s":"table.reordered","u":"/docs/Runtime Environment/Table","h":"#tablereordered","p":734},{"i":761,"t":"Note that this function is not the same as the Lua function that was deprecated/removed in 5.1. Parameters​ The table. The callback to be called for every element. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|). pluto local t = { 1, 2, 3 } t:foreach(print) --> 1 --> 2 --> 3 Copy","s":"table.foreach","u":"/docs/Runtime Environment/Table","h":"#tableforeach","p":734},{"i":763,"t":"Filters away keys (both array and non-array) that fail to meet the condition established by callback. Elimination is done by setting the value to nil, consider using table.reorder if you want a continuous array after filtering. Parameters​ The table. The callback responsible for deciding which keys to keep or remove. This should return false or nil if you want the key to be eliminated. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|). Returns​ The input table. pluto data = { 1, 2, 3, 4, 5 } data:filter(|v| -> v % 2 ~= 0):reorder():concat(\" \") |> print -- \"1 3 5\" data = { 2, 2, 3, 4, 4 } data:filter(|k, v| -> k == v, true):reorder():concat(\" \") |> print -- \"2 3 4\" Copy","s":"table.filter","u":"/docs/Runtime Environment/Table","h":"#tablefilter","p":734},{"i":765,"t":"Copying variant of table.filter; returns a new table instead of modifying the input table. Note that nested tables will not be copied.","s":"table.filtered","u":"/docs/Runtime Environment/Table","h":"#tablefiltered","p":734},{"i":767,"t":"Remaps every key to a new value, provided by the callback function. Parameters​ The table. The callback responsible for producing the updated values. An optional bool if the callback function also takes a key (|k, v|) as opposed to only a value (|v|). Returns​ The input table. pluto data = \"41 20 68\" data:split(\" \"):map(tonumber):map(|v| -> v + 1):concat(\" \") |> print -- \"42 21 69\" data = \"10 15 10\" data:split(\" \"):map(tonumber):map(|k, v| -> k * v, true):concat(\" \") |> print -- \"10 30 30\" Copy In this example, we first use the tonumber function to turn the strings into numbers, then add 1 to them. (Although the first step is not needed in Lua/Pluto since the + operator would take care of it, it is used here for demonstration purposes.)","s":"table.map","u":"/docs/Runtime Environment/Table","h":"#tablemap","p":734},{"i":769,"t":"Copying variant of table.map; returns a new table instead of modifying the input table. Note that nested tables will not be copied.","s":"table.mapped","u":"/docs/Runtime Environment/Table","h":"#tablemapped","p":734},{"i":771,"t":"For every value stored in the table, computes accumulator = f(value, accumulator), returning the accumulator at the end. Parameters​ The table. The callback responsible for producing the updated accumulator. The initial value of accumulator. If absent, the accumulator is initialized with 0. Returns​ The accumulator. pluto local t = { 1, 2, 3 } t:reduce(|value, accumulator| -> value + accumulator) |> print --> 6 Copy","s":"table.reduce","u":"/docs/Runtime Environment/Table","h":"#tablereduce","p":734},{"i":773,"t":"Returns the smallest value stored in the table. Parameters​ The table. pluto local t = { 1, 2, 3 } print(t:min()) --> 1 Copy This is identical to :reduce(math.min, math.maxinteger).","s":"table.min","u":"/docs/Runtime Environment/Table","h":"#tablemin","p":734},{"i":775,"t":"Returns the largest value stored in the table. Parameters​ The table. pluto local t = { 1, 2, 3 } print(t:max()) --> 3 Copy This is identical to :reduce(math.max, math.mininteger).","s":"table.max","u":"/docs/Runtime Environment/Table","h":"#tablemax","p":734},{"i":777,"t":"Runs the given function against all elements, returning true if all of them match. Parameters​ The table. The callback responsible for checking each element. pluto print({ 2, 4, 6 }:checkall(|x| -> x % 2 == 0) ? \"All are even\" : \"Some are odd\") --> All are even print({ 1, 2, 3 }:checkall(|x| -> x % 2 == 0) ? \"All are even\" : \"Some are odd\") --> Some are odd Copy","s":"table.checkall","u":"/docs/Runtime Environment/Table","h":"#tablecheckall","p":734}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2",[0,5.788,1,5.632,2,8.674,3,6.381,4,0.49]],["t/4",[1,3.342,5,4.726,6,4.674,7,0.983,8,5.808,9,1.715,10,2.519,11,3.655,12,4.674,13,5.148,14,4.362,15,2.981,16,5.148,17,2.721,18,3.942,19,1.476,20,5.148,21,5.148,22,4.674,23,4.674,24,5.148,25,4.129,26,3.942,27,3.181,28,3.538,29,4.362,30,2.721,31,3.787,32,3.787,33,4.674,34,2.721,35,3.538,36,2.353,37,2.483,38,2.923,39,2.323,40,2.238,41,1.867,42,4.362,43,1.922,44,5.148,45,3.181,46,4.362]],["t/6",[5,4.338,7,0.866,19,1.299,36,2.072,39,2.046,40,1.971,47,4.27,48,3.754,49,4.544,50,3.314,51,2.943,52,2.738,53,2.127,54,2.205,55,2.526,56,2.099,57,2.943,58,2.046,59,3.472,60,3.841,61,3.116,62,3.116,63,3.218,64,2.481,65,2.68,66,2.285,67,2.02,68,4.116,69,3.218,70,1.613,71,3.189,72,2.869,73,2.218,74,3.061,75,3.636,76,2.801,77,1.131,78,2.285,79,3.636,80,2.68,81,1.995,82,3.841,83,4.116,84,2.526,85,3.116,86,3.335,87,3.472,88,3.116,89,2.218,90,2.285,91,2.68,92,2.481]],["t/8",[5,4.52,22,3.704,23,3.704,28,2.804,34,2.157,36,1.864,39,1.841,41,1.479,47,2.232,50,1.732,52,2.464,54,1.361,62,2.804,66,2.056,67,1.818,71,1.968,78,2.056,80,2.411,81,2.691,93,2.273,94,0.472,95,2.273,96,1.638,97,1.841,98,2.896,99,3.01,100,3.124,101,4.079,102,2.232,103,4.08,104,2.362,105,1.996,106,4.079,107,3.456,108,4.079,109,4.532,110,4.499,111,4.683,112,2.362,113,3.456,114,2.722,115,4.079,116,3.456,117,3.456,118,2.411,119,3.272,120,4.079,121,2.567,122,3.456,123,3.456,124,4.079,125,4.079,126,3.272,127,4.079,128,4.079,129,3.001,130,4.079,131,1.774,132,2.896,133,4.079]],["t/10",[3,4.163,5,4.504,40,2.461,47,3.096,54,1.888,55,3.153,67,3.446,82,4.795,95,3.153,99,3.615,114,3.776,134,5.659,135,4.795,136,5.659,137,4.163,138,5.659,139,2.897,140,2.135,141,7.021,142,2.897,143,4.539,144,4.163,145,5.689,146,5.138,147,3.674,148,4.334,149,5.138,150,5.659,151,4.795,152,4.795,153,5.659,154,5.659]],["t/12",[5,4.782,7,0.694,19,1.606,28,2.5,30,1.923,37,1.754,43,2.093,47,3.066,61,2.5,62,2.5,64,1.99,66,2.824,67,3.046,71,1.754,76,2.247,85,2.5,94,0.494,95,3.809,98,2.582,99,2.3,100,2.785,114,3.739,122,3.081,131,1.581,139,2.868,140,2.114,142,1.862,145,2.676,152,3.081,155,3.637,156,2.785,157,3.245,158,2.703,159,3.302,160,2.427,161,2.676,162,2.785,163,3.637,164,2.361,165,3.302,166,3.959,167,5.088,168,5.604,169,2.63,170,2.065,171,3.852,172,2.427,173,3.302,174,2.5,175,1.833,176,3.637,177,2.676,178,3.637,179,2.582,180,2.361,181,2.302,182,3.637,183,3.637,184,3.637,185,3.081,186,2.582,187,2.5,188,2.676]],["t/14",[4,0.093,5,1.848,6,1.492,7,0.553,9,0.389,12,1.492,19,0.471,28,1.13,36,2.908,39,0.742,40,0.715,41,0.596,48,1.645,49,1.13,50,1.989,53,0.771,54,0.548,56,0.761,58,0.742,59,1.259,66,0.828,70,1.666,71,0.793,72,1.04,77,2.275,78,0.828,80,0.972,81,2.594,84,0.916,87,1.259,89,1.418,90,1.46,93,5.77,94,0.549,95,1.614,96,1.193,97,2.113,98,1.167,99,1.922,104,1.678,105,1.418,110,1.209,116,1.393,117,1.393,118,1.712,123,1.393,129,1.209,131,0.715,156,3.586,158,1.398,160,1.097,164,1.067,169,0.771,170,0.933,175,2.36,189,2.054,190,1.167,191,1.492,192,1.393,193,2.132,194,1.492,195,1.492,196,1.393,197,2.057,198,1.393,199,1.259,200,1.318,201,1.209,202,1.067,203,0.487,204,1.614,205,1.483,206,1.209,207,0.872,208,1.209,209,0.33,210,1.991,211,1.492,212,1.167,213,1.318,214,1.04,215,1.991,216,1.209,217,0.742,218,1.26,219,1.016,220,1.393,221,0.899,222,1.097,223,1.393,224,1.393,225,1.644,226,0.132,227,1.067,228,1.067,229,1.492,230,1.393,231,1.393,232,1.393,233,1.318,234,1.644,235,1.644,236,1.492,237,1.644,238,1.644,239,1.644,240,1.644,241,1.644,242,1.644,243,1.644,244,1.644,245,1.644,246,1.644,247,1.644,248,1.644,249,1.644,250,1.644,251,1.644,252,1.492,253,2.324,254,2.219,255,2.455,256,0.309,257,1.318,258,1.614,259,1.097,260,1.13,261,1.318,262,1.492,263,1.318,264,1.644,265,1.644,266,0.841,267,1.04,268,1.644,269,0.646,270,1.492,271,1.492,272,1.644,273,1.644,274,0.793,275,1.492,276,1.492,277,1.13,278,0.816,279,0.816,280,0.933,281,1.644,282,1.644,283,1.644,284,1.067,285,1.644,286,1.13,287,1.644,288,1.393,289,1.097,290,1.04,291,1.644,292,1.016,293,1.259]],["t/16",[5,3.022,28,4.367,40,2.763,43,2.372,47,3.476,50,2.698,54,2.119,55,3.54,58,2.867,59,4.865,66,3.202,77,1.585,84,3.54,85,4.367,93,3.54,94,0.408,95,3.54,109,3.925,118,3.755,169,2.981,170,3.607,175,3.202,214,4.021,216,4.674,284,4.125,294,5.383,295,5.383,296,4.865,297,4.125]],["t/18",[5,3.932,36,1.919,42,5.295,43,1.568,47,3.419,48,2.384,49,2.887,50,2.654,54,1.401,55,2.34,66,2.117,73,2.055,77,1.559,93,4.605,94,0.48,95,2.34,96,0.938,105,2.055,112,2.432,140,1.584,166,2.432,169,1.971,171,4.295,181,2.658,209,0.479,216,3.09,266,2.15,280,2.384,298,3.216,299,3.368,300,5.674,301,2.887,302,3.216,303,2.258,304,3.813,305,3.368,306,3.368,307,3.558,308,3.813,309,1.274,310,3.813,311,4.2,312,3.558,313,3.813,314,2.981,315,3.368,316,2.887,317,2.981,318,1.804,319,3.216,320,2.802,321,4.2,322,4.2,323,4.2,324,2.482,325,4.2,326,4.2,327,2.34,328,2.802,329,3.813,330,4.2]],["t/20",[4,0.124,5,2.052,9,0.519,10,1.072,19,0.864,36,2.603,39,0.543,40,0.523,41,0.436,43,0.818,47,2.032,48,0.683,49,3.323,50,2.247,53,0.565,54,0.731,58,0.543,59,0.921,66,1.872,67,1.655,70,0.428,71,1.454,72,0.761,74,1.014,75,0.965,76,0.743,78,0.606,80,0.711,81,1.899,83,1.092,85,0.827,86,0.885,88,0.827,89,1.475,90,1.872,91,0.711,93,5.535,94,0.561,95,0.67,96,0.673,97,0.543,99,0.899,103,0.803,104,2.498,105,2.111,112,0.697,131,1.311,139,0.616,140,0.454,142,1.901,144,0.885,146,1.092,156,2.844,159,3.372,162,0.921,169,1.028,170,0.683,172,0.803,175,1.104,186,0.854,187,1.505,193,0.885,197,0.854,201,0.885,202,1.422,204,1.68,205,0.616,207,0.362,209,0.649,210,2.072,213,0.965,214,1.386,216,1.611,221,0.658,230,1.019,231,1.019,232,1.019,233,0.965,259,0.803,261,0.965,263,0.965,266,0.616,270,1.092,278,1.087,280,1.244,284,0.781,289,0.803,300,1.092,302,0.921,305,0.965,309,1.309,317,2.14,318,0.941,324,2.55,331,1.505,332,0.565,333,0.324,334,0.405,335,1.203,336,1.019,337,1.019,338,1.203,339,1.203,340,1.203,341,0.697,342,0.921,343,1.019,344,1.677,345,0.827,346,1.244,347,0.743,348,0.965,349,1.092,350,0.803,351,0.781,352,1.454,353,0.565,354,0.781,355,1.092,356,1.092,357,0.803,358,1.957,359,0.67,360,1.295,361,1.989,362,0.965,363,0.711,364,1.908,365,1.203,366,0.711,367,0.854,368,1.019,369,1.019,370,1.203,371,1.203,372,0.854,373,0.854,374,0.921,375,0.658,376,1.203,377,1.092,378,0.965,379,1.092,380,1.019,381,1.019,382,2.14,383,1.092,384,1.019,385,0.921,386,0.921,387,1.092,388,1.203,389,1.019,390,0.67,391,0.827,392,0.529,393,1.203,394,0.885,395,0.854,396,0.803,397,1.203,398,1.019,399,1.203,400,1.203,401,0.727,402,1.203,403,1.092,404,1.019,405,1.203,406,1.092,407,1.203,408,0.921,409,0.803,410,0.827,411,1.092,412,0.921,413,1.203,414,1.092,415,1.203,416,1.203,417,1.203,418,1.203,419,1.092,420,1.203,421,1.092,422,1.203,423,1.856,424,1.092,425,0.965,426,0.626,427,2.19,428,0.803,429,1.092,430,2.19,431,1.092,432,1.203,433,1.203,434,1.203,435,1.203,436,1.203,437,1.203,438,1.989,439,1.203,440,1.203,441,1.203,442,1.203,443,1.092,444,0.405,445,1.203,446,0.965,447,1.203,448,1.019,449,0.636,450,1.092,451,0.683,452,1.019,453,1.203,454,1.203,455,0.781,456,1.757,457,1.092,458,1.092,459,1.092,460,1.092,461,1.203,462,1.203,463,1.092,464,1.092,465,0.827,466,0.711,467,1.203,468,1.092]],["t/22",[4,0.336,5,4.599,7,1.137,9,1.41,43,2.224,67,2.653,74,2.757,93,3.318,96,1.33,97,2.687,112,3.448,114,3.974,119,4.776,122,5.045,131,2.589,175,3.001,177,4.381,280,3.381,320,3.974,353,3.756,357,3.974,469,3.448,470,5.045,471,2.794,472,5.407,473,3.258,474,5.955,475,5.955,476,5.045,477,5.955,478,5.955]],["t/24",[5,4.324,7,0.983,17,2.721,47,2.817,54,2.794,56,2.384,61,3.538,62,3.538,73,2.519,77,1.806,94,0.539,97,2.323,103,3.435,113,4.362,140,1.942,161,3.787,187,3.538,226,0.414,271,4.674,288,4.362,303,2.768,341,2.981,366,3.043,471,2.416,479,4.129,480,4.129,481,4.362,482,3.538,483,4.674,484,3.043,485,3.942,486,5.148,487,3.942,488,3.435,489,5.148,490,5.148,491,5.148,492,5.148,493,5.148,494,4.674,495,4.674,496,4.362]],["t/26",[5,4.034,9,2.37,17,3.435,36,2.97,43,2.427,47,4.64,50,2.76,54,2.168,55,3.621,65,3.841,79,5.211,99,2.667,103,4.336,140,2.451,142,3.326,162,4.976,207,1.956,332,3.049,348,5.211,357,5.659,497,6.498]],["t/28",[5,4.593,9,2.07,35,4.68,58,3.944,69,4.833,95,3.794,142,3.485,357,4.543,498,5.46,499,6.809,500,6.809,501,6.182,502,6.809,503,5.532,504,5.532,505,6.809,506,3.866]],["t/30",[5,1.969,9,0.59,10,1.219,11,1.769,19,0.714,36,3.751,39,1.867,40,1.084,43,0.931,47,3.382,48,1.415,50,1.758,52,1.505,53,1.169,54,0.831,56,1.916,57,1.618,58,1.124,67,2.754,74,1.916,78,2.086,80,1.473,81,1.097,89,3.836,90,1.256,93,4.745,94,0.631,96,1.532,105,1.219,131,1.8,169,1.169,175,2.675,177,1.833,201,1.833,202,2.687,204,2.306,205,1.276,207,1.246,209,0.705,256,0.469,280,1.415,302,1.908,309,2.245,318,2.947,324,1.473,331,1.713,332,1.169,341,1.443,344,1.908,346,1.415,357,1.663,364,3.359,383,2.262,392,1.097,394,1.833,401,1.505,426,1.296,455,2.687,465,1.713,466,1.473,507,3.507,508,1.833,509,1.908,510,3.758,511,2.492,512,1.833,513,1.618,514,1.998,515,1.443,516,2.762,517,2.557,518,1.769,519,1.663,520,2.262,521,2.492,522,2.111,523,2.111,524,1.54,525,1.363,526,2.492,527,2.492,528,2.492,529,2.492,530,1.908,531,2.492,532,2.492,533,1.769,534,1.769,535,1.998,536,2.262,537,2.492]],["t/32",[5,4.58,36,2.693,39,4.058,41,2.137,51,3.826,65,3.483,67,3.542,70,2.828,77,1.47,78,2.97,93,3.284,95,3.284,112,3.413,118,3.483,139,3.017,142,4.069,173,5.351,280,3.346,299,4.726,309,1.788,318,2.532,538,3.826,539,6.375,540,5.893,541,5.893,542,4.993,543,5.893]],["t/34",[4,0.291,5,4.324,31,3.787,34,2.721,36,2.353,52,3.109,63,3.655,67,2.294,74,2.384,79,4.129,90,2.595,94,0.331,135,4.362,140,1.942,142,2.635,144,3.787,189,2.721,207,1.549,214,5.301,215,3.538,278,2.556,307,4.362,309,2.198,342,3.942,409,3.435,476,4.362,482,3.538,544,5.148,545,4.362,546,3.787,547,3.942,548,4.362,549,3.894,550,5.148,551,5.148,552,5.148,553,7.242,554,5.148,555,5.148,556,4.362,557,3.942,558,4.129]],["t/36",[5,4.394,36,3.396,41,2.694,43,1.994,47,2.922,54,2.85,55,2.976,66,3.745,70,2.643,71,4.122,96,1.909,104,3.093,118,4.392,175,2.692,181,3.38,186,3.792,214,3.38,216,3.929,266,2.734,277,3.671,332,2.506,350,3.564,559,5.341,560,5.341,561,4.849,562,4.525,563,4.849,564,6.746,565,5.341,566,5.341,567,4.849]],["t/38",[4,0.202,7,0.4,19,0.601,36,1.636,39,0.946,40,1.557,52,2.828,53,1.68,58,1.615,67,1.595,74,2.563,77,1.688,80,2.116,81,1.576,89,1.026,92,1.148,93,5.298,94,0.603,96,0.8,97,0.946,99,0.861,102,1.148,103,1.4,105,3.312,140,0.791,147,1.362,156,1.606,164,1.362,175,2.36,189,1.109,197,1.489,207,1.409,208,1.543,209,0.408,211,1.904,217,1.615,228,1.362,254,1.606,263,4.44,280,1.191,284,2.324,309,2.194,318,3.647,319,2.741,324,2.768,332,3.176,347,2.212,348,1.682,350,2.389,360,3.674,364,1.327,385,1.606,392,0.923,394,1.543,449,1.109,465,1.442,466,1.24,514,2.871,516,3.125,524,1.296,533,1.489,568,2.871,569,2.097,570,1.777,571,1.777,572,3.58,573,2.097,574,1.543,575,1.682,576,2.097,577,2.097,578,1.904,579,2.097,580,1.904,581,1.904,582,1.904,583,1.442,584,1.904,585,1.904,586,1.904,587,1.904,588,1.606,589,1.777,590,1.442,591,2.097,592,1.777,593,1.489,594,2.097,595,2.097,596,2.097,597,1.904,598,1.904,599,1.777,600,1.777,601,0.971,602,1.904,603,1.904,604,1.904,605,2.097,606,2.097,607,2.097,608,1.904,609,1.489,610,2.097,611,2.097,612,2.097,613,2.097,614,1.682,615,1.777,616,1.777,617,1.777]],["t/40",[4,0.336,5,3.808,7,1.137,9,1.41,34,3.148,36,3.658,39,2.687,54,1.986,61,4.093,70,3.217,71,2.872,81,2.621,89,3.917,158,2.872,212,4.227,256,1.121,266,3.048,309,1.807,332,2.794,364,3.769,449,3.148,455,3.866,482,4.093,484,3.52,519,3.974,588,4.56,618,5.955,619,4.56,620,5.407,621,5.955]],["t/42",[5,3.966,19,1.462,30,2.697,36,2.332,39,2.302,40,2.218,41,1.85,42,4.323,43,1.905,50,2.167,54,1.702,58,2.302,70,1.815,71,2.461,89,2.496,93,2.843,94,0.536,95,4.009,100,3.907,104,2.954,148,5.511,164,3.312,169,2.394,213,4.092,284,4.672,316,3.507,320,3.404,362,4.092,479,4.092,480,4.092,503,3.229,504,3.229,535,5.771,622,4.632,623,4.092,624,2.572,625,4.323,626,3.507,627,3.404,628,5.102,629,4.323,630,3.907,631,5.102]],["t/44",[4,0.355,5,3.946,10,3.074,11,5.889,19,1.801,36,2.872,40,2.732,58,2.835,89,3.074,91,3.714,94,0.404,95,3.501,164,4.079,169,2.948,175,3.167,217,2.835,277,4.319,299,5.039,318,2.7,327,3.501,360,3.714,426,3.268,444,2.115,503,3.976,632,5.705,633,5.705,634,4.812,635,6.283]],["t/46",[5,3.729,9,1.367,19,1.655,36,2.639,40,2.511,54,1.926,58,2.605,77,1.44,89,2.825,91,3.413,94,0.371,109,3.567,148,6.003,152,4.892,164,3.749,171,3.969,175,2.91,209,0.658,212,4.099,217,2.605,324,3.413,327,3.217,360,3.413,426,3.003,455,3.749,484,3.413,485,4.422,504,4.961,620,5.242,622,5.242,633,5.242,634,4.422,636,5.242,637,4.631,638,5.774]],["t/48",[4,0.234,9,1.464,10,2.025,19,1.186,36,1.891,58,1.867,64,2.264,70,2.199,71,1.996,80,3.654,81,2.72,84,2.306,89,2.025,90,2.086,93,5.914,94,0.565,99,1.699,104,2.396,142,2.118,156,4.734,158,1.996,187,2.845,260,2.845,278,2.055,284,2.687,296,3.169,297,2.687,301,2.845,328,2.762,357,2.762,360,2.446,385,3.169,389,3.507,452,3.507,479,3.319,480,3.319,501,3.758,503,2.619,504,2.619,580,3.758,581,3.758,601,1.916,639,2.938,640,3.319,641,4.139,642,3.758,643,2.619,644,2.619,645,4.139,646,3.758,647,4.139,648,4.139,649,2.619,650,2.938,651,4.139,652,4.139]],["t/50",[5,3.605,36,2.512,41,2.748,47,3.007,50,3.218,54,2.528,55,4.223,64,3.007,65,3.248,94,0.487,164,3.568,166,3.182,169,2.579,170,3.12,172,3.667,180,3.568,186,3.901,209,0.627,329,4.99,373,3.901,428,3.667,515,3.182,653,5.496,654,4.208,655,5.496,656,5.496,657,3.182,658,4.99,659,5.496,660,5.496,661,5.496,662,4.656,663,5.496,664,5.496,665,7.579,666,5.496]],["t/52",[50,3.036,54,2.385,74,3.311,93,3.984,97,3.226,119,5.734,177,5.26,214,4.525,266,3.66,316,4.915,344,5.476,516,4.771,667,6.492,668,7.15,669,6.492,670,7.15,671,6.492,672,7.15,673,7.15]],["t/54",[4,0.343,36,2.78,43,2.271,47,4.442,54,2.029,55,3.389,70,2.164,71,2.934,77,1.517,86,4.474,94,0.391,96,1.813,214,3.849,289,4.058,333,1.637,398,5.153,509,4.658,533,4.318,534,4.318,549,3.27,564,5.522,671,5.522,674,6.082,675,6.082,676,5.522,677,6.082,678,5.522,679,6.082,680,6.082,681,4.058,682,5.522]],["t/56",[4,0.425,5,3.581,37,3.631,39,3.397,77,2.323,99,3.09,135,6.378,142,3.853,145,5.538,147,4.888,199,5.765,372,5.344,558,6.037,683,7.528]],["t/58",[5,3.201,37,3.246,54,2.244,55,3.749,60,5.701,76,4.157,77,1.678,96,1.503,99,2.761,140,2.538,145,4.95,147,4.368,151,5.701,187,4.625,200,5.396,320,4.49,324,3.977,412,5.153,465,4.625,484,3.977,684,6.728,685,6.728,686,6.728,687,6.728]],["t/60",[31,3.335,32,3.335,36,2.072,38,2.574,39,2.983,43,1.693,45,2.801,47,3.617,50,2.808,66,2.285,70,2.352,71,2.187,77,1.649,80,2.68,81,1.995,94,0.291,96,1.013,99,1.861,109,2.801,114,3.025,145,3.335,162,3.472,169,2.127,177,3.335,206,3.335,207,1.99,256,1.469,266,2.321,274,2.187,299,3.636,327,2.526,331,3.116,332,2.127,347,2.801,394,3.335,494,4.116,495,4.116,549,2.438,630,3.472,688,4.534,689,3.235,690,2.285,691,4.116,692,3.025,693,4.534,694,2.943,695,3.841,696,3.841,697,4.534,698,4.534,699,3.636,700,4.534,701,2.738,702,3.636,703,4.534,704,4.116]],["t/62",[10,3.636,36,3.396,47,5.054,54,2.478,72,5.846,77,1.853,97,3.353,228,4.824,306,5.959,431,6.746,485,5.69,546,5.466,705,5.275,706,7.43]],["t/64",[8,6.464,9,1.909,63,5.722,64,4.41,96,1.801,161,5.93,496,6.83,707,8.061,708,7.318,709,7.318]],["t/66",[7,1.2,36,1.934,38,2.402,47,2.315,48,3.568,50,1.797,53,1.985,54,1.411,56,1.959,64,2.315,65,2.501,66,3.167,67,2.8,74,1.959,85,2.908,90,2.132,94,0.272,99,2.579,110,3.113,111,3.24,139,2.166,141,3.841,166,2.45,170,2.402,181,2.677,190,3.003,207,1.273,218,2.732,266,3.216,269,1.663,286,2.908,337,3.585,347,4.631,353,1.985,354,2.747,392,1.862,449,2.237,465,4.319,466,2.501,470,3.585,516,2.823,533,3.003,549,2.275,600,3.585,639,3.003,708,3.841,710,3.841,711,3.585,712,3.378,713,3.113,714,3.841,715,3.841,716,4.193,717,4.231,718,4.231,719,3.393,720,4.231,721,3.113,722,3.841,723,2.501,724,3.585,725,3.24]],["t/68",[5,4.19,53,4.133,166,5.1,186,6.253]],["t/70",[31,6.193,32,6.193,93,4.69,215,5.786,293,6.446,629,7.132,726,4.779]],["t/72",[9,1.575,14,2.95,15,2.016,26,2.666,40,1.514,41,1.262,50,2.301,54,1.161,55,1.94,58,2.444,64,1.905,67,1.551,77,1.659,78,1.755,81,1.532,89,2.651,90,3.352,93,5.969,94,0.482,99,1.429,114,2.323,139,1.782,144,2.561,165,3.161,166,2.016,169,1.634,175,2.731,190,2.471,207,2.001,209,0.618,278,1.729,279,1.729,309,1.644,347,2.151,356,3.161,382,2.471,470,2.95,485,2.666,496,2.95,504,2.203,515,2.016,567,3.161,629,2.95,630,2.666,640,2.792,654,2.666,726,3.776,727,3.161,728,2.792,729,2.95,730,3.481,731,3.481,732,3.481,733,3.481,734,2.792,735,3.161,736,2.792,737,3.481,738,2.95,739,3.481,740,3.481,741,3.161,742,3.161,743,3.161,744,3.161,745,3.161,746,3.481]],["t/74",[67,3.268,92,4.013,94,0.472,99,3.761,190,5.207,199,5.617,341,4.247,403,6.659,640,5.882,692,4.894,747,5.396,748,7.334,749,4.335,750,5.882,751,6.214,752,6.659]],["t/76",[4,0.479,41,3.423,43,2.427,71,3.135,78,3.275,88,4.466,96,1.894,112,3.763,185,5.506,212,4.613,228,4.219,363,3.841,753,6.498,754,5.506,755,5.659,756,6.498,757,6.498,758,6.498,759,6.498,760,5.9,761,5.9,762,6.498]],["t/78",[4,0.458,17,3.215,51,3.949,52,3.673,53,2.854,66,3.066,96,2.041,105,2.976,166,3.522,207,1.83,289,4.058,309,1.846,347,3.758,350,4.058,360,3.595,509,4.658,533,5.763,534,4.318,535,4.878,657,3.522,676,5.522,763,3.163,764,2.78,765,4.658,766,3.949,767,5.522,768,5.522,769,4.878,770,4.878]],["t/80",[4,0.326,10,3.836,37,2.785,53,2.709,56,2.674,69,4.099,78,2.91,94,0.504,96,1.29,158,2.785,204,4.368,255,4.892,277,3.969,280,3.278,324,3.413,352,2.785,358,3.749,409,3.853,547,4.422,649,3.654,657,3.343,754,6.642,755,3.853,771,4.892,772,5.774,773,3.853,774,4.099,775,5.242,776,5.767,777,5.242,778,5.242,779,5.774,780,5.774]],["t/82",[4,0.48,35,4.703,40,1.079,52,2.491,53,2.893,56,3.168,62,2.834,66,3.721,72,1.57,78,3.107,88,1.705,89,1.214,90,2.667,92,3.744,93,1.382,94,0.579,96,1.649,97,1.119,104,3.57,105,2.018,131,1.079,166,3.57,169,1.164,171,1.705,175,2.078,204,4.564,206,1.825,207,1.241,217,1.119,226,0.495,258,1.382,266,1.27,278,1.232,279,2.048,289,1.656,290,1.57,295,4.484,318,1.066,331,1.705,341,3.962,350,2.752,358,1.611,359,1.382,360,3.128,382,2.927,444,0.835,484,1.466,509,1.9,518,1.761,533,2.927,575,1.99,601,1.909,608,2.253,764,1.134,765,1.9,766,1.611,781,1.9,782,1.251,783,1.498,784,2.481,785,5.597,786,2.481,787,4.484,788,1.656,789,2.481,790,2.481,791,2.481,792,2.253,793,1.334,794,1.9,795,4.484,796,2.481,797,1.437,798,2.253,799,2.253,800,1.466,801,2.481,802,2.481,803,1.533,804,2.481]],["t/84",[53,2.824,66,3.033,78,4.582,92,3.293,96,1.344,143,4.826,227,3.907,279,4.513,301,4.136,328,4.016,354,3.907,358,3.907,386,4.608,484,3.557,614,4.826,615,5.099,616,5.099,617,5.099,782,3.033,805,4.427,806,3.181,807,5.464,808,6.018,809,5.099,810,7.319,811,5.464,812,5.464,813,5.464,814,5.464]],["t/86",[4,0.417,7,1.01,19,0.968,34,1.786,35,2.322,39,1.524,47,1.848,74,2.45,76,3.269,77,1.999,80,1.997,81,1.487,92,2.895,93,1.882,94,0.475,96,0.755,119,2.709,158,1.63,180,2.193,189,1.786,203,1.567,209,0.744,226,0.524,236,3.067,257,2.709,266,1.729,280,1.918,288,2.862,333,1.756,351,2.193,352,1.63,358,2.193,444,1.137,601,1.564,624,1.703,649,2.138,667,3.067,773,2.254,776,2.485,782,2.667,794,2.587,815,2.862,816,3.378,817,3.378,818,5.292,819,3.378,820,3.378,821,5.292,822,5.292,823,5.527,824,3.269,825,5.292,826,2.709,827,2.862,828,2.322,829,3.067,830,2.04,831,2.254,832,3.378,833,2.322,834,3.067,835,3.378,836,3.378,837,3.378,838,3.067,839,5.292,840,3.378,841,2.709,842,3.378,843,2.193,844,2.862,845,3.067,846,3.378,847,3.378,848,3.378,849,3.378,850,3.378,851,3.378]],["t/88",[4,0.319,9,1.34,41,2.804,43,2.113,66,2.852,74,2.62,78,2.852,80,3.345,81,2.491,94,0.497,95,3.153,99,2.323,105,3.784,112,3.277,175,2.852,181,3.581,190,4.017,324,3.345,332,2.656,357,3.776,360,3.345,363,3.345,516,3.776,588,4.334,754,4.795,763,2.943,852,4.795,853,7.733,854,5.659,855,4.539,856,5.659,857,4.795,858,5.659,859,5.659,860,4.334,861,5.138]],["t/90",[4,0.53,41,3.405,92,3.515,185,5.444,217,2.899,341,3.72,482,4.416,692,4.287,721,4.727,862,6.425,863,6.425,864,6.425,865,6.425,866,6.425,867,6.425,868,6.425,869,6.425,870,7.133,871,8.418,872,6.425,873,6.425,874,5.833]],["t/92",[4,0.384,10,2.31,34,2.496,35,3.245,41,1.712,43,2.543,74,2.186,89,2.31,92,4.369,94,0.596,96,1.055,202,3.065,206,5.875,294,4,298,3.616,303,2.539,320,3.151,332,2.216,363,4.72,464,4.287,510,6.182,624,2.38,625,4,857,4,875,3.616,876,4.722,877,3.065,878,4.287,879,4.722,880,4.722,881,4.287,882,4.287,883,7.251,884,4.722,885,4.722,886,4.722,887,3.474,888,2.988,889,4.722,890,4.287,891,4.722,892,4.287,893,3.352,894,4.287,895,4.287]],["t/94",[4,0.248,43,1.641,71,2.119,94,0.415,294,5.475,302,3.365,332,3.032,352,2.119,367,3.119,392,1.934,571,3.723,590,3.02,763,2.285,778,3.989,843,2.853,881,6.958,883,6.958,892,3.989,893,3.119,894,3.989,895,3.989,896,6.146,897,3.723,898,3.989,899,5.869,900,6.462,901,6.462,902,4.394,903,3.524,904,3.524,905,4.394,906,5.182,907,3.989,908,4.394,909,3.989,910,3.989,911,3.989,912,6.462,913,4.394,914,3.989,915,4.394,916,4.394,917,6.462,918,3.723,919,3.365,920,4.394,921,4.394,922,6.462,923,6.462,924,3.233,925,3.989]],["t/96",[4,0.482,188,4.836,280,3.732,359,3.662,449,3.475,466,3.885,624,3.313,630,5.034,649,4.16,694,4.268,726,3.732,770,5.271,805,4.836,926,6.573,927,6.573,928,6.852,929,6.573,930,5.968,931,6.573,932,6.573,933,6.573,934,6.573,935,5.968,936,5.968]],["t/99",[34,4.322,40,3.555,112,4.734,189,4.322,358,5.308,503,5.174,649,5.174,833,5.62,937,8.176]],["t/101",[4,0.468,7,0.965,34,2.673,35,3.476,37,2.439,43,1.888,77,1.261,81,2.226,94,0.46,96,1.597,142,2.588,158,2.439,188,3.72,189,2.673,208,3.72,217,2.282,226,0.406,363,2.989,387,4.591,444,2.407,449,2.673,519,3.374,624,2.549,632,4.591,649,3.2,723,2.989,782,2.549,833,3.476,888,3.2,928,4.055,938,4.591,939,4.284,940,5.057,941,4.591,942,5.057,943,5.057,944,5.057,945,5.057,946,5.057,947,5.057,948,3.59,949,5.057,950,5.057,951,4.591,952,5.057,953,5.057,954,4.591]],["t/103",[4,0.31,40,2.39,77,2.164,81,2.419,88,3.777,89,2.689,92,3.007,96,1.228,158,2.651,181,3.478,188,4.043,189,2.905,302,6.643,364,3.478,444,2.551,456,6.078,460,4.99,600,4.656,624,2.77,694,3.568,773,3.667,928,4.407,941,6.881,955,4.99,956,4.99,957,7.579,958,5.496,959,5.496,960,4.656,961,4.407,962,6.421,963,5.496,964,5.496,965,4.99]],["t/105",[4,0.316,17,2.962,34,2.962,43,2.093,58,2.528,63,3.978,64,3.066,70,1.993,189,2.962,266,2.868,278,2.782,292,3.462,333,1.508,359,3.122,372,5.453,456,4.494,463,5.088,503,3.546,504,3.546,546,4.123,624,2.824,649,3.546,833,3.852,834,5.088,841,4.494,878,5.088,888,3.546,955,5.088,966,7.681,967,5.604,968,5.604,969,5.604,970,5.604,971,5.604,972,2.868,973,5.604,974,5.088,975,5.088,976,5.604]],["t/107",[4,0.417,7,0.645,10,1.653,54,1.765,63,2.398,64,3.569,71,1.63,77,0.843,92,1.848,94,0.217,118,1.997,140,2.46,147,2.193,170,1.918,189,1.786,203,1.567,215,2.322,222,2.254,226,0.425,269,2.08,289,2.254,290,3.349,303,1.816,316,2.322,328,2.254,368,2.862,369,2.862,372,5.241,409,4.353,484,1.997,549,1.816,568,2.709,578,3.067,639,3.756,649,2.138,658,3.067,692,2.254,694,4.793,726,1.918,771,2.862,782,1.703,806,1.786,887,2.485,907,3.067,928,5.921,977,2.322,978,4.804,979,5.923,980,3.067,981,2.862,982,3.349,983,3.378,984,3.378,985,3.378,986,6.523,987,3.531,988,3.378,989,3.378,990,2.709,991,2.862,992,3.378,993,4.244,994,3.378,995,3.378,996,1.918,997,3.067,998,3.378,999,3.378,1000,3.378,1001,2.862,1002,3.378,1003,3.378,1004,3.067,1005,3.378,1006,2.587,1007,2.709]],["t/109",[4,0.455,31,5.93,41,2.923,90,4.063,92,4.41,391,5.54,408,6.173,503,5.101,694,5.233,925,7.318]],["t/111",[31,6.759,32,6.759,34,3.25,70,2.187,189,3.25,217,2.774,269,2.416,278,3.052,346,4.643,513,5.309,649,3.891,694,3.991,702,4.93,773,4.102,833,4.225,875,4.708,972,3.147,1008,6.148,1009,5.582,1010,6.148,1011,6.148,1012,5.209,1013,5.582,1014,4.102,1015,6.148,1016,6.148]],["t/113",[4,0.17,7,0.924,19,1.388,43,1.808,61,2.076,66,1.522,70,1.074,71,3.661,77,0.753,94,0.652,102,1.652,107,5.135,140,1.826,170,2.749,203,0.894,209,0.344,215,2.076,226,0.389,319,2.313,333,2.786,334,2.726,359,1.683,392,1.329,471,4.15,657,1.749,725,2.313,1014,3.231,1017,3.606,1018,1.652,1019,3.514,1020,2.742,1021,2.742,1022,3.02,1023,2.742,1024,3.02,1025,4.396,1026,3.02,1027,6.061,1028,3.02,1029,3.02,1030,3.02,1031,3.02,1032,3.02,1033,3.02,1034,3.02,1035,3.02,1036,3.02,1037,3.02,1038,2.742,1039,3.02,1040,3.02,1041,3.02,1042,3.02,1043,3.02,1044,3.02,1045,2.742]],["t/115",[4,0.38,19,1.331,39,3.036,53,2.179,64,5.418,70,1.652,90,2.341,94,0.509,170,5.758,203,2.342,226,0.541,280,2.637,333,2.825,334,2.92,364,2.939,380,3.935,428,3.099,517,2.869,530,3.557,547,3.557,692,3.099,782,3.391,800,2.745,824,4.157,1019,2.151,1046,4.217,1047,4.217,1048,4.217]],["t/117",[4,0.482,58,3.855,160,5.701,466,5.05,788,5.701,1049,8.544]],["t/119",[4,0.567,43,2.775,96,2.063,132,5.275,160,4.958,788,6.164,806,3.928,888,4.702,890,6.746,914,6.746,1050,7.43,1051,7.43]],["t/121",[0,5.023,3,5.538,4,0.425,11,5.344,84,4.194,94,0.484,484,4.45,487,5.765,681,5.023,734,6.037,771,6.378,936,6.835,1052,6.835,1053,6.378,1054,6.835]],["t/124",[4,0.449,205,4.068,226,0.639,277,5.463,657,4.602,896,7.721,1055,6.374,1056,7.948,1057,7.948,1058,6.734]],["t/126",[3,3.183,4,0.473,18,3.314,40,1.882,81,1.904,84,2.411,94,0.539,142,2.215,187,2.974,205,2.215,226,0.348,277,2.974,351,2.809,375,3.496,503,2.738,557,4.893,619,3.314,657,2.506,794,3.314,824,2.673,843,2.809,896,5.124,906,3.47,1055,3.47,1059,6.896,1060,4.327,1061,4.327,1062,6.389,1063,6.389,1064,4.327,1065,7.615,1066,6.389,1067,4.327,1068,6.389,1069,6.389,1070,4.327,1071,4.327,1072,4.327,1073,3.666,1074,4.327,1075,4.327,1076,6.389,1077,4.327,1078,4.327,1079,3.183,1080,3.929,1081,5.801,1082,3.929,1083,4.327,1084,3.666]],["t/128",[4,0.557,18,5.476,81,3.147,277,4.915,318,3.072,375,4.934,409,4.771,503,4.525,557,5.476,619,5.476,774,5.076,794,5.476,906,5.734,919,5.476,1058,6.058,1085,6.492]],["t/130",[4,0.442,81,3.45,84,4.368,351,5.089,774,5.565,783,4.734,794,6.003,906,6.287,919,6.003,1058,6.642,1086,7.839,1087,7.839]],["t/132",[4,0.49,34,3.557,40,3.772,96,1.503,139,3.444,158,3.246,226,0.541,293,5.153,392,2.961,449,3.557,451,3.82,466,3.977,918,7.35,919,5.153,1088,5.396,1089,5.701,1090,5.396,1091,6.109,1092,6.728,1093,6.728,1094,6.109]],["t/134",[33,9.518,35,3.386,38,2.797,40,2.142,74,2.281,81,2.168,84,2.744,139,2.521,205,2.521,226,0.396,276,4.472,346,2.797,352,2.376,444,1.658,556,7.551,619,3.772,630,3.772,643,3.117,657,2.852,755,3.287,888,4.442,896,5.629,904,5.629,996,2.797,1055,3.95,1059,4.472,1065,6.372,1081,4.472,1085,4.472,1095,3.497,1096,4.926,1097,4.926,1098,2.562,1099,4.926,1100,4.926,1101,4.926,1102,4.926,1103,4.173,1104,3.497,1105,4.173]],["t/136",[34,5.075,84,3.749,94,0.433,147,4.368,392,2.961,530,5.153,571,5.701,643,4.258,903,6.957,909,7.876,910,7.876,911,6.109,918,5.701,919,5.153,1090,5.396,1104,4.776,1106,6.728,1107,6.728,1108,6.728]],["t/138",[84,4.14,226,0.597,258,5.147,392,3.27,465,5.107,643,4.702,755,4.958,888,4.702,904,5.959,924,5.466,1089,6.295,1104,5.275,1105,6.295,1109,7.43,1110,7.43]],["t/140",[4,0.542,10,3.566,34,3.853,52,3.137,81,2.286,84,2.894,89,2.542,94,0.334,96,1.628,208,3.822,226,0.586,277,5.009,444,1.749,619,3.978,624,2.618,643,5.328,657,3.008,682,8.726,755,3.467,763,2.702,793,2.793,887,3.822,1094,4.717,1103,4.402,1104,3.688,1105,7.133,1111,7.288,1112,5.195,1113,5.195,1114,3.978,1115,5.195]],["t/142",[4,0.475,40,3.66,50,3.575,90,4.243,408,6.446,1116,6.751,1117,8.418]],["t/145",[4,0.313,49,5.244,50,2.356,73,2.715,94,0.654,203,1.643,207,1.67,209,1.123,226,0.613,228,3.603,317,6.988,318,2.384,320,3.703,333,1.493,392,2.442,515,4.418,524,3.428,654,4.249,747,4.082,793,2.984,1017,2.093,1019,2.569,1118,3.512,1119,2.5,1120,4.702]],["t/147",[4,0.256,9,1.074,40,1.971,49,4.544,50,2.808,58,2.046,70,2.352,73,2.218,74,2.099,94,0.632,96,1.013,104,5.28,149,4.116,169,2.127,189,2.397,207,1.364,209,0.89,226,0.531,266,2.321,278,2.251,280,3.754,286,3.116,309,2.603,318,1.948,333,1.22,373,3.218,374,3.472,377,4.116,392,1.995,515,2.625,524,2.801,546,3.335,592,3.841,654,3.472,694,2.943,747,3.335,773,4.412,776,3.335,793,2.438,924,3.335,1121,3.116,1122,4.534,1123,4.534,1124,3.841]],["t/149",[4,0.304,19,2.658,48,5.266,49,3.706,50,2.29,58,2.433,73,2.638,94,0.697,179,3.827,209,0.615,226,0.601,309,2.27,353,2.53,366,3.187,392,2.373,512,3.967,515,3.122,546,3.967,654,4.129,793,2.899,1018,2.95,1125,2.497,1126,4.568,1127,4.324,1128,6.337,1129,4.568,1130,5.392]],["t/151",[4,0.31,9,1.301,19,1.575,50,2.334,67,2.449,73,2.689,74,4.696,75,6.078,94,0.652,169,2.579,209,0.627,226,0.609,317,6.638,334,1.85,366,3.248,391,3.777,392,2.419,481,4.656,516,5.789,601,3.509,1019,2.545,1119,2.484,1131,4.656,1132,5.496]],["t/153",[4,0.34,43,3.626,50,2.556,73,2.945,94,0.651,162,6.173,166,4.668,175,3.033,203,2.387,226,0.648,303,3.236,333,1.62,355,5.464,392,2.649,824,3.718,1018,3.293,1019,2.786,1129,5.099,1133,5.464,1134,6.018,1135,8.061,1136,5.464]],["t/155",[4,0.323,39,4.29,50,2.427,73,2.797,76,3.531,77,1.942,94,0.569,102,3.128,131,2.485,157,3.31,158,2.757,203,1.692,209,0.652,226,0.626,319,4.377,334,2.621,373,4.058,392,2.516,692,5.195,1017,3.34,1018,4.845,1019,2.647,1137,5.716,1138,7.786,1139,4.377]],["t/157",[4,0.433,35,3.852,43,2.093,50,2.38,53,2.63,54,1.869,61,3.852,73,2.742,94,0.656,96,1.252,97,2.528,170,3.182,204,5.253,226,0.617,333,1.508,341,3.245,367,3.978,392,2.466,609,3.978,763,2.914,787,4.748,795,4.748,826,6.16,975,6.974,1121,3.852,1140,5.604,1141,5.604,1142,5.604,1143,5.088]],["t/159",[4,0.347,28,4.225,43,2.296,50,2.611,73,3.008,94,0.656,171,5.62,197,4.364,209,0.932,210,6.315,226,0.657,333,1.655,392,2.706,724,5.209,766,3.991,844,5.209,1121,4.225,1144,8.177,1145,5.309,1146,6.148,1147,6.148]],["t/161",[4,0.399,40,2.16,43,2.637,50,2.999,53,3.314,58,2.242,70,1.767,73,2.431,74,2.301,78,2.504,94,0.528,96,1.577,97,2.242,131,3.071,189,2.627,204,2.768,207,2.125,226,0.568,278,2.467,279,2.467,280,2.821,286,3.415,316,3.415,333,1.337,354,3.226,359,2.768,373,3.527,374,3.805,382,5.013,392,2.187,457,4.511,583,3.415,609,3.527,614,3.985,694,3.226,726,4.01,773,3.315,776,3.655,1121,3.415,1148,6.412,1149,4.511]],["t/163",[4,0.276,40,2.123,50,2.962,53,2.292,58,2.203,70,1.737,73,2.389,74,2.261,78,2.461,94,0.604,96,1.818,105,3.982,131,3.033,169,2.292,189,2.582,204,2.721,209,0.796,226,0.561,278,2.425,279,2.425,280,2.773,286,3.356,316,3.356,318,3.814,333,1.314,354,3.17,358,3.17,373,3.467,374,3.74,382,4.952,392,2.149,459,4.434,694,3.17,773,3.259,776,3.593,1121,3.356,1126,5.91,1149,4.434,1150,4.434]],["t/165",[4,0.409,40,3.149,41,2.626,43,1.922,50,3.075,58,2.323,70,1.831,73,2.519,74,2.384,94,0.539,96,1.15,99,2.972,112,4.851,131,3.149,181,3.258,189,2.721,226,0.582,278,2.556,280,2.923,286,3.538,333,1.386,359,2.868,373,3.655,374,3.942,382,5.141,392,2.266,458,4.674,583,3.538,694,3.342,773,3.435,776,3.787,777,4.674,888,3.258,1119,2.373,1121,3.538,1151,7.242]],["t/167",[4,0.349,50,3.142,66,3.729,68,3.758,71,4.734,73,2.025,94,0.614,96,0.924,131,1.8,171,2.845,193,7.024,194,3.758,195,3.758,203,1.83,209,0.705,226,0.595,303,2.225,304,3.758,320,2.762,333,2.479,334,2.956,392,1.821,519,2.762,530,3.169,769,3.319,781,3.169,803,2.557,972,2.118,1017,1.561,1019,1.916,1090,3.319,1104,2.938,1139,3.169,1152,4.139,1153,8.206,1154,3.319,1155,4.139]],["t/169",[4,0.333,50,2.503,53,2.766,73,2.884,94,0.646,104,6.233,192,6.735,204,3.284,226,0.639,278,2.926,301,4.051,333,2.139,364,3.73,391,4.051,392,2.594,515,3.413,524,3.641,711,4.993,792,5.351,803,3.641,1017,2.223,1120,4.993]],["t/171",[4,0.316,7,1.8,19,2.202,50,2.38,73,2.742,77,2.352,94,0.606,157,4.448,196,7.988,198,7.425,203,1.659,209,0.639,226,0.617,334,2.585,391,3.852,392,2.466,515,4.448,1019,2.595,1139,4.291,1156,4.748,1157,6.974]],["t/173",[27,4.843,40,3.408,43,2.927,50,3.329,58,3.537,72,4.961,74,3.63,82,6.642,266,4.012,1116,6.287,1158,6.003,1159,6.287]],["t/175",[4,0.367,40,1.925,49,4.467,50,3.836,54,2.168,61,3.044,72,2.802,74,3.565,94,0.545,96,0.989,112,3.763,131,2.826,137,3.258,202,2.875,203,1.311,206,3.258,209,0.741,226,0.522,266,2.267,278,4.485,298,3.391,317,6.021,324,2.617,341,2.564,358,4.998,382,4.613,384,7.186,788,2.955,1017,1.67,1019,2.05,1119,1.451,1158,6.495,1160,4.428,1161,4.428,1162,4.428,1163,4.428]],["t/177",[4,0.367,43,2.427,50,2.76,94,0.545,203,1.924,206,4.781,209,0.967,226,0.522,317,6.021,320,5.659,358,6.13,384,7.186,519,4.336,575,5.211,702,5.211,755,4.336,1019,3.009,1119,2.13,1164,6.495]],["t/179",[17,4.202,43,2.968,484,4.698,589,6.734,624,4.006,699,6.374,719,6.374,788,5.304,1133,7.216,1165,7.948,1166,6.734]],["t/181",[4,0.421,39,1.895,40,4.171,43,1.568,58,3.367,77,1.861,80,2.482,81,2.75,94,0.617,96,0.938,140,2.357,209,0.943,226,0.502,260,2.887,274,2.026,293,3.216,296,3.216,297,2.727,363,2.482,452,3.558,519,2.802,570,3.558,603,3.813,604,3.813,657,2.432,699,5.012,783,2.536,961,3.368,1116,3.368,1119,1.376,1154,3.368,1167,3.813,1168,6.249,1169,3.47,1170,4.2,1171,6.249,1172,2.802,1173,4.2,1174,4.2,1175,4.2,1176,3.813,1177,4.2,1178,1.919,1179,3.813,1180,3.813]],["t/183",[4,0.477,19,1.503,40,3.679,54,1.749,58,3.817,94,0.642,164,5.493,169,3.97,175,2.643,189,5.098,197,3.722,205,2.684,209,0.965,210,5.815,226,0.68,366,4.335,515,3.036,800,3.099,844,4.442,1181,6.215,1182,5.243]],["t/185",[3,4.248,4,0.326,34,4.144,40,3.87,43,2.156,58,2.605,71,2.785,94,0.371,96,1.29,189,3.052,203,1.709,226,0.464,269,2.269,279,3.892,292,3.567,327,3.217,363,3.413,426,3.003,513,3.749,797,3.343,888,4.961,1116,6.287,1118,3.654,1183,7.656,1184,7.839,1185,5.774,1186,3.749,1187,5.774]],["t/187",[4,0.399,19,1.424,36,2.271,43,2.637,70,1.767,77,2.049,94,0.65,203,2.432,209,0.805,218,2.16,226,0.568,256,0.935,515,4.089,624,4.51,764,2.271,782,2.504,788,4.712,800,2.937,893,6.972,1119,2.314,1159,3.985,1188,7.062,1189,7.062,1190,7.062,1191,4.511,1192,2.431]],["t/189",[7,1.561,67,3.643,169,3.837,209,0.932,309,2.481,366,4.833,507,6.928,806,4.322,841,6.557]],["t/191",[4,0.557,19,1.606,27,3.462,41,2.785,94,0.635,96,1.252,140,2.114,157,5.075,158,4.227,169,2.63,209,0.999,226,0.704,309,1.7,366,3.312,806,4.633,1017,2.114,1114,4.291,1125,3.557,1193,3.546,1194,4.291,1195,5.604]],["t/193",[4,0.544,27,3.239,41,2.66,48,2.977,94,0.693,96,1.171,169,2.46,209,1.045,226,0.68,309,1.591,318,3.937,366,3.099,793,2.819,806,4.472,1114,4.015,1125,3.396,1145,3.404,1196,3.498,1197,6.479,1198,4.76,1199,4.76]],["t/195",[4,0.532,41,2.785,48,3.182,94,0.672,96,1.252,169,2.63,209,0.999,226,0.617,309,1.7,318,3.3,366,3.312,644,3.546,716,5.848,793,3.013,806,4.633,843,3.638,1114,4.291,1125,2.595,1197,5.882,1198,5.088,1199,5.088,1200,5.604]],["t/197",[4,0.389,80,4.073,81,3.033,88,6.054,94,0.68,96,1.968,179,4.892,209,0.786,226,0.554,260,4.736,297,4.474,309,2.091,444,2.965,507,5.839,990,5.526]],["t/199",[4,0.53,43,2.399,53,3.015,90,3.238,94,0.541,95,3.58,96,1.88,104,5.77,169,3.015,204,3.58,226,0.755,278,3.19,333,2.266,448,5.444,515,3.72,657,3.72,755,4.287,800,3.798]],["t/201",[4,0.333,50,3.375,53,2.766,73,2.884,94,0.646,104,6.233,192,7.621,204,3.284,226,0.639,278,2.926,301,4.051,333,2.139,364,3.73,392,2.594,515,3.413,524,3.641,711,4.993,803,3.641,1017,2.223,1120,4.993]],["t/203",[4,0.273,43,3.025,53,2.272,64,4.839,66,2.44,94,0.446,96,1.549,147,3.144,166,5.806,170,2.749,175,3.495,203,2.053,207,1.457,215,4.765,226,0.389,258,2.698,333,1.303,392,2.131,469,2.804,487,3.708,517,2.991,558,3.883,601,2.242,639,3.437,764,2.213,782,2.44,824,2.991,972,2.478,1019,2.242,1131,4.102,1192,2.369,1201,4.842,1202,6.295,1203,3.231,1204,4.396,1205,4.396,1206,4.396,1207,3.562,1208,4.396,1209,4.842]],["t/205",[4,0.378,19,1.32,39,3.018,53,2.162,64,5.405,70,1.639,90,2.322,94,0.506,166,5.544,203,2.717,226,0.538,280,2.616,333,2.82,334,2.909,364,2.916,380,3.903,428,3.074,517,2.846,547,3.528,692,3.074,782,3.372,800,2.723,824,4.133,1019,2.133,1046,4.183,1047,4.183,1048,4.183,1202,6.073]],["t/207",[53,3.629,96,1.727,97,3.489,166,5.482,204,4.308,217,3.489,278,3.839,359,4.308,401,4.67,449,4.088,811,7.021,1210,5.689]],["t/209",[4,0.405,7,1.726,17,2.082,43,2.224,77,2.144,94,0.659,157,5.236,175,1.985,181,3.769,203,2.677,207,1.185,209,0.679,216,2.897,226,0.577,292,2.433,303,2.118,309,1.195,334,2.417,341,4.978,346,2.236,350,6.034,504,2.492,547,3.016,574,5.283,761,3.576,763,3.097,1156,6.084,1211,3.938,1212,3.016,1213,2.492,1214,3.938,1215,3.938]],["t/211",[53,3.629,96,1.727,97,3.489,204,4.308,217,3.489,278,3.839,350,6.317,359,4.308,401,4.67,449,4.088,617,6.552,1210,5.689]],["t/213",[4,0.49,94,0.675,160,3.099,203,1.992,226,0.636,318,1.996,332,2.179,333,1.811,334,1.563,360,5.127,361,4.217,362,3.725,455,3.015,471,3.713,518,4.777,601,2.151,657,2.689,763,2.415,877,3.015,1017,1.752,1019,3.116,1193,2.939,1216,5.701,1217,5.396,1218,5.396,1219,5.396,1220,5.701,1221,6.109,1222,6.109,1223,4.645,1224,4.645,1225,4.217]],["t/215",[4,0.384,94,0.562,96,1.521,105,4.277,203,2.016,218,2.961,226,0.547,332,3.195,333,1.832,360,5.167,518,4.833,568,5.46,582,6.182,583,4.68,1216,5.769,1217,5.46,1218,5.46,1219,5.46,1220,5.769,1225,6.182]],["t/217",[4,0.351,19,1.781,94,0.4,139,4.216,203,2.438,226,0.499,318,3.539,333,1.673,360,4.868,362,4.984,518,4.412,584,5.642,585,5.642,586,5.642,657,3.599,783,3.753,1095,5.847,1216,5.266,1217,6.605,1218,4.984,1219,4.984,1226,6.215,1227,4.984,1228,6.215,1229,6.215]],["t/219",[4,0.404,94,0.635,203,2.117,226,0.575,333,1.924,334,2.407,360,5.33,518,5.076,1017,2.697,1217,5.734,1218,5.734,1219,5.734,1220,6.058,1221,6.492,1222,6.492,1230,6.058]],["t/221",[53,3.629,96,1.727,97,3.489,204,4.308,217,3.489,278,3.839,359,4.308,360,5.596,401,4.67,449,4.088,812,7.021,1210,5.689]],["t/223",[4,0.373,19,2.237,41,1.644,43,2.914,78,2.285,92,2.481,94,0.612,96,1.477,112,2.625,181,2.869,203,1.957,207,1.364,209,0.754,226,0.531,292,2.801,309,1.376,332,2.127,333,2.1,334,2.627,391,3.116,484,2.68,487,3.472,639,4.693,713,3.335,800,2.68,996,2.574,1017,2.943,1119,2.557,1125,3.971,1164,3.472,1169,3.276,1212,3.472,1231,6.612,1232,4.116,1233,3.472,1234,3.841]],["t/225",[4,0.452,7,1.371,25,3.158,39,1.777,41,1.428,67,3.2,70,1.401,74,1.824,76,2.433,77,1.485,89,1.927,94,0.649,96,0.88,109,2.433,157,4.158,158,1.9,199,4.56,200,3.158,201,2.897,203,1.763,209,0.98,226,0.577,327,2.194,332,1.848,333,1.603,363,2.328,391,2.707,401,2.379,516,2.628,763,2.048,764,1.8,788,2.628,806,3.796,1181,5.046,1192,1.927,1230,3.337,1235,5.407,1236,5.407,1237,5.955,1238,3.938,1239,5.955,1240,5.955,1241,5.955,1242,3.337,1243,3.938,1244,3.938,1245,3.337]],["t/227",[4,0.357,9,1.009,19,2.763,89,2.086,94,0.535,96,0.952,99,2.593,103,2.844,157,3.659,171,2.93,209,0.486,226,0.508,309,2.285,353,3.907,469,4.821,508,3.136,827,5.353,855,3.418,899,7.382,974,3.87,987,2.844,1119,1.397,1125,4.682,1169,1.789,1246,4.262,1247,2.93,1248,4.262,1249,6.318,1250,5.556,1251,4.262,1252,4.262,1253,4.262,1254,4.262]],["t/229",[9,2.223,41,2.33,51,6.716,78,3.238,92,3.515,112,3.72,309,2.555,386,4.92,538,6.096,539,8.296,1207,4.727,1233,4.92,1255,5.466,1256,6.425]],["t/231",[4,0.436,77,2.197,94,0.609,203,2.803,209,0.645,226,0.622,292,3.496,309,1.717,318,2.432,319,5.922,327,3.153,367,4.017,764,2.586,993,4.539,1119,2.534,1124,8.398,1192,2.769,1257,5.138,1258,5.659,1259,7.733,1260,7.733,1261,5.659]],["t/233",[4,0.296,9,1.241,10,2.565,39,3.817,57,3.404,70,1.865,77,1.308,94,0.589,96,1.638,97,2.366,203,1.552,209,0.598,217,2.366,226,0.421,258,2.921,279,4.55,292,3.239,318,2.253,333,1.411,334,2.469,341,5.584,357,3.498,764,2.396,782,2.643,897,4.442,972,2.684,1192,2.565,1262,6.659,1263,6.215,1264,4.76,1265,6.215]],["t/235",[4,0.313,10,2.715,39,3.934,57,3.603,77,1.384,94,0.561,96,1.704,203,1.643,209,0.633,226,0.446,279,4.662,318,2.384,333,1.493,334,2.568,341,5.7,451,3.151,760,5.038,764,2.536,782,2.797,897,4.702,1118,3.512,1192,2.715,1262,5.038,1263,6.464,1264,5.038,1265,4.702,1266,5.549,1267,5.549]],["t/237",[77,2.039,92,4.474,142,4.185,209,0.932,719,6.557,726,4.642,1268,5.456,1269,8.176,1270,8.176]],["t/239",[4,0.375,7,1.747,19,1.906,50,3.329,61,3.141,73,2.236,74,2.116,77,2.282,94,0.588,157,4.985,196,7.294,198,6.642,203,1.969,209,0.894,226,0.63,257,3.665,334,2.238,392,2.011,504,2.892,515,3.851,516,3.05,517,2.823,601,3.63,996,2.595,1001,3.872,1019,2.116,1139,3.5,1156,5.634,1157,6.038]],["t/242",[4,0.383,7,1.059,10,1.757,36,1.641,48,2.039,54,1.851,62,2.468,65,2.122,67,1.6,77,0.896,85,2.468,94,0.604,96,1.24,99,1.474,110,2.642,111,2.75,175,1.81,203,1.063,209,0.773,217,1.62,218,3.586,226,0.446,260,2.468,318,1.543,332,1.685,337,3.043,347,3.428,354,2.331,367,2.549,372,2.549,408,2.75,449,1.898,455,3.603,471,1.685,523,3.043,583,3.814,705,2.549,721,4.083,722,3.26,728,4.45,755,2.396,782,2.797,874,5.038,996,2.039,1143,3.26,1257,3.26,1271,3.043,1272,3.043,1273,3.591,1274,3.26,1275,3.591,1276,3.591,1277,3.043,1278,3.591,1279,3.591,1280,5.549,1281,3.591,1282,3.591,1283,3.591,1284,3.591,1285,3.591,1286,5.549,1287,3.591,1288,3.591,1289,3.591,1290,3.591,1291,2.88,1292,3.26,1293,3.591,1294,3.591]],["t/244",[4,0.502,5,2.028,7,1.206,19,1.222,41,1.546,51,2.767,77,1.576,85,2.93,90,2.148,92,2.332,94,0.535,96,1.411,97,1.923,139,2.182,140,1.608,157,3.659,158,3.048,179,3.026,203,1.871,209,0.486,218,3.62,226,0.669,254,4.839,292,2.633,333,2.026,334,2.127,352,2.056,366,2.519,513,2.767,788,2.844,806,3.34,972,2.182,1079,3.136,1255,2.767,1291,3.418,1295,4.262,1296,4.262,1297,4.262,1298,4.262,1299,4.262,1300,3.136,1301,4.262,1302,4.262,1303,4.262,1304,3.87,1305,4.262,1306,4.262,1307,4.262,1308,4.262]],["t/246",[4,0.266,9,1.891,36,2.158,41,1.712,43,1.763,57,4.421,78,2.38,86,3.474,92,2.583,94,0.562,96,1.055,112,2.734,160,3.151,203,1.398,209,0.538,218,2.053,226,0.379,274,2.278,333,1.271,347,5.726,473,4.369,678,4.287,689,2.31,712,2.539,736,5.461,749,4.025,764,2.158,782,3.432,1119,1.547,1169,1.982,1192,2.31,1207,3.474,1233,3.616,1309,4.287,1310,4.722,1311,3.787,1312,4.722,1313,4.722,1314,4.722,1315,4.722,1316,4.287,1317,4.722,1318,4.287,1319,4.722,1320,4.722]],["t/248",[1,2.575,4,0.407,9,1.902,19,1.716,26,6.152,41,1.438,67,2.667,89,1.94,94,0.699,109,2.45,121,2.513,209,0.916,226,0.481,301,2.726,332,1.861,357,4.812,391,2.726,401,2.395,450,3.601,515,2.296,764,1.813,766,5.215,769,6.442,875,3.037,961,3.18,972,2.03,993,3.18,1145,5.215,1192,1.94,1321,8.033,1322,3.966,1323,5.986,1324,3.601,1325,3.966,1326,3.36,1327,2.296,1328,3.966]],["t/250",[53,3.837,66,4.936,70,2.909,71,3.944,207,2.461,303,4.396,657,4.734,1329,6.015]],["t/252",[4,0.381,19,2.491,66,3.736,70,2.401,71,4.946,89,2.282,94,0.476,96,1.042,170,4.935,174,1.981,175,1.453,186,2.046,193,4.321,203,1.998,209,0.77,215,3.206,226,0.542,269,1.133,292,1.781,303,1.55,333,2.416,334,2.495,392,2.585,503,1.824,725,2.207,764,1.317,782,2.96,797,3.401,843,1.872,1014,1.924,1017,2.215,1018,2.552,1019,3.125,1020,2.617,1021,4.234,1104,3.311,1118,3.717,1192,1.41,1271,2.442,1330,6.749,1331,2.442,1332,4.664,1333,2.617,1334,2.883,1335,2.883,1336,2.442,1337,2.883]],["t/254",[4,0.416,7,0.784,19,1.178,51,2.668,66,3.713,67,1.831,71,4.594,76,2.538,77,1.025,94,0.526,96,0.918,139,2.103,140,1.55,142,2.103,144,3.023,170,4.971,193,3.023,203,2.421,209,0.469,226,0.592,269,2.416,332,1.928,333,1.106,334,1.383,449,2.172,513,2.668,768,3.73,972,2.103,1017,2.319,1018,2.248,1019,1.903,1125,2.847,1145,6.358,1193,3.891,1338,4.109,1339,3.73,1340,4.109,1341,4.109,1342,4.109,1343,6.148,1344,4.109,1345,4.109,1346,6.148]],["t/256",[4,0.297,17,1.775,19,1.51,25,2.693,66,1.693,67,1.496,70,2.312,71,4.429,77,0.838,94,0.674,95,1.871,97,1.515,114,2.241,142,1.719,161,2.471,174,2.308,193,2.471,203,1.924,209,0.601,217,1.515,218,2.29,226,0.423,289,2.241,303,2.832,331,2.308,332,1.576,333,2.151,334,1.773,381,2.845,392,1.478,513,2.18,562,2.845,624,1.693,764,2.407,782,1.693,960,2.845,972,1.719,1017,2.776,1018,3.556,1019,1.555,1104,4.613,1192,2.577,1193,4.113,1242,2.845,1331,2.845,1347,3.358,1348,3.358,1349,3.358,1350,5.267,1351,3.358,1352,3.358,1353,3.358,1354,3.358,1355,2.845,1356,3.358,1357,3.358,1358,3.358,1359,3.358,1360,3.358,1361,3.358]],["t/258",[53,3.629,66,4.772,96,1.727,97,3.489,204,4.308,217,3.489,278,3.839,359,4.308,401,4.67,449,4.088,810,7.021,1210,5.689]],["t/260",[4,0.475,62,5.786,258,4.69,266,4.309,548,7.132,751,7.132,797,4.874]],["t/262",[4,0.384,40,2.961,43,2.543,94,0.562,209,0.776,226,0.547,258,3.794,312,5.769,324,4.024,640,5.46,716,4.543,751,5.769,763,3.541,782,3.432,1362,8.741,1363,5.46,1364,6.809,1365,6.182,1366,6.809,1367,6.809,1368,6.809]],["t/264",[4,0.513,17,4.261,41,2.182,43,3.01,84,3.353,94,0.624,209,0.919,226,0.648,557,4.608,590,4.136,601,3.733,716,5.379,782,4.063,1365,7.319,1369,4.765,1370,5.464,1371,6.018,1372,6.018,1373,6.018,1374,5.464]],["t/266",[4,0.449,43,2.968,53,2.766,67,2.626,94,0.681,114,3.933,157,5.575,158,2.843,203,1.745,207,2.392,209,0.906,226,0.639,558,4.726,764,2.693,800,3.483,823,8.157,1191,5.351,1192,2.884,1212,4.513]],["t/268",[4,0.422,19,1.545,67,3.333,71,2.601,79,4.324,94,0.626,95,3.004,96,1.204,114,3.598,157,4.331,209,0.853,217,2.433,218,3.252,226,0.601,269,2.94,333,2.311,363,3.187,367,3.827,381,4.568,484,3.187,823,4.568,1331,4.568,1375,3.827,1376,4.895,1377,5.392,1378,4.324,1379,6.916,1380,5.392]],["t/270",[4,0.468,47,4.539,254,6.353,258,4.622,587,7.531,588,6.353,1136,7.531,1381,7.531]],["t/272",[4,0.369,36,2.04,41,1.618,43,2.441,57,2.897,77,2.44,94,0.583,96,0.997,113,3.781,118,2.638,139,3.958,175,2.249,203,2.803,207,1.343,209,0.745,226,0.525,256,0.84,286,3.067,309,1.983,332,2.094,449,2.359,469,2.584,574,3.283,710,4.052,723,2.638,726,2.534,742,4.052,766,2.897,1125,3.026,1207,3.283,1212,3.418,1355,3.781,1375,3.168,1376,4.052,1382,4.463,1383,4.463,1384,4.463,1385,4.463,1386,4.463,1387,4.463,1388,4.463,1389,4.463,1390,4.463,1391,4.463]],["t/274",[4,0.367,77,2.355,94,0.607,96,1.452,131,2.826,139,3.326,203,1.924,208,6.239,209,0.741,226,0.522,309,1.972,332,3.049,515,3.763,764,2.97,843,4.219,1119,2.13,1125,3.009,1192,3.18,1329,4.781,1392,6.498,1393,6.498,1394,6.498]],["t/276",[4,0.401,30,2.65,41,1.817,77,1.772,78,2.526,94,0.61,99,3.388,105,2.453,139,2.566,140,1.891,158,2.418,203,1.484,207,2.854,208,3.687,209,0.81,226,0.403,228,5.36,258,2.793,318,2.154,352,2.418,735,4.551,763,2.607,764,2.291,800,2.963,806,2.65,972,2.566,1192,2.453,1196,4.742,1379,3.558,1395,5.012,1396,4.247,1397,3.172,1398,3.838,1399,3.838,1400,3.838,1401,5.012,1402,5.012]],["t/278",[4,0.313,77,1.903,89,2.715,94,0.604,105,4.817,175,3.845,203,2.581,207,1.67,209,0.87,226,0.446,309,1.684,318,3.746,346,3.151,350,3.703,444,1.868,512,4.082,590,3.814,1196,3.703,1397,3.512,1398,4.249,1399,4.249,1400,4.249,1403,5.549,1404,5.549,1405,5.549,1406,5.549,1407,5.549,1408,5.549]],["t/280",[4,0.404,67,3.186,77,1.783,94,0.58,96,1.597,105,4.412,169,3.355,202,4.642,203,2.67,209,0.815,226,0.575,318,3.072,366,4.226,1397,4.525,1398,5.476,1399,5.476]],["t/282",[4,0.347,48,3.49,52,3.713,89,3.008,94,0.526,103,5.456,105,4.496,175,3.099,203,2.421,207,1.85,209,0.701,226,0.494,290,3.891,333,2.201,763,3.197,764,2.81,1192,3.008,1197,4.708,1397,6.197,1409,6.928,1410,5.209,1411,6.148]],["t/284",[4,0.258,52,5.2,67,2.963,71,2.204,77,1.955,89,2.236,94,0.504,96,1.021,103,3.05,105,3.254,139,2.339,140,3.247,169,2.145,189,2.416,203,2.549,207,1.375,209,0.758,226,0.367,256,0.86,318,1.964,331,4.571,332,2.145,512,3.362,546,3.362,574,3.362,597,4.149,764,2.089,960,3.872,972,2.339,987,3.05,1006,3.5,1192,2.236,1196,3.05,1396,3.872,1397,4.208,1398,5.093,1399,3.5,1400,3.5,1409,5.634,1412,4.57,1413,4.57,1414,4.57,1415,3.872,1416,4.57]],["t/286",[4,0.411,7,0.992,17,2.746,48,4.138,77,1.818,94,0.541,105,3.566,189,2.746,203,2.492,207,1.563,209,0.592,218,2.259,226,0.418,290,3.288,318,3.131,345,5.786,455,3.373,764,2.374,1145,4.732,1192,2.542,1196,3.467,1197,6.447,1397,4.612,1398,3.978,1399,3.978,1400,3.978,1410,4.402,1415,4.402,1417,5.581,1418,6.617,1419,4.717,1420,4.717]],["t/288",[4,0.422,7,1.029,19,1.545,39,2.433,48,3.061,77,1.865,94,0.347,105,2.638,139,2.76,203,2.542,207,1.623,209,0.615,218,2.344,226,0.433,309,1.636,318,2.317,332,2.53,345,3.706,366,3.187,624,2.717,695,4.568,764,2.464,993,4.324,1009,4.895,1145,4.856,1192,2.638,1196,3.598,1197,4.129,1318,4.895,1396,4.568,1397,4.733,1400,4.129,1410,4.568,1415,4.568,1418,4.895,1419,4.895,1420,4.895,1421,5.392,1422,5.392]],["t/290",[4,0.34,30,2.111,41,2.182,56,1.849,77,1.501,78,2.013,80,2.36,81,1.758,94,0.466,96,1.344,99,2.47,103,2.665,105,4.232,112,2.312,181,2.527,203,2.144,207,2.179,209,0.826,226,0.484,269,3.168,309,1.212,348,7.566,352,1.926,375,2.185,484,2.36,764,1.825,774,2.835,861,5.464,972,2.044,996,2.267,1079,2.938,1192,1.954,1397,5.102,1409,8.227,1423,4.427,1424,3.994,1425,5.464,1426,6.018,1427,3.994,1428,3.626,1429,3.626]],["t/292",[52,5.16,53,3.084,94,0.61,105,4.181,204,3.662,207,2.572,217,2.966,278,3.264,279,3.264,316,4.518,332,3.084,359,3.662,392,2.893,401,3.97,614,5.271,615,5.569,616,5.569,1150,5.968,1210,4.836,1430,6.573,1431,6.573]],["t/294",[4,0.353,7,1.425,54,1.401,66,2.117,71,4.627,77,1.559,94,0.659,203,2.616,209,0.713,218,1.826,226,0.338,306,3.368,324,2.482,624,2.117,634,4.786,764,2.856,765,3.216,806,2.22,824,4.611,1126,3.558,1127,3.368,1128,3.558,1192,2.055,1193,2.658,1194,4.786,1423,3.09,1432,4.2,1433,4.2,1434,4.2,1435,6.249,1436,3.813,1437,4.2,1438,4.2,1439,4.2,1440,4.2,1441,4.2,1442,4.2,1443,4.2,1444,6.249,1445,4.2,1446,4.2,1447,4.2,1448,4.2,1449,4.2]],["t/296",[53,3.533,96,1.682,97,3.397,204,4.194,217,3.397,278,3.738,359,4.194,401,4.547,449,3.98,764,3.441,765,5.765,813,6.835,814,6.835,1210,5.538,1450,5.023]],["t/298",[4,0.372,19,2.137,36,1.572,81,1.514,94,0.656,104,1.991,151,2.914,164,3.484,169,1.614,203,1.589,207,1.035,209,0.85,210,2.364,226,0.53,309,2.809,318,2.306,333,1.444,334,1.158,346,4.233,353,2.518,359,1.916,517,2.125,524,2.125,721,5.947,745,3.123,764,1.572,795,2.914,1017,1.297,1119,1.127,1129,4.547,1139,2.634,1158,2.634,1169,1.444,1183,2.758,1451,8.636,1452,3.439,1453,2.758,1454,3.439,1455,3.439,1456,3.439,1457,3.439,1458,3.123,1459,3.439,1460,3.439,1461,3.439,1462,3.439,1463,2.914,1464,3.439,1465,3.439,1466,3.439,1467,3.439,1468,3.439,1469,3.439,1470,3.439,1471,3.439]],["t/300",[41,3.098,69,4.666,77,1.639,81,2.893,96,1.468,140,2.479,147,4.268,212,4.666,309,1.995,359,4.761,372,4.666,375,3.596,409,4.386,446,5.271,455,4.268,456,5.271,519,4.386,723,3.885,770,5.271,1172,4.386,1183,5.271,1207,4.836,1453,5.271,1463,5.569]],["t/302",[4,0.431,7,1.059,9,2.065,39,2.504,40,2.413,50,2.356,74,3.533,75,4.45,77,1.903,94,0.491,142,2.84,157,3.213,203,1.643,209,0.87,226,0.613,317,3.939,328,3.703,333,1.493,516,3.703,549,2.984,601,2.569,637,4.45,726,3.151,1090,4.45,1119,1.818,1159,4.45,1169,2.329,1268,3.703,1472,5.549,1473,5.549,1474,5.549,1475,5.549,1476,5.038,1477,5.549]],["t/304",[7,0.949,9,2.238,17,2.627,37,2.397,40,2.16,45,5.528,74,3.27,77,1.239,92,2.719,94,0.454,96,1.11,100,3.805,161,3.655,186,3.527,202,5.334,218,3.573,301,3.415,309,1.508,401,3.001,520,6.412,575,3.985,598,7.46,599,4.21,601,2.301,602,4.511,726,2.821,987,3.315,996,2.821,997,4.511,1001,4.21,1118,3.144,1245,4.21,1478,4.969,1479,4.969,1480,4.969,1481,4.969,1482,4.969,1483,4.969]],["t/306",[4,0.425,41,2.73,64,4.119,77,1.878,86,5.538,94,0.484,214,4.764,713,6.851,1234,7.89,1329,5.538,1484,7.528,1485,7.528,1486,6.378]],["t/308",[7,1.01,19,1.517,77,1.32,99,2.172,169,3.99,172,3.531,214,4.672,218,4,226,0.425,293,4.052,309,2.24,346,3.004,455,3.435,473,2.895,639,3.756,713,3.893,726,3.004,774,3.756,954,4.804,996,3.004,1006,4.052,1131,4.483,1158,4.052,1164,4.052,1172,3.531,1234,4.483,1268,3.531,1311,4.244,1487,5.291,1488,4.804,1489,4.244,1490,5.92,1491,5.291,1492,5.291,1493,5.291,1494,4.804,1495,5.291,1496,5.291,1497,5.291]],["t/311",[77,1.74,80,4.123,94,0.628,99,4.008,174,4.794,324,4.123,344,6.798,588,5.342,793,3.75,1291,5.594,1327,4.039,1329,5.132,1498,5.594,1499,6.975,1500,6.333,1501,6.333]],["t/313",[4,0.351,26,3.193,38,2.367,41,1.512,67,2.769,78,2.101,94,0.709,96,1.84,99,3.38,111,3.193,131,1.813,140,1.572,170,2.367,175,3.133,179,2.959,190,5.847,191,3.785,209,0.475,218,1.813,226,0.335,333,2,473,2.281,488,2.782,538,2.707,599,3.532,724,3.532,752,3.785,783,2.518,793,2.241,996,2.367,1255,2.707,1381,3.785,1486,3.532,1501,3.785,1502,3.785,1503,5.266,1504,4.169,1505,6.746,1506,6.215,1507,4.169,1508,4.169]],["t/315",[4,0.372,7,1.025,19,0.986,43,1.284,51,4.284,55,5.609,77,1.646,94,0.656,96,0.768,99,2.202,111,2.634,143,2.758,188,2.53,190,2.442,203,2.207,209,0.753,218,4.437,226,0.53,341,1.991,366,2.033,488,2.295,538,2.233,539,5.292,570,2.914,723,2.033,726,1.953,987,2.295,996,1.953,1119,2.163,1169,3.596,1255,3.484,1309,3.123,1509,2.914,1510,6.599,1511,6.599,1512,6.599,1513,6.599]],["t/317",[4,0.518,17,2.435,19,2.477,41,1.671,58,2.079,64,2.521,94,0.615,99,1.891,145,3.389,170,2.616,203,2.834,209,0.763,226,0.695,269,1.811,366,5.425,386,3.528,469,2.668,503,2.916,513,4.343,549,2.477,692,3.074,793,2.477,806,3.536,972,3.424,1291,3.695,1378,5.364,1514,4.607,1515,6.689,1516,6.073,1517,4.607,1518,6.689]],["t/319",[4,0.345,7,0.779,17,2.157,19,2.102,46,3.456,56,1.889,74,1.889,89,1.996,94,0.68,99,2.51,142,2.088,181,2.582,202,2.649,209,0.836,226,0.491,258,2.273,269,2.403,333,2.193,334,1.373,336,3.456,363,2.411,471,4.096,557,3.124,583,2.804,593,2.896,689,1.996,806,2.157,843,2.649,870,3.456,981,3.456,1017,1.539,1019,1.889,1145,2.649,1167,3.704,1194,3.124,1519,3.456,1520,4.079,1521,4.499,1522,3.456,1523,4.079,1524,6.115,1525,6.115,1526,6.115,1527,4.079,1528,4.079,1529,4.079,1530,4.079,1531,4.079]],["t/321",[4,0.371,7,0.653,17,1.807,18,2.618,19,0.98,37,1.649,67,1.523,78,1.723,81,1.505,91,2.021,94,0.723,98,3.792,99,2.192,121,1.435,123,2.897,129,3.929,144,2.515,209,0.39,226,0.429,260,2.35,305,2.742,313,3.104,324,2.021,385,2.618,392,1.505,395,2.427,409,2.281,428,2.281,444,1.151,451,1.941,623,2.742,713,2.515,723,2.021,764,1.562,972,1.75,1124,2.897,1192,1.673,1203,3.564,1292,3.104,1379,2.427,1532,2.427,1533,5.341,1534,3.419,1535,3.419,1536,2.515,1537,3.419,1538,3.419,1539,3.419,1540,3.419,1541,3.419,1542,3.419,1543,3.419,1544,3.419,1545,3.104,1546,3.419,1547,3.419,1548,3.419,1549,3.419,1550,4.284,1551,3.419,1552,3.419,1553,3.419,1554,3.419,1555,3.419,1556,3.419,1557,3.419,1558,3.419,1559,3.104]],["t/323",[4,0.375,38,3.776,39,3,94,0.689,98,4.721,99,2.729,118,5.089,171,4.571,209,0.758,226,0.534,542,5.634,624,3.352,764,3.039,824,4.108,1192,3.254,1203,4.437,1300,4.892,1560,6.65,1561,4.721]],["t/325",[4,0.326,7,1.102,19,1.655,77,1.44,94,0.713,98,4.099,99,2.37,118,4.634,139,2.955,140,2.178,203,1.709,209,0.894,226,0.464,298,4.422,332,2.709,334,1.943,764,2.639,1145,3.749,1192,2.825,1203,3.853,1562,5.242,1563,5.774,1564,5.774,1565,5.774,1566,5.774,1567,5.774]],["t/327",[4,0.355,17,3.322,77,1.567,94,0.678,98,4.46,99,2.579,109,5.125,118,4.903,209,0.717,213,6.653,226,0.505,324,3.714,542,5.324,583,4.319,764,2.872,1145,5.386,1192,3.074,1230,5.324,1300,4.622,1324,5.705,1568,6.283]],["t/329",[4,0.329,34,3.084,38,3.312,40,3.432,41,2.115,58,2.632,70,2.075,78,2.94,189,3.084,215,6.15,278,2.896,309,2.715,549,3.136,556,4.942,649,3.691,726,4.482,743,5.296,763,3.034,764,2.666,807,5.296,833,4.009,898,5.296,1019,2.701,1088,4.678,1186,3.787,1569,5.833,1570,5.296,1571,5.833,1572,5.833,1573,4.942,1574,5.833]],["t/331",[4,0.313,40,2.413,58,2.504,67,2.473,94,0.692,140,2.093,214,4.828,298,4.249,333,2.053,334,2.568,408,4.249,473,3.036,488,3.703,539,4.45,549,2.984,689,2.715,696,4.702,782,2.797,1084,4.702,1159,4.45,1379,7.535,1450,3.703,1575,5.549,1576,5.549]],["t/333",[4,0.359,14,7.912,15,3.679,19,1.821,58,2.867,174,4.367,209,0.953,258,3.54,289,4.239,309,2.536,328,5.576,423,5.383,451,3.607,838,5.768,987,4.239,1088,5.095,1186,4.125,1333,5.768,1458,5.768,1488,5.768,1521,4.674,1573,5.383,1577,6.353,1578,6.353]],["t/335",[4,0.508,17,3.116,19,2.278,26,4.513,41,2.137,94,0.715,209,0.906,226,0.474,269,2.316,601,2.729,806,4.202,1038,5.351,1327,3.413,1579,7.949,1580,7.949,1581,5.893,1582,7.949,1583,5.893]],["t/337",[4,0.38,17,3.557,40,2.926,58,3.036,63,4.776,77,1.678,96,1.503,164,4.368,169,3.157,209,0.767,284,4.368,289,4.49,292,4.157,360,3.977,375,3.681,504,5.49,636,6.109,767,6.109,972,3.444,991,5.701,1584,6.728,1585,6.728,1586,6.728]],["t/339",[4,0.361,17,2.288,19,2.404,25,3.47,41,1.569,43,2.836,64,3.496,77,1.594,78,3.22,92,2.368,94,0.602,112,2.506,140,1.632,203,1.892,207,1.302,209,0.729,214,2.738,226,0.514,309,1.313,333,1.72,334,2.15,353,2.998,364,2.738,448,3.666,484,2.558,487,3.314,562,3.666,639,3.072,750,3.47,755,2.887,800,2.558,1017,2.41,1023,3.929,1088,3.47,1119,2.094,1125,3.517,1164,3.314,1169,2.682,1207,3.183,1212,3.314,1233,3.314,1573,3.666,1587,3.929,1588,6.389,1589,4.327]],["t/341",[4,0.501,36,3.188,67,3.108,74,4.111,90,3.516,142,3.57,226,0.713,309,2.117,741,6.333,806,4.693,1590,6.975,1591,6.975,1592,6.975,1593,6.975,1594,6.975,1595,6.975,1596,6.975]],["t/343",[4,0.488,17,3.536,41,1.671,77,1.149,94,0.615,96,1.494,105,3.273,140,1.738,166,3.873,169,2.162,203,1.98,209,0.525,226,0.538,309,2.03,318,1.979,331,4.598,332,3.139,333,1.24,353,2.162,363,2.723,509,6.618,533,6.135,534,6.135,535,6.316,601,2.133,769,5.364,824,2.846,1019,2.133,1125,2.133,1203,3.074,1204,4.183,1205,4.183,1206,4.183,1597,4.607]],["t/345",[205,4.579,375,4.895,444,3.011]],["t/347",[7,1.4,9,2.17,70,2.609,91,5.416,94,0.589,121,3.846,256,1.381,267,5.799,269,2.883,296,5.617,378,5.882,1598,4.894]],["t/349",[7,1.517,9,2.28,94,0.511,121,4.041,256,1.496,259,6.424,296,7.372]],["t/351",[205,4.579,375,4.895,444,3.011]],["t/353",[4,0.367,7,1.241,9,2.008,70,2.312,91,5.013,94,0.643,121,3.56,209,0.741,226,0.522,256,1.223,267,5.367,269,2.554,297,5.506,378,5.211,1169,2.728,1598,4.336,1599,5.211,1600,6.498,1601,5.9]],["t/355",[4,0.399,7,1.348,9,2.119,94,0.631,121,3.756,209,0.805,226,0.568,256,1.329,259,4.712,297,6.376,1119,2.314,1169,2.964,1599,5.663,1602,7.062]],["t/357",[4,0.343,7,1.161,9,1.922,56,2.816,60,5.153,70,2.164,85,4.18,91,4.799,94,0.627,121,3.408,209,0.694,226,0.489,227,3.949,256,1.145,267,5.138,297,5.271,378,4.878,951,5.522,1169,2.553,1598,4.058,1599,4.878,1601,5.522,1603,5.522,1604,4.474,1605,6.082]],["t/359",[4,0.399,9,1.672,72,4.469,94,0.631,121,3.756,209,0.805,226,0.568,256,1.329,297,5.809,590,4.854,1119,2.314,1169,2.964,1599,5.663,1603,6.412,1606,7.062,1607,7.062]],["t/361",[205,4.579,375,4.895,444,3.011]],["t/363",[4,0.288,9,1.704,19,2.839,37,2.461,54,3.185,77,1.795,94,0.637,140,1.924,158,3.471,180,3.312,209,0.582,218,3.937,226,0.41,256,0.96,390,5.044,803,3.152,828,3.507,830,3.081,1019,2.362,1608,2.792,1609,2.897,1610,5.102,1611,5.102,1612,5.102,1613,3.404,1614,3.753,1615,3.753,1616,3.753]],["t/365",[4,0.396,9,1.662,19,2.807,37,2.376,54,3.142,56,2.281,77,1.751,94,0.63,140,1.858,158,3.386,180,3.198,209,0.562,226,0.396,256,0.927,269,3.503,351,3.198,390,4.966,803,3.043,828,3.386,830,4.239,831,3.287,1608,2.695,1609,2.797,1613,3.287,1614,3.624,1615,3.624,1616,3.624,1617,4.926,1618,4.926,1619,4.926]],["t/367",[4,0.396,9,1.662,19,2.807,37,2.376,54,3.142,56,4.127,77,1.751,94,0.63,140,1.858,158,3.386,180,3.198,209,0.562,226,0.396,256,0.927,269,1.936,351,3.198,390,4.966,803,3.043,828,3.386,830,4.239,831,3.287,1608,2.695,1609,2.797,1613,3.287,1614,3.624,1615,3.624,1616,3.624,1620,4.926,1621,4.926,1622,4.926]],["t/369",[4,0.369,9,1.548,19,2.875,37,3.153,54,3.023,56,3.026,77,1.63,94,0.609,140,1.683,158,3.153,180,2.897,209,0.509,218,2.842,226,0.359,256,0.84,351,2.897,390,4.743,766,2.897,803,2.757,828,3.067,830,3.947,831,2.978,1119,1.462,1169,2.744,1378,6.827,1550,3.579,1608,2.442,1609,2.534,1613,2.978,1614,3.283,1615,3.283,1616,3.283,1623,4.463,1624,4.463,1625,4.463,1626,4.463]],["t/371",[4,0.357,9,1.496,19,2.898,37,2.056,54,2.966,56,3.855,77,1.576,94,0.599,140,1.608,158,3.048,180,2.767,209,0.486,218,3.866,226,0.343,256,0.802,351,2.767,379,3.87,390,4.639,803,2.633,828,2.93,830,3.816,831,2.844,1169,1.789,1378,3.418,1500,3.87,1516,7.56,1608,2.332,1609,2.42,1613,2.844,1614,3.136,1615,3.136,1616,3.136,1627,6.318,1628,4.262,1629,4.262,1630,4.262,1631,4.262]],["t/373",[4,0.394,9,1.652,19,2.799,37,2.356,54,3.132,77,1.74,94,0.628,140,1.842,158,3.365,180,3.17,209,0.557,218,4.083,226,0.392,256,0.919,351,3.17,390,4.946,803,3.017,828,3.356,830,4.213,831,3.259,1169,2.05,1608,2.672,1609,2.773,1613,3.259,1614,3.593,1615,3.593,1616,3.593,1632,4.883,1633,4.883,1634,4.883]],["t/375",[4,0.363,19,2.413,54,2.808,69,2.343,77,1.296,94,0.687,174,2.268,209,0.376,226,0.265,256,0.621,309,2.212,310,4.717,314,4.561,328,2.202,333,1.398,334,1.749,390,4.417,451,1.874,469,1.911,593,3.688,650,2.343,701,1.993,766,2.142,793,2.793,803,3.21,830,1.993,1006,2.527,1119,2.598,1169,3.059,1450,2.202,1498,2.646,1521,3.822,1550,2.646,1604,3.822,1608,1.806,1609,1.874,1613,3.467,1635,4.727,1636,2.996,1637,2.996,1638,2.996,1639,4.402,1640,3.3,1641,2.796,1642,2.996,1643,3.3,1644,4.717,1645,3.3,1646,2.996,1647,4.402,1648,2.527]],["t/377",[4,0.258,19,1.906,37,3.208,54,2.218,69,3.244,77,1.659,94,0.588,174,3.141,209,0.521,226,0.367,256,0.86,309,2.613,314,5.565,328,3.05,390,4.368,451,2.595,469,2.646,593,4.721,650,3.244,701,2.76,766,2.967,793,3.575,1006,3.5,1119,1.498,1169,2.792,1450,3.05,1498,3.665,1521,4.892,1604,4.892,1608,2.501,1609,2.595,1635,5.767,1636,4.149,1637,4.149,1638,4.149,1639,5.634,1644,6.038,1646,4.149,1649,4.57,1650,4.57]],["t/379",[4,0.419,37,2.576,54,3.081,56,2.473,67,2.38,94,0.676,209,0.609,226,0.429,256,1.005,314,6.066,333,2.3,334,1.798,390,5.147,451,3.032,601,3.441,701,3.226,830,3.226,1608,2.922,1609,3.032,1635,6.286,1651,5.69,1652,7.43,1653,5.341]],["t/381",[4,0.414,37,2.529,54,3.057,56,2.428,67,2.336,94,0.673,209,0.598,226,0.421,256,0.987,314,6.006,333,1.411,334,1.765,390,5.105,451,2.977,471,3.442,593,5.207,601,3.396,701,3.166,1608,2.869,1609,2.977,1635,6.224,1641,4.442,1651,5.617,1654,7.335,1655,5.243]],["t/383",[4,0.419,37,2.576,54,2.85,56,2.473,67,2.38,94,0.676,209,0.609,226,0.429,256,1.005,314,6.066,334,1.798,390,5.147,451,3.032,601,3.441,701,3.226,725,5.69,830,3.226,1017,3.223,1608,2.922,1609,3.032,1635,6.286,1656,4.849,1657,7.43,1658,5.341]],["t/385",[4,0.34,37,3.888,54,2.007,94,0.584,209,0.686,226,0.484,256,1.133,314,6.453,334,2.025,390,5.065,451,3.417,593,5.723,601,3.733,701,3.634,725,6.173,1017,2.27,1608,3.293,1609,3.417,1635,6.687,1656,5.464,1659,8.061]],["t/387",[4,0.411,37,4.061,39,4.118,54,3.413,73,4.119,77,1.818,94,0.658,140,1.959,209,0.592,226,0.418,256,1.372,390,5.085,830,3.137,1604,3.822,1608,2.842,1609,2.95,1660,5.925,1661,5.195,1662,4.402,1663,5.195,1664,5.195]],["t/389",[4,0.414,37,4.081,39,3.31,54,3.422,73,3.589,76,3.239,77,1.829,94,0.66,140,1.977,209,0.598,226,0.421,256,1.381,390,5.105,830,3.166,1336,4.442,1604,3.857,1608,2.869,1609,2.977,1660,5.949,1662,4.442,1665,5.243,1666,5.243,1667,5.243]],["t/391",[1,2.423,4,0.392,9,0.884,37,3.756,39,3.787,54,3.592,55,4.338,73,3.399,76,2.306,77,1.426,94,0.65,147,2.423,209,0.426,226,0.3,256,1.076,367,4.932,390,4.677,469,2.161,830,3.452,1098,1.941,1179,3.388,1247,5.352,1336,3.162,1604,2.746,1608,2.042,1609,2.119,1660,5.45,1662,3.162,1668,3.388,1669,6.947,1670,3.732,1671,5.716,1672,2.858]],["t/393",[29,6.642,87,6.003,88,5.388,91,4.633,205,4.012,259,5.231,444,2.638,624,3.951,783,4.734,882,7.117,1355,6.642,1673,6.642]],["t/395",[4,0.329,7,1.114,9,1.381,19,2.748,87,6.852,91,3.448,94,0.719,121,2.449,209,0.665,226,0.469,256,1.098,309,1.77,444,1.963,924,5.807,1673,4.942,1674,5.833,1675,5.833,1676,6.688,1677,5.296]],["t/397",[4,0.332,7,0.439,19,2.274,70,1.377,87,5.022,94,0.74,96,0.514,121,2.753,200,3.105,209,0.67,226,0.472,253,1.845,256,0.433,259,1.535,309,1.521,318,1.664,333,1.349,334,0.774,342,1.762,401,1.39,410,2.661,444,1.687,488,1.535,728,5.699,783,1.39,924,2.848,1119,1.269,1169,1.625,1196,2.583,1265,3.28,1532,2.748,1550,3.105,1642,3.515,1647,1.949,1648,2.965,1668,2.089,1673,4.247,1676,3.28,1678,3.872,1679,3.872,1680,2.301,1681,2.301,1682,2.301,1683,1.845,1684,1.949,1685,2.301,1686,1.949,1687,2.301,1688,2.301,1689,3.872,1690,3.872,1691,4.247,1692,3.872,1693,5.012,1694,3.872]],["t/399",[205,4.579,375,4.895,444,3.011]],["t/401",[4,0.384,19,1.952,77,1.698,94,0.562,96,1.521,99,2.794,140,2.568,207,2.049,209,0.776,221,5.282,226,0.547,256,1.282,444,2.292,525,3.725,1181,5.769,1695,6.809,1696,6.809,1697,6.182,1698,4.68,1699,6.809]],["t/403",[9,1.936,221,4.474,410,5.62,488,5.456,624,4.121,843,5.308,1166,6.928,1697,7.423,1700,7.423]],["t/405",[4,0.425,94,0.599,209,0.859,221,5.095,226,0.605,410,5.174,444,2.534,525,4.119,624,3.794,1370,6.835,1698,5.174,1701,7.528,1702,7.528]],["t/407",[4,0.425,84,4.194,94,0.599,209,0.859,221,5.095,226,0.605,410,5.174,444,2.534,525,4.119,624,3.794,1698,5.174,1703,7.528,1704,7.528]],["t/409",[7,1.607,207,2.533,221,5.452,763,4.378,797,4.874,1245,7.132]],["t/411",[7,1.607,207,2.533,221,5.452,549,4.526,797,4.874,1502,7.643]],["t/413",[7,1.607,179,5.976,207,2.533,221,5.452,549,4.526,797,4.874]],["t/415",[4,0.384,7,1.3,94,0.562,207,2.049,209,0.776,221,5.282,226,0.547,333,1.832,444,2.292,525,3.725,549,3.661,797,5.061,1017,2.568,1503,5.769,1698,4.68,1705,6.182,1706,6.182,1707,6.809,1708,5.769]],["t/417",[4,0.389,7,1.316,94,0.624,207,2.651,209,0.786,221,5.312,226,0.554,444,2.319,525,3.77,549,3.705,797,3.99,1017,2.599,1503,5.839,1698,4.736,1705,6.256,1708,5.839,1709,5.839]],["t/419",[4,0.389,7,1.316,94,0.624,207,2.651,209,0.786,221,5.312,226,0.554,333,1.855,444,2.319,525,3.77,549,3.705,797,3.99,1698,4.736,1706,6.256,1708,5.839,1709,5.839,1710,6.891]],["t/421",[4,0.394,7,1.332,94,0.628,207,2.672,209,0.795,221,5.343,226,0.561,444,2.348,525,3.817,549,3.75,797,4.039,1698,4.794,1709,5.91,1711,6.975,1712,6.975,1713,6.333]],["t/423",[4,0.409,7,1.382,57,4.701,94,0.584,209,0.826,217,3.267,221,3.962,226,0.582,444,2.437,473,3.962,525,3.962,627,4.832,1194,5.545,1698,4.977,1714,7.241,1715,5.327,1716,7.241]],["t/425",[205,4.579,375,4.895,444,3.011]],["t/428",[4,0.371,9,2.023,94,0.61,96,1.468,131,2.858,209,0.974,226,0.528,256,1.237,274,4.579,341,3.806,482,4.518,689,3.216,690,3.313,712,3.534,1119,2.154,1178,3.004,1717,5.968,1718,3.365,1719,6.573,1720,6.573]],["t/430",[4,0.38,9,2.054,94,0.617,96,1.503,209,0.989,226,0.541,256,1.266,274,4.631,689,3.292,690,3.391,712,3.618,1119,2.205,1178,3.075,1718,3.444,1721,6.728,1722,6.728,1723,6.728,1724,6.728]],["t/432",[4,0.355,7,1.2,9,1.964,94,0.597,96,1.403,131,2.732,209,0.946,226,0.505,256,1.183,274,4.48,471,2.948,473,3.438,689,3.074,690,3.167,712,3.378,1119,2.059,1178,2.872,1717,5.705,1718,3.216,1725,4.319,1726,4.319,1727,4.319,1728,6.283,1729,6.283]],["t/434",[4,0.38,9,2.054,94,0.617,96,1.503,131,2.926,209,0.989,226,0.541,256,1.266,274,4.631,689,3.292,690,3.391,712,3.618,1119,2.205,1178,3.075,1718,3.444,1730,6.728,1731,6.728,1732,6.728]],["t/436",[4,0.38,9,2.054,94,0.617,96,1.503,131,2.926,209,0.989,226,0.541,256,1.266,274,4.631,689,3.292,690,3.391,712,3.618,1119,2.205,1178,3.075,1718,3.444,1733,6.728,1734,6.728,1735,6.728]],["t/438",[4,0.355,7,1.2,9,1.964,94,0.597,96,1.403,131,2.732,209,0.946,226,0.505,256,1.183,274,4.48,471,2.948,473,3.438,689,3.074,690,3.167,712,3.378,1119,2.059,1176,5.705,1178,2.872,1718,3.216,1725,4.319,1726,4.319,1727,4.319,1736,6.283,1737,6.283]],["t/440",[4,0.355,7,1.2,9,1.964,94,0.597,96,1.403,131,2.732,209,0.946,226,0.505,256,1.183,274,4.48,471,2.948,473,3.438,689,3.074,690,3.167,712,3.378,1119,2.059,1178,2.872,1718,3.216,1725,4.319,1726,4.319,1727,4.319,1738,6.283,1739,6.283,1740,6.283]],["t/442",[4,0.336,7,1.137,9,1.895,19,1.707,70,2.118,94,0.581,96,1.33,131,2.589,209,0.913,226,0.479,256,1.121,274,4.664,471,2.794,473,3.258,689,2.914,690,3.001,712,3.202,747,4.381,1119,1.952,1178,2.722,1718,3.048,1725,4.093,1726,4.093,1727,4.093,1741,5.955,1742,5.045,1743,5.955,1744,5.955]],["t/444",[4,0.355,9,1.964,19,1.801,70,2.235,94,0.597,96,1.403,131,2.732,209,0.946,226,0.505,256,1.183,274,4.765,626,4.319,689,3.074,690,3.167,712,3.378,747,4.622,1119,2.059,1178,2.872,1718,3.216,1742,5.324,1745,6.283,1746,6.283,1747,6.283]],["t/446",[4,0.38,9,2.054,94,0.617,96,1.503,131,2.926,209,0.989,226,0.541,256,1.266,274,4.631,689,3.292,690,3.391,712,3.618,1119,2.205,1178,3.075,1718,3.444,1748,6.728,1749,6.728,1750,6.728]],["t/448",[4,0.355,7,1.2,9,1.964,94,0.597,96,1.403,131,2.732,209,0.946,226,0.505,256,1.183,274,4.48,471,2.948,473,3.438,689,3.074,690,3.167,712,3.378,1119,2.059,1178,2.872,1718,3.216,1725,4.319,1726,4.319,1727,4.319,1751,6.283,1752,6.283,1753,6.283]],["t/450",[4,0.355,7,1.2,9,1.964,94,0.597,96,1.403,131,2.732,209,0.946,226,0.505,256,1.183,274,4.48,471,2.948,473,3.438,689,3.074,690,3.167,712,3.378,1119,2.059,1178,2.872,1718,3.216,1725,4.319,1726,4.319,1727,4.319,1754,6.283,1755,6.283,1756,6.283]],["t/452",[4,0.355,7,1.2,9,1.964,94,0.597,96,1.403,131,2.732,209,0.946,226,0.505,256,1.183,274,4.48,471,2.948,473,3.438,689,3.074,690,3.167,712,3.378,1119,2.059,1178,2.872,1718,3.216,1725,4.319,1726,4.319,1727,4.319,1757,6.283,1758,6.283,1759,5.705]],["t/454",[4,0.355,7,1.2,9,1.964,94,0.597,96,1.403,131,2.732,209,0.946,226,0.505,256,1.183,274,4.48,471,2.948,473,3.438,689,3.074,690,3.167,712,3.378,1119,2.059,1178,2.872,1718,3.216,1725,4.319,1726,4.319,1727,4.319,1760,6.283,1761,6.283,1762,6.283]],["t/456",[4,0.38,9,2.054,94,0.617,96,1.503,131,2.926,209,0.989,226,0.541,256,1.266,274,4.631,689,3.292,690,3.391,712,3.618,1119,2.205,1178,3.075,1718,3.444,1763,6.109,1764,6.728,1765,6.728]],["t/458",[4,0.38,9,2.054,94,0.617,96,1.503,131,2.926,209,0.989,226,0.541,256,1.266,274,4.631,689,3.292,690,3.391,712,3.618,1119,2.205,1178,3.075,1718,3.444,1763,6.109,1766,6.728,1767,6.728]],["t/460",[4,0.38,9,2.054,94,0.617,96,1.503,131,2.926,209,0.989,226,0.541,256,1.266,274,4.631,689,3.292,690,3.391,712,3.618,1119,2.205,1178,3.075,1718,3.444,1759,6.109,1768,6.728,1769,6.728]],["t/463",[4,0.329,7,1.114,9,1.869,56,3.655,70,2.075,84,3.25,94,0.575,96,1.303,121,2.449,209,0.665,217,2.632,226,0.469,256,1.098,269,3.102,274,4.316,333,1.57,689,2.854,690,2.94,1014,3.892,1178,2.666,1718,2.986,1770,4.678,1771,4.678,1772,4.291,1773,4.678,1774,4.467,1775,7.894,1776,5.833,1777,5.833]],["t/465",[4,0.329,7,1.114,9,1.869,56,3.655,70,2.075,84,3.25,94,0.575,96,1.303,121,2.449,209,0.665,217,2.632,226,0.469,256,1.098,269,3.102,274,4.316,689,2.854,690,2.94,1014,3.892,1178,2.666,1718,2.986,1770,4.678,1771,4.678,1772,4.291,1773,4.678,1774,4.467,1778,4.141,1779,7.894,1780,5.833,1781,5.833]],["t/467",[4,0.34,7,1.149,9,1.909,56,4.209,70,2.141,84,3.353,94,0.518,96,1.344,121,2.526,209,0.686,217,2.715,226,0.484,256,1.133,269,2.365,274,4.385,689,2.945,690,3.033,1014,4.016,1178,2.75,1718,3.08,1770,4.826,1771,4.826,1772,4.427,1773,4.826,1774,4.608,1782,6.018,1783,6.018,1784,6.018]],["t/469",[4,0.34,7,1.149,9,1.909,56,4.209,70,2.141,84,3.353,94,0.518,96,1.344,121,2.526,209,0.686,217,2.715,226,0.484,256,1.133,269,2.365,274,4.385,689,2.945,690,3.033,1014,4.016,1178,2.75,1718,3.08,1770,4.826,1771,4.826,1772,4.427,1773,4.826,1774,4.608,1785,5.464,1786,6.018,1787,6.018]],["t/472",[4,0.307,7,1.437,11,3.864,19,2.158,70,1.936,77,1.358,94,0.484,96,1.216,99,2.234,209,0.621,224,4.612,226,0.437,256,1.025,624,3.795,690,3.795,691,6.835,770,4.365,806,2.877,824,3.363,827,4.612,877,3.534,887,5.539,1007,6.038,1053,4.612,1178,2.488,1718,2.786,1788,5.443,1789,5.443,1790,5.443,1791,5.443,1792,4.942,1793,5.443,1794,5.443,1795,4.942,1796,5.443,1797,5.443]],["t/474",[27,4.651,279,3.738,327,4.194,353,3.533,446,6.037,1007,6.037,1450,5.023,1798,6.835,1799,5.023,1800,7.131,1801,7.528,1802,7.528,1803,4.888,1804,7.528]],["t/476",[15,4.478,94,0.658,121,3.246,256,1.065,267,3.581,279,2.81,353,2.656,626,3.89,627,3.776,644,3.581,1172,3.776,1561,5.49,1778,4.017,1799,6.614,1800,4.334,1803,3.674,1805,7.021,1806,6.202,1807,7.021,1808,4.334,1809,4.163,1810,4.017,1811,4.163,1812,4.163,1813,4.163]],["t/478",[4,0.205,7,0.694,15,3.245,28,2.5,54,1.213,94,0.672,121,2.352,209,0.946,210,2.5,226,0.292,256,0.685,267,3.546,279,1.806,353,3.893,444,1.224,626,2.5,627,2.427,644,2.302,705,2.582,977,2.5,1119,1.836,1169,2.352,1172,2.427,1178,1.662,1213,2.302,1561,3.978,1715,4.123,1778,2.582,1799,5.848,1800,5.882,1803,2.361,1805,6.974,1806,6.16,1807,5.088,1808,2.785,1809,2.676,1810,2.582,1811,2.676,1812,2.676,1813,2.676,1814,2.676,1815,5.483,1816,3.081,1817,2.917,1818,3.302,1819,3.302,1820,3.302,1821,2.917,1822,3.081,1823,3.081,1824,3.081]],["t/480",[109,4.713,279,3.788,303,5.048,327,4.251,353,3.58,609,5.416,800,5.55,1798,6.927,1799,5.091,1814,5.613,1825,7.629,1826,7.629]],["t/482",[15,3.599,94,0.658,121,3.457,256,1.17,267,3.933,279,3.086,353,2.916,626,4.272,627,4.147,644,3.933,1172,4.147,1561,4.412,1778,4.412,1799,6.164,1803,4.035,1806,4.984,1808,4.759,1809,4.572,1810,4.412,1811,4.572,1812,4.572,1813,4.572,1827,7.477]],["t/484",[4,0.227,7,0.768,15,2.329,28,2.764,54,1.342,94,0.671,121,2.54,209,0.923,210,2.764,226,0.323,256,0.757,267,3.829,279,1.997,353,4.071,444,1.354,626,2.764,627,2.684,644,2.545,705,2.855,977,2.764,1119,1.983,1169,2.54,1172,2.684,1178,1.838,1213,2.545,1561,2.855,1715,4.451,1778,2.855,1799,5.398,1803,2.611,1806,5.832,1808,3.08,1809,2.959,1810,2.855,1811,2.959,1812,2.959,1813,2.959,1814,2.959,1815,5.832,1816,3.408,1817,3.225,1821,3.225,1822,3.408,1823,3.408,1824,3.408,1827,7.345,1828,4.022,1829,4.022]],["t/486",[17,4.033,38,4.332,43,2.849,55,4.251,121,3.203,279,3.788,354,4.953,363,4.509,875,5.842,1054,6.927,1799,5.091,1803,4.953,1830,7.955]],["t/488",[7,1.01,9,1.253,15,4.275,94,0.661,121,3.862,256,0.996,267,3.349,279,2.627,353,2.483,449,2.797,626,3.637,627,3.531,644,3.349,797,3.064,1428,4.804,1561,5.241,1778,3.756,1799,5.673,1800,4.052,1803,4.793,1808,4.052,1811,3.893,1812,3.893,1813,3.893,1814,3.893,1830,6.255,1831,6.703,1832,5.291,1833,4.804,1834,4.804,1835,4.244]],["t/490",[4,0.307,7,0.669,15,3.152,54,1.168,94,0.685,118,2.07,121,2.803,137,2.577,209,0.984,210,2.408,226,0.282,256,0.659,279,1.739,353,3.826,444,1.179,626,2.408,627,2.337,644,2.217,705,2.487,977,2.408,1119,1.784,1169,2.285,1178,1.601,1213,2.217,1561,3.864,1715,4.005,1778,2.487,1799,4.455,1800,5.766,1803,3.534,1811,2.577,1812,2.577,1813,2.577,1814,2.577,1815,5.354,1816,2.968,1817,2.809,1818,3.18,1819,3.18,1820,3.18,1821,2.809,1822,2.968,1823,2.968,1824,2.968,1830,5.657,1831,6.061,1833,3.18,1834,6.836,1835,6.038,1836,3.18,1837,3.503]],["t/493",[4,0.242,7,0.82,15,2.487,19,1.821,57,2.788,94,0.715,96,0.959,105,2.101,209,0.49,221,2.35,226,0.345,256,0.808,279,2.132,309,1.303,345,2.952,353,2.981,444,2.138,473,3.476,627,4.24,695,3.639,716,4.24,736,3.444,797,2.487,1329,4.674,1417,3.289,1423,4.674,1713,3.899,1785,3.899,1838,3.289,1839,4.295,1840,3.899,1841,4.295,1842,4.295,1843,5.383,1844,5.383,1845,3.639,1846,3.639,1847,4.295,1848,4.295,1849,3.639,1850,3.639,1851,4.295,1852,4.295,1853,4.295]],["t/495",[94,0.607,96,1.894,121,3.963,256,1.223,267,4.112,279,3.226,345,4.466,353,4.43,1172,4.336,1417,6.495,1803,5.506,1809,4.781,1810,4.613,1838,6.495,1854,5.9,1855,5.9,1856,6.498]],["t/497",[4,0.313,55,3.092,94,0.701,96,0.802,121,2.33,207,2.041,209,0.87,221,1.965,226,0.289,256,0.676,267,2.273,279,1.783,297,2.331,345,5.244,353,4.266,444,1.209,449,1.898,716,2.396,1172,2.396,1178,1.641,1417,5.194,1423,2.642,1803,3.603,1809,2.642,1810,2.549,1814,2.642,1815,5.439,1817,4.45,1821,2.88,1838,5.194,1843,3.043,1844,3.043,1845,4.702,1846,4.702,1849,3.043,1850,3.043,1854,6.158,1855,3.26,1857,3.26,1858,3.26,1859,3.26,1860,3.26,1861,3.26,1862,3.26,1863,3.591,1864,5.549,1865,3.591,1866,3.591,1867,3.591]],["t/499",[94,0.646,96,1.66,121,3.878,256,1.399,279,3.689,345,5.107,353,4.335,1073,6.295,1838,7.074,1868,6.746,1869,6.746]],["t/501",[4,0.31,7,0.677,45,2.191,65,2.096,94,0.709,118,2.096,121,2.307,207,2.025,209,0.935,221,1.94,226,0.285,256,0.668,269,1.394,279,1.761,297,2.302,345,2.437,353,3.556,354,2.302,444,1.194,716,2.366,785,3.22,1073,5.701,1178,1.621,1255,2.302,1327,2.053,1417,4.209,1423,2.609,1836,3.22,1838,5.153,1843,3.005,1844,3.005,1845,4.656,1846,4.656,1849,3.005,1850,3.005,1857,3.22,1858,3.22,1859,3.22,1860,3.22,1861,3.22,1862,3.22,1868,6.109,1869,3.22,1870,3.546,1871,6.729,1872,3.005,1873,5.496,1874,3.546,1875,5.496,1876,3.546,1877,3.546,1878,3.546,1879,3.546,1880,3.546]],["t/503",[0,5.231,38,4.451,41,2.842,94,0.504,266,4.012,359,4.368,466,4.633,484,4.633,681,5.231,699,6.287,1213,4.961,1881,5.565]],["t/505",[4,0.482,104,4.947,341,4.947,352,4.121,517,5.279,738,7.239]],["t/507",[104,4.667,269,3.168,352,3.888,385,6.173,386,6.173,389,6.83,455,5.233,787,6.83,1327,4.667,1882,8.061]],["t/509",[1,3.949,4,0.343,9,1.44,11,4.318,41,2.205,94,0.391,104,3.522,132,4.318,203,2.404,218,2.645,223,7.743,226,0.489,368,6.879,669,5.522,738,6.879,877,3.949,888,3.849,1053,5.153,1089,5.153,1536,4.474,1677,5.522,1883,6.082,1884,6.082,1885,6.082,1886,8.118,1887,6.082,1888,6.082]],["t/511",[4,0.49,10,4.244,346,4.925,642,7.875,899,6.643]],["t/513",[4,0.31,9,1.301,27,3.395,70,2.696,81,2.419,94,0.601,158,2.651,177,4.043,203,1.627,209,0.864,217,2.48,226,0.442,262,4.99,263,6.957,292,3.395,309,1.668,333,1.479,342,4.208,343,4.656,488,3.667,644,3.478,716,3.667,726,3.12,799,4.99,1125,2.545,1889,5.496,1890,5.496,1891,5.496,1892,5.496,1893,5.496,1894,4.208,1895,5.496,1896,5.496,1897,5.496,1898,5.496,1899,5.496]],["t/515",[1,2.003,4,0.174,7,0.589,9,0.731,19,1.762,29,2.614,32,3.624,59,2.363,77,2.543,94,0.725,209,0.352,226,0.396,256,0.581,284,2.003,318,2.116,333,0.83,343,2.614,394,5.164,410,2.121,729,2.614,750,2.474,783,2.975,870,2.614,939,2.614,981,2.614,1025,2.801,1119,1.614,1125,1.429,1183,2.474,1196,3.287,1363,2.474,1397,1.953,1683,2.474,1900,4.472,1901,4.926,1902,4.472,1903,4.472,1904,2.801,1905,3.085,1906,3.085,1907,3.085,1908,3.085,1909,3.085,1910,3.085,1911,3.085,1912,3.085,1913,3.085,1914,3.085,1915,3.085,1916,3.085,1917,3.085,1918,3.085,1919,3.085,1920,3.085,1921,3.085,1922,3.085,1923,3.085,1924,3.085,1925,3.085,1926,3.085]],["t/517",[4,0.258,7,0.872,19,1.906,32,3.362,43,1.707,54,1.524,77,1.14,94,0.718,121,1.918,158,2.204,209,0.521,226,0.534,256,0.86,305,3.665,318,2.857,333,1.23,350,3.05,354,2.967,394,6.334,398,3.872,590,3.141,782,2.303,783,4.016,962,3.872,1119,2.179,1125,2.116,1196,4.438,1490,3.665,1532,3.244,1900,6.038,1902,6.038,1903,6.038,1927,4.57,1928,4.57,1929,4.57]],["t/519",[4,0.367,7,1.241,94,0.545,102,3.555,224,5.506,226,0.522,309,1.972,333,1.749,334,2.187,601,3.009,634,6.495,824,4.015,1017,2.451,1018,4.64,1019,3.927,1193,5.367,1194,4.976,1436,7.7,1930,6.498,1931,6.498,1932,6.498]],["t/521",[3,4.523,4,0.347,46,5.209,94,0.526,99,2.523,202,3.991,226,0.494,295,5.209,334,2.069,336,5.209,341,4.735,471,3.837,545,5.209,549,3.305,590,4.225,601,2.847,609,4.364,806,3.25,972,3.147,1052,5.582,1486,5.209,1519,5.209,1651,4.708,1933,8.177,1934,6.148,1935,8.177,1936,6.148]],["t/523",[4,0.38,7,1.285,9,1.593,50,3.684,73,3.292,77,1.678,94,0.691,102,3.681,140,2.538,209,0.767,226,0.541,419,6.109,715,6.109,826,5.396,1014,4.49,1937,6.728,1938,6.728,1939,6.728]],["t/525",[0,5.231,4,0.442,38,4.451,41,2.842,81,3.45,94,0.504,266,4.012,466,4.633,506,4.451,681,5.231,1213,4.961,1881,5.565]],["t/527",[54,2.85,401,5.16,506,4.851,1608,4.675,1940,8.544,1941,8.544]],["t/529",[102,4.41,256,1.517,506,4.577,517,4.98,601,4.496,982,6.144,1942,8.226]],["t/531",[4,0.319,9,1.34,54,1.888,62,3.89,72,4.894,96,1.264,105,2.769,203,1.675,207,1.703,226,0.622,258,3.153,523,4.795,574,4.163,589,4.795,705,4.017,726,5.375,764,3.534,765,4.334,793,3.043,1014,3.776,1148,5.138,1192,2.769,1423,4.163,1425,5.138,1450,3.776,1587,5.138,1686,4.795,1894,4.334,1943,4.795,1944,5.659,1945,5.659,1946,5.659,1947,7.733]],["t/533",[205,4.579,375,4.895,444,3.011]],["t/535",[4,0.388,7,0.363,8,1.525,9,1.227,15,1.101,18,4.486,34,3.39,43,0.71,58,1.485,70,0.676,74,0.88,77,0.474,86,1.399,90,3.468,94,0.468,96,1.308,97,2.339,102,1.04,126,1.525,129,3.813,132,4.884,139,2.226,140,1.241,160,1.269,172,1.269,201,3.2,202,1.235,203,0.563,205,1.684,207,1.309,209,0.375,217,1.963,218,0.827,219,1.175,223,1.611,226,0.153,228,1.235,256,1.103,269,0.747,286,1.307,290,1.203,303,1.022,309,1.573,316,1.307,327,1.059,333,0.512,334,0.64,359,1.059,369,1.611,395,3.088,404,1.611,423,6.928,444,0.64,449,1.005,451,1.08,469,1.905,473,1.04,483,1.726,506,1.868,530,1.456,534,1.35,549,1.022,568,1.525,609,1.35,624,0.958,650,2.336,692,1.269,721,1.399,723,2.571,726,1.08,764,0.869,775,1.726,783,1.148,793,1.769,798,1.726,893,1.35,903,3.488,977,1.307,982,2.082,996,1.08,1082,1.726,1118,1.203,1192,0.93,1375,2.336,1651,1.456,1792,1.726,1948,1.611,1949,1.902,1950,1.902,1951,1.902,1952,1.902,1953,1.902,1954,1.902,1955,1.902,1956,3.685,1957,1.525,1958,4.158,1959,1.902,1960,2.987,1961,1.902,1962,3.949,1963,3.29,1964,1.902,1965,3.29,1966,1.902,1967,2.987,1968,4.963,1969,3.29,1970,1.902,1971,3.29,1972,1.902,1973,1.902,1974,2.421,1975,3.29,1976,2.421,1977,1.902,1978,1.902,1979,1.307,1980,1.902,1981,1.611,1982,1.611,1983,1.726,1984,1.902,1985,1.902,1986,3.29,1987,1.902,1988,1.902,1989,1.902,1990,1.902]],["t/537",[4,0.394,34,2.582,38,2.773,77,1.74,94,0.604,96,1.091,129,3.593,132,3.467,140,1.842,203,2.065,207,1.47,209,0.796,222,4.655,226,0.392,256,0.919,303,2.626,312,4.138,363,2.886,395,3.467,426,2.54,444,1.644,469,2.828,506,2.773,534,3.467,723,2.886,783,4.213,982,3.09,1375,3.467,1536,3.593,1958,3.467,1968,5.91,1979,3.356,1982,4.138,1991,4.434,1992,6.976,1993,4.883,1994,3.74,1995,4.883,1996,4.138,1997,4.883,1998,4.883,1999,4.434,2000,4.883,2001,4.434]],["t/539",[4,0.394,34,3.688,41,2.529,77,2.214,131,3.033,132,4.952,140,2.631,172,5.924,303,3.75,469,4.039,506,3.96,806,3.688,982,4.414,1158,5.342,1375,4.952,1956,5.91,1958,4.952,1979,4.794,1982,5.91]],["t/541",[0,5.231,4,0.442,38,4.451,41,2.842,81,3.45,94,0.504,266,4.012,466,4.633,485,6.003,681,5.231,1213,4.961,1881,5.565]],["t/543",[7,1.561,19,2.344,54,2.727,73,4.001,97,3.689,227,5.308,480,6.557,482,5.62,1976,6.015]],["t/545",[7,1.561,19,2.344,54,2.727,73,4.001,97,3.689,227,5.308,479,6.557,482,5.62,1976,6.015]],["t/547",[4,0.333,7,1.125,9,1.395,10,5.067,45,3.641,203,1.745,207,1.774,226,0.774,256,1.109,426,4.134,449,3.116,524,5.557,805,4.336,833,5.463,1327,3.413,1872,4.993,2002,3.826,2003,4.726,2004,5.893,2005,5.893,2006,5.893,2007,7.949,2008,5.351]],["t/549",[4,0.38,7,1.656,9,1.593,10,3.292,52,5.239,102,3.681,226,0.541,256,1.266,318,3.727,426,4.511,1079,7.063,2002,4.368,2009,8.675,2010,8.675,2011,6.728,2012,6.109]],["t/551",[4,0.367,7,1.241,9,1.539,10,3.18,45,4.015,94,0.545,203,1.924,209,0.967,226,0.522,256,1.223,426,4.91,643,5.367,948,6.021,1327,3.763,2002,4.219,2003,5.211,2013,5.506,2014,6.498,2015,6.498,2016,6.498,2017,5.9]],["t/553",[4,0.367,7,1.241,9,1.539,10,4.62,45,4.015,94,0.545,203,1.924,209,0.967,226,0.522,256,1.223,426,4.91,948,6.021,1327,3.763,2002,4.219,2003,5.211,2013,5.506,2017,5.9,2018,6.498,2019,6.498,2020,6.498]],["t/555",[4,0.389,7,1.316,9,1.632,10,4.31,45,4.257,203,2.04,226,0.554,228,6.304,256,1.297,426,4.581,643,4.361,1327,3.99,2002,4.474,2003,5.526,2013,5.839,2021,6.891,2022,7.998]],["t/557",[4,0.384,7,1.3,45,4.207,203,2.016,207,2.049,226,0.547,256,1.282,426,3.541,524,5.965,643,6.667,1327,3.943,1872,5.769,2008,6.182,2023,6.809,2024,6.809,2025,8.741]],["t/559",[1,4.171,4,0.363,7,1.227,9,1.521,10,4.119,45,3.969,147,4.171,203,1.902,226,0.516,256,1.209,307,5.444,308,5.833,309,1.95,347,3.969,426,4.378,643,5.942,714,5.833,877,4.171,924,4.727,1232,5.833,1327,3.72,1598,4.287,2026,6.425,2027,6.425]],["t/561",[4,0.409,9,1.715,52,4.373,102,3.962,131,3.149,207,2.179,226,0.582,228,4.701,256,1.363,426,4.727,524,5.616,643,6.287,2028,7.241,2029,7.241]],["t/563",[4,0.359,7,1.213,9,1.979,10,4.089,69,4.51,90,3.202,174,4.367,207,1.912,226,0.511,256,1.196,424,5.768,425,5.095,426,5.36,948,4.51,1118,4.021,1326,5.383,1532,4.51,2002,4.125,2030,5.768,2031,6.353,2032,6.353,2033,6.353,2034,6.353]],["t/565",[4,0.399,7,1.348,9,2.119,10,4.378,207,2.125,226,0.568,256,1.329,425,5.663,426,5.107,1118,4.469,1326,5.983,1532,5.013,2002,4.585,2030,6.412,2035,7.062,2036,7.062]],["t/567",[4,0.304,7,1.428,9,1.277,10,2.638,54,1.798,77,2.142,94,0.552,96,1.204,142,2.76,209,0.615,217,2.433,218,2.344,226,0.433,256,1.408,426,2.804,549,2.899,650,6.096,841,4.324,860,4.129,893,6.096,1672,4.129,1943,4.568,1983,4.895,2002,3.5,2037,6.791,2038,6.337,2039,4.568,2040,7.479,2041,4.568,2042,5.392,2043,5.392,2044,5.392]],["t/569",[4,0.409,8,5.807,9,1.715,10,4.448,94,0.466,203,2.144,226,0.582,256,1.363,333,1.949,426,3.766,548,6.135,662,6.135,2002,4.701,2022,6.574,2045,7.241,2046,7.241,2047,7.241]],["t/571",[4,0.278,7,1.34,9,1.166,10,3.434,54,1.643,58,4.419,77,1.751,94,0.573,142,2.521,209,0.562,217,2.222,226,0.396,228,3.198,256,1.321,426,2.562,701,4.239,763,2.562,782,2.483,788,4.683,860,3.772,1453,3.95,1490,5.629,1570,4.472,1672,3.772,2002,3.198,2012,4.472,2037,6.372,2038,5.947,2039,4.173,2048,4.926,2049,4.472,2050,4.173,2051,7.019,2052,7.019,2053,4.926,2054,4.926]],["t/573",[4,0.34,7,1.539,77,2.011,94,0.387,142,4.97,207,1.811,209,0.686,217,3.637,226,0.484,256,1.517,414,5.464,426,3.13,517,5.616,643,5.752,860,4.608,1672,4.608,2038,6.83,2039,5.099,2055,9.09,2056,6.018]],["t/575",[0,5.231,4,0.442,38,4.451,41,2.842,81,3.45,94,0.504,266,4.012,466,4.633,681,5.231,1213,4.961,1881,5.565,2057,7.839]],["t/577",[4,0.367,41,2.356,94,0.607,142,3.326,169,3.049,209,0.741,226,0.522,256,1.223,352,4.091,471,3.98,593,4.613,601,3.927,806,3.435,815,5.506,1379,6.021,2058,8.481,2059,6.498,2060,6.498,2061,6.498,2062,6.498]],["t/579",[4,0.425,94,0.599,226,0.605,256,1.417,334,2.534,473,4.119,601,4.312,1017,2.839,2063,9.312,2064,7.528,2065,7.528,2066,7.528]],["t/581",[344,6.96,421,8.252]],["t/583",[43,2.637,54,2.356,55,4.985,188,5.195,332,3.314,375,3.864,534,5.013,625,5.983,857,5.983,978,6.412,987,5.97,1045,6.412,2067,7.062,2068,7.062,2069,7.062,2070,7.062,2071,7.062,2072,7.062]],["t/585",[4,0.329,7,1.507,43,2.178,54,2.633,76,4.877,94,0.679,157,4.571,161,4.291,203,2.337,226,0.634,332,3.704,333,1.57,392,2.567,513,3.787,637,4.678,961,4.678,1019,3.655,1121,4.009,1125,3.655,1272,4.942,2073,7.894]],["t/587",[4,0.301,43,1.994,54,2.479,67,2.38,76,3.3,94,0.714,157,5.349,158,4.456,199,5.69,209,0.847,226,0.597,332,4.01,333,1.437,392,2.351,592,4.525,637,4.283,1121,3.671,1242,4.525,1272,4.525,2074,7.43,2075,5.341]],["t/589",[11,4.227,34,3.148,54,2.67,55,3.318,70,2.118,89,3.917,189,3.148,278,3.974,333,1.603,358,3.866,409,3.974,649,3.769,657,3.448,727,5.407,728,7.251,763,3.097,773,3.974,833,4.093,904,4.776,987,3.974,1095,4.227,1125,2.757,1316,5.407,2076,5.955,2077,5.955,2078,5.955,2079,5.955,2080,5.407,2081,5.955,2082,5.955]],["t/591",[205,4.579,375,4.895,444,3.011]],["t/593",[4,0.343,5,1.444,7,0.928,9,1.44,19,1.394,41,1.101,48,1.724,56,1.406,65,2.874,70,1.08,91,2.874,94,0.725,96,0.678,110,3.577,121,2.919,157,2.816,158,2.346,209,0.868,226,0.489,253,3.9,256,0.572,260,5.861,261,2.435,269,1.911,309,1.476,333,0.817,334,1.022,353,2.282,601,1.406,763,1.579,1017,1.145,1114,2.325,1119,2.279,1125,1.406,1169,2.919,1327,1.758,1363,2.435,1397,1.921,1522,4.12,1598,2.026,2083,2.757,2084,5.522,2085,4.863,2086,4.415,2087,4.415,2088,2.757,2089,3.036,2090,3.036,2091,3.036]],["t/595",[4,0.154,7,1.248,9,1.34,19,1.279,37,2.153,48,1.55,65,1.614,70,0.971,74,3.026,90,2.249,91,4.259,94,0.708,97,1.232,110,4.808,116,3.781,117,3.781,121,3.426,179,3.168,209,0.509,218,1.187,226,0.219,252,2.479,253,2.19,254,3.418,255,3.781,256,0.514,257,2.19,259,5.445,260,4.952,261,3.579,269,2.224,309,1.717,346,1.55,349,4.052,353,1.281,471,1.281,601,1.264,644,1.728,704,2.479,763,1.42,793,1.468,1119,2.142,1169,1.146,1271,2.314,1277,2.314,1327,1.581,1505,2.479,1522,2.314,2084,2.479,2086,2.479,2087,4.052,2092,2.731,2093,2.731,2094,2.731,2095,4.463,2096,5.66,2097,2.731,2098,4.463,2099,2.731,2100,2.731,2101,2.731,2102,2.731,2103,2.731]],["t/597",[0,5.231,4,0.442,38,4.451,41,2.842,81,3.45,94,0.504,266,4.012,466,4.633,681,5.231,734,6.287,1213,4.961,1881,5.565]],["t/599",[4,0.449,226,0.639,256,1.496,646,7.216,782,4.006,979,7.216,1274,7.216,1942,6.734,2104,7.216,2105,7.948,2106,7.948]],["t/601",[7,1.631,58,3.855,644,5.407,702,6.852,726,4.851,2050,7.239]],["t/603",[7,1.682,701,5.32,2049,7.997,2050,7.463]],["t/605",[4,0.468,34,4.385,81,3.651,132,5.889,205,4.246,375,4.539,444,2.792,783,5.01]],["t/607",[7,1.2,30,3.322,77,1.567,140,2.37,218,2.732,219,3.882,256,1.183,303,3.378,318,2.7,469,3.638,506,3.567,723,3.714,935,5.705,977,4.319,982,3.976,1118,3.976,1536,6.103,1957,5.039,1958,5.889,1960,5.705,1962,5.705,1976,4.622,1979,4.319,1981,5.324,1994,4.812,2107,6.283,2108,6.283,2109,6.283]],["t/609",[7,1.456,30,4.033,102,4.174,207,2.296,218,3.317,256,1.436,524,4.713,977,5.244,1976,5.613,1994,7.19,2110,8.157]],["t/611",[4,0.276,15,2.828,27,3.017,30,2.582,77,1.74,94,0.646,140,1.842,203,1.446,207,2.449,209,0.928,219,4.31,222,5.43,226,0.392,256,0.919,428,3.259,444,1.644,506,3.961,574,3.593,650,3.467,744,4.434,1098,2.54,1119,1.6,1169,2.05,1186,3.17,1559,4.434,1660,3.17,1994,3.74,1996,4.138,2001,4.434,2110,3.916,2111,4.883,2112,4.434,2113,5.594,2114,4.883,2115,4.883,2116,4.138,2117,4.883,2118,4.883,2119,4.883,2120,4.883]],["t/613",[30,4.385,140,3.129,219,5.125,561,7.531,2110,6.653,2113,6.653,2121,7.531,2122,7.531]],["t/615",[30,4.385,121,4.146,219,6.102,256,1.561,1948,8.369]],["t/617",[4,0.283,7,1.357,9,1.187,30,2.65,55,2.793,77,1.25,94,0.531,121,2.983,126,4.02,172,3.345,209,0.81,218,2.179,219,5.859,226,0.403,256,0.943,303,2.695,444,1.687,469,2.902,506,2.846,723,2.963,831,3.345,903,4.02,982,3.172,1098,2.607,1178,2.291,1613,4.742,1979,3.445,1981,4.247,2116,4.247,2123,4.551,2124,4.551,2125,6.452,2126,5.012,2127,5.012,2128,4.551,2129,4.551,2130,4.02,2131,4.551,2132,4.551,2133,4.551,2134,5.012,2135,5.012]],["t/619",[4,0.336,30,3.148,94,0.622,107,6.782,121,3.36,209,0.913,219,4.945,226,0.479,256,1.121,258,3.318,444,2.004,831,3.974,855,4.776,1119,1.952,1169,2.5,1613,3.974,2116,5.045,2123,5.407,2128,5.407,2130,4.776,2131,5.407,2136,5.955,2137,5.955,2138,5.955,2139,5.955,2140,5.955,2141,8.004]],["t/621",[4,0.345,7,1.4,30,2.157,37,1.968,56,1.889,77,1.017,94,0.524,96,0.911,121,1.712,126,5.882,137,3.001,140,1.539,172,2.722,203,1.208,209,0.697,218,1.774,219,5.392,226,0.328,256,0.768,258,2.273,269,1.603,303,2.193,318,2.627,444,1.373,468,5.552,469,2.362,506,2.316,721,3.001,723,2.411,763,2.122,793,2.193,803,2.52,938,3.704,977,2.804,982,2.582,1007,3.272,1098,2.122,1178,1.864,1536,3.001,1948,3.456,1957,3.272,1958,2.896,1968,5.181,1976,3.001,1979,2.804,2122,3.704,2124,3.704,2125,5.552,2130,3.272,2132,3.704,2133,3.704,2142,3.704,2143,4.079,2144,4.079,2145,4.079,2146,4.079,2147,4.079,2148,4.079,2149,4.079,2150,4.079,2151,4.079,2152,4.079]],["t/623",[30,4.586,172,5.788,219,6.265,256,1.633]],["t/625",[30,4.586,140,3.272,2110,6.956,2112,7.875,2121,7.875]],["t/627",[7,1.507,30,3.084,72,3.691,77,1.969,95,3.25,96,1.303,140,2.2,207,1.756,219,4.877,303,3.136,315,4.678,428,3.892,469,3.378,506,3.312,723,3.448,766,3.787,980,5.296,982,3.691,991,4.942,1118,4.995,1429,5.296,1958,5.604,1967,8.123,1979,4.009,2113,6.33,2129,5.296,2153,7.167,2154,5.833]],["t/629",[4,0.336,7,1.137,64,3.258,77,1.485,94,0.515,140,2.246,170,3.381,203,1.763,209,0.913,219,3.679,226,0.479,269,2.341,303,3.202,352,2.872,428,3.974,444,2.004,982,3.769,1164,4.56,1958,4.227,2088,5.407,2113,4.776,2130,4.776,2153,5.407,2155,5.955,2156,5.955,2157,5.955,2158,5.955,2159,5.955,2160,5.955,2161,5.955,2162,5.955,2163,5.407,2164,5.955]],["t/631",[0,5.231,4,0.442,9,1.856,38,4.451,41,2.842,81,3.45,94,0.504,266,4.012,466,4.633,681,5.231,1213,4.961,1881,5.565]],["t/633",[4,0.414,36,3.352,77,1.829,94,0.589,209,0.836,226,0.589,256,1.381,290,4.642,327,4.087,347,4.531,701,4.43,1098,3.814,1119,3.003,2165,6.659,2166,7.334]],["t/635",[4,0.409,36,3.309,77,1.806,94,0.584,209,0.826,226,0.582,256,1.363,258,4.035,290,4.583,327,4.035,347,4.474,701,4.373,1098,3.766,1119,2.979,1772,5.327,2167,7.241]],["t/637",[4,0.373,7,0.866,9,2.254,19,1.895,94,0.7,209,0.978,226,0.531,256,0.853,309,1.376,412,5.063,498,3.636,749,2.68,1098,3.438,1119,2.557,1169,3.276,1247,3.116,1263,7.267,1810,5.54,2168,7.726,2169,7.804,2170,6.612,2171,4.534,2172,4.534]],["t/639",[41,2.842,72,4.961,97,3.537,438,7.117,538,6.198,800,4.633,806,4.144,877,5.089,899,6.003,1255,6.198]],["t/641",[4,0.359,7,1.213,9,2.349,70,2.26,94,0.6,203,1.881,207,1.912,209,0.725,226,0.511,256,1.196,749,4.939,1098,3.304,1119,2.739,1169,3.508,1450,4.239,2173,7.912,2174,5.383,2175,5.383,2176,6.353]],["t/643",[4,0.359,7,1.213,9,2.349,70,2.26,94,0.6,207,1.912,209,0.725,226,0.511,256,1.196,749,4.939,1098,3.304,1119,2.739,1169,3.508,1255,4.125,1300,4.674,2173,7.912,2174,5.383,2175,5.383,2177,6.353]],["t/645",[4,0.359,7,1.213,9,2.349,70,2.26,94,0.6,207,1.912,209,0.725,226,0.511,256,1.196,538,4.125,749,4.939,1098,3.304,1119,2.739,1169,3.508,1300,4.674,2173,7.912,2174,5.383,2175,5.383,2178,6.353]],["t/647",[4,0.38,9,2.054,94,0.558,209,0.767,226,0.541,256,1.266,269,2.644,275,6.109,352,4.184,476,5.701,662,5.701,749,5.127,996,3.82,1098,3.499,1268,4.49,2179,4.95,2180,6.109,2181,6.728,2182,6.728,2183,6.728]],["t/649",[4,0.384,9,2.07,94,0.562,209,0.776,226,0.547,256,1.282,269,2.676,352,4.216,749,5.706,996,3.866,1098,3.541,1268,4.543,1772,6.431,2179,5.009,2184,5.769,2185,6.809,2186,5.214]],["t/651",[4,0.384,9,2.07,94,0.562,209,0.776,226,0.547,256,1.282,269,2.676,352,4.216,749,5.706,996,3.866,1098,3.541,1268,4.543,2179,5.009,2184,5.769,2186,5.214,2187,8.741,2188,6.809]],["t/653",[4,0.384,9,2.07,94,0.562,209,0.776,226,0.547,256,1.282,269,2.676,352,4.216,749,5.706,996,3.866,1098,3.541,1268,4.543,2179,5.009,2184,5.769,2186,5.214,2189,8.741,2190,6.809]],["t/655",[4,0.384,9,2.07,94,0.562,209,0.776,226,0.547,256,1.282,269,2.676,352,4.216,749,5.706,996,3.866,1098,3.541,1268,4.543,2179,5.009,2180,6.182,2186,5.214,2191,8.741,2192,6.809]],["t/657",[4,0.389,9,2.086,94,0.624,209,0.786,226,0.554,269,2.708,352,4.249,749,4.073,1095,4.892,1098,3.584,1125,3.191,1268,4.598,2080,6.256,2179,5.07,2186,5.277,2193,6.891,2194,6.891,2195,6.891]],["t/659",[99,3.217,109,4.843,209,0.894,443,7.117,446,6.287,549,4.215,634,6.003,774,5.565,793,5.133,887,5.767,2196,7.839]],["t/661",[4,0.224,15,2.296,19,1.137,37,1.913,54,1.997,63,2.815,70,1.411,94,0.669,99,1.628,212,6.121,226,0.319,256,0.746,333,1.067,404,3.36,429,3.601,471,1.861,504,2.51,513,2.575,563,3.601,590,2.726,601,1.836,623,3.18,657,2.296,766,2.575,774,2.815,805,2.918,893,2.815,1103,3.36,1118,2.51,1119,2.632,1127,5.783,1169,4.067,1247,5.521,1311,3.18,1476,3.601,1608,2.17,1651,3.037,1715,2.918,1742,5.072,1795,5.435,2197,3.966,2198,3.966,2199,5.986,2200,5.986,2201,8.033]],["t/663",[4,0.273,7,0.924,9,2.374,15,4.015,45,2.991,56,2.242,70,1.722,94,0.569,102,2.649,109,2.991,212,4.922,226,0.389,256,0.911,269,1.903,290,3.064,472,4.396,749,4.098,860,5.309,1019,3.21,1119,2.272,1169,3.712,1304,8.841,1327,2.804,1490,5.56,1519,5.874,1598,3.231,2202,6.933,2203,8.099,2204,4.842]],["t/665",[1,4.585,4,0.399,9,2.119,94,0.575,209,0.805,226,0.568,256,1.329,269,2.776,352,4.737,1098,3.673,1119,2.314,1169,2.964,1247,6.15,2205,7.062,2206,7.062]],["t/667",[4,0.363,9,2.223,94,0.604,209,0.96,226,0.516,256,1.209,269,2.525,451,3.648,701,3.88,797,3.72,1119,2.759,1169,3.534,1235,5.833,1236,7.643,1521,6.908,2165,5.833,2207,6.425,2208,6.425]],["t/669",[4,0.34,9,2.006,27,1.846,39,1.348,45,1.846,54,2.008,57,1.94,77,1.197,88,2.054,94,0.651,96,0.668,99,1.227,148,2.289,158,2.316,167,2.713,180,1.94,221,1.635,226,0.484,256,0.563,258,2.675,306,2.397,333,0.804,334,1.006,351,1.94,354,1.94,406,5.464,410,2.054,411,4.359,412,3.677,473,4.636,482,2.054,498,3.85,504,1.891,518,2.121,583,2.054,601,1.384,624,1.506,713,2.199,716,3.204,736,2.397,749,3.557,750,2.397,782,2.42,826,2.397,828,2.054,831,1.994,965,2.713,987,1.994,1018,1.635,1329,2.199,1369,2.838,1532,3.408,1598,1.994,1608,1.635,1641,4.068,1774,3.677,1943,2.532,2142,2.713,2209,2.988,2210,2.988,2211,2.988,2212,2.713,2213,2.713,2214,2.988,2215,4.801,2216,2.988,2217,6.018,2218,4.801,2219,2.988,2220,4.801,2221,2.988,2222,2.988,2223,2.988,2224,2.988,2225,2.988,2226,2.988,2227,2.988]],["t/671",[4,0.334,7,0.747,9,1.889,56,1.811,70,1.391,94,0.667,160,2.61,209,0.91,226,0.476,256,0.736,269,1.537,290,2.475,412,4.537,451,3.364,519,4.772,538,3.846,650,4.206,797,2.265,805,2.878,899,2.995,990,3.137,1098,3.081,1119,2.614,1169,3.349,1186,5.179,1247,4.072,1255,2.539,1277,3.314,1311,4.751,1327,2.265,1498,6.397,1598,2.61,2168,3.314,2212,3.551,2228,7.151,2229,3.911,2230,5.924,2231,5.924,2232,5.924,2233,3.911]],["t/673",[4,0.394,9,2.102,94,0.571,203,2.065,209,0.795,226,0.561,256,1.313,269,2.742,352,4.71,545,7.521,1098,3.628,1119,2.286,1169,3.727,1247,4.794,2234,6.975]],["t/675",[4,0.394,9,2.102,94,0.571,160,4.655,209,0.795,226,0.561,256,1.313,269,2.742,301,6.102,352,4.71,1098,3.628,1119,2.909,1169,2.928,1247,4.794,2235,6.975]],["t/677",[94,0.599,96,1.682,105,3.684,205,3.853,217,3.397,222,5.023,444,2.534,506,4.274,783,4.547,877,4.888,1055,6.037,1186,4.888,1979,5.174,2236,7.528]],["t/679",[39,4.037,327,4.985,512,6.582]],["t/681",[77,1.982,93,4.428,96,1.775,139,4.068,222,5.304,506,5.466,763,4.134,990,6.374,1154,6.374,2237,7.216]],["t/683",[7,1.497,56,3.63,77,1.955,102,4.289,139,4.887,315,6.287,709,7.117,763,4.077,1375,5.565,2238,7.839,2239,7.839]],["t/685",[4,0.252,7,0.852,54,1.489,64,4.231,71,2.153,94,0.698,139,2.284,140,1.683,203,1.935,207,1.343,209,0.745,222,5.16,226,0.359,315,3.579,333,1.759,334,2.2,471,2.094,506,4.391,705,3.168,888,2.824,1013,4.052,1017,2.465,1018,2.442,1019,3.026,1339,4.052,2237,4.052,2240,4.052,2241,4.463,2242,4.052,2243,4.052,2244,4.052,2245,4.052,2246,5.934,2247,4.463,2248,4.463,2249,7.733,2250,4.463,2251,4.463,2252,4.463]],["t/687",[4,0.283,7,0.957,64,4.517,70,1.783,77,1.25,94,0.701,96,1.12,97,2.262,140,1.891,203,1.484,207,1.508,209,0.81,222,5.509,226,0.403,333,1.349,334,1.687,471,2.352,514,4.02,701,3.027,734,4.02,815,4.247,982,4.497,1012,4.247,1017,1.891,1018,2.742,1019,3.29,1942,4.247,2104,4.551,2163,4.551,2240,4.551,2243,4.551,2244,4.551,2245,4.551,2246,4.551,2253,5.012]],["t/689",[4,0.307,54,2.879,70,1.936,71,2.626,90,2.743,94,0.666,100,4.168,203,2.229,205,2.786,207,1.638,209,0.859,217,2.456,218,2.367,222,6.214,226,0.437,444,1.832,506,4.275,514,4.365,536,4.942,1012,4.612,1996,4.612,1999,4.942,2242,4.942,2254,5.443,2255,5.443,2256,5.443,2257,5.443,2258,5.443,2259,5.443,2260,5.443]],["t/691",[205,4.579,375,4.895,444,3.011]],["t/693",[4,0.409,7,1.382,9,2.152,41,2.626,91,5.373,94,0.584,209,0.826,226,0.582,256,1.363,395,6.453,852,6.135,2261,6.135,2262,7.241,2263,7.241]],["t/695",[4,0.505,7,1.348,9,2.325,41,2.561,94,0.454,209,0.805,226,0.568,256,1.329,259,5.97,395,6.351,852,5.983,1369,4.174,1715,5.195,2261,5.983,2264,7.062]],["t/697",[4,0.273,37,2.336,94,0.732,129,3.562,209,0.552,226,0.389,256,0.911,395,5.75,409,3.231,426,3.606,1079,3.562,1536,3.562,1647,4.102,1648,3.708,1683,3.883,1991,4.396,1994,3.708,2168,4.102,2261,4.102,2265,4.842,2266,4.842,2267,4.842,2268,4.842,2269,8.099,2270,4.842,2271,4.842,2272,4.842,2273,4.842,2274,4.842,2275,4.842,2276,4.842,2277,4.842]],["t/699",[205,4.579,375,4.895,444,3.011]],["t/701",[4,0.399,39,2.242,94,0.65,209,0.805,226,0.568,327,2.768,331,3.415,333,1.901,334,3.306,396,5.483,444,2.377,471,3.856,512,3.655,525,4.895,1017,3.565,1186,3.226,2278,4.712,2279,3.805,2280,7.737,2281,4.969]],["t/703",[9,1.964,105,4.059,410,5.702,488,5.535,624,4.181,843,5.386,1166,7.028,1700,7.531]],["t/705",[4,0.316,30,4.633,51,3.638,89,2.742,94,0.635,99,2.3,109,3.462,207,2.312,209,0.639,226,0.45,396,5.848,444,1.886,524,3.462,525,4.203,538,3.638,601,2.595,696,4.748,1017,3.305,1300,4.123,2278,3.739,2279,5.882,2280,4.291,2282,4.748,2283,5.604,2284,5.604,2285,5.604,2286,5.604,2287,5.604]],["t/707",[4,0.355,27,3.882,30,3.322,56,2.909,94,0.66,207,2.497,209,0.717,226,0.505,269,2.47,334,3.126,396,5.536,444,2.115,525,4.539,1017,2.37,1521,4.622,2278,4.193,2280,4.812,2282,7.869,2288,6.283]],["t/709",[4,0.371,15,3.806,94,0.646,96,1.468,99,2.698,139,3.365,140,2.479,148,5.034,207,1.978,209,0.75,226,0.528,333,1.769,334,2.212,1017,2.479,2289,8.545,2290,5.034,2291,5.271,2292,5.271,2293,6.573,2294,8.545,2295,6.573]],["t/711",[4,0.404,48,4.06,94,0.58,207,2.152,209,0.815,226,0.575,333,1.924,334,2.407,1017,2.697,1193,4.525,1379,5.076,2291,5.734,2292,5.734,2296,6.058,2297,7.15,2298,5.734,2299,6.492,2300,7.15]],["t/713",[4,0.409,7,1.382,19,2.605,94,0.584,207,2.179,209,0.826,226,0.582,333,2.446,334,2.437,1017,2.731,2291,5.807,2292,5.807,2301,5.807,2302,7.241,2303,7.241]],["t/715",[4,0.409,7,1.382,19,2.605,94,0.584,207,2.179,209,0.826,226,0.582,333,1.949,334,2.437,1017,3.428,2291,5.807,2292,5.807,2301,5.807,2304,7.241,2305,7.241]],["t/717",[4,0.409,39,3.267,94,0.584,102,3.962,209,0.826,226,0.582,396,6.065,444,2.437,525,3.962,1193,4.583,2278,4.832,2282,6.135,2296,6.135,2306,7.241,2307,7.241,2308,7.241]],["t/719",[4,0.375,7,1.27,19,1.906,27,4.108,30,3.515,94,0.553,95,3.705,207,2.001,209,0.758,226,0.534,333,1.79,334,2.898,396,6.37,425,5.333,444,2.238,525,3.638,1017,2.508,2278,4.437,2280,5.092,2301,5.333,2309,6.65]],["t/721",[4,0.389,7,1.316,30,3.643,94,0.566,207,2.074,209,0.786,226,0.554,396,5.878,444,2.319,525,3.77,1017,2.599,2278,4.598,2279,5.277,2290,5.277,2310,6.891,2311,6.891,2312,6.891,2313,5.839,2314,6.256,2315,5.526]],["t/723",[1,1.891,4,0.164,7,0.556,19,0.835,51,4.408,70,1.036,94,0.561,96,0.65,102,1.593,209,0.332,226,0.234,290,1.843,333,0.784,396,3.138,444,0.98,471,4.599,517,1.799,522,2.467,525,4.587,538,4.837,781,6.42,829,4.269,877,1.891,887,3.459,930,2.644,1004,2.644,1186,6.362,1208,2.644,1233,2.23,1255,3.053,2278,1.943,2279,5.199,2280,4.529,2290,3.601,2298,6.723,2299,5.37,2301,4.743,2313,6.312,2315,4.743,2316,2.467,2317,2.912,2318,2.912,2319,4.702,2320,4.702,2321,2.912,2322,2.644,2323,2.912,2324,6.789,2325,2.912,2326,2.912,2327,2.912,2328,4.702,2329,2.912]],["t/725",[4,0.351,7,1.186,39,2.804,57,4.035,94,0.529,102,3.4,209,0.709,226,0.499,333,1.673,444,2.092,471,3.865,517,3.84,525,3.4,623,4.984,781,4.759,843,4.035,877,4.035,1186,4.035,2278,4.147,2290,6.307,2298,6.605,2315,4.984,2316,5.266,2322,5.642,2330,6.215,2331,6.215,2332,6.215]],["t/727",[4,0.269,7,0.909,51,4.447,94,0.564,102,2.605,209,0.543,226,0.383,396,4.571,444,1.602,471,2.234,517,2.941,522,4.034,525,4.39,538,5.209,781,6.144,877,3.091,1091,7.285,1186,5.697,1255,3.091,2278,3.177,2279,5.246,2290,5.246,2298,6.435,2313,4.034,2314,6.219,2315,5.493,2316,4.034,2333,4.761,2334,4.761,2335,8.023,2336,6.85,2337,4.761,2338,4.761,2339,4.761]],["t/729",[205,4.579,375,4.895,444,3.011]],["t/731",[4,0.239,7,1.2,9,1.775,56,1.959,70,1.505,74,1.959,91,2.501,94,0.733,121,1.776,197,3.003,209,0.482,220,7.029,226,0.34,256,0.796,269,1.663,309,1.284,444,1.424,893,4.461,1363,3.393,1397,2.677,1598,2.823,1684,5.324,1691,3.585,1835,6.011,2083,3.841,2340,3.841,2341,4.231,2342,6.806,2343,7.532,2344,6.283,2345,3.841,2346,4.231]],["t/733",[4,0.27,7,0.701,70,0.769,74,1.001,94,0.746,96,1.069,121,2.37,197,2.607,201,2.701,209,0.546,220,5.827,226,0.385,256,0.407,258,1.204,259,1.442,309,1.114,318,2.057,333,1.702,334,0.727,342,1.655,364,1.368,428,1.442,444,1.236,451,1.227,488,2.45,498,1.733,719,2.945,1080,1.962,1250,2.45,1509,1.831,1532,1.534,1648,3.667,1676,1.831,1683,3.84,1684,5.359,1686,1.831,1691,4.057,1835,5.883,1840,1.962,2340,3.334,2342,5.126,2343,7.988,2345,1.962,2347,2.161,2348,2.161,2349,2.161,2350,2.161,2351,5.646,2352,2.161,2353,2.161]],["t/735",[0,5.231,4,0.442,38,4.451,41,2.842,81,3.45,94,0.504,266,4.012,309,2.379,466,4.633,681,5.231,1213,4.961,1881,5.565]],["t/737",[4,0.375,7,1.27,77,1.659,94,0.649,97,3,109,4.108,209,0.758,218,3.743,226,0.534,309,2.018,333,1.79,334,2.238,346,3.776,363,3.93,809,5.634,1017,2.508,1125,4.42,1369,3.93,2354,6.65]],["t/739",[7,1.456,65,4.509,97,3.442,207,2.296,226,0.755,227,4.953,229,6.927,309,3.087,346,4.332,972,3.905,1369,4.509]],["t/741",[4,0.359,7,1.213,94,0.663,209,0.725,226,0.511,256,1.196,274,3.065,309,2.536,333,1.71,334,2.138,352,3.065,508,4.674,601,2.942,1017,2.396,1018,3.476,1079,6.148,1125,2.942,1250,4.239,1450,4.239,2041,5.383,2355,6.353,2356,5.768,2357,5.768]],["t/743",[4,0.371,94,0.687,209,0.75,226,0.528,256,1.237,284,4.268,309,2.593,333,1.769,334,2.212,471,3.084,1017,2.479,1018,3.596,1125,3.044,1250,4.386,2041,5.569,2356,5.968,2357,7.758,2358,6.573,2359,6.573]],["t/745",[4,0.375,7,1.27,19,1.906,94,0.553,137,4.892,142,3.404,209,0.758,226,0.534,256,1.252,309,2.897,320,4.437,372,4.721,729,7.294,805,4.892,1125,3.079,1369,3.93,1453,5.333,1463,5.634,1494,6.037,2360,6.037,2361,6.65]],["t/747",[4,0.419,94,0.646,209,0.847,226,0.597,256,1.399,269,2.92,309,2.803,352,4.456,1125,3.44,1451,6.746,2360,6.746,2362,7.43]],["t/749",[1,3.568,4,0.31,7,1.049,19,2.172,94,0.668,209,0.627,218,3.295,226,0.442,256,1.034,309,2.3,333,1.479,334,1.85,347,3.395,352,4.184,353,4.071,465,3.777,723,3.248,1017,2.073,1018,4.746,1019,2.545,1125,2.545,1193,3.478,1250,5.057,1956,4.656,2363,8.675]],["t/751",[4,0.299,7,1.01,27,3.269,77,1.32,94,0.718,209,0.603,218,2.301,226,0.425,256,0.996,309,2.24,318,3.172,328,3.531,333,1.424,334,1.781,352,3.561,465,3.637,723,3.128,1127,5.92,1128,4.483,1250,5.673,1545,6.703,1660,3.435,1974,3.893,2364,5.291,2365,5.291,2366,5.291,2367,5.291]],["t/753",[4,0.213,7,0.722,19,2.008,94,0.725,209,0.658,226,0.304,256,0.712,309,2.126,333,2.272,334,2.842,353,3.287,508,2.782,519,2.523,793,2.033,1017,3.185,1018,4.62,1019,3.91,1119,2.295,1125,2.674,1169,2.94,1250,2.523,1369,2.235,1648,6.003,1904,5.242,2368,5.774,2369,3.782,2370,3.782]],["t/755",[7,1.456,65,4.509,97,3.442,207,2.296,226,0.755,227,4.953,232,6.464,309,3.087,346,4.332,972,3.905,1369,4.509]],["t/757",[4,0.323,7,1.091,94,0.66,166,3.31,209,0.888,218,4.134,226,0.459,256,1.076,309,2.687,333,2.095,334,2.621,390,3.185,508,5.728,809,4.843,1017,2.937,1018,4.26,1369,3.379,1609,3.245,2371,5.716,2372,5.716,2373,5.716,2374,5.716,2375,5.716]],["t/759",[7,1.456,65,4.509,97,3.442,207,2.296,226,0.755,227,4.953,233,6.118,309,3.087,346,4.332,972,3.905,1369,4.509]],["t/761",[4,0.319,19,1.622,41,2.052,77,2.197,90,2.852,94,0.658,140,2.135,209,0.645,226,0.455,256,1.065,309,1.717,327,3.153,333,2.081,334,2.603,353,2.656,793,3.043,948,4.017,972,2.897,1017,2.917,1095,5.49,1125,2.62,1227,4.539,1250,3.776,1660,5.021,1894,4.334,2376,5.659,2377,5.659,2378,5.659]],["t/763",[4,0.203,7,1.059,19,1.591,56,1.663,77,0.896,90,1.81,94,0.676,96,0.802,121,2.33,131,1.561,137,2.642,166,2.079,217,1.62,218,2.413,226,0.289,233,2.88,256,0.676,284,2.331,292,3.428,309,1.684,327,2.001,333,1.493,334,2.776,353,3.58,508,4.99,513,2.331,609,2.549,939,4.702,948,2.549,956,5.038,1017,2.878,1018,4.175,1019,2.57,1095,5.855,1203,3.703,1227,4.45,1369,2.122,1375,2.549,1450,2.396,1660,4.403,1894,2.75,1957,2.88,1974,2.642,2213,3.26,2379,3.591,2380,3.591,2381,3.591,2382,3.591,2383,3.591,2384,3.591,2385,3.591]],["t/765",[7,1.456,65,4.509,97,3.442,207,2.296,226,0.755,227,4.953,231,6.464,309,3.087,346,4.332,972,3.905,1369,4.509]],["t/767",[4,0.215,7,0.727,9,0.901,19,2.016,77,1.754,90,1.919,94,0.654,96,1.296,99,1.562,118,2.25,121,2.436,187,2.617,207,1.146,226,0.306,256,0.717,309,1.761,327,3.234,333,1.025,353,2.723,392,1.675,449,2.012,451,3.295,601,1.763,624,1.919,763,1.98,782,1.919,824,4.345,845,3.456,855,3.053,875,2.915,948,2.702,962,3.225,1084,3.225,1095,6.012,1145,2.472,1154,3.053,1180,3.456,1203,3.873,1227,4.654,1369,2.25,1374,3.456,1562,3.456,1639,3.225,1660,4.566,1894,2.915,1974,2.801,2386,3.807,2387,3.807,2388,3.807,2389,5.804,2390,3.807,2391,3.807,2392,3.807,2393,3.807,2394,3.807,2395,5.804,2396,3.807]],["t/769",[7,1.456,65,4.509,97,3.442,207,2.296,226,0.755,227,4.953,230,6.464,309,3.087,346,4.332,972,3.905,1369,4.509]],["t/771",[4,0.299,7,1.409,19,2.437,94,0.675,118,3.128,187,3.637,203,1.567,209,0.603,226,0.425,256,0.996,309,2.24,333,1.424,334,1.781,471,2.483,747,5.431,1017,1.996,1125,2.45,1193,3.349,1203,3.531,1489,4.244,1660,3.435,1672,4.052,1974,3.893,2296,4.483,2397,10.658,2398,5.291,2399,5.291]],["t/773",[4,0.384,7,1.3,19,1.952,94,0.655,209,0.776,226,0.547,256,1.282,309,2.653,333,2.353,334,2.292,800,4.024,1017,2.568,1125,3.153,1489,5.46,2400,6.809,2401,6.809,2402,6.809,2403,6.809]],["t/775",[4,0.384,7,1.3,19,1.952,94,0.655,209,0.776,226,0.547,256,1.282,309,2.653,333,1.832,334,2.292,800,4.024,1017,3.297,1125,3.153,1489,5.46,2404,6.809,2405,6.809,2406,6.809,2407,6.809]],["t/777",[4,0.288,7,0.974,27,3.152,77,1.273,94,0.703,102,2.792,143,6.686,226,0.41,256,0.96,269,2.005,309,1.548,333,1.373,334,3.047,352,2.461,471,3.377,481,4.323,888,3.229,1017,1.924,1018,2.792,1193,3.229,1203,4.802,1250,4.802,1379,5.108,1509,4.323,1660,3.312,1974,3.753,2408,7.196,2409,8.336]]],"invertedIndex":[["",{"_index":94,"t":{"8":{"position":[[20,3],[46,3],[506,1]]},"12":{"position":[[134,1],[138,1],[162,1],[298,1]]},"14":{"position":[[44,4],[77,4],[373,1],[514,2],[531,1],[906,3],[1356,1],[1524,1],[1569,1],[1629,1],[2057,1],[2184,1],[2259,1],[2278,1],[2360,1]]},"16":{"position":[[138,1]]},"18":{"position":[[50,1],[219,1],[287,1]]},"20":{"position":[[81,1],[111,3],[168,5],[348,3],[360,2],[363,5],[465,2],[476,1],[487,3],[497,3],[803,2],[1262,3],[1266,3],[1270,3],[1747,1],[2232,1],[2298,1],[2353,1],[2595,1],[3057,1],[3097,1],[3148,1],[3230,1]]},"24":{"position":[[37,1],[274,4],[394,1]]},"30":{"position":[[33,3],[42,2],[54,4],[59,3],[63,3],[107,3],[118,4],[123,3],[127,3],[154,2],[157,1],[167,1],[176,2],[240,2],[290,2],[412,1]]},"34":{"position":[[260,1]]},"38":{"position":[[165,1],[176,1],[607,3],[833,1],[901,1],[953,3],[960,3],[1203,1],[1254,1],[1295,1],[1324,4],[1395,1],[1543,1],[1725,1],[1779,1],[1881,1]]},"42":{"position":[[70,1],[89,1],[110,1]]},"44":{"position":[[162,1]]},"46":{"position":[[54,1]]},"48":{"position":[[41,1],[87,2],[389,1],[412,1],[436,1]]},"50":{"position":[[33,1],[347,4]]},"54":{"position":[[276,1]]},"60":{"position":[[517,1]]},"66":{"position":[[238,1]]},"72":{"position":[[114,1],[217,1],[299,2],[563,2]]},"74":{"position":[[128,2]]},"80":{"position":[[170,1],[172,1]]},"82":{"position":[[229,1],[231,1],[389,1],[391,1],[440,1],[442,1],[497,1],[499,1],[582,1],[584,1],[928,3]]},"86":{"position":[[314,1],[319,2],[1094,1],[1099,2]]},"88":{"position":[[135,1],[180,1]]},"92":{"position":[[199,1],[264,1],[353,1],[414,1],[420,1]]},"94":{"position":[[318,1],[508,1]]},"101":{"position":[[418,1],[480,1]]},"107":{"position":[[847,1]]},"113":{"position":[[44,1],[230,1],[264,1],[282,1],[311,1],[315,2],[330,1],[334,2],[349,1],[353,2],[373,1],[452,1],[499,1],[542,1],[587,1]]},"115":{"position":[[203,1],[319,1],[348,1]]},"121":{"position":[[61,1]]},"126":{"position":[[107,1],[155,1],[291,1],[344,1]]},"136":{"position":[[125,1]]},"140":{"position":[[115,1]]},"145":{"position":[[98,1],[115,1],[200,1],[212,1],[222,1],[224,19]]},"147":{"position":[[102,1],[104,2],[182,1],[196,1],[198,2],[201,1],[203,16]]},"149":{"position":[[100,1],[102,1],[108,1],[125,1],[142,1],[153,1],[222,1],[230,1],[241,1],[243,16]]},"151":{"position":[[119,1],[127,1],[206,1],[212,1],[222,1],[224,13]]},"153":{"position":[[67,1],[83,2],[193,1],[212,1],[214,16]]},"155":{"position":[[202,1],[221,1],[223,16]]},"157":{"position":[[114,1],[155,2],[264,1],[276,1],[278,1],[280,11]]},"159":{"position":[[84,1],[163,1],[183,1],[188,1],[190,22]]},"161":{"position":[[226,1],[261,1],[263,32]]},"163":{"position":[[95,1],[186,1],[200,1],[210,1],[212,21]]},"165":{"position":[[208,1],[232,1],[234,21]]},"167":{"position":[[87,1],[241,1],[251,1],[253,7],[307,1],[321,1],[516,1]]},"169":{"position":[[135,1],[212,1],[216,1],[220,1],[222,5]]},"171":{"position":[[164,1],[290,1],[302,1],[304,9]]},"175":{"position":[[296,1],[298,2],[317,1],[373,1]]},"177":{"position":[[143,1],[193,1]]},"181":{"position":[[136,3],[193,1],[250,1],[298,2],[432,1],[489,1],[553,2]]},"183":{"position":[[90,1],[193,1],[312,1],[314,2],[327,1],[329,2]]},"185":{"position":[[162,1]]},"187":{"position":[[128,1],[177,1],[217,1],[305,2],[322,1],[374,1],[414,1]]},"191":{"position":[[43,1],[45,1],[55,1],[191,1],[246,1]]},"193":{"position":[[43,1],[45,1],[52,1],[66,1],[71,1],[203,1],[222,1],[257,1],[269,1],[271,1]]},"195":{"position":[[178,1],[195,1],[230,1],[234,1],[244,1],[250,1],[252,1]]},"197":{"position":[[95,3],[119,1],[134,1],[136,1],[146,3]]},"199":{"position":[[179,1],[235,1]]},"201":{"position":[[137,1],[214,1],[218,1],[222,1],[224,5]]},"203":{"position":[[257,1],[273,2]]},"205":{"position":[[223,1],[345,1],[374,1]]},"209":{"position":[[127,1],[165,1],[180,1],[190,1],[205,1],[211,1],[248,1],[287,1],[451,1],[479,1],[518,1]]},"213":{"position":[[106,2],[128,2],[150,2],[254,1],[278,1],[312,2],[334,2],[356,2],[378,2],[492,2]]},"215":{"position":[[152,2],[183,2]]},"217":{"position":[[225,3]]},"219":{"position":[[95,2],[117,2],[139,2]]},"223":{"position":[[116,1],[118,1],[146,1],[276,1],[278,1],[306,1]]},"225":{"position":[[97,1],[114,1],[160,1],[218,1],[235,1],[255,1],[269,1],[502,1],[512,1],[564,1]]},"227":{"position":[[383,1],[385,1],[401,1],[411,1]]},"231":{"position":[[147,1],[149,1],[151,3],[155,1]]},"233":{"position":[[130,1],[145,1],[241,1],[264,1]]},"235":{"position":[[169,1],[184,1],[296,1]]},"239":{"position":[[156,1],[282,1],[294,1],[296,9],[435,1]]},"242":{"position":[[241,1],[243,1],[250,1],[260,1],[277,1],[661,2],[756,3],[815,1]]},"244":{"position":[[269,1],[573,1],[605,1],[637,1]]},"246":{"position":[[65,1],[314,1],[430,1],[462,1]]},"248":{"position":[[102,1],[133,1],[135,1],[143,1],[148,1],[161,1],[163,2],[172,2],[175,1],[180,1],[182,2],[272,1],[303,1],[305,1],[313,1],[318,1],[486,3]]},"252":{"position":[[18,1],[214,1],[539,1],[690,1],[803,1]]},"254":{"position":[[80,2],[356,1],[358,1],[392,1]]},"256":{"position":[[137,1],[147,1],[173,1],[189,1],[205,1],[222,1],[256,1],[342,1],[344,2],[366,4],[559,1],[581,1],[615,1],[638,1],[661,1],[766,1]]},"262":{"position":[[104,1],[126,2]]},"264":{"position":[[90,1],[107,2],[201,1],[222,2]]},"266":{"position":[[126,1],[139,1],[152,1],[190,1],[194,1],[198,1],[202,1]]},"268":{"position":[[70,1],[74,1],[187,1],[194,1],[199,2]]},"272":{"position":[[93,1],[95,2],[254,1],[256,1],[314,1]]},"274":{"position":[[131,1],[133,1],[175,1]]},"276":{"position":[[148,1],[150,1],[189,1],[200,1],[213,1]]},"278":{"position":[[156,1],[199,2],[202,1],[245,1]]},"280":{"position":[[105,1],[150,1]]},"282":{"position":[[86,1],[137,1]]},"284":{"position":[[158,5],[220,1],[506,1]]},"286":{"position":[[217,1],[233,1],[297,1]]},"288":{"position":[[280,1]]},"290":{"position":[[168,1],[191,1],[432,1]]},"292":{"position":[[82,1],[101,1],[123,1]]},"294":{"position":[[158,1],[177,1],[196,1],[214,1],[233,1],[256,1],[287,1],[529,1],[575,1],[618,1]]},"298":{"position":[[247,1],[249,2],[401,1],[426,2],[436,1],[438,2],[498,1],[712,1],[742,1],[773,2],[811,1],[821,1],[837,2]]},"302":{"position":[[54,1],[181,1]]},"304":{"position":[[94,1],[196,1]]},"306":{"position":[[84,1]]},"311":{"position":[[120,1],[175,2],[194,3]]},"313":{"position":[[67,2],[84,1],[102,2],[121,2],[142,3],[154,2],[167,2],[183,2],[198,2],[214,2],[456,3],[476,3],[495,3],[515,3],[533,1],[539,1],[543,1],[549,2]]},"315":{"position":[[235,2],[274,1],[308,1],[354,1],[457,2],[477,1],[533,1],[567,1],[613,1],[714,3],[768,1],[802,1],[848,1]]},"317":{"position":[[101,2],[291,1],[507,2],[529,3],[578,1],[620,3]]},"319":{"position":[[151,1],[155,3],[170,1],[174,3],[190,1],[194,3],[220,1],[472,2],[480,1],[496,2],[504,1],[520,2],[528,1]]},"321":{"position":[[83,1],[96,1],[98,1],[158,2],[173,2],[184,2],[195,1],[197,1],[201,1],[212,1],[214,3],[220,1],[234,1],[236,1],[240,1],[251,1],[281,1],[298,1],[373,1],[395,1],[454,1],[476,1],[508,1],[510,2],[515,1],[528,1],[554,1],[564,1],[606,1],[608,1]]},"323":{"position":[[118,1],[120,2],[124,1],[142,2],[158,2],[169,1]]},"325":{"position":[[95,1],[97,2],[101,1],[116,1],[118,1],[158,1],[176,1],[189,1],[204,2],[220,2],[231,1]]},"327":{"position":[[140,1],[142,2],[146,1],[162,2],[172,1],[207,1]]},"331":{"position":[[89,2],[94,2],[99,1],[105,2],[110,2],[115,1],[121,2],[126,2],[131,2]]},"335":{"position":[[99,1],[115,1],[134,1],[136,1],[138,2],[159,1],[161,1],[163,2],[205,1],[207,1],[209,2]]},"339":{"position":[[134,1],[136,1],[164,1],[358,1],[360,1],[388,1]]},"343":{"position":[[218,1],[220,1],[228,1],[236,1],[353,1],[369,2]]},"347":{"position":[[51,1],[85,1]]},"349":{"position":[[50,1]]},"353":{"position":[[50,1],[84,1],[156,1],[216,1]]},"355":{"position":[[50,1],[96,1],[163,1]]},"357":{"position":[[115,1],[149,1],[222,1],[285,1]]},"359":{"position":[[64,1],[110,1],[178,1]]},"363":{"position":[[44,1],[158,1],[235,2],[252,1],[462,1],[466,2]]},"365":{"position":[[46,1],[157,1],[241,2],[265,1],[509,1],[513,2]]},"367":{"position":[[47,1],[161,1],[247,2],[271,1],[516,1],[520,2]]},"369":{"position":[[96,1],[210,1],[332,2],[356,1],[628,1],[632,2]]},"371":{"position":[[142,1],[325,1],[418,2],[442,1],[696,1],[700,2]]},"373":{"position":[[49,1],[159,1],[252,2],[276,1],[521,1],[525,2]]},"375":{"position":[[325,1],[351,1],[460,1],[541,2],[565,1],[689,2],[725,3],[752,3],[768,2],[792,1],[842,1],[848,1],[870,1],[892,1],[910,1],[916,1],[941,1],[963,1],[967,2]]},"377":{"position":[[329,1],[355,1],[460,1],[570,3],[597,3]]},"379":{"position":[[60,1],[87,1],[199,1],[278,2],[302,1],[350,1],[355,2],[366,2]]},"381":{"position":[[72,1],[99,1],[223,1],[306,2],[330,1],[380,2],[386,2],[397,2]]},"383":{"position":[[63,1],[90,1],[206,1],[291,2],[315,1],[366,1],[371,2],[382,2]]},"385":{"position":[[75,1],[102,1],[230,1]]},"387":{"position":[[80,1],[104,3],[108,1],[272,1],[388,2],[412,1],[489,2]]},"389":{"position":[[76,1],[100,3],[104,1],[276,1],[394,2],[418,1],[496,2]]},"391":{"position":[[117,1],[186,1],[210,3],[214,1],[467,1],[616,2],[640,1],[721,2],[867,2],[891,1],[984,2]]},"395":{"position":[[42,1],[88,1],[121,1],[128,1],[130,1],[140,1],[162,1],[182,1],[184,1],[186,2],[200,1],[221,1]]},"397":{"position":[[60,1],[99,1],[208,1],[241,1],[254,2],[297,2],[323,1],[325,1],[329,1],[335,1],[337,1],[341,1],[353,1],[382,1],[393,1],[415,1],[430,1],[432,1],[436,1],[442,1],[444,1],[448,1],[459,1],[482,1],[494,1],[528,1],[530,2],[535,1],[537,2],[542,1],[544,2],[549,1],[551,1],[690,1],[734,1],[829,1],[914,3],[930,1],[932,1],[936,1],[947,1],[949,1],[953,1],[964,1],[966,1],[970,1],[986,1],[1018,1],[1020,2],[1025,1],[1027,2],[1032,1],[1034,1],[1057,1],[1152,3],[1177,1],[1179,1],[1183,1],[1197,1],[1199,1],[1203,1],[1209,1],[1241,1],[1247,1],[1281,1],[1283,2],[1288,1],[1308,1],[1332,1],[1354,1],[1377,1],[1379,1]]},"401":{"position":[[152,1],[204,1]]},"405":{"position":[[72,1],[130,1]]},"407":{"position":[[67,1],[128,1]]},"415":{"position":[[102,1],[170,1]]},"417":{"position":[[93,1],[139,1],[158,1]]},"419":{"position":[[93,1],[139,1],[158,1]]},"421":{"position":[[82,1],[127,1],[147,1]]},"423":{"position":[[92,1],[154,1]]},"428":{"position":[[134,1],[164,1],[197,2]]},"430":{"position":[[117,1],[147,1],[180,2]]},"432":{"position":[[174,1],[204,1],[238,2]]},"434":{"position":[[117,1],[147,1],[181,2]]},"436":{"position":[[118,1],[148,1],[183,2]]},"438":{"position":[[175,1],[205,1],[240,2]]},"440":{"position":[[174,1],[204,1],[238,2]]},"442":{"position":[[233,1],[263,1],[298,2]]},"444":{"position":[[179,1],[209,1],[246,2]]},"446":{"position":[[120,1],[150,1],[187,2]]},"448":{"position":[[177,1],[207,1],[244,2]]},"450":{"position":[[177,1],[207,1],[244,2]]},"452":{"position":[[177,1],[207,1],[244,2]]},"454":{"position":[[178,1],[208,1],[246,2]]},"456":{"position":[[122,1],[152,1],[191,2]]},"458":{"position":[[122,1],[152,1],[191,2]]},"460":{"position":[[127,1],[157,1],[201,2]]},"463":{"position":[[220,1],[268,2],[349,2]]},"465":{"position":[[222,1],[272,2],[379,2]]},"467":{"position":[[222,1],[279,2]]},"469":{"position":[[222,1],[279,2]]},"472":{"position":[[448,1],[496,1]]},"476":{"position":[[17,1],[50,1],[168,1],[213,1],[219,1],[254,1]]},"478":{"position":[[17,1],[51,1],[169,1],[214,1],[220,1],[255,1],[387,1],[430,1],[471,1],[491,1],[550,1],[578,1],[586,2],[716,1]]},"482":{"position":[[17,1],[50,1],[136,1],[181,1],[187,1]]},"484":{"position":[[17,1],[104,1],[137,1],[182,1],[188,1],[324,1],[367,1],[411,1],[439,1],[447,2],[509,1],[603,1]]},"488":{"position":[[17,1],[50,1],[151,1],[200,1],[245,1],[251,1],[286,1]]},"490":{"position":[[17,1],[51,1],[79,1],[105,1],[150,1],[156,1],[191,1],[223,1],[398,1],[441,1],[475,1],[514,1],[534,1],[593,1],[626,1],[634,2],[793,1]]},"493":{"position":[[17,1],[39,1],[350,1],[409,1],[411,1],[415,1],[423,1],[584,1],[592,1],[603,1],[605,1],[630,1],[632,1],[636,1],[644,1],[728,1],[736,1],[819,1],[821,1]]},"495":{"position":[[17,1],[50,1],[128,1]]},"497":{"position":[[17,1],[51,1],[129,1],[265,1],[290,1],[292,1],[323,1],[325,1],[329,1],[427,1],[522,1],[555,1],[557,1],[561,1],[570,1],[741,1],[772,1],[795,1],[930,2],[970,1]]},"499":{"position":[[17,1],[42,1],[76,1]]},"501":{"position":[[17,1],[50,1],[84,1],[154,1],[290,1],[315,1],[317,1],[348,1],[350,1],[354,1],[452,1],[547,1],[580,1],[582,1],[586,1],[595,1],[766,1],[797,1],[817,1],[861,1],[867,2],[930,1],[1083,1]]},"503":{"position":[[32,1]]},"509":{"position":[[149,2]]},"513":{"position":[[124,1],[126,2],[137,1],[160,1]]},"515":{"position":[[162,1],[164,1],[176,1],[196,1],[217,1],[240,1],[261,1],[263,1],[289,1],[291,1],[316,1],[331,1],[359,1],[391,1],[393,1],[406,1],[447,1],[488,1],[530,1],[571,1],[614,1],[653,1],[692,1],[735,1],[774,1],[815,1],[854,1],[895,1],[933,1],[963,2],[976,1],[996,1],[998,1],[1004,1],[1042,2],[1045,1]]},"517":{"position":[[237,1],[239,1],[251,1],[268,1],[291,1],[312,1],[314,1],[340,1],[342,1],[369,1],[381,1],[398,1],[420,1],[422,1],[428,1],[455,2],[471,1],[480,1]]},"519":{"position":[[81,1],[134,1]]},"521":{"position":[[136,2],[187,2]]},"523":{"position":[[86,1],[98,1],[122,2],[125,2],[128,1],[142,1]]},"525":{"position":[[32,1]]},"535":{"position":[[391,1],[410,1],[431,2],[2029,1],[2053,1],[2226,1],[2295,1],[2394,2]]},"537":{"position":[[385,1],[403,1],[405,1],[415,3],[431,1]]},"541":{"position":[[32,1]]},"551":{"position":[[125,1],[152,1]]},"553":{"position":[[121,1],[150,1]]},"567":{"position":[[286,1],[314,2],[322,3]]},"569":{"position":[[116,2]]},"571":{"position":[[307,1],[338,2],[407,2],[421,1]]},"573":{"position":[[276,1]]},"575":{"position":[[32,1]]},"577":{"position":[[74,1],[78,1],[90,2]]},"579":{"position":[[104,1],[133,1]]},"585":{"position":[[28,1],[38,2],[157,1],[164,1],[174,2],[199,1],[201,39]]},"587":{"position":[[32,1],[44,2],[50,2],[61,1],[150,1],[161,1],[173,2],[179,2],[190,1],[195,1],[197,42],[255,1],[257,2]]},"593":{"position":[[43,1],[107,1],[196,1],[230,1],[281,1],[304,1],[306,1],[312,1],[338,1],[340,1],[353,1],[360,1],[362,1],[397,1],[399,1],[403,1],[431,1],[443,1],[447,1],[470,1],[472,1],[476,1],[478,1],[595,1],[597,1],[607,1],[609,1],[625,2],[630,1],[637,1],[644,1],[648,1],[729,1],[759,1],[777,1],[836,1],[886,1]]},"595":{"position":[[198,1],[231,1],[319,4],[353,1],[424,1],[589,1],[655,1],[681,1],[715,1],[753,2],[783,2],[817,1],[819,1],[825,1],[843,1],[845,1],[858,1],[865,1],[867,1],[877,1],[911,1],[953,2],[986,2],[1031,2],[1057,1],[1059,3],[1095,3],[1107,1],[1144,1],[1188,2],[1219,2],[1267,2]]},"597":{"position":[[32,1]]},"611":{"position":[[277,1],[297,1],[299,1],[309,3],[325,1],[371,1],[390,1]]},"617":{"position":[[397,1],[430,1],[477,1]]},"619":{"position":[[179,1],[215,1],[313,1],[342,1]]},"621":{"position":[[542,1],[575,1],[706,1],[783,2]]},"629":{"position":[[161,1],[194,1]]},"631":{"position":[[32,1]]},"633":{"position":[[99,1],[127,2]]},"635":{"position":[[103,1],[131,2]]},"637":{"position":[[199,1],[247,1],[265,1],[267,2],[272,2],[293,1],[348,1],[352,2],[409,1],[502,1],[536,2],[557,1],[612,1],[616,2]]},"641":{"position":[[184,1],[228,7],[238,1]]},"643":{"position":[[188,1],[233,7],[243,1]]},"645":{"position":[[189,1],[234,7],[244,1]]},"647":{"position":[[108,1],[153,1]]},"649":{"position":[[112,1],[154,1]]},"651":{"position":[[113,1],[155,1]]},"653":{"position":[[112,1],[154,1]]},"655":{"position":[[115,1],[160,1]]},"657":{"position":[[116,1],[118,1],[171,1]]},"661":{"position":[[166,1],[205,1],[246,1],[600,4],[605,5],[613,1],[676,4],[683,1],[758,1],[820,2],[823,4],[830,1]]},"663":{"position":[[367,3],[500,1],[561,1],[620,1]]},"665":{"position":[[116,1],[168,1]]},"667":{"position":[[140,1],[165,1],[214,1]]},"669":{"position":[[428,1],[463,1],[533,1],[735,1],[774,1],[816,1],[860,1],[899,4],[910,1],[949,4],[960,1],[1001,4],[1012,1],[1211,4],[1305,1]]},"671":{"position":[[423,1],[471,1],[493,1],[495,2],[512,2],[537,2],[606,1],[654,1],[676,1],[678,2],[701,2],[740,2]]},"673":{"position":[[121,1],[174,1]]},"675":{"position":[[123,1],[178,1]]},"677":{"position":[[20,1],[44,1]]},"685":{"position":[[177,1],[231,1],[264,2],[279,1],[346,2],[374,1],[380,1],[386,1],[392,1],[398,1],[573,1],[582,1],[591,1],[600,1]]},"687":{"position":[[178,1],[211,2],[292,1],[294,2],[298,1],[327,1],[394,2],[422,1],[428,1],[434,1],[440,1],[446,1]]},"689":{"position":[[243,1],[255,1],[257,1],[267,3],[283,1],[317,1],[326,1]]},"693":{"position":[[84,1],[185,1]]},"695":{"position":[[113,1]]},"697":{"position":[[94,1],[207,1],[209,1],[213,1],[226,1],[248,1],[259,1],[285,1],[296,1],[322,1],[333,1],[359,1],[370,1],[380,1],[391,1],[414,1],[426,1],[453,1],[468,1],[492,1],[494,1]]},"701":{"position":[[61,1],[110,1],[153,1],[199,1],[248,1],[328,1],[380,1]]},"705":{"position":[[178,1],[225,1],[245,1],[295,1],[302,1]]},"707":{"position":[[82,1],[135,2],[156,1],[190,2],[211,1]]},"709":{"position":[[79,3],[129,1],[184,1],[227,1]]},"711":{"position":[[59,1],[119,1]]},"713":{"position":[[65,1],[125,1]]},"715":{"position":[[66,1],[126,1]]},"717":{"position":[[84,1],[154,1]]},"719":{"position":[[91,1],[155,1]]},"721":{"position":[[85,1],[154,1]]},"723":{"position":[[321,1],[408,1],[496,1],[601,1],[704,1],[807,1],[897,1],[988,1]]},"725":{"position":[[105,1],[216,1]]},"727":{"position":[[98,1],[186,1],[306,1],[427,1]]},"731":{"position":[[42,1],[87,1],[174,1],[219,1],[238,1],[240,1],[242,1],[248,1],[270,1],[272,1],[283,1],[295,2],[307,1],[309,1],[323,1],[325,2],[328,1],[334,1],[344,1],[346,1],[348,2],[360,1],[371,1],[398,1],[412,1],[425,1],[445,1]]},"733":{"position":[[60,1],[93,1],[210,3],[230,1],[263,1],[353,3],[380,1],[382,1],[386,1],[396,1],[421,1],[436,1],[438,1],[442,1],[448,1],[450,1],[454,1],[464,1],[487,1],[504,1],[506,1],[510,1],[521,1],[546,1],[548,2],[553,1],[568,1],[570,1],[574,1],[580,1],[582,1],[586,1],[596,1],[618,1],[633,1],[635,1],[639,1],[645,1],[670,1],[672,2],[677,1],[679,2],[684,1],[686,2],[691,1],[693,2],[698,1],[700,2],[705,1],[707,1],[929,1],[931,1],[935,1],[945,1],[967,1],[982,1],[984,1],[988,1],[994,1],[1019,1],[1021,2],[1026,1],[1028,1],[1128,1],[1196,5],[1204,1],[1206,1],[1210,1],[1220,1],[1242,1],[1257,1],[1259,1],[1263,1],[1269,1],[1271,1],[1275,1],[1285,1],[1308,1],[1310,2],[1315,1],[1321,1],[1323,1],[1327,1],[1337,1],[1360,1],[1362,2],[1367,1],[1369,2],[1374,1],[1376,1]]},"735":{"position":[[32,1]]},"737":{"position":[[94,1],[96,1],[106,1],[110,1]]},"741":{"position":[[135,1],[137,1],[156,1],[164,1],[184,1]]},"743":{"position":[[82,1],[84,1],[103,1],[111,1],[131,1],[163,1]]},"745":{"position":[[113,1],[198,1]]},"747":{"position":[[78,1],[80,2],[124,2]]},"749":{"position":[[165,1],[167,1],[191,1],[201,1],[231,2],[271,2],[317,2]]},"751":{"position":[[190,1],[192,1],[194,1],[199,1],[209,1],[219,2],[222,1],[227,1],[237,1],[248,2],[251,1],[278,1],[288,2],[302,1]]},"753":{"position":[[114,1],[116,1],[130,1],[154,1],[164,1],[195,1],[221,2],[247,2],[258,1],[264,1],[273,1],[282,1],[291,1],[300,1],[313,1],[344,1],[365,1],[374,1],[380,1],[389,1],[398,1],[407,1],[416,1],[429,1],[460,1],[481,1],[485,2]]},"757":{"position":[[154,1],[183,1],[185,1],[218,1],[247,1],[260,2]]},"761":{"position":[[280,1],[282,1],[292,1],[313,1],[319,1],[325,1]]},"763":{"position":[[528,1],[530,1],[546,1],[565,1],[569,1],[573,2],[598,2],[601,2],[626,1],[628,1],[644,1],[666,1],[670,2],[701,2],[704,2]]},"767":{"position":[[289,1],[341,1],[345,1],[359,2],[362,2],[390,1],[445,1],[449,1],[469,2],[472,2],[668,1]]},"771":{"position":[[58,1],[332,1],[334,1],[344,1],[377,1],[385,1],[400,2],[411,1]]},"773":{"position":[[85,1],[87,1],[97,1],[116,1]]},"775":{"position":[[84,1],[86,1],[96,1],[115,1]]},"777":{"position":[[196,1],[200,1],[204,2],[210,1],[227,1],[247,1],[294,1],[298,1],[302,2],[308,1],[325,1],[345,1]]}}}],["0",{"_index":471,"t":{"22":{"position":[[122,1]]},"24":{"position":[[423,4]]},"113":{"position":[[228,1],[244,1],[260,1],[280,1],[309,1],[369,1],[371,1],[596,1]]},"213":{"position":[[256,2],[315,2],[495,2]]},"242":{"position":[[817,2]]},"319":{"position":[[222,2],[421,2],[475,2],[499,2],[523,2]]},"381":{"position":[[291,2],[383,2]]},"432":{"position":[[126,1]]},"438":{"position":[[127,1]]},"440":{"position":[[126,1]]},"442":{"position":[[185,1]]},"448":{"position":[[129,1]]},"450":{"position":[[129,1]]},"452":{"position":[[129,1]]},"454":{"position":[[130,1]]},"521":{"position":[[139,2],[190,2]]},"577":{"position":[[76,1],[80,1]]},"595":{"position":[[336,2]]},"661":{"position":[[335,2]]},"685":{"position":[[281,1]]},"687":{"position":[[329,1]]},"701":{"position":[[123,2],[126,2],[215,2]]},"723":{"position":[[429,2],[453,2],[513,2],[543,2],[623,2],[647,2],[725,2],[749,2],[822,2],[852,2],[917,2],[941,2],[1010,2]]},"725":{"position":[[167,3],[237,2]]},"727":{"position":[[146,2]]},"743":{"position":[[165,1]]},"771":{"position":[[289,2]]},"777":{"position":[[207,2],[305,2]]}}}],["0):normal",{"_index":2312,"t":{"721":{"position":[[135,16]]}}}],["0):reorder():concat",{"_index":2383,"t":{"763":{"position":[[576,21]]}}}],["0):todir(\"i",{"_index":2334,"t":{"727":{"position":[[149,14]]}}}],["0):todir(\"yl",{"_index":2337,"t":{"727":{"position":[[252,15]]}}}],["0):todir(\"yr",{"_index":2339,"t":{"727":{"position":[[372,15]]}}}],["0):torot(\"i",{"_index":2321,"t":{"723":{"position":[[371,14]]}}}],["0):torot(\"yl",{"_index":2326,"t":{"723":{"position":[[650,15]]}}}],["0):torot(\"yr",{"_index":2325,"t":{"723":{"position":[[546,15]]}}}],["0):torot(\"zr",{"_index":2327,"t":{"723":{"position":[[752,15]]}}}],["0.0",{"_index":2315,"t":{"721":{"position":[[174,4]]},"723":{"position":[[424,4],[517,4],[912,4]]},"725":{"position":[[232,4]]},"727":{"position":[[321,4],[443,4]]}}}],["0.2.0",{"_index":784,"t":{"82":{"position":[[366,7]]}}}],["0.4",{"_index":2285,"t":{"705":{"position":[[290,4]]}}}],["0.4.0",{"_index":645,"t":{"48":{"position":[[375,5]]}}}],["0.4.1",{"_index":683,"t":{"56":{"position":[[39,5]]}}}],["0.5.0",{"_index":786,"t":{"82":{"position":[[417,7]]}}}],["0.6",{"_index":2284,"t":{"705":{"position":[[285,4]]}}}],["0.6.0",{"_index":608,"t":{"38":{"position":[[1630,6]]},"82":{"position":[[474,7]]}}}],["0.7.0",{"_index":500,"t":{"28":{"position":[[72,5]]}}}],["0.8.0",{"_index":787,"t":{"82":{"position":[[559,7],[780,7],[893,8]]},"157":{"position":[[324,8]]},"507":{"position":[[88,6]]}}}],["0.8.0'",{"_index":789,"t":{"82":{"position":[[715,7]]}}}],["0.9.0",{"_index":295,"t":{"16":{"position":[[90,5]]},"82":{"position":[[1008,6],[1087,8],[1121,8]]},"521":{"position":[[127,8]]}}}],["0.9.1",{"_index":136,"t":{"10":{"position":[[47,6]]}}}],["00007ff7738b30d0",{"_index":1908,"t":{"515":{"position":[[459,17]]}}}],["00007ff7738b3220",{"_index":1911,"t":{"515":{"position":[[542,17]]}}}],["00007ff7738b33c0",{"_index":1923,"t":{"515":{"position":[[907,17]]}}}],["00007ff7738b34d0",{"_index":1920,"t":{"515":{"position":[[786,17]]}}}],["00007ff7738b37f0",{"_index":1921,"t":{"515":{"position":[[827,17]]}}}],["00007ff7738b3b10",{"_index":1918,"t":{"515":{"position":[[704,17]]}}}],["00007ff7738b3c20",{"_index":1907,"t":{"515":{"position":[[418,17]]}}}],["00007ff7738b42b0",{"_index":1922,"t":{"515":{"position":[[866,17]]}}}],["00007ff7738b43b0",{"_index":1916,"t":{"515":{"position":[[665,17]]}}}],["00007ff7738b43f0",{"_index":1909,"t":{"515":{"position":[[500,17]]}}}],["00007ff7738b44b0",{"_index":1914,"t":{"515":{"position":[[626,17]]}}}],["00007ff7738b4540",{"_index":1919,"t":{"515":{"position":[[747,17]]}}}],["00007ff7738b4700",{"_index":1912,"t":{"515":{"position":[[583,17]]}}}],["00007ff7738b49a0",{"_index":1925,"t":{"515":{"position":[[945,17]]}}}],["0b1000101",{"_index":1373,"t":{"264":{"position":[[203,9]]}}}],["0x247d2882520",{"_index":1030,"t":{"113":{"position":[[404,13]]}}}],["0x247d29ec9c8",{"_index":1032,"t":{"113":{"position":[[427,14]]}}}],["0x420",{"_index":1371,"t":{"264":{"position":[[92,5]]}}}],["0xffffffff",{"_index":1726,"t":{"432":{"position":[[132,11]]},"438":{"position":[[133,11]]},"440":{"position":[[132,11]]},"442":{"position":[[191,11]]},"448":{"position":[[135,11]]},"450":{"position":[[135,11]]},"452":{"position":[[135,11]]},"454":{"position":[[136,11]]}}}],["1",{"_index":333,"t":{"20":{"position":[[105,2]]},"54":{"position":[[278,2]]},"86":{"position":[[274,2],[361,2],[1043,2]]},"105":{"position":[[225,1]]},"113":{"position":[[69,2],[115,1],[278,1],[305,1],[307,1],[318,1],[324,1],[328,1],[343,1],[347,1],[450,1],[464,1],[483,1],[497,1],[581,1],[583,1],[585,1]]},"115":{"position":[[139,2],[189,1],[205,2],[222,2],[231,1],[321,2],[338,2],[350,2],[375,1],[446,2]]},"145":{"position":[[304,2]]},"147":{"position":[[180,1]]},"153":{"position":[[69,2]]},"157":{"position":[[262,1]]},"159":{"position":[[161,1]]},"161":{"position":[[224,1]]},"163":{"position":[[184,1]]},"165":{"position":[[206,1]]},"167":{"position":[[89,1],[108,2],[123,3],[518,1],[537,2],[552,3]]},"169":{"position":[[137,1],[218,1]]},"199":{"position":[[181,1],[237,1]]},"201":{"position":[[139,1],[220,1]]},"203":{"position":[[259,2]]},"205":{"position":[[152,2],[209,1],[225,2],[242,2],[254,1],[347,2],[364,2],[376,2],[404,1],[484,2]]},"213":{"position":[[109,2],[337,2]]},"215":{"position":[[186,2]]},"217":{"position":[[222,2]]},"219":{"position":[[98,2]]},"223":{"position":[[120,2],[186,1],[280,2]]},"225":{"position":[[162,1],[271,2]]},"233":{"position":[[147,2]]},"235":{"position":[[186,2]]},"244":{"position":[[550,2],[607,1],[639,1]]},"246":{"position":[[385,3]]},"252":{"position":[[20,1],[43,2],[216,1],[239,2],[285,1],[394,1],[541,1],[564,2],[805,1]]},"254":{"position":[[197,2]]},"256":{"position":[[139,1],[170,1],[550,2],[561,2],[617,1]]},"268":{"position":[[190,1],[203,1],[249,1]]},"282":{"position":[[88,1],[171,1]]},"298":{"position":[[418,2],[714,2]]},"302":{"position":[[215,5]]},"313":{"position":[[535,1],[545,1],[552,1]]},"319":{"position":[[153,1],[159,1],[226,2],[229,1]]},"331":{"position":[[92,1],[134,1]]},"339":{"position":[[138,2],[362,2]]},"343":{"position":[[355,2]]},"375":{"position":[[844,3],[912,3]]},"379":{"position":[[263,2],[347,2],[352,2]]},"381":{"position":[[377,2]]},"397":{"position":[[331,3],[438,3],[1205,3]]},"415":{"position":[[174,1]]},"419":{"position":[[160,1]]},"463":{"position":[[28,1]]},"513":{"position":[[267,2]]},"515":{"position":[[1000,3]]},"517":{"position":[[424,3]]},"519":{"position":[[83,1]]},"535":{"position":[[174,1]]},"569":{"position":[[119,1]]},"585":{"position":[[155,1]]},"587":{"position":[[148,1]]},"589":{"position":[[323,1]]},"593":{"position":[[632,2]]},"661":{"position":[[374,2]]},"669":{"position":[[954,3]]},"685":{"position":[[376,1],[593,4]]},"687":{"position":[[424,1]]},"701":{"position":[[166,2],[169,2]]},"709":{"position":[[160,3]]},"711":{"position":[[90,3]]},"713":{"position":[[96,3],[127,1]]},"715":{"position":[[97,3]]},"719":{"position":[[136,2]]},"723":{"position":[[368,2]]},"725":{"position":[[164,2]]},"733":{"position":[[444,3],[576,3],[641,3],[990,3],[1265,3]]},"737":{"position":[[104,1]]},"741":{"position":[[139,2]]},"743":{"position":[[86,2]]},"749":{"position":[[169,2]]},"751":{"position":[[201,2]]},"753":{"position":[[118,2],[260,3],[266,2],[376,3],[418,2]]},"757":{"position":[[187,2],[249,2]]},"761":{"position":[[284,2],[315,1]]},"763":{"position":[[532,2],[613,2]]},"767":{"position":[[595,1]]},"771":{"position":[[336,2]]},"773":{"position":[[89,2],[118,1]]},"775":{"position":[[88,2]]},"777":{"position":[[270,2]]}}}],["1).name",{"_index":2367,"t":{"751":{"position":[[291,8]]}}}],["1):concat",{"_index":2391,"t":{"767":{"position":[[347,11]]}}}],["1):torot(\"i",{"_index":2328,"t":{"723":{"position":[[855,14],[945,14]]}}}],["1):torot(\"z",{"_index":2323,"t":{"723":{"position":[[457,14]]}}}],["1.0",{"_index":2314,"t":{"721":{"position":[[169,4]]},"727":{"position":[[201,4],[438,4]]}}}],["1.0.0",{"_index":1934,"t":{"521":{"position":[[174,6]]}}}],["1.000.000",{"_index":969,"t":{"105":{"position":[[230,10]]}}}],["1.2",{"_index":2287,"t":{"705":{"position":[[320,4]]}}}],["1.2.3.4",{"_index":1553,"t":{"321":{"position":[[541,10]]}}}],["1.8",{"_index":2286,"t":{"705":{"position":[[315,4]]}}}],["10",{"_index":824,"t":{"86":{"position":[[316,2],[1096,2]]},"115":{"position":[[208,2],[324,2]]},"126":{"position":[[599,3]]},"153":{"position":[[72,2]]},"203":{"position":[[262,2]]},"205":{"position":[[228,2],[350,2]]},"294":{"position":[[216,2],[475,2],[578,2]]},"323":{"position":[[126,4]]},"343":{"position":[[358,2]]},"472":{"position":[[492,3]]},"519":{"position":[[101,2]]},"767":{"position":[[392,3],[399,3],[484,3]]}}}],["100",{"_index":821,"t":{"86":{"position":[[289,4],[1069,4]]}}}],["10000000",{"_index":1366,"t":{"262":{"position":[[129,9]]}}}],["1000m",{"_index":2106,"t":{"599":{"position":[[108,7]]}}}],["1024",{"_index":1713,"t":{"421":{"position":[[149,4]]},"493":{"position":[[160,5]]}}}],["103547413",{"_index":1747,"t":{"444":{"position":[[249,10]]}}}],["1045060183",{"_index":1737,"t":{"438":{"position":[[243,11]]}}}],["1056",{"_index":1372,"t":{"264":{"position":[[110,5]]}}}],["10_000_000",{"_index":1364,"t":{"262":{"position":[[106,10]]}}}],["11",{"_index":1797,"t":{"472":{"position":[[498,3]]}}}],["110100100",{"_index":1704,"t":{"407":{"position":[[130,9]]}}}],["11355630182234424425429331560518598643298965915936825610957270519615363349759012613228119611304846673085167794661819394470107090216347491908311079792054357",{"_index":1849,"t":{"493":{"position":[[425,156]]},"497":{"position":[[583,155]]},"501":{"position":[[608,155]]}}}],["1151865881",{"_index":1759,"t":{"452":{"position":[[247,11]]},"460":{"position":[[204,11]]}}}],["115443384115231951475820445136871322101870729500298182134363293112660251666017",{"_index":1852,"t":{"493":{"position":[[646,79]]}}}],["123",{"_index":1181,"t":{"183":{"position":[[92,3],[195,3]]},"225":{"position":[[99,5],[220,5]]},"401":{"position":[[206,3]]}}}],["1234",{"_index":1900,"t":{"515":{"position":[[178,5],[978,5]]},"517":{"position":[[253,5],[383,5]]}}}],["1252609637",{"_index":1750,"t":{"446":{"position":[[190,11]]}}}],["128",{"_index":1812,"t":{"476":{"position":[[209,3]]},"478":{"position":[[210,3]]},"482":{"position":[[177,3]]},"484":{"position":[[178,3]]},"488":{"position":[[241,3]]},"490":{"position":[[146,3]]}}}],["13",{"_index":1038,"t":{"113":{"position":[[539,2]]},"335":{"position":[[101,2]]}}}],["1337",{"_index":2087,"t":{"593":{"position":[[355,4],[463,4]]},"595":{"position":[[860,4],[1034,5]]}}}],["15",{"_index":2392,"t":{"767":{"position":[[396,2]]}}}],["16",{"_index":1561,"t":{"323":{"position":[[171,2]]},"476":{"position":[[192,3],[278,3]]},"478":{"position":[[193,3],[279,3]]},"482":{"position":[[160,3]]},"484":{"position":[[161,3]]},"488":{"position":[[224,3],[310,3]]},"490":{"position":[[129,3],[215,3]]}}}],["17",{"_index":1091,"t":{"132":{"position":[[70,2]]},"727":{"position":[[223,3],[343,3],[465,3]]}}}],["180.0",{"_index":2329,"t":{"723":{"position":[[1003,6]]}}}],["192",{"_index":1813,"t":{"476":{"position":[[215,3]]},"478":{"position":[[216,3]]},"482":{"position":[[183,3]]},"484":{"position":[[184,3]]},"488":{"position":[[247,3]]},"490":{"position":[[152,3]]}}}],["1a4",{"_index":1702,"t":{"405":{"position":[[132,3]]}}}],["1st",{"_index":1350,"t":{"256":{"position":[[175,5],[258,3]]}}}],["2",{"_index":334,"t":{"20":{"position":[[108,2]]},"113":{"position":[[77,2],[326,1],[337,1],[367,1],[493,1],[495,1]]},"115":{"position":[[305,1],[366,2],[406,2],[415,1]]},"151":{"position":[[204,1]]},"155":{"position":[[122,2],[212,2]]},"167":{"position":[[132,2],[147,3],[248,2],[577,2],[592,3]]},"171":{"position":[[179,2],[299,2]]},"205":{"position":[[331,1],[392,2],[438,2],[450,1]]},"209":{"position":[[129,1],[250,1],[481,1]]},"213":{"position":[[131,2]]},"219":{"position":[[120,2]]},"223":{"position":[[123,2],[191,1],[283,2]]},"233":{"position":[[266,2],[320,2]]},"235":{"position":[[298,2],[352,2]]},"239":{"position":[[171,2],[291,2]]},"244":{"position":[[553,1],[609,1]]},"252":{"position":[[85,2],[247,2],[600,2],[828,2],[878,1]]},"254":{"position":[[200,2]]},"256":{"position":[[186,1],[553,2]]},"298":{"position":[[421,2]]},"319":{"position":[[103,1]]},"325":{"position":[[191,1]]},"331":{"position":[[108,1],[124,1]]},"339":{"position":[[141,2],[365,2]]},"375":{"position":[[866,3],[937,3]]},"379":{"position":[[234,2]]},"381":{"position":[[260,2]]},"383":{"position":[[244,2]]},"385":{"position":[[270,2]]},"397":{"position":[[1243,3]]},"519":{"position":[[85,1]]},"521":{"position":[[35,1]]},"535":{"position":[[154,2]]},"579":{"position":[[106,1]]},"593":{"position":[[639,2]]},"669":{"position":[[904,3]]},"685":{"position":[[382,1],[584,4]]},"687":{"position":[[430,1]]},"701":{"position":[[193,3],[212,2],[239,2],[261,2],[371,2],[393,2]]},"707":{"position":[[129,2],[132,2],[184,2]]},"709":{"position":[[164,2]]},"711":{"position":[[94,2]]},"713":{"position":[[100,2]]},"715":{"position":[[101,2]]},"719":{"position":[[140,2],[168,2]]},"733":{"position":[[1317,3]]},"737":{"position":[[101,2]]},"741":{"position":[[142,2]]},"743":{"position":[[89,2]]},"749":{"position":[[172,2]]},"751":{"position":[[229,2]]},"753":{"position":[[121,2],[269,3],[275,2],[385,3],[409,2]]},"757":{"position":[[195,2],[252,2]]},"761":{"position":[[287,2],[321,1]]},"763":{"position":[[535,2],[571,1],[630,2],[633,2],[716,2]]},"771":{"position":[[339,2]]},"773":{"position":[[92,2]]},"775":{"position":[[91,2]]},"777":{"position":[[172,2],[202,1],[273,2],[300,1]]}}}],["20",{"_index":1084,"t":{"126":{"position":[[670,2]]},"331":{"position":[[165,3]]},"767":{"position":[[295,2]]}}}],["200",{"_index":744,"t":{"72":{"position":[[802,3]]},"611":{"position":[[425,3]]}}}],["2024",{"_index":23,"t":{"4":{"position":[[189,4]]},"8":{"position":[[718,4]]}}}],["2048",{"_index":1841,"t":{"493":{"position":[[166,5]]}}}],["21",{"_index":1562,"t":{"325":{"position":[[103,2]]},"767":{"position":[[378,2]]}}}],["222957957",{"_index":1744,"t":{"442":{"position":[[301,10]]}}}],["234",{"_index":1241,"t":{"225":{"position":[[182,5],[287,5]]}}}],["24",{"_index":1811,"t":{"476":{"position":[[196,2]]},"478":{"position":[[197,2]]},"482":{"position":[[164,2]]},"484":{"position":[[165,2]]},"488":{"position":[[228,2]]},"490":{"position":[[133,2]]}}}],["249",{"_index":745,"t":{"72":{"position":[[809,3]]},"298":{"position":[[717,3]]}}}],["255",{"_index":1585,"t":{"337":{"position":[[149,3]]}}}],["255))):concat",{"_index":1820,"t":{"478":{"position":[[520,17]]},"490":{"position":[[563,17]]}}}],["256",{"_index":1778,"t":{"465":{"position":[[28,3]]},"476":{"position":[[224,3]]},"478":{"position":[[225,3]]},"482":{"position":[[192,3]]},"484":{"position":[[193,3]]},"488":{"position":[[256,3]]},"490":{"position":[[161,3]]}}}],["2650573207",{"_index":1762,"t":{"454":{"position":[[249,11]]}}}],["2871868277",{"_index":1720,"t":{"428":{"position":[[200,11]]}}}],["2nd",{"_index":1351,"t":{"256":{"position":[[191,5]]}}}],["2x",{"_index":739,"t":{"72":{"position":[[675,3]]}}}],["3",{"_index":1017,"t":{"113":{"position":[[46,1],[85,2],[262,1],[271,1],[289,1],[313,1],[332,1],[345,1],[351,1],[356,1],[448,1]]},"145":{"position":[[198,1]]},"155":{"position":[[125,2],[215,2],[255,1]]},"167":{"position":[[284,1]]},"169":{"position":[[210,1]]},"175":{"position":[[14,1]]},"191":{"position":[[47,2]]},"201":{"position":[[212,1]]},"213":{"position":[[153,2]]},"219":{"position":[[142,2]]},"223":{"position":[[126,2],[196,1],[286,2]]},"252":{"position":[[255,2],[836,2],[884,4]]},"254":{"position":[[203,2],[215,3]]},"256":{"position":[[202,1],[556,1],[564,2],[619,1]]},"298":{"position":[[424,1]]},"319":{"position":[[172,1]]},"339":{"position":[[144,2],[368,2]]},"383":{"position":[[276,2],[363,2],[368,2]]},"385":{"position":[[304,2]]},"415":{"position":[[172,1]]},"417":{"position":[[160,1]]},"519":{"position":[[87,1]]},"579":{"position":[[135,1]]},"593":{"position":[[646,1]]},"685":{"position":[[388,1],[575,4]]},"687":{"position":[[436,1]]},"701":{"position":[[28,1],[242,3],[264,2],[374,3],[396,2]]},"705":{"position":[[258,2],[261,2],[297,2]]},"707":{"position":[[187,2]]},"709":{"position":[[167,2]]},"711":{"position":[[97,2]]},"713":{"position":[[103,2]]},"715":{"position":[[104,2],[128,1]]},"719":{"position":[[171,2]]},"721":{"position":[[132,2]]},"737":{"position":[[98,2]]},"741":{"position":[[145,2]]},"743":{"position":[[92,2]]},"749":{"position":[[175,2]]},"753":{"position":[[141,2],[278,3],[284,2],[394,3],[400,2]]},"757":{"position":[[208,2],[255,2]]},"761":{"position":[[290,1],[327,1]]},"763":{"position":[[538,2],[616,1],[636,2],[719,1]]},"771":{"position":[[342,1]]},"773":{"position":[[95,1]]},"775":{"position":[[94,1],[117,1]]},"777":{"position":[[276,1]]}}}],["3):ab",{"_index":2309,"t":{"719":{"position":[[143,9]]}}}],["3.5x",{"_index":1485,"t":{"306":{"position":[[103,4]]}}}],["3.7416573867739",{"_index":2294,"t":{"709":{"position":[[186,15],[229,15]]}}}],["30",{"_index":2395,"t":{"767":{"position":[[488,2],[491,3]]}}}],["3154674178",{"_index":1756,"t":{"450":{"position":[[247,11]]}}}],["3190198453633110066",{"_index":1765,"t":{"456":{"position":[[195,20]]}}}],["32",{"_index":626,"t":{"42":{"position":[[310,2]]},"444":{"position":[[30,2]]},"476":{"position":[[202,2]]},"478":{"position":[[203,2]]},"482":{"position":[[170,2]]},"484":{"position":[[171,2]]},"488":{"position":[[234,2]]},"490":{"position":[[139,2]]}}}],["32973",{"_index":133,"t":{"8":{"position":[[723,6]]}}}],["3600",{"_index":2052,"t":{"571":{"position":[[341,4],[423,4]]}}}],["384",{"_index":1782,"t":{"467":{"position":[[28,3]]}}}],["3889643616",{"_index":1753,"t":{"448":{"position":[[247,11]]}}}],["3rd",{"_index":1352,"t":{"256":{"position":[[207,5]]}}}],["3x",{"_index":678,"t":{"54":{"position":[[229,2]]},"246":{"position":[[67,2]]}}}],["4",{"_index":1018,"t":{"113":{"position":[[93,2]]},"149":{"position":[[220,1]]},"153":{"position":[[191,1]]},"155":{"position":[[128,2],[218,2],[272,2]]},"252":{"position":[[263,2],[396,1]]},"254":{"position":[[230,2]]},"256":{"position":[[572,2],[583,2],[640,1]]},"519":{"position":[[89,1],[136,1]]},"669":{"position":[[1006,3]]},"685":{"position":[[394,1]]},"687":{"position":[[442,1]]},"741":{"position":[[186,1]]},"743":{"position":[[133,1]]},"749":{"position":[[178,2],[228,2],[234,2]]},"753":{"position":[[144,2],[287,3],[293,2],[391,2],[403,3]]},"757":{"position":[[216,1],[258,1]]},"763":{"position":[[541,2],[639,2],[642,1],[721,2]]},"777":{"position":[[175,2]]}}}],["400",{"_index":1662,"t":{"387":{"position":[[317,4]]},"389":{"position":[[377,4]]},"391":{"position":[[599,4]]}}}],["4096",{"_index":1842,"t":{"493":{"position":[[176,5]]}}}],["41",{"_index":2387,"t":{"767":{"position":[[291,3]]}}}],["42",{"_index":1145,"t":{"159":{"position":[[86,2],[185,2]]},"193":{"position":[[68,2]]},"248":{"position":[[145,2],[224,3],[315,2],[385,3]]},"254":{"position":[[77,2],[83,3],[100,2],[385,2],[401,2],[482,5],[502,4],[572,4]]},"286":{"position":[[317,3],[374,2]]},"288":{"position":[[300,3],[357,2]]},"319":{"position":[[178,2]]},"325":{"position":[[233,2]]},"327":{"position":[[148,2],[224,2]]},"767":{"position":[[374,3]]}}}],["430867652",{"_index":1740,"t":{"440":{"position":[[241,10]]}}}],["443",{"_index":2147,"t":{"621":{"position":[[610,4]]}}}],["45597",{"_index":24,"t":{"4":{"position":[[194,6]]}}}],["5",{"_index":1019,"t":{"113":{"position":[[101,2],[117,4],[166,4],[466,3],[485,2]]},"115":{"position":[[353,1]]},"145":{"position":[[100,1]]},"151":{"position":[[121,1]]},"153":{"position":[[86,1]]},"155":{"position":[[200,1]]},"167":{"position":[[239,1]]},"171":{"position":[[288,1]]},"175":{"position":[[319,1]]},"177":{"position":[[145,1]]},"203":{"position":[[276,1]]},"205":{"position":[[379,1]]},"213":{"position":[[280,2],[359,2]]},"239":{"position":[[280,1]]},"252":{"position":[[271,2],[287,4],[336,4],[419,2]]},"254":{"position":[[233,2]]},"256":{"position":[[575,2]]},"319":{"position":[[198,1]]},"329":{"position":[[368,3]]},"343":{"position":[[372,1]]},"363":{"position":[[322,1]]},"519":{"position":[[91,1],[138,1]]},"585":{"position":[[41,1],[177,1]]},"663":{"position":[[555,3],[608,2]]},"685":{"position":[[349,1],[400,1]]},"687":{"position":[[397,1],[448,1]]},"749":{"position":[[181,2]]},"753":{"position":[[147,2],[296,3],[302,2],[382,2],[412,3]]},"763":{"position":[[544,1],[618,2]]}}}],["5,0,0,0",{"_index":2225,"t":{"669":{"position":[[963,7]]}}}],["5,000",{"_index":2219,"t":{"669":{"position":[[777,5]]}}}],["5,0000",{"_index":2226,"t":{"669":{"position":[[1014,6]]}}}],["5.00",{"_index":2224,"t":{"669":{"position":[[912,4]]}}}],["5.1",{"_index":2377,"t":{"761":{"position":[[91,4]]}}}],["5.4",{"_index":853,"t":{"88":{"position":[[27,3],[119,3]]}}}],["5.4'",{"_index":1881,"t":{"503":{"position":[[105,6]]},"525":{"position":[[108,6]]},"541":{"position":[[101,6]]},"575":{"position":[[103,6]]},"597":{"position":[[101,6]]},"631":{"position":[[105,6]]},"735":{"position":[[104,6]]}}}],["50",{"_index":2204,"t":{"663":{"position":[[493,4]]}}}],["50,000",{"_index":2221,"t":{"669":{"position":[[818,6]]}}}],["500",{"_index":2216,"t":{"669":{"position":[[737,3]]}}}],["500,000",{"_index":2223,"t":{"669":{"position":[[863,7]]}}}],["5000",{"_index":2218,"t":{"669":{"position":[[765,6],[942,6]]}}}],["500000",{"_index":2222,"t":{"669":{"position":[[849,8]]}}}],["500000.4",{"_index":2227,"t":{"669":{"position":[[1065,10]]}}}],["512",{"_index":1785,"t":{"469":{"position":[[28,3]]},"493":{"position":[[382,4]]}}}],["5eb63bbbe01eeed093cb22bb8f5acdc3",{"_index":1724,"t":{"430":{"position":[[183,35]]}}}],["6",{"_index":1193,"t":{"191":{"position":[[50,2]]},"213":{"position":[[381,2]]},"254":{"position":[[236,2],[248,3]]},"256":{"position":[[578,1],[586,2],[642,1]]},"294":{"position":[[235,1]]},"519":{"position":[[93,1],[140,1]]},"711":{"position":[[121,1]]},"717":{"position":[[156,1]]},"749":{"position":[[184,2]]},"771":{"position":[[413,1]]},"777":{"position":[[178,1]]}}}],["6.1232339957368e",{"_index":2335,"t":{"727":{"position":[[206,16],[326,16],[448,16]]}}}],["60",{"_index":2054,"t":{"571":{"position":[[410,2]]}}}],["65537",{"_index":1850,"t":{"493":{"position":[[594,6]]},"497":{"position":[[766,5]]},"501":{"position":[[791,5]]}}}],["65e05b66",{"_index":1548,"t":{"321":{"position":[[416,8]]}}}],["68",{"_index":2388,"t":{"767":{"position":[[298,3]]}}}],["69",{"_index":1374,"t":{"264":{"position":[[225,3]]},"767":{"position":[[381,3]]}}}],["6aa8b7c94e7580774a804c24",{"_index":1549,"t":{"321":{"position":[[425,26]]}}}],["7",{"_index":1436,"t":{"294":{"position":[[179,1]]},"519":{"position":[[95,1],[142,1]]}}}],["7088720765356542432",{"_index":1767,"t":{"458":{"position":[[194,20]]}}}],["8",{"_index":634,"t":{"44":{"position":[[123,1]]},"46":{"position":[[204,1]]},"294":{"position":[[160,1],[531,1]]},"519":{"position":[[97,1],[144,1]]},"659":{"position":[[70,1]]}}}],["8):unpack",{"_index":1932,"t":{"519":{"position":[[119,12]]}}}],["80",{"_index":2116,"t":{"611":{"position":[[362,3]]},"617":{"position":[[461,3]]},"619":{"position":[[246,3]]}}}],["847757641",{"_index":1175,"t":{"181":{"position":[[491,9]]}}}],["8618312879776256743",{"_index":1735,"t":{"436":{"position":[[186,20]]}}}],["894552257",{"_index":1729,"t":{"432":{"position":[[241,10]]}}}],["8dad5f6a7dd2dcd8c35ec2fd7babb499bcad60d27d73fe73eca2ce025dfd3b47",{"_index":1780,"t":{"465":{"position":[[275,67]]}}}],["9",{"_index":1194,"t":{"191":{"position":[[53,1]]},"294":{"position":[[198,1],[258,1]]},"319":{"position":[[192,1]]},"423":{"position":[[156,1]]},"519":{"position":[[99,1]]}}}],["90",{"_index":2336,"t":{"727":{"position":[[248,3],[368,3]]}}}],["90.0",{"_index":2324,"t":{"723":{"position":[[507,5],[617,5],[719,5],[825,5]]}}}],["9065573210506989167",{"_index":1732,"t":{"434":{"position":[[184,20]]}}}],["9090",{"_index":2273,"t":{"697":{"position":[[372,5]]}}}],["98365361248415863235179644468056200977592391948608651522703704315152579004021",{"_index":1853,"t":{"493":{"position":[[738,78]]}}}],["_",{"_index":1232,"t":{"223":{"position":[[312,2]]},"559":{"position":[[210,2]]}}}],["__construct",{"_index":1396,"t":{"276":{"position":[[97,11]]},"284":{"position":[[284,12]]},"288":{"position":[[25,11]]}}}],["__construct(nam",{"_index":1398,"t":{"276":{"position":[[161,17]]},"278":{"position":[[128,17]]},"280":{"position":[[122,17]]},"284":{"position":[[192,17],[443,17]]},"286":{"position":[[184,17]]}}}],["__construct(publ",{"_index":1422,"t":{"288":{"position":[[184,18]]}}}],["__eq",{"_index":1527,"t":{"319":{"position":[[273,4]]}}}],["__gc",{"_index":1405,"t":{"278":{"position":[[176,6]]}}}],["__index",{"_index":342,"t":{"20":{"position":[[468,7]]},"34":{"position":[[120,7]]},"397":{"position":[[623,7]]},"513":{"position":[[361,7]]},"733":{"position":[[759,7]]}}}],["__lt",{"_index":1528,"t":{"319":{"position":[[282,5]]}}}],["__order",{"_index":253,"t":{"14":{"position":[[1761,7],[1966,7]]},"397":{"position":[[1185,11]]},"593":{"position":[[549,7],[599,7]]},"595":{"position":[[434,7]]}}}],["__parent",{"_index":1411,"t":{"282":{"position":[[195,8]]}}}],["__tostr",{"_index":1700,"t":{"403":{"position":[[19,10]]},"703":{"position":[[19,10]]}}}],["__valu",{"_index":1675,"t":{"395":{"position":[[132,7]]}}}],["_g",{"_index":108,"t":{"8":{"position":[[200,2]]}}}],["_g.coroutin",{"_index":1898,"t":{"513":{"position":[[419,14]]}}}],["_g.string",{"_index":1460,"t":{"298":{"position":[[237,9]]}}}],["_g.tabl",{"_index":343,"t":{"20":{"position":[[478,8]]},"513":{"position":[[406,9]]},"515":{"position":[[198,9]]}}}],["_g:myfunc",{"_index":1306,"t":{"244":{"position":[[575,12]]}}}],["_psoup",{"_index":389,"t":{"20":{"position":[[2136,6]]},"48":{"position":[[167,6]]},"507":{"position":[[0,6]]}}}],["_pversion",{"_index":738,"t":{"72":{"position":[[621,9]]},"505":{"position":[[0,9]]},"509":{"position":[[139,9],[236,18]]}}}],["_version",{"_index":1886,"t":{"509":{"position":[[187,18],[264,12]]}}}],["a\":1,\"b\":2,\"c\":3",{"_index":2090,"t":{"593":{"position":[[684,19]]}}}],["a.k.a",{"_index":1627,"t":{"371":{"position":[[72,6],[178,5]]}}}],["a?.b?.c",{"_index":1290,"t":{"242":{"position":[[807,7]]}}}],["aadata",{"_index":1834,"t":{"488":{"position":[[144,6]]},"490":{"position":[[72,6],[468,6],[663,7],[768,7]]}}}],["aarch64",{"_index":138,"t":{"10":{"position":[[82,7]]}}}],["abi",{"_index":618,"t":{"40":{"position":[[72,3]]}}}],["abov",{"_index":843,"t":{"86":{"position":[[832,5]]},"94":{"position":[[695,6]]},"126":{"position":[[677,6]]},"195":{"position":[[35,6]]},"252":{"position":[[1023,5]]},"274":{"position":[[25,5]]},"319":{"position":[[450,6]]},"403":{"position":[[8,6]]},"703":{"position":[[8,6]]},"725":{"position":[[209,5]]}}}],["absenc",{"_index":703,"t":{"60":{"position":[[595,7]]}}}],["absent",{"_index":1672,"t":{"391":{"position":[[931,6]]},"567":{"position":[[114,7]]},"571":{"position":[[125,7]]},"573":{"position":[[124,7]]},"771":{"position":[[245,7]]}}}],["absolut",{"_index":425,"t":{"20":{"position":[[2944,8]]},"563":{"position":[[32,8]]},"565":{"position":[[11,8]]},"719":{"position":[[55,8]]}}}],["accept",{"_index":428,"t":{"20":{"position":[[2982,6]]},"50":{"position":[[279,7]]},"115":{"position":[[13,7]]},"205":{"position":[[13,7]]},"321":{"position":[[456,8]]},"611":{"position":[[63,9]]},"627":{"position":[[0,7]]},"629":{"position":[[98,6]]},"733":{"position":[[183,7]]}}}],["access",{"_index":455,"t":{"20":{"position":[[3700,6]]},"30":{"position":[[538,6],[903,6]]},"40":{"position":[[232,6]]},"46":{"position":[[293,6]]},"213":{"position":[[429,6]]},"242":{"position":[[0,9],[883,7]]},"286":{"position":[[92,8]]},"300":{"position":[[223,6]]},"308":{"position":[[353,6]]},"507":{"position":[[35,6]]}}}],["accessor",{"_index":720,"t":{"66":{"position":[[328,8]]}}}],["accordingli",{"_index":1927,"t":{"517":{"position":[[100,12]]}}}],["accumul",{"_index":2397,"t":{"771":{"position":[[46,11],[69,13],[97,11],[195,12],[229,12],[257,11],[305,12],[363,12],[387,12]]}}}],["achiev",{"_index":1558,"t":{"321":{"position":[[872,8]]}}}],["act",{"_index":2039,"t":{"567":{"position":[[184,6]]},"571":{"position":[[195,6]]},"573":{"position":[[194,6]]}}}],["action",{"_index":1454,"t":{"298":{"position":[[88,6]]}}}],["activ",{"_index":1013,"t":{"111":{"position":[[179,7]]},"685":{"position":[[15,9]]}}}],["actual",{"_index":472,"t":{"22":{"position":[[139,6]]},"663":{"position":[[92,8]]}}}],["ad",{"_index":93,"t":{"8":{"position":[[0,5]]},"14":{"position":[[0,5],[24,5],[49,5],[82,5],[142,5],[210,5],[278,5],[726,5],[900,5],[918,5],[938,5],[959,5],[982,5],[1002,5],[1023,5],[1047,5],[1074,5],[1095,5],[1122,5],[1149,5],[1272,5],[1298,5],[1325,5],[1378,5],[1404,5],[1434,5],[1465,5],[1503,5],[1551,5],[1595,5],[1655,5],[1685,5],[1710,5],[2253,5],[2333,5],[2384,5]]},"16":{"position":[[0,5]]},"18":{"position":[[0,5],[500,5],[525,5],[549,5]]},"20":{"position":[[0,5],[25,5],[115,5],[143,5],[174,5],[294,5],[399,5],[491,5],[523,5],[1165,5],[1214,5],[1391,5],[1913,5],[2143,5],[2206,5],[2242,5],[2264,5],[2284,5],[2310,5],[2332,5],[2470,5],[2638,5],[2657,5],[2673,5],[2693,5],[2713,5],[2733,5],[2747,5],[2766,5],[2783,5],[2805,5],[2817,5],[2860,5],[3453,5],[3648,5],[3725,5],[3760,5],[3799,5],[3834,5],[3914,5]]},"22":{"position":[[288,5]]},"30":{"position":[[0,5],[74,5],[138,5],[220,5],[284,5],[326,5],[354,5],[1341,5],[1382,5]]},"32":{"position":[[318,5]]},"38":{"position":[[0,5],[73,5],[140,5],[192,5],[239,5],[540,5],[585,5],[648,5],[757,5],[877,5],[1111,5],[1215,5],[1329,5],[1383,5],[1449,5],[1515,5],[1560,5]]},"42":{"position":[[94,5]]},"48":{"position":[[0,5],[35,5],[74,5],[99,5],[141,5],[161,5],[449,5],[517,5],[560,5],[603,5],[616,5],[629,5],[642,5]]},"52":{"position":[[0,5]]},"70":{"position":[[0,5]]},"72":{"position":[[0,5],[61,5],[133,5],[171,5],[196,5],[232,5],[261,5],[293,5],[302,5],[327,5],[348,5],[383,5],[414,5],[452,5],[479,5],[550,5],[584,5],[615,5]]},"82":{"position":[[1462,5]]},"86":{"position":[[121,5]]},"681":{"position":[[103,5]]}}}],["add",{"_index":763,"t":{"78":{"position":[[6,4]]},"88":{"position":[[182,4]]},"94":{"position":[[474,3]]},"140":{"position":[[283,3]]},"157":{"position":[[206,3]]},"209":{"position":[[201,3],[207,3]]},"213":{"position":[[6,4]]},"225":{"position":[[498,3]]},"262":{"position":[[8,3]]},"276":{"position":[[6,4]]},"282":{"position":[[188,4]]},"329":{"position":[[200,3]]},"409":{"position":[[0,4]]},"571":{"position":[[394,4]]},"589":{"position":[[263,3]]},"593":{"position":[[542,3]]},"595":{"position":[[426,4]]},"621":{"position":[[12,3]]},"681":{"position":[[4,3]]},"683":{"position":[[40,3]]},"767":{"position":[[591,3]]}}}],["add(1",{"_index":1157,"t":{"171":{"position":[[172,6],[292,6]]},"239":{"position":[[164,6],[284,6]]}}}],["add(a",{"_index":1156,"t":{"171":{"position":[[133,6]]},"209":{"position":[[146,6],[268,6],[499,6]]},"239":{"position":[[125,6],[380,6]]}}}],["addit",{"_index":38,"t":{"4":{"position":[[347,10]]},"60":{"position":[[0,10]]},"66":{"position":[[0,10]]},"134":{"position":[[441,10]]},"313":{"position":[[57,9]]},"323":{"position":[[31,10]]},"329":{"position":[[89,10]]},"486":{"position":[[39,10]]},"503":{"position":[[34,9]]},"525":{"position":[[34,9]]},"537":{"position":[[228,10]]},"541":{"position":[[34,9]]},"575":{"position":[[34,9]]},"597":{"position":[[34,9]]},"631":{"position":[[34,9]]},"735":{"position":[[34,9]]}}}],["addloop",{"_index":2238,"t":{"683":{"position":[[4,7]]}}}],["address",{"_index":2107,"t":{"607":{"position":[[89,8]]}}}],["adler",{"_index":1745,"t":{"444":{"position":[[24,5]]}}}],["advanc",{"_index":1568,"t":{"327":{"position":[[93,8]]}}}],["advis",{"_index":838,"t":{"86":{"position":[[736,7]]},"333":{"position":[[154,9]]}}}],["ae",{"_index":1799,"t":{"474":{"position":[[22,3]]},"476":{"position":[[52,4],[71,4],[110,4],[123,4],[232,4]]},"478":{"position":[[53,4],[72,4],[111,4],[124,4],[233,4],[687,4]]},"480":{"position":[[21,3]]},"482":{"position":[[52,4],[91,4],[200,4]]},"484":{"position":[[19,4],[58,4],[201,4],[578,4]]},"486":{"position":[[19,3]]},"488":{"position":[[60,4],[71,3],[264,4]]},"490":{"position":[[61,4],[169,4],[757,4]]}}}],["aforement",{"_index":965,"t":{"103":{"position":[[529,14]]},"669":{"position":[[634,14]]}}}],["afterward",{"_index":2229,"t":{"671":{"position":[[379,11]]}}}],["ag",{"_index":1197,"t":{"193":{"position":[[62,3],[218,3],[265,3]]},"195":{"position":[[79,3],[246,3]]},"282":{"position":[[82,3]]},"286":{"position":[[171,3],[202,4],[235,3]]},"288":{"position":[[217,4]]}}}],["again",{"_index":483,"t":{"24":{"position":[[64,5]]},"535":{"position":[[1371,5]]}}}],["against",{"_index":1509,"t":{"315":{"position":[[61,7]]},"733":{"position":[[115,7]]},"777":{"position":[[24,7]]}}}],["agent",{"_index":1539,"t":{"321":{"position":[[290,7]]}}}],["aggreg",{"_index":1211,"t":{"209":{"position":[[48,9]]}}}],["aggress",{"_index":1160,"t":{"175":{"position":[[86,10]]}}}],["agnost",{"_index":2207,"t":{"667":{"position":[[22,8]]}}}],["aid",{"_index":834,"t":{"86":{"position":[[648,3]]},"105":{"position":[[3,3]]}}}],["aim",{"_index":753,"t":{"76":{"position":[[6,4]]}}}],["akin",{"_index":1889,"t":{"513":{"position":[[58,4]]}}}],["algorithm",{"_index":689,"t":{"60":{"position":[[111,10],[383,11]]},"246":{"position":[[452,9]]},"319":{"position":[[331,10]]},"331":{"position":[[19,10]]},"428":{"position":[[72,10]]},"430":{"position":[[55,10]]},"432":{"position":[[55,10]]},"434":{"position":[[55,10]]},"436":{"position":[[56,10]]},"438":{"position":[[56,10]]},"440":{"position":[[55,10]]},"442":{"position":[[56,10]]},"444":{"position":[[59,10]]},"446":{"position":[[58,10]]},"448":{"position":[[58,10]]},"450":{"position":[[58,10]]},"452":{"position":[[58,10]]},"454":{"position":[[59,10]]},"456":{"position":[[60,10]]},"458":{"position":[[60,10]]},"460":{"position":[[65,10]]},"463":{"position":[[52,10]]},"465":{"position":[[54,10]]},"467":{"position":[[54,10]]},"469":{"position":[[54,10]]}}}],["alia",{"_index":344,"t":{"20":{"position":[[507,5],[2840,5]]},"30":{"position":[[266,5]]},"52":{"position":[[22,5]]},"311":{"position":[[128,5],[184,5]]},"581":{"position":[[3,5]]}}}],["alic",{"_index":1279,"t":{"242":{"position":[[252,7]]}}}],["aliv",{"_index":1982,"t":{"535":{"position":[[2102,5]]},"537":{"position":[[18,5]]},"539":{"position":[[16,5]]}}}],["alloc",{"_index":490,"t":{"24":{"position":[[226,10]]}}}],["allow",{"_index":17,"t":{"4":{"position":[[140,8]]},"24":{"position":[[285,8]]},"26":{"position":[[25,6]]},"78":{"position":[[227,6]]},"105":{"position":[[191,6]]},"179":{"position":[[55,5]]},"209":{"position":[[20,6]]},"256":{"position":[[37,5]]},"264":{"position":[[19,6],[127,6]]},"286":{"position":[[6,6]]},"304":{"position":[[492,5]]},"317":{"position":[[20,6]]},"319":{"position":[[73,6]]},"321":{"position":[[18,6]]},"327":{"position":[[75,8]]},"335":{"position":[[6,6]]},"337":{"position":[[32,8]]},"339":{"position":[[24,6]]},"343":{"position":[[6,6],[480,5]]},"486":{"position":[[28,6]]}}}],["alphabet",{"_index":2187,"t":{"651":{"position":[[43,10],[202,10]]}}}],["alphanumer",{"_index":2191,"t":{"655":{"position":[[43,12],[207,12]]}}}],["alreadi",{"_index":938,"t":{"101":{"position":[[8,7]]},"621":{"position":[[400,7]]}}}],["alter",{"_index":1928,"t":{"517":{"position":[[162,7]]}}}],["altern",{"_index":401,"t":{"20":{"position":[[2406,11]]},"30":{"position":[[749,13]]},"207":{"position":[[56,14]]},"211":{"position":[[52,14]]},"221":{"position":[[48,14]]},"225":{"position":[[26,11]]},"248":{"position":[[33,11]]},"258":{"position":[[52,14]]},"292":{"position":[[138,14]]},"296":{"position":[[55,14]]},"304":{"position":[[209,13]]},"397":{"position":[[757,14]]},"527":{"position":[[3,11]]}}}],["although",{"_index":875,"t":{"92":{"position":[[0,8]]},"111":{"position":[[222,8]]},"248":{"position":[[621,8]]},"486":{"position":[[78,8]]},"767":{"position":[[606,9]]}}}],["alway",{"_index":386,"t":{"20":{"position":[[2107,6]]},"84":{"position":[[193,6]]},"229":{"position":[[28,6]]},"317":{"position":[[257,6]]},"507":{"position":[[70,6]]}}}],["ambigu",{"_index":113,"t":{"8":{"position":[[386,11]]},"24":{"position":[[332,11]]},"272":{"position":[[492,11]]}}}],["amount",{"_index":1274,"t":{"242":{"position":[[112,6]]},"599":{"position":[[16,6]]}}}],["amzn",{"_index":1543,"t":{"321":{"position":[[379,4]]}}}],["anchor",{"_index":2277,"t":{"697":{"position":[[480,9]]}}}],["and/or",{"_index":840,"t":{"86":{"position":[[758,6]]}}}],["android",{"_index":1884,"t":{"509":{"position":[[105,10]]}}}],["annot",{"_index":194,"t":{"14":{"position":[[161,10]]},"167":{"position":[[422,10]]}}}],["annoy",{"_index":374,"t":{"20":{"position":[[1548,11]]},"147":{"position":[[304,10]]},"161":{"position":[[404,10]]},"163":{"position":[[354,10]]},"165":{"position":[[351,10]]}}}],["anonym",{"_index":1230,"t":{"219":{"position":[[18,10]]},"225":{"position":[[53,9]]},"327":{"position":[[55,9]]}}}],["anoth",{"_index":805,"t":{"84":{"position":[[0,7]]},"96":{"position":[[250,7]]},"547":{"position":[[15,7]]},"661":{"position":[[24,7]]},"671":{"position":[[341,7]]},"745":{"position":[[159,7]]}}}],["ansi",{"_index":727,"t":{"72":{"position":[[76,4]]},"589":{"position":[[209,4]]}}}],["anyth",{"_index":1256,"t":{"229":{"position":[[166,8]]}}}],["anywher",{"_index":1337,"t":{"252":{"position":[[929,8]]}}}],["apart",{"_index":1377,"t":{"268":{"position":[[123,5]]}}}],["api",{"_index":735,"t":{"72":{"position":[[379,3]]},"276":{"position":[[323,3]]}}}],["appl",{"_index":1127,"t":{"149":{"position":[[127,8]]},"294":{"position":[[149,7]]},"661":{"position":[[667,8],[746,9],[760,6]]},"751":{"position":[[211,7],[304,5]]}}}],["appli",{"_index":378,"t":{"20":{"position":[[1694,5]]},"347":{"position":[[105,5]]},"353":{"position":[[104,5]]},"357":{"position":[[169,5]]}}}],["application/json",{"_index":1950,"t":{"535":{"position":[[412,18]]}}}],["approach",{"_index":2044,"t":{"567":{"position":[[435,9]]}}}],["appropri",{"_index":1952,"t":{"535":{"position":[[515,14]]}}}],["approxim",{"_index":1977,"t":{"535":{"position":[[1655,11]]}}}],["apt",{"_index":1059,"t":{"126":{"position":[[33,3],[361,3],[377,3]]},"134":{"position":[[119,3]]}}}],["arbitrari",{"_index":748,"t":{"74":{"position":[[54,9]]}}}],["arch",{"_index":1085,"t":{"128":{"position":[[16,4]]},"134":{"position":[[173,5]]}}}],["arch=amd64",{"_index":1072,"t":{"126":{"position":[[177,11]]}}}],["aren't",{"_index":1637,"t":{"375":{"position":[[148,6]]},"377":{"position":[[152,6]]}}}],["arg",{"_index":1124,"t":{"147":{"position":[[543,5]]},"231":{"position":[[142,4],[161,4],[169,3],[314,4],[322,3]]},"321":{"position":[[203,8]]}}}],["arg,str",{"_index":376,"t":{"20":{"position":[[1583,11]]}}}],["arg=valu",{"_index":2275,"t":{"697":{"position":[[438,12]]}}}],["argument",{"_index":39,"t":{"4":{"position":[[358,9]]},"6":{"position":[[347,8]]},"8":{"position":[[68,9]]},"14":{"position":[[873,8]]},"20":{"position":[[2908,8]]},"30":{"position":[[785,9],[842,9]]},"32":{"position":[[9,9],[69,9],[115,10]]},"38":{"position":[[204,9]]},"40":{"position":[[8,9]]},"42":{"position":[[8,9]]},"56":{"position":[[145,9]]},"60":{"position":[[197,10],[473,10]]},"86":{"position":[[352,8]]},"115":{"position":[[42,8],[277,10]]},"155":{"position":[[29,9],[168,9],[189,10],[257,10]]},"181":{"position":[[81,9]]},"205":{"position":[[42,8],[303,10]]},"225":{"position":[[674,10]]},"233":{"position":[[22,10],[58,9],[394,9]]},"235":{"position":[[23,9],[51,9],[80,9]]},"288":{"position":[[71,9]]},"302":{"position":[[253,8]]},"323":{"position":[[42,9]]},"387":{"position":[[355,9],[365,10],[469,8],[478,8]]},"389":{"position":[[319,9],[329,10]]},"391":{"position":[[525,9],[535,10],[762,9],[772,10],[946,8]]},"669":{"position":[[1102,8]]},"679":{"position":[[25,10]]},"701":{"position":[[30,10]]},"717":{"position":[[54,9]]},"725":{"position":[[80,9]]}}}],["arithmet",{"_index":696,"t":{"60":{"position":[[372,10]]},"331":{"position":[[8,10]]},"705":{"position":[[26,10]]}}}],["around",{"_index":741,"t":{"72":{"position":[[721,6]]},"341":{"position":[[16,6]]}}}],["array",{"_index":508,"t":{"30":{"position":[[80,5]]},"227":{"position":[[283,5]]},"741":{"position":[[63,5]]},"753":{"position":[[13,5]]},"757":{"position":[[13,5],[65,5]]},"763":{"position":[[24,5],[38,6],[205,5]]}}}],["arrow",{"_index":1242,"t":{"225":{"position":[[365,6]]},"256":{"position":[[336,5]]},"587":{"position":[[260,5]]}}}],["articl",{"_index":931,"t":{"96":{"position":[[115,8]]}}}],["artifact",{"_index":120,"t":{"8":{"position":[[546,9]]}}}],["ascii",{"_index":275,"t":{"14":{"position":[[2234,5]]},"647":{"position":[[43,5]]}}}],["aspir",{"_index":862,"t":{"90":{"position":[[6,7]]}}}],["assert",{"_index":390,"t":{"20":{"position":[[2149,9]]},"363":{"position":[[0,7],[88,9],[151,6],[254,9]]},"365":{"position":[[0,7],[91,9],[150,6],[267,9]]},"367":{"position":[[0,7],[93,9],[154,6],[273,9]]},"369":{"position":[[0,7],[142,9],[203,6],[358,9]]},"371":{"position":[[0,7],[226,9],[318,6],[444,9]]},"373":{"position":[[0,7],[97,9],[152,6],[278,9]]},"375":{"position":[[0,7],[382,9],[453,6],[567,9],[794,9]]},"377":{"position":[[0,7],[386,9],[453,6]]},"379":{"position":[[0,7],[119,9],[192,6],[304,9]]},"381":{"position":[[0,7],[131,9],[216,6],[332,9]]},"383":{"position":[[0,7],[122,9],[199,6],[317,9]]},"385":{"position":[[0,7],[134,9],[223,6]]},"387":{"position":[[0,7],[198,9],[265,6],[414,9]]},"389":{"position":[[0,7],[194,9],[269,6],[420,9]]},"391":{"position":[[0,7],[304,9],[460,6],[642,9],[893,9]]},"757":{"position":[[147,6]]}}}],["assert(\"a",{"_index":1251,"t":{"227":{"position":[[413,10]]}}}],["assert(\"b",{"_index":1252,"t":{"227":{"position":[[464,10]]}}}],["assert(\"valu",{"_index":1253,"t":{"227":{"position":[[515,14]]}}}],["assert(\"world",{"_index":1248,"t":{"227":{"position":[[170,14]]}}}],["assert(aft",{"_index":2232,"t":{"671":{"position":[[524,12],[727,12]]}}}],["assert(befor",{"_index":2231,"t":{"671":{"position":[[498,13],[687,13]]}}}],["assert(compareversions(\"1.0.0",{"_index":1933,"t":{"521":{"position":[[95,31],[142,31]]}}}],["assert(crypto.adler32(str",{"_index":1746,"t":{"444":{"position":[[219,26]]}}}],["assert(crypto.crc32(str",{"_index":1743,"t":{"442":{"position":[[273,24]]}}}],["assert(crypto.djb2(str",{"_index":1728,"t":{"432":{"position":[[214,23]]}}}],["assert(crypto.fnv1(str",{"_index":1731,"t":{"434":{"position":[[157,23]]}}}],["assert(crypto.fnv1a(str",{"_index":1734,"t":{"436":{"position":[[158,24]]}}}],["assert(crypto.joaat(str",{"_index":1736,"t":{"438":{"position":[[215,24]]}}}],["assert(crypto.lookup3(str",{"_index":1749,"t":{"446":{"position":[[160,26]]}}}],["assert(crypto.lua(str",{"_index":1719,"t":{"428":{"position":[[174,22]]}}}],["assert(crypto.md5(str",{"_index":1723,"t":{"430":{"position":[[157,22]]}}}],["assert(crypto.murmur1(str",{"_index":1755,"t":{"450":{"position":[[217,26]]}}}],["assert(crypto.murmur2(str",{"_index":1758,"t":{"452":{"position":[[217,26]]}}}],["assert(crypto.murmur2a(str",{"_index":1761,"t":{"454":{"position":[[218,27]]}}}],["assert(crypto.murmur2neutral(str",{"_index":1769,"t":{"460":{"position":[[167,33]]}}}],["assert(crypto.murmur64a(str",{"_index":1764,"t":{"456":{"position":[[162,28]]}}}],["assert(crypto.murmur64b(str",{"_index":1766,"t":{"458":{"position":[[162,28]]}}}],["assert(crypto.random(1",{"_index":1796,"t":{"472":{"position":[[468,23]]}}}],["assert(crypto.sdbm(str",{"_index":1739,"t":{"440":{"position":[[214,23]]}}}],["assert(crypto.sha1(\"pluto",{"_index":1775,"t":{"463":{"position":[[240,27],[315,27]]}}}],["assert(crypto.sha256(\"pluto",{"_index":1779,"t":{"465":{"position":[[242,29],[343,29]]}}}],["assert(crypto.sha384(\"pluto",{"_index":1783,"t":{"467":{"position":[[242,29]]}}}],["assert(crypto.sha512(\"pluto",{"_index":1786,"t":{"469":{"position":[[242,29]]}}}],["assert(crypto.times33(str",{"_index":1752,"t":{"448":{"position":[[217,26]]}}}],["assert(decod",{"_index":2097,"t":{"595":{"position":[[738,14]]}}}],["assert(decoded.__order[1",{"_index":2101,"t":{"595":{"position":[[1162,25]]}}}],["assert(decoded.key",{"_index":2099,"t":{"595":{"position":[[934,18]]}}}],["assert(decoded.nested.nested_key",{"_index":2100,"t":{"595":{"position":[[998,32]]}}}],["assert(decoded.nul",{"_index":2102,"t":{"595":{"position":[[1199,19]]}}}],["assert(json.encode(decod",{"_index":2103,"t":{"595":{"position":[[1233,27]]}}}],["assert(myenum.option_1",{"_index":1225,"t":{"213":{"position":[[469,22]]},"215":{"position":[[160,22]]}}}],["assert(n",{"_index":1365,"t":{"262":{"position":[[117,8]]},"264":{"position":[[98,8],[213,8]]}}}],["assert(not",{"_index":1254,"t":{"227":{"position":[[582,10]]}}}],["assert(option_1",{"_index":1220,"t":{"213":{"position":[[90,15],[296,15]]},"215":{"position":[[136,15]]},"219":{"position":[[79,15]]}}}],["assert(option_2",{"_index":1221,"t":{"213":{"position":[[112,15],[318,15]]},"219":{"position":[[101,15]]}}}],["assert(option_3",{"_index":1222,"t":{"213":{"position":[[134,15],[340,15]]},"219":{"position":[[123,15]]}}}],["assert(option_4",{"_index":1224,"t":{"213":{"position":[[362,15]]}}}],["assert(runtim",{"_index":1171,"t":{"181":{"position":[[283,14],[538,14]]}}}],["assert(s:lower(1",{"_index":2167,"t":{"635":{"position":[[113,17]]}}}],["assert(s:starttls(\"pluto",{"_index":2148,"t":{"621":{"position":[[615,24]]}}}],["assert(s:upper(1",{"_index":2166,"t":{"633":{"position":[[109,17]]}}}],["assert(sam",{"_index":2370,"t":{"753":{"position":[[209,11]]}}}],["assert(table.contains(t",{"_index":2363,"t":{"749":{"position":[[203,24],[237,24],[281,24]]}}}],["assert(table.isfrozen(t",{"_index":2362,"t":{"747":{"position":[[99,24]]}}}],["assert(type(decod",{"_index":2098,"t":{"595":{"position":[[762,20],[965,20]]}}}],["assert.equ",{"_index":310,"t":{"18":{"position":[[274,12]]},"375":{"position":[[584,14],[811,14]]}}}],["assert.equal(\"hello",{"_index":1640,"t":{"375":{"position":[[480,20]]}}}],["assert.equal(\"hi",{"_index":1643,"t":{"375":{"position":[[692,16]]}}}],["assert.equal(t1:reord",{"_index":2375,"t":{"757":{"position":[[220,26]]}}}],["assert.falsi",{"_index":1626,"t":{"369":{"position":[[375,14]]}}}],["assert.falsy(\"hello",{"_index":1625,"t":{"369":{"position":[[290,20]]}}}],["assert.falsy(fals",{"_index":1624,"t":{"369":{"position":[[259,19]]}}}],["assert.falsy(nil",{"_index":1623,"t":{"369":{"position":[[230,17]]}}}],["assert.great",{"_index":1658,"t":{"383":{"position":[[334,16]]}}}],["assert.greater(3",{"_index":1657,"t":{"383":{"position":[[226,17],[258,17]]}}}],["assert.greatereq(3",{"_index":1659,"t":{"385":{"position":[[250,19],[284,19]]}}}],["assert.haserror",{"_index":1667,"t":{"389":{"position":[[437,17]]}}}],["assert.haserror(error",{"_index":1665,"t":{"389":{"position":[[296,22]]}}}],["assert.haserror(tostr",{"_index":1666,"t":{"389":{"position":[[351,25]]}}}],["assert.isfals",{"_index":1622,"t":{"367":{"position":[[290,16]]}}}],["assert.isfalse(fals",{"_index":1620,"t":{"367":{"position":[[181,21]]}}}],["assert.isfalse(tru",{"_index":1621,"t":{"367":{"position":[[214,20]]}}}],["assert.isnil",{"_index":1612,"t":{"363":{"position":[[271,14]]}}}],["assert.isnil(5",{"_index":1611,"t":{"363":{"position":[[207,15]]}}}],["assert.isnil(nil",{"_index":1610,"t":{"363":{"position":[[178,17]]}}}],["assert.istru",{"_index":1619,"t":{"365":{"position":[[284,15]]}}}],["assert.istrue(fals",{"_index":1618,"t":{"365":{"position":[[208,20]]}}}],["assert.istrue(tru",{"_index":1617,"t":{"365":{"position":[[177,19]]}}}],["assert.less",{"_index":1653,"t":{"379":{"position":[[321,13]]}}}],["assert.less(1",{"_index":1652,"t":{"379":{"position":[[219,14],[248,14]]}}}],["assert.lesseq",{"_index":1655,"t":{"381":{"position":[[349,15]]}}}],["assert.lesseq(1",{"_index":1654,"t":{"381":{"position":[[243,16],[274,16]]}}}],["assert.nequ",{"_index":311,"t":{"18":{"position":[[289,13]]}}}],["assert.nequal(\"hello",{"_index":1649,"t":{"377":{"position":[[480,21]]}}}],["assert.nequal(\"hi",{"_index":1650,"t":{"377":{"position":[[536,17]]}}}],["assert.noerror",{"_index":1664,"t":{"387":{"position":[[431,16]]}}}],["assert.noerror(error",{"_index":1663,"t":{"387":{"position":[[333,21]]}}}],["assert.noerror(tostr",{"_index":1661,"t":{"387":{"position":[[292,24]]}}}],["assert.notnil",{"_index":1634,"t":{"373":{"position":[[295,15]]}}}],["assert.notnil(\"hello",{"_index":1632,"t":{"373":{"position":[[179,21]]}}}],["assert.notnil(nil",{"_index":1633,"t":{"373":{"position":[[221,18]]}}}],["assert.searcherror",{"_index":1671,"t":{"391":{"position":[[659,20],[910,20]]}}}],["assert.searcherror(\"argu",{"_index":1669,"t":{"391":{"position":[[487,30],[724,30],[794,30]]}}}],["assert.searcherror(\"someth",{"_index":1670,"t":{"391":{"position":[[557,31]]}}}],["assert.truthi",{"_index":1631,"t":{"371":{"position":[[461,15]]}}}],["assert.truthy(\"hello",{"_index":1629,"t":{"371":{"position":[[345,21]]}}}],["assert.truthy(nil",{"_index":1630,"t":{"371":{"position":[[387,18]]}}}],["assign",{"_index":366,"t":{"20":{"position":[[1340,8]]},"24":{"position":[[364,10]]},"149":{"position":[[292,8]]},"151":{"position":[[279,8]]},"183":{"position":[[244,8],[359,8]]},"189":{"position":[[33,6]]},"191":{"position":[[83,6]]},"193":{"position":[[99,6]]},"195":{"position":[[59,6]]},"244":{"position":[[507,11]]},"280":{"position":[[62,9]]},"288":{"position":[[51,6]]},"315":{"position":[[660,11]]},"317":{"position":[[42,11],[132,8],[173,8],[326,8],[367,8]]}}}],["associ",{"_index":1462,"t":{"298":{"position":[[348,10]]}}}],["assum",{"_index":1114,"t":{"140":{"position":[[356,8]]},"191":{"position":[[0,8]]},"193":{"position":[[0,8]]},"195":{"position":[[0,8]]},"593":{"position":[[731,8]]}}}],["attempt",{"_index":721,"t":{"66":{"position":[[358,8]]},"90":{"position":[[107,9]]},"242":{"position":[[150,8],[369,8]]},"298":{"position":[[269,7],[458,7],[529,7],[610,7],[857,7]]},"535":{"position":[[680,7]]},"621":{"position":[[0,8]]}}}],["attribut",{"_index":197,"t":{"14":{"position":[[237,9],[681,9]]},"20":{"position":[[1238,10]]},"38":{"position":[[18,9]]},"159":{"position":[[135,9]]},"183":{"position":[[160,10]]},"731":{"position":[[259,10]]},"733":{"position":[[191,10],[489,14]]}}}],["augment",{"_index":2093,"t":{"595":{"position":[[244,7]]}}}],["authent",{"_index":1830,"t":{"486":{"position":[[5,13],[120,14]]},"488":{"position":[[153,13],[358,14]]},"490":{"position":[[81,13],[229,14],[343,14]]}}}],["automat",{"_index":574,"t":{"38":{"position":[[270,13]]},"209":{"position":[[34,13],[324,13],[555,13]]},"272":{"position":[[326,13]]},"284":{"position":[[336,14]]},"531":{"position":[[162,13]]},"611":{"position":[[49,13]]}}}],["avail",{"_index":783,"t":{"82":{"position":[[339,9]]},"130":{"position":[[9,9]]},"181":{"position":[[578,9]]},"217":{"position":[[264,10]]},"313":{"position":[[37,9]]},"393":{"position":[[18,9]]},"397":{"position":[[802,10]]},"515":{"position":[[277,11],[1029,12]]},"517":{"position":[[328,11],[442,12]]},"535":{"position":[[1708,9]]},"537":{"position":[[38,9],[83,9]]},"605":{"position":[[50,9]]},"677":{"position":[[22,9]]}}}],["avoid",{"_index":286,"t":{"14":{"position":[[2498,5]]},"66":{"position":[[352,5]]},"147":{"position":[[288,5]]},"161":{"position":[[388,5]]},"163":{"position":[[338,5]]},"165":{"position":[[335,5]]},"272":{"position":[[475,5]]},"535":{"position":[[1414,5]]}}}],["awar",{"_index":762,"t":{"76":{"position":[[272,5]]}}}],["away",{"_index":2379,"t":{"763":{"position":[[8,4]]}}}],["axi",{"_index":2301,"t":{"713":{"position":[[21,4]]},"715":{"position":[[21,4]]},"719":{"position":[[41,4]]},"723":{"position":[[101,4],[201,4],[228,4]]}}}],["b",{"_index":157,"t":{"12":{"position":[[89,1],[136,1]]},"155":{"position":[[104,2]]},"171":{"position":[[140,2],[166,1]]},"191":{"position":[[124,2],[186,2],[240,2]]},"209":{"position":[[153,2],[167,1],[275,2],[289,1],[506,2],[520,1]]},"225":{"position":[[508,2],[540,3],[566,1]]},"227":{"position":[[392,4],[484,3]]},"239":{"position":[[132,2],[158,1],[395,2],[437,1]]},"244":{"position":[[568,2],[597,2]]},"266":{"position":[[128,1],[154,1],[196,1],[204,1]]},"268":{"position":[[76,1],[87,1]]},"302":{"position":[[143,2]]},"585":{"position":[[30,1],[166,1]]},"587":{"position":[[38,2],[53,1],[167,2],[182,1]]},"593":{"position":[[616,4],[635,1]]}}}],["backup",{"_index":2007,"t":{"547":{"position":[[306,6],[354,6]]}}}],["backup_cfg/config.txt",{"_index":2005,"t":{"547":{"position":[[244,26]]}}}],["backward",{"_index":1233,"t":{"223":{"position":[[393,9]]},"229":{"position":[[257,9]]},"246":{"position":[[557,9]]},"339":{"position":[[538,9]]},"723":{"position":[[978,8]]}}}],["bad",{"_index":826,"t":{"86":{"position":[[348,3]]},"157":{"position":[[163,3],[247,4]]},"523":{"position":[[170,6]]},"669":{"position":[[1195,4]]}}}],["banana",{"_index":1128,"t":{"149":{"position":[[144,8],[232,8]]},"294":{"position":[[167,8]]},"751":{"position":[[239,8]]}}}],["bar",{"_index":2041,"t":{"567":{"position":[[326,5]]},"741":{"position":[[158,5]]},"743":{"position":[[105,5]]}}}],["base",{"_index":877,"t":{"92":{"position":[[50,5]]},"213":{"position":[[182,4]]},"472":{"position":[[79,5]]},"509":{"position":[[255,5]]},"559":{"position":[[165,5]]},"639":{"position":[[17,4]]},"677":{"position":[[85,5]]},"723":{"position":[[26,5]]},"725":{"position":[[26,5]]},"727":{"position":[[27,5]]}}}],["base32",{"_index":296,"t":{"16":{"position":[[131,6]]},"48":{"position":[[635,6]]},"181":{"position":[[632,6]]},"347":{"position":[[19,6]]},"349":{"position":[[18,6],[64,6]]}}}],["base32.encod",{"_index":265,"t":{"14":{"position":[[2059,13]]}}}],["base58",{"_index":452,"t":{"20":{"position":[[3624,6]]},"48":{"position":[[622,6]]},"181":{"position":[[639,6]]}}}],["base64",{"_index":297,"t":{"16":{"position":[[140,6]]},"48":{"position":[[609,6]]},"181":{"position":[[646,6]]},"197":{"position":[[121,7]]},"353":{"position":[[10,6],[149,6]]},"355":{"position":[[18,6],[64,6],[89,6]]},"357":{"position":[[90,7],[215,6]]},"359":{"position":[[78,6],[103,6]]},"497":{"position":[[267,7]]},"501":{"position":[[292,7]]}}}],["base64.decod",{"_index":1606,"t":{"359":{"position":[[11,13]]}}}],["base64.encod",{"_index":264,"t":{"14":{"position":[[2043,13]]}}}],["base64.url_decod",{"_index":434,"t":{"20":{"position":[[3059,17]]}}}],["base64.url_encod",{"_index":433,"t":{"20":{"position":[[3039,17]]}}}],["base64.urldecod",{"_index":435,"t":{"20":{"position":[[3099,16]]}}}],["base64.urlencod",{"_index":270,"t":{"14":{"position":[[2134,17]]},"20":{"position":[[3080,16]]}}}],["base64url",{"_index":1603,"t":{"357":{"position":[[10,9]]},"359":{"position":[[36,10]]}}}],["basi",{"_index":1484,"t":{"306":{"position":[[71,6]]}}}],["basic",{"_index":1277,"t":{"242":{"position":[[210,5]]},"595":{"position":[[639,5]]},"671":{"position":[[393,5]]}}}],["batch",{"_index":1107,"t":{"136":{"position":[[127,5]]}}}],["battl",{"_index":926,"t":{"96":{"position":[[40,6]]}}}],["bce8c9aca4120776fad6b517874aa09c46405454",{"_index":1776,"t":{"463":{"position":[[271,43]]}}}],["bcryptgenrandom",{"_index":1791,"t":{"472":{"position":[[136,16]]}}}],["be",{"_index":95,"t":{"8":{"position":[[24,5]]},"10":{"position":[[204,5]]},"12":{"position":[[309,5],[503,5],[656,5]]},"14":{"position":[[784,5],[838,5]]},"16":{"position":[[161,5]]},"18":{"position":[[452,5]]},"20":{"position":[[1089,5]]},"28":{"position":[[141,5]]},"32":{"position":[[253,5]]},"42":{"position":[[293,5],[353,5]]},"44":{"position":[[175,5]]},"88":{"position":[[82,5]]},"199":{"position":[[188,5]]},"256":{"position":[[400,5]]},"268":{"position":[[273,5]]},"627":{"position":[[180,5]]},"719":{"position":[[46,5]]}}}],["becom",{"_index":809,"t":{"84":{"position":[[132,7]]},"737":{"position":[[150,8]]},"757":{"position":[[44,7]]}}}],["befor",{"_index":519,"t":{"30":{"position":[[625,6]]},"40":{"position":[[180,6]]},"101":{"position":[[29,6]]},"167":{"position":[[338,6]]},"177":{"position":[[81,6]]},"181":{"position":[[147,6]]},"300":{"position":[[202,6]]},"671":{"position":[[302,6],[457,7],[640,7]]},"753":{"position":[[250,7]]}}}],["begin",{"_index":518,"t":{"30":{"position":[[617,7]]},"82":{"position":[[753,10]]},"213":{"position":[[51,5],[239,5]]},"215":{"position":[[97,5]]},"217":{"position":[[128,5]]},"219":{"position":[[40,5]]},"669":{"position":[[328,9]]}}}],["behav",{"_index":1191,"t":{"187":{"position":[[243,7]]},"266":{"position":[[20,6]]}}}],["behavior",{"_index":177,"t":{"12":{"position":[[565,8]]},"22":{"position":[[17,8]]},"30":{"position":[[1096,8]]},"52":{"position":[[152,8]]},"60":{"position":[[639,9]]},"513":{"position":[[322,8]]}}}],["benefici",{"_index":1572,"t":{"329":{"position":[[272,10]]}}}],["benefit",{"_index":1320,"t":{"246":{"position":[[477,7]]}}}],["benign",{"_index":816,"t":{"86":{"position":[[49,6]]}}}],["besid",{"_index":1204,"t":{"203":{"position":[[237,7]]},"343":{"position":[[333,7]]}}}],["better",{"_index":841,"t":{"86":{"position":[[773,6]]},"105":{"position":[[417,6]]},"189":{"position":[[19,6]]},"567":{"position":[[476,7]]}}}],["between",{"_index":1725,"t":{"432":{"position":[[118,7]]},"438":{"position":[[119,7]]},"440":{"position":[[118,7]]},"442":{"position":[[177,7]]},"448":{"position":[[121,7]]},"450":{"position":[[121,7]]},"452":{"position":[[121,7]]},"454":{"position":[[122,7]]}}}],["beyond",{"_index":2210,"t":{"669":{"position":[[187,6]]}}}],["big",{"_index":491,"t":{"24":{"position":[[254,4]]}}}],["bigint",{"_index":221,"t":{"14":{"position":[[1008,8]]},"20":{"position":[[2507,6]]},"401":{"position":[[17,7],[125,7],[145,6]]},"403":{"position":[[81,6]]},"405":{"position":[[45,7],[65,6]]},"407":{"position":[[40,7],[60,6]]},"409":{"position":[[9,7],[41,7]]},"411":{"position":[[28,8],[51,7]]},"413":{"position":[[31,8],[54,7]]},"415":{"position":[[25,8],[50,8],[95,6]]},"417":{"position":[[25,8],[48,6],[86,6]]},"419":{"position":[[24,8],[47,6],[86,6]]},"421":{"position":[[32,8],[55,7],[75,6]]},"423":{"position":[[85,6]]},"493":{"position":[[291,6]]},"497":{"position":[[275,7]]},"501":{"position":[[300,7]]},"669":{"position":[[157,6]]}}}],["bigint(\"115443384115231951475820445136871322101870729500298182134363293112660251666017",{"_index":1857,"t":{"497":{"position":[[335,89]]},"501":{"position":[[360,89]]}}}],["bigint(\"123",{"_index":1699,"t":{"401":{"position":[[187,14]]}}}],["bigint(\"420\"):binari",{"_index":1703,"t":{"407":{"position":[[102,23]]}}}],["bigint(\"420\"):hex",{"_index":1701,"t":{"405":{"position":[[107,20]]}}}],["bigint(\"98365361248415863235179644468056200977592391948608651522703704315152579004021",{"_index":1858,"t":{"497":{"position":[[433,88]]},"501":{"position":[[458,88]]}}}],["bigint(0x10001",{"_index":1862,"t":{"497":{"position":[[747,15]]},"501":{"position":[[772,15]]}}}],["bigint(10",{"_index":1709,"t":{"417":{"position":[[128,10]]},"419":{"position":[[128,10]]},"421":{"position":[[133,11]]}}}],["bigint(10):div(new",{"_index":1707,"t":{"415":{"position":[[137,18]]}}}],["bigint(2",{"_index":1712,"t":{"421":{"position":[[117,9]]}}}],["bigint(3",{"_index":1708,"t":{"415":{"position":[[156,11]]},"417":{"position":[[145,10]]},"419":{"position":[[145,10]]}}}],["bigint(420):bitlength",{"_index":1716,"t":{"423":{"position":[[127,24]]}}}],["bigint.new",{"_index":1696,"t":{"401":{"position":[[42,10]]}}}],["binari",{"_index":84,"t":{"6":{"position":[[494,6]]},"14":{"position":[[1855,6]]},"16":{"position":[[167,6]]},"48":{"position":[[117,6]]},"121":{"position":[[23,8]]},"126":{"position":[[566,8]]},"130":{"position":[[77,8]]},"134":{"position":[[507,8]]},"136":{"position":[[191,8]]},"138":{"position":[[111,8]]},"140":{"position":[[162,8]]},"264":{"position":[[158,6]]},"407":{"position":[[11,6]]},"463":{"position":[[125,6]]},"465":{"position":[[127,6]]},"467":{"position":[[127,6]]},"469":{"position":[[127,6]]}}}],["bind",{"_index":2158,"t":{"629":{"position":[[234,4]]}}}],["bit",{"_index":627,"t":{"42":{"position":[[313,3]]},"423":{"position":[[49,3]]},"476":{"position":[[228,3]]},"478":{"position":[[229,3]]},"482":{"position":[[196,3]]},"484":{"position":[[197,3]]},"488":{"position":[[260,3]]},"490":{"position":[[165,3]]},"493":{"position":[[34,4],[73,3]]}}}],["bitshift",{"_index":1506,"t":{"313":{"position":[[441,8],[460,8]]}}}],["bitwis",{"_index":1505,"t":{"313":{"position":[[170,7],[186,7],[201,7]]},"595":{"position":[[308,7]]}}}],["block",{"_index":303,"t":{"18":{"position":[[147,6]]},"24":{"position":[[244,5]]},"92":{"position":[[320,5]]},"107":{"position":[[1000,5]]},"153":{"position":[[22,5]]},"167":{"position":[[66,6]]},"209":{"position":[[366,6]]},"250":{"position":[[7,6]]},"252":{"position":[[945,6]]},"256":{"position":[[111,7],[286,6]]},"480":{"position":[[105,6],[143,7]]},"535":{"position":[[1826,7]]},"537":{"position":[[366,6]]},"539":{"position":[[79,8]]},"607":{"position":[[304,7]]},"617":{"position":[[361,5]]},"621":{"position":[[515,7]]},"627":{"position":[[383,8]]},"629":{"position":[[126,5]]}}}],["bodi",{"_index":201,"t":{"14":{"position":[[333,6]]},"20":{"position":[[736,4]]},"30":{"position":[[632,4]]},"225":{"position":[[463,6]]},"535":{"position":[[434,5],[1497,4],[2255,5]]},"733":{"position":[[1073,6],[1232,7]]}}}],["boilerpl",{"_index":1421,"t":{"288":{"position":[[144,12]]}}}],["bool",{"_index":948,"t":{"101":{"position":[[373,4]]},"551":{"position":[[147,4],[172,4]]},"553":{"position":[[145,4],[171,4]]},"563":{"position":[[100,4]]},"761":{"position":[[176,4]]},"763":{"position":[[401,4]]},"767":{"position":[[162,4]]}}}],["boolean",{"_index":1327,"t":{"248":{"position":[[655,7]]},"311":{"position":[[147,7]]},"335":{"position":[[32,7]]},"501":{"position":[[214,7]]},"507":{"position":[[19,7]]},"547":{"position":[[151,7]]},"551":{"position":[[53,7]]},"553":{"position":[[53,7]]},"555":{"position":[[53,7]]},"557":{"position":[[75,7]]},"559":{"position":[[85,7]]},"593":{"position":[[47,8]]},"595":{"position":[[59,8]]},"663":{"position":[[278,7]]},"671":{"position":[[142,7]]}}}],["boolean/bool",{"_index":1478,"t":{"304":{"position":[[24,12]]}}}],["boom",{"_index":2252,"t":{"685":{"position":[[602,5]]}}}],["boost",{"_index":1576,"t":{"331":{"position":[[181,6]]}}}],["botanist",{"_index":1444,"t":{"294":{"position":[[312,11],[450,11]]}}}],["both",{"_index":1450,"t":{"296":{"position":[[103,4]]},"331":{"position":[[230,4]]},"375":{"position":[[85,4]]},"377":{"position":[[89,4]]},"474":{"position":[[37,4]]},"531":{"position":[[113,5]]},"641":{"position":[[32,4]]},"741":{"position":[[54,4]]},"763":{"position":[[18,5]]}}}],["bottleneck",{"_index":984,"t":{"107":{"position":[[244,10]]}}}],["box",{"_index":531,"t":{"30":{"position":[[1166,3]]}}}],["bracket",{"_index":1325,"t":{"248":{"position":[[498,8]]}}}],["break",{"_index":170,"t":{"12":{"position":[[358,5]]},"14":{"position":[[2504,8]]},"16":{"position":[[81,5]]},"20":{"position":[[1907,5]]},"50":{"position":[[178,7]]},"66":{"position":[[240,5]]},"107":{"position":[[1084,8]]},"113":{"position":[[122,5],[178,5]]},"115":{"position":[[111,6],[147,8],[225,5],[257,7],[369,5],[390,5],[409,5],[430,5]]},"157":{"position":[[229,5]]},"203":{"position":[[26,6]]},"252":{"position":[[74,5],[116,5],[129,5],[292,5],[348,5],[438,5],[839,5],[1001,5]]},"254":{"position":[[113,5],[219,5],[252,5],[507,5],[577,5]]},"313":{"position":[[434,6]]},"317":{"position":[[607,5]]},"629":{"position":[[308,5]]}}}],["browser",{"_index":1051,"t":{"119":{"position":[[114,7]]}}}],["buffer",{"_index":2128,"t":{"617":{"position":[[265,9]]},"619":{"position":[[51,7]]}}}],["bug",{"_index":186,"t":{"12":{"position":[[809,4]]},"20":{"position":[[1521,4]]},"36":{"position":[[384,4]]},"50":{"position":[[158,4]]},"68":{"position":[[8,3]]},"252":{"position":[[516,4]]},"304":{"position":[[545,5]]}}}],["bugfix",{"_index":496,"t":{"24":{"position":[[456,8]]},"64":{"position":[[0,7]]},"72":{"position":[[841,8]]}}}],["build",{"_index":34,"t":{"4":{"position":[[321,5]]},"8":{"position":[[706,6]]},"34":{"position":[[401,5]]},"40":{"position":[[56,8]]},"86":{"position":[[631,5]]},"92":{"position":[[400,5]]},"99":{"position":[[103,5]]},"101":{"position":[[271,5]]},"105":{"position":[[161,5]]},"111":{"position":[[69,5]]},"132":{"position":[[219,5]]},"136":{"position":[[119,5],[133,5],[178,8]]},"140":{"position":[[23,5],[103,5]]},"185":{"position":[[73,6],[96,6]]},"329":{"position":[[451,5]]},"535":{"position":[[623,6],[922,6],[1273,6],[1589,6],[1726,6],[1842,6]]},"537":{"position":[[101,6]]},"539":{"position":[[128,6]]},"589":{"position":[[124,5]]},"605":{"position":[[68,6]]}}}],["built",{"_index":681,"t":{"54":{"position":[[298,5]]},"121":{"position":[[17,5]]},"503":{"position":[[85,5]]},"525":{"position":[[88,5]]},"541":{"position":[[81,5]]},"575":{"position":[[83,5]]},"597":{"position":[[81,5]]},"631":{"position":[[85,5]]},"735":{"position":[[84,5]]}}}],["bundl",{"_index":923,"t":{"94":{"position":[[519,8],[600,8]]}}}],["burden",{"_index":404,"t":{"20":{"position":[[2445,8]]},"535":{"position":[[1420,9]]},"661":{"position":[[108,8]]}}}],["buster",{"_index":1076,"t":{"126":{"position":[[278,6],[537,8]]}}}],["bvar",{"_index":1580,"t":{"335":{"position":[[110,4],[212,5]]}}}],["by=/usr/share/keyrings/calam",{"_index":1074,"t":{"126":{"position":[[196,31]]}}}],["bypass",{"_index":941,"t":{"101":{"position":[[128,6]]},"103":{"position":[[196,6],[451,9]]}}}],["byte",{"_index":662,"t":{"50":{"position":[[309,5]]},"569":{"position":[[28,6]]},"647":{"position":[[199,4]]}}}],["bytecod",{"_index":112,"t":{"8":{"position":[[343,8]]},"18":{"position":[[90,8]]},"20":{"position":[[1960,9]]},"22":{"position":[[262,8]]},"32":{"position":[[46,8]]},"76":{"position":[[29,8]]},"88":{"position":[[137,9]]},"99":{"position":[[38,8]]},"165":{"position":[[87,10],[196,9],[286,8]]},"175":{"position":[[549,9],[618,8]]},"223":{"position":[[360,8]]},"229":{"position":[[225,8]]},"246":{"position":[[525,8]]},"290":{"position":[[577,9]]},"339":{"position":[[506,8]]}}}],["c",{"_index":158,"t":{"12":{"position":[[96,2],[140,2]]},"14":{"position":[[2261,2],[2465,3]]},"40":{"position":[[70,1]]},"48":{"position":[[147,1]]},"80":{"position":[[246,1]]},"86":{"position":[[425,4]]},"101":{"position":[[369,3]]},"103":{"position":[[326,1]]},"132":{"position":[[66,3]]},"155":{"position":[[107,2]]},"191":{"position":[[131,1],[189,1],[243,2]]},"225":{"position":[[250,3]]},"244":{"position":[[571,1],[600,2]]},"266":{"position":[[61,2]]},"276":{"position":[[321,1]]},"363":{"position":[[341,4],[454,4]]},"365":{"position":[[360,4],[501,4]]},"367":{"position":[[367,4],[508,4]]},"369":{"position":[[479,4],[620,4]]},"371":{"position":[[547,4],[688,4]]},"373":{"position":[[372,4],[513,4]]},"513":{"position":[[135,1]]},"517":{"position":[[196,1]]},"587":{"position":[[41,2],[63,2],[170,2],[192,2]]},"593":{"position":[[621,3],[642,1]]},"669":{"position":[[1233,4],[1297,4]]}}}],["c/c",{"_index":693,"t":{"60":{"position":[[287,6]]}}}],["c:\\users\\username\\desktop\\project\\a\\b\\c",{"_index":2029,"t":{"561":{"position":[[173,41]]}}}],["c:\\users\\username\\desktop\\project\\cfg\\cfg.txt",{"_index":2034,"t":{"563":{"position":[[275,47]]}}}],["c:resum",{"_index":1893,"t":{"513":{"position":[[215,10]]}}}],["cach",{"_index":14,"t":{"4":{"position":[[107,6]]},"72":{"position":[[656,5]]},"333":{"position":[[11,5],[84,5],[221,5]]}}}],["calam",{"_index":900,"t":{"94":{"position":[[69,8],[373,8]]}}}],["call",{"_index":140,"t":{"10":{"position":[[103,5]]},"12":{"position":[[180,4],[601,5]]},"18":{"position":[[191,5]]},"20":{"position":[[207,6]]},"24":{"position":[[303,5]]},"26":{"position":[[163,4]]},"34":{"position":[[177,5]]},"38":{"position":[[842,5]]},"58":{"position":[[171,4]]},"107":{"position":[[143,4],[352,6],[537,5]]},"113":{"position":[[488,4],[501,4]]},"181":{"position":[[42,6],[167,5]]},"191":{"position":[[114,6]]},"244":{"position":[[80,5]]},"254":{"position":[[293,5]]},"276":{"position":[[88,4]]},"284":{"position":[[83,4],[329,6],[416,4],[622,6]]},"300":{"position":[[184,4]]},"313":{"position":[[612,4]]},"325":{"position":[[39,5]]},"331":{"position":[[284,7]]},"339":{"position":[[94,4]]},"343":{"position":[[465,5]]},"363":{"position":[[444,9]]},"365":{"position":[[463,9]]},"367":{"position":[[470,9]]},"369":{"position":[[582,9]]},"371":{"position":[[650,9]]},"373":{"position":[[475,9]]},"387":{"position":[[51,7]]},"389":{"position":[[47,7]]},"401":{"position":[[33,4]]},"523":{"position":[[0,5]]},"535":{"position":[[1760,6],[1870,6]]},"537":{"position":[[293,6]]},"539":{"position":[[181,6]]},"607":{"position":[[238,6]]},"611":{"position":[[215,6]]},"613":{"position":[[33,7]]},"621":{"position":[[449,6]]},"625":{"position":[[35,7]]},"627":{"position":[[352,6]]},"629":{"position":[[90,4]]},"685":{"position":[[86,5]]},"687":{"position":[[135,7]]},"709":{"position":[[86,4]]},"761":{"position":[[138,6]]}}}],["callback",{"_index":1660,"t":{"387":{"position":[[13,8],[71,8],[177,9],[227,8]]},"389":{"position":[[13,8],[67,8],[173,9],[223,8]]},"391":{"position":[[13,8],[177,8],[283,9],[334,8],[368,8]]},"611":{"position":[[184,8]]},"751":{"position":[[69,8]]},"761":{"position":[[123,8],[188,8]]},"763":{"position":[[92,9],[255,8],[413,8]]},"767":{"position":[[49,8],[95,8],[174,8]]},"771":{"position":[[148,8]]},"777":{"position":[[110,8]]}}}],["can't",{"_index":767,"t":{"78":{"position":[[113,5]]},"337":{"position":[[171,5]]}}}],["canari",{"_index":1874,"t":{"501":{"position":[[824,6]]}}}],["canon",{"_index":2031,"t":{"563":{"position":[[144,9]]}}}],["canonic",{"_index":424,"t":{"20":{"position":[[2930,13]]},"563":{"position":[[127,14]]}}}],["capabl",{"_index":959,"t":{"103":{"position":[[103,10]]}}}],["capit",{"_index":2165,"t":{"633":{"position":[[73,11]]},"667":{"position":[[38,15]]}}}],["captur",{"_index":2198,"t":{"661":{"position":[[130,7]]}}}],["care",{"_index":845,"t":{"86":{"position":[[847,4]]},"767":{"position":[[690,4]]}}}],["carri",{"_index":1973,"t":{"535":{"position":[[1339,5]]}}}],["carrier",{"_index":2143,"t":{"621":{"position":[[86,7]]}}}],["case",{"_index":71,"t":{"6":{"position":[[313,4],[451,4]]},"8":{"position":[[433,5]]},"12":{"position":[[497,5]]},"14":{"position":[[778,5]]},"20":{"position":[[100,4],[915,5],[1893,5]]},"36":{"position":[[124,5],[149,5],[189,6]]},"40":{"position":[[187,4]]},"42":{"position":[[420,5]]},"48":{"position":[[308,6]]},"54":{"position":[[173,4]]},"60":{"position":[[229,4]]},"76":{"position":[[217,6]]},"94":{"position":[[618,4]]},"107":{"position":[[667,5]]},"113":{"position":[[64,4],[72,4],[80,4],[88,4],[96,4]]},"167":{"position":[[103,4],[127,4],[243,4],[271,4],[302,4],[350,4],[532,4],[572,4]]},"185":{"position":[[286,5]]},"250":{"position":[[54,4]]},"252":{"position":[[38,4],[80,4],[234,4],[242,4],[250,4],[258,4],[266,4],[388,5],[414,4],[559,4],[595,4],[718,4],[756,5],[823,4],[831,4],[910,4],[1033,6]]},"254":{"position":[[35,4],[72,4],[192,4],[225,4],[407,4],[450,5],[513,4]]},"256":{"position":[[106,4],[165,4],[181,4],[197,4],[281,4],[545,4],[567,4],[695,4]]},"268":{"position":[[232,5]]},"284":{"position":[[105,4]]},"294":{"position":[[144,4],[162,4],[181,4],[200,4],[219,4],[237,4],[260,4]]},"685":{"position":[[188,4]]},"689":{"position":[[167,4]]}}}],["cat",{"_index":87,"t":{"6":{"position":[[517,3]]},"14":{"position":[[924,5]]},"393":{"position":[[4,3]]},"395":{"position":[[20,4],[67,4],[84,3]]},"397":{"position":[[33,3],[66,3],[204,3],[825,3],[1053,3]]}}}],["cat.decod",{"_index":1680,"t":{"397":{"position":[[243,10]]}}}],["cat.encod",{"_index":1674,"t":{"395":{"position":[[110,10]]}}}],["catch",{"_index":765,"t":{"78":{"position":[[91,5]]},"82":{"position":[[650,5]]},"294":{"position":[[410,5]]},"296":{"position":[[85,5]]},"531":{"position":[[230,5]]}}}],["caus",{"_index":61,"t":{"6":{"position":[[209,7]]},"12":{"position":[[670,5]]},"24":{"position":[[324,7]]},"40":{"position":[[203,7]]},"113":{"position":[[670,7]]},"157":{"position":[[82,5]]},"175":{"position":[[122,6]]},"239":{"position":[[37,7]]}}}],["caution",{"_index":1207,"t":{"203":{"position":[[355,7]]},"229":{"position":[[213,7]]},"246":{"position":[[513,7]]},"272":{"position":[[372,7]]},"300":{"position":[[122,7]]},"339":{"position":[[494,7]]}}}],["cbc",{"_index":1805,"t":{"476":{"position":[[57,3],[115,4]]},"478":{"position":[[58,3],[116,4],[609,3],[692,3]]}}}],["cd",{"_index":1094,"t":{"132":{"position":[[176,2]]},"140":{"position":[[125,2]]}}}],["certain",{"_index":1116,"t":{"142":{"position":[[44,7]]},"173":{"position":[[85,7]]},"181":{"position":[[0,7]]},"185":{"position":[[12,7],[65,7]]}}}],["certif",{"_index":2145,"t":{"621":{"position":[[266,11]]}}}],["cfb",{"_index":1807,"t":{"476":{"position":[[76,3],[128,4]]},"478":{"position":[[77,3],[129,4]]}}}],["cfg",{"_index":2025,"t":{"557":{"position":[[186,3],[232,3]]}}}],["cfg\\cfg.txt",{"_index":2036,"t":{"565":{"position":[[187,13]]}}}],["cfunc",{"_index":1034,"t":{"113":{"position":[[506,5]]}}}],["chain",{"_index":544,"t":{"34":{"position":[[56,7]]}}}],["chanc",{"_index":802,"t":{"82":{"position":[[1570,6]]}}}],["chang",{"_index":266,"t":{"14":{"position":[[2073,7]]},"18":{"position":[[613,8]]},"20":{"position":[[1622,6]]},"36":{"position":[[364,7]]},"40":{"position":[[148,6]]},"52":{"position":[[44,7]]},"60":{"position":[[587,7]]},"66":{"position":[[414,8],[634,7]]},"82":{"position":[[8,6]]},"86":{"position":[[203,7]]},"105":{"position":[[261,7]]},"147":{"position":[[626,6]]},"173":{"position":[[38,7]]},"175":{"position":[[182,6]]},"260":{"position":[[22,7]]},"503":{"position":[[24,7]]},"525":{"position":[[24,7]]},"541":{"position":[[24,7]]},"575":{"position":[[24,7]]},"597":{"position":[[24,7]]},"631":{"position":[[24,7]]},"735":{"position":[[24,7]]}}}],["changelog",{"_index":2,"t":{"2":{"position":[[23,10]]}}}],["changer",{"_index":2071,"t":{"583":{"position":[[174,8]]}}}],["char",{"_index":950,"t":{"101":{"position":[[402,5]]}}}],["charact",{"_index":749,"t":{"74":{"position":[[64,9]]},"246":{"position":[[32,10],[405,9]]},"637":{"position":[[174,10]]},"641":{"position":[[16,10],[100,10]]},"643":{"position":[[16,10],[104,10]]},"645":{"position":[[16,10],[105,10]]},"647":{"position":[[49,11],[204,11]]},"649":{"position":[[53,11],[182,10],[211,11]]},"651":{"position":[[54,11],[183,10],[213,11]]},"653":{"position":[[53,11],[182,10],[211,11]]},"655":{"position":[[56,11],[188,10],[220,11]]},"657":{"position":[[57,11]]},"663":{"position":[[127,10],[338,9]]},"669":{"position":[[77,11],[509,9],[1200,10]]}}}],["check",{"_index":352,"t":{"20":{"position":[[774,5],[1788,5],[3586,5]]},"80":{"position":[[17,5]]},"86":{"position":[[915,9]]},"94":{"position":[[563,5]]},"134":{"position":[[46,5]]},"244":{"position":[[238,5]]},"276":{"position":[[353,6]]},"290":{"position":[[39,5]]},"505":{"position":[[27,5]]},"507":{"position":[[45,5]]},"577":{"position":[[0,6],[53,6]]},"629":{"position":[[0,6]]},"647":{"position":[[0,6],[87,6]]},"649":{"position":[[0,6],[91,6]]},"651":{"position":[[0,6],[92,6]]},"653":{"position":[[0,6],[91,6]]},"655":{"position":[[0,6],[94,6]]},"657":{"position":[[0,6],[95,6]]},"665":{"position":[[0,6],[67,6],[91,5]]},"673":{"position":[[0,6],[65,6],[96,5]]},"675":{"position":[[0,6],[67,6],[98,5]]},"741":{"position":[[114,6]]},"747":{"position":[[0,6],[57,6]]},"749":{"position":[[0,6],[67,6],[89,5]]},"751":{"position":[[58,6],[103,8]]},"777":{"position":[[135,8]]}}}],["checkall(|x",{"_index":2408,"t":{"777":{"position":[[180,14],[278,14]]}}}],["cherri",{"_index":655,"t":{"50":{"position":[[105,6]]}}}],["child",{"_index":1676,"t":{"395":{"position":[[156,5],[223,6]]},"397":{"position":[[274,6],[471,8]]},"733":{"position":[[820,5]]}}}],["children",{"_index":1684,"t":{"397":{"position":[[417,12]]},"731":{"position":[[229,8],[298,8]]},"733":{"position":[[423,12],[555,12],[620,12],[969,12],[1244,12]]}}}],["choco",{"_index":1057,"t":{"124":{"position":[[67,5]]}}}],["chocolatey",{"_index":1056,"t":{"124":{"position":[[44,10]]}}}],["chunk",{"_index":831,"t":{"86":{"position":[[506,5]]},"365":{"position":[[495,5]]},"367":{"position":[[502,5]]},"369":{"position":[[614,5]]},"371":{"position":[[682,5]]},"373":{"position":[[507,5]]},"617":{"position":[[104,5]]},"619":{"position":[[9,5]]},"669":{"position":[[1291,5]]}}}],["ciphertext",{"_index":1814,"t":{"478":{"position":[[23,10]]},"480":{"position":[[132,10]]},"484":{"position":[[110,10]]},"488":{"position":[[339,10]]},"490":{"position":[[23,10]]},"497":{"position":[[23,10]]}}}],["circumst",{"_index":1487,"t":{"308":{"position":[[29,13]]}}}],["clang",{"_index":556,"t":{"34":{"position":[[395,5]]},"134":{"position":[[238,5],[271,5],[305,5],[406,6]]},"329":{"position":[[61,5]]}}}],["clarifi",{"_index":153,"t":{"10":{"position":[[329,10]]}}}],["class",{"_index":105,"t":{"8":{"position":[[173,5]]},"14":{"position":[[1017,5],[1041,5]]},"18":{"position":[[44,5]]},"20":{"position":[[552,5],[574,7],[1037,6],[2258,5],[2278,5]]},"30":{"position":[[395,5]]},"38":{"position":[[178,6],[596,5],[883,7],[996,7],[1015,6],[1761,8]]},"78":{"position":[[67,5]]},"82":{"position":[[537,6],[622,6]]},"88":{"position":[[276,8],[285,5]]},"163":{"position":[[89,5],[133,7],[194,5]]},"215":{"position":[[65,7],[84,5]]},"276":{"position":[[327,8]]},"278":{"position":[[4,5],[107,5],[274,5],[321,5],[340,5]]},"280":{"position":[[16,5],[107,5]]},"282":{"position":[[4,5],[69,5],[94,5]]},"284":{"position":[[170,5],[235,5]]},"286":{"position":[[108,5],[139,5]]},"288":{"position":[[163,5]]},"290":{"position":[[61,5],[97,8],[112,5],[129,5],[407,5]]},"292":{"position":[[94,5],[168,6]]},"343":{"position":[[64,5],[222,5]]},"493":{"position":[[298,5]]},"531":{"position":[[14,5]]},"677":{"position":[[14,5]]},"703":{"position":[[81,6]]}}}],["classic",{"_index":1557,"t":{"321":{"position":[[860,11]]}}}],["claus",{"_index":1276,"t":{"242":{"position":[[128,7]]}}}],["clean",{"_index":1594,"t":{"341":{"position":[[129,5]]}}}],["cleaner",{"_index":1309,"t":{"246":{"position":[[57,7]]},"315":{"position":[[382,7]]}}}],["clear",{"_index":2358,"t":{"743":{"position":[[61,6]]}}}],["cli",{"_index":276,"t":{"14":{"position":[[2248,4]]},"134":{"position":[[134,3]]}}}],["click",{"_index":911,"t":{"94":{"position":[[298,5]]},"136":{"position":[[153,5]]}}}],["client",{"_index":2113,"t":{"611":{"position":[[77,7],[250,6]]},"613":{"position":[[56,9]]},"627":{"position":[[20,6],[237,6]]},"629":{"position":[[31,6]]}}}],["clone",{"_index":918,"t":{"94":{"position":[[429,5]]},"132":{"position":[[109,5],[135,5]]},"136":{"position":[[27,7]]}}}],["close",{"_index":172,"t":{"12":{"position":[[390,7]]},"20":{"position":[[876,6]]},"50":{"position":[[203,5]]},"308":{"position":[[100,6]]},"535":{"position":[[1362,5]]},"539":{"position":[[0,6],[44,7]]},"617":{"position":[[222,7]]},"621":{"position":[[375,7]]},"623":{"position":[[0,6]]}}}],["close\\r\\n\\r\\n",{"_index":2150,"t":{"621":{"position":[[756,15]]}}}],["close\\r\\ncont",{"_index":2119,"t":{"611":{"position":[[447,16]]}}}],["coalesc",{"_index":111,"t":{"8":{"position":[[262,10],[316,10]]},"66":{"position":[[183,10]]},"242":{"position":[[736,10]]},"313":{"position":[[503,11]]},"315":{"position":[[8,10]]}}}],["code",{"_index":43,"t":{"4":{"position":[[406,4]]},"12":{"position":[[245,4],[750,4]]},"16":{"position":[[66,4]]},"18":{"position":[[120,4]]},"20":{"position":[[1837,4],[1941,5]]},"22":{"position":[[246,4]]},"26":{"position":[[69,5]]},"30":{"position":[[1043,4]]},"36":{"position":[[97,4]]},"42":{"position":[[233,4]]},"54":{"position":[[63,4]]},"60":{"position":[[173,5]]},"76":{"position":[[67,4]]},"88":{"position":[[130,4]]},"92":{"position":[[129,6],[517,4]]},"94":{"position":[[52,5]]},"101":{"position":[[341,5]]},"105":{"position":[[198,4]]},"113":{"position":[[20,5],[652,4]]},"119":{"position":[[92,4]]},"153":{"position":[[31,4],[167,4],[185,5],[242,4]]},"157":{"position":[[24,4]]},"159":{"position":[[24,4]]},"161":{"position":[[24,4],[218,5]]},"165":{"position":[[24,4]]},"173":{"position":[[93,4]]},"177":{"position":[[42,5]]},"179":{"position":[[74,4]]},"181":{"position":[[395,4]]},"185":{"position":[[20,4]]},"187":{"position":[[91,4],[238,4]]},"199":{"position":[[221,5]]},"203":{"position":[[204,4],[388,5],[401,4]]},"209":{"position":[[102,4],[222,4]]},"223":{"position":[[97,4],[226,4],[257,4]]},"246":{"position":[[293,4]]},"262":{"position":[[85,4]]},"264":{"position":[[71,4],[182,4]]},"266":{"position":[[100,4],[169,4]]},"272":{"position":[[74,4],[235,4]]},"315":{"position":[[406,5]]},"339":{"position":[[115,4],[308,4],[339,4]]},"486":{"position":[[135,4]]},"517":{"position":[[48,5]]},"535":{"position":[[1526,4]]},"583":{"position":[[80,4]]},"585":{"position":[[12,4]]},"587":{"position":[[12,4]]}}}],["codebas",{"_index":757,"t":{"76":{"position":[[182,10]]}}}],["codifi",{"_index":842,"t":{"86":{"position":[[780,6]]}}}],["colon",{"_index":1355,"t":{"256":{"position":[[360,5]]},"272":{"position":[[448,5]]},"393":{"position":[[95,6]]}}}],["color",{"_index":728,"t":{"72":{"position":[[81,5]]},"242":{"position":[[551,6],[591,6]]},"397":{"position":[[1115,6],[1139,6],[1231,7],[1271,7],[1300,7],[1346,7]]},"589":{"position":[[21,9],[147,7],[214,8]]}}}],["combat",{"_index":942,"t":{"101":{"position":[[153,6]]}}}],["combin",{"_index":257,"t":{"14":{"position":[[1842,8]]},"86":{"position":[[100,11]]},"239":{"position":[[333,8]]},"595":{"position":[[294,8]]}}}],["come",{"_index":1136,"t":{"153":{"position":[[247,5]]},"270":{"position":[[47,5]]}}}],["comma",{"_index":1403,"t":{"278":{"position":[[79,6]]}}}],["command",{"_index":904,"t":{"94":{"position":[[171,7]]},"134":{"position":[[204,9],[372,8]]},"138":{"position":[[28,8]]},"589":{"position":[[250,8]]}}}],["comment",{"_index":206,"t":{"14":{"position":[[441,8]]},"60":{"position":[[326,9]]},"82":{"position":[[106,7]]},"92":{"position":[[244,7],[302,9],[326,8]]},"175":{"position":[[237,7]]},"177":{"position":[[61,7]]}}}],["commit",{"_index":329,"t":{"18":{"position":[[641,6]]},"50":{"position":[[128,8]]}}}],["common",{"_index":695,"t":{"60":{"position":[[365,6]]},"288":{"position":[[10,6]]},"493":{"position":[[142,6]]}}}],["commonli",{"_index":1856,"t":{"495":{"position":[[164,9]]}}}],["compar",{"_index":1521,"t":{"319":{"position":[[95,7],[405,7]]},"333":{"position":[[264,8]]},"375":{"position":[[58,7],[279,7]]},"377":{"position":[[62,7],[283,7]]},"667":{"position":[[0,8],[86,8],[116,8]]},"707":{"position":[[38,8]]}}}],["comparevers",{"_index":418,"t":{"20":{"position":[[2789,15]]}}}],["comparison",{"_index":46,"t":{"4":{"position":[[432,11]]},"319":{"position":[[52,10]]},"521":{"position":[[21,10]]}}}],["compat",{"_index":78,"t":{"6":{"position":[[419,13]]},"8":{"position":[[352,10]]},"14":{"position":[[2297,13]]},"20":{"position":[[3438,14]]},"30":{"position":[[200,10],[1170,14]]},"32":{"position":[[35,10]]},"72":{"position":[[308,13]]},"76":{"position":[[38,10]]},"80":{"position":[[81,15]]},"82":{"position":[[170,10],[1307,13],[1434,14],[1516,13]]},"84":{"position":[[52,13],[160,13],[220,13]]},"88":{"position":[[99,10]]},"161":{"position":[[90,13]]},"163":{"position":[[57,13]]},"223":{"position":[[403,10]]},"229":{"position":[[267,10]]},"246":{"position":[[567,10]]},"276":{"position":[[294,13]]},"290":{"position":[[566,10]]},"313":{"position":[[420,13]]},"321":{"position":[[324,12]]},"329":{"position":[[45,10]]},"339":{"position":[[454,10],[548,10]]}}}],["compatibl",{"_index":1431,"t":{"292":{"position":[[58,12]]}}}],["compil",{"_index":40,"t":{"4":{"position":[[375,8]]},"6":{"position":[[179,7]]},"10":{"position":[[71,7]]},"14":{"position":[[732,7]]},"16":{"position":[[187,7]]},"20":{"position":[[1171,7]]},"30":{"position":[[360,7]]},"38":{"position":[[50,7],[96,7]]},"42":{"position":[[30,7]]},"44":{"position":[[29,7]]},"46":{"position":[[139,7]]},"72":{"position":[[6,7]]},"82":{"position":[[1335,8]]},"99":{"position":[[29,8]]},"103":{"position":[[490,7]]},"126":{"position":[[580,8]]},"132":{"position":[[10,7],[73,8]]},"134":{"position":[[386,8]]},"142":{"position":[[22,8]]},"147":{"position":[[388,7]]},"161":{"position":[[488,7]]},"163":{"position":[[438,7]]},"165":{"position":[[68,9],[435,7]]},"173":{"position":[[53,7]]},"175":{"position":[[129,11]]},"181":{"position":[[52,7],[109,7],[242,7],[301,8],[341,7],[481,7],[556,8]]},"183":{"position":[[0,7],[267,7],[370,7]]},"185":{"position":[[47,8],[115,7],[326,8]]},"262":{"position":[[181,9]]},"302":{"position":[[356,11]]},"304":{"position":[[482,9]]},"329":{"position":[[136,10],[215,7]]},"331":{"position":[[60,7]]},"337":{"position":[[52,7]]}}}],["complex",{"_index":349,"t":{"20":{"position":[[666,7]]},"595":{"position":[[136,7],[799,7]]}}}],["compon",{"_index":1995,"t":{"537":{"position":[[239,10]]}}}],["compos",{"_index":2179,"t":{"647":{"position":[[31,8]]},"649":{"position":[[31,8]]},"651":{"position":[[31,8]]},"653":{"position":[[31,8]]},"655":{"position":[[31,8]]},"657":{"position":[[34,8]]}}}],["compound",{"_index":190,"t":{"14":{"position":[[55,8]]},"66":{"position":[[207,8]]},"72":{"position":[[420,8]]},"74":{"position":[[109,8]]},"88":{"position":[[256,8]]},"313":{"position":[[14,8],[319,8],[564,8],[651,8]]},"315":{"position":[[651,8]]}}}],["comprehens",{"_index":325,"t":{"18":{"position":[[583,13]]}}}],["compromis",{"_index":1000,"t":{"107":{"position":[[880,10]]}}}],["comput",{"_index":2296,"t":{"711":{"position":[[0,8]]},"717":{"position":[[0,8]]},"771":{"position":[[37,8]]}}}],["concat",{"_index":59,"t":{"6":{"position":[[192,6]]},"14":{"position":[[745,6]]},"16":{"position":[[200,6]]},"20":{"position":[[1184,6]]},"515":{"position":[[804,10]]}}}],["concaten",{"_index":26,"t":{"4":{"position":[[226,13]]},"72":{"position":[[429,13]]},"248":{"position":[[55,14],[70,13],[606,14],[663,13]]},"313":{"position":[[480,14]]},"335":{"position":[[20,11]]}}}],["concern",{"_index":413,"t":{"20":{"position":[[2619,10]]}}}],["condit",{"_index":513,"t":{"30":{"position":[[373,12]]},"111":{"position":[[149,9],[203,9]]},"185":{"position":[[128,13]]},"244":{"position":[[105,13]]},"254":{"position":[[40,10]]},"256":{"position":[[309,10]]},"317":{"position":[[64,11],[472,10]]},"585":{"position":[[144,10]]},"661":{"position":[[479,11]]},"763":{"position":[[67,9]]}}}],["condition",{"_index":1347,"t":{"256":{"position":[[50,13]]}}}],["config",{"_index":833,"t":{"86":{"position":[[637,7]]},"99":{"position":[[109,7]]},"101":{"position":[[277,7]]},"105":{"position":[[167,7]]},"111":{"position":[[75,7]]},"329":{"position":[[457,7]]},"547":{"position":[[313,9],[361,9]]},"589":{"position":[[130,6]]}}}],["configur",{"_index":694,"t":{"60":{"position":[[310,10]]},"96":{"position":[[196,11]]},"103":{"position":[[470,10]]},"107":{"position":[[459,14],[583,11],[681,13],[755,9]]},"109":{"position":[[26,12]]},"111":{"position":[[237,13]]},"147":{"position":[[401,13]]},"161":{"position":[[501,13]]},"163":{"position":[[451,13]]},"165":{"position":[[448,13]]}}}],["confus",{"_index":565,"t":{"36":{"position":[[314,9]]}}}],["conjunct",{"_index":521,"t":{"30":{"position":[[814,11]]}}}],["connect",{"_index":1958,"t":{"535":{"position":[[665,11],[702,7],[1039,10],[1300,10],[2120,10]]},"537":{"position":[[24,10]]},"539":{"position":[[22,11]]},"607":{"position":[[18,11],[54,7]]},"621":{"position":[[680,13]]},"627":{"position":[[27,11],[244,11]]},"629":{"position":[[38,11]]}}}],["consid",{"_index":609,"t":{"38":{"position":[[1637,8]]},"157":{"position":[[298,8]]},"161":{"position":[[40,10]]},"480":{"position":[[55,10]]},"521":{"position":[[257,10]]},"535":{"position":[[1137,8]]},"763":{"position":[[151,8]]}}}],["consist",{"_index":1329,"t":{"250":{"position":[[14,8]]},"274":{"position":[[4,11]]},"306":{"position":[[60,10]]},"311":{"position":[[52,10]]},"493":{"position":[[217,11],[262,11]]},"669":{"position":[[258,7]]}}}],["const",{"_index":210,"t":{"14":{"position":[[598,5],[630,7]]},"20":{"position":[[309,7],[352,7],[392,6]]},"159":{"position":[[78,5],[177,5],[232,10]]},"183":{"position":[[154,5],[185,7],[304,7]]},"298":{"position":[[393,7]]},"478":{"position":[[422,7]]},"484":{"position":[[359,7]]},"490":{"position":[[433,7]]}}}],["constant",{"_index":164,"t":{"12":{"position":[[269,8]]},"14":{"position":[[1065,8]]},"38":{"position":[[63,9]]},"42":{"position":[[43,8]]},"44":{"position":[[42,8]]},"46":{"position":[[152,9]]},"50":{"position":[[327,8]]},"183":{"position":[[13,8],[280,9],[383,8]]},"298":{"position":[[326,8],[478,9]]},"337":{"position":[[65,10]]}}}],["constexpr",{"_index":211,"t":{"14":{"position":[[669,11]]},"38":{"position":[[6,11]]}}}],["constitu",{"_index":2265,"t":{"697":{"position":[[22,11]]}}}],["construct",{"_index":589,"t":{"38":{"position":[[848,17]]},"179":{"position":[[38,10]]},"531":{"position":[[136,12]]}}}],["constructor",{"_index":512,"t":{"30":{"position":[[332,11]]},"149":{"position":[[73,12]]},"278":{"position":[[42,12]]},"284":{"position":[[308,11]]},"679":{"position":[[4,11]]},"701":{"position":[[4,11]]}}}],["constructor/class",{"_index":591,"t":{"38":{"position":[[1159,17]]}}}],["consum",{"_index":541,"t":{"32":{"position":[[273,9]]}}}],["contact",{"_index":935,"t":{"96":{"position":[[282,7]]},"607":{"position":[[145,7]]}}}],["contain",{"_index":1,"t":{"2":{"position":[[10,8]]},"4":{"position":[[166,7]]},"248":{"position":[[511,7]]},"391":{"position":[[429,7]]},"509":{"position":[[31,10]]},"515":{"position":[[722,12]]},"559":{"position":[[177,10]]},"665":{"position":[[19,8]]},"723":{"position":[[233,8]]},"749":{"position":[[21,8]]}}}],["content",{"_index":650,"t":{"48":{"position":[[523,7]]},"375":{"position":[[252,8]]},"377":{"position":[[256,8]]},"535":{"position":[[393,9],[486,7]]},"567":{"position":[[20,9],[84,8],[230,8]]},"611":{"position":[[382,7]]},"671":{"position":[[294,7],[371,7]]}}}],["content..\"\\r\\n\\r\\n\"..cont",{"_index":2120,"t":{"611":{"position":[[472,33]]}}}],["context",{"_index":676,"t":{"54":{"position":[[155,8]]},"78":{"position":[[272,9]]}}}],["continu",{"_index":166,"t":{"12":{"position":[[300,8],[368,8],[413,8]]},"18":{"position":[[399,10]]},"50":{"position":[[296,12]]},"66":{"position":[[227,8]]},"68":{"position":[[21,8]]},"72":{"position":[[177,8]]},"78":{"position":[[49,8]]},"82":{"position":[[408,8],[459,9],[516,9],[601,9]]},"153":{"position":[[93,8],[271,10]]},"203":{"position":[[0,8],[139,9],[283,8],[308,8],[369,8],[450,10],[471,8]]},"205":{"position":[[245,8],[280,10],[395,8],[419,8],[441,8],[465,8]]},"207":{"position":[[46,9],[81,8]]},"343":{"position":[[384,8],[406,12]]},"757":{"position":[[54,10]]},"763":{"position":[[194,10]]}}}],["contmodonloadfil",{"_index":944,"t":{"101":{"position":[[232,17]]}}}],["contmodonloadfile(const",{"_index":949,"t":{"101":{"position":[[378,23]]}}}],["control",{"_index":907,"t":{"94":{"position":[[219,8]]},"107":{"position":[[187,7]]}}}],["conveni",{"_index":2111,"t":{"611":{"position":[[2,11]]}}}],["convert",{"_index":1326,"t":{"248":{"position":[[569,9]]},"563":{"position":[[0,7]]},"565":{"position":[[0,7]]}}}],["cooper",{"_index":2236,"t":{"677":{"position":[[91,11]]}}}],["coordin",{"_index":2318,"t":{"723":{"position":[[128,10]]}}}],["copi",{"_index":226,"t":{"14":{"position":[[1155,7]]},"24":{"position":[[187,7]]},"82":{"position":[[247,4],[788,4],[909,4],[1137,4]]},"86":{"position":[[322,4],[512,4],[1102,4]]},"101":{"position":[[482,4]]},"107":{"position":[[426,4],[506,4]]},"113":{"position":[[196,4],[607,4]]},"115":{"position":[[292,4],[457,4]]},"124":{"position":[[91,4]]},"126":{"position":[[395,4]]},"132":{"position":[[185,4]]},"134":{"position":[[339,4]]},"138":{"position":[[65,4]]},"140":{"position":[[153,4],[351,4]]},"145":{"position":[[129,4],[307,4]]},"147":{"position":[[107,4],[280,4]]},"149":{"position":[[155,4],[323,4]]},"151":{"position":[[137,4],[304,4]]},"153":{"position":[[127,4],[293,4]]},"155":{"position":[[131,4],[275,4]]},"157":{"position":[[116,4],[341,4]]},"159":{"position":[[89,4],[243,4]]},"161":{"position":[[149,4],[380,4]]},"163":{"position":[[105,4],[330,4]]},"165":{"position":[[126,4],[327,4]]},"167":{"position":[[155,4],[375,4],[600,4]]},"169":{"position":[[139,4],[294,4]]},"171":{"position":[[182,4],[319,4]]},"175":{"position":[[425,4],[627,4]]},"177":{"position":[[207,4]]},"181":{"position":[[310,4],[565,4]]},"183":{"position":[[96,4],[199,4],[398,4]]},"185":{"position":[[273,4]]},"187":{"position":[[228,4],[425,4]]},"191":{"position":[[57,4],[209,4],[250,4]]},"193":{"position":[[73,4],[230,4],[275,4]]},"195":{"position":[[203,4],[256,4]]},"197":{"position":[[150,4]]},"199":{"position":[[128,4],[183,4],[239,4]]},"201":{"position":[[141,4],[296,4]]},"203":{"position":[[333,4]]},"205":{"position":[[318,4],[495,4]]},"209":{"position":[[213,4],[295,4],[612,4]]},"213":{"position":[[156,4],[384,4],[498,4]]},"215":{"position":[[189,4]]},"217":{"position":[[233,4]]},"219":{"position":[[145,4]]},"223":{"position":[[216,4],[346,4]]},"225":{"position":[[188,4],[293,4],[572,4]]},"227":{"position":[[203,4],[673,4]]},"231":{"position":[[221,4],[374,4]]},"233":{"position":[[323,4]]},"235":{"position":[[355,4]]},"239":{"position":[[174,4],[311,4],[443,4]]},"242":{"position":[[296,4],[693,4]]},"244":{"position":[[178,4],[220,4],[403,4],[641,4]]},"246":{"position":[[396,4]]},"248":{"position":[[228,4],[389,4]]},"252":{"position":[[147,4],[366,4],[701,4],[893,4]]},"254":{"position":[[123,4],[262,4],[587,4]]},"256":{"position":[[262,4],[667,4]]},"262":{"position":[[139,4]]},"264":{"position":[[116,4],[229,4]]},"266":{"position":[[160,4],[206,4]]},"268":{"position":[[89,4],[219,4]]},"272":{"position":[[167,4],[316,4]]},"274":{"position":[[203,4]]},"276":{"position":[[258,4]]},"278":{"position":[[265,4]]},"280":{"position":[[165,4]]},"282":{"position":[[173,4]]},"284":{"position":[[554,4]]},"286":{"position":[[401,4]]},"288":{"position":[[384,4]]},"290":{"position":[[361,4],[484,4]]},"294":{"position":[[624,4]]},"298":{"position":[[301,4],[642,4],[919,4]]},"302":{"position":[[70,4],[277,4]]},"308":{"position":[[327,4]]},"313":{"position":[[554,4]]},"315":{"position":[[370,4],[629,4],[864,4]]},"317":{"position":[[201,4],[399,4],[537,4],[628,4]]},"319":{"position":[[231,4],[536,4]]},"321":{"position":[[610,4],[779,4]]},"323":{"position":[[174,4]]},"325":{"position":[[236,4]]},"327":{"position":[[227,4]]},"335":{"position":[[231,4]]},"339":{"position":[[211,4],[441,4]]},"341":{"position":[[124,4],[184,4]]},"343":{"position":[[253,4],[423,4]]},"353":{"position":[[239,4]]},"355":{"position":[[179,4]]},"357":{"position":[[306,4]]},"359":{"position":[[194,4]]},"363":{"position":[[469,4]]},"365":{"position":[[516,4]]},"367":{"position":[[523,4]]},"369":{"position":[[635,4]]},"371":{"position":[[703,4]]},"373":{"position":[[528,4]]},"375":{"position":[[970,4]]},"377":{"position":[[612,4]]},"379":{"position":[[369,4]]},"381":{"position":[[400,4]]},"383":{"position":[[385,4]]},"385":{"position":[[318,4]]},"387":{"position":[[492,4]]},"389":{"position":[[499,4]]},"391":{"position":[[987,4]]},"395":{"position":[[246,4]]},"397":{"position":[[553,4],[752,4],[1036,4],[1381,4]]},"401":{"position":[[210,4]]},"405":{"position":[[136,4]]},"407":{"position":[[140,4]]},"415":{"position":[[176,4]]},"417":{"position":[[162,4]]},"419":{"position":[[162,4]]},"421":{"position":[[154,4]]},"423":{"position":[[158,4]]},"428":{"position":[[212,4]]},"430":{"position":[[219,4]]},"432":{"position":[[252,4]]},"434":{"position":[[205,4]]},"436":{"position":[[207,4]]},"438":{"position":[[255,4]]},"440":{"position":[[252,4]]},"442":{"position":[[312,4]]},"444":{"position":[[260,4]]},"446":{"position":[[202,4]]},"448":{"position":[[259,4]]},"450":{"position":[[259,4]]},"452":{"position":[[259,4]]},"454":{"position":[[261,4]]},"456":{"position":[[216,4]]},"458":{"position":[[215,4]]},"460":{"position":[[216,4]]},"463":{"position":[[436,4]]},"465":{"position":[[514,4]]},"467":{"position":[[382,4]]},"469":{"position":[[414,4]]},"472":{"position":[[502,4]]},"478":{"position":[[732,4]]},"484":{"position":[[619,4]]},"490":{"position":[[809,4]]},"493":{"position":[[823,4]]},"497":{"position":[[1022,4]]},"501":{"position":[[1090,4]]},"509":{"position":[[359,4]]},"513":{"position":[[312,4]]},"515":{"position":[[311,4],[1047,4]]},"517":{"position":[[364,4],[482,4]]},"519":{"position":[[146,4]]},"521":{"position":[[193,4]]},"523":{"position":[[177,4]]},"531":{"position":[[321,4],[397,4]]},"535":{"position":[[2449,4]]},"537":{"position":[[620,4]]},"547":{"position":[[0,4],[129,4],[199,7],[375,4]]},"549":{"position":[[269,4]]},"551":{"position":[[237,4]]},"553":{"position":[[226,4]]},"555":{"position":[[234,4]]},"557":{"position":[[253,4]]},"559":{"position":[[264,4]]},"561":{"position":[[215,4]]},"563":{"position":[[323,4]]},"565":{"position":[[201,4]]},"567":{"position":[[361,4]]},"569":{"position":[[169,4]]},"571":{"position":[[376,4]]},"573":{"position":[[347,4]]},"577":{"position":[[214,4]]},"579":{"position":[[137,4]]},"585":{"position":[[63,4],[271,4]]},"587":{"position":[[66,4],[296,4]]},"593":{"position":[[480,4],[704,4],[893,4]]},"595":{"position":[[1279,4]]},"599":{"position":[[116,4]]},"611":{"position":[[523,4]]},"617":{"position":[[534,4]]},"619":{"position":[[350,4]]},"621":{"position":[[814,4]]},"629":{"position":[[365,4]]},"633":{"position":[[139,4]]},"635":{"position":[[143,4]]},"637":{"position":[[355,4],[619,4]]},"641":{"position":[[252,4]]},"643":{"position":[[260,4]]},"645":{"position":[[261,4]]},"647":{"position":[[160,4]]},"649":{"position":[[161,4]]},"651":{"position":[[162,4]]},"653":{"position":[[161,4]]},"655":{"position":[[167,4]]},"657":{"position":[[178,4]]},"661":{"position":[[839,4]]},"663":{"position":[[628,4]]},"665":{"position":[[175,4]]},"667":{"position":[[221,4]]},"669":{"position":[[1021,4],[1076,4],[1307,4]]},"671":{"position":[[561,4],[750,4]]},"673":{"position":[[181,4]]},"675":{"position":[[185,4]]},"685":{"position":[[608,4]]},"687":{"position":[[450,4]]},"689":{"position":[[426,4]]},"693":{"position":[[250,4]]},"695":{"position":[[220,4]]},"697":{"position":[[496,4]]},"701":{"position":[[267,4],[399,4]]},"705":{"position":[[325,4]]},"707":{"position":[[219,4]]},"709":{"position":[[245,4]]},"711":{"position":[[123,4]]},"713":{"position":[[129,4]]},"715":{"position":[[130,4]]},"717":{"position":[[158,4]]},"719":{"position":[[174,4]]},"721":{"position":[[179,4]]},"723":{"position":[[1013,4]]},"725":{"position":[[240,4]]},"727":{"position":[[469,4]]},"731":{"position":[[455,4]]},"733":{"position":[[709,4],[1030,4],[1378,4]]},"737":{"position":[[124,4]]},"739":{"position":[[0,7],[125,7]]},"741":{"position":[[188,4]]},"743":{"position":[[167,4]]},"745":{"position":[[218,4]]},"747":{"position":[[133,4]]},"749":{"position":[[325,4]]},"751":{"position":[[310,4]]},"753":{"position":[[488,4]]},"755":{"position":[[0,7],[128,7]]},"757":{"position":[[263,4]]},"759":{"position":[[0,7],[128,7]]},"761":{"position":[[329,4]]},"763":{"position":[[724,4]]},"765":{"position":[[0,7],[127,7]]},"767":{"position":[[495,4]]},"769":{"position":[[0,7],[124,7]]},"771":{"position":[[415,4]]},"773":{"position":[[120,4]]},"775":{"position":[[119,4]]},"777":{"position":[[360,4]]}}}],["coroutin",{"_index":506,"t":{"28":{"position":[[189,10]]},"525":{"position":[[51,9]]},"527":{"position":[[74,10]]},"529":{"position":[[19,9]]},"535":{"position":[[1779,10],[1889,9]]},"537":{"position":[[312,10]]},"539":{"position":[[200,10]]},"607":{"position":[[257,10]]},"611":{"position":[[103,9],[231,9]]},"617":{"position":[[346,10]]},"621":{"position":[[468,10]]},"627":{"position":[[368,10]]},"677":{"position":[[75,9]]},"681":{"position":[[53,10],[68,9]]},"685":{"position":[[66,10],[123,10],[151,9]]},"689":{"position":[[121,11],[176,9]]}}}],["coroutine.clos",{"_index":666,"t":{"50":{"position":[[396,15]]}}}],["coroutine.cr",{"_index":1890,"t":{"513":{"position":[[139,19]]}}}],["coroutine.resum",{"_index":1940,"t":{"527":{"position":[[18,16]]}}}],["coroutine.resume(c",{"_index":1897,"t":{"513":{"position":[[292,19]]}}}],["coroutine.sleep",{"_index":240,"t":{"14":{"position":[[1440,15]]}}}],["coroutine.sleep(1000",{"_index":2249,"t":{"685":{"position":[[441,21],[477,21],[513,21]]}}}],["coroutine.xresum",{"_index":536,"t":{"30":{"position":[[1347,17]]},"689":{"position":[[211,19]]}}}],["coroutine.yield",{"_index":989,"t":{"107":{"position":[[543,15]]}}}],["coroutines/thread",{"_index":262,"t":{"14":{"position":[[1992,18]]},"513":{"position":[[11,18]]}}}],["correct",{"_index":988,"t":{"107":{"position":[[451,7]]}}}],["correspond",{"_index":785,"t":{"82":{"position":[[374,11],[425,11],[482,11],[567,11]]},"501":{"position":[[101,13]]}}}],["corrupt",{"_index":122,"t":{"8":{"position":[[567,10]]},"12":{"position":[[682,7]]},"22":{"position":[[251,10]]}}}],["cosmet",{"_index":1368,"t":{"262":{"position":[[210,9]]}}}],["count",{"_index":2355,"t":{"741":{"position":[[45,8]]}}}],["counterpart",{"_index":1486,"t":{"306":{"position":[[130,13]]},"313":{"position":[[660,13]]},"521":{"position":[[296,13]]}}}],["cover",{"_index":1123,"t":{"147":{"position":[[501,6]]}}}],["coverag",{"_index":1001,"t":{"107":{"position":[[904,9]]},"239":{"position":[[465,8]]},"304":{"position":[[520,9]]}}}],["cpp",{"_index":946,"t":{"101":{"position":[[358,3]]}}}],["cr",{"_index":20,"t":{"4":{"position":[[174,2]]}}}],["crc32",{"_index":1741,"t":{"442":{"position":[[24,5]]}}}],["creat",{"_index":524,"t":{"30":{"position":[[928,8]]},"38":{"position":[[785,8]]},"145":{"position":[[35,7]]},"147":{"position":[[35,7]]},"169":{"position":[[263,8]]},"201":{"position":[[265,8]]},"298":{"position":[[315,8]]},"547":{"position":[[29,8],[296,7],[345,6]]},"557":{"position":[[0,6],[128,8],[225,6]]},"561":{"position":[[0,7],[165,7]]},"609":{"position":[[0,7]]},"705":{"position":[[120,6]]}}}],["creation",{"_index":711,"t":{"66":{"position":[[26,9]]},"169":{"position":[[183,8]]},"201":{"position":[[185,8]]}}}],["criteria",{"_index":2214,"t":{"669":{"position":[[649,9]]}}}],["crypto",{"_index":1178,"t":{"181":{"position":[[653,6]]},"428":{"position":[[127,6]]},"430":{"position":[[110,6]]},"432":{"position":[[167,6]]},"434":{"position":[[110,6]]},"436":{"position":[[111,6]]},"438":{"position":[[168,6]]},"440":{"position":[[167,6]]},"442":{"position":[[226,6]]},"444":{"position":[[172,6]]},"446":{"position":[[113,6]]},"448":{"position":[[170,6]]},"450":{"position":[[170,6]]},"452":{"position":[[170,6]]},"454":{"position":[[171,6]]},"456":{"position":[[115,6]]},"458":{"position":[[115,6]]},"460":{"position":[[120,6]]},"463":{"position":[[213,6]]},"465":{"position":[[215,6]]},"467":{"position":[[215,6]]},"469":{"position":[[215,6]]},"472":{"position":[[441,6]]},"478":{"position":[[380,6]]},"484":{"position":[[317,6]]},"490":{"position":[[391,6]]},"497":{"position":[[283,6]]},"501":{"position":[[308,6]]},"617":{"position":[[166,6]]},"621":{"position":[[24,6]]}}}],["crypto.adler32",{"_index":249,"t":{"14":{"position":[[1661,14]]}}}],["crypto.decrypt",{"_index":243,"t":{"14":{"position":[[1526,14]]}}}],["crypto.decrypt|\"rsa",{"_index":1867,"t":{"497":{"position":[[933,19]]}}}],["crypto.encrypt",{"_index":242,"t":{"14":{"position":[[1509,14]]}}}],["crypto.encrypt(\"a",{"_index":1863,"t":{"497":{"position":[[797,17]]}}}],["crypto.encrypt|\"a",{"_index":1822,"t":{"478":{"position":[[589,19]]},"484":{"position":[[450,19]]},"490":{"position":[[637,19]]}}}],["crypto.fnv1",{"_index":272,"t":{"14":{"position":[[2172,11]]}}}],["crypto.fnv1a",{"_index":273,"t":{"14":{"position":[[2186,12]]}}}],["crypto.generatekeypair",{"_index":241,"t":{"14":{"position":[[1471,22]]}}}],["crypto.generatekeypair(\"rsa",{"_index":1847,"t":{"493":{"position":[[352,29]]}}}],["crypto.hexdigest",{"_index":442,"t":{"20":{"position":[[3340,16]]}}}],["crypto.joaat(\"hello",{"_index":1170,"t":{"181":{"position":[[252,21]]}}}],["crypto.random",{"_index":1788,"t":{"472":{"position":[[4,13]]}}}],["crypto.sha1",{"_index":246,"t":{"14":{"position":[[1601,12]]}}}],["crypto.sha384",{"_index":247,"t":{"14":{"position":[[1614,14]]}}}],["crypto.sha512",{"_index":248,"t":{"14":{"position":[[1631,13]]}}}],["crypto.sign",{"_index":244,"t":{"14":{"position":[[1557,11]]}}}],["crypto.sign|\"rsa",{"_index":1876,"t":{"501":{"position":[[870,16]]}}}],["crypto.verifi",{"_index":245,"t":{"14":{"position":[[1571,13]]}}}],["cryptograph",{"_index":690,"t":{"60":{"position":[[126,13]]},"428":{"position":[[50,13]]},"430":{"position":[[33,13]]},"432":{"position":[[33,13]]},"434":{"position":[[33,13]]},"436":{"position":[[34,13]]},"438":{"position":[[34,13]]},"440":{"position":[[33,13]]},"442":{"position":[[34,13]]},"444":{"position":[[37,13]]},"446":{"position":[[36,13]]},"448":{"position":[[36,13]]},"450":{"position":[[36,13]]},"452":{"position":[[36,13]]},"454":{"position":[[37,13]]},"456":{"position":[[38,13]]},"458":{"position":[[38,13]]},"460":{"position":[[43,13]]},"463":{"position":[[30,13]]},"465":{"position":[[32,13]]},"467":{"position":[[32,13]]},"469":{"position":[[32,13]]},"472":{"position":[[163,17],[280,17]]}}}],["ctrl+(shift+)b",{"_index":891,"t":{"92":{"position":[[464,14]]}}}],["ctrl+shift+p",{"_index":894,"t":{"92":{"position":[[498,12]]},"94":{"position":[[187,15]]}}}],["cucumb",{"_index":1441,"t":{"294":{"position":[[265,11]]}}}],["current",{"_index":517,"t":{"30":{"position":[[496,10],[555,10]]},"115":{"position":[[167,7]]},"203":{"position":[[78,7]]},"205":{"position":[[187,7]]},"239":{"position":[[477,9]]},"298":{"position":[[34,7]]},"505":{"position":[[38,7]]},"529":{"position":[[11,7]]},"573":{"position":[[15,7],[76,7],[233,7]]},"723":{"position":[[62,7]]},"725":{"position":[[61,7]]},"727":{"position":[[62,7]]}}}],["custom",{"_index":1012,"t":{"111":{"position":[[142,6]]},"687":{"position":[[61,9]]},"689":{"position":[[71,9]]}}}],["cve",{"_index":22,"t":{"4":{"position":[[184,4]]},"8":{"position":[[713,4]]}}}],["cwd",{"_index":2055,"t":{"573":{"position":[[272,3],[301,3],[343,3]]}}}],["d",{"_index":1316,"t":{"246":{"position":[[392,3]]},"589":{"position":[[320,2]]}}}],["danger",{"_index":963,"t":{"103":{"position":[[364,9]]}}}],["data",{"_index":121,"t":{"8":{"position":[[562,4],[612,4]]},"248":{"position":[[128,4],[298,4]]},"321":{"position":[[39,4]]},"347":{"position":[[46,4],[65,4]]},"349":{"position":[[45,4],[71,4]]},"353":{"position":[[45,4],[64,4]]},"355":{"position":[[45,4],[71,5]]},"357":{"position":[[110,4],[129,4]]},"359":{"position":[[59,4],[85,5]]},"395":{"position":[[37,4]]},"397":{"position":[[37,5],[55,4],[70,4],[122,4],[236,4]]},"463":{"position":[[132,5]]},"465":{"position":[[134,5]]},"467":{"position":[[134,5]]},"469":{"position":[[134,5]]},"476":{"position":[[12,4],[23,4]]},"478":{"position":[[12,4],[305,4]]},"482":{"position":[[12,4],[23,4]]},"484":{"position":[[99,4],[242,4]]},"486":{"position":[[50,4]]},"488":{"position":[[12,4],[23,4],[102,5],[167,5]]},"490":{"position":[[12,4],[95,5],[307,4]]},"495":{"position":[[12,4],[23,4],[206,5]]},"497":{"position":[[12,4],[172,4]]},"499":{"position":[[12,4],[23,4]]},"501":{"position":[[12,4],[23,4]]},"517":{"position":[[170,4]]},"593":{"position":[[38,4],[220,4],[225,4],[299,4]]},"595":{"position":[[193,4],[209,4],[543,4],[613,5],[650,4],[756,5],[812,4]]},"615":{"position":[[6,4],[61,4]]},"617":{"position":[[8,4],[113,4]]},"619":{"position":[[18,4],[146,4]]},"621":{"position":[[778,4]]},"731":{"position":[[37,4]]},"733":{"position":[[37,5],[55,4],[70,4],[127,5]]},"763":{"position":[[523,4],[621,4]]},"767":{"position":[[284,4],[385,4]]}}}],["data.valu",{"_index":1323,"t":{"248":{"position":[[185,11],[343,14]]}}}],["data:filter(|k",{"_index":2384,"t":{"763":{"position":[[646,15]]}}}],["data:filter(|v",{"_index":2382,"t":{"763":{"position":[[548,15]]}}}],["data:split",{"_index":2389,"t":{"767":{"position":[[302,12],[403,12]]}}}],["db890233a919b6745d632633c419e14540ff79f1a89bc4ac194b00e7f913f0f06d5d4d7d6cc2b4aaf9485d223afb8cf0",{"_index":1784,"t":{"467":{"position":[[282,99]]}}}],["deal",{"_index":1832,"t":{"488":{"position":[[83,4]]}}}],["deb",{"_index":1071,"t":{"126":{"position":[[172,4]]}}}],["debian",{"_index":1081,"t":{"126":{"position":[[592,6],[635,6]]},"134":{"position":[[141,6]]}}}],["debug",{"_index":1183,"t":{"185":{"position":[[90,5],[156,5],[173,5],[209,5]]},"298":{"position":[[691,5]]},"300":{"position":[[107,5]]},"515":{"position":[[2,5]]}}}],["debug.getlocal(1",{"_index":1470,"t":{"298":{"position":[[744,17]]}}}],["debug.setlocal(1",{"_index":1471,"t":{"298":{"position":[[790,17]]}}}],["decid",{"_index":2381,"t":{"763":{"position":[[280,8]]}}}],["decim",{"_index":1697,"t":{"401":{"position":[[104,7]]},"403":{"position":[[91,8]]}}}],["deciph",{"_index":1043,"t":{"113":{"position":[[629,11]]}}}],["declar",{"_index":515,"t":{"30":{"position":[[446,11]]},"50":{"position":[[83,12]]},"72":{"position":[[48,12]]},"145":{"position":[[173,11],[275,11]]},"147":{"position":[[152,11]]},"149":{"position":[[38,8]]},"169":{"position":[[67,8]]},"171":{"position":[[51,8],[246,8]]},"183":{"position":[[136,8]]},"187":{"position":[[18,12],[50,7]]},"199":{"position":[[54,7]]},"201":{"position":[[91,8]]},"239":{"position":[[17,8],[238,8]]},"248":{"position":[[431,7]]},"274":{"position":[[72,7]]}}}],["decod",{"_index":259,"t":{"14":{"position":[[1888,6]]},"20":{"position":[[2234,7]]},"349":{"position":[[10,7],[79,7]]},"355":{"position":[[10,7]]},"393":{"position":[[78,8]]},"397":{"position":[[78,7]]},"595":{"position":[[217,7],[355,7],[461,7],[628,7],[707,7],[903,7],[1099,7]]},"695":{"position":[[32,8],[88,8]]},"733":{"position":[[78,7]]}}}],["decrypt",{"_index":1815,"t":{"478":{"position":[[37,8],[295,9],[653,7]]},"484":{"position":[[124,8],[232,9],[544,7]]},"490":{"position":[[37,8],[297,9],[723,7]]},"497":{"position":[[37,8],[241,7],[912,7]]}}}],["deepli",{"_index":722,"t":{"66":{"position":[[392,6]]},"242":{"position":[[10,6]]}}}],["default",{"_index":70,"t":{"6":{"position":[[305,7]]},"14":{"position":[[865,7],[2035,7],[2101,7],[2448,7]]},"20":{"position":[[457,7]]},"32":{"position":[[0,8],[61,7]]},"36":{"position":[[141,7],[199,9]]},"40":{"position":[[0,7],[195,7],[278,7]]},"42":{"position":[[0,7]]},"48":{"position":[[251,7],[319,10]]},"54":{"position":[[164,8]]},"60":{"position":[[27,7],[631,7]]},"105":{"position":[[178,8]]},"111":{"position":[[190,8]]},"113":{"position":[[128,8]]},"115":{"position":[[122,7]]},"147":{"position":[[343,8],[552,8]]},"161":{"position":[[443,8]]},"163":{"position":[[393,8]]},"165":{"position":[[390,8]]},"187":{"position":[[68,7]]},"205":{"position":[[135,7]]},"225":{"position":[[666,7]]},"233":{"position":[[386,7]]},"250":{"position":[[66,7]]},"252":{"position":[[298,8],[710,7],[845,8],[902,7]]},"256":{"position":[[213,7],[687,7],[757,7]]},"329":{"position":[[177,7]]},"347":{"position":[[120,8]]},"353":{"position":[[119,8]]},"357":{"position":[[184,8]]},"397":{"position":[[181,10],[567,7]]},"442":{"position":[[134,8]]},"444":{"position":[[137,8]]},"463":{"position":[[177,8]]},"465":{"position":[[179,8]]},"467":{"position":[[179,8]]},"469":{"position":[[179,8]]},"472":{"position":[[56,7]]},"513":{"position":[[49,8],[101,8]]},"535":{"position":[[340,8]]},"589":{"position":[[52,8]]},"593":{"position":[[160,8]]},"595":{"position":[[324,8]]},"641":{"position":[[121,8]]},"643":{"position":[[125,8]]},"645":{"position":[[126,8]]},"661":{"position":[[306,7]]},"663":{"position":[[408,8]]},"671":{"position":[[198,8]]},"687":{"position":[[107,8]]},"689":{"position":[[136,8]]},"723":{"position":[[150,8]]},"731":{"position":[[139,8]]},"733":{"position":[[154,10]]}}}],["defer",{"_index":1416,"t":{"284":{"position":[[666,5]]}}}],["defin",{"_index":189,"t":{"14":{"position":[[6,7],[641,7],[704,7]]},"34":{"position":[[112,7]]},"38":{"position":[[1646,8]]},"86":{"position":[[557,8]]},"99":{"position":[[50,8]]},"101":{"position":[[302,6]]},"103":{"position":[[35,7]]},"105":{"position":[[114,8]]},"107":{"position":[[633,8]]},"111":{"position":[[26,8]]},"147":{"position":[[435,6]]},"161":{"position":[[535,6]]},"163":{"position":[[485,6]]},"165":{"position":[[482,6]]},"183":{"position":[[39,7],[55,7],[80,7],[213,7],[317,7]]},"185":{"position":[[148,7]]},"284":{"position":[[277,6]]},"286":{"position":[[119,7]]},"329":{"position":[[401,6]]},"589":{"position":[[61,6]]}}}],["definit",{"_index":592,"t":{"38":{"position":[[1177,10]]},"147":{"position":[[258,10]]},"587":{"position":[[137,10]]}}}],["deflat",{"_index":1551,"t":{"321":{"position":[[489,9]]}}}],["delimit",{"_index":161,"t":{"12":{"position":[[200,7]]},"24":{"position":[[409,10]]},"64":{"position":[[98,10]]},"256":{"position":[[320,9]]},"304":{"position":[[201,7]]},"585":{"position":[[136,7]]}}}],["demonstr",{"_index":2396,"t":{"767":{"position":[[722,13]]}}}],["depend",{"_index":898,"t":{"94":{"position":[[25,7]]},"329":{"position":[[229,9]]}}}],["deprec",{"_index":156,"t":{"12":{"position":[[52,10]]},"14":{"position":[[503,10],[542,10],[587,10],[658,10]]},"20":{"position":[[3116,10],[3199,10],[3281,10],[3329,10]]},"38":{"position":[[457,10]]},"48":{"position":[[259,10],[361,10]]}}}],["deprecated/remov",{"_index":2376,"t":{"761":{"position":[[69,18]]}}}],["depth",{"_index":779,"t":{"80":{"position":[[312,5]]}}}],["deriv",{"_index":1859,"t":{"497":{"position":[[527,6]]},"501":{"position":[[552,6]]}}}],["design",{"_index":870,"t":{"90":{"position":[[203,6],[279,6]]},"319":{"position":[[378,8]]},"515":{"position":[[17,8]]}}}],["desir",{"_index":860,"t":{"88":{"position":[[212,7]]},"567":{"position":[[76,7]]},"571":{"position":[[85,7]]},"573":{"position":[[68,7]]},"663":{"position":[[65,7],[236,7]]}}}],["despit",{"_index":381,"t":{"20":{"position":[[1899,7]]},"256":{"position":[[388,7]]},"268":{"position":[[251,7]]}}}],["destructur",{"_index":507,"t":{"30":{"position":[[12,13],[86,13]]},"189":{"position":[[0,13]]},"197":{"position":[[6,13]]}}}],["detail",{"_index":394,"t":{"20":{"position":[[2198,7]]},"30":{"position":[[1407,8]]},"38":{"position":[[1916,8]]},"60":{"position":[[444,6]]},"515":{"position":[[249,11],[269,7],[984,11],[1021,7]]},"517":{"position":[[300,11],[320,7],[408,11],[434,7]]}}}],["detect",{"_index":368,"t":{"20":{"position":[[1381,9]]},"107":{"position":[[10,6]]},"509":{"position":[[178,8],[227,8]]}}}],["determin",{"_index":1208,"t":{"203":{"position":[[428,9]]},"723":{"position":[[211,10]]}}}],["dev",{"_index":1935,"t":{"521":{"position":[[181,5],[241,3]]}}}],["dev/nul",{"_index":1069,"t":{"126":{"position":[[157,9],[346,9]]}}}],["dev/urandom",{"_index":1790,"t":{"472":{"position":[[102,13]]}}}],["develop",{"_index":794,"t":{"82":{"position":[[1153,10]]},"86":{"position":[[76,11]]},"126":{"position":[[495,10]]},"128":{"position":[[158,10]]},"130":{"position":[[103,11]]}}}],["deviat",{"_index":873,"t":{"90":{"position":[[258,9]]}}}],["di",{"_index":1407,"t":{"278":{"position":[[204,4]]}}}],["dialog",{"_index":1108,"t":{"136":{"position":[[139,7]]}}}],["differ",{"_index":1150,"t":{"163":{"position":[[246,9]]},"292":{"position":[[41,9]]}}}],["difficult",{"_index":1481,"t":{"304":{"position":[[445,9]]}}}],["digit",{"_index":1774,"t":{"463":{"position":[[166,7]]},"465":{"position":[[168,7]]},"467":{"position":[[168,7]]},"469":{"position":[[168,7]]},"669":{"position":[[276,7],[556,5]]}}}],["dir/main",{"_index":2014,"t":{"551":{"position":[[127,13]]}}}],["direct",{"_index":522,"t":{"30":{"position":[[889,6]]},"723":{"position":[[39,9]]},"727":{"position":[[10,9]]}}}],["directli",{"_index":890,"t":{"92":{"position":[[435,8]]},"119":{"position":[[97,8]]}}}],["directori",{"_index":643,"t":{"48":{"position":[[238,9]]},"134":{"position":[[543,10]]},"136":{"position":[[227,10]]},"138":{"position":[[147,10]]},"140":{"position":[[72,10],[198,10],[367,9]]},"551":{"position":[[97,10],[220,12]]},"555":{"position":[[116,10]]},"557":{"position":[[9,10],[53,10],[101,9],[190,12],[236,12]]},"559":{"position":[[28,10],[72,10],[134,12]]},"561":{"position":[[10,9],[52,11],[124,10]]},"573":{"position":[[31,10],[92,10],[249,10]]}}}],["disabl",{"_index":358,"t":{"20":{"position":[[967,8],[3676,8],[3860,8]]},"80":{"position":[[190,7]]},"82":{"position":[[154,7]]},"84":{"position":[[242,9]]},"86":{"position":[[533,7]]},"99":{"position":[[8,7]]},"163":{"position":[[284,7]]},"175":{"position":[[24,10],[344,7],[597,7]]},"177":{"position":[[3,7],[113,7],[170,7]]},"589":{"position":[[40,8]]}}}],["disable/en",{"_index":628,"t":{"42":{"position":[[338,14]]}}}],["disallow",{"_index":151,"t":{"10":{"position":[[310,11]]},"58":{"position":[[115,10]]},"298":{"position":[[165,11]]}}}],["discard",{"_index":198,"t":{"14":{"position":[[251,10]]},"171":{"position":[[76,10],[210,10],[269,10]]},"239":{"position":[[93,10],[202,10],[261,10]]}}}],["discuss",{"_index":1430,"t":{"292":{"position":[[19,9]]}}}],["dispatch",{"_index":1980,"t":{"535":{"position":[[1965,11]]}}}],["disregard",{"_index":502,"t":{"28":{"position":[[93,12]]}}}],["dissect",{"_index":2266,"t":{"697":{"position":[[67,10]]}}}],["divis",{"_index":1503,"t":{"313":{"position":[[111,9],[132,9]]},"415":{"position":[[9,8]]},"417":{"position":[[9,8]]}}}],["divison",{"_index":1710,"t":{"419":{"position":[[9,7]]}}}],["djb2",{"_index":1717,"t":{"428":{"position":[[41,4]]},"432":{"position":[[24,4]]}}}],["dll/so",{"_index":958,"t":{"103":{"position":[[88,6]]}}}],["dll/so/c",{"_index":461,"t":{"20":{"position":[[3873,8]]}}}],["do",{"_index":1810,"t":{"476":{"position":[[157,6]]},"478":{"position":[[158,6]]},"482":{"position":[[125,6]]},"484":{"position":[[92,6]]},"495":{"position":[[117,6]]},"497":{"position":[[118,6]]},"637":{"position":[[231,7],[339,8],[603,8]]}}}],["do...end",{"_index":1243,"t":{"225":{"position":[[476,9]]}}}],["document",{"_index":466,"t":{"20":{"position":[[3977,14]]},"30":{"position":[[1416,13]]},"38":{"position":[[1925,13]]},"66":{"position":[[608,13]]},"96":{"position":[[130,10]]},"117":{"position":[[5,8]]},"132":{"position":[[233,10]]},"503":{"position":[[10,9]]},"525":{"position":[[10,9]]},"541":{"position":[[10,9]]},"575":{"position":[[10,9]]},"597":{"position":[[10,9]]},"631":{"position":[[10,9]]},"735":{"position":[[10,9]]}}}],["doe",{"_index":1903,"t":{"515":{"position":[[242,6],[343,6]]},"517":{"position":[[293,6],[473,6]]}}}],["doesn't",{"_index":1131,"t":{"151":{"position":[[46,7]]},"203":{"position":[[480,7]]},"308":{"position":[[3,7]]}}}],["dofil",{"_index":632,"t":{"44":{"position":[[95,7]]},"101":{"position":[[94,6]]}}}],["domain",{"_index":2108,"t":{"607":{"position":[[103,6]]}}}],["don't",{"_index":1006,"t":{"107":{"position":[[1127,5]]},"284":{"position":[[271,5]]},"308":{"position":[[347,5]]},"375":{"position":[[186,5]]},"377":{"position":[[190,5]]}}}],["done",{"_index":2380,"t":{"763":{"position":[[117,4]]}}}],["dont_make_reus",{"_index":1972,"t":{"535":{"position":[[1231,19]]}}}],["dont_reus",{"_index":1964,"t":{"535":{"position":[[888,11]]}}}],["dot",{"_index":2306,"t":{"717":{"position":[[13,3]]}}}],["down",{"_index":930,"t":{"96":{"position":[[77,4]]},"723":{"position":[[490,4]]}}}],["download",{"_index":916,"t":{"94":{"position":[[407,11]]}}}],["dozen",{"_index":858,"t":{"88":{"position":[[199,5]]}}}],["drop",{"_index":756,"t":{"76":{"position":[[109,4]]}}}],["due",{"_index":316,"t":{"18":{"position":[[392,3]]},"42":{"position":[[400,3]]},"52":{"position":[[134,3]]},"107":{"position":[[390,3]]},"161":{"position":[[83,3]]},"163":{"position":[[50,3]]},"292":{"position":[[51,3]]},"535":{"position":[[2055,3]]}}}],["dump",{"_index":32,"t":{"4":{"position":[[309,7]]},"60":{"position":[[398,7]]},"70":{"position":[[9,4]]},"111":{"position":[[3,4],[171,4],[266,5]]},"515":{"position":[[29,4],[95,5]]},"517":{"position":[[138,5]]}}}],["dumpvar",{"_index":305,"t":{"18":{"position":[[211,7]]},"20":{"position":[[2290,7]]},"321":{"position":[[176,7]]},"517":{"position":[[11,8]]}}}],["duplic",{"_index":654,"t":{"50":{"position":[[66,10]]},"72":{"position":[[32,9]]},"145":{"position":[[157,9]]},"147":{"position":[[135,9]]},"149":{"position":[[183,9]]}}}],["dure",{"_index":1159,"t":{"173":{"position":[[46,6]]},"187":{"position":[[0,6]]},"302":{"position":[[345,6]]},"331":{"position":[[53,6]]}}}],["dynam",{"_index":1586,"t":{"337":{"position":[[191,7]]}}}],["e",{"_index":1423,"t":{"290":{"position":[[166,1],[430,1]]},"294":{"position":[[416,1]]},"493":{"position":[[238,3],[586,5]]},"497":{"position":[[739,1]]},"501":{"position":[[764,1]]},"531":{"position":[[236,1]]}}}],["e.g",{"_index":202,"t":{"14":{"position":[[362,5]]},"20":{"position":[[95,4],[2046,4]]},"30":{"position":[[763,4],[937,4]]},"92":{"position":[[201,4]]},"175":{"position":[[497,4]]},"280":{"position":[[52,4]]},"304":{"position":[[124,4],[223,4],[333,4]]},"319":{"position":[[424,4]]},"521":{"position":[[229,5]]},"535":{"position":[[386,4]]}}}],["e:find(\"what",{"_index":1446,"t":{"294":{"position":[[426,12]]}}}],["each",{"_index":27,"t":{"4":{"position":[[245,4]]},"173":{"position":[[13,4]]},"191":{"position":[[90,4]]},"193":{"position":[[106,4]]},"474":{"position":[[103,4]]},"513":{"position":[[70,4]]},"611":{"position":[[245,4]]},"669":{"position":[[551,4]]},"707":{"position":[[50,4]]},"719":{"position":[[36,4]]},"751":{"position":[[112,4]]},"777":{"position":[[144,4]]}}}],["earlier",{"_index":1130,"t":{"149":{"position":[[315,7]]}}}],["eas",{"_index":1686,"t":{"397":{"position":[[646,4]]},"531":{"position":[[123,4]]},"733":{"position":[[718,4]]}}}],["easi",{"_index":1395,"t":{"276":{"position":[[14,4]]}}}],["easier",{"_index":1943,"t":{"531":{"position":[[33,6]]},"567":{"position":[[392,6]]},"669":{"position":[[31,6]]}}}],["easiest",{"_index":1050,"t":{"119":{"position":[[4,7]]}}}],["easili",{"_index":1055,"t":{"124":{"position":[[8,6]]},"126":{"position":[[8,6]]},"134":{"position":[[352,6]]},"677":{"position":[[61,6]]}}}],["ecb",{"_index":1827,"t":{"482":{"position":[[57,3],[96,4]]},"484":{"position":[[24,3],[63,4],[470,3],[583,3]]}}}],["echo",{"_index":1070,"t":{"126":{"position":[[167,4]]}}}],["ecosystem",{"_index":837,"t":{"86":{"position":[[700,9]]}}}],["edg",{"_index":631,"t":{"42":{"position":[[415,4]]}}}],["edit",{"_index":1458,"t":{"298":{"position":[[181,5]]},"333":{"position":[[124,4]]}}}],["editor",{"_index":883,"t":{"92":{"position":[[270,6],[359,6],[452,6]]},"94":{"position":[[41,7],[501,6],[536,6]]}}}],["ee8410a8bf9511b94fd6669b5c3e0c4b86e8e4bf7baa8dbd2773d4d6381dd1aecebbe391bef4c6158620ab3f6b794907652d4432c2301d7e1a6caf520565cdf2",{"_index":1787,"t":{"469":{"position":[[282,131]]}}}],["effect",{"_index":1476,"t":{"302":{"position":[[293,6]]},"661":{"position":[[323,11]]}}}],["effortlessli",{"_index":2288,"t":{"707":{"position":[[22,12]]}}}],["element",{"_index":1250,"t":{"227":{"position":[[289,8],[443,7],[494,7],[630,7]]},"733":{"position":[[1062,8],[1080,7]]},"741":{"position":[[22,8]]},"743":{"position":[[11,8]]},"749":{"position":[[33,8],[78,7]]},"751":{"position":[[13,7],[117,8],[139,7]]},"753":{"position":[[19,8]]},"761":{"position":[[155,8]]},"777":{"position":[[36,9],[149,8]]}}}],["elimin",{"_index":956,"t":{"103":{"position":[[54,9]]},"763":{"position":[[102,11],[377,11]]}}}],["elipsi",{"_index":2202,"t":{"663":{"position":[[54,7],[187,8]]}}}],["emit",{"_index":637,"t":{"46":{"position":[[234,8]]},"302":{"position":[[234,4]]},"585":{"position":[[68,7]]},"587":{"position":[[71,7]]}}}],["emoji",{"_index":2183,"t":{"647":{"position":[[221,7]]}}}],["empti",{"_index":8,"t":{"4":{"position":[[35,5],[52,5]]},"64":{"position":[[70,5]]},"535":{"position":[[1575,5]]},"569":{"position":[[156,8]]}}}],["en_us.utf",{"_index":2196,"t":{"659":{"position":[[60,9]]}}}],["enabl",{"_index":278,"t":{"14":{"position":[[2290,6]]},"20":{"position":[[369,7],[1002,7]]},"34":{"position":[[366,7]]},"48":{"position":[[495,7]]},"72":{"position":[[542,7]]},"82":{"position":[[965,6]]},"105":{"position":[[103,7]]},"111":{"position":[[15,7]]},"147":{"position":[[355,6]]},"161":{"position":[[455,6]]},"163":{"position":[[405,6]]},"165":{"position":[[402,6]]},"169":{"position":[[42,7]]},"175":{"position":[[35,9],[108,8],[403,6],[505,6],[585,6]]},"199":{"position":[[83,6]]},"201":{"position":[[27,8]]},"207":{"position":[[95,6]]},"211":{"position":[[89,6]]},"221":{"position":[[83,6]]},"258":{"position":[[89,6]]},"292":{"position":[[187,6]]},"296":{"position":[[96,6]]},"329":{"position":[[166,7]]},"589":{"position":[[140,6],[202,6]]}}}],["enc",{"_index":1821,"t":{"478":{"position":[[574,3]]},"484":{"position":[[435,3]]},"490":{"position":[[617,4]]},"497":{"position":[[791,3]]}}}],["encapsul",{"_index":1341,"t":{"254":{"position":[[311,12]]}}}],["enclos",{"_index":380,"t":{"20":{"position":[[1799,9]]},"115":{"position":[[85,9]]},"205":{"position":[[85,9]]}}}],["encod",{"_index":91,"t":{"6":{"position":[[560,8]]},"20":{"position":[[2224,7]]},"44":{"position":[[125,7]]},"46":{"position":[[206,7]]},"321":{"position":[[465,10]]},"347":{"position":[[11,7],[73,7]]},"353":{"position":[[17,7],[72,7]]},"357":{"position":[[20,7],[137,7]]},"393":{"position":[[65,8]]},"395":{"position":[[57,6]]},"593":{"position":[[84,6],[794,6]]},"595":{"position":[[619,8],[673,7],[869,7],[1049,7],[1270,8]]},"693":{"position":[[14,7],[59,8]]},"731":{"position":[[65,6]]}}}],["encompass",{"_index":791,"t":{"82":{"position":[[826,12]]}}}],["encrypt",{"_index":1803,"t":{"474":{"position":[[108,10]]},"476":{"position":[[34,10]]},"478":{"position":[[454,7]]},"482":{"position":[[34,10]]},"484":{"position":[[391,7]]},"486":{"position":[[91,10]]},"488":{"position":[[34,10],[185,10]]},"490":{"position":[[264,9],[497,7]]},"495":{"position":[[34,10],[198,7]]},"497":{"position":[[181,9],[777,7]]}}}],["end",{"_index":203,"t":{"14":{"position":[[387,4]]},"86":{"position":[[294,3],[1074,3]]},"107":{"position":[[422,3],[502,3]]},"113":{"position":[[171,3]]},"115":{"position":[[288,3],[449,3],[453,3]]},"145":{"position":[[125,3]]},"153":{"position":[[119,3],[123,3]]},"155":{"position":[[110,3]]},"167":{"position":[[151,3],[596,3]]},"171":{"position":[[168,3]]},"175":{"position":[[421,3]]},"177":{"position":[[203,3]]},"185":{"position":[[268,4]]},"187":{"position":[[163,3],[344,3],[360,3]]},"203":{"position":[[292,3],[329,3]]},"205":{"position":[[123,3],[176,3],[314,3],[487,3],[491,3]]},"209":{"position":[[169,3],[291,3],[355,3],[522,3],[529,3],[579,3]]},"213":{"position":[[86,3],[292,3]]},"215":{"position":[[132,3]]},"217":{"position":[[163,3],[229,3]]},"219":{"position":[[75,3]]},"223":{"position":[[179,3],[342,3]]},"225":{"position":[[164,4],[568,3]]},"231":{"position":[[187,3],[191,3],[340,3],[344,3]]},"233":{"position":[[219,3]]},"235":{"position":[[258,3]]},"239":{"position":[[160,3],[439,3]]},"242":{"position":[[670,3]]},"244":{"position":[[174,3],[555,3]]},"246":{"position":[[280,4]]},"252":{"position":[[122,3],[341,3],[631,3],[889,3]]},"254":{"position":[[119,3],[258,3],[388,3],[583,3]]},"256":{"position":[[237,3],[589,4],[594,3]]},"266":{"position":[[156,3]]},"272":{"position":[[117,3],[140,3],[163,3],[272,4],[291,4],[310,3]]},"274":{"position":[[171,3]]},"276":{"position":[[196,3]]},"278":{"position":[[163,3],[226,3],[230,3]]},"280":{"position":[[157,3],[161,3]]},"282":{"position":[[90,3],[121,3]]},"284":{"position":[[227,3],[231,3],[486,3],[490,3]]},"286":{"position":[[239,3],[277,3],[281,3]]},"288":{"position":[[222,3],[260,3],[264,3]]},"290":{"position":[[125,3],[156,3],[420,3]]},"294":{"position":[[324,3],[328,3],[478,3],[482,3],[486,3]]},"298":{"position":[[911,3],[915,3]]},"302":{"position":[[195,3]]},"315":{"position":[[262,3],[502,3],[521,3],[756,3]]},"317":{"position":[[197,3],[391,3],[395,3],[533,3],[613,3],[624,3]]},"325":{"position":[[172,3]]},"339":{"position":[[207,3],[437,3]]},"343":{"position":[[393,3],[419,3]]},"509":{"position":[[336,3],[355,3]]},"513":{"position":[[165,4]]},"531":{"position":[[317,3]]},"535":{"position":[[2433,3]]},"537":{"position":[[523,4],[603,4]]},"547":{"position":[[371,3]]},"551":{"position":[[233,3]]},"553":{"position":[[222,3]]},"555":{"position":[[230,3]]},"557":{"position":[[249,3]]},"559":{"position":[[260,3]]},"569":{"position":[[165,3]]},"585":{"position":[[59,3],[195,3]]},"611":{"position":[[506,4]]},"621":{"position":[[810,3]]},"629":{"position":[[336,3]]},"641":{"position":[[37,4]]},"673":{"position":[[19,4]]},"685":{"position":[[351,4],[550,4]]},"687":{"position":[[399,4]]},"689":{"position":[[359,3],[421,4]]},"771":{"position":[[116,4]]}}}],["enforc",{"_index":1182,"t":{"183":{"position":[[226,8]]}}}],["english",{"_index":1978,"t":{"535":{"position":[[1688,7]]}}}],["enhanc",{"_index":857,"t":{"88":{"position":[[150,8]]},"92":{"position":[[116,7]]},"583":{"position":[[35,9]]}}}],["enough",{"_index":1141,"t":{"157":{"position":[[72,6]]}}}],["ensur",{"_index":446,"t":{"20":{"position":[[3431,6]]},"300":{"position":[[173,6]]},"474":{"position":[[130,6]]},"659":{"position":[[80,7]]}}}],["enter",{"_index":908,"t":{"94":{"position":[[276,6]]}}}],["entir",{"_index":1268,"t":{"237":{"position":[[28,8]]},"302":{"position":[[336,8]]},"308":{"position":[[446,8]]},"647":{"position":[[22,8]]},"649":{"position":[[22,8]]},"651":{"position":[[22,8]]},"653":{"position":[[22,8]]},"655":{"position":[[22,8]]},"657":{"position":[[25,8]]}}}],["entiti",{"_index":1409,"t":{"282":{"position":[[75,6],[114,6]]},"284":{"position":[[176,6],[255,6]]},"290":{"position":[[118,6],[149,6],[174,8],[224,7],[294,7],[413,6],[438,8],[467,8]]}}}],["entri",{"_index":2343,"t":{"731":{"position":[[250,8],[336,7],[373,6],[414,8]]},"733":{"position":[[279,9],[289,6],[333,8],[342,10],[408,10],[476,8],[796,10],[829,8],[1178,8],[1187,8],[1297,8],[1349,8]]}}}],["entry>primaryjg",{"_index":1829,"t":{"484":{"position":[[522,18]]}}}],["q",{"_index":1844,"t":{"493":{"position":[[283,3],[730,5]]},"497":{"position":[[425,1]]},"501":{"position":[[450,1]]}}}],["qo",{"_index":1061,"t":{"126":{"position":[[55,2]]}}}],["qol",{"_index":817,"t":{"86":{"position":[[56,3]]}}}],["queri",{"_index":1991,"t":{"537":{"position":[[0,7]]},"697":{"position":[[416,9]]}}}],["quick",{"_index":790,"t":{"82":{"position":[[820,5]]}}}],["quicker",{"_index":2070,"t":{"583":{"position":[[149,8]]}}}],["quickli",{"_index":1520,"t":{"319":{"position":[[87,7]]}}}],["quit",{"_index":1140,"t":{"157":{"position":[[59,5]]}}}],["quot",{"_index":499,"t":{"28":{"position":[[51,6]]}}}],["quotient",{"_index":1705,"t":{"415":{"position":[[59,8]]},"417":{"position":[[64,9]]}}}],["r",{"_index":1263,"t":{"233":{"position":[[132,4],[304,3]]},"235":{"position":[[171,4],[336,3]]},"637":{"position":[[245,1],[288,4],[500,1],[552,4]]}}}],["r(a",{"_index":1026,"t":{"113":{"position":[[296,4]]}}}],["rai",{"_index":1161,"t":{"175":{"position":[[172,6]]}}}],["raii",{"_index":287,"t":{"14":{"position":[[2513,4]]}}}],["rais",{"_index":73,"t":{"6":{"position":[[339,7]]},"18":{"position":[[458,6]]},"24":{"position":[[95,7]]},"145":{"position":[[8,6]]},"147":{"position":[[8,6]]},"149":{"position":[[8,6]]},"151":{"position":[[8,6]]},"153":{"position":[[8,6]]},"155":{"position":[[8,6]]},"157":{"position":[[8,6]]},"159":{"position":[[8,6]]},"161":{"position":[[8,6]]},"163":{"position":[[8,6]]},"165":{"position":[[8,6]]},"167":{"position":[[8,6]]},"169":{"position":[[8,6]]},"171":{"position":[[8,6]]},"201":{"position":[[68,6]]},"239":{"position":[[61,6]]},"387":{"position":[[31,5],[236,6],[461,7]]},"389":{"position":[[27,5],[241,5]]},"391":{"position":[[22,6],[352,5],[382,5]]},"523":{"position":[[58,6]]},"543":{"position":[[34,6]]},"545":{"position":[[34,6]]}}}],["ran",{"_index":1134,"t":{"153":{"position":[[50,4]]}}}],["random",{"_index":827,"t":{"86":{"position":[[367,8]]},"227":{"position":[[593,8],[611,8]]},"472":{"position":[[335,11]]}}}],["rang",{"_index":224,"t":{"14":{"position":[[1080,5]]},"472":{"position":[[422,6]]},"519":{"position":[[40,6]]}}}],["range(16):map",{"_index":1818,"t":{"478":{"position":[[473,16]]},"490":{"position":[[516,16]]}}}],["rare",{"_index":497,"t":{"26":{"position":[[181,4]]}}}],["raw",{"_index":1771,"t":{"463":{"position":[[121,3]]},"465":{"position":[[123,3]]},"467":{"position":[[123,3]]},"469":{"position":[[123,3]]}}}],["rawget",{"_index":839,"t":{"86":{"position":[[751,6],[928,6]]}}}],["rawget(opt",{"_index":851,"t":{"86":{"position":[[1046,12]]}}}],["rawset(frozen",{"_index":1467,"t":{"298":{"position":[[561,14]]}}}],["re",{"_index":213,"t":{"14":{"position":[[723,2]]},"20":{"position":[[999,2]]},"42":{"position":[[91,2]]},"327":{"position":[[165,5],[197,7]]}}}],["read",{"_index":167,"t":{"12":{"position":[[323,4],[517,4]]},"669":{"position":[[41,4]]}}}],["readabl",{"_index":1363,"t":{"262":{"position":[[67,9]]},"515":{"position":[[52,8]]},"593":{"position":[[135,8]]},"731":{"position":[[115,8]]}}}],["reason",{"_index":798,"t":{"82":{"position":[[1262,8]]},"535":{"position":[[1675,6]]}}}],["reassign",{"_index":1464,"t":{"298":{"position":[[469,8]]}}}],["rebas",{"_index":746,"t":{"72":{"position":[[813,7]]}}}],["receiv",{"_index":1613,"t":{"363":{"position":[[306,8]]},"365":{"position":[[321,8]]},"367":{"position":[[329,8]]},"369":{"position":[[419,8]]},"371":{"position":[[510,8]]},"373":{"position":[[335,8]]},"375":{"position":[[642,8],[894,8]]},"617":{"position":[[0,7],[118,8]]},"619":{"position":[[43,7]]}}}],["recogn",{"_index":475,"t":{"22":{"position":[[191,11]]}}}],["recommend",{"_index":796,"t":{"82":{"position":[[1226,9]]}}}],["record",{"_index":2127,"t":{"617":{"position":[[184,7]]}}}],["recurs",{"_index":307,"t":{"18":{"position":[[244,9]]},"34":{"position":[[143,9]]},"559":{"position":[[122,7]]}}}],["red",{"_index":1286,"t":{"242":{"position":[[561,3],[664,5]]}}}],["reduc",{"_index":1009,"t":{"111":{"position":[[86,6]]},"288":{"position":[[132,6]]}}}],["reduce(math.max",{"_index":2406,"t":{"775":{"position":[[145,17]]}}}],["reduce(math.min",{"_index":2402,"t":{"773":{"position":[[146,17]]}}}],["refer",{"_index":1604,"t":{"357":{"position":[[62,7]]},"375":{"position":[[102,9],[192,9]]},"377":{"position":[[106,9],[196,9]]},"387":{"position":[[93,10]]},"389":{"position":[[89,10]]},"391":{"position":[[199,10]]}}}],["reflect",{"_index":584,"t":{"38":{"position":[[659,10]]},"217":{"position":[[75,7]]}}}],["refresh",{"_index":1577,"t":{"333":{"position":[[93,9]]}}}],["reg",{"_index":2078,"t":{"589":{"position":[[259,3]]}}}],["reg_dword",{"_index":2082,"t":{"589":{"position":[[310,9]]}}}],["regard",{"_index":150,"t":{"10":{"position":[[299,7]]}}}],["regardless",{"_index":807,"t":{"84":{"position":[[38,10]]},"329":{"position":[[290,11]]}}}],["regist",{"_index":636,"t":{"46":{"position":[[102,9]]},"337":{"position":[[153,10]]}}}],["regress",{"_index":135,"t":{"10":{"position":[[27,11]]},"34":{"position":[[438,10]]},"56":{"position":[[8,10]]}}}],["reindent",{"_index":886,"t":{"92":{"position":[[383,9]]}}}],["rel",{"_index":2030,"t":{"563":{"position":[[10,8]]},"565":{"position":[[32,8]]}}}],["relat",{"_index":154,"t":{"10":{"position":[[340,7]]}}}],["relationship",{"_index":953,"t":{"101":{"position":[[565,12]]}}}],["releas",{"_index":3,"t":{"2":{"position":[[43,8]]},"10":{"position":[[5,7]]},"121":{"position":[[93,8]]},"126":{"position":[[642,9]]},"185":{"position":[[253,7]]},"521":{"position":[[212,7]]}}}],["relev",{"_index":772,"t":{"80":{"position":[[55,8]]}}}],["reli",{"_index":578,"t":{"38":{"position":[[412,4]]},"107":{"position":[[1133,4]]}}}],["reliabl",{"_index":1002,"t":{"107":{"position":[[924,8]]}}}],["remain",{"_index":486,"t":{"24":{"position":[[152,6]]}}}],["remaind",{"_index":1706,"t":{"415":{"position":[[72,10]]},"419":{"position":[[63,10]]}}}],["remap",{"_index":2386,"t":{"767":{"position":[[0,6]]}}}],["remark",{"_index":856,"t":{"88":{"position":[[88,10]]}}}],["rememb",{"_index":1332,"t":{"252":{"position":[[422,8],[985,8]]}}}],["remot",{"_index":1968,"t":{"535":{"position":[[1122,6],[1318,6],[1434,6],[2005,6],[2172,6]]},"537":{"position":[[54,7],[160,7]]},"621":{"position":[[174,7],[287,6]]}}}],["remov",{"_index":284,"t":{"14":{"position":[[2414,7]]},"16":{"position":[[179,7]]},"20":{"position":[[3616,7]]},"38":{"position":[[449,7],[510,7]]},"42":{"position":[[178,7],[371,7]]},"48":{"position":[[344,7]]},"337":{"position":[[6,7]]},"515":{"position":[[884,10]]},"743":{"position":[[0,6]]},"763":{"position":[[311,7]]}}}],["renam",{"_index":430,"t":{"20":{"position":[[3002,7],[3031,7]]}}}],["reorder",{"_index":2371,"t":{"757":{"position":[[0,8]]}}}],["repeat",{"_index":165,"t":{"12":{"position":[[291,6]]},"72":{"position":[[556,6]]}}}],["repl",{"_index":474,"t":{"22":{"position":[[182,4]]}}}],["replac",{"_index":212,"t":{"14":{"position":[[691,9]]},"40":{"position":[[87,7]]},"46":{"position":[[75,8]]},"76":{"position":[[117,11]]},"300":{"position":[[270,7]]},"661":{"position":[[0,7],[185,8],[211,11],[270,12],[408,12]]},"663":{"position":[[170,8],[315,7]]}}}],["replic",{"_index":1899,"t":{"513":{"position":[[481,9]]}}}],["repo",{"_index":1075,"t":{"126":{"position":[[272,5]]}}}],["repo/key.gpg",{"_index":1064,"t":{"126":{"position":[[94,12]]}}}],["report",{"_index":100,"t":{"8":{"position":[[93,9]]},"12":{"position":[[783,9]]},"42":{"position":[[250,9]]},"304":{"position":[[534,6]]},"689":{"position":[[99,7]]}}}],["repositori",{"_index":919,"t":{"94":{"position":[[459,10]]},"128":{"position":[[26,10]]},"130":{"position":[[46,10]]},"132":{"position":[[119,11]]},"136":{"position":[[7,10]]}}}],["repres",{"_index":1532,"t":{"321":{"position":[[29,9]]},"397":{"position":[[16,12],[108,9]]},"517":{"position":[[88,11]]},"563":{"position":[[207,12]]},"565":{"position":[[106,12]]},"669":{"position":[[111,12],[1169,9]]},"733":{"position":[[16,12]]}}}],["represent",{"_index":410,"t":{"20":{"position":[[2552,15]]},"397":{"position":[[582,15],[782,15]]},"403":{"position":[[59,14]]},"405":{"position":[[23,14]]},"407":{"position":[[18,14]]},"515":{"position":[[119,14]]},"669":{"position":[[200,14]]},"703":{"position":[[59,14]]}}}],["request",{"_index":423,"t":{"20":{"position":[[2920,7],[3498,7]]},"333":{"position":[[48,7]]},"535":{"position":[[17,8],[56,7],[317,7],[452,7],[1090,8],[1353,8],[1387,8],[1453,9],[1947,7],[1992,7],[2151,8]]}}}],["requir",{"_index":444,"t":{"20":{"position":[[3392,7]]},"44":{"position":[[86,8]]},"82":{"position":[[732,8]]},"86":{"position":[[710,7]]},"101":{"position":[[105,7],[492,8]]},"103":{"position":[[123,7],[286,7]]},"134":{"position":[[12,8]]},"140":{"position":[[330,7]]},"197":{"position":[[35,7],[138,7]]},"278":{"position":[[71,7]]},"321":{"position":[[100,7]]},"345":{"position":[[21,8]]},"351":{"position":[[21,8]]},"361":{"position":[[21,8]]},"393":{"position":[[32,7]]},"395":{"position":[[90,7]]},"397":{"position":[[210,7],[831,7],[1059,7]]},"399":{"position":[[21,8]]},"401":{"position":[[154,7]]},"405":{"position":[[74,7]]},"407":{"position":[[69,7]]},"415":{"position":[[104,7]]},"417":{"position":[[95,7]]},"419":{"position":[[95,7]]},"421":{"position":[[84,7]]},"423":{"position":[[94,7]]},"425":{"position":[[21,8]]},"478":{"position":[[389,7]]},"484":{"position":[[326,7]]},"490":{"position":[[400,7]]},"493":{"position":[[84,12],[129,12]]},"497":{"position":[[294,7]]},"501":{"position":[[319,7]]},"533":{"position":[[21,8]]},"535":{"position":[[2228,7]]},"537":{"position":[[407,7]]},"591":{"position":[[21,8]]},"605":{"position":[[21,8]]},"611":{"position":[[301,7]]},"617":{"position":[[399,7]]},"619":{"position":[[181,7]]},"621":{"position":[[544,7]]},"629":{"position":[[163,7]]},"677":{"position":[[36,7]]},"689":{"position":[[259,7]]},"691":{"position":[[21,8]]},"699":{"position":[[21,8]]},"701":{"position":[[63,7],[330,7]]},"705":{"position":[[180,7]]},"707":{"position":[[84,7]]},"717":{"position":[[86,7]]},"719":{"position":[[93,7]]},"721":{"position":[[87,7]]},"723":{"position":[[323,7]]},"725":{"position":[[107,7]]},"727":{"position":[[100,7]]},"729":{"position":[[21,8]]},"731":{"position":[[176,7]]},"733":{"position":[[232,7],[1130,7]]}}}],["require\"pluto:schedul",{"_index":2243,"t":{"685":{"position":[[237,26]]},"687":{"position":[[184,26]]}}}],["require\"pluto:url",{"_index":2261,"t":{"693":{"position":[[86,18]]},"695":{"position":[[115,18]]},"697":{"position":[[96,18]]}}}],["require\"pluto:vector3",{"_index":2292,"t":{"709":{"position":[[135,24]]},"711":{"position":[[65,24]]},"713":{"position":[[71,24]]},"715":{"position":[[72,24]]}}}],["require(\"assert",{"_index":1609,"t":{"363":{"position":[[160,17]]},"365":{"position":[[159,17]]},"367":{"position":[[163,17]]},"369":{"position":[[212,17]]},"371":{"position":[[327,17]]},"373":{"position":[[161,17]]},"375":{"position":[[462,17]]},"377":{"position":[[462,17]]},"379":{"position":[[201,17]]},"381":{"position":[[225,17]]},"383":{"position":[[208,17]]},"385":{"position":[[232,17]]},"387":{"position":[[274,17]]},"389":{"position":[[278,17]]},"391":{"position":[[469,17]]},"757":{"position":[[156,17]]}}}],["require(\"base64",{"_index":1599,"t":{"353":{"position":[[158,17]]},"355":{"position":[[98,17]]},"357":{"position":[[224,17]]},"359":{"position":[[112,17]]}}}],["require(\"crypto",{"_index":1718,"t":{"428":{"position":[[136,17]]},"430":{"position":[[119,17]]},"432":{"position":[[176,17]]},"434":{"position":[[119,17]]},"436":{"position":[[120,17]]},"438":{"position":[[177,17]]},"440":{"position":[[176,17]]},"442":{"position":[[235,17]]},"444":{"position":[[181,17]]},"446":{"position":[[122,17]]},"448":{"position":[[179,17]]},"450":{"position":[[179,17]]},"452":{"position":[[179,17]]},"454":{"position":[[180,17]]},"456":{"position":[[124,17]]},"458":{"position":[[124,17]]},"460":{"position":[[129,17]]},"463":{"position":[[222,17]]},"465":{"position":[[224,17]]},"467":{"position":[[224,17]]},"469":{"position":[[224,17]]},"472":{"position":[[450,17]]}}}],["require(\"crypto\").joaat(\"hello",{"_index":1168,"t":{"181":{"position":[[195,31],[434,31]]}}}],["require(\"json",{"_index":2084,"t":{"593":{"position":[[198,15],[761,15],[838,15]]},"595":{"position":[[591,15]]}}}],["require(\"pluto:libnam",{"_index":447,"t":{"20":{"position":[[3459,24]]}}}],["reserv",{"_index":533,"t":{"30":{"position":[[1249,8]]},"38":{"position":[[1802,8]]},"54":{"position":[[84,8]]},"66":{"position":[[143,8]]},"78":{"position":[[25,8],[234,8]]},"82":{"position":[[38,8],[1603,8]]},"343":{"position":[[24,8],[145,8],[258,8],[497,8]]}}}],["reset",{"_index":13,"t":{"4":{"position":[[97,9]]}}}],["resolv",{"_index":2109,"t":{"607":{"position":[[115,9]]}}}],["respect",{"_index":644,"t":{"48":{"position":[[330,13]]},"195":{"position":[[112,13]]},"476":{"position":[[237,13]]},"478":{"position":[[238,13]]},"482":{"position":[[205,13]]},"484":{"position":[[206,13]]},"488":{"position":[[269,13]]},"490":{"position":[[174,13]]},"513":{"position":[[387,10]]},"595":{"position":[[495,8]]},"601":{"position":[[26,10]]}}}],["respons",{"_index":1974,"t":{"535":{"position":[[1488,8],[1557,8]]},"751":{"position":[[87,11]]},"763":{"position":[[264,11]]},"767":{"position":[[104,11]]},"771":{"position":[[157,11]]},"777":{"position":[[119,11]]}}}],["rest",{"_index":1185,"t":{"185":{"position":[[343,4]]}}}],["restrict",{"_index":600,"t":{"38":{"position":[[1422,11]]},"66":{"position":[[568,12]]},"103":{"position":[[211,12]]}}}],["result",{"_index":109,"t":{"8":{"position":[[219,7],[247,6],[287,6]]},"16":{"position":[[255,7]]},"46":{"position":[[277,9]]},"60":{"position":[[490,8]]},"225":{"position":[[376,6]]},"248":{"position":[[539,6]]},"327":{"position":[[186,6],[213,6]]},"480":{"position":[[112,6]]},"659":{"position":[[97,6]]},"663":{"position":[[145,9]]},"705":{"position":[[150,7]]},"737":{"position":[[138,6]]}}}],["resum",{"_index":2237,"t":{"681":{"position":[[81,7]]},"685":{"position":[[54,7]]}}}],["rethrow",{"_index":1941,"t":{"527":{"position":[[40,8]]}}}],["rethrown",{"_index":2242,"t":{"685":{"position":[[199,9]]},"689":{"position":[[197,8]]}}}],["retri",{"_index":1961,"t":{"535":{"position":[[720,8]]}}}],["retun",{"_index":1685,"t":{"397":{"position":[[602,7]]}}}],["return",{"_index":7,"t":{"4":{"position":[[22,9]]},"6":{"position":[[444,6]]},"12":{"position":[[620,6]]},"14":{"position":[[262,7],[378,6]]},"22":{"position":[[112,9]]},"24":{"position":[[70,7]]},"38":{"position":[[1485,6]]},"40":{"position":[[173,6]]},"66":{"position":[[442,7],[498,8]]},"86":{"position":[[243,6],[1001,6]]},"101":{"position":[[420,6]]},"107":{"position":[[180,6]]},"113":{"position":[[574,6],[589,6]]},"171":{"position":[[24,6],[155,6],[221,6],[280,7]]},"189":{"position":[[78,6]]},"209":{"position":[[156,6],[173,6],[278,6],[304,6],[509,6],[543,8]]},"225":{"position":[[141,6],[406,9],[555,6]]},"239":{"position":[[77,6],[147,6],[213,6],[272,7],[426,6]]},"242":{"position":[[520,9],[625,6]]},"244":{"position":[[454,6],[543,6]]},"254":{"position":[[378,6]]},"286":{"position":[[261,6]]},"288":{"position":[[244,6]]},"294":{"position":[[121,6],[379,6],[467,6]]},"302":{"position":[[162,6]]},"304":{"position":[[66,7]]},"308":{"position":[[116,8]]},"315":{"position":[[110,7],[156,7]]},"319":{"position":[[360,6]]},"321":{"position":[[837,6]]},"325":{"position":[[145,6]]},"347":{"position":[[0,7]]},"349":{"position":[[0,7]]},"353":{"position":[[0,7]]},"355":{"position":[[0,7]]},"357":{"position":[[0,7]]},"395":{"position":[[0,7]]},"397":{"position":[[0,7]]},"409":{"position":[[27,7]]},"411":{"position":[[37,7]]},"413":{"position":[[40,7]]},"415":{"position":[[34,7]]},"417":{"position":[[34,7]]},"419":{"position":[[33,7]]},"421":{"position":[[41,7]]},"423":{"position":[[0,7]]},"432":{"position":[[98,8]]},"438":{"position":[[99,8]]},"440":{"position":[[98,8]]},"442":{"position":[[157,8]]},"448":{"position":[[101,8]]},"450":{"position":[[101,8]]},"452":{"position":[[101,8]]},"454":{"position":[[102,8]]},"463":{"position":[[113,7]]},"465":{"position":[[115,7]]},"467":{"position":[[115,7]]},"469":{"position":[[115,7]]},"472":{"position":[[380,7],[409,7]]},"478":{"position":[[283,7]]},"484":{"position":[[220,7]]},"488":{"position":[[314,7]]},"490":{"position":[[285,7]]},"493":{"position":[[182,7]]},"501":{"position":[[204,7]]},"515":{"position":[[101,8]]},"517":{"position":[[24,7]]},"519":{"position":[[0,7]]},"523":{"position":[[29,7]]},"535":{"position":[[1463,8]]},"543":{"position":[[80,6]]},"545":{"position":[[80,6]]},"547":{"position":[[140,8]]},"549":{"position":[[91,7],[119,8]]},"551":{"position":[[42,8]]},"553":{"position":[[42,8]]},"555":{"position":[[42,8]]},"557":{"position":[[64,8]]},"559":{"position":[[147,8]]},"563":{"position":[[189,8]]},"565":{"position":[[88,8]]},"567":{"position":[[155,8],[212,6]]},"571":{"position":[[166,8],[223,6]]},"573":{"position":[[165,8],[222,6]]},"585":{"position":[[43,6],[179,6]]},"593":{"position":[[0,7],[120,6]]},"595":{"position":[[0,7],[100,6],[165,6],[256,6]]},"601":{"position":[[13,6]]},"603":{"position":[[0,7]]},"607":{"position":[[166,8]]},"609":{"position":[[78,8]]},"617":{"position":[[61,8],[292,6]]},"621":{"position":[[305,8],[343,7],[419,7]]},"627":{"position":[[67,8],[270,7]]},"629":{"position":[[67,7]]},"637":{"position":[[125,8]]},"641":{"position":[[145,8]]},"643":{"position":[[149,8]]},"645":{"position":[[150,8]]},"663":{"position":[[417,8]]},"671":{"position":[[248,8]]},"683":{"position":[[99,7]]},"685":{"position":[[333,6]]},"687":{"position":[[381,6]]},"693":{"position":[[0,7]]},"695":{"position":[[0,7]]},"713":{"position":[[0,7]]},"715":{"position":[[0,7]]},"719":{"position":[[0,7]]},"721":{"position":[[0,7]]},"723":{"position":[[0,7]]},"725":{"position":[[0,7]]},"727":{"position":[[0,7]]},"731":{"position":[[0,7],[100,6]]},"733":{"position":[[0,7],[735,8]]},"737":{"position":[[30,6]]},"739":{"position":[[31,7]]},"741":{"position":[[0,7]]},"745":{"position":[[73,8]]},"749":{"position":[[100,8]]},"751":{"position":[[126,8]]},"753":{"position":[[74,8]]},"755":{"position":[[34,7]]},"757":{"position":[[109,8]]},"759":{"position":[[34,7]]},"763":{"position":[[331,6],[491,8]]},"765":{"position":[[33,7]]},"767":{"position":[[252,8]]},"769":{"position":[[30,7]]},"771":{"position":[[83,9],[292,8]]},"773":{"position":[[0,7]]},"775":{"position":[[0,7]]},"777":{"position":[[46,9]]}}}],["reus",{"_index":1965,"t":{"535":{"position":[[972,5],[1224,6]]}}}],["revers",{"_index":2368,"t":{"753":{"position":[[0,8],[65,8]]}}}],["revert",{"_index":670,"t":{"52":{"position":[[101,8]]}}}],["rewritten",{"_index":697,"t":{"60":{"position":[[415,9]]}}}],["right",{"_index":538,"t":{"32":{"position":[[196,5]]},"229":{"position":[[4,5],[105,5],[182,5]]},"313":{"position":[[469,6]]},"315":{"position":[[122,5]]},"639":{"position":[[71,5],[104,6]]},"645":{"position":[[36,5]]},"671":{"position":[[188,6],[586,5]]},"705":{"position":[[53,5]]},"723":{"position":[[571,5],[594,5],[697,5],[777,5],[800,5]]},"727":{"position":[[299,5],[397,5],[420,5]]}}}],["righthand",{"_index":542,"t":{"32":{"position":[[283,9]]},"323":{"position":[[60,9]]},"327":{"position":[[4,9]]}}}],["rightli",{"_index":867,"t":{"90":{"position":[[156,8]]}}}],["roll",{"_index":829,"t":{"86":{"position":[[477,6]]},"723":{"position":[[273,4],[291,5]]}}}],["roll(opt",{"_index":818,"t":{"86":{"position":[[232,10],[990,10]]}}}],["root",{"_index":2342,"t":{"731":{"position":[[221,7],[362,6],[447,7]]},"733":{"position":[[258,4],[788,4],[1057,4],[1106,5]]}}}],["root=1",{"_index":1547,"t":{"321":{"position":[[408,7]]}}}],["rotat",{"_index":2316,"t":{"723":{"position":[[10,8]]},"725":{"position":[[10,8]]},"727":{"position":[[40,8]]}}}],["roughli",{"_index":677,"t":{"54":{"position":[[221,7]]}}}],["round",{"_index":2063,"t":{"579":{"position":[[0,6],[66,6]]}}}],["rsa",{"_index":1838,"t":{"493":{"position":[[27,6]]},"495":{"position":[[52,4],[87,5]]},"497":{"position":[[53,4],[88,5],[865,4]]},"499":{"position":[[44,4],[60,4]]},"501":{"position":[[52,4],[68,4],[1056,4]]}}}],["rule",{"_index":885,"t":{"92":{"position":[[347,5]]}}}],["run",{"_index":888,"t":{"92":{"position":[[416,3]]},"101":{"position":[[55,3]]},"105":{"position":[[206,3]]},"119":{"position":[[81,4]]},"134":{"position":[[75,7],[186,3]]},"138":{"position":[[15,3]]},"165":{"position":[[38,3]]},"185":{"position":[[198,7],[242,7]]},"509":{"position":[[309,7]]},"685":{"position":[[4,3]]},"777":{"position":[[0,4]]}}}],["runtim",{"_index":699,"t":{"60":{"position":[[436,7]]},"179":{"position":[[106,8]]},"181":{"position":[[185,7],[424,7]]},"503":{"position":[[55,7]]}}}],["s",{"_index":1098,"t":{"134":{"position":[[164,1]]},"391":{"position":[[980,1]]},"611":{"position":[[366,3]]},"617":{"position":[[428,1]]},"621":{"position":[[573,1]]},"633":{"position":[[97,1]]},"635":{"position":[[101,1]]},"637":{"position":[[197,1],[407,1]]},"641":{"position":[[182,1]]},"643":{"position":[[186,1]]},"645":{"position":[[187,1]]},"647":{"position":[[106,1]]},"649":{"position":[[110,1]]},"651":{"position":[[111,1]]},"653":{"position":[[110,1]]},"655":{"position":[[113,1]]},"657":{"position":[[114,1]]},"665":{"position":[[114,1]]},"671":{"position":[[421,1],[604,1]]},"673":{"position":[[119,1]]},"675":{"position":[[121,1]]}}}],["s1",{"_index":1235,"t":{"225":{"position":[[94,2],[215,2]]},"667":{"position":[[137,2]]}}}],["s1:gsub",{"_index":1237,"t":{"225":{"position":[[116,12],[237,12]]}}}],["s2",{"_index":1236,"t":{"225":{"position":[[111,2],[232,2]]},"667":{"position":[[162,2],[207,4]]}}}],["s:recv",{"_index":2151,"t":{"621":{"position":[[786,8]]}}}],["s:send(\"get",{"_index":2132,"t":{"617":{"position":[[465,11]]},"621":{"position":[[694,11]]}}}],["s:send(\"http/1.1",{"_index":2117,"t":{"611":{"position":[[408,16]]}}}],["safe",{"_index":85,"t":{"6":{"position":[[501,4]]},"12":{"position":[[579,4]]},"16":{"position":[[174,4]]},"20":{"position":[[180,4]]},"66":{"position":[[323,4]]},"242":{"position":[[855,4]]},"244":{"position":[[68,4]]},"357":{"position":[[85,4]]}}}],["same",{"_index":793,"t":{"82":{"position":[[1103,4]]},"140":{"position":[[430,4]]},"145":{"position":[[52,4]]},"147":{"position":[[52,4]]},"149":{"position":[[24,4]]},"193":{"position":[[138,4]]},"195":{"position":[[21,4]]},"311":{"position":[[29,5]]},"313":{"position":[[621,4]]},"317":{"position":[[268,5]]},"375":{"position":[[167,4],[206,4]]},"377":{"position":[[171,4],[210,4]]},"531":{"position":[[255,4]]},"535":{"position":[[1117,4],[2167,4]]},"595":{"position":[[111,4]]},"621":{"position":[[198,4]]},"659":{"position":[[0,4],[92,4]]},"753":{"position":[[190,4]]},"761":{"position":[[35,4]]}}}],["sandbox",{"_index":456,"t":{"20":{"position":[[3712,12],[3902,11]]},"103":{"position":[[203,7],[417,8]]},"105":{"position":[[36,10]]},"300":{"position":[[164,8]]}}}],["say(\"hello",{"_index":1513,"t":{"315":{"position":[[331,11],[590,11],[825,11]]}}}],["say(messag",{"_index":1510,"t":{"315":{"position":[[208,12],[433,12],[693,12]]}}}],["say(msg",{"_index":1392,"t":{"274":{"position":[[151,8]]}}}],["say(nil",{"_index":1512,"t":{"315":{"position":[[297,8],[556,8],[791,8]]}}}],["sched",{"_index":1996,"t":{"537":{"position":[[425,5]]},"611":{"position":[[319,5]]},"689":{"position":[[277,5]]}}}],["sched.errorfunc",{"_index":2255,"t":{"689":{"position":[[301,15]]}}}],["sched:add(funct",{"_index":1999,"t":{"537":{"position":[[528,20]]},"689":{"position":[[363,20]]}}}],["sched:addloop(funct",{"_index":1997,"t":{"537":{"position":[[449,24]]}}}],["sched:run",{"_index":2001,"t":{"537":{"position":[[608,11]]},"611":{"position":[[511,11]]}}}],["schedul",{"_index":222,"t":{"14":{"position":[[1029,11]]},"107":{"position":[[519,10]]},"537":{"position":[[393,9],[437,11]]},"611":{"position":[[137,9],[279,10],[331,11]]},"677":{"position":[[4,9]]},"681":{"position":[[116,10]]},"685":{"position":[[29,10],[44,9],[221,9]]},"687":{"position":[[31,9],[79,9],[168,9]]},"689":{"position":[[31,9],[89,9],[245,9],[289,11]]}}}],["scheduler.yieldfunc",{"_index":2253,"t":{"687":{"position":[[272,19]]}}}],["scheduler:add(funct",{"_index":2247,"t":{"685":{"position":[[402,24]]}}}],["scheduler:addloop(funct",{"_index":2244,"t":{"685":{"position":[[283,28]]},"687":{"position":[[331,28]]}}}],["scheduler:run",{"_index":2246,"t":{"685":{"position":[[356,15],[555,15]]},"687":{"position":[[404,15]]}}}],["scheme",{"_index":2268,"t":{"697":{"position":[[215,10]]}}}],["scope",{"_index":216,"t":{"14":{"position":[[812,5]]},"16":{"position":[[15,7]]},"18":{"position":[[386,5]]},"20":{"position":[[710,7],[1809,6]]},"36":{"position":[[274,5]]},"209":{"position":[[536,6]]}}}],["script",{"_index":35,"t":{"4":{"position":[[327,7]]},"28":{"position":[[133,7]]},"82":{"position":[[75,7],[679,6],[1168,7],[1363,6],[1582,6]]},"86":{"position":[[683,7]]},"92":{"position":[[427,7]]},"101":{"position":[[44,7]]},"134":{"position":[[452,7]]},"157":{"position":[[240,6]]}}}],["script.pluto:2",{"_index":1947,"t":{"531":{"position":[[334,15],[382,14]]}}}],["scripter",{"_index":776,"t":{"80":{"position":[[110,10],[351,11]]},"86":{"position":[[722,9]]},"147":{"position":[[366,9]]},"161":{"position":[[466,9]]},"163":{"position":[[416,9]]},"165":{"position":[[413,9]]}}}],["scripts/compile.php",{"_index":1099,"t":{"134":{"position":[[218,19]]}}}],["scripts/link_pluto.php",{"_index":1100,"t":{"134":{"position":[[248,22]]}}}],["scripts/link_plutoc.php",{"_index":1101,"t":{"134":{"position":[[281,23]]}}}],["scripts/link_static.php",{"_index":1102,"t":{"134":{"position":[[315,23]]}}}],["sdbm",{"_index":1738,"t":{"440":{"position":[[24,4]]}}}],["search",{"_index":899,"t":{"94":{"position":[[58,6],[246,6],[362,6]]},"227":{"position":[[52,8],[71,9],[137,9],[245,8],[272,6],[308,6],[338,9]]},"511":{"position":[[33,6]]},"639":{"position":[[62,8]]},"671":{"position":[[172,6]]}}}],["second",{"_index":701,"t":{"60":{"position":[[539,6]]},"375":{"position":[[357,6]]},"377":{"position":[[361,6]]},"379":{"position":[[93,6]]},"381":{"position":[[105,6]]},"383":{"position":[[96,6]]},"385":{"position":[[108,6]]},"571":{"position":[[260,7],[428,8]]},"603":{"position":[[8,7]]},"633":{"position":[[26,6]]},"635":{"position":[[26,6]]},"667":{"position":[[99,6]]},"687":{"position":[[235,6]]}}}],["secondari",{"_index":1693,"t":{"397":{"position":[[1129,9],[1260,10],[1334,11]]}}}],["secret",{"_index":1817,"t":{"478":{"position":[[439,6]]},"484":{"position":[[376,6]]},"490":{"position":[[450,6]]},"497":{"position":[[815,6],[974,6]]}}}],["section",{"_index":778,"t":{"80":{"position":[[287,8]]},"94":{"position":[[353,8]]}}}],["secur",{"_index":1007,"t":{"107":{"position":[[1150,9]]},"472":{"position":[[181,6],[298,7]]},"474":{"position":[[137,9]]},"621":{"position":[[673,6]]}}}],["see",{"_index":391,"t":{"20":{"position":[[2167,4]]},"109":{"position":[[50,3]]},"151":{"position":[[77,3]]},"169":{"position":[[88,3]]},"171":{"position":[[87,3]]},"223":{"position":[[460,3]]},"225":{"position":[[326,4]]},"248":{"position":[[422,4]]}}}],["seem",{"_index":844,"t":{"86":{"position":[[838,5]]},"159":{"position":[[29,5]]},"183":{"position":[[110,4]]}}}],["seen",{"_index":1166,"t":{"179":{"position":[[98,4]]},"403":{"position":[[3,4]]},"703":{"position":[[3,4]]}}}],["select",{"_index":571,"t":{"38":{"position":[[123,6]]},"94":{"position":[[203,6]]},"136":{"position":[[159,7]]}}}],["self.__par",{"_index":1412,"t":{"284":{"position":[[41,14]]}}}],["self.__parent.method(self",{"_index":597,"t":{"38":{"position":[[1297,26]]},"284":{"position":[[131,26]]}}}],["self.__parent.prop",{"_index":595,"t":{"38":{"position":[[1256,18]]}}}],["self.ag",{"_index":1418,"t":{"286":{"position":[[224,8],[268,8]]},"288":{"position":[[251,8]]}}}],["self.factor",{"_index":1565,"t":{"325":{"position":[[160,11]]}}}],["self.nam",{"_index":1399,"t":{"276":{"position":[[179,9]]},"278":{"position":[[146,9]]},"280":{"position":[[140,9]]},"284":{"position":[[210,9]]},"286":{"position":[[207,9]]}}}],["self.onev",{"_index":1297,"t":{"244":{"position":[[136,12]]}}}],["self:onevent(ev",{"_index":1298,"t":{"244":{"position":[[154,19]]}}}],["self:onevent?(ev",{"_index":1299,"t":{"244":{"position":[[199,20]]}}}],["semant",{"_index":288,"t":{"14":{"position":[[2518,10]]},"24":{"position":[[14,9]]},"86":{"position":[[194,8]]}}}],["semi",{"_index":1722,"t":{"430":{"position":[[28,4]]}}}],["semicolon",{"_index":1404,"t":{"278":{"position":[[89,11]]}}}],["send",{"_index":1948,"t":{"535":{"position":[[49,4]]},"615":{"position":[[0,5],[69,5]]},"621":{"position":[[299,5]]}}}],["sens",{"_index":1949,"t":{"535":{"position":[[114,5]]}}}],["sep",{"_index":2212,"t":{"669":{"position":[[459,3]]},"671":{"position":[[332,4]]}}}],["separ",{"_index":412,"t":{"20":{"position":[[2601,9]]},"58":{"position":[[31,8]]},"637":{"position":[[21,10],[69,9]]},"669":{"position":[[59,9],[469,9]]},"671":{"position":[[50,10],[102,9]]}}}],["sequenc",{"_index":356,"t":{"20":{"position":[[828,8]]},"72":{"position":[[87,9]]}}}],["seri",{"_index":1382,"t":{"272":{"position":[[2,6]]}}}],["serial",{"_index":2092,"t":{"595":{"position":[[48,10]]}}}],["server",{"_index":561,"t":{"36":{"position":[[62,7]]},"613":{"position":[[85,9]]}}}],["servic",{"_index":1792,"t":{"472":{"position":[[228,9]]},"535":{"position":[[831,8]]}}}],["session",{"_index":1804,"t":{"474":{"position":[[119,7]]}}}],["set",{"_index":217,"t":{"14":{"position":[[852,3]]},"38":{"position":[[805,4],[1065,4]]},"44":{"position":[[66,7]]},"46":{"position":[[61,7]]},"82":{"position":[[1326,8]]},"90":{"position":[[59,4]]},"101":{"position":[[222,3]]},"111":{"position":[[136,3]]},"207":{"position":[[143,9]]},"211":{"position":[[137,9]]},"221":{"position":[[131,9]]},"233":{"position":[[80,4]]},"242":{"position":[[418,3]]},"256":{"position":[[750,3]]},"258":{"position":[[137,9]]},"268":{"position":[[282,3]]},"292":{"position":[[238,9]]},"296":{"position":[[150,9]]},"423":{"position":[[45,3]]},"463":{"position":[[100,3]]},"465":{"position":[[102,3]]},"467":{"position":[[102,3]]},"469":{"position":[[102,3]]},"513":{"position":[[349,7]]},"535":{"position":[[511,3],[548,3],[761,3]]},"567":{"position":[[7,3]]},"571":{"position":[[7,3]]},"573":{"position":[[7,3],[333,3]]},"677":{"position":[[68,3]]},"689":{"position":[[64,3]]},"763":{"position":[[125,7]]}}}],["setup",{"_index":1571,"t":{"329":{"position":[[246,6]]}}}],["sever",{"_index":134,"t":{"10":{"position":[[19,7]]}}}],["sgvsbg8sifdvcmxkiq",{"_index":1601,"t":{"353":{"position":[[218,20]]},"357":{"position":[[287,18]]}}}],["sha",{"_index":1770,"t":{"463":{"position":[[24,3]]},"465":{"position":[[24,3]]},"467":{"position":[[24,3]]},"469":{"position":[[24,3]]}}}],["sha1",{"_index":1869,"t":{"499":{"position":[[65,6]]},"501":{"position":[[73,6]]}}}],["sha256",{"_index":1868,"t":{"499":{"position":[[49,7]]},"501":{"position":[[57,7],[887,8],[1061,8]]}}}],["shadow",{"_index":49,"t":{"6":{"position":[[15,6],[52,8]]},"14":{"position":[[291,7]]},"18":{"position":[[420,6]]},"20":{"position":[[1413,6],[1446,6],[1511,9],[1671,6],[1760,6],[1852,6]]},"145":{"position":[[190,7],[255,7]]},"147":{"position":[[172,7],[231,7]]},"149":{"position":[[212,7]]},"175":{"position":[[356,6],[414,6]]}}}],["share",{"_index":619,"t":{"40":{"position":[[101,6]]},"126":{"position":[[456,6]]},"128":{"position":[[119,6]]},"134":{"position":[[485,6]]},"140":{"position":[[420,5]]}}}],["short",{"_index":768,"t":{"78":{"position":[[172,5]]},"254":{"position":[[139,5]]}}}],["shorthand",{"_index":331,"t":{"20":{"position":[[31,9],[328,9]]},"30":{"position":[[1291,9]]},"60":{"position":[[257,9]]},"82":{"position":[[312,9]]},"256":{"position":[[441,9]]},"284":{"position":[[27,9],[117,9]]},"343":{"position":[[101,9],[181,9]]},"701":{"position":[[288,9]]}}}],["show",{"_index":686,"t":{"58":{"position":[[93,7]]}}}],["side",{"_index":1300,"t":{"244":{"position":[[261,4]]},"323":{"position":[[70,4]]},"327":{"position":[[14,4]]},"643":{"position":[[41,4]]},"645":{"position":[[42,4]]},"705":{"position":[[64,4]]}}}],["sig",{"_index":1875,"t":{"501":{"position":[[857,3],[1075,5]]}}}],["sign",{"_index":1073,"t":{"126":{"position":[[189,6]]},"499":{"position":[[31,5]]},"501":{"position":[[37,7],[186,6],[802,4]]}}}],["signatur",{"_index":1871,"t":{"501":{"position":[[144,9],[160,9],[244,9]]}}}],["signer'",{"_index":1870,"t":{"501":{"position":[[122,8]]}}}],["signific",{"_index":1714,"t":{"423":{"position":[[33,11]]}}}],["significantli",{"_index":1983,"t":{"535":{"position":[[2187,13]]},"567":{"position":[[462,13]]}}}],["silenc",{"_index":1155,"t":{"167":{"position":[[479,9]]}}}],["similar",{"_index":590,"t":{"38":{"position":[[914,8]]},"94":{"position":[[658,7]]},"264":{"position":[[0,7]]},"278":{"position":[[23,7]]},"359":{"position":[[0,7]]},"517":{"position":[[0,7]]},"521":{"position":[[54,7]]},"661":{"position":[[43,7]]}}}],["similarli",{"_index":1295,"t":{"244":{"position":[[0,10]]}}}],["simpl",{"_index":993,"t":{"107":{"position":[[623,6],[799,6]]},"231":{"position":[[264,6]]},"248":{"position":[[26,6]]},"288":{"position":[[115,6]]}}}],["simpli",{"_index":755,"t":{"76":{"position":[[89,6],[158,6]]},"80":{"position":[[183,6]]},"134":{"position":[[179,6]]},"138":{"position":[[8,6]]},"140":{"position":[[276,6]]},"177":{"position":[[48,6]]},"199":{"position":[[94,6]]},"242":{"position":[[411,6]]},"339":{"position":[[38,6]]}}}],["simplifi",{"_index":1349,"t":{"256":{"position":[[95,10]]}}}],["singl",{"_index":498,"t":{"28":{"position":[[44,6]]},"637":{"position":[[167,6]]},"669":{"position":[[286,6],[502,6]]},"733":{"position":[[1050,6]]}}}],["size",{"_index":2046,"t":{"569":{"position":[[10,4]]}}}],["skip",{"_index":1202,"t":{"203":{"position":[[69,4],[383,4]]},"205":{"position":[[111,4],[160,8]]}}}],["sleep",{"_index":646,"t":{"48":{"position":[[381,6]]},"599":{"position":[[42,5]]}}}],["slightli",{"_index":398,"t":{"20":{"position":[[2357,8]]},"54":{"position":[[250,8]]},"517":{"position":[[153,8]]}}}],["slower",{"_index":679,"t":{"54":{"position":[[259,6]]}}}],["small",{"_index":548,"t":{"34":{"position":[[200,5]]},"260":{"position":[[16,5]]},"569":{"position":[[147,5]]}}}],["smallest",{"_index":2400,"t":{"773":{"position":[[12,8]]}}}],["smooth",{"_index":835,"t":{"86":{"position":[[657,6]]}}}],["snippet",{"_index":625,"t":{"42":{"position":[[238,7]]},"92":{"position":[[190,8]]},"583":{"position":[[85,9]]}}}],["sock",{"_index":2138,"t":{"619":{"position":[[210,4]]}}}],["sock:unrecv(\"hello",{"_index":2140,"t":{"619":{"position":[[271,20]]}}}],["sock:unrecv(\"world",{"_index":2139,"t":{"619":{"position":[[250,20]]}}}],["socket",{"_index":219,"t":{"14":{"position":[[965,8]]},"535":{"position":[[990,7]]},"607":{"position":[[177,6]]},"611":{"position":[[257,7],[290,6]]},"613":{"position":[[0,6]]},"615":{"position":[[16,7],[40,6]]},"617":{"position":[[20,7],[44,6],[77,6],[212,6],[390,6]]},"619":{"position":[[125,6],[172,6]]},"621":{"position":[[44,7],[127,6],[365,6],[390,6],[535,6]]},"623":{"position":[[9,7],[33,6]]},"627":{"position":[[82,6],[103,6]]},"629":{"position":[[154,6]]}}}],["socket.bind(sch",{"_index":2115,"t":{"611":{"position":[[343,18]]}}}],["socket.connect",{"_index":2122,"t":{"613":{"position":[[41,14]]},"621":{"position":[[225,15]]}}}],["socket.connect(\"google.com",{"_index":2131,"t":{"617":{"position":[[432,28]]},"619":{"position":[[217,28]]}}}],["socket.connect(\"pluto",{"_index":2146,"t":{"621":{"position":[[577,21]]}}}],["socket.listen",{"_index":2112,"t":{"611":{"position":[[34,14]]},"625":{"position":[[43,14]]}}}],["socket.listen(80",{"_index":2156,"t":{"629":{"position":[[196,17]]}}}],["socket.recv",{"_index":2137,"t":{"619":{"position":[[96,12]]}}}],["socket.starttl",{"_index":130,"t":{"8":{"position":[[678,15]]}}}],["sole",{"_index":2142,"t":{"621":{"position":[[81,4]]},"669":{"position":[[266,6]]}}}],["solut",{"_index":974,"t":{"105":{"position":[[328,9]]},"227":{"position":[[127,9]]}}}],["someth",{"_index":367,"t":{"20":{"position":[[1352,10]]},"94":{"position":[[648,9]]},"157":{"position":[[34,9]]},"231":{"position":[[89,9]]},"242":{"position":[[505,10]]},"268":{"position":[[33,9]]},"391":{"position":[[832,10],[843,11],[970,9]]}}}],["sometim",{"_index":60,"t":{"6":{"position":[[199,9]]},"58":{"position":[[79,9]]},"357":{"position":[[52,9]]}}}],["somewher",{"_index":945,"t":{"101":{"position":[[323,9]]}}}],["sort",{"_index":981,"t":{"107":{"position":[[153,4]]},"319":{"position":[[347,8]]},"515":{"position":[[845,8]]}}}],["soup",{"_index":385,"t":{"20":{"position":[[2095,4]]},"38":{"position":[[346,4]]},"48":{"position":[[595,7]]},"321":{"position":[[337,4]]},"507":{"position":[[64,5]]}}}],["sourc",{"_index":754,"t":{"76":{"position":[[17,6]]},"80":{"position":[[142,6],[321,6]]},"88":{"position":[[123,6]]}}}],["space",{"_index":1187,"t":{"185":{"position":[[369,6]]}}}],["spaceship",{"_index":336,"t":{"20":{"position":[[149,9]]},"319":{"position":[[4,9]]},"521":{"position":[[69,9]]}}}],["special",{"_index":298,"t":{"18":{"position":[[8,11]]},"92":{"position":[[76,11]]},"175":{"position":[[458,7]]},"325":{"position":[[9,11]]},"331":{"position":[[0,7]]}}}],["specif",{"_index":702,"t":{"60":{"position":[[569,8]]},"111":{"position":[[251,8]]},"177":{"position":[[25,8]]},"601":{"position":[[64,8]]}}}],["specifi",{"_index":290,"t":{"14":{"position":[[2543,7]]},"82":{"position":[[275,7]]},"107":{"position":[[229,7],[279,7]]},"282":{"position":[[45,7]]},"286":{"position":[[20,7]]},"535":{"position":[[577,10]]},"633":{"position":[[48,9]]},"635":{"position":[[48,9]]},"663":{"position":[[30,9]]},"671":{"position":[[150,10]]},"723":{"position":[[86,7]]}}}],["speedup",{"_index":740,"t":{"72":{"position":[[679,8]]}}}],["spin",{"_index":2114,"t":{"611":{"position":[[89,8]]}}}],["split",{"_index":2168,"t":{"637":{"position":[[0,6],[58,6],[82,5],[143,9],[360,9]]},"671":{"position":[[0,6]]},"697":{"position":[[0,6]]}}}],["spuriou",{"_index":661,"t":{"50":{"position":[[287,8]]}}}],["src",{"_index":1105,"t":{"134":{"position":[[538,4]]},"138":{"position":[[142,4]]},"140":{"position":[[67,4],[128,3],[193,4]]}}}],["stack",{"_index":180,"t":{"12":{"position":[[694,5]]},"50":{"position":[[365,5]]},"86":{"position":[[408,5]]},"363":{"position":[[324,5]]},"365":{"position":[[343,5]]},"367":{"position":[[350,5]]},"369":{"position":[[462,5]]},"371":{"position":[[530,5]]},"373":{"position":[[355,5]]},"669":{"position":[[1216,5]]}}}],["standard",{"_index":80,"t":{"6":{"position":[[456,8]]},"8":{"position":[[439,8]]},"14":{"position":[[882,8]]},"20":{"position":[[2077,8]]},"30":{"position":[[1323,8]]},"38":{"position":[[381,8],[1497,8]]},"48":{"position":[[542,8],[578,8]]},"60":{"position":[[65,8]]},"86":{"position":[[127,8]]},"88":{"position":[[163,8]]},"181":{"position":[[8,8]]},"197":{"position":[[52,8]]},"290":{"position":[[632,8]]},"311":{"position":[[80,12]]}}}],["start",{"_index":160,"t":{"12":{"position":[[164,8]]},"14":{"position":[[343,8]]},"117":{"position":[[38,7]]},"119":{"position":[[23,7]]},"213":{"position":[[171,5]]},"246":{"position":[[222,5]]},"535":{"position":[[785,5]]},"671":{"position":[[228,6]]},"675":{"position":[[19,6]]}}}],["starttl",{"_index":2154,"t":{"627":{"position":[[162,8]]}}}],["state",{"_index":1158,"t":{"173":{"position":[[4,5]]},"175":{"position":[[16,7],[70,5],[193,5],[254,5]]},"298":{"position":[[42,5]]},"308":{"position":[[55,5]]},"539":{"position":[[60,5]]}}}],["statement",{"_index":175,"t":{"12":{"position":[[474,9]]},"14":{"position":[[14,9],[557,9],[604,9],[712,10]]},"16":{"position":[[42,10]]},"20":{"position":[[71,9],[133,9]]},"22":{"position":[[214,10]]},"30":{"position":[[293,9],[414,9],[1004,9]]},"36":{"position":[[87,9]]},"38":{"position":[[523,9],[891,9],[1022,10]]},"44":{"position":[[5,10]]},"46":{"position":[[5,10]]},"72":{"position":[[186,9],[250,10]]},"82":{"position":[[127,10],[1544,11]]},"88":{"position":[[244,11]]},"153":{"position":[[282,10]]},"183":{"position":[[63,10]]},"203":{"position":[[9,11],[184,11]]},"209":{"position":[[311,9]]},"242":{"position":[[790,11]]},"252":{"position":[[159,10]]},"272":{"position":[[198,10]]},"278":{"position":[[10,9],[280,9]]},"282":{"position":[[10,9]]},"313":{"position":[[267,11],[358,10]]}}}],["static",{"_index":208,"t":{"14":{"position":[[481,6]]},"38":{"position":[[1117,6]]},"101":{"position":[[523,6]]},"140":{"position":[[239,6]]},"274":{"position":[[51,7],[135,6]]},"276":{"position":[[383,6]]}}}],["statu",{"_index":1975,"t":{"535":{"position":[[1519,6],[1610,6]]}}}],["status_cod",{"_index":1985,"t":{"535":{"position":[[2261,12]]}}}],["status_text",{"_index":1986,"t":{"535":{"position":[[2283,11],[2363,15]]}}}],["step",{"_index":1639,"t":{"375":{"position":[[292,4],[300,5]]},"377":{"position":[[296,4],[304,5]]},"767":{"position":[[626,4]]}}}],["still",{"_index":289,"t":{"14":{"position":[[2537,5]]},"20":{"position":[[3545,5]]},"54":{"position":[[244,5]]},"78":{"position":[[153,5]]},"82":{"position":[[1649,5]]},"107":{"position":[[1015,6]]},"256":{"position":[[470,5]]},"333":{"position":[[148,5]]},"337":{"position":[[132,5]]}}}],["store",{"_index":1489,"t":{"308":{"position":[[80,6]]},"771":{"position":[[16,6]]},"773":{"position":[[27,6]]},"775":{"position":[[26,6]]}}}],["str",{"_index":712,"t":{"66":{"position":[[36,3],[43,3]]},"246":{"position":[[310,3]]},"428":{"position":[[160,3]]},"430":{"position":[[143,3]]},"432":{"position":[[200,3]]},"434":{"position":[[143,3]]},"436":{"position":[[144,3]]},"438":{"position":[[201,3]]},"440":{"position":[[200,3]]},"442":{"position":[[259,3]]},"444":{"position":[[205,3]]},"446":{"position":[[146,3]]},"448":{"position":[[203,3]]},"450":{"position":[[203,3]]},"452":{"position":[[203,3]]},"454":{"position":[[204,3]]},"456":{"position":[[148,3]]},"458":{"position":[[148,3]]},"460":{"position":[[153,3]]}}}],["straightforward",{"_index":400,"t":{"20":{"position":[[2390,15]]}}}],["strawberri",{"_index":1440,"t":{"294":{"position":[[242,12]]}}}],["stream",{"_index":2002,"t":{"547":{"position":[[94,7]]},"549":{"position":[[71,7]]},"551":{"position":[[34,7]]},"553":{"position":[[34,7]]},"555":{"position":[[34,7]]},"563":{"position":[[80,7]]},"565":{"position":[[80,7]]},"567":{"position":[[64,7]]},"569":{"position":[[69,7]]},"571":{"position":[[73,7]]}}}],["strict",{"_index":1839,"t":{"493":{"position":[[66,6]]}}}],["string",{"_index":9,"t":{"4":{"position":[[41,6],[207,7]]},"14":{"position":[[2240,7]]},"20":{"position":[[855,8],[2545,6]]},"22":{"position":[[84,6]]},"26":{"position":[[0,6],[39,7],[118,6],[156,6]]},"28":{"position":[[6,6],[58,7]]},"30":{"position":[[646,6]]},"40":{"position":[[267,7]]},"46":{"position":[[254,6]]},"48":{"position":[[43,7],[51,7]]},"64":{"position":[[76,6]]},"72":{"position":[[398,6],[462,6],[728,6]]},"88":{"position":[[304,6]]},"147":{"position":[[529,9]]},"151":{"position":[[290,6]]},"227":{"position":[[45,6]]},"229":{"position":[[51,7],[91,6],[129,7]]},"233":{"position":[[408,6]]},"246":{"position":[[14,7],[100,6],[235,7]]},"248":{"position":[[0,6],[233,6],[441,6],[584,6]]},"302":{"position":[[47,6],[135,7],[146,8]]},"304":{"position":[[0,6],[129,7],[171,7],[266,6],[384,7]]},"347":{"position":[[26,7],[55,6]]},"349":{"position":[[25,7],[54,6]]},"353":{"position":[[25,7],[54,6]]},"355":{"position":[[25,7],[54,6]]},"357":{"position":[[28,7],[119,6]]},"359":{"position":[[68,6]]},"363":{"position":[[366,7],[406,8]]},"365":{"position":[[385,7],[425,8]]},"367":{"position":[[392,7],[432,8]]},"369":{"position":[[504,7],[544,8]]},"371":{"position":[[572,7],[612,8]]},"373":{"position":[[397,7],[437,8]]},"391":{"position":[[938,7]]},"395":{"position":[[10,6]]},"403":{"position":[[52,6]]},"428":{"position":[[7,6],[99,6]]},"430":{"position":[[7,6],[82,6]]},"432":{"position":[[7,6],[82,6]]},"434":{"position":[[7,6],[82,6]]},"436":{"position":[[7,6],[83,6]]},"438":{"position":[[7,6],[83,6]]},"440":{"position":[[7,6],[82,6]]},"442":{"position":[[7,6],[83,6]]},"444":{"position":[[7,6],[86,6]]},"446":{"position":[[7,6],[85,6]]},"448":{"position":[[7,6],[85,6]]},"450":{"position":[[7,6],[85,6]]},"452":{"position":[[7,6],[85,6]]},"454":{"position":[[7,6],[86,6]]},"456":{"position":[[7,6],[87,6]]},"458":{"position":[[7,6],[87,6]]},"460":{"position":[[7,6],[92,6]]},"463":{"position":[[7,6],[79,6]]},"465":{"position":[[7,6],[81,6]]},"467":{"position":[[7,6],[81,6]]},"469":{"position":[[7,6],[81,6]]},"488":{"position":[[326,8]]},"509":{"position":[[24,6]]},"513":{"position":[[75,6]]},"515":{"position":[[112,6]]},"523":{"position":[[39,6]]},"531":{"position":[[101,6]]},"535":{"position":[[72,7],[1507,7],[1627,7],[1696,7]]},"547":{"position":[[74,6]]},"549":{"position":[[51,6]]},"551":{"position":[[14,6]]},"553":{"position":[[14,6]]},"555":{"position":[[14,6]]},"559":{"position":[[53,6]]},"561":{"position":[[99,6]]},"563":{"position":[[60,6],[200,6]]},"565":{"position":[[60,6],[99,6]]},"567":{"position":[[44,6]]},"569":{"position":[[49,6]]},"571":{"position":[[53,6]]},"593":{"position":[[10,6],[64,7],[144,6]]},"595":{"position":[[79,7],[786,9],[1077,9]]},"617":{"position":[[197,7]]},"631":{"position":[[51,6]]},"637":{"position":[[9,6],[48,6],[90,6],[117,7],[155,6],[372,6]]},"641":{"position":[[47,7],[71,6],[90,6],[162,7]]},"643":{"position":[[51,7],[75,6],[94,6],[166,7]]},"645":{"position":[[52,7],[76,6],[95,6],[167,7]]},"647":{"position":[[12,6],[77,6]]},"649":{"position":[[12,6],[81,6]]},"651":{"position":[[12,6],[82,6]]},"653":{"position":[[12,6],[81,6]]},"655":{"position":[[12,6],[84,6]]},"657":{"position":[[15,6],[85,6]]},"663":{"position":[[18,6],[81,6],[155,6],[212,6],[268,7],[355,6],[440,7]]},"665":{"position":[[12,6],[57,6]]},"667":{"position":[[13,8],[76,6],[106,6]]},"669":{"position":[[103,7],[240,7],[345,6],[445,6],[519,7],[605,6],[1148,7]]},"671":{"position":[[9,6],[77,6],[129,6],[261,8]]},"673":{"position":[[12,6],[55,6]]},"675":{"position":[[12,6],[57,6]]},"693":{"position":[[22,7],[46,6]]},"695":{"position":[[16,6],[51,7],[75,6]]},"703":{"position":[[52,6]]},"731":{"position":[[10,6],[55,6],[124,6]]},"767":{"position":[[564,7]]}}}],["string(10",{"_index":1682,"t":{"397":{"position":[[355,10]]}}}],["string(11",{"_index":1537,"t":{"321":{"position":[[253,10]]}}}],["string(13",{"_index":1550,"t":{"321":{"position":[[478,10],[530,10]]},"369":{"position":[[435,10]]},"375":{"position":[[615,10]]},"397":{"position":[[988,10],[1211,10]]}}}],["string(15",{"_index":1642,"t":{"375":{"position":[[658,10]]},"397":{"position":[[496,10],[1249,10]]}}}],["string(16",{"_index":1828,"t":{"484":{"position":[[511,10]]}}}],["string(2",{"_index":1645,"t":{"375":{"position":[[850,9]]}}}],["string(21",{"_index":1926,"t":{"515":{"position":[[1006,10]]}}}],["string(23",{"_index":1554,"t":{"321":{"position":[[566,10]]}}}],["string(3",{"_index":1905,"t":{"515":{"position":[[333,9]]}}}],["string(4",{"_index":1683,"t":{"397":{"position":[[395,9]]},"515":{"position":[[361,9]]},"697":{"position":[[228,9]]},"733":{"position":[[598,9],[947,9],[1222,9]]}}}],["string(40",{"_index":1546,"t":{"321":{"position":[[397,10]]}}}],["string(5",{"_index":1648,"t":{"375":{"position":[[918,9]]},"397":{"position":[[461,9],[1356,9]]},"697":{"position":[[393,9]]},"733":{"position":[[466,9],[1287,9],[1339,9]]},"753":{"position":[[315,9],[346,9],[431,9],[462,9]]}}}],["string(56",{"_index":1540,"t":{"321":{"position":[[300,10]]}}}],["string(6",{"_index":1647,"t":{"375":{"position":[[872,9],[943,9]]},"397":{"position":[[1310,9]]},"697":{"position":[[470,9]]}}}],["string(7",{"_index":2351,"t":{"733":{"position":[[398,9],[523,9],[647,9],[996,9]]}}}],["string(8",{"_index":2269,"t":{"697":{"position":[[261,9],[298,9],[335,9]]}}}],["string(9",{"_index":2274,"t":{"697":{"position":[[428,9]]}}}],["string.char(math.random(0",{"_index":1819,"t":{"478":{"position":[[493,26]]},"490":{"position":[[536,26]]}}}],["string.find",{"_index":438,"t":{"20":{"position":[[3187,11],[3317,11]]},"639":{"position":[[26,11]]}}}],["string.find_first_not_of",{"_index":437,"t":{"20":{"position":[[3150,24]]}}}],["string.find_first_of",{"_index":436,"t":{"20":{"position":[[3127,20]]}}}],["string.find_last_not_of",{"_index":440,"t":{"20":{"position":[[3232,23]]}}}],["string.find_last_of",{"_index":439,"t":{"20":{"position":[[3210,19]]}}}],["string.format",{"_index":443,"t":{"20":{"position":[[3369,13]]},"659":{"position":[[8,14]]}}}],["string.formatint",{"_index":406,"t":{"20":{"position":[[2476,16]]},"669":{"position":[[1046,18],[1125,16],[1250,18]]}}}],["string.gsub",{"_index":2197,"t":{"661":{"position":[[54,12]]}}}],["string.lfind",{"_index":441,"t":{"20":{"position":[[3292,12]]}}}],["string.low",{"_index":495,"t":{"24":{"position":[[396,12]]},"60":{"position":[[519,12]]}}}],["string.partition(",{"_index":2230,"t":{"671":{"position":[[473,19],[656,19]]}}}],["string.replac",{"_index":83,"t":{"6":{"position":[[479,14]]},"20":{"position":[[2338,14]]}}}],["string.rfind",{"_index":427,"t":{"20":{"position":[[2966,12],[3268,12]]}}}],["string.split",{"_index":707,"t":{"64":{"position":[[8,12]]}}}],["string.split(",{"_index":2170,"t":{"637":{"position":[[249,15],[504,15]]}}}],["string.sub",{"_index":1310,"t":{"246":{"position":[[88,11]]}}}],["string.trunc",{"_index":397,"t":{"20":{"position":[[2316,15]]}}}],["string.uformat",{"_index":605,"t":{"38":{"position":[[1545,14]]}}}],["string.upp",{"_index":494,"t":{"24":{"position":[[381,12]]},"60":{"position":[[504,12]]}}}],["string|int",{"_index":520,"t":{"30":{"position":[[768,10]]},"304":{"position":[[228,10],[338,11]]}}}],["strip",{"_index":2173,"t":{"641":{"position":[[0,6],[81,6],[114,6]]},"643":{"position":[[0,6],[85,6],[118,6]]},"645":{"position":[[0,6],[86,6],[119,6]]}}}],["structur",{"_index":1115,"t":{"140":{"position":[[377,9]]}}}],["studio",{"_index":910,"t":{"94":{"position":[[290,7]]},"136":{"position":[[80,7],[102,7]]}}}],["stupid",{"_index":975,"t":{"105":{"position":[[366,6]]},"157":{"position":[[44,6],[65,6]]}}}],["style",{"_index":641,"t":{"48":{"position":[[149,5]]}}}],["sub",{"_index":308,"t":{"18":{"position":[[257,3]]},"559":{"position":[[130,3]]}}}],["sublim",{"_index":892,"t":{"92":{"position":[[482,7]]},"94":{"position":[[148,7]]}}}],["subsequ",{"_index":1082,"t":{"126":{"position":[[624,10]]},"535":{"position":[[2140,10]]}}}],["subset",{"_index":576,"t":{"38":{"position":[[336,6]]}}}],["substitut",{"_index":2199,"t":{"661":{"position":[[194,10],[536,10]]}}}],["substr",{"_index":1247,"t":{"227":{"position":[[153,10]]},"391":{"position":[[48,9],[107,9],[123,9],[437,10]]},"637":{"position":[[384,10]]},"661":{"position":[[8,10],[32,10],[172,9],[223,10]]},"665":{"position":[[30,10],[78,9]]},"671":{"position":[[272,9],[349,9]]},"673":{"position":[[76,9]]},"675":{"position":[[78,9]]}}}],["subtract",{"_index":1502,"t":{"313":{"position":[[70,12]]},"411":{"position":[[9,11]]}}}],["succe",{"_index":759,"t":{"76":{"position":[[230,8]]}}}],["success",{"_index":977,"t":{"107":{"position":[[55,10]]},"478":{"position":[[313,8]]},"484":{"position":[[250,8]]},"490":{"position":[[315,8]]},"535":{"position":[[1475,8]]},"607":{"position":[[196,8]]},"609":{"position":[[110,8]]},"621":{"position":[[322,8]]}}}],["successfulli",{"_index":1872,"t":{"501":{"position":[[264,13]]},"547":{"position":[[186,12]]},"557":{"position":[[115,12]]}}}],["successor",{"_index":865,"t":{"90":{"position":[[117,10]]}}}],["succinctli",{"_index":1534,"t":{"321":{"position":[[59,11]]}}}],["such",{"_index":363,"t":{"20":{"position":[[1119,4]]},"76":{"position":[[72,4]]},"88":{"position":[[229,4]]},"92":{"position":[[161,4],[286,4],[375,4]]},"101":{"position":[[86,4]]},"181":{"position":[[618,4]]},"185":{"position":[[80,4]]},"225":{"position":[[643,4]]},"268":{"position":[[310,4]]},"319":{"position":[[387,4]]},"343":{"position":[[40,4]]},"486":{"position":[[102,4]]},"537":{"position":[[250,4]]},"737":{"position":[[69,4]]}}}],["sudo",{"_index":1065,"t":{"126":{"position":[[109,4],[293,4],[356,4],[372,4]]},"134":{"position":[[114,4],[151,4]]}}}],["suffix",{"_index":545,"t":{"34":{"position":[[64,7]]},"521":{"position":[[245,7]]},"673":{"position":[[31,7],[86,6]]}}}],["sugar",{"_index":1507,"t":{"313":{"position":[[597,6]]}}}],["suggest",{"_index":559,"t":{"36":{"position":[[9,11]]}}}],["suit",{"_index":1529,"t":{"319":{"position":[[303,6]]}}}],["suitabl",{"_index":2209,"t":{"669":{"position":[[144,8]]}}}],["sum",{"_index":2297,"t":{"711":{"position":[[13,3]]}}}],["sun",{"_index":682,"t":{"54":{"position":[[310,4]]},"140":{"position":[[19,3],[49,4],[132,3],[142,3],[319,4]]}}}],["superb",{"_index":698,"t":{"60":{"position":[[429,6]]}}}],["superset",{"_index":852,"t":{"88":{"position":[[11,8]]},"693":{"position":[[164,8]]},"695":{"position":[[203,8]]}}}],["support",{"_index":89,"t":{"6":{"position":[[532,8]]},"14":{"position":[[472,8],[1752,8]]},"20":{"position":[[599,7],[2493,9],[2573,8]]},"30":{"position":[[308,8],[428,8],[476,8],[529,8],[670,7],[741,7],[881,7]]},"38":{"position":[[1038,7]]},"40":{"position":[[22,7],[47,8]]},"42":{"position":[[22,7]]},"44":{"position":[[20,8]]},"46":{"position":[[20,8]]},"48":{"position":[[105,7]]},"72":{"position":[[139,7],[576,7]]},"82":{"position":[[811,8]]},"92":{"position":[[88,7]]},"103":{"position":[[506,7]]},"140":{"position":[[6,8]]},"225":{"position":[[587,7]]},"227":{"position":[[37,7]]},"248":{"position":[[646,8]]},"252":{"position":[[175,7],[960,8]]},"278":{"position":[[295,8]]},"282":{"position":[[25,8]]},"284":{"position":[[67,8]]},"319":{"position":[[264,8]]},"589":{"position":[[13,7],[223,7]]},"705":{"position":[[18,7]]}}}],["sure",{"_index":1209,"t":{"203":{"position":[[466,4]]}}}],["sven",{"_index":1293,"t":{"242":{"position":[[906,4]]}}}],["swap",{"_index":1469,"t":{"298":{"position":[[667,4]]}}}],["switch",{"_index":66,"t":{"6":{"position":[[263,6]]},"8":{"position":[[426,6]]},"12":{"position":[[467,6],[490,6]]},"14":{"position":[[771,6]]},"16":{"position":[[35,6]]},"18":{"position":[[140,6]]},"20":{"position":[[6,6],[64,6],[908,6],[1886,6]]},"36":{"position":[[80,6],[228,6]]},"60":{"position":[[222,6]]},"66":{"position":[[537,6],[589,6]]},"78":{"position":[[42,6]]},"82":{"position":[[201,7],[240,6],[400,7],[451,7],[508,7],[593,7]]},"84":{"position":[[125,6]]},"88":{"position":[[237,6]]},"113":{"position":[[48,6]]},"167":{"position":[[59,6],[91,6],[520,6]]},"203":{"position":[[177,6]]},"250":{"position":[[0,6],[59,6]]},"252":{"position":[[22,6],[152,6],[218,6],[543,6],[807,6]]},"254":{"position":[[57,6],[176,6],[394,6]]},"256":{"position":[[149,6]]},"258":{"position":[[44,7],[77,6]]},"294":{"position":[[128,6]]}}}],["switch/cas",{"_index":731,"t":{"72":{"position":[[238,11]]}}}],["symbol",{"_index":961,"t":{"103":{"position":[[244,7]]},"181":{"position":[[140,6]]},"248":{"position":[[490,7]]},"585":{"position":[[263,7]]}}}],["symlink",{"_index":2032,"t":{"563":{"position":[[179,9]]}}}],["syntact",{"_index":724,"t":{"66":{"position":[[558,9]]},"159":{"position":[[35,13]]},"313":{"position":[[587,9]]}}}],["syntax",{"_index":332,"t":{"20":{"position":[[53,6]]},"26":{"position":[[168,6]]},"30":{"position":[[1307,6]]},"36":{"position":[[171,6]]},"38":{"position":[[85,6],[185,6],[562,6],[611,6],[641,6],[778,6]]},"40":{"position":[[213,6]]},"60":{"position":[[275,6]]},"88":{"position":[[220,8]]},"92":{"position":[[170,6]]},"94":{"position":[[88,6],[439,6]]},"213":{"position":[[25,7]]},"215":{"position":[[43,6]]},"223":{"position":[[85,7]]},"225":{"position":[[605,6]]},"242":{"position":[[202,7]]},"248":{"position":[[45,6]]},"254":{"position":[[162,7]]},"256":{"position":[[463,6]]},"272":{"position":[[465,6]]},"274":{"position":[[31,7]]},"284":{"position":[[88,7]]},"288":{"position":[[122,6]]},"292":{"position":[[12,6]]},"325":{"position":[[21,6]]},"343":{"position":[[117,6],[197,6]]},"583":{"position":[[17,6]]},"585":{"position":[[76,6],[89,6]]},"587":{"position":[[79,6],[92,6],[266,6]]}}}],["system",{"_index":887,"t":{"92":{"position":[[406,7]]},"107":{"position":[[530,6]]},"140":{"position":[[29,6]]},"472":{"position":[[85,8],[203,6]]},"659":{"position":[[111,8]]},"723":{"position":[[139,7],[178,6]]}}}],["system'",{"_index":1789,"t":{"472":{"position":[[47,8]]}}}],["t",{"_index":1125,"t":{"149":{"position":[[98,1]]},"191":{"position":[[41,1],[248,1]]},"193":{"position":[[41,1],[273,1]]},"195":{"position":[[254,1]]},"223":{"position":[[114,1],[152,1],[274,1],[324,1]]},"227":{"position":[[381,1],[427,2],[461,2],[478,2],[512,2],[533,2],[579,2],[605,2],[670,2]]},"254":{"position":[[354,1],[456,2]]},"272":{"position":[[91,1],[252,1]]},"274":{"position":[[129,1]]},"339":{"position":[[132,1],[184,1],[356,1]]},"343":{"position":[[216,1]]},"513":{"position":[[122,1]]},"515":{"position":[[160,1]]},"517":{"position":[[235,1]]},"585":{"position":[[36,1],[172,1]]},"589":{"position":[[307,2]]},"593":{"position":[[593,1]]},"657":{"position":[[120,2]]},"737":{"position":[[92,1],[108,1],[148,1]]},"741":{"position":[[133,1]]},"743":{"position":[[80,1]]},"745":{"position":[[111,1]]},"747":{"position":[[76,1]]},"749":{"position":[[163,1]]},"753":{"position":[[112,1],[224,2]]},"761":{"position":[[278,1]]},"771":{"position":[[330,1]]},"773":{"position":[[83,1]]},"775":{"position":[[82,1]]}}}],["t.age",{"_index":1199,"t":{"193":{"position":[[224,5]]},"195":{"position":[[197,5]]}}}],["t.key",{"_index":2361,"t":{"745":{"position":[[192,5]]}}}],["t.name",{"_index":1198,"t":{"193":{"position":[[205,6]]},"195":{"position":[[180,6]]}}}],["t.prop",{"_index":511,"t":{"30":{"position":[[317,8]]}}}],["t.say(\"hello",{"_index":1394,"t":{"274":{"position":[[177,14]]}}}],["t1",{"_index":2374,"t":{"757":{"position":[[180,2]]}}}],["t:clear",{"_index":2359,"t":{"743":{"position":[[135,9]]}}}],["t:concat(\"\\n",{"_index":1892,"t":{"513":{"position":[[200,14]]}}}],["t:contains(1",{"_index":1891,"t":{"513":{"position":[[186,13]]}}}],["t:f1",{"_index":1384,"t":{"272":{"position":[[107,9]]}}}],["t:f2",{"_index":1385,"t":{"272":{"position":[[130,9]]}}}],["t:f3",{"_index":1386,"t":{"272":{"position":[[153,9]]}}}],["t:foreach(print",{"_index":2378,"t":{"761":{"position":[[294,16]]}}}],["t:getval",{"_index":1343,"t":{"254":{"position":[[412,11],[518,13]]}}}],["t:reduce(|valu",{"_index":2399,"t":{"771":{"position":[[346,16]]}}}],["t:revers",{"_index":2369,"t":{"753":{"position":[[197,11]]}}}],["t:sort",{"_index":2354,"t":{"737":{"position":[[112,11]]}}}],["t=tabl",{"_index":1031,"t":{"113":{"position":[[418,8]]}}}],["t[#t",{"_index":680,"t":{"54":{"position":[[271,4]]}}}],["t['print",{"_index":1029,"t":{"113":{"position":[[380,10]]}}}],["t\\t\\t\\t",{"_index":2194,"t":{"657":{"position":[[129,9]]}}}],["tab",{"_index":882,"t":{"92":{"position":[[240,3]]},"393":{"position":[[106,4]]}}}],["tabl",{"_index":309,"t":{"18":{"position":[[261,6]]},"20":{"position":[[426,6],[764,6],[1599,6],[1741,5],[1749,6]]},"30":{"position":[[6,5],[67,6],[131,6],[919,5],[1149,5],[1301,5]]},"32":{"position":[[225,5]]},"34":{"position":[[35,5],[385,5]]},"38":{"position":[[308,5],[767,10],[798,6],[810,5],[926,5],[1153,5],[1335,5]]},"40":{"position":[[30,6]]},"72":{"position":[[202,5],[643,5]]},"78":{"position":[[183,5]]},"147":{"position":[[96,5],[190,5],[272,7],[520,8]]},"149":{"position":[[67,5],[193,5]]},"189":{"position":[[87,6]]},"191":{"position":[[22,6]]},"193":{"position":[[22,6]]},"195":{"position":[[26,5]]},"197":{"position":[[0,5]]},"209":{"position":[[91,6]]},"223":{"position":[[51,6]]},"227":{"position":[[65,5],[221,7],[350,5]]},"229":{"position":[[40,5],[206,6]]},"231":{"position":[[65,6]]},"272":{"position":[[63,6],[224,6]]},"274":{"position":[[109,7]]},"278":{"position":[[36,5]]},"288":{"position":[[84,5]]},"290":{"position":[[50,5]]},"298":{"position":[[0,6],[149,6],[213,6],[294,6],[373,6],[554,6],[635,6],[904,6]]},"300":{"position":[[25,5]]},"304":{"position":[[46,5]]},"308":{"position":[[272,6],[307,6]]},"329":{"position":[[23,6],[105,5],[312,5]]},"333":{"position":[[33,5],[136,6]]},"339":{"position":[[58,6]]},"341":{"position":[[209,5]]},"343":{"position":[[111,5],[191,5]]},"375":{"position":[[66,7],[141,6],[211,7],[268,6]]},"377":{"position":[[70,7],[145,6],[215,7],[272,6]]},"395":{"position":[[48,5]]},"397":{"position":[[10,5],[132,6],[610,5]]},"493":{"position":[[194,7]]},"513":{"position":[[0,6]]},"519":{"position":[[10,5]]},"535":{"position":[[137,5],[226,5],[368,5],[1548,5]]},"559":{"position":[[171,5]]},"593":{"position":[[75,5],[497,6]]},"595":{"position":[[174,6],[451,6],[989,8]]},"637":{"position":[[136,6]]},"731":{"position":[[46,5]]},"733":{"position":[[10,5],[744,6]]},"735":{"position":[[51,5]]},"737":{"position":[[47,5]]},"739":{"position":[[45,5],[82,6],[106,6]]},"741":{"position":[[38,6],[105,5]]},"743":{"position":[[29,6],[52,5]]},"745":{"position":[[10,5],[57,5],[92,6]]},"747":{"position":[[15,5],[48,5]]},"749":{"position":[[15,5],[58,5]]},"751":{"position":[[26,6],[49,5]]},"753":{"position":[[33,6],[56,5],[93,6]]},"755":{"position":[[48,5],[85,6],[109,6]]},"757":{"position":[[32,5],[102,6],[128,6]]},"759":{"position":[[48,5],[85,6],[109,6]]},"761":{"position":[[112,6]]},"763":{"position":[[244,6],[510,6]]},"765":{"position":[[47,5],[84,6],[108,6]]},"767":{"position":[[84,6],[271,6]]},"769":{"position":[[44,5],[81,6],[105,6]]},"771":{"position":[[30,6],[137,6]]},"773":{"position":[[41,6],[64,6]]},"775":{"position":[[40,6],[63,6]]},"777":{"position":[[99,6]]}}}],["table'",{"_index":1636,"t":{"375":{"position":[[94,7]]},"377":{"position":[[98,7]]}}}],["table.checkal",{"_index":239,"t":{"14":{"position":[[1410,14]]}}}],["table.clear",{"_index":12,"t":{"4":{"position":[[81,11]]},"14":{"position":[[1304,11]]}}}],["table.concat(t",{"_index":1896,"t":{"513":{"position":[[270,15]]}}}],["table.contain",{"_index":470,"t":{"22":{"position":[[97,14]]},"66":{"position":[[423,14]]},"72":{"position":[[333,14]]}}}],["table.contains(t",{"_index":1895,"t":{"513":{"position":[[249,17]]}}}],["table.filt",{"_index":231,"t":{"14":{"position":[[1223,15]]},"20":{"position":[[2644,12]]},"765":{"position":[[19,13]]}}}],["table.find",{"_index":238,"t":{"14":{"position":[[1384,10]]}}}],["table.freez",{"_index":1463,"t":{"298":{"position":[[403,14]]},"300":{"position":[[189,12]]},"745":{"position":[[115,19]]}}}],["table.freeze(_g",{"_index":1459,"t":{"298":{"position":[[220,16]]}}}],["table.freeze(t",{"_index":2360,"t":{"745":{"position":[[138,17]]},"747":{"position":[[83,15]]}}}],["table.insert",{"_index":671,"t":{"52":{"position":[[110,12]]},"54":{"position":[[207,13]]}}}],["table.map",{"_index":230,"t":{"14":{"position":[[1209,13]]},"20":{"position":[[2663,9]]},"769":{"position":[[19,10]]}}}],["table.max",{"_index":237,"t":{"14":{"position":[[1358,9]]}}}],["table.min",{"_index":236,"t":{"14":{"position":[[1345,10]]},"86":{"position":[[159,10]]}}}],["table.reduc",{"_index":235,"t":{"14":{"position":[[1331,13]]}}}],["table.remov",{"_index":659,"t":{"50":{"position":[[251,14]]}}}],["table.reord",{"_index":233,"t":{"14":{"position":[[1255,16]]},"20":{"position":[[2699,13]]},"759":{"position":[[19,14]]},"763":{"position":[[166,13]]}}}],["table.revers",{"_index":232,"t":{"14":{"position":[[1239,15]]},"20":{"position":[[2679,13]]},"755":{"position":[[19,14]]}}}],["table.s",{"_index":234,"t":{"14":{"position":[[1278,10]]}}}],["table.sort",{"_index":229,"t":{"14":{"position":[[1194,14]]},"739":{"position":[[19,11]]}}}],["table.unpack(t",{"_index":1195,"t":{"191":{"position":[[193,15]]}}}],["tag",{"_index":1835,"t":{"488":{"position":[[373,4]]},"490":{"position":[[219,3],[244,3],[622,3],[785,5]]},"731":{"position":[[215,3],[244,3],[330,3]]},"733":{"position":[[388,7],[456,7],[588,7],[937,7],[1212,7],[1277,7],[1329,7]]}}}],["tail",{"_index":1616,"t":{"363":{"position":[[435,8]]},"365":{"position":[[454,8]]},"367":{"position":[[461,8]]},"369":{"position":[[573,8]]},"371":{"position":[[641,8]]},"373":{"position":[[466,8]]}}}],["tailor",{"_index":2067,"t":{"583":{"position":[[58,8]]}}}],["take",{"_index":327,"t":{"18":{"position":[[622,4]]},"44":{"position":[[112,6]]},"46":{"position":[[193,6]]},"60":{"position":[[532,4]]},"185":{"position":[[357,4]]},"225":{"position":[[336,4]]},"231":{"position":[[28,5]]},"474":{"position":[[32,4]]},"480":{"position":[[30,5]]},"535":{"position":[[2016,4]]},"633":{"position":[[18,5]]},"635":{"position":[[18,5]]},"679":{"position":[[16,5]]},"701":{"position":[[16,5]]},"761":{"position":[[211,5]]},"763":{"position":[[436,5]]},"767":{"position":[[197,5],[685,4]]}}}],["taken",{"_index":1969,"t":{"535":{"position":[[1155,5],[1207,5]]}}}],["task",{"_index":1318,"t":{"246":{"position":[[425,4]]},"288":{"position":[[17,4]]}}}],["tcp",{"_index":1981,"t":{"535":{"position":[[2066,3]]},"607":{"position":[[14,3]]},"617":{"position":[[150,4]]}}}],["tcp/80",{"_index":2159,"t":{"629":{"position":[[239,8]]}}}],["tee",{"_index":1066,"t":{"126":{"position":[[114,3],[298,3]]}}}],["tell",{"_index":1046,"t":{"115":{"position":[[57,5]]},"205":{"position":[[57,5]]}}}],["temporari",{"_index":529,"t":{"30":{"position":[[1139,9]]}}}],["termux",{"_index":1086,"t":{"130":{"position":[[26,6]]}}}],["ternari",{"_index":114,"t":{"8":{"position":[[403,7]]},"10":{"position":[[130,7]]},"12":{"position":[[111,7],[208,7]]},"22":{"position":[[39,7]]},"60":{"position":[[267,7]]},"72":{"position":[[151,7]]},"256":{"position":[[10,7]]},"266":{"position":[[0,7]]},"268":{"position":[[336,7]]}}}],["test",{"_index":927,"t":{"96":{"position":[[47,6]]}}}],["test.pluto:2",{"_index":825,"t":{"86":{"position":[[334,13],[454,13]]}}}],["test.pluto:3",{"_index":1641,"t":{"375":{"position":[[551,12]]},"381":{"position":[[316,12]]},"669":{"position":[[1088,13],[1269,13]]}}}],["test.pluto:4",{"_index":830,"t":{"86":{"position":[[484,13]]},"363":{"position":[[238,12]]},"365":{"position":[[251,12],[473,13]]},"367":{"position":[[257,12],[480,13]]},"369":{"position":[[342,12],[592,13]]},"371":{"position":[[428,12],[660,13]]},"373":{"position":[[262,12],[485,13]]},"375":{"position":[[778,12]]},"379":{"position":[[288,12]]},"383":{"position":[[301,12]]},"387":{"position":[[398,12]]},"389":{"position":[[404,12]]},"391":{"position":[[626,12],[877,12]]}}}],["text",{"_index":893,"t":{"92":{"position":[[490,4]]},"94":{"position":[[156,5]]},"187":{"position":[[134,4],[183,4],[300,4],[317,4],[328,4],[380,4]]},"535":{"position":[[1617,4]]},"567":{"position":[[281,4],[317,4],[355,5]]},"661":{"position":[[92,4]]},"731":{"position":[[311,5],[400,4]]}}}],["textmat",{"_index":922,"t":{"94":{"position":[[510,8],[591,8]]}}}],["thank",{"_index":183,"t":{"12":{"position":[[760,6]]}}}],["that'",{"_index":1461,"t":{"298":{"position":[[341,6]]}}}],["theoret",{"_index":876,"t":{"92":{"position":[[19,13]]}}}],["there'",{"_index":1090,"t":{"132":{"position":[[56,7]]},"136":{"position":[[35,7]]},"167":{"position":[[20,7]]},"302":{"position":[[282,7]]}}}],["there.\":split",{"_index":1644,"t":{"375":{"position":[[709,15],[736,15]]},"377":{"position":[[554,15],[581,15]]}}}],["therefor",{"_index":1269,"t":{"237":{"position":[[55,9]]}}}],["they'll",{"_index":1508,"t":{"313":{"position":[[604,7]]}}}],["they'r",{"_index":1291,"t":{"242":{"position":[[820,7]]},"244":{"position":[[471,7]]},"311":{"position":[[39,7]]},"317":{"position":[[245,7]]}}}],["thing",{"_index":761,"t":{"76":{"position":[[259,6]]},"209":{"position":[[58,6]]}}}],["those",{"_index":770,"t":{"78":{"position":[[266,5]]},"96":{"position":[[149,6]]},"300":{"position":[[92,5]]},"472":{"position":[[222,5]]}}}],["though",{"_index":1488,"t":{"308":{"position":[[43,7]]},"333":{"position":[[187,7]]}}}],["thread",{"_index":979,"t":{"107":{"position":[[112,7],[207,7],[1008,6]]},"599":{"position":[[97,6]]}}}],["three",{"_index":1519,"t":{"319":{"position":[[42,5]]},"521":{"position":[[11,5]]},"663":{"position":[[121,5],[332,5]]}}}],["through",{"_index":174,"t":{"12":{"position":[[459,7]]},"252":{"position":[[403,7]]},"256":{"position":[[428,8]]},"311":{"position":[[93,7]]},"333":{"position":[[209,7]]},"375":{"position":[[240,7]]},"377":{"position":[[244,7]]},"563":{"position":[[171,7]]}}}],["throw",{"_index":705,"t":{"62":{"position":[[69,8]]},"242":{"position":[[360,5]]},"478":{"position":[[322,6]]},"484":{"position":[[259,6]]},"490":{"position":[[324,6]]},"531":{"position":[[176,6]]},"685":{"position":[[161,6]]}}}],["thrown",{"_index":1608,"t":{"363":{"position":[[107,6]]},"365":{"position":[[110,6]]},"367":{"position":[[112,6]]},"369":{"position":[[161,6]]},"371":{"position":[[245,6]]},"373":{"position":[[116,6]]},"375":{"position":[[401,6]]},"377":{"position":[[405,6]]},"379":{"position":[[138,6]]},"381":{"position":[[150,6]]},"383":{"position":[[142,6]]},"385":{"position":[[154,6]]},"387":{"position":[[217,6]]},"389":{"position":[[213,6]]},"391":{"position":[[323,6]]},"527":{"position":[[60,6]]},"661":{"position":[[452,6]]},"669":{"position":[[676,7]]}}}],["thu",{"_index":1047,"t":{"115":{"position":[[142,4]]},"205":{"position":[[155,4]]}}}],["tick",{"_index":992,"t":{"107":{"position":[[577,5]]}}}],["time",{"_index":58,"t":{"6":{"position":[[187,4]]},"14":{"position":[[740,4]]},"16":{"position":[[195,4]]},"20":{"position":[[1179,4]]},"28":{"position":[[116,4],[173,4]]},"30":{"position":[[368,4]]},"38":{"position":[[58,4],[104,4]]},"42":{"position":[[38,4]]},"44":{"position":[[37,4]]},"46":{"position":[[147,4]]},"48":{"position":[[465,4]]},"72":{"position":[[14,4],[358,4]]},"105":{"position":[[72,4]]},"117":{"position":[[71,5]]},"147":{"position":[[396,4]]},"149":{"position":[[56,5]]},"161":{"position":[[496,4]]},"163":{"position":[[446,4]]},"165":{"position":[[443,4]]},"173":{"position":[[61,4]]},"181":{"position":[[60,5],[117,5],[349,4]]},"183":{"position":[[8,4],[275,4],[378,4]]},"185":{"position":[[123,4]]},"317":{"position":[[459,5]]},"329":{"position":[[223,5]]},"331":{"position":[[68,5]]},"333":{"position":[[73,5]]},"337":{"position":[[60,4]]},"535":{"position":[[1150,4],[1202,4]]},"571":{"position":[[33,5],[252,4],[302,4],[333,4],[370,5],[455,4]]},"601":{"position":[[37,5]]}}}],["times33",{"_index":1751,"t":{"448":{"position":[[24,7]]}}}],["timestamp",{"_index":2048,"t":{"571":{"position":[[93,10]]}}}],["tip",{"_index":2077,"t":{"589":{"position":[[171,3]]}}}],["tl",{"_index":126,"t":{"8":{"position":[[636,3]]},"535":{"position":[[2074,3]]},"617":{"position":[[179,4]]},"621":{"position":[[20,3],[98,3],[414,4]]}}}],["tmbundl",{"_index":920,"t":{"94":{"position":[[482,8]]}}}],["today",{"_index":1499,"t":{"311":{"position":[[113,6]]}}}],["togeth",{"_index":1245,"t":{"225":{"position":[[544,10]]},"304":{"position":[[304,9]]},"409":{"position":[[17,9]]}}}],["toggl",{"_index":510,"t":{"30":{"position":[[189,6],[253,6]]},"92":{"position":[[294,7],[312,7]]}}}],["token",{"_index":509,"t":{"30":{"position":[[169,6]]},"54":{"position":[[93,6]]},"78":{"position":[[34,7]]},"82":{"position":[[47,6]]},"343":{"position":[[33,6],[154,6],[267,6],[506,6]]}}}],["tokenis",{"_index":685,"t":{"58":{"position":[[17,8]]}}}],["toler",{"_index":1482,"t":{"304":{"position":[[498,9]]}}}],["tomato",{"_index":1442,"t":{"294":{"position":[[277,8]]}}}],["tonumb",{"_index":1180,"t":{"181":{"position":[[711,8]]},"767":{"position":[[534,8]]}}}],["tonumber(a",{"_index":1473,"t":{"302":{"position":[[169,11]]}}}],["tonumber(b",{"_index":1474,"t":{"302":{"position":[[183,11]]}}}],["tonumber(c",{"_index":1239,"t":{"225":{"position":[[148,11],[257,11]]}}}],["tonumber|16",{"_index":1560,"t":{"323":{"position":[[145,12]]}}}],["tool",{"_index":878,"t":{"92":{"position":[[56,8]]},"105":{"position":[[424,5]]}}}],["top",{"_index":1213,"t":{"209":{"position":[[401,3]]},"478":{"position":[[435,3]]},"484":{"position":[[372,3]]},"490":{"position":[[446,3]]},"503":{"position":[[94,3]]},"525":{"position":[[97,3]]},"541":{"position":[[90,3]]},"575":{"position":[[92,3]]},"597":{"position":[[90,3]]},"631":{"position":[[94,3]]},"735":{"position":[[93,3]]}}}],["tostr",{"_index":1179,"t":{"181":{"position":[[692,8]]},"391":{"position":[[589,9]]}}}],["tostring(bvar",{"_index":1583,"t":{"335":{"position":[[166,15]]}}}],["total",{"_index":955,"t":{"103":{"position":[[46,7]]},"105":{"position":[[216,5]]}}}],["toward",{"_index":2003,"t":{"547":{"position":[[109,7]]},"551":{"position":[[88,6]]},"553":{"position":[[88,7]]},"555":{"position":[[88,7]]}}}],["trace",{"_index":1544,"t":{"321":{"position":[[384,5]]}}}],["traceback",{"_index":828,"t":{"86":{"position":[[414,10]]},"363":{"position":[[330,10]]},"365":{"position":[[349,10]]},"367":{"position":[[356,10]]},"369":{"position":[[468,10]]},"371":{"position":[[536,10]]},"373":{"position":[[361,10]]},"669":{"position":[[1222,10]]}}}],["tradit",{"_index":2042,"t":{"567":{"position":[[415,11]]}}}],["traffic",{"_index":2144,"t":{"621":{"position":[[102,8]]}}}],["transit",{"_index":836,"t":{"86":{"position":[[664,11]]}}}],["transport",{"_index":2124,"t":{"617":{"position":[[134,9]]},"621":{"position":[[63,9]]}}}],["tri",{"_index":764,"t":{"78":{"position":[[87,3]]},"82":{"position":[[645,4]]},"187":{"position":[[430,3]]},"203":{"position":[[338,3]]},"225":{"position":[[298,3]]},"231":{"position":[[379,3]]},"233":{"position":[[328,3]]},"235":{"position":[[360,3]]},"246":{"position":[[496,3]]},"248":{"position":[[394,3]]},"252":{"position":[[1040,3]]},"256":{"position":[[371,3],[773,3]]},"266":{"position":[[211,3]]},"274":{"position":[[208,3]]},"276":{"position":[[263,3]]},"282":{"position":[[220,3]]},"284":{"position":[[679,3]]},"286":{"position":[[406,3]]},"288":{"position":[[389,3]]},"290":{"position":[[489,3]]},"294":{"position":[[375,3],[629,3]]},"296":{"position":[[80,4]]},"298":{"position":[[657,6]]},"321":{"position":[[615,3]]},"323":{"position":[[179,3]]},"325":{"position":[[241,3]]},"327":{"position":[[232,3]]},"329":{"position":[[393,3]]},"531":{"position":[[193,3],[402,3]]},"535":{"position":[[2454,3]]}}}],["trigger",{"_index":163,"t":{"12":{"position":[[250,10]]}}}],["trim",{"_index":2174,"t":{"641":{"position":[[10,5]]},"643":{"position":[[10,5]]},"645":{"position":[[10,5]]}}}],["true",{"_index":269,"t":{"14":{"position":[[2129,4]]},"66":{"position":[[507,4]]},"107":{"position":[[414,4],[486,4]]},"111":{"position":[[216,5]]},"185":{"position":[[164,4]]},"252":{"position":[[766,5]]},"254":{"position":[[64,4],[106,6]]},"268":{"position":[[12,4],[138,4]]},"290":{"position":[[235,4],[305,4],[356,4],[479,4]]},"317":{"position":[[562,4]]},"319":{"position":[[482,4],[506,4]]},"335":{"position":[[117,4]]},"347":{"position":[[132,5]]},"353":{"position":[[131,5]]},"365":{"position":[[22,5],[74,5],[133,4],[316,4]]},"367":{"position":[[345,4]]},"463":{"position":[[107,5],[343,5]]},"465":{"position":[[109,5],[373,5]]},"467":{"position":[[109,5]]},"469":{"position":[[109,5]]},"501":{"position":[[1085,4]]},"507":{"position":[[77,4]]},"535":{"position":[[768,5]]},"593":{"position":[[272,6],[388,6]]},"595":{"position":[[701,5],[897,5],[1261,5]]},"621":{"position":[[314,4]]},"629":{"position":[[75,5]]},"647":{"position":[[155,4]]},"649":{"position":[[156,4]]},"651":{"position":[[157,4]]},"653":{"position":[[156,4]]},"655":{"position":[[162,4]]},"657":{"position":[[173,4]]},"663":{"position":[[611,6]]},"665":{"position":[[170,4]]},"667":{"position":[[216,4]]},"671":{"position":[[681,5]]},"673":{"position":[[176,4]]},"675":{"position":[[180,4]]},"707":{"position":[[158,4]]},"731":{"position":[[351,6]]},"747":{"position":[[127,5]]},"777":{"position":[[56,4]]}}}],["true):concat",{"_index":2394,"t":{"767":{"position":[[454,14]]}}}],["true):reorder():concat",{"_index":2385,"t":{"763":{"position":[[676,24]]}}}],["truncat",{"_index":1304,"t":{"244":{"position":[[436,8]]},"663":{"position":[[0,9],[101,10],[222,9],[258,9],[380,10],[430,9]]}}}],["truthi",{"_index":1516,"t":{"317":{"position":[[143,6],[337,6]]},"371":{"position":[[24,8],[116,7],[170,7],[268,7]]}}}],["try...catch",{"_index":335,"t":{"20":{"position":[[121,11]]}}}],["try/catch",{"_index":155,"t":{"12":{"position":[[9,9]]}}}],["try_get_fruit_rating(fruit",{"_index":1445,"t":{"294":{"position":[[347,27]]}}}],["turn",{"_index":1154,"t":{"167":{"position":[[474,4]]},"181":{"position":[[400,5]]},"681":{"position":[[30,4]]},"767":{"position":[[555,4]]}}}],["tweak",{"_index":673,"t":{"52":{"position":[[172,6]]}}}],["two",{"_index":797,"t":{"82":{"position":[[1258,3]]},"185":{"position":[[308,3]]},"252":{"position":[[109,6],[624,6],[685,4]]},"260":{"position":[[12,3]]},"409":{"position":[[5,3]]},"411":{"position":[[24,3]]},"413":{"position":[[27,3]]},"415":{"position":[[21,3],[42,3]]},"417":{"position":[[21,3]]},"419":{"position":[[20,3]]},"421":{"position":[[28,3]]},"488":{"position":[[322,3]]},"493":{"position":[[190,3]]},"667":{"position":[[9,3]]},"671":{"position":[[257,3]]}}}],["type",{"_index":74,"t":{"6":{"position":[[356,4],[392,4]]},"20":{"position":[[1290,5],[2000,5]]},"22":{"position":[[170,5]]},"30":{"position":[[485,4],[727,4]]},"34":{"position":[[41,5]]},"38":{"position":[[1371,4],[1405,4],[1462,4],[1492,4]]},"52":{"position":[[60,4]]},"66":{"position":[[287,4]]},"86":{"position":[[765,4],[910,4]]},"88":{"position":[[326,4]]},"92":{"position":[[219,4]]},"134":{"position":[[476,5]]},"147":{"position":[[328,4]]},"151":{"position":[[24,4],[71,5],[81,4],[174,4],[188,5],[250,4]]},"161":{"position":[[428,4]]},"163":{"position":[[378,4]]},"165":{"position":[[375,4]]},"173":{"position":[[26,4]]},"175":{"position":[[164,4],[272,4],[466,5]]},"225":{"position":[[651,4]]},"239":{"position":[[347,4]]},"302":{"position":[[0,4],[262,4]]},"304":{"position":[[74,4],[117,6]]},"319":{"position":[[254,4]]},"341":{"position":[[28,5],[215,6]]},"535":{"position":[[403,6]]},"595":{"position":[[27,6],[116,5],[645,4],[807,4]]},"731":{"position":[[274,8]]},"733":{"position":[[512,8]]}}}],["type=\"primari",{"_index":2345,"t":{"731":{"position":[[380,15]]},"733":{"position":[[296,15]]}}}],["typo",{"_index":1147,"t":{"159":{"position":[[155,5]]}}}],["ub",{"_index":152,"t":{"10":{"position":[[322,2]]},"12":{"position":[[676,2]]},"46":{"position":[[226,2]]}}}],["ubuntu",{"_index":1083,"t":{"126":{"position":[[663,6]]}}}],["ugli",{"_index":1383,"t":{"272":{"position":[[34,4]]}}}],["uh",{"_index":1334,"t":{"252":{"position":[[694,2]]}}}],["un1g04+cwg8wxydpslj4po/hstqsitgykycrur+m3ae6yplyucrvhc/0j4m3dew81adzvda6tvkc/ht8edyefw",{"_index":1878,"t":{"501":{"position":[[932,88]]}}}],["unannot",{"_index":195,"t":{"14":{"position":[[176,12]]},"167":{"position":[[213,12]]}}}],["unari",{"_index":148,"t":{"10":{"position":[[224,5]]},"42":{"position":[[63,5],[83,5]]},"46":{"position":[[29,5],[48,5]]},"669":{"position":[[293,5]]},"709":{"position":[[57,5]]}}}],["unauthent",{"_index":1798,"t":{"474":{"position":[[6,15]]},"480":{"position":[[5,15]]}}}],["unavail",{"_index":1429,"t":{"290":{"position":[[660,11]]},"627":{"position":[[186,12]]}}}],["unchang",{"_index":271,"t":{"14":{"position":[[2155,10]]},"24":{"position":[[159,9]]}}}],["under",{"_index":774,"t":{"80":{"position":[[71,5]]},"128":{"position":[[37,5]]},"130":{"position":[[57,5]]},"290":{"position":[[672,5]]},"308":{"position":[[19,5]]},"659":{"position":[[50,5]]},"661":{"position":[[459,5]]}}}],["underscor",{"_index":1362,"t":{"262":{"position":[[12,11],[150,11]]}}}],["unexpect",{"_index":119,"t":{"8":{"position":[[535,10]]},"22":{"position":[[6,10]]},"52":{"position":[[141,10]]},"86":{"position":[[183,10]]}}}],["unexpectedli",{"_index":106,"t":{"8":{"position":[[179,12]]}}}],["unfamiliar",{"_index":1173,"t":{"181":{"position":[[325,10]]}}}],["unfinish",{"_index":638,"t":{"46":{"position":[[243,10]]}}}],["uniniti",{"_index":168,"t":{"12":{"position":[[328,13],[522,13]]}}}],["unintuit",{"_index":2061,"t":{"577":{"position":[[180,12]]}}}],["uniqu",{"_index":1801,"t":{"474":{"position":[[74,6]]}}}],["unit",{"_index":2310,"t":{"721":{"position":[[41,4]]}}}],["unix",{"_index":2049,"t":{"571":{"position":[[278,4]]},"603":{"position":[[22,4]]}}}],["unknown",{"_index":669,"t":{"52":{"position":[[52,7]]},"509":{"position":[[119,10]]}}}],["unless",{"_index":1954,"t":{"535":{"position":[[560,6]]}}}],["unlik",{"_index":1328,"t":{"248":{"position":[[677,6]]}}}],["unpack",{"_index":1906,"t":{"515":{"position":[[395,10]]}}}],["unpad",{"_index":1833,"t":{"488":{"position":[[93,8]]},"490":{"position":[[361,9]]}}}],["unpredict",{"_index":1802,"t":{"474":{"position":[[85,13]]}}}],["unreach",{"_index":162,"t":{"12":{"position":[[233,11]]},"20":{"position":[[1825,11]]},"26":{"position":[[56,12]]},"60":{"position":[[161,11]]},"153":{"position":[[155,11],[172,12]]}}}],["unreason",{"_index":1273,"t":{"242":{"position":[[99,12]]}}}],["until",{"_index":315,"t":{"18":{"position":[[341,7]]},"627":{"position":[[47,5]]},"683":{"position":[[90,5]]},"685":{"position":[[106,5]]}}}],["unwant",{"_index":304,"t":{"18":{"position":[[173,8]]},"167":{"position":[[192,8]]}}}],["up",{"_index":1186,"t":{"185":{"position":[[362,2]]},"329":{"position":[[362,2]]},"333":{"position":[[284,2]]},"611":{"position":[[98,2]]},"671":{"position":[[446,4],[555,5],[629,4],[743,6]]},"677":{"position":[[72,2]]},"701":{"position":[[22,2]]},"723":{"position":[[98,2],[175,2],[198,2],[257,3],[280,3],[391,3],[404,2],[477,3],[567,3],[671,3],[773,3],[875,3],[965,3]]},"725":{"position":[[182,3]]},"727":{"position":[[169,3],[182,2],[273,3],[393,3]]}}}],["updat",{"_index":187,"t":{"12":{"position":[[828,6]]},"20":{"position":[[741,7],[2958,7]]},"24":{"position":[[0,7]]},"48":{"position":[[181,7]]},"58":{"position":[[0,7]]},"126":{"position":[[365,6]]},"767":{"position":[[134,7]]},"771":{"position":[[187,7]]}}}],["upgrad",{"_index":607,"t":{"38":{"position":[[1611,9]]}}}],["upon",{"_index":1226,"t":{"217":{"position":[[83,4]]}}}],["uppercas",{"_index":2189,"t":{"653":{"position":[[43,9],[201,9]]}}}],["upvalu",{"_index":173,"t":{"12":{"position":[[398,8]]},"32":{"position":[[147,7]]}}}],["upward",{"_index":1575,"t":{"331":{"position":[[152,7]]}}}],["urgent",{"_index":2259,"t":{"689":{"position":[[399,7]]}}}],["url",{"_index":395,"t":{"20":{"position":[[2212,3]]},"321":{"position":[[556,7]]},"535":{"position":[[42,3],[203,5],[276,3]]},"537":{"position":[[140,3]]},"693":{"position":[[10,3],[80,3]]},"695":{"position":[[28,3],[109,3]]},"697":{"position":[[9,3],[57,3],[90,3]]}}}],["url.pars",{"_index":250,"t":{"14":{"position":[[1691,9]]}}}],["us",{"_index":96,"t":{"8":{"position":[[30,4],[232,5],[598,4]]},"14":{"position":[[418,4],[526,4],[567,4],[614,4],[2459,5]]},"18":{"position":[[358,5]]},"20":{"position":[[1103,3],[1249,4],[1878,4]]},"22":{"position":[[31,5]]},"30":{"position":[[613,3],[806,4],[994,4],[1129,4],[1281,4]]},"36":{"position":[[31,5],[212,4],[241,5]]},"38":{"position":[[1142,3],[1905,5]]},"54":{"position":[[107,4],[304,5]]},"58":{"position":[[126,3]]},"60":{"position":[[242,3]]},"64":{"position":[[86,4]]},"76":{"position":[[99,4],[168,4]]},"78":{"position":[[119,3],[162,4],[258,4]]},"80":{"position":[[121,3]]},"82":{"position":[[83,5],[702,3],[922,3],[1189,4],[1240,3],[1589,4]]},"84":{"position":[[15,5]]},"86":{"position":[[747,3]]},"92":{"position":[[36,4]]},"101":{"position":[[120,4],[508,3]]},"103":{"position":[[188,4]]},"119":{"position":[[51,3],[122,5]]},"132":{"position":[[204,3]]},"140":{"position":[[91,3],[224,3]]},"147":{"position":[[380,3]]},"157":{"position":[[307,5]]},"161":{"position":[[302,3],[480,3]]},"163":{"position":[[240,3],[265,3],[430,3]]},"165":{"position":[[427,3]]},"167":{"position":[[440,4]]},"175":{"position":[[492,4]]},"181":{"position":[[126,5]]},"185":{"position":[[111,3]]},"191":{"position":[[133,5]]},"193":{"position":[[148,5]]},"195":{"position":[[126,5]]},"197":{"position":[[27,4],[85,5]]},"199":{"position":[[35,4],[148,4]]},"203":{"position":[[49,4],[165,4]]},"207":{"position":[[16,3]]},"211":{"position":[[16,3]]},"215":{"position":[[53,5]]},"221":{"position":[[16,3]]},"223":{"position":[[66,3],[454,5]]},"225":{"position":[[470,5]]},"227":{"position":[[213,4]]},"233":{"position":[[41,3],[379,3]]},"235":{"position":[[8,3],[70,3]]},"242":{"position":[[723,3],[781,4]]},"244":{"position":[[64,3],[483,4]]},"246":{"position":[[82,5]]},"252":{"position":[[434,3],[997,3]]},"254":{"position":[[22,4]]},"258":{"position":[[16,3]]},"268":{"position":[[322,5]]},"272":{"position":[[440,3]]},"274":{"position":[[47,3]]},"280":{"position":[[47,4]]},"284":{"position":[[390,3]]},"290":{"position":[[31,4],[381,4]]},"296":{"position":[[16,3]]},"300":{"position":[[149,3]]},"304":{"position":[[192,3]]},"313":{"position":[[259,4],[290,4],[350,4],[384,4]]},"315":{"position":[[647,3]]},"337":{"position":[[48,3]]},"343":{"position":[[20,3],[493,3]]},"397":{"position":[[654,4]]},"401":{"position":[[66,3]]},"428":{"position":[[14,5]]},"430":{"position":[[14,5]]},"432":{"position":[[14,5]]},"434":{"position":[[14,5]]},"436":{"position":[[14,5]]},"438":{"position":[[14,5]]},"440":{"position":[[14,5]]},"442":{"position":[[14,5]]},"444":{"position":[[14,5]]},"446":{"position":[[14,5]]},"448":{"position":[[14,5]]},"450":{"position":[[14,5]]},"452":{"position":[[14,5]]},"454":{"position":[[14,5]]},"456":{"position":[[14,5]]},"458":{"position":[[14,5]]},"460":{"position":[[14,5]]},"463":{"position":[[14,5]]},"465":{"position":[[14,5]]},"467":{"position":[[14,5]]},"469":{"position":[[14,5]]},"472":{"position":[[27,4]]},"493":{"position":[[307,4]]},"495":{"position":[[159,4],[190,4]]},"497":{"position":[[160,4]]},"499":{"position":[[97,4]]},"531":{"position":[[131,4]]},"535":{"position":[[335,4],[814,6],[1073,6],[1404,6],[2093,3]]},"537":{"position":[[222,5]]},"567":{"position":[[402,3]]},"593":{"position":[[786,4]]},"621":{"position":[[408,5]]},"627":{"position":[[117,4]]},"669":{"position":[[482,4]]},"677":{"position":[[53,4]]},"681":{"position":[[22,4]]},"687":{"position":[[53,4]]},"709":{"position":[[49,3]]},"723":{"position":[[188,5]]},"733":{"position":[[111,3],[726,4],[849,3]]},"763":{"position":[[160,5]]},"767":{"position":[[526,3],[708,4]]}}}],["usabl",{"_index":146,"t":{"10":{"position":[[210,6]]},"20":{"position":[[649,6]]}}}],["usag",{"_index":583,"t":{"38":{"position":[[627,5]]},"161":{"position":[[198,5]]},"165":{"position":[[176,5]]},"215":{"position":[[14,5]]},"242":{"position":[[216,5],[440,5]]},"319":{"position":[[314,5]]},"327":{"position":[[102,5]]},"669":{"position":[[684,5]]}}}],["user",{"_index":409,"t":{"20":{"position":[[2538,4]]},"34":{"position":[[107,4]]},"80":{"position":[[229,6]]},"107":{"position":[[134,5],[946,4],[976,5]]},"128":{"position":[[21,4]]},"300":{"position":[[213,5]]},"321":{"position":[[283,6]]},"589":{"position":[[187,6]]},"697":{"position":[[250,8]]}}}],["user'",{"_index":1285,"t":{"242":{"position":[[534,6]]}}}],["user_data",{"_index":732,"t":{"72":{"position":[[267,9]]}}}],["userconfig",{"_index":1284,"t":{"242":{"position":[[463,10]]}}}],["userconfig.colors?.pref",{"_index":1288,"t":{"242":{"position":[[632,28]]}}}],["userdata",{"_index":1479,"t":{"304":{"position":[[52,8]]}}}],["usernam",{"_index":2270,"t":{"697":{"position":[[271,11]]}}}],["usr/share/keyrings/calam",{"_index":1067,"t":{"126":{"position":[[118,28]]}}}],["usual",{"_index":980,"t":{"107":{"position":[[120,7]]},"627":{"position":[[129,6]]}}}],["utf",{"_index":633,"t":{"44":{"position":[[119,3]]},"46":{"position":[[200,3]]}}}],["utf8.cod",{"_index":660,"t":{"50":{"position":[[266,12]]}}}],["utonumb",{"_index":603,"t":{"38":{"position":[[1521,10]]},"181":{"position":[[720,9]]}}}],["utostr",{"_index":604,"t":{"38":{"position":[[1532,10]]},"181":{"position":[[701,9]]}}}],["v",{"_index":1095,"t":{"134":{"position":[[88,2]]},"217":{"position":[[174,1],[206,2]]},"589":{"position":[[283,2]]},"657":{"position":[[123,2]]},"761":{"position":[[228,3],[259,6]]},"763":{"position":[[453,3],[484,6],[567,1],[662,2],[673,2]]},"767":{"position":[[214,3],[245,6],[343,1],[441,2],[451,2]]}}}],["v3",{"_index":2330,"t":{"725":{"position":[[102,2]]}}}],["v3(0",{"_index":2332,"t":{"725":{"position":[[158,5]]}}}],["v3(0):lookat(new",{"_index":2331,"t":{"725":{"position":[[141,16]]}}}],["valid",{"_index":354,"t":{"20":{"position":[[815,5]]},"66":{"position":[[164,5]]},"84":{"position":[[203,6]]},"161":{"position":[[51,5]]},"163":{"position":[[44,5]]},"242":{"position":[[833,5]]},"486":{"position":[[68,9]]},"501":{"position":[[254,9]]},"517":{"position":[[32,5]]},"669":{"position":[[1181,5]]}}}],["valu",{"_index":19,"t":{"4":{"position":[[156,6]]},"6":{"position":[[554,5]]},"12":{"position":[[278,6],[627,6]]},"14":{"position":[[2109,5]]},"20":{"position":[[780,6],[1072,6],[1331,5]]},"30":{"position":[[466,5]]},"38":{"position":[[697,10]]},"42":{"position":[[317,6]]},"44":{"position":[[74,5]]},"46":{"position":[[69,5]]},"48":{"position":[[23,6]]},"86":{"position":[[882,6]]},"113":{"position":[[38,5],[55,5]]},"115":{"position":[[130,5]]},"149":{"position":[[119,5],[136,5],[224,5],[286,5]]},"151":{"position":[[297,6]]},"171":{"position":[[31,5],[228,5]]},"183":{"position":[[392,5]]},"187":{"position":[[76,6]]},"191":{"position":[[95,5]]},"205":{"position":[[143,5]]},"217":{"position":[[285,10]]},"223":{"position":[[39,6],[157,5],[315,5]]},"227":{"position":[[258,7],[330,7],[362,6],[403,7],[539,7],[554,5],[645,5]]},"239":{"position":[[84,5],[220,5]]},"244":{"position":[[461,6]]},"248":{"position":[[137,5],[307,5]]},"252":{"position":[[12,5],[29,5],[208,5],[225,5],[533,5],[550,5],[797,5],[814,5]]},"254":{"position":[[183,5]]},"256":{"position":[[72,7],[536,5]]},"268":{"position":[[166,6]]},"288":{"position":[[62,5]]},"298":{"position":[[505,6],[583,8],[676,5],[736,5]]},"308":{"position":[[373,6]]},"315":{"position":[[54,6]]},"317":{"position":[[150,6],[190,6],[344,6],[384,6]]},"319":{"position":[[105,6],[367,6],[438,6]]},"321":{"position":[[844,6]]},"325":{"position":[[152,5]]},"333":{"position":[[181,5]]},"335":{"position":[[40,6],[74,7]]},"339":{"position":[[175,5],[200,6],[399,5],[430,6]]},"363":{"position":[[13,5],[38,5],[50,5],[121,5],[295,6],[315,6]]},"365":{"position":[[13,5],[40,5],[52,5],[120,5],[309,6],[330,6]]},"367":{"position":[[13,5],[41,5],[53,5],[122,5],[316,6],[338,6]]},"369":{"position":[[13,5],[32,6],[55,5],[90,5],[102,5],[171,5],[399,6],[428,6]]},"371":{"position":[[13,5],[33,6],[83,5],[136,5],[148,5],[255,5],[283,5],[486,6],[519,6]]},"373":{"position":[[13,5],[43,5],[55,5],[126,5],[320,6],[344,6]]},"375":{"position":[[337,6],[364,6],[608,6],[651,6],[835,6],[903,6]]},"377":{"position":[[341,6],[368,6]]},"395":{"position":[[148,7],[175,6],[213,5],[240,5]]},"397":{"position":[[268,5],[291,5],[343,9],[372,7],[484,9],[518,7],[697,5],[746,5]]},"401":{"position":[[112,5]]},"442":{"position":[[111,5]]},"444":{"position":[[114,5]]},"472":{"position":[[371,5],[400,5]]},"493":{"position":[[149,6],[320,7]]},"515":{"position":[[34,6],[86,5],[141,6]]},"517":{"position":[[71,5],[129,5]]},"543":{"position":[[87,7]]},"545":{"position":[[87,7]]},"593":{"position":[[723,5],[811,7]]},"595":{"position":[[263,6],[373,6]]},"637":{"position":[[279,5],[543,5]]},"661":{"position":[[314,5]]},"713":{"position":[[12,5],[42,6]]},"715":{"position":[[12,5],[43,6]]},"719":{"position":[[64,6]]},"723":{"position":[[248,6]]},"745":{"position":[[200,7]]},"749":{"position":[[193,7],[262,8]]},"753":{"position":[[156,7],[325,8],[441,8]]},"761":{"position":[[253,5]]},"763":{"position":[[137,5],[478,5]]},"767":{"position":[[26,6],[142,7],[239,5]]},"771":{"position":[[10,5],[220,5],[379,5]]},"773":{"position":[[21,5]]},"775":{"position":[[20,5]]}}}],["value(",{"_index":1041,"t":{"113":{"position":[[598,8]]}}}],["value1",{"_index":1635,"t":{"375":{"position":[[13,6],[318,6],[411,6]]},"377":{"position":[[13,6],[322,6],[415,6]]},"379":{"position":[[13,6],[53,6],[148,6]]},"381":{"position":[[13,6],[65,6],[160,6]]},"383":{"position":[[13,6],[56,6],[152,6]]},"385":{"position":[[13,6],[68,6],[164,6]]}}}],["value2",{"_index":314,"t":{"18":{"position":[[328,6]]},"375":{"position":[[32,7],[344,6],[433,7]]},"377":{"position":[[36,7],[348,6],[433,7]]},"379":{"position":[[33,7],[80,6],[172,7]]},"381":{"position":[[45,7],[92,6],[196,7]]},"383":{"position":[[36,7],[83,6],[179,7]]},"385":{"position":[[48,7],[95,6],[203,7]]}}}],["var",{"_index":317,"t":{"18":{"position":[[416,3]]},"20":{"position":[[1442,3],[1756,3],[1848,3]]},"145":{"position":[[94,3],[111,3],[185,4],[208,3],[290,5]]},"151":{"position":[[107,4],[123,3],[208,3],[244,5]]},"175":{"position":[[313,3],[352,3],[369,3],[410,3]]},"177":{"position":[[139,3],[189,3]]},"302":{"position":[[42,4]]}}}],["vararg",{"_index":319,"t":{"18":{"position":[[445,6]]},"38":{"position":[[251,7],[293,7]]},"113":{"position":[[246,7]]},"155":{"position":[[58,6]]},"231":{"position":[[34,7],[242,8]]}}}],["varargprep",{"_index":1022,"t":{"113":{"position":[[217,10]]}}}],["variabl",{"_index":169,"t":{"12":{"position":[[342,9],[536,9]]},"14":{"position":[[823,8]]},"16":{"position":[[6,8]]},"18":{"position":[[366,8]]},"20":{"position":[[883,9],[1307,9]]},"30":{"position":[[703,8]]},"42":{"position":[[52,10]]},"44":{"position":[[51,9]]},"50":{"position":[[209,8]]},"60":{"position":[[246,10]]},"72":{"position":[[782,8]]},"82":{"position":[[1625,8]]},"147":{"position":[[74,9]]},"151":{"position":[[165,8]]},"163":{"position":[[22,8]]},"183":{"position":[[22,9],[253,8],[342,8]]},"189":{"position":[[46,9]]},"191":{"position":[[104,9]]},"193":{"position":[[122,8]]},"195":{"position":[[101,10]]},"199":{"position":[[69,10]]},"280":{"position":[[77,9]]},"284":{"position":[[589,8]]},"298":{"position":[[881,8]]},"308":{"position":[[107,8],[163,8],[214,9]]},"337":{"position":[[199,9]]},"343":{"position":[[437,8]]},"577":{"position":[[118,8]]}}}],["variant",{"_index":227,"t":{"14":{"position":[[1163,8]]},"84":{"position":[[179,8]]},"357":{"position":[[41,7]]},"543":{"position":[[2,7]]},"545":{"position":[[2,7]]},"739":{"position":[[8,7]]},"755":{"position":[[8,7]]},"759":{"position":[[8,7]]},"765":{"position":[[8,7]]},"769":{"position":[[8,7]]}}}],["variou",{"_index":630,"t":{"42":{"position":[[407,7]]},"60":{"position":[[98,7]]},"72":{"position":[[100,7]]},"96":{"position":[[32,7]]},"134":{"position":[[468,7]]}}}],["vast",{"_index":758,"t":{"76":{"position":[[200,4]]}}}],["vastli",{"_index":674,"t":{"54":{"position":[[34,6]]}}}],["vec",{"_index":2291,"t":{"709":{"position":[[125,3]]},"711":{"position":[[55,3]]},"713":{"position":[[61,3]]},"715":{"position":[[62,3]]}}}],["vector",{"_index":2290,"t":{"709":{"position":[[26,7]]},"721":{"position":[[46,6]]},"723":{"position":[[19,6],[70,7]]},"725":{"position":[[19,6],[69,6]]},"727":{"position":[[20,6],[70,7]]}}}],["vector3",{"_index":396,"t":{"20":{"position":[[2270,7]]},"701":{"position":[[53,7],[97,10],[320,7]]},"705":{"position":[[0,7],[85,7],[170,7]]},"707":{"position":[[0,7],[74,7]]},"717":{"position":[[34,7],[76,7]]},"719":{"position":[[14,7],[83,7],[127,8]]},"721":{"position":[[14,7],[77,7]]},"723":{"position":[[313,7],[498,8]]},"727":{"position":[[90,7],[429,8]]}}}],["vector3(0",{"_index":2279,"t":{"701":{"position":[[112,10]]},"705":{"position":[[274,10],[304,10]]},"721":{"position":[[121,10]]},"723":{"position":[[357,10],[442,10],[841,10],[930,10]]},"727":{"position":[[237,10],[357,10]]}}}],["vector3(0.0",{"_index":2313,"t":{"721":{"position":[[156,12]]},"723":{"position":[[603,12],[706,12],[809,12],[899,12],[990,12]]},"727":{"position":[[188,12]]}}}],["vector3(1",{"_index":2280,"t":{"701":{"position":[[139,11],[155,10],[182,10],[201,10],[228,10],[250,10],[382,10]]},"705":{"position":[[214,10]]},"707":{"position":[[173,10]]},"719":{"position":[[157,10]]},"723":{"position":[[532,10],[636,10],[738,10]]}}}],["vector3(1):dot(new",{"_index":2308,"t":{"717":{"position":[[120,18]]}}}],["vector3(1.0",{"_index":2338,"t":{"727":{"position":[[308,12]]}}}],["vector3(2",{"_index":2282,"t":{"705":{"position":[[231,11]]},"707":{"position":[[118,10],[142,11],[197,11]]},"717":{"position":[[139,12]]}}}],["vector3(3",{"_index":2283,"t":{"705":{"position":[[247,10]]}}}],["vector3(90",{"_index":2333,"t":{"727":{"position":[[134,11]]}}}],["vector3(90.0",{"_index":2322,"t":{"723":{"position":[[410,13]]},"725":{"position":[[218,13]]}}}],["vendor",{"_index":577,"t":{"38":{"position":[[358,8]]}}}],["veri",{"_index":997,"t":{"107":{"position":[[794,4]]},"304":{"position":[[440,4]]}}}],["verif",{"_index":128,"t":{"8":{"position":[[645,12]]}}}],["verifi",{"_index":1879,"t":{"501":{"position":[[1024,6]]}}}],["version",{"_index":341,"t":{"20":{"position":[[415,10]]},"24":{"position":[[124,8]]},"30":{"position":[[159,7]]},"74":{"position":[[8,8]]},"82":{"position":[[285,7],[357,8],[942,7],[1204,8],[1478,8]]},"90":{"position":[[22,7]]},"157":{"position":[[193,8]]},"175":{"position":[[97,7]]},"209":{"position":[[119,7],[182,7],[192,8],[240,7],[471,7]]},"233":{"position":[[137,7],[199,7],[207,11],[256,7],[312,7]]},"235":{"position":[[176,7],[238,7],[246,11],[288,7],[344,7]]},"315":{"position":[[390,7]]},"428":{"position":[[26,7]]},"505":{"position":[[46,7]]},"521":{"position":[[37,7],[220,8]]}}}],["vfunc",{"_index":1258,"t":{"231":{"position":[[125,10]]}}}],["vfunc(\"hello",{"_index":1260,"t":{"231":{"position":[[195,14],[348,14]]}}}],["vfunc(...arg",{"_index":1261,"t":{"231":{"position":[[295,14]]}}}],["via",{"_index":205,"t":{"14":{"position":[[423,3],[1851,3]]},"20":{"position":[[1634,3]]},"30":{"position":[[1217,3]]},"124":{"position":[[40,3]]},"126":{"position":[[29,3]]},"134":{"position":[[110,3]]},"183":{"position":[[47,3]]},"345":{"position":[[17,3]]},"351":{"position":[[17,3]]},"361":{"position":[[17,3]]},"393":{"position":[[28,3]]},"399":{"position":[[17,3]]},"425":{"position":[[17,3]]},"533":{"position":[[17,3]]},"535":{"position":[[710,3],[862,3]]},"591":{"position":[[17,3]]},"605":{"position":[[17,3]]},"677":{"position":[[32,3]]},"689":{"position":[[206,4]]},"691":{"position":[[17,3]]},"699":{"position":[[17,3]]},"729":{"position":[[17,3]]}}}],["viabl",{"_index":579,"t":{"38":{"position":[[442,6]]}}}],["violat",{"_index":620,"t":{"40":{"position":[[239,9]]},"46":{"position":[[300,9]]}}}],["virtual",{"_index":1088,"t":{"132":{"position":[[21,9]]},"329":{"position":[[331,7]]},"333":{"position":[[235,7]]},"339":{"position":[[8,7]]}}}],["virtualterminallevel",{"_index":2081,"t":{"589":{"position":[[286,20]]}}}],["visit",{"_index":2161,"t":{"629":{"position":[[282,5]]}}}],["visual",{"_index":909,"t":{"94":{"position":[[283,6]]},"136":{"position":[[73,6],[95,6]]}}}],["vital",{"_index":964,"t":{"103":{"position":[[403,5]]}}}],["vkmap",{"_index":586,"t":{"38":{"position":[[718,9]]},"217":{"position":[[306,8]]}}}],["vm",{"_index":31,"t":{"4":{"position":[[306,2]]},"34":{"position":[[423,2]]},"60":{"position":[[395,2]]},"70":{"position":[[6,2]]},"109":{"position":[[100,3]]},"111":{"position":[[0,2],[168,2],[263,2]]}}}],["void",{"_index":602,"t":{"38":{"position":[[1455,6]]},"304":{"position":[[61,4]]}}}],["vs",{"_index":895,"t":{"92":{"position":[[514,2]]},"94":{"position":[[49,2]]}}}],["vsix",{"_index":915,"t":{"94":{"position":[[392,4]]}}}],["vulner",{"_index":370,"t":{"20":{"position":[[1489,10]]}}}],["w",{"_index":715,"t":{"66":{"position":[[203,3]]},"523":{"position":[[84,1]]}}}],["w:strip",{"_index":1939,"t":{"523":{"position":[[130,11]]}}}],["wait",{"_index":1967,"t":{"535":{"position":[[1016,8],[1216,4]]},"627":{"position":[[39,7],[311,5],[326,7]]}}}],["walru",{"_index":145,"t":{"10":{"position":[[178,6],[280,6]]},"12":{"position":[[640,6]]},"56":{"position":[[64,6]]},"58":{"position":[[137,6]]},"60":{"position":[[11,6]]},"317":{"position":[[4,6]]}}}],["want",{"_index":292,"t":{"14":{"position":[[2574,4]]},"105":{"position":[[350,4]]},"185":{"position":[[34,4]]},"209":{"position":[[69,4]]},"223":{"position":[[14,4]]},"231":{"position":[[50,4]]},"233":{"position":[[72,4]]},"244":{"position":[[18,4]]},"252":{"position":[[464,4]]},"337":{"position":[[108,5]]},"513":{"position":[[473,4]]},"763":{"position":[[187,4],[358,4]]}}}],["warn",{"_index":50,"t":{"6":{"position":[[22,7],[150,7],[370,7]]},"8":{"position":[[8,7]]},"14":{"position":[[134,7],[202,7],[270,7],[299,7]]},"16":{"position":[[23,8]]},"18":{"position":[[197,7],[427,7]]},"20":{"position":[[1204,9],[1220,7],[1420,7],[1678,8],[1859,7],[1992,7],[2006,8]]},"26":{"position":[[75,7]]},"30":{"position":[[515,9],[574,8]]},"42":{"position":[[330,7]]},"50":{"position":[[25,7],[96,8]]},"52":{"position":[[76,7]]},"60":{"position":[[151,9],[294,8]]},"66":{"position":[[313,9]]},"72":{"position":[[19,8],[116,7]]},"142":{"position":[[31,8]]},"145":{"position":[[148,8]]},"147":{"position":[[126,8],[320,7]]},"149":{"position":[[174,8]]},"151":{"position":[[156,8]]},"153":{"position":[[146,8]]},"155":{"position":[[150,8]]},"157":{"position":[[135,8]]},"159":{"position":[[108,8]]},"161":{"position":[[168,8],[420,7]]},"163":{"position":[[124,8],[370,7]]},"165":{"position":[[145,8],[367,7]]},"167":{"position":[[174,8],[387,7],[493,8]]},"169":{"position":[[158,8]]},"171":{"position":[[201,8]]},"173":{"position":[[18,7]]},"175":{"position":[[0,8],[156,7],[204,8],[264,7],[516,8]]},"177":{"position":[[11,8]]},"201":{"position":[[57,7],[160,8]]},"239":{"position":[[47,7],[193,8],[457,7]]},"302":{"position":[[241,7]]},"523":{"position":[[49,8],[148,10]]}}}],["warn(\"bad",{"_index":1937,"t":{"523":{"position":[[100,13]]}}}],["wasm",{"_index":132,"t":{"8":{"position":[[701,4]]},"119":{"position":[[128,5]]},"509":{"position":[[79,7]]},"535":{"position":[[618,4],[917,4],[1268,4],[1584,4],[1721,4],[1837,4],[2397,6]]},"537":{"position":[[96,4]]},"539":{"position":[[123,4]]},"605":{"position":[[63,4]]}}}],["way",{"_index":806,"t":{"84":{"position":[[8,3]]},"107":{"position":[[993,3]]},"119":{"position":[[12,3]]},"189":{"position":[[26,3]]},"191":{"position":[[157,5],[167,3],[220,3]]},"193":{"position":[[172,5],[182,3],[241,3]]},"195":{"position":[[150,5],[160,3],[214,3]]},"225":{"position":[[38,3],[78,3],[199,3]]},"244":{"position":[[123,3],[189,3]]},"276":{"position":[[19,3]]},"294":{"position":[[32,3]]},"317":{"position":[[489,3],[546,3]]},"319":{"position":[[48,3]]},"335":{"position":[[189,3],[227,3]]},"341":{"position":[[73,3],[135,3]]},"472":{"position":[[313,4]]},"521":{"position":[[17,3]]},"539":{"position":[[88,4]]},"577":{"position":[[103,4]]},"639":{"position":[[47,4]]}}}],["wcall",{"_index":419,"t":{"20":{"position":[[2811,5]]},"523":{"position":[[88,8]]}}}],["we'd",{"_index":1200,"t":{"195":{"position":[[54,4]]}}}],["we'v",{"_index":932,"t":{"96":{"position":[[124,5]]}}}],["weakest",{"_index":1825,"t":{"480":{"position":[[76,8]]}}}],["well",{"_index":557,"t":{"34":{"position":[[410,4]]},"126":{"position":[[475,4],[655,4]]},"128":{"position":[[138,4]]},"264":{"position":[[168,5]]},"319":{"position":[[298,4]]}}}],["wget",{"_index":1060,"t":{"126":{"position":[[49,4]]}}}],["what'",{"_index":1498,"t":{"311":{"position":[[68,6]]},"375":{"position":[[116,6]]},"377":{"position":[[120,6]]},"671":{"position":[[439,6],[548,6],[622,6],[718,8]]}}}],["whenev",{"_index":1333,"t":{"252":{"position":[[444,8]]},"333":{"position":[[103,8]]}}}],["whether",{"_index":1598,"t":{"347":{"position":[[87,7]]},"353":{"position":[[86,7]]},"357":{"position":[[151,7]]},"559":{"position":[[104,7]]},"593":{"position":[[109,7]]},"663":{"position":[[297,7]]},"669":{"position":[[364,7]]},"671":{"position":[[161,7]]},"731":{"position":[[89,7]]}}}],["white",{"_index":1694,"t":{"397":{"position":[[1146,5],[1366,8]]}}}],["whitespac",{"_index":2186,"t":{"649":{"position":[[171,10]]},"651":{"position":[[172,10]]},"653":{"position":[[171,10]]},"655":{"position":[[177,10]]},"657":{"position":[[46,10]]}}}],["window",{"_index":11,"t":{"4":{"position":[[67,7]]},"30":{"position":[[1082,7]]},"44":{"position":[[142,7],[225,7]]},"121":{"position":[[45,8]]},"472":{"position":[[119,8]]},"509":{"position":[[68,10]]},"589":{"position":[[179,7]]}}}],["wip",{"_index":1480,"t":{"304":{"position":[[418,3]]}}}],["wish",{"_index":1103,"t":{"134":{"position":[[420,5]]},"140":{"position":[[216,4]]},"661":{"position":[[287,4]]}}}],["within",{"_index":147,"t":{"10":{"position":[[217,6]]},"38":{"position":[[1146,6]]},"56":{"position":[[93,6]]},"58":{"position":[[153,6]]},"107":{"position":[[331,6]]},"136":{"position":[[88,6]]},"203":{"position":[[406,6]]},"300":{"position":[[36,6]]},"391":{"position":[[69,6]]},"559":{"position":[[19,6]]}}}],["without",{"_index":364,"t":{"20":{"position":[[1145,7],[1254,7],[2611,7]]},"30":{"position":[[458,7],[507,7],[566,7]]},"38":{"position":[[936,7]]},"40":{"position":[[129,7]]},"103":{"position":[[498,7]]},"115":{"position":[[265,7]]},"169":{"position":[[76,7]]},"201":{"position":[[100,7]]},"205":{"position":[[291,7]]},"339":{"position":[[65,7]]},"733":{"position":[[202,7]]}}}],["won't",{"_index":954,"t":{"101":{"position":[[578,5]]},"308":{"position":[[246,5]]}}}],["word",{"_index":653,"t":{"50":{"position":[[9,7]]}}}],["work",{"_index":142,"t":{"10":{"position":[[119,7]]},"12":{"position":[[426,7]]},"20":{"position":[[697,5],[897,7],[937,7],[3551,5]]},"26":{"position":[[143,7]]},"28":{"position":[[31,7]]},"32":{"position":[[83,7],[135,7]]},"34":{"position":[[25,5]]},"48":{"position":[[230,7]]},"56":{"position":[[85,7]]},"101":{"position":[[584,5]]},"126":{"position":[[612,4]]},"237":{"position":[[70,5]]},"254":{"position":[[540,5]]},"256":{"position":[[476,6]]},"302":{"position":[[78,5]]},"319":{"position":[[239,5]]},"341":{"position":[[199,5]]},"567":{"position":[[136,5]]},"571":{"position":[[147,5]]},"573":{"position":[[23,7],[84,7],[146,5],[241,7]]},"577":{"position":[[169,6]]},"745":{"position":[[177,4]]}}}],["worl",{"_index":2206,"t":{"665":{"position":[[157,8]]}}}],["world",{"_index":1169,"t":{"181":{"position":[[227,8],[274,8],[466,8],[530,7]]},"223":{"position":[[138,7],[210,5],[298,7]]},"227":{"position":[[195,7]]},"246":{"position":[[323,6]]},"298":{"position":[[830,6]]},"302":{"position":[[63,6]]},"315":{"position":[[343,8],[363,6],[602,8],[622,6],[837,8],[857,6]]},"339":{"position":[[156,7],[380,7]]},"353":{"position":[[204,9]]},"355":{"position":[[172,6]]},"357":{"position":[[273,9]]},"359":{"position":[[187,6]]},"369":{"position":[[311,8],[454,7]]},"371":{"position":[[367,8]]},"373":{"position":[[201,8]]},"375":{"position":[[501,8],[518,10],[634,7],[677,9]]},"377":{"position":[[502,8],[516,8]]},"397":{"position":[[907,6],[1007,8]]},"478":{"position":[[560,7],[725,6]]},"484":{"position":[[421,7],[612,6]]},"490":{"position":[[603,7],[802,6]]},"593":{"position":[[240,7],[291,7],[322,8],[420,8]]},"595":{"position":[[665,7]]},"611":{"position":[[400,7]]},"619":{"position":[[344,5]]},"637":{"position":[[208,6],[304,9],[568,9]]},"641":{"position":[[196,9],[246,5]]},"643":{"position":[[200,9],[251,8]]},"645":{"position":[[201,9],[255,5]]},"661":{"position":[[591,8],[622,6],[658,8],[692,6],[728,8],[767,6],[803,8],[832,6]]},"663":{"position":[[484,8],[509,6],[546,8],[599,8]]},"665":{"position":[[125,6]]},"667":{"position":[[149,6],[174,6]]},"671":{"position":[[432,6],[540,7],[615,6],[711,6]]},"673":{"position":[[130,6],[162,9]]},"675":{"position":[[132,6]]},"753":{"position":[[132,8],[356,8],[472,8]]}}}],["world\"):contains(\"world",{"_index":1593,"t":{"341":{"position":[[97,26]]}}}],["world\":contains(\"world",{"_index":1596,"t":{"341":{"position":[[158,25]]}}}],["worth",{"_index":995,"t":{"107":{"position":[[715,5]]}}}],["wrap",{"_index":1559,"t":{"321":{"position":[[884,8]]},"611":{"position":[[28,5]]}}}],["wrapper",{"_index":2239,"t":{"683":{"position":[[24,7]]}}}],["write",{"_index":788,"t":{"82":{"position":[[660,7]]},"117":{"position":[[51,7]]},"119":{"position":[[31,7],[55,5]]},"175":{"position":[[213,5]]},"179":{"position":[[68,5]]},"187":{"position":[[167,7],[364,7]]},"225":{"position":[[45,7]]},"244":{"position":[[97,7]]},"571":{"position":[[246,5],[449,5]]}}}],["write(\"hello",{"_index":1190,"t":{"187":{"position":[[199,15],[396,15]]}}}],["write(text",{"_index":1188,"t":{"187":{"position":[[117,10],[285,11]]}}}],["written",{"_index":1292,"t":{"242":{"position":[[895,7]]},"321":{"position":[[683,7]]}}}],["wrong",{"_index":42,"t":{"4":{"position":[[400,5]]},"18":{"position":[[380,5],[472,5]]},"42":{"position":[[264,5]]}}}],["wrote",{"_index":804,"t":{"82":{"position":[[1686,5]]}}}],["x",{"_index":1379,"t":{"268":{"position":[[185,1],[192,1],[196,2],[216,2],[238,1]]},"276":{"position":[[424,6]]},"321":{"position":[[375,3]]},"331":{"position":[[87,1],[97,1],[101,1],[103,1],[113,1],[117,1],[119,1],[129,1]]},"577":{"position":[[72,1],[93,2]]},"711":{"position":[[24,2]]},"777":{"position":[[198,1],[296,1]]}}}],["x.new",{"_index":1402,"t":{"276":{"position":[[452,11]]}}}],["x8d\\xad\\x5f\\x6a\\x7d\\xd2\\xdc\\xd8\\xc3\\x5e\\xc2\\xfd\\x7b\\xab\\xb4\\x99\\xbc\\xad\\x60\\xd2\\x7d\\x73\\xfe\\x73\\xec\\xa2\\xce\\x02\\x5d\\xfd\\x3b\\x47",{"_index":1781,"t":{"465":{"position":[[382,131]]}}}],["xbc\\xe8\\xc9\\xac\\xa4\\x12\\x07\\x76\\xfa\\xd6\\xb5\\x17\\x87\\x4a\\xa0\\x9c\\x46\\x40\\x54\\x54",{"_index":1777,"t":{"463":{"position":[[352,83]]}}}],["xmelia",{"_index":1496,"t":{"308":{"position":[[458,6]]}}}],["xmiliah",{"_index":184,"t":{"12":{"position":[[770,8]]}}}],["xml",{"_index":220,"t":{"14":{"position":[[988,5]]},"731":{"position":[[20,4],[75,4],[134,4],[170,3]]},"733":{"position":[[33,3],[66,3],[148,5],[174,4],[226,3],[1124,3]]}}}],["xml.decod",{"_index":2348,"t":{"733":{"position":[[265,13]]}}}],["xor",{"_index":191,"t":{"14":{"position":[[64,3]]},"313":{"position":[[209,4]]}}}],["xpcall",{"_index":1434,"t":{"294":{"position":[[68,7]]}}}],["y",{"_index":2298,"t":{"711":{"position":[[27,1]]},"723":{"position":[[173,1],[255,1],[389,1],[565,1],[669,1],[873,1],[963,1]]},"725":{"position":[[171,5],[180,1]]},"727":{"position":[[167,1],[271,1],[391,1]]}}}],["yaw",{"_index":2320,"t":{"723":{"position":[[268,4],[297,3]]}}}],["yield",{"_index":982,"t":{"107":{"position":[[161,5],[494,7]]},"529":{"position":[[0,6],[109,5]]},"535":{"position":[[1804,7],[1904,6]]},"537":{"position":[[341,6]]},"539":{"position":[[222,6]]},"607":{"position":[[282,7]]},"617":{"position":[[328,5]]},"621":{"position":[[493,7]]},"627":{"position":[[340,8]]},"629":{"position":[[135,6]]},"687":{"position":[[96,7],[217,5]]}}}],["yieldfunc",{"_index":2240,"t":{"685":{"position":[[96,9]]},"687":{"position":[[0,9]]}}}],["you'd",{"_index":1257,"t":{"231":{"position":[[72,5]]},"242":{"position":[[85,5]]}}}],["you'll",{"_index":1391,"t":{"272":{"position":[[425,6]]}}}],["you'r",{"_index":1172,"t":{"181":{"position":[[318,6]]},"300":{"position":[[133,6]]},"308":{"position":[[380,6]]},"476":{"position":[[150,6]]},"478":{"position":[[151,6]]},"482":{"position":[[118,6]]},"484":{"position":[[85,6]]},"495":{"position":[[110,6]]},"497":{"position":[[111,6]]}}}],["yourself",{"_index":1192,"t":{"187":{"position":[[437,9]]},"203":{"position":[[345,9]]},"225":{"position":[[305,9]]},"231":{"position":[[386,9]]},"233":{"position":[[335,9]]},"235":{"position":[[367,9]]},"246":{"position":[[503,9]]},"248":{"position":[[401,9]]},"252":{"position":[[1047,9]]},"256":{"position":[[378,9],[780,9]]},"266":{"position":[[218,9]]},"274":{"position":[[215,9]]},"276":{"position":[[270,9]]},"282":{"position":[[227,9]]},"284":{"position":[[686,9]]},"286":{"position":[[413,9]]},"288":{"position":[[396,9]]},"290":{"position":[[496,9]]},"294":{"position":[[636,9]]},"321":{"position":[[622,9]]},"323":{"position":[[186,9]]},"325":{"position":[[248,9]]},"327":{"position":[[239,9]]},"531":{"position":[[409,9]]},"535":{"position":[[2461,9]]}}}],["z",{"_index":2299,"t":{"711":{"position":[[33,1]]},"723":{"position":[[278,1],[475,1],[771,1]]}}}],["zero",{"_index":1742,"t":{"442":{"position":[[151,5]]},"444":{"position":[[154,5]]},"661":{"position":[[516,5],[550,5]]}}}]],"pipeline":["stemmer"]}}] \ No newline at end of file diff --git a/search.html b/search.html index 5fe5d0fb..1e7cfffd 100644 --- a/search.html +++ b/search.html @@ -4,13 +4,13 @@ Search the documentation - +

Search the documentation

- + \ No newline at end of file