diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 7e80ab2..11b9e2d 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -11,12 +11,12 @@ permissions: env: INSTANCE: 'Writerside/e' ARTIFACT: 'webHelpE2-all.zip' - DOCKER_VERSION: '241.15989' + DOCKER_VERSION: '243.22562' ALGOLIA_ARTIFACT: 'algolia-indexes-E.zip' - ALGOLIA_APP_NAME: 'GPZ3MWT2LQ' + ALGOLIA_APP_NAME: '6PJZ7B6YKU' ALGOLIA_INDEX_NAME: 'dev_elide_docs' CONFIG_JSON_PRODUCT: 'E' - CONFIG_JSON_VERSION: '1.0.0-alpha13' + CONFIG_JSON_VERSION: '1.0.0-beta1' jobs: build: @@ -88,10 +88,10 @@ jobs: - name: Create API docs layout run: | - mkdir -p dir/api + mkdir -p dir/ cp -fv apidocs.tgz dir/ cd dir - tar --strip-components=1 -xzf apidocs.tgz + tar -xzf apidocs.tgz rm -fv apidocs.tgz cd .. echo "API docs unpacked." diff --git a/API/1.0.0-beta1.tgz b/API/1.0.0-beta1.tgz new file mode 100644 index 0000000..6368b6f Binary files /dev/null and b/API/1.0.0-beta1.tgz differ diff --git a/API/latest.tgz b/API/latest.tgz index da19427..e5495f5 120000 --- a/API/latest.tgz +++ b/API/latest.tgz @@ -1 +1 @@ -./1.0.0-alpha10.tgz \ No newline at end of file +1.0.0-beta1.tgz \ No newline at end of file diff --git a/Creative/images/benchmarks/bench-js-vs-ts.png b/Creative/images/benchmarks/bench-js-vs-ts.png new file mode 100644 index 0000000..42054a5 Binary files /dev/null and b/Creative/images/benchmarks/bench-js-vs-ts.png differ diff --git a/Creative/images/benchmarks/graalpy-performance.png b/Creative/images/benchmarks/graalpy-performance.png new file mode 100644 index 0000000..78a832e Binary files /dev/null and b/Creative/images/benchmarks/graalpy-performance.png differ diff --git a/Creative/images/benchmarks/graalpy-performance.svg b/Creative/images/benchmarks/graalpy-performance.svg new file mode 100644 index 0000000..f4485a1 --- /dev/null +++ b/Creative/images/benchmarks/graalpy-performance.svg @@ -0,0 +1,4 @@ + +Geomean Speedup over CPython on the Python Performance Suite0011223344CPython 3.10.8Jython 2.7.2GraalPy 23.11132.8205128205128299.06171735241503CPython 3.10.80.81370.0101.48345259391772Jython 2.7.24.3607.179487179487257.0GraalPy 23.1Geomean Speedup over CPython on the Python Performance Suite \ No newline at end of file diff --git a/Creative/images/benchmarks/oxc-parsing.svg b/Creative/images/benchmarks/oxc-parsing.svg new file mode 100644 index 0000000..192e1bd --- /dev/null +++ b/Creative/images/benchmarks/oxc-parsing.svg @@ -0,0 +1,45 @@ + + + + + + + Parser Benchmark + + + oxc + + + swc + + + biome + + + + + + + + + + + + + + + + + + + 0 + 100 + 200 + 300 + 400 + single-thread + + + time (ms) + + diff --git a/Creative/images/procedures/bin-help.png b/Creative/images/procedures/bin-help.png index 6cb53a3..de016f3 100644 Binary files a/Creative/images/procedures/bin-help.png and b/Creative/images/procedures/bin-help.png differ diff --git a/Creative/images/procedures/bin-selftest.png b/Creative/images/procedures/bin-selftest.png deleted file mode 100644 index 502d078..0000000 Binary files a/Creative/images/procedures/bin-selftest.png and /dev/null differ diff --git a/Writerside/c.list b/Writerside/c.list index 4be0f16..a3d173f 100644 --- a/Writerside/c.list +++ b/Writerside/c.list @@ -6,4 +6,5 @@ + diff --git a/Writerside/cfg/analytics_head.html b/Writerside/cfg/analytics_head.html index b1d4dd9..acb0fc2 100644 --- a/Writerside/cfg/analytics_head.html +++ b/Writerside/cfg/analytics_head.html @@ -2,4 +2,14 @@ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); -})(window,document,'script','dataLayer','GTM-MJRGMMMX'); \ No newline at end of file +})(window,document,'script','dataLayer','GTM-MJRGMMMX'); + \ No newline at end of file diff --git a/Writerside/cfg/buildprofiles.xml b/Writerside/cfg/buildprofiles.xml index 121f220..89029c0 100644 --- a/Writerside/cfg/buildprofiles.xml +++ b/Writerside/cfg/buildprofiles.xml @@ -3,9 +3,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - GPZ3MWT2LQ + 6PJZ7B6YKU dev_elide_docs - abebcedd3851d40b84a9da43b71553bf + 0972c9bdc10f2fa920b737534bd6bb96 https://docs.elide.dev @@ -14,21 +14,17 @@ purple mark-e-favicon-r2.svg - mark-e-gray.png + mark-sq-gray.svg analytics_head.html analytics_tail.html - - true - https://github.com/elide-dev/docs/edit/main/Writerside/topics/ - false false - https://help.elide.dev - https://help.elide.dev + https://github.com/elide-dev/elide/issues/new + https://github.com/elide-dev/elide/issues/new true @@ -55,7 +51,7 @@ true - + icons @@ -68,6 +64,8 @@ %product% on GitHub + + diff --git a/Writerside/e.tree b/Writerside/e.tree index 6c569db..0d8637c 100644 --- a/Writerside/e.tree +++ b/Writerside/e.tree @@ -3,113 +3,91 @@ SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd"> - + name="Elide" + start-page="Index.md"> - + + + + + + + + + diff --git a/Writerside/images/bench-js-vs-ts.png b/Writerside/images/bench-js-vs-ts.png new file mode 100644 index 0000000..42054a5 Binary files /dev/null and b/Writerside/images/bench-js-vs-ts.png differ diff --git a/Writerside/images/bin-help.png b/Writerside/images/bin-help.png index 0c62f81..de016f3 100644 Binary files a/Writerside/images/bin-help.png and b/Writerside/images/bin-help.png differ diff --git a/Writerside/images/graalpy-performance.png b/Writerside/images/graalpy-performance.png new file mode 100644 index 0000000..78a832e Binary files /dev/null and b/Writerside/images/graalpy-performance.png differ diff --git a/Writerside/images/graalpy-performance.svg b/Writerside/images/graalpy-performance.svg new file mode 100644 index 0000000..f4485a1 --- /dev/null +++ b/Writerside/images/graalpy-performance.svg @@ -0,0 +1,4 @@ + +Geomean Speedup over CPython on the Python Performance Suite0011223344CPython 3.10.8Jython 2.7.2GraalPy 23.11132.8205128205128299.06171735241503CPython 3.10.80.81370.0101.48345259391772Jython 2.7.24.3607.179487179487257.0GraalPy 23.1Geomean Speedup over CPython on the Python Performance Suite \ No newline at end of file diff --git a/Writerside/images/mark-sq-gray.svg b/Writerside/images/mark-sq-gray.svg new file mode 100644 index 0000000..b4d3ace --- /dev/null +++ b/Writerside/images/mark-sq-gray.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Writerside/images/oxc-parsing.svg b/Writerside/images/oxc-parsing.svg new file mode 100644 index 0000000..192e1bd --- /dev/null +++ b/Writerside/images/oxc-parsing.svg @@ -0,0 +1,45 @@ + + + + + + + Parser Benchmark + + + oxc + + + swc + + + biome + + + + + + + + + + + + + + + + + + + 0 + 100 + 200 + 300 + 400 + single-thread + + + time (ms) + + diff --git a/Writerside/images/oxc-parsing.svg:Zone.Identifier b/Writerside/images/oxc-parsing.svg:Zone.Identifier new file mode 100644 index 0000000..e69de29 diff --git a/Writerside/redirection-rules.xml b/Writerside/redirection-rules.xml index 0c49c66..dd34352 100644 --- a/Writerside/redirection-rules.xml +++ b/Writerside/redirection-rules.xml @@ -5,4 +5,40 @@ Created after removal of "Welcome" from Elide Welcome.html + + Created after removal of "Code Samples" from Elide + Framework-Samples.html + + + Created after removal of "Elide Base" from Elide + Elide-Base.html + + + Created after removal of "Elide Core" from Elide + Elide-Core.html + + + Created after removal of "Elide Framework" from Elide + Elide-Framework.html + + + Created after removal of "Execution" from Elide + Execution.html + + + Created after removal of "Security" from Elide + Security.html + + + Created after removal of "Performance" from Elide + Performance.html + + + Created after removal of "Architecture" from Elide + Architecture.html + + + Created after removal of "Container Images" from Elide + Container-Images.html + \ No newline at end of file diff --git a/Writerside/topics/101-Debugging.md b/Writerside/topics/101-Debugging.md new file mode 100644 index 0000000..f3960cd --- /dev/null +++ b/Writerside/topics/101-Debugging.md @@ -0,0 +1,3 @@ +# Intro: Debugging + +Start typing here... diff --git a/Writerside/topics/101-Environment.md b/Writerside/topics/101-Environment.md index 32c4088..43e4921 100644 --- a/Writerside/topics/101-Environment.md +++ b/Writerside/topics/101-Environment.md @@ -18,7 +18,7 @@ uniform across all languages: in Elide. If you see a variable in JavaScript, you will see it as well in Python, Ruby, and so on. > With %product%, system environment variables are **invisible by default** to running code. You can allow access to -> system variables using [command line flags](CLI-Reference.md). +> environment using [command line flags](CLI-Reference.md). > {style="note"} ## Before you start diff --git a/Writerside/topics/101-Polyglot-Context.md b/Writerside/topics/101-Polyglot-Context.md new file mode 100644 index 0000000..67bf15f --- /dev/null +++ b/Writerside/topics/101-Polyglot-Context.md @@ -0,0 +1,3 @@ +# Intro: Interop + +Coming soon! diff --git a/Writerside/topics/101-Servers.md b/Writerside/topics/101-Servers.md new file mode 100644 index 0000000..ba67b48 --- /dev/null +++ b/Writerside/topics/101-Servers.md @@ -0,0 +1,3 @@ +# Intro: Servers + +Start typing here... \ No newline at end of file diff --git a/Writerside/topics/Architecture.md b/Writerside/topics/Architecture.md index 236cccb..adce68e 100644 --- a/Writerside/topics/Architecture.md +++ b/Writerside/topics/Architecture.md @@ -1,25 +1,54 @@ # Architecture -This page gives an overview of %product%'s internal architecture. Users of %product% don't necessarily need to know -these details; these docs are mostly for contributors, but everyone is welcome! +%product% is powered by several insanely cool technologies. In no particular order: -## How %product% works +- **[GraalVM][0] is %product%'s main execution engine** and guest interpreter/compiler. %product% leverages [Truffle][1] + language engines, including [GraalJs][2], [GraalPython][3], [TruffleRuby][4], and [Sulong][5]. -At a high level, %product% is a suite of libraries and applications written for the Java Virtual Machine, or -[JVM](https://docs.oracle.com/en/java/javase/21/vm/java-virtual-machine-technology-overview.html). +- Most of %product% is **written in [Kotlin][7]** and built against the [JVM 23][8]. Thus, %product%'s own code is + checked extensively at build-time for `null` safety, and is memory-safe by default. -The JVM is an incredibly powerful runtime system, offering state-of-the-art just-in-time (JIT) compilation, memory -safety, and a full standard library with plenty of testing and functional coverage (referred to as the -[JDK](https://en.wikipedia.org/wiki/Java_Development_Kit), for Java Development Kit). +- Native portions of %product% are **written in [Rust][9]**, which extends safety guarantees as much as possible even + outside the context of the JVM/SVM. - +- Networking in %product% is **powered by [Netty][10]**, which offers world-class performance and durability for + networked applications. + +- %product% embeds **best-of-breed tooling** for guest languages: [oxc][11], [orogene][12], and [uv][13] are available + transparently. **[Pkl is supported][14] for configuration** and interoperable data expression. + +- **[Micronaut][6] wires together %product%** internally, with build-time dependency injection (DI). This architecture + is what keeps startup time fast while preserving modularity. -## Glossary +### Specific Topics -A definition list or a glossary: +See dedicated pages for [](Security.md) and [](Performance.md). -First Term -: This is the definition of the first term. + + + + + + + +## How %product% works + + -Second Term -: This is the definition of the second term. +> Note: This is already out of date, but it's as close as we have right now to an architectural diagram. + +[0]: https://graalvm.org +[1]: https://www.graalvm.org/latest/graalvm-as-a-platform/language-implementation-framework/ +[2]: https://github.com/oracle/graaljs +[3]: https://github.com/oracle/graalpython +[4]: https://github.com/oracle/truffleruby +[5]: https://github.com/oracle/graal/blob/master/sulong/README.md +[6]: https://micronaut.io +[7]: https://kotlinlang.org +[8]: https://en.wikipedia.org/wiki/Java_virtual_machine +[9]: https://rustlang.org +[10]: https://netty.io/ +[11]: https://oxc.rs +[12]: https://orogene.dev +[13]: https://github.com/astral-sh/uv +[14]: https://pkl-lang.org diff --git a/Writerside/topics/CLI-Reference.md b/Writerside/topics/CLI-Reference.md index 11ebc35..12ce474 100644 --- a/Writerside/topics/CLI-Reference.md +++ b/Writerside/topics/CLI-Reference.md @@ -1,22 +1,48 @@ # CLI Reference -%product% supports multiple sub-commands, similar to Git or Bun. +%product% supports multiple sub-commands, similar to Git. ## Usage Syntax: ```text -elide [OPTIONS] - or: elide info|help|discord|bug... [OPTIONS] - or: elide srcfile. [OPTIONS] - or: elide js|kt|jvm|python|ruby|wasm|node|deno [OPTIONS] [FILE] - or: elide run|repl|serve [OPTIONS] [FILE] - or: elide run|repl|serve [OPTIONS] [--code CODE] - or: elide run|repl [OPTIONS] - or: elide run|repl --js [OPTIONS] - or: elide run|repl --language=[JS] [OPTIONS] [FILE] - or: elide run|repl --languages=[JS,PYTHON,...] [OPTIONS] [FILE] + Usage: + or: elide info|help|discord|bug... [OPTIONS] + or: elide srcfile. [OPTIONS] + or: elide js|node|deno [OPTIONS] [FILE] [ARG...] + or: elide js|node|deno [OPTIONS] [--code CODE] + or: elide run|repl|serve [OPTIONS] [FILE] [ARG...] + or: elide run|repl|serve [OPTIONS] [--code CODE] + or: elide run|repl [OPTIONS] + or: elide run|repl --js [OPTIONS] + or: elide run|repl --language=[JS] [OPTIONS] [FILE] [ARG...] + or: elide run|repl --languages=[JS,PYTHON,...] [OPTIONS] [FILE] [ARG...] + +Manage, configure, and run polyglot applications with Elide + +Parameters: + [FILE] Source file to run. + [ARG...] Arguments to pass + +Options: + -h, --help Show this message and exit. + -V, --version Print version information and exit. + +Commands: + info Show info about the current app and environment + help, bug, issue + Report an issue or bug, find help for using Elide + run, r, serve, repl + Run a polyglot script, server, or interactive shell + pkl + Run the Pkl command-line tools + discord Open or show a Discord invite link + +Exit Codes: + 0 Successful program execution. + 1 Generic failure (terminal). + 2 Exception in user code. ``` ## Runner Commands @@ -35,10 +61,13 @@ an appropriate language if given a clearly identifiable source file (Python for : Alias to `run` some Ruby. Equivalent to `elide run --ruby ...`. `js` -: Opens a file. Equivalent to `elide run --javascript ...`. Note that JavaScript is the default language engine. +: Runs a file. Equivalent to `elide run --javascript ...`. Note that JavaScript is the default language engine. ## Utility Commands +`install` +: Install dependencies for an %product% project; this includes all supported ecosystems by default. + `info` : Show info about the current installation of %product%. @@ -51,9 +80,6 @@ an appropriate language if given a clearly identifiable source file (Python for `bug`, `issue` : File an issue or a feature request for %product%. -`selfupdate` -: Upgrade %product% to the latest version in-place. - ## Global Options Describe what each option is used for: @@ -69,7 +95,3 @@ Describe what each option is used for: -d, --debug : Activate debug logging. **Caution:** Debug-level logging can be very verbose. - - - - \ No newline at end of file diff --git a/Writerside/topics/Compatibility.md b/Writerside/topics/Compatibility.md index 7a2714a..1471f1f 100644 --- a/Writerside/topics/Compatibility.md +++ b/Writerside/topics/Compatibility.md @@ -11,7 +11,7 @@ Refer to the table below for resources regarding compatibility in each language. | Language | Stability | %product%'s Engine | Stock Engine | Notes | |--------------------------------|--------------------------------------------------------------------|-------------------------------------------------------------------------|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------| -| [JavaScript](JavaScript.md) | ![Beta](https://img.shields.io/badge/-beta-purple) | [GraalJs](https://github.com/oracle/graaljs) | [V8](https://v8.dev/) | ECMA2023-compatible. [Node API](Node-API.md) compat pending. | +| [JavaScript](JavaScript.md) | ![Beta](https://img.shields.io/badge/-beta-purple) | [GraalJs](https://github.com/oracle/graaljs) | [V8](https://v8.dev/) | ECMA2024-compatible. [Node API](Node-API.md) compat pending. | | [WebAssembly](Experimental.md) | ![Alpha](https://img.shields.io/badge/-alpha-blue) | [GraalWasm](https://github.com/oracle/graal/blob/master/wasm/README.md) | [V8](https://v8.dev/) | | | [Python](Python.md) | ![Alpha](https://img.shields.io/badge/-alpha-blue) | [GraalPython](https://github.com/oracle/graalpython) | [CPython](https://github.com/python/cpython) | Roughly **~48% compatible** with PyPI top 500. See [here](https://www.graalvm.org/python/compatibility/). | | [Ruby](Ruby.md) | ![Alpha](https://img.shields.io/badge/-alpha-blue) | [TruffleRuby](https://github.com/oracle/truffleruby) | [MRI](https://rvm.io/interpreters/ruby) | Passes ~**97% of `ruby/spec`**. See [here](https://www.graalvm.org/latest/reference-manual/ruby/Compatibility/) | diff --git a/Writerside/topics/Container-Images.md b/Writerside/topics/Container-Images.md deleted file mode 100644 index a1ab57c..0000000 --- a/Writerside/topics/Container-Images.md +++ /dev/null @@ -1,3 +0,0 @@ -# Container Images - -Coming soon. diff --git a/Writerside/topics/GettingStarted.md b/Writerside/topics/GettingStarted.md index 43de58c..6440941 100644 --- a/Writerside/topics/GettingStarted.md +++ b/Writerside/topics/GettingStarted.md @@ -4,16 +4,15 @@ Run your first code samples with %product% ## Before you start -You'll need an installed copy of %product%. Follow the [Installation](Installation.md) guide to obtain a copy of +You'll need an installed copy of %product%. Follow the [](Installation.md) guide to obtain a copy of %product%. ## Running some code %product% can accept a raw string of code or a file to run in any supported language. Best attempts are made to detect -the [primary language](Execution.md#primary-language) via the source file's extension (`.js` will load a JS VM, `.py` a -Python VM, etc.). +the primary language via the source file's extension (`.js` will load a JS VM, `.py` a Python VM, etc.). -1. Let's run a snippet of [JavaScript](JavaScript.md) +1. Let's run a snippet of [](JavaScript.md) ```bash elide run --javascript -c "console.log('Hello!');" @@ -23,7 +22,7 @@ Python VM, etc.). Exiting session. Have a great day! πŸ‘‹ ``` -2. Now let's do the same thing, but with some [Python](Python.md) +2. Now let's do the same thing, but with some [](Python.md) ```bash elide run --python -c 'print("Hello!")' @@ -33,7 +32,7 @@ Python VM, etc.). Exiting session. Have a great day! πŸ‘‹ ``` -3. Now let's do the same thing, but with some [Ruby](Ruby.md) +3. Now let's do the same thing, but with some [](Ruby.md) ```bash elide run --ruby -c 'puts "Hello!"' @@ -81,6 +80,5 @@ elide ruby Installing %product% Polyglot 101: Thinking in Multiple Languages %product% Runtime: Language Guides - %product% Framework: Using %product% from JVM diff --git a/Writerside/topics/Index.md b/Writerside/topics/Index.md index 81454a8..a6b654d 100644 --- a/Writerside/topics/Index.md +++ b/Writerside/topics/Index.md @@ -1,29 +1,102 @@ -# Welcome +# README %product% -Welcome to the main [Elide](https://elide.dev) documentation site. Here you can find reference docs, -[guides](Polyglot.md), [code samples](Framework-Samples.md), and more. +[%product%](https://elide.dev) is a high-performance multi-language software runtime. Here you can find reference docs, guides, +code samples, and more. +## Highlights + +πŸš€ **%product% is a runtime, like Node or Python.** + +You install it on your machine as a standalone binary. %product% is +statically linked and has essentially zero runtime dependencies. + +You can install it on macOS or Linux with this one-liner:
+curl -sSL --tlsv1.2 elide.sh | bash -s - -## %product% is in alpha +πŸ—ΊοΈ **%product% can run multiple languages.** -Check out our alpha event launch video, which comes with sample code and demonstrates what %product% can do for your -workflow +JavaScript, TypeScript, WASM, and Python are built-in. Ruby, JVM (Java, +Kotlin, Scala), and LLVM (Swift, C++, Rust) are on the way. -
+ +[0]: https://min-common-api.proposal.wintertc.org/ +[1]: https://www.techempower.com/benchmarks/#hw=ph&test=plaintext§ion=data-r23 diff --git a/Writerside/topics/Language-Guides.topic b/Writerside/topics/Language-Guides.topic index 923fc10..a86be8a 100644 --- a/Writerside/topics/Language-Guides.topic +++ b/Writerside/topics/Language-Guides.topic @@ -12,39 +12,26 @@ - Polyglot 101 + Reference Languages - JavaScript, TypeScript, Node.js - Python - Ruby + JavaScript, TypeScript, Node.js + + JVM, LLVM, WASM - Building servers - Kotlin + React SSR - %product% + Express.js - Static Assets + Conformance + + %product% + WinterTC - - Architecture guides - - - - - - Related Software - Micronaut - Kotlin - GraalVM - Legal & Licensing Terms of Use diff --git a/Writerside/topics/Node-API.md b/Writerside/topics/Node-API.md index 32af285..f333f01 100644 --- a/Writerside/topics/Node-API.md +++ b/Writerside/topics/Node-API.md @@ -33,10 +33,10 @@ Opening issues for compatibility bugs helps us prioritize what to work on next. : πŸ”΄ Not implemented. [`node:buffer`](https://nodejs.org/api/buffer.html) -: πŸ”΄ Not implemented. +: 🟑 Partial support. [`node:child_process`](https://nodejs.org/api/child_process.html) -: πŸ”΄ Not implemented. +: 🟑 Partial support. [`node:cluster`](https://nodejs.org/api/cluster.html) : πŸ”΄ Not implemented. @@ -157,10 +157,10 @@ Opening issues for compatibility bugs helps us prioritize what to work on next. The table below lists all globals implemented by Node.js and Bun's current compatibility status. [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) -: 🟑 Polyfilled. +: 🟒 Supported. [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) -: 🟑 Polyfilled. +: 🟒 Supported. [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) : 🟒 Supported. @@ -169,13 +169,13 @@ The table below lists all globals implemented by Node.js and Bun's current compa : 🟒 Supported. [`ByteLengthQueuingStrategy`](https://developer.mozilla.org/en-US/docs/Web/API/ByteLengthQueuingStrategy) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`__dirname`](https://nodejs.org/api/globals.html#__dirname) -: πŸ”΄ Not implemented. +: 🟒 Supported in CJS contexts. [`__filename`](https://nodejs.org/api/globals.html#__filename) -: πŸ”΄ Not implemented. +: 🟒 Supported in CJS contexts. [`atob()`](https://developer.mozilla.org/en-US/docs/Web/API/atob) : 🟒 Supported. @@ -229,19 +229,19 @@ The table below lists all globals implemented by Node.js and Bun's current compa : 🟒 Supported. [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch) -: 🟑 Coming soon. +: 🟒 Supported (experimental). [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) : πŸ”΄ Not implemented. [`global`](https://nodejs.org/api/globals.html#global) -: 🟒 Supported. This is an object containing all objects in the global namespace. It's rarely referenced directly, as its contents are available without an additional prefix, e.g. `__dirname` instead of `global.__dirname`. +: 🟒 Aliases to `globalThis`. [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) -: 🟒 Aliases to `global`. +: 🟒 Supported. This is an object containing all objects in the global namespace. It's rarely referenced directly, as its contents are available without an additional prefix, e.g. `__dirname` instead of `global.__dirname`. [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`MessageChannel`](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel) : πŸ”΄ Not implemented. @@ -274,40 +274,40 @@ The table below lists all globals implemented by Node.js and Bun's current compa : πŸ”΄ Not implemented. [`performance`](https://developer.mozilla.org/en-US/docs/Web/API/performance) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`process`](https://nodejs.org/api/process.html) : 🟒 Supported. [`queueMicrotask()`](https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotask) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`ReadableByteStreamController`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) : 🟒 Supported. [`ReadableStreamBYOBReader`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`ReadableStreamBYOBRequest`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBRequest) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`ReadableStreamDefaultController`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultController) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`ReadableStreamDefaultReader`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`require()`](https://nodejs.org/api/globals.html#require) : 🟒 Supported, including [`require.main`](https://nodejs.org/api/modules.html#requiremain), [`require.cache`](https://nodejs.org/api/modules.html#requirecache), [`require.resolve`](https://nodejs.org/api/modules.html#requireresolverequest-options) [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`setImmediate()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate) : 🟑 Coming soon. @@ -328,22 +328,22 @@ The table below lists all globals implemented by Node.js and Bun's current compa : πŸ”΄ Not implemented. [`TextDecoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) -: 🟑 Polyfilled. +: 🟒 Supported. [`TextDecoderStream`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoderStream) : πŸ”΄ Not implemented. [`TextEncoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder) -: 🟑 Polyfilled. +: 🟒 Supported. [`TextEncoderStream`](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoderStream) : πŸ”΄ Not implemented. [`TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`TransformStreamDefaultController`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStreamDefaultController) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) : 🟒 Supported; approaches full compliance. @@ -358,10 +358,10 @@ The table below lists all globals implemented by Node.js and Bun's current compa : 🟒 Supported. [`WritableStreamDefaultController`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultController) -: πŸ”΄ Not implemented. +: 🟒 Supported. [`WritableStreamDefaultWriter`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter) -: πŸ”΄ Not implemented. +: 🟒 Supported. ## Let us know what you need diff --git a/Writerside/topics/Performance.md b/Writerside/topics/Performance.md index 8740e1f..279145c 100644 --- a/Writerside/topics/Performance.md +++ b/Writerside/topics/Performance.md @@ -1,3 +1,57 @@ # Performance -Start typing here... +%product% is built on top of [GraalVM][0] and [Truffle][1]. This core difference leads to significant performance +advantages, especially with regard to polyglot programming. + +%product% uses GraalVM in place of V8 or JSC (used by Node/Deno and Bun, respectively). + +## GraalVM + Truffle + +Instead of implementing just one language (V8 implements JavaScript, CPython implements Python, and so on), GraalVM and +Truffle, together, constitute an abstract framework for authoring a high-performance JIT interpreter and compiler. + +Languages are simply dialects (Truffle) into this shared backend (Graal). %product% wires together the APIs necessary to +make this into a luxurious experience. + +Some notes about why GraalVM + Truffle is so fast: + +- **Graal is a state-of-the-art optimizing compiler**, implementing advanced code generation and speculative + optimization techniques. + +- **Graal can see across language borders**, enabling inlining across languages and other compiler tricks. It's all + "just code" to the Graal compiler, whether it is Python, JavaScript, or something else. + +- **Graal can collect garbage across borders**, so pauses are minimized and cohesive. + +## Language Performance + +Notes about pure language execution performance. + +### JavaScript, TypeScript, WASM + +%product% is competitive with Node and Deno at execution of [](JavaScript.md), [](TypeScript.md), and +[](WebAssembly.md). + +Pure JS/TS startup time for %product% can be very fast: + +| Runtime | Language | Case | Startup latency (cold) | Hit latency (hot server) | +|---------|-----------------------|-------------|------------------------|--------------------------| +| Bun | JavaScript/TypeScript | Hello World | ~6.5ms | ~1.5ms | +| Node | JavaScript Only | Hello World | ~10ms | ~7ms | +| Deno | JavaScript Only | Hello World | ~15ms | ~71ms | +| Elide | JavaScript/TypeScript | Hello World | ~20ms | ~2ms | + +> Numbers are representative of expected performance on Linux/amd64 with a modern CPU. [TechEmpower][2] independently +> benchmarks %product% (see benchmarks below). +{style="note"} + +### Python + +%product% is competitive with modern optimizing Python runtimes like PyPy and often beats CPython. GraalPython provides +[continuous benchmarks upstream](https://www.graalvm.org/python/docs/#python-performance). + +Geomean speedup over CPython + +[0]: https://graalvm.org +[1]: https://www.graalvm.org/latest/graalvm-as-a-platform/language-implementation-framework/ +[2]: https://www.techempower.com/benchmarks/#hw=ph&test=plaintext§ion=data-r23:~:text=0-,elide,-2.4%20ms diff --git a/Writerside/topics/Pkl.md b/Writerside/topics/Pkl.md index 2fc9b15..ad5cfe3 100644 --- a/Writerside/topics/Pkl.md +++ b/Writerside/topics/Pkl.md @@ -1,3 +1,68 @@ # Pkl -Coming soon. +Pkl is a typed configuration and data language by Apple. +From [Pkl's User Manual](https://pkl-lang.org/main/current/index.html): + +> Pklβ€”pronounced Pickleβ€”is an embeddable configuration language which provides rich support for data templating and +> validation. It can be used from the command line, integrated in a build pipeline, or embedded in a program. Pkl scales +> from small to large, simple to complex, ad-hoc to repetitive configuration tasks. +{style="note"} + +--- + +## What Pkl is for + +Pkl allows developers to express structured configurations in a concise and typed dialect (that's Pkl), which can be +rendered into things like JSON, YAML, TOML, and more. + +Pkl can also generate code in various languages to interface with these definitions. + +