mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-06 04:37:47 +08:00
169 lines
5.3 KiB
HTML
169 lines
5.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="icon" type="image/svg" href="{{ STATIC_DIR }}img/favicon.svg">
|
|
|
|
<script src="{{ STATIC_DIR }}codejar/linenumbers.js"></script>
|
|
<link rel="stylesheet" href="{{ STATIC_DIR }}codejar/style.css">
|
|
|
|
<script src="{{ STATIC_DIR }}codejar/codejar.js"></script>
|
|
<script src="{{ STATIC_DIR }}highlight.js/highlight.min.js"></script>
|
|
<link rel="stylesheet" href="{{ STATIC_DIR }}highlight.js/colors.css">
|
|
|
|
<link rel="stylesheet" href="{{ STATIC_DIR }}rage_font/style.css">
|
|
<link rel="stylesheet" href="{{ STATIC_DIR }}css/style.css">
|
|
<link rel="stylesheet" href="{{ STATIC_DIR }}css/home.css">
|
|
<title>Pocketlang</title>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="navbar">
|
|
<a href=""><h1 id="pocketlang">pocketlang</h1></a>
|
|
<div>
|
|
<svg xmlns="http://www.w3.org/2000/svg" id="toggle-menu" viewBox="0 0 20 20" width="30" height="30">
|
|
<path d="M0 0h24v24H0z" fill="none"></path>
|
|
<path fill="currentColor" d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path>
|
|
</svg>
|
|
<ul>
|
|
<li><a href="{{ DOCS_URL }}Reference/Getting-Started.html">Docs</a></li>
|
|
<li><a href="">Download</a></li>
|
|
<li><a target="_blank" href="https://www.github.com/ThakeeNathees/pocketlang/">Github</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="main">
|
|
|
|
<section id="intro">
|
|
<div id="intro-text">
|
|
<h1>
|
|
Pocketlang is a small, fast and friendly language
|
|
</h1>
|
|
<p>
|
|
A dynamic typed, highlevel language language designed for scripting and
|
|
embedding easily. Supports object oriented programming, higher order
|
|
functions, closures(wip), fibers, garbage collection and more.
|
|
</p>
|
|
<a class="button" href="{{ DOCS_URL }}Reference/Getting-Started.html">Get Started</a>
|
|
</div>
|
|
<img src="{{ STATIC_DIR }}img/pocketlang.svg">
|
|
</section>
|
|
|
|
<section id="what-pocketlang-looks-like">
|
|
<h1 class="section-title">What pocketlang looks like?</h1>
|
|
<p>
|
|
With mixed syntax of ruby and python, that can be learned in less than an hour, and it's
|
|
easy to embed into another application for scripting. Here is a smaple pocketlang code.
|
|
</p>
|
|
<pre><code class="highlight ruby">
|
|
# Python like import statement.
|
|
from lang import clock as now
|
|
|
|
# A recursive fibonacci function.
|
|
def fib(n)
|
|
if n < 2 then return n end
|
|
return fib(n-1) + fib(n-2)
|
|
end
|
|
|
|
# Prints all fibonacci from 0 to 10 exclusive.
|
|
for i in 0..10
|
|
print(fib(i))
|
|
end
|
|
</code></pre>
|
|
</section>
|
|
|
|
<section id="features">
|
|
<div id="features-grid">
|
|
|
|
<div class="feature">
|
|
<div class="feature-img">
|
|
<img src="{{ STATIC_DIR }}img/concurrent.svg">
|
|
</div>
|
|
<h2>Concurrent</h2>
|
|
<p>
|
|
Pocketlang's fibers (lightweight threads) allows you to write parallel
|
|
tasks easily, without worrying about thread safety.
|
|
</p>
|
|
<a href="">Learn more</a>
|
|
</div>
|
|
|
|
<div class="feature">
|
|
<div class="feature-img">
|
|
<img src="{{ STATIC_DIR }}img/gear.svg">
|
|
</div>
|
|
<h2>Embeddible</h2>
|
|
<p>
|
|
You can use PKVM as any other libraries in your application.
|
|
It's specifically designed to be embedded in other programs.
|
|
</p>
|
|
<a href="">Learn more</a>
|
|
</div>
|
|
|
|
<div class="feature">
|
|
<div class="feature-img">
|
|
<img src="{{ STATIC_DIR }}img/gc.svg">
|
|
</div>
|
|
<h2>Garbage Collected</h2>
|
|
<p>
|
|
With the pocketlan's garbage collector you can write code
|
|
without worrying about memory management.
|
|
</p>
|
|
<a href="">Learn more</a>
|
|
</div>
|
|
|
|
<div class="feature">
|
|
<div class="feature-img">
|
|
<img src="{{ STATIC_DIR }}img/repl.svg">
|
|
</div>
|
|
<h2>REPL</h2>
|
|
<p>
|
|
The interactive prompt of pocketlang will makes it easier to test and play with it
|
|
on the command line.
|
|
</p>
|
|
<a href="">Learn more</a>
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
|
|
<section id="try-it-now">
|
|
<h1 class="section-title">
|
|
Try it now
|
|
<a class="anchor" href="#try-it-now">#</a>
|
|
</h1>
|
|
|
|
<p class="code-area-label">code editor</p>
|
|
<div id="code-area-wrapper">
|
|
<div id="run-button" class="button">
|
|
<div>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
|
<path fill="none" d="M0 0h24v24H0z"/>
|
|
<path fill="currentColor" d="M19.376 12.416L8.777 19.482A.5.5 0 0 1 8 19.066V4.934a.5.5 0 0 1 .777-.416l10.599 7.066a.5.5 0 0 1 0 .832z"/>
|
|
</svg>
|
|
<p>Run</p>
|
|
</div>
|
|
</div>
|
|
<div id="code-editor" class="editor language-ruby"></div>
|
|
</div>
|
|
|
|
<p class="code-area-label">output</p>
|
|
<div id="code-output">...</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
<p>Made by <a href="https://www.github.com/ThakeeNathees">ThakeeNathees</a>
|
|
and contributers on <a href="https://www.github.com/">github</a>.</p>
|
|
</div>
|
|
|
|
<script async type="text/javascript" src="{{ STATIC_DIR }}wasm/pocketlang.js"></script>
|
|
<script src="{{ STATIC_DIR }}js/home.js"></script>
|
|
|
|
</body>
|
|
</html>
|